(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["main"],{ /***/ "./package.json": /*!**********************!*\ !*** ./package.json ***! \**********************/ /*! exports provided: name, version, scripts, private, dependencies, devDependencies, default */ /***/ (function(module) { module.exports = {"name":"portal","version":"0.0.0","scripts":{"ng":"ng","start":"ng serve","build":"ng build","deploy:live":"npm run build && aws s3 sync dist/ s3://muhimmaplatform.com --delete && npm run-script invalidate-cache:live","invalidate-cache:live":"aws configure set preview.cloudfront true && aws cloudfront create-invalidation --distribution-id E289GUELXHL8EF --paths /*","test":"ng test","lint":"ng lint","e2e":"ng e2e","bundle-report":"webpack-bundle-analyzer dist/stats.json"},"private":true,"dependencies":{"@agm/core":"^1.0.0-beta.5","@angular/animations":"^6.1.10","@angular/cdk":"^7.3.3","@angular/common":"^6.0.3","@angular/compiler":"^6.0.3","@angular/core":"^6.0.3","@angular/forms":"^6.0.3","@angular/http":"^6.0.3","@angular/platform-browser":"^6.0.3","@angular/platform-browser-dynamic":"^6.0.3","@angular/router":"^6.0.3","@ctrl/ngx-csv":"^1.1.5","@ng-bootstrap/ng-bootstrap":"^2.2.2","@ngx-loading-bar/core":"^4.2.0","@ngx-loading-bar/http-client":"^4.2.0","@ngx-loading-bar/router":"^4.2.0","@ngx-translate/core":"^10.0.2","@ngx-translate/http-loader":"^3.0.1","@swimlane/ngx-datatable":"^14.0.0","@types/wordcloud":"^1.1.1","angular-d3-word-cloud":"^0.5.3","angular-file-uploader":"^5.0.2","angular-tag-cloud-module":"^3.0.0","angular-tree-component":"^8.5.2","angular4-word-cloud":"^1.0.4","aws-amplify":"^1.1.13","aws-amplify-angular":"^2.0.16","bootstrap":"^4.4.1","core-js":"^2.5.4","d3":"^5.15.0","d3-cloud":"^1.2.5","jquery":"^1.9.1","moment":"^2.24.0","ng-pick-datetime":"^6.0.16","ng5-slider":"^1.1.13","ngx-moment":"^3.3.0","ngx-quill":"^3.6.0","ngx-select-ex":"^3.6.8","ngx-sortable":"^1.0.1","ngx-toastr":"^10.0.2","ngx-uploader":"^7.1.0","popper.js":"^1.14.7","quill":"^1.3.7","rxjs":"^6.0.0","rxjs-compat":"^6.3.3","toastr":"^2.1.4","wordcloud":"^1.1.1","zone.js":"~0.8.26"},"devDependencies":{"@angular-devkit/build-angular":"^0.6.8","@angular/cli":"~6.0.8","@angular/compiler-cli":"^6.0.3","@angular/language-service":"^6.0.3","@types/jasmine":"~2.8.6","@types/jasminewd2":"~2.0.3","@types/node":"~8.9.4","codelyzer":"~4.2.1","jasmine-core":"~2.99.1","jasmine-spec-reporter":"~4.2.1","karma":"~1.7.1","karma-chrome-launcher":"~2.2.0","karma-coverage-istanbul-reporter":"~2.0.0","karma-jasmine":"~1.1.1","karma-jasmine-html-reporter":"^0.2.2","protractor":"~5.3.0","ts-node":"~5.0.1","tslint":"~5.9.1","typescript":"~2.7.2","webpack-bundle-analyzer":"^3.6.0"}}; /***/ }), /***/ "./src/$$_lazy_route_resource lazy recursive": /*!**********************************************************!*\ !*** ./src/$$_lazy_route_resource lazy namespace object ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function webpackEmptyAsyncContext(req) { // Here Promise.resolve().then() is used instead of new Promise() to prevent // uncaught exception popping up in devtools return Promise.resolve().then(function() { var e = new Error('Cannot find module "' + req + '".'); e.code = 'MODULE_NOT_FOUND'; throw e; }); } webpackEmptyAsyncContext.keys = function() { return []; }; webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext; module.exports = webpackEmptyAsyncContext; webpackEmptyAsyncContext.id = "./src/$$_lazy_route_resource lazy recursive"; /***/ }), /***/ "./src/app/Transactions/transactions.component.css": /*!*********************************************************!*\ !*** ./src/app/Transactions/transactions.component.css ***! \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".form-control {\r\n padding-right: 30px;\r\n}\r\n\r\n.form-control + .fa {\r\n position: absolute;\r\n right: 0;\r\n padding: 8px 27px;\r\n}\r\n\r\n.badge{\r\n color: #fff;\r\n display: inline-block;\r\n padding: 4px 8px !important;\r\n font-size: 13px;\r\n border-radius: 3px;\r\n}\r\n" /***/ }), /***/ "./src/app/Transactions/transactions.component.html": /*!**********************************************************!*\ !*** ./src/app/Transactions/transactions.component.html ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\r\n
\r\n
\r\n
\r\n
\r\n
Add New Transaction
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n Amount is required\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Transactions

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n Worker Id\r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n Name\r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n Amount\r\n \r\n \r\n {{ value }} {{ row['currency_id'] == 10? 'AED':'SR'}}\r\n \r\n \r\n \r\n \r\n Type\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n Created At\r\n \r\n \r\n {{ value | date}}\r\n \r\n \r\n \r\n
\r\n" /***/ }), /***/ "./src/app/Transactions/transactions.component.ts": /*!********************************************************!*\ !*** ./src/app/Transactions/transactions.component.ts ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var page_1 = __webpack_require__(/*! ../model/page */ "./src/app/model/page.ts"); var transactionService_1 = __webpack_require__(/*! ../services/transactionService */ "./src/app/services/transactionService.ts"); var TransactionForm_1 = __webpack_require__(/*! ../model/TransactionForm */ "./src/app/model/TransactionForm.ts"); var workerService_1 = __webpack_require__(/*! ../services/workerService */ "./src/app/services/workerService.ts"); var BehaviorSubject_1 = __webpack_require__(/*! rxjs/BehaviorSubject */ "./node_modules/rxjs-compat/_esm5/BehaviorSubject.js"); var operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); __webpack_require__(/*! rxjs/add/operator/delay */ "./node_modules/rxjs-compat/_esm5/add/operator/delay.js"); var forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js"); var workersService_1 = __webpack_require__(/*! ../modules/workers/service/workersService */ "./src/app/modules/workers/service/workersService.ts"); var TransactionsComponent = /** @class */ (function () { function TransactionsComponent(transactionService, workerService, toastr, workersService) { var _this = this; this.transactionService = transactionService; this.workerService = workerService; this.toastr = toastr; this.workersService = workersService; this.selectControl = new forms_1.FormControl(null, [ forms_1.Validators.required ]); this.page = new page_1.Page(); this.selected = []; this.items = []; this.searchTyped = new BehaviorSubject_1.BehaviorSubject(''); this.message = ''; this.amount = 0; this.workerId = null; this.currency = 10; this.range = "0"; this.expanded = {}; this.status = null; this.newstatus = 1; this.search = ''; this.from = null; this.to = null; this.rows = []; this.loadingIndicator = true; this.reorderable = true; this.email = null; this.loading = true; this.page.pageNumber = 0; this.page.size = 20; this.searchTyped.pipe(operators_1.debounceTime(500), operators_1.distinctUntilChanged(), operators_1.filter(function (str) { return str.length >= 3; })) .subscribe(function (str) { return _this.filterWorkers(str); }); } TransactionsComponent.prototype.ngOnInit = function () { this.setPage({ offset: 0, size: 20 }); //this.filterWorkers(null); }; // end on init TransactionsComponent.prototype.filterWorkers = function (search) { var _this = this; var p = new page_1.Page(); p.pageNumber = 0; p.totalElements = 10; p.totalPages = 1; p.size = 10; if (search) { this.workersService.getResult(p, search).then(function (workers) { _this.items = workers.data; _this.searchTyped.next(''); }); } }; TransactionsComponent.prototype.filter = function () { var _this = this; this.transactionService.getResult(this.page, this.email, (this.status == -1 ? null : this.status), this.from, this.to).then(function (pagedData) { _this.page = pagedData.page; _this.rows = pagedData.data; _this.loadingIndicator = false; }); }; TransactionsComponent.prototype.toggleExpandRow = function (row) { console.log('Toggled Expand Row!', row); this.table.rowDetail.toggleExpandRow(row); }; TransactionsComponent.prototype.onDetailToggle = function (event) { console.log('Detail Toggled', event); }; TransactionsComponent.prototype.getType = function (status) { if (status === 0) return 'Submission'; if (status === 2) return 'Manual'; if (status === 3) return 'Rejection'; return '-'; }; TransactionsComponent.prototype.setDateRange = function () { var dt = new Date(); var month = dt.getMonth(), year = dt.getFullYear(); if (this.range === "0") this.from = new Date(year, month, 1); if (this.range === "0") this.to = new Date(year, month + 1, 0); if (this.range === "1") this.from = new Date(year, month - 1, 1); if (this.range === "1") this.to = new Date(year, month + 1, 0); if (this.range === "2") this.from = new Date(year, month - 3, 1); if (this.range === "2") this.to = new Date(year, month + 1, 0); if (this.range === "3") this.from = new Date(year, 1, 1); if (this.range === "3") this.to = new Date(year + 1, 1, 0); this.filter(); }; TransactionsComponent.prototype.postForm = function () { var ids = []; this.selected.map(function (s) { return ids.push(s.id); }); if (this.workerId === null) { this.toastr.error('Fill all required attributes!'); return; } var form = new TransactionForm_1.TransactionForm(null, this.workerId, null, this.amount, this.currency, 2, this.message, 'Inserted Manually', new Date(), new Date(), false); this.transactionService.saveTransaction(form); this.toastr.success('Transaction Saved Successfully!'); this.workerId = null; this.search = null; this.filter(); }; TransactionsComponent.prototype.onSelect = function (_a) { // console.log('Select Event', selected, this.selected); var selected = _a.selected; this.selected.splice(0, this.selected.length); (_b = this.selected).push.apply(_b, selected); var _b; }; TransactionsComponent.prototype.onActivate = function (event) { //console.log('Activate Event', event); }; TransactionsComponent.prototype.setPage = function (pageInfo) { var _this = this; console.log(pageInfo); this.page.size = pageInfo.size ? pageInfo.size : pageInfo.limit; this.page.pageNumber = pageInfo.offset; this.transactionService.getResult(this.page, this.email, (this.status == -1 ? null : this.status), this.from, this.to).then(function (pagedData) { _this.page = pagedData.page; _this.rows = pagedData.data; _this.loadingIndicator = false; }); }; __decorate([ core_1.ViewChild('myTable'), __metadata("design:type", Object) ], TransactionsComponent.prototype, "table", void 0); TransactionsComponent = __decorate([ core_1.Component({ selector: 'app-transactions', template: __webpack_require__(/*! ./transactions.component.html */ "./src/app/Transactions/transactions.component.html"), styles: [__webpack_require__(/*! ./transactions.component.css */ "./src/app/Transactions/transactions.component.css")] }), __metadata("design:paramtypes", [transactionService_1.TransactionService, workerService_1.WorkerService, ngx_toastr_1.ToastrService, workersService_1.WorkersService]) ], TransactionsComponent); return TransactionsComponent; }()); exports.TransactionsComponent = TransactionsComponent; /***/ }), /***/ "./src/app/accounts/accounts.component.css": /*!*************************************************!*\ !*** ./src/app/accounts/accounts.component.css ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".form-control {\r\n padding-right: 30px;\r\n}\r\n\r\n.form-control + .fa {\r\n position: absolute;\r\n right: 0;\r\n padding: 8px 27px;\r\n}\r\n" /***/ }), /***/ "./src/app/accounts/accounts.component.html": /*!**************************************************!*\ !*** ./src/app/accounts/accounts.component.html ***! \**************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\r\n
\r\n\t
\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t
Account Form
\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t×\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tName is required\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tSave changes\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tClose\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t
\r\n\t
\r\n\r\n
\r\n\t
\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t
Account User
\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t×\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tFirst Name is required\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tLast Name is required\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tEmail is required\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tPhone Number is required\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tSave changes\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tClose\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n
\r\n\t
\r\n\t\t

Accounts

\r\n\t
\r\n\t
\r\n\t
\r\n\t\t\r\n\t
\r\n\t
\r\n\t\t
\r\n\t\t\t\r\n\t\t\t \r\n\t\t\t\r\n\t\t\t\t Add Account\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
\r\n
\r\n
\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t  Add\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tId\r\n\t\t\t\t\t\t\t\tName\r\n\t\t\t\t\t\t\t\tEmail\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tOwner\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{{ item.id }}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{{ item.first_name + \" \" + item.last_name }}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{{ item.email }}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\tEdit\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t Block\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t Unblock\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{{ value }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{{ value }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{{ value }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{{ value | date }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t \r\n\t\t\t\r\n\t\t\t\t  Edit\r\n\t\t\t\r\n\t\t\r\n\t\r\n
\r\n" /***/ }), /***/ "./src/app/accounts/accounts.component.ts": /*!************************************************!*\ !*** ./src/app/accounts/accounts.component.ts ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var user_service_1 = __webpack_require__(/*! ./../services/user.service */ "./src/app/services/user.service.ts"); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var accountItem_1 = __webpack_require__(/*! ../model/accountItem */ "./src/app/model/accountItem.ts"); var page_1 = __webpack_require__(/*! ../model/page */ "./src/app/model/page.ts"); var accountService_1 = __webpack_require__(/*! ../services/accountService */ "./src/app/services/accountService.ts"); __webpack_require__(/*! rxjs/add/operator/delay */ "./node_modules/rxjs-compat/_esm5/add/operator/delay.js"); var user_1 = __webpack_require__(/*! ../model/user */ "./src/app/model/user.ts"); var AccountsComponent = /** @class */ (function () { function AccountsComponent(accountService, toastr, userService) { this.accountService = accountService; this.toastr = toastr; this.userService = userService; this.page = new page_1.Page(); this.expanded = {}; this.id = null; this.country_id = 206; this.accountid = 0; this.name = ""; this.rows = []; this.temp = []; this.loadingIndicator = true; this.reorderable = true; this.search = null; this.loading = true; this.account = new accountItem_1.AccountItem(0, "", 206, null, null, new Date(), new Date(), false); this.user = new user_1.User(0, "", "", "", false, "en", new Date(), new Date(), "", 206); this.page.pageNumber = 0; this.page.size = 200; } AccountsComponent.prototype.ngOnInit = function () { this.setPage({ offset: 0, size: 200 }); }; // end on init AccountsComponent.prototype.filter = function () { var _this = this; this.loading = true; this.accountService .getResult(this.page, this.search) .then(function (pagedData) { _this.page = pagedData.page; _this.rows = pagedData.data; _this.temp = pagedData.data; _this.loading = false; }); }; AccountsComponent.prototype.GetAccount = function (id) { if (id === 0) this.account = new accountItem_1.AccountItem(0, "", 206, null, null, new Date(), new Date(), false); else this.account = this.rows.find(function (a) { return a.id === id; }); }; AccountsComponent.prototype.GetCustomer = function (accountid, id) { this.accountid = accountid; if (id === 0) this.user = new user_1.User(0, "", "", "", false, "en", new Date(), new Date(), "", 206); else this.user = this.rows .find(function (a) { return a.id === accountid; }) .customers.find(function (c) { return c.id === id; }); }; AccountsComponent.prototype.postForm = function () { var _this = this; var ids = []; var account = new accountItem_1.AccountItem(this.account.id, this.account.name, this.account.country_id, null, 1, new Date(), new Date(), false); this.accountService .saveAccount(account) .then(function (d) { _this.toastr.success("Accounts Saved Successfully!"); _this.filter(); }) .catch(function (err) { console.log("Error in saving account:" + JSON.stringify(err)); }); }; AccountsComponent.prototype.postCustomerForm = function () { var _this = this; var ids = []; this.user.account_id = this.accountid; this.accountService .saveCustomer(this.user) .then(function (d) { _this.toastr.success("Accounts Saved Successfully!"); _this.filter(); }) .catch(function (err) { console.log("Error in saving customer record: User with specified email exists already!"); }); }; AccountsComponent.prototype.toggleUser = function (email, condition, id) { var _this = this; this.userService .toggleUser(email, condition, id) .then(function (data) { _this.toastr.success("User was " + (condition === 1 ? "blocked" : "unblocked") + " successfully!"); //this.users.filter(u=>u.email === email).is_blocked = condition ===1; _this.filter(); }) .catch(function (e) { return _this.toastr.error("Operation was not completed"); }); }; AccountsComponent.prototype.toggleExpandRow = function (row) { this.table.rowDetail.toggleExpandRow(row); }; AccountsComponent.prototype.onDetailToggle = function (event) { console.log("Detail Toggled", event); }; AccountsComponent.prototype.setPage = function (pageInfo) { var _this = this; this.page.size = pageInfo.size; this.page.pageNumber = pageInfo.offset; this.accountService .getResult(this.page, this.search) .then(function (pagedData) { _this.page = pagedData.page; _this.rows = pagedData.data; _this.temp = pagedData.data; _this.loading = false; _this.loadingIndicator = false; }); }; AccountsComponent.prototype.updateFilter = function (event) { var val = event.target.value.toLowerCase(); // filter our data var temp = this.temp.filter(function (d) { return d.name.toLowerCase().indexOf(val) !== -1 || !val; }); // update the rows this.rows = temp; }; __decorate([ core_1.ViewChild("myTable"), __metadata("design:type", Object) ], AccountsComponent.prototype, "table", void 0); AccountsComponent = __decorate([ core_1.Component({ selector: "app-accounts", template: __webpack_require__(/*! ./accounts.component.html */ "./src/app/accounts/accounts.component.html"), styles: [__webpack_require__(/*! ./accounts.component.css */ "./src/app/accounts/accounts.component.css")], }), __metadata("design:paramtypes", [accountService_1.AccountService, ngx_toastr_1.ToastrService, user_service_1.UserService]) ], AccountsComponent); return AccountsComponent; }()); exports.AccountsComponent = AccountsComponent; /***/ }), /***/ "./src/app/agent/agent.component.css": /*!*******************************************!*\ !*** ./src/app/agent/agent.component.css ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/agent/agent.component.html": /*!********************************************!*\ !*** ./src/app/agent/agent.component.html ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n First Name is required\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n Last Name is required\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n Birthdate is required\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n Mobile is required\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n" /***/ }), /***/ "./src/app/agent/agent.component.ts": /*!******************************************!*\ !*** ./src/app/agent/agent.component.ts ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var AgentComponent = /** @class */ (function () { function AgentComponent() { this.countries = [{ 'id': 206, 'name': ' United Arab Emirates', 'image': '/assets/icons/uae-round.png' }, { 'id': 166, 'name': ' Saudi Arabia', 'image': '/assets/icons/ksa-round.png' }, { 'id': 58, 'name': ' Egypt', 'image': '/assets/icons/egypt-round.png' }]; this.loading = true; this.email = null; this.id = null; this.model = null; } AgentComponent.prototype.ngOnInit = function () { }; AgentComponent = __decorate([ core_1.Component({ selector: 'app-agent', template: __webpack_require__(/*! ./agent.component.html */ "./src/app/agent/agent.component.html"), styles: [__webpack_require__(/*! ./agent.component.css */ "./src/app/agent/agent.component.css")] }), __metadata("design:paramtypes", []) ], AgentComponent); return AgentComponent; }()); exports.AgentComponent = AgentComponent; /***/ }), /***/ "./src/app/agents/agents.component.css": /*!*********************************************!*\ !*** ./src/app/agents/agents.component.css ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/agents/agents.component.html": /*!**********************************************!*\ !*** ./src/app/agents/agents.component.html ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\r\n\t
\r\n\t\t

Agents

\r\n\t
\r\n\t
\r\n\t
\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t
\r\n\t
\r\n\t\t \r\n\t\t\r\n\t\t\t Add Agent\r\n\t\t\r\n\t
\r\n\r\n\t
\r\n
\r\n
\r\n
\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{{ value }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t Name \r\n\t\t\t\r\n\t\t\t\t{{ row[\"first_name\"] + \" \" + row[\"last_name\"] }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t Country \r\n\t\t\t\r\n\t\t\t\t{{ value }}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\tPhone Number\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t{{ value }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t Locale \r\n\t\t\t\r\n\t\t\t\t{{ value }}\r\n\t\t\t\r\n\t\t\r\n\r\n\t\t\r\n\t\t\t\r\n\t\t\t\tCreated At\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t{{ value | date }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t \r\n\t\t\t\r\n\t\t\t\tEdit\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t \r\n\t\t\t\r\n\t\t\t\t  Block\r\n\t\t\t\t\r\n\t\t\t\t  Unblock\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t \r\n\t\t\t\r\n\t\t\t\t  Change Password\r\n\t\t\t\r\n\t\t\r\n\t\r\n
\r\n
\r\n\t
\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t{{ model ? model.name : \"Add new Agent\" }}\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t×\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tFirst Name is required\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tLast Name is required\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tEmail is required\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tPhone Number is required\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t Save\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  Cancel\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n
\r\n\t
\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t
Change Password
\r\n\t\t\t\t\r\n\t\t\t\t\t×\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tEnter a valid password with at least a digit and\r\n\t\t\t\t\t\t\t\t6 characters\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t\t\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\t Change Password\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t  Cancel\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t
\r\n\r\n" /***/ }), /***/ "./src/app/agents/agents.component.ts": /*!********************************************!*\ !*** ./src/app/agents/agents.component.ts ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var agent_service_1 = __webpack_require__(/*! ./../services/agent.service */ "./src/app/services/agent.service.ts"); var user_service_1 = __webpack_require__(/*! ./../services/user.service */ "./src/app/services/user.service.ts"); var AgentsComponent = /** @class */ (function () { function AgentsComponent(agentService, toastr, userService) { this.agentService = agentService; this.toastr = toastr; this.userService = userService; this.loadingIndicator = true; this.message = ""; this.model = { id: 0, first_name: "", last_name: "", country_id: 206, phone_number: "+9715000000", created_at: new Date(), updated_at: new Date(), is_deleted: false, }; this.id = 0; this.country = 0; this.newPassword = ""; this.emailPassword = ""; this.valid = false; this.model = this.GetUser(0); } AgentsComponent.prototype.ngOnInit = function () { this.GetAgents(); }; AgentsComponent.prototype.GetAgents = function () { var _this = this; this.loadingIndicator = true; this.agentService .getAgents() .then(function (data) { _this.rows = data; console.log(_this.rows); _this.users = data; _this.loadingIndicator = false; }) .catch(function (e) { return console.log("Could Not Retrive Agents!"); }); }; AgentsComponent.prototype.filter = function () { var _this = this; this.rows = this.country == 0 ? this.users : this.users.filter(function (s) { return s.country_id == _this.country; }); }; AgentsComponent.prototype.toggleUser = function (email, condition, id) { var _this = this; this.userService .toggleUser(email, condition, id) .then(function (data) { _this.toastr.success("User was " + (condition === 1 ? "blocked" : "unblocked") + " successfully!"); //this.users.filter(u=>u.email === email).is_blocked = condition ===1; _this.GetAgents(); }) .catch(function (e) { return console.log("Operation was not completed"); }); }; AgentsComponent.prototype.checkPassword = function () { //this.emailPassword.match(/[A-Z]/g) if (this.newPassword.match(/[a-z]/g) && this.newPassword.match(/[A-Z]/g) && this.newPassword.match(/[0-9]/g) && this.newPassword.length >= 6) return true; else return false; }; AgentsComponent.prototype.changePassword = function () { var _this = this; var dismiss = document.getElementById("dissModelCP"); if (this.newPassword === null || this.newPassword === "" || this.newPassword === "" || !this.checkPassword()) { this.toastr.error("Password must be at least 6 characters wih 1 digit and 1 upper case"); dismiss.removeAttribute("data-dismiss"); this.valid = false; return; } // let dismiss = document.getElementById("changePasswords"); dismiss.setAttribute("data-dismiss", "modal"); this.userService .resetPassword(this.emailPassword, this.newPassword, false) .then(function (data) { _this.toastr.success("Password was changed successfully!"); }) .catch(function (e) { return console.log("Operation was not completed"); }); }; AgentsComponent.prototype.setEmailPassword = function (email) { this.emailPassword = email; this.newPassword = ""; }; AgentsComponent.prototype.GetUser = function (id) { if (id === 0) { this.model = { id: 0, first_name: "", last_name: "", email: "", country_id: null, phone_number: "", created_at: new Date(), updated_at: new Date(), is_deleted: false, }; } else { this.model = this.rows.find(function (r) { return r.id === id; }); } }; AgentsComponent.prototype.postForm = function () { var _this = this; this.agentService .saveAgent(this.model) .then(function (data) { _this.model.id = data["id"]; _this.toastr.success("Saved Successfully!"); }) .catch(function (err) { console.error("Error in saving reward"); console.error(err); }); }; AgentsComponent = __decorate([ core_1.Component({ selector: "app-agents", template: __webpack_require__(/*! ./agents.component.html */ "./src/app/agents/agents.component.html"), styles: [__webpack_require__(/*! ./agents.component.css */ "./src/app/agents/agents.component.css")], }), __metadata("design:paramtypes", [agent_service_1.AgentService, ngx_toastr_1.ToastrService, user_service_1.UserService]) ], AgentsComponent); return AgentsComponent; }()); exports.AgentsComponent = AgentsComponent; /***/ }), /***/ "./src/app/app-routing.module.ts": /*!***************************************!*\ !*** ./src/app/app-routing.module.ts ***! \***************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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; }; Object.defineProperty(exports, "__esModule", { value: true }); var agents_component_1 = __webpack_require__(/*! ./agents/agents.component */ "./src/app/agents/agents.component.ts"); var demographics_component_1 = __webpack_require__(/*! ./demographics/demographics.component */ "./src/app/demographics/demographics.component.ts"); var tags_component_1 = __webpack_require__(/*! ./tags/tags.component */ "./src/app/tags/tags.component.ts"); var tomtom_component_1 = __webpack_require__(/*! ./tomtom/tomtom.component */ "./src/app/tomtom/tomtom.component.ts"); // import { WorkersComponent } from './workers/workers.component'; // import { WorkersListComponent } from './workers/workers-list/workerslist.component'; var area_component_1 = __webpack_require__(/*! ./area/area.component */ "./src/app/area/area.component.ts"); var areas_component_1 = __webpack_require__(/*! ./areas/areas.component */ "./src/app/areas/areas.component.ts"); var settings_component_1 = __webpack_require__(/*! ./settings/settings.component */ "./src/app/settings/settings.component.ts"); // import { WorkerComponent } from './workers/worker/worker.component'; // import { PaymentRequestsComponent } from './modules/payment/components/paymentrequests/paymentrequests.component'; var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var accounts_component_1 = __webpack_require__(/*! ./accounts/accounts.component */ "./src/app/accounts/accounts.component.ts"); var login_component_1 = __webpack_require__(/*! ./login/login.component */ "./src/app/login/login.component.ts"); var signup_component_1 = __webpack_require__(/*! ./signup/signup.component */ "./src/app/signup/signup.component.ts"); var home_component_1 = __webpack_require__(/*! ./home/home.component */ "./src/app/home/home.component.ts"); var auth_guard_1 = __webpack_require__(/*! ./auth/auth.guard */ "./src/app/auth/auth.guard.ts"); var transactions_component_1 = __webpack_require__(/*! ./Transactions/transactions.component */ "./src/app/Transactions/transactions.component.ts"); // import { SubmissionComponent } from './submission/submission.component'; var dashboard_component_1 = __webpack_require__(/*! ./dashboard/dashboard.component */ "./src/app/dashboard/dashboard.component.ts"); var profile_component_1 = __webpack_require__(/*! ./profile/profile.component */ "./src/app/profile/profile.component.ts"); var reportsadmin_component_1 = __webpack_require__(/*! ./reportsadmin/reportsadmin.component */ "./src/app/reportsadmin/reportsadmin.component.ts"); // import { SprintsformComponent } from './modules/sprints/sprintsform.component'; var routes = [ { path: "", redirectTo: "home", pathMatch: "full" }, { path: "home", component: home_component_1.HomeComponent, canActivate: [auth_guard_1.AuthGuard] }, // { path: 'sprints', component: SprintslistComponent, canActivate: [AuthGuard] }, // { path: 'sprints/:id', component: SprintDetailComponent , canActivate: [AuthGuard]}, // { path: 'sprints/:id/edit', component: SprinteditComponent, canActivate: [AuthGuard] }, // { path: 'sprints/:id/task/:task', component: TaskEditComponent, canActivate: [AuthGuard] }, // { path: 'sprints/:id/taskform/:form', component: TaskFormComponent, canActivate: [AuthGuard] }, // { path: 'sprints/:id/submission/:submission', component: SubmissionComponent , canActivate: [AuthGuard]}, // { path: 'worker/:id/edit', component: WorkerComponent, canActivate: [AuthGuard] }, // { path: 'workers/:id/edit', component: WorkerComponent, canActivate: [AuthGuard] }, { path: "area", component: area_component_1.AreaComponent, canActivate: [auth_guard_1.AuthGuard] }, { path: "areas", component: areas_component_1.AreasComponent, canActivate: [auth_guard_1.AuthGuard] }, { path: "dashboard", component: dashboard_component_1.DashboardComponent, canActivate: [auth_guard_1.AuthGuard], }, { path: "demographics", component: demographics_component_1.DemographicsComponent, canActivate: [auth_guard_1.AuthGuard], }, { path: "profile", component: profile_component_1.ProfileComponent, canActivate: [auth_guard_1.AuthGuard] }, { path: "settings", component: settings_component_1.SettingsComponent, canActivate: [auth_guard_1.AuthGuard], }, { path: "tomtom", component: tomtom_component_1.TomtomComponent, canActivate: [auth_guard_1.AuthGuard] }, { path: "tags", component: tags_component_1.TagsComponent, canActivate: [auth_guard_1.AuthGuard] }, { path: "tags/:id", component: tags_component_1.TagsComponent, canActivate: [auth_guard_1.AuthGuard] }, { path: "reports", component: reportsadmin_component_1.ReportsadminComponent, canActivate: [auth_guard_1.AuthGuard], }, { path: "login", component: login_component_1.LoginComponent }, { path: "signup", component: signup_component_1.SignupComponent }, // { path: 'workers', component: WorkersListComponent , canActivate: [AuthGuard]}, { path: "agents", component: agents_component_1.AgentsComponent, canActivate: [auth_guard_1.AuthGuard] }, // { path: 'users', component: WorkersListComponent , canActivate: [AuthGuard]}, { path: "accounts", component: accounts_component_1.AccountsComponent, canActivate: [auth_guard_1.AuthGuard], }, // { path: 'paymentrequests', component: PaymentRequestsComponent, canActivate: [AuthGuard] }, { path: "transactions", component: transactions_component_1.TransactionsComponent, canActivate: [auth_guard_1.AuthGuard], }, { path: "sprints", loadChildren: function () { return Promise.resolve().then(function () { return __webpack_require__(/*! ./modules/sprints/sprints.module */ "./src/app/modules/sprints/sprints.module.ts"); }).then(function (m) { return m.SprintsformModule; }); }, }, { path: "paymentrequests", loadChildren: function () { return Promise.resolve().then(function () { return __webpack_require__(/*! ./modules/payment/payment.module */ "./src/app/modules/payment/payment.module.ts"); }).then(function (m) { return m.PaymentModule; }); }, }, { path: "workers", loadChildren: function () { return Promise.resolve().then(function () { return __webpack_require__(/*! ./modules/workers/workers.module */ "./src/app/modules/workers/workers.module.ts"); }).then(function (m) { return m.WorkersModule; }); }, }, { path: "users", loadChildren: function () { return Promise.resolve().then(function () { return __webpack_require__(/*! ./modules/workers/workers.module */ "./src/app/modules/workers/workers.module.ts"); }).then(function (m) { return m.WorkersModule; }); }, }, { path: "surveys", loadChildren: function () { return Promise.resolve().then(function () { return __webpack_require__(/*! ./modules/surveys/surveys.module */ "./src/app/modules/surveys/surveys.module.ts"); }).then(function (m) { return m.SurveysModule; }); }, }, ]; var AppRoutingModule = /** @class */ (function () { function AppRoutingModule() { } AppRoutingModule = __decorate([ core_1.NgModule({ imports: [router_1.RouterModule.forRoot(routes, { onSameUrlNavigation: "reload" })], exports: [router_1.RouterModule], }) ], AppRoutingModule); return AppRoutingModule; }()); exports.AppRoutingModule = AppRoutingModule; /***/ }), /***/ "./src/app/app.component.css": /*!***********************************!*\ !*** ./src/app/app.component.css ***! \***********************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "/*\n * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\n:root {\n\n /* Colors */\n --amazonOrange: #FF9900;\n --lightAmazonOrange: #FFAC31;\n --darkAmazonOrange: #E88B01;\n --squidInk: #232F3E;\n --lightSquidInk: #31465F;\n --deepSquidInk: #152939;\n --grey: #828282;\n --lightGrey: #C4C4C4;\n --silver: #E1E4EA;\n --darkBlue: #31465F;\n --red: #DD3F5B;\n --white: #FFFFFF;\n --light-blue: #00a1c9;\n \n\n /* Theme */\n --button-color: var(--white);\n --button-background-color: var(--amazonOrange);\n --button-click: var(--darkAmazonOrange);\n --link-color: var(--amazonOrange);\n --form-color: var(--white);\n --input-color: var(--deepSquidInk);\n --input-background-color: var(--white);\n\n --font-family: \"Amazon Ember\",\"Helvetica Neue Light\",\"Helvetica Neue\",\"Helvetica\" ,\"Arial\",\"sans-serif\";\n --body-background: #F8F4F4;\n\n /** Angular Theme **/\n --component-width-desktop: 460px;\n --component-width-mobile: 100%;\n\n --color-primary: #FF9900;\n --color-primary-accent: #232F3E;\n --color-primary-highlight: #FFC46D;\n \n --color-background:#232F3E;\n\n --color-secondary: #152939;\n --color-secondary-accent: #31465F;\n\n --color-danger: #DD3F5B;\n --color-error: #D0021B;\n\n --color-accent-brown: #828282;\n --color-accent-blue: #E1E4EA;\n\n --gradient-blaze: linear-gradient(270deg, #FFC300 0%, #FF9000 100%);\n\n --color-blue: #007EB9;\n --color-purple: #527FFF;\n --color-gray: #828282;\n --color-white: #FFFFFF;\n\n --input-border: 1px solid #C4C4C4;\n --input-padding: 0.5em 0.5em 0.3em 1em;\n\n --box-shadow: 1px 1px 4px 0 rgba(0,0,0,0.15);\n --button-height: 42px;\n\n --interactions-conversation-height: 250px;\n\n /* Ionic Theme */\n \n /** primary **/\n --ion-color-primary: #FF9900;\n --ion-color-primary-rgb: 255,153,0;\n --ion-color-primary-contrast: #fff;\n --ion-color-primary-contrast-rgb: 255,255,255;\n --ion-color-primary-shade: #232F3E;\n --ion-color-primary-tint: #FFC46D;\n\n /** secondary **/\n --ion-color-secondary: #32db64;\n --ion-color-secondary-rgb: 50,219,100;\n --ion-color-secondary-contrast: #fff;\n --ion-color-secondary-contrast-rgb: 255,255,255;\n --ion-color-secondary-shade: #2cc158;\n --ion-color-secondary-tint: #47df74;\n\n /** tertiary **/\n --ion-color-tertiary: #f4a942;\n --ion-color-tertiary-rgb: 244,169,66;\n --ion-color-tertiary-contrast: #fff;\n --ion-color-tertiary-contrast-rgb: 255,255,255;\n --ion-color-tertiary-shade: #d7953a;\n --ion-color-tertiary-tint: #f5b255;\n\n /** success **/\n --ion-color-success: #10dc60;\n --ion-color-success-rgb: 16,220,96;\n --ion-color-success-contrast: #fff;\n --ion-color-success-contrast-rgb: 255,255,255;\n --ion-color-success-shade: #0ec254;\n --ion-color-success-tint: #28e070;\n\n /** warning **/\n --ion-color-warning: #ffce00;\n --ion-color-warning-rgb: 255,206,0;\n --ion-color-warning-contrast: #000;\n --ion-color-warning-contrast-rgb: 0,0,0;\n --ion-color-warning-shade: #e0b500;\n --ion-color-warning-tint: #ffd31a;\n\n /** danger **/\n --ion-color-danger: #f53d3d;\n --ion-color-danger-rgb: 245,61,61;\n --ion-color-danger-contrast: #fff;\n --ion-color-danger-contrast-rgb: 255,255,255;\n --ion-color-danger-shade: #d83636;\n --ion-color-danger-tint: #f65050;\n\n /** light **/\n --ion-color-light: #f4f4f4;\n --ion-color-light-rgb: 244,244,244;\n --ion-color-light-contrast: #000;\n --ion-color-light-contrast-rgb: 0,0,0;\n --ion-color-light-shade: #d7d7d7;\n --ion-color-light-tint: #f5f5f5;\n\n /** medium **/\n --ion-color-medium: #989aa2;\n --ion-color-medium-rgb: 152,154,162;\n --ion-color-medium-contrast: #000;\n --ion-color-medium-contrast-rgb: 0,0,0;\n --ion-color-medium-shade: #86888f;\n --ion-color-medium-tint: #a2a4ab;\n \n /** dark **/\n --ion-color-dark: #222;\n --ion-color-dark-rgb: 34,34,34;\n --ion-color-dark-contrast: #fff;\n --ion-color-dark-contrast-rgb: 255,255,255;\n --ion-color-dark-shade: #1e1e1e;\n --ion-color-dark-tint: #383838;\n}\n.Anchor__a___1_Iz8 {\n color: var(--link-color);\n cursor: pointer;\n}\n.Anchor__a___1_Iz8:hover {\n text-decoration: underline;\n}\n.Button__button___vS7Mv {\n min-width: 153px;\n display: inline-block;\n margin-bottom: 0;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.42857143;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n touch-action: manipulation;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n background-image: none;\n color: var(--button-color);\n background-color: var(--button-background-color);\n border-color: #ccc;\n text-transform: uppercase;\n padding: 14px 0;\n letter-spacing: 1.1px;\n border: none;\n}\n.Button__button___vS7Mv:active {\n opacity: 1;\n background-color: var(--button-click);\n}\n.Button__button___vS7Mv:hover,\n.Button__signInButton___3bUH-:hover {\n opacity: 0.8;\n}\n.Button__button___vS7Mv:disabled {\n opacity: 1;\n cursor: auto;\n background-color: var(--ion-color-primary-tint);\n}\n.Button__signInButton___3bUH- {\n position: relative;\n width: 100%;\n border-radius: 4px;\n margin-bottom: 10px;\n cursor: pointer;\n padding: 0;\n color: var(--deepSquidInk);\n font-size: 14px;\n box-sizing: content-box;\n}\n#Button__googleSignInButton___1YiCu {\n background-color: #4285F4;\n font-family: Roboto;\n border: 1px solid #4285F4;\n color: var(--white);\n}\n#Button__googleSignInButton___1YiCu > .Button__signInButtonIcon___ihN75 {\n background-color: var(--white);\n border-radius: 4px 0 0 4px;\n height: 28px;\n width: 28px;\n padding: 12px;\n}\n#Button__auth0SignInButton___znnCj {\n background-color: #eb5424;\n font-family: Roboto;\n border: 1px solid #e14615;\n color: #fff;\n}\n#Button__auth0SignInButton___znnCj > .Button__signInButtonIcon___ihN75 {\n border-radius: 4px 0 0 4px;\n height: 28px;\n width: 28px;\n padding: 12px;\n fill: #fff;\n}\n#Button__facebookSignInButton___34Txh {\n background-color: #4267B2;\n border-color: #4267B2;\n font-family: \"Helvetica Neue\";\n color: var(--white);\n}\n#Button__facebookSignInButton___34Txh > .Button__signInButtonIcon___ihN75 {\n height: 33px;\n width: 18px;\n padding: 10px 14px;\n}\n#Button__amazonSignInButton___2EMtl {\n background-color: var(--amazonOrange);\n border: none;\n color: var(--white);\n font-family: \"Amazon Ember\";\n}\n#Button__amazonSignInButton___2EMtl > .Button__signInButtonIcon___ihN75 {\n padding: 10px;\n height: 32px;\n width: 32px;\n}\n#Button__oAuthSignInButton___3UGOl {\n background-color: var(--white);\n color: var(--deepSquidInk);\n}\n.Button__signInButtonIcon___ihN75 {\n position: absolute;\n left: 0; \n}\n.Button__signInButtonContent___xqTXJ {\n text-align: center;\n display: block;\n padding: 18px 0;\n text-align: left;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: center;\n}\n.Form__formContainer___1GA3x {\n text-align: center;\n margin-top: 20px;\n margin: 5% auto 50px;\n}\n.Form__formSection___1PPvW {\n position: relative;\n margin-bottom: 20px;\n background-color: var(--form-color);\n padding: 35px 40px;\n text-align: left;\n display: inline-block;\n min-width: 460px;\n border-radius: 6px;\n box-shadow: 1px 1px 4px 0 rgba(0,0,0,0.15);\n box-sizing: border-box;\n}\n.Form__formField___38Ikl {\n margin-bottom: 22px;\n}\n.Form__formRow___2mwRs {\n margin-bottom: 12px;\n}\n@media only screen and (max-width: 599px) {\n .Form__formContainer___1GA3x {\n margin: 0;\n }\n\n .Form__formSection___1PPvW {\n width: 100%;\n box-sizing: border-box;\n padding: 35px 25px;\n box-shadow: none;\n border-radius: 0;\n min-width: auto;\n }\n}\n.Hint__hint___2XngB {\n color: var(--grey);\n font-size: 12px;\n}\n.Input__input___3e_bf {\n display: block;\n width: 100%;\n padding: 16px;\n font-size: 14px;\n color: var(--input-color);\n background-color: var(--input-background-color);\n background-image: none;\n border: 1px solid var(--lightGrey);\n border-radius: 3px;\n box-sizing: border-box;\n margin-bottom: 10px;\n}\n.Input__input___3e_bf:disabled {\n color: #545454;\n background-color: var(--silver);\n}\n.Input__inputLabel___3VF0S {\n color: var(--input-color);\n font-size: 14px;\n margin-bottom: 8px;\n}\n.Input__label___23sO8 {\n color: var(--input-color);\n}\n.Input__radio___2hllK {\n margin-right: 18px;\n vertical-align: bottom;\n}\n@media only screen and (max-width: 599px) {\n .Input__input___3e_bf {\n font-size: 16px;\n }\n}\n.Nav__navBar___xtCFA {\n position: relative;\n border: 1px solid transparent;\n border-color: #e7e7e7;\n background-color: #fff;\n}\n.Nav__navRight___1QG2J {\n text-align: right\n}\n.Nav__nav___2Dx2Y {\n padding: 10px;\n}\n.Nav__navItem___1LtFQ {\n display: inline-block;\n padding: 10px 5px;\n line-height: 20px;\n margin-right: 12px;\n}\n.PhotoPicker__photoPickerButton___2XdVn {\n width: 100%;\n}\n.PhotoPicker__photoPlaceholder___2JXO4 {\n border: 2px dotted var(--grey);\n padding: 64px 0 64px;\n}\n.PhotoPicker__photoPlaceholderIcon___3Et71 {\n text-align: center;\n opacity: 0.2;\n}\n.Section__container___3YYTG {\n\tfont-weight: 400;\n}\n.Section__actionRow___2LWSU {\n\tmargin-bottom: 15px;\n}\n.Section__sectionHeader___2djyg {\n\tcolor: var(--deepSquidInk);\n\tmargin-bottom: 24px;\n\tfont-size: 18px;\n\tfont-weight: 500;\n}\n.Section__sectionHeaderHint___3Wxdc {\n\tcolor: var(--grey);\n\tfont-size: 16px;\n\tfont-weight: 400;\n\tmargin-top: 4px;\n}\n.Section__sectionBody___ihqqd {\n\tmargin-bottom: 30px;\n}\n.Section__sectionHeaderContent___1UCqa {\n}\n.Section__sectionFooter___1T54C {\n\tfont-size: 14px;\n\tcolor: var(--grey);\n\tdisplay: -webkit-box;\n\tdisplay: flex;\n\t-webkit-box-orient: horizontal;\n\t-webkit-box-direction: reverse;\n\t flex-direction: row-reverse;\n\t-webkit-box-align: start;\n\t align-items: flex-start;\n}\n.Section__sectionFooterPrimaryContent___2r9ZX {\n\tmargin-left: auto;\n}\n.Section__sectionFooterSecondaryContent___Nj41Q {\n\tmargin-right: auto;\n\t-ms-grid-row-align: center;\n\t align-self: center;\n}\n@media only screen and (max-width: 599px) {\n\t.Section__sectionFooter___1T54C {\n\t\tflex-wrap: wrap;\n\t}\n\n\t.Section__sectionFooterPrimaryContent___2r9ZX {\n\t\twidth: 100%;\n\t\tmargin-bottom: 32px;\n\t}\n\n\t.Section__sectionFooterPrimaryContent___2r9ZX > button {\n\t\twidth: 100%;\n\t}\n\n\t.Section__sectionFooterSecondaryContent___Nj41Q {\n\t\ttext-align: center;\n\t\t-webkit-box-flex: 0;\n\t\t flex: 0 0 100%;\n\t}\n}\n.SelectInput__selectInput___3efO4 {\n display: -webkit-box;\n display: flex;\n}\n.SelectInput__selectInput___3efO4 > input {\n -webkit-box-flex: 1;\n flex: 1;\n border-radius: 0 3px 3px 0 !important;\n}\n.SelectInput__selectInput___3efO4 > select {\n padding: 16px;\n font-size: 14px;\n color: var(--deepSquidInk);\n background-color: #fff;\n background-image: none;\n border: 1px solid var(--lightGrey);\n border-right: none;\n border-radius: 3px 0 0 3px;\n box-sizing: border-box;\n margin-bottom: 10px;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n flex-basis: 22%;\n width: 1%;\n\n background-image:\n linear-gradient(45deg, transparent 50%, gray 50%),\n linear-gradient(135deg, gray 50%, transparent 50%),\n linear-gradient(to right, #ccc, #ccc);\n background-position:\n calc(100% - 20px) calc(1em + 8px),\n calc(100% - 15px) calc(1em + 8px),\n calc(100% - 2.5em) 0.5em;\n background-size:\n 6px 5px,\n 6px 5px,\n 0px 1.5em;\n background-repeat: no-repeat;\n}\n.Strike__strike___1XV1b {\n width: 100%;\n text-align: center;\n border-bottom: 1px solid var(--lightGrey); \n line-height: 0.1em;\n margin: 32px 0;\n color: var(--grey);\n}\n.Strike__strikeContent___10gLb {\n background: var(--form-color); \n padding: 0 25px;\n font-size: 14px;\n font-weight: 500;\n}\n.Toast__toast___XXr3v {\n display: -webkit-box;\n display: flex;\n -webkit-box-pack: justify;\n justify-content: space-between;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n z-index: 99;\n box-shadow: 0 0 5px 0 rgba(0,0,0,0.3);\n padding: 16px;\n background-color: var(--lightSquidInk);\n font-size: 14px;\n color: #fff;\n box-sizing: border-box;\n}\n.Toast__toast___XXr3v > span {\n margin-right: 10px;\n}\n.Toast__toastClose___18lU4 {\n margin-left: auto;\n -ms-grid-row-align: center;\n align-self: center;\n position: relative;\n width: 18px;\n height: 18px;\n overflow: hidden;\n cursor: pointer;\n}\n.Toast__toastClose___18lU4::before,\n.Toast__toastClose___18lU4::after {\n content: '';\n position: absolute;\n height: 2px;\n width: 100%;\n top: 50%;\n left: 0;\n margin-top: -1px;\n background: var(--lightGrey);\n}\n.Toast__toastClose___18lU4:hover::before,\n.Toast__toastClose___18lU4:hover::after {\n background: var(--red);\n}\n.Toast__toastClose___18lU4::before {\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n}\n.Toast__toastClose___18lU4::after {\n -webkit-transform: rotate(-45deg);\n transform: rotate(-45deg);\n}\n.Totp__totpQrcode___1crLx {\n text-align: center;\n margin-bottom: 30px;\n}\n/*\n * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\n.XR__sumerianSceneContainer___3nVMt {\n width: 100%;\n height: 100%;\n position: relative;\n}\n.XR__sumerianScene___2Tt7- {\n width: 100%;\n height: 100%;\n}\n.XR__loadingOverlay___IbqcI {\n display: -webkit-box;\n display: flex;\n -webkit-box-align: center;\n align-items: center;\n -webkit-box-pack: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n background-color: var(--lightSquidInk);\n}\n.XR__loadingContainer___2Itxb {\n display: -webkit-box;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n flex-direction: column;\n -webkit-box-align: center;\n align-items: center;\n -webkit-box-pack: center;\n justify-content: center;\n}\n.XR__loadingLogo___Ub7xQ {\n margin-bottom: 20px;\n width: 80px;\n fill: var(--white);\n}\n.XR__loadingSceneName___3__ne {\n color: var(--white);\n margin: 0 2px 20px 2px;\n font-size: 18px;\n font-family: 'Amazon Ember';\n}\n.XR__loadingBar___2vcke {\n height: 2px;\n width: 100%;\n border-radius: 2px;\n background-color: var(--deepSquidInk);\n}\n.XR__loadingBarFill___3M-D9 {\n background-color: var(--light-blue);\n height: 100%;\n border-radius: 2px;\n}\n.XR__sceneErrorText___2y0tp {\n color: var(--red);\n font-size: 14px;\n font-family: 'Amazon Ember';\n}\n.XR__sceneBar___2ShrP {\n display: -webkit-box;\n display: flex;\n -webkit-box-align: center;\n align-items: center;\n font-size: 100%;\n position: absolute;\n bottom: 0;\n width: 100%;\n}\n.XR__sceneName___1ApHr {\n color: var(--white);\n margin: 0 1.5em;\n font-size: 1em;\n}\n.XR__sceneActions___7plGs {\n margin-left: auto;\n margin-right: 16px;\n margin-bottom: 16px;\n}\n.XR__actionButton___2poIM {\n position: relative;\n padding: 0;\n background: none;\n height: 54px;\n width: 54px;\n cursor:pointer;\n outline: none;\n text-decoration: none;\n border: none;\n border-radius: 30px;\n -webkit-transition: all .3s ease-in-out;\n transition: all .3s ease-in-out;\n color: var(--white);\n fill: currentColor;\n}\n.XR__actionButton___2poIM:hover {\n background-color: var(--deepSquidInk);\n box-shadow: 0.3px 0.3px 0.3px rgba(0, 0, 0, 0.3);\n}\n.XR__actionButton___2poIM:hover > .XR__tooltip___UYyhn {\n display: block;\n}\n.XR__actionButton___2poIM:hover > svg {\n -webkit-filter: none;\n filter: none;\n}\n.XR__actionButton___2poIM:focus {\n outline: none;\n}\n.XR__actionButton___2poIM > svg {\n width: 1.8em;\n height: 1.8em;\n -webkit-filter: drop-shadow(1px 1px 1px var(--grey));\n filter: drop-shadow(1px 1px 1px var(--grey));\n}\n.XR__actionIcon___2qnd2 {\n fill: var(--white);\n}\n.XR__tooltip___UYyhn {\n display: inline;\n position: relative;\n font-size: 12px;\n font-family: 'Amazon Ember';\n margin: 0 0 0 16px;\n}\n.XR__autoShowTooltip___V1QH7 .XR__actionButton___2poIM {\n background-color: var(--deepSquidInk);\n}\n.XR__tooltip___UYyhn:after {\n background-color: var(--deepSquidInk);\n border-radius: 2px;\n bottom: 46px;\n color: var(--white);\n content: attr(data-text);\n text-decoration: none;\n padding: 10px;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n position: absolute;\n white-space: nowrap;\n opacity: 0;\n -webkit-transition: all .3s ease-in-out;\n transition: all .3s ease-in-out;\n}\n.XR__tooltip___UYyhn:before {\n border: solid;\n border-color: var(--deepSquidInk) transparent transparent transparent;\n border-width: 5px;\n bottom: 36px;\n content:\"\";\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n position: absolute;\n font-size: 14px;\n opacity: 0;\n -webkit-transition: all .3s ease-in-out;\n transition: all .3s ease-in-out;\n}\n.XR__autoShowTooltip___V1QH7:after,\n.XR__tooltip___UYyhn:hover:after {\n opacity: 1;\n -webkit-transition-delay: 1s;\n transition-delay: 1s;\n}\n.XR__autoShowTooltip___V1QH7:before,\n.XR__tooltip___UYyhn:hover:before {\n opacity: 1;\n -webkit-transition-delay: 1s;\n transition-delay: 1s;\n}\n/*\n * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\n:root {\n\n /* Colors */\n --amazonOrange: #FF9900;\n --lightAmazonOrange: #FFAC31;\n --darkAmazonOrange: #E88B01;\n --squidInk: #232F3E;\n --lightSquidInk: #31465F;\n --deepSquidInk: #152939;\n --grey: #828282;\n --lightGrey: #C4C4C4;\n --silver: #E1E4EA;\n --darkBlue: #31465F;\n --red: #DD3F5B;\n --white: #FFFFFF;\n --light-blue: #00a1c9;\n \n\n /* Theme */\n --button-color: var(--white);\n --button-background-color: var(--amazonOrange);\n --button-click: var(--darkAmazonOrange);\n --link-color: var(--amazonOrange);\n --form-color: var(--white);\n --input-color: var(--deepSquidInk);\n --input-background-color: var(--white);\n\n --font-family: \"Amazon Ember\",\"Helvetica Neue Light\",\"Helvetica Neue\",\"Helvetica\" ,\"Arial\",\"sans-serif\";\n --body-background: #F8F4F4;\n\n /** Angular Theme **/\n --component-width-desktop: 460px;\n --component-width-mobile: 100%;\n\n --color-primary: #FF9900;\n --color-primary-accent: #232F3E;\n --color-primary-highlight: #FFC46D;\n \n --color-background:#232F3E;\n\n --color-secondary: #152939;\n --color-secondary-accent: #31465F;\n\n --color-danger: #DD3F5B;\n --color-error: #D0021B;\n\n --color-accent-brown: #828282;\n --color-accent-blue: #E1E4EA;\n\n --gradient-blaze: linear-gradient(270deg, #FFC300 0%, #FF9000 100%);\n\n --color-blue: #007EB9;\n --color-purple: #527FFF;\n --color-gray: #828282;\n --color-white: #FFFFFF;\n\n --input-border: 1px solid #C4C4C4;\n --input-padding: 0.5em 0.5em 0.3em 1em;\n\n --box-shadow: 1px 1px 4px 0 rgba(0,0,0,0.15);\n --button-height: 42px;\n\n --interactions-conversation-height: 250px;\n\n /* Ionic Theme */\n \n /** primary **/\n --ion-color-primary: #FF9900;\n --ion-color-primary-rgb: 255,153,0;\n --ion-color-primary-contrast: #fff;\n --ion-color-primary-contrast-rgb: 255,255,255;\n --ion-color-primary-shade: #232F3E;\n --ion-color-primary-tint: #FFC46D;\n\n /** secondary **/\n --ion-color-secondary: #32db64;\n --ion-color-secondary-rgb: 50,219,100;\n --ion-color-secondary-contrast: #fff;\n --ion-color-secondary-contrast-rgb: 255,255,255;\n --ion-color-secondary-shade: #2cc158;\n --ion-color-secondary-tint: #47df74;\n\n /** tertiary **/\n --ion-color-tertiary: #f4a942;\n --ion-color-tertiary-rgb: 244,169,66;\n --ion-color-tertiary-contrast: #fff;\n --ion-color-tertiary-contrast-rgb: 255,255,255;\n --ion-color-tertiary-shade: #d7953a;\n --ion-color-tertiary-tint: #f5b255;\n\n /** success **/\n --ion-color-success: #10dc60;\n --ion-color-success-rgb: 16,220,96;\n --ion-color-success-contrast: #fff;\n --ion-color-success-contrast-rgb: 255,255,255;\n --ion-color-success-shade: #0ec254;\n --ion-color-success-tint: #28e070;\n\n /** warning **/\n --ion-color-warning: #ffce00;\n --ion-color-warning-rgb: 255,206,0;\n --ion-color-warning-contrast: #000;\n --ion-color-warning-contrast-rgb: 0,0,0;\n --ion-color-warning-shade: #e0b500;\n --ion-color-warning-tint: #ffd31a;\n\n /** danger **/\n --ion-color-danger: #f53d3d;\n --ion-color-danger-rgb: 245,61,61;\n --ion-color-danger-contrast: #fff;\n --ion-color-danger-contrast-rgb: 255,255,255;\n --ion-color-danger-shade: #d83636;\n --ion-color-danger-tint: #f65050;\n\n /** light **/\n --ion-color-light: #f4f4f4;\n --ion-color-light-rgb: 244,244,244;\n --ion-color-light-contrast: #000;\n --ion-color-light-contrast-rgb: 0,0,0;\n --ion-color-light-shade: #d7d7d7;\n --ion-color-light-tint: #f5f5f5;\n\n /** medium **/\n --ion-color-medium: #989aa2;\n --ion-color-medium-rgb: 152,154,162;\n --ion-color-medium-contrast: #000;\n --ion-color-medium-contrast-rgb: 0,0,0;\n --ion-color-medium-shade: #86888f;\n --ion-color-medium-tint: #a2a4ab;\n \n /** dark **/\n --ion-color-dark: #222;\n --ion-color-dark-rgb: 34,34,34;\n --ion-color-dark-contrast: #fff;\n --ion-color-dark-contrast-rgb: 255,255,255;\n --ion-color-dark-shade: #1e1e1e;\n --ion-color-dark-tint: #383838;\n}\nbody {\n font-family: var(--font-family);\n}\nh1 {\n height: 50px;\n font-weight: 500;\n}\nh2 {\n height: 42px;\n font-weight: 300;\n}\nh4 {\n height: 28px;\n font-weight: 400;\n}\nh5 {\n height: 21px;\n font-weight: 400;\n}\np {\n height: 16px;\n font-weight: 300;\n}\nspan {\n color: var(--color-gray);\n}\ninput:disabled {\n background-color: #EDEDED;\n}\n.amplify-component {\n display: block;\n}\n.amplify-container {\n height: auto;\n padding-bottom: 1em;\n}\n/********************************************\n** Auth\n*******************************************/\n.amplify-authenticator {\n width: var(--component-width-desktop);\n margin: 0 auto;\n border-radius: 6px;\n background-color: var(--color-white);\n box-shadow: var(--box-shadow);\n}\n.amplify-signup-container {\n height: 570px;\n}\n.amplify-reset-password-container {\n height: 270px;\n}\n.amplify-confirm-reset-password-container {\n height: 360px;\n}\n.amplify-confirm-signup-container {\n height: 370px;\n}\n.amplify-confirm-signin-container {\n height: 260px;\n}\n.amplify-form-actions-left {\n margin-top: 1em;\n color: var(--color-gray);\n}\n@media (min-width: 320px) and (max-width: 480px) {\n.amplify-authenticator {\n width: var(--component-width-mobile);\n box-shadow: none;\n}\n}\n/********************************************\n** Storage\n*******************************************/\n.amplify-photo-picker {\n width: var(--component-width-desktop);\n margin: 1em auto;\n border-radius: 6px;\n background-color: var(--color-white);\n box-shadow: var(--box-shadow);\n}\n.amplify-photo-picker-container {\n width: 400px;\n margin: 0 auto;\n padding: 1em;\n}\n.amplify-album {\n width: var(--component-width-desktop);\n margin: 1em auto;\n border-radius: 6px;\n background-color: var(--color-white);\n box-shadow: var(--box-shadow);\n}\n.amplify-album-container {\n width: 400px;\n margin: 0 auto;\n padding: 1em;\n}\n.amplify-photo-picker-upload {\n height: 212px;\n width: 392px;\n border: 2px dotted #979797;\n border-radius: 4px;\n background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE0AAABBCAYAAACUyynLAAAABHNCSVQICAgIfAhkiAAAABl0RVh0U29mdHdhcmUAZ25vbWUtc2NyZWVuc2hvdO8Dvz4AAASASURBVHic7ZtZe7I6FEbfEMIMbe3p//+BfRyKzBk4F2pFvyJDMdiWda2bZD1JSHY2hHNeY2EQxtwN+Iks0kawSBvBIm0Ei7QRmLofyIXEerOHVOpbcahh4HUVgpl0opb1R/tI28Xpt4UBgFQKuzidoEXD0SqtLDmqSkwWr6oEypJPFq8vWqXFSf4jYnahTVpZclR8ulF2ouL6R5s2afccEbpHGxly9uRcoKg4pFSoB5xY67pGXlRj2tcb17FACOn9e0IASg04FgNjwzYRvaRVlcBun4HfYXo9AoyZeA49WFY/eZ3S0qyc7dWum+fIh+/Znb+7uablRfVnhAGHPWSfZaRVmlL1nxJ2YhenUOr2itUqLc2Lzj//RpSqkebFzd+0Sitm2Gk/Cl19b5UmhJy8MT+Frr7fXNP+KqPXtIV2tOfTvsJiJlzHgmWZYCb93NnXdQ0uJKpKIC+qu5xdxzCrNMsyEQUe7JadOCEEFjNhMROB76CsBOIkmzS9NIbZpD1HHnzPGfQf2zLxtoqQZgV2cXanlnWjXRohBK8v4cXoklIhy0sUJYeQEkrVMAwCk1I4NoPn2qD0vPz6ngPTNLHe7lEPyRxMhHZpq+fgU1hd14iTHEn672ZSqRqVEqi4QJzkCHwHUeB+rne2ZWL1HGC93WttP6D57RmFHhybATjk+N838ZfCviJJC7xv4ov7BcdmiELvLm29hTZplBoIjhmEuq6x3u7B+bANNOfynykZeJdTVwfanhaF3ufUipN8sLATnMuLTC0hRPto0yLNMAjc07SUqveUbCNJC0h5nqauzWAY/bO230WLNMc+p6KzvJwkZjMOIQSObU0Stw9apFnsfAs+VfbkOk7zGfdGizRKzx0ScprsyXWc5jPujRZppLHeTJU9uY5Dftuahkb/plqw/4mj8WCgRVrzTWdONI2u4zSfcW+0SOPinJU4nQi+y3Wc5jPujRZpzVoLz+2+V+zDdZyy0nenoWmkSfBj3p1SA4E/LCV0TeA7F0cnLuToE8YYZimAiQIXbOS+ijGKKHAvY+/15ta0SSuKCtVxCp1yakPFMUbx+hJeFLqUFdd+3ag1PbD5SKGOqR1qGHhbRb2nauA7eFtFoMa5yVIpbD/0VwFoTUJKqbDeJvhvdRgthBA8hR4CzxmUuQUO6aXNNtG61TihPXNbcYH3dYzVSwjzKIJSA2HgIrxaq9oQUmGz3X++XHQzy70nFxLv6w+kWTm4ODDNS7yvP2YTBsx4G3WqSkqyAoHnwHWs1iOWUodKyiQrHqJcYvbLYiEkdnGKXZzCNCmYSWEc347qeFn8CKKazC6tiXhAQV/RuqYNqPn9dXT1vVWazqTeo9HV91ZpjjVNNuIn0tX3VmlTZSN+Il19b5XGGB1coPIb8D2n80x8c3P7FLqtZVC/Edsy8RR2n0o6P76o6xof+xxp9r0L3kfH9xw8hW6vT4V6fxvFhUSWHQ7VUslBx59HhBCAGseEgGcP+kJ50AdlCweWQuURLNJGsEgbwSJtBIu0ESzSRrBIG8H/BsMLCwR4M6kAAAAASUVORK5CYII=') center no-repeat #FBFBFB;\n}\n.amplify-upload-input {\n margin-top: 0.5em;\n}\n.amplify-upload-button {\n margin: 0.5em auto !important;\n width: 100% !important;\n}\n.amplify-photo-picker-preview {\n width: 100%;\n}\n.amplify-image-container {\n display: inline;\n}\n.amplify-image {\n width: 30%;\n margin: 0.2em;\n border-radius: 6px;\n border: 2px solid var(--color-white);\n cursor: pointer;\n}\n@media (min-width: 320px) and (max-width: 480px) {\n .amplify-photo-picker {\n width: var(--component-width-mobile);\n }\n .amplify-image {\n width: var(--component-width-mobile);\n }\n .amplify-album {\n width: var(--component-width-mobile);\n }\n .amplify-album-container {\n width: var(--component-width-mobile);\n }\n .amplify-photo-picker-container {\n width: auto;\n }\n .amplify-photo-picker-upload {\n width: auto;\n }\n}\n/**********************************************\n** Interactions\n**********************************************/\n.amplify-interactions {\n width: var(--component-width-desktop);\n margin: 1em auto;\n border-radius: 6px;\n background-color: var(--color-white);\n box-shadow: var(--box-shadow);\n}\n.amplify-interactions-container {\n width: 400px;\n margin: 0 auto;\n padding: 1em;\n}\n.amplify-interactions-button {\n background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAApCAYAAABHomvIAAAABHNCSVQICAgIfAhkiAAAABl0RVh0U29mdHdhcmUAZ25vbWUtc2NyZWVuc2hvdO8Dvz4AAAG2SURBVFiF7dfPKwRhHMfx9+xqhaItIg5KikgOlER2TzhQ4i+QwtndQe4O4uhCSQ57sC6SkotfR1uK2nWgrGJr8yvsjsO2bWtb+8w+88zOYT6nmWfmeebV95lfj6bruo6N4yo1oFAcoGwcoGwcoGwcoGxsDyyz5CqxawhtwPsTNA1C5wxobqGumvJv8d0+HM5B4jvT1jICw1tC3dVO8ds9VNaD25PdHj6A6LnQEOqAkSBs90HsBsZ2wVOVfTweFhpGDTAShMPZ1LQeL+QiNQ1qu0sETOOSidS+ruciu6bB2yE0nLkPyV9c1pU08K9AQx9Ut4AmVhvzKvgfDlKVfDyFmlZhHJgFLIQDaJ+CoVXDQ8sDRXG+dUOVS0cOqBgHMkARXJscDooFiuL8cjgoBmghDoy+B+MR2BmA5I8lODBSQT0JiU/oX8x/jsk4MAJ8CcHeBDQNwcCSJTgwAoxewkcMgpO5SEU4MHIPHs3DbSC1XeGF8QA8nMDzFfjWlODAyC9/9Cyz/fUKF8swvAkuT/4+JkQc2DwKVY3Q0At1PeAuV8jKRP2aRDK2X3Y6QNk4QNk4QNnYHvgLzPueuQw6nCEAAAAASUVORK5CYII=') center no-repeat var(--color-white);\n border:none;\n cursor: pointer;\n width: 32px;\n}\n.amplify-interactions-actions {\n display:-webkit-box;\n display:flex;\n border-top: var(--input-border);\n margin-bottom: -1em;\n margin-left: -1.9em;\n margin-right: -1.9em;\n}\n.amplify-interactions-actions > input[type=\"text\"] {\n border: none;\n margin-top: 0px;\n margin-bottom: 0px;\n margin-left: 0px;\n}\n.amplify-interactions-actions > input[type=\"text\"]:focus {\nborder: 0px solid var(--color-white) !important;\n}\n.amplify-interactions-conversation {\n margin: 1em;\n}\n.amplify-interactions-input {\n padding: 1em;\n margin: 1em;\n width: 75%;\n margin-left: 5em;\n border-radius: 20px 20px 0 20px;\n background-color: #009ECF;\n box-shadow: 1px 2px 4px 0 rgba(0,0,0,0.1);\n color: var(--color-white);\n font-size: 13px;\n line-height: 16px;\n}\n.amplify-interactions-input-timestamp {\n color: #828282;\n font-size: 10px;\n letter-spacing: 0.5px;\n line-height: 16px;\n text-align:right;\n}\n.amplify-interactions-response-timestamp {\n color: #828282;\n font-size: 10px;\n letter-spacing: 0.5px;\n line-height: 16px;\n margin-left: 1.5em;\n}\n.amplify-interactions-response {\n padding: 1em;\n margin: 1em;\n width: 75%;\n border-radius: 20px 20px 20px 0;\n background-color: #DBDBDB;\n box-shadow: 1px 2px 4px 0 rgba(0,0,0,0.1);\n font-size: 13px;\n line-height: 16px;\n color: #4A4A4A;\n}\n@media (min-width: 320px) and (max-width: 480px) {\n .amplify-interactions {\n width: var(--component-width-mobile)\n }\n .amplify-interactions-container {\n width: 85%;\n }\n}\n/************************************\n** Input Groups\n************************************/\n.amplify-input-group {\n display:-webkit-box;\n display:flex;\n margin-left: 0.3em;\n margin-top: 0.5em;\n}\n.amplify-input-group > div:first-of-type {\n float:left;\n}\n.amplify-input-group > div:last-child > input {\n border-left: none !important;\n width: 100%;\n}\n.amplify-input-group > div:last-child {\n display: -webkit-box;\n display: flex;\n width: 100%;\n}\n.amplify-input-group > div {\n float:right;\n}\n.amplify-input-group-item > input {\n margin-top:0px !important;\n margin-left:0px !important;\n}\n.amplify-input-group-label {\n display:block;\n}\n.amplify-select-phone-country {\n height: 55px;\n width: 68px;\n border: var(--input-border);\n border-radius: 3px 0 0 3px;\n background-color: transparent;\n}\n/** Ionic styles for material design */\n.md .amplify-select-phone-country {\n border: none;\n border-bottom: var(--input-border);\n background-color: transparent;\n margin-top: 0em;\n min-width: 100% !important;\n height: 47px !important;\n padding-left: 0;\n}\n.amplify-form-input-phone-ionic {\n height: 36px;\n min-width: 100%;\n color: var(--color-accent-brown);\n font-size: 14px;\n letter-spacing: 0.4px;\n line-height: 20px;\n border: none;\n border-bottom: var(--input-border);\n border-radius: 0px;\n}\n.amplify-ionic-grid-padding-left {\n padding-left: 0\n}\n@media (min-width: 320px) and (max-width: 480px) {\n .amplify-select-phone-country {\n margin-top: 0.1em;\n margin-right: 0em;\n height:41px;\n width: auto;\n }\n\n /** Ionic styles for material design */\n .md .amplify-select-phone-country {\n margin-top: 0.3em;\n }\n}\n/***********************************\n** Forms\n***********************************/\n.amplify-form-container {\n height:100%;\n}\n.amplify-form-header {\n color: var(--color-primary-accent);\n height: 28px;\n font-size: 18px;\n font-weight: bold;\n letter-spacing: 0.49px;\n line-height: 16px;\n margin: 0.2em;\n}\n.amplify-form-text {\n height: 36px;\n width: 90%;\n color: var(--color-accent-brown);\n font-size: 14px;\n letter-spacing: 0.4px;\n line-height: 20px;\n}\n.amplify-input-label {\n height: 18px;\n width: 367.92px;\n color: var(--color-accent);\n font-family: var(--font-family);\n font-size: 14px;\n margin: 0.5em;\n letter-spacing: 0.4px;\n line-height: 18px;\n}\n.amplify-form-input {\n height: 42px;\n width: 378px;\n font-size: 14px;\n letter-spacing: 0.4px;\n border: var(--input-border);\n border-radius: 3px;\n background-color: #FFFFFF;\n padding: var(--input-padding);\n margin: 0.5em;\n}\n.amplify-form-extra-details {\n margin: 0.5em;\n font-size: 12px;\n color: var(--color-gray);\n}\n/** Ionic styles for material design */\n.md .amplify-form-input {\n border: none;\n border-bottom: var(--input-border);\n border-radius: 0px;\n}\n.amplify-form-actions {\n margin-top:1.8em;\n padding-bottom: 1.5em;\n}\n.amplify-signin-username {\n margin-top: 0.8em;\n}\n.amplify-form-row {\n margin-top: 1em;\n}\n.amplify-form-action {\n margin: 0.5em;\n font-size: 12px;\n}\n.amplify-form-signup {\n margin-top: 1em;\n color: var(--color-gray);\n}\n.amplify-form-body {\n padding: 1.5em;\n}\n.amplify-form-row {\ndisplay: block;\n}\n.amplify-form-cell-left {\nfloat: left;\nmargin: 8px 0 8px 8px;\n}\n.amplify-form-cell-right {\nfloat:right;\nmargin: 8px 8px 8px 0;\n}\n.amplify-form-link {\ncursor: pointer;\ncolor: var(--color-primary);\n}\n.amplify-form-link:hover {\ncolor: var(--color-primary-highlight);\n}\n.amplify-form-button {\n margin: 0.4em 0 0 0.5em;\n padding: 0.5em;\n border: none;\n height: var(--button-height);\n width: 155px;\n color: white;\n text-transform: uppercase;\n background-color: var(--color-primary);\n cursor: pointer;\n}\n.amplify-form-button:hover {\n background-color: var(--color-primary-highlight);\n}\n.amplify-greeting {\n display: -webkit-box;\n display: flex;\n padding: 1em;\n margin: 0 auto;\n}\n.amplify-greeting-flex-spacer {\n width: 30%;\n}\n.amplify-greeting-sign-out {\n -webkit-box-flex: 1;\n flex: auto;\n}\n.amplify-footer {\n clear: both;\n}\n.amplify-input-invalid {\n border-color: red !important;\n}\n@media (min-width: 320px) and (max-width: 480px) {\n .amplify-form-input {\n width: 100%;\n }\n}\n/************************************\n** Alert\n************************************/\n.amplify-alert-close {\nfloat:right;\ncursor: pointer;\ncolor: var(--color-gray);\nfont-size: 24px;\nline-height: 24px;\n}\n.amplify-alert-close:hover {\n color: var(--color-primary-accent);\n}\n.amplify-alert-icon {\nfloat:left;\nfont-size: 24px;\nline-height: 24px;\ncolor: var(--color-danger);\n}\n.amplify-alert {\nposition: absolute;\nmin-height: 52px;\nwidth: 460px;\nmargin-top: 5em;\nborder-radius: 6px;\nbackground-color: #FFFFFF;\nbox-shadow: 0 0 5px 0 rgba(0,0,0,0.3);\n}\n.amplify-alert-body {\npadding:1em;\n}\n.amplify-alert-message {\nmax-width: 85%;\ndisplay: -webkit-inline-box;\ndisplay: inline-flex;\ncolor: var(--color-primary-accent);\nfont-size: 15px;\nline-height: 24px;\nmargin-left: 0.5em;\n}\n@media (min-width: 320px) and (max-width: 480px) {\n.amplify-alert {\n width: 92%;\n margin-top: 1em;\n margin-left: 4%;\n margin-right: 4%;\n}\n}\n/************************************\n** Tooltip\n************************************/\n/* Tooltip container */\n.tooltip {\nposition: relative;\ndisplay: inline-block;\n}\n/* Tooltip text */\n.tooltip .tooltip-text {\nvisibility: hidden;\nwidth: 120px;\nbackground-color: var(--color-primary-accent);\ncolor:white;\ntext-align: center;\npadding: 5px 0;\nborder-radius: 6px;\nposition: absolute;\nz-index: 1;\n}\n.tooltip:hover .tooltip-text {\nvisibility: visible;\n}\n/************************************\n** Ionic\n************************************/\n.amplify-phone-ion-content {\n height: 100px;\n}\r\n\r\n" /***/ }), /***/ "./src/app/app.component.html": /*!************************************!*\ !*** ./src/app/app.component.html ***! \************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\r\n\r\n\r\n\r\n
\r\n\t
\r\n\t\t
\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tMuhimma Platform\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tInsights Portal\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\r\n\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
  • \r\n\t\t\t\t\t\t\t  Home\r\n\t\t\t\t\t\t
  • \r\n\t\t\t\t\t\t
  • \r\n\t\t\t\t\t\t\t  Sprints\r\n\t\t\t\t\t\t
  • \r\n\t\t\t\t\t\t
  • \r\n\t\t\t\t\t\t\t  Surveys\r\n\t\t\t\t\t\t
  • \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t
  • \r\n\t\t\t\t\t\t\t  Insights\r\n\t\t\t\t\t\t
  • \r\n\t\t\t\t\t\t
  • \r\n\t\t\t\t\t\t\t  Inisghts Clouds\r\n\t\t\t\t\t\t
  • \r\n\t\t\t\t\t\t
  • \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t Administration\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t  Agents\r\n\t\t\t\t\t\t\t\t  Accounts\r\n\t\t\t\t\t\t\t\t  Workers\r\n\t\t\t\t\t\t\t\t  Reports\r\n\t\t\t\t\t\t\t\t  Areas\r\n\t\t\t\t\t\t\t\t  Settings\r\n\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t  Payment Requests\r\n\t\t\t\t\t\t\t\t  Transactions\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t
  • \r\n\t\t\t\t\t\t\t  Demographics\r\n\t\t\t\t\t\t
  • \r\n\r\n\t\t\t\t\t\t
  • \r\n\t\t\t\t\t\t\t  Profile\r\n\t\t\t\t\t\t
  • \r\n\r\n\t\t\t\t\t\t
  • \r\n\t\t\t\t\t\t\t  Logout\r\n\t\t\t\t\t\t
  • \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\r\n\t\t
    \r\n\t\t\r\n\t\t\t\r\n\t\t\t
    Muhimma Platform
    \r\n\r\n\t\t\tLogin\r\n\t\t\tProfile\r\n\r\n\t\t\t
    Logout\r\n\t\t\tSign up\r\n\t\t\r\n\t\t\r\n\t\t
    \r\n\t\t\t\r\n\t\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t
    \r\n\t\t\r\n\t\r\n\r\n" /***/ }), /***/ "./src/app/app.component.ts": /*!**********************************!*\ !*** ./src/app/app.component.ts ***! \**********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var aws_amplify_angular_1 = __webpack_require__(/*! aws-amplify-angular */ "./node_modules/aws-amplify-angular/dist/index.js"); var core_2 = __webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js"); var platform_browser_1 = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js"); var auth_service_1 = __webpack_require__(/*! ./auth/auth.service */ "./src/app/auth/auth.service.ts"); var ng_bootstrap_1 = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ "./node_modules/@ng-bootstrap/ng-bootstrap/index.js"); var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var AppComponent = /** @class */ (function () { function AppComponent(amplifyService, translate, sanitizer, auth, router, config) { var _this = this; this.amplifyService = amplifyService; this.translate = translate; this.sanitizer = sanitizer; this.auth = auth; this.router = router; this.cssUrl = "../src/assets/css/sitear.css"; this.title = "Muhimma Portal"; this.role = "admin"; this.isSale = false; translate.setDefaultLang("en"); this.loading = true; config.placement = "right-top"; config.container = "body"; config.triggers = "hover"; this.isCollapsed = true; this.amplifyService = amplifyService; this.amplifyService.authStateChange$.subscribe(function (authState) { _this.signedIn = authState.state === "signedIn"; if (!authState.user) { router.navigate["/login"]; _this.user = null; } else { _this.user = authState.user; _this.greeting = "Hellooooooo " + _this.user.username; //TODO: make a real role auth thing _this.role = _this.user.attributes["email"].indexOf("sales") > -1 ? "sales" : "admin"; //sales@muhimmaapp.com, sales151L3s } }); // this.switchLanguage('ar'); } // end constructor AppComponent.prototype.ngAfterViewInit = function () { var _this = this; this.router.events.subscribe(function (event) { if (event instanceof router_1.NavigationStart) { _this.loading = true; } else if (event instanceof router_1.NavigationEnd || event instanceof router_1.NavigationCancel) { _this.loading = false; } }); }; AppComponent.prototype.ngOnInit = function () { var _this = this; var toggle = true; this.subscription = this.auth.isAuthenticated().subscribe(function (result) { _this.loggedIn = result; }); $(document).ready(function () { $(".sidebar-icon").click(function () { if (toggle) { $(".page-container") .addClass("sidebar-collapsed") .removeClass("sidebar-collapsed-back"); $("#menu span").css({ position: "absolute" }); } else { $(".page-container") .removeClass("sidebar-collapsed") .addClass("sidebar-collapsed-back"); setTimeout(function () { $("#menu span").css({ position: "relative" }); }, 300); } toggle = !toggle; }); }); }; AppComponent.prototype.ngOnDestroy = function () { this.subscription.unsubscribe(); }; AppComponent.prototype.onClickLogout = function () { this.auth.signOut(); }; AppComponent.prototype.onClickLogin = function () { // tslint:disable-next-line:max-line-length var url = "https://frontendportal.auth.us-east-2.amazoncognito.com/login?response_type=code&client_id= 6rkscc08nrb2puv0690hgjhcnm&redirect_uri=https://localhost:4200"; window.location.assign(url); }; AppComponent.prototype.switchLanguage = function (language) { this.translate.use(language); // this.cssUrl = language == 'en' ? '/src/assets/css/site.css' : '/src/assets/css/sitear.css'; window["switchStyle"](language); }; // end switchanguage AppComponent = __decorate([ core_1.Component({ selector: "app-root", template: __webpack_require__(/*! ./app.component.html */ "./src/app/app.component.html"), styles: [__webpack_require__(/*! ./app.component.css */ "./src/app/app.component.css")], }), __metadata("design:paramtypes", [aws_amplify_angular_1.AmplifyService, core_2.TranslateService, platform_browser_1.DomSanitizer, auth_service_1.AuthService, router_1.Router, ng_bootstrap_1.NgbTooltipConfig]) ], AppComponent); return AppComponent; }()); // end class exports.AppComponent = AppComponent; /***/ }), /***/ "./src/app/app.module.ts": /*!*******************************!*\ !*** ./src/app/app.module.ts ***! \*******************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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; }; Object.defineProperty(exports, "__esModule", { value: true }); var http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js"); var platform_browser_1 = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js"); var ng_bootstrap_1 = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ "./node_modules/@ng-bootstrap/ng-bootstrap/index.js"); var core_2 = __webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js"); var http_loader_1 = __webpack_require__(/*! @ngx-translate/http-loader */ "./node_modules/@ngx-translate/http-loader/esm5/ngx-translate-http-loader.js"); var aws_amplify_angular_1 = __webpack_require__(/*! aws-amplify-angular */ "./node_modules/aws-amplify-angular/dist/index.js"); var ngx_select_ex_1 = __webpack_require__(/*! ngx-select-ex */ "./node_modules/ngx-select-ex/fesm5/ngx-select-ex.js"); var ngx_uploader_1 = __webpack_require__(/*! ngx-uploader */ "./node_modules/ngx-uploader/fesm5/ngx-uploader.js"); var accounts_component_1 = __webpack_require__(/*! ./accounts/accounts.component */ "./src/app/accounts/accounts.component.ts"); var app_routing_module_1 = __webpack_require__(/*! ./app-routing.module */ "./src/app/app-routing.module.ts"); var app_component_1 = __webpack_require__(/*! ./app.component */ "./src/app/app.component.ts"); var auth_guard_1 = __webpack_require__(/*! ./auth/auth.guard */ "./src/app/auth/auth.guard.ts"); var auth_service_1 = __webpack_require__(/*! ./auth/auth.service */ "./src/app/auth/auth.service.ts"); var home_component_1 = __webpack_require__(/*! ./home/home.component */ "./src/app/home/home.component.ts"); var login_component_1 = __webpack_require__(/*! ./login/login.component */ "./src/app/login/login.component.ts"); var surveys_module_1 = __webpack_require__(/*! ./modules/surveys/surveys.module */ "./src/app/modules/surveys/surveys.module.ts"); var accountService_1 = __webpack_require__(/*! ./services/accountService */ "./src/app/services/accountService.ts"); var google_services_1 = __webpack_require__(/*! ./services/google.services */ "./src/app/services/google.services.ts"); var jQuery_service_1 = __webpack_require__(/*! ./services/jQuery.service */ "./src/app/services/jQuery.service.ts"); var messagingService_1 = __webpack_require__(/*! ./services/messagingService */ "./src/app/services/messagingService.ts"); var paymentRequestService_1 = __webpack_require__(/*! ./services/paymentRequestService */ "./src/app/services/paymentRequestService.ts"); var projectService_1 = __webpack_require__(/*! ./services/projectService */ "./src/app/services/projectService.ts"); var toastr_service_1 = __webpack_require__(/*! ./services/toastr.service */ "./src/app/services/toastr.service.ts"); var workerService_1 = __webpack_require__(/*! ./services/workerService */ "./src/app/services/workerService.ts"); var signup_component_1 = __webpack_require__(/*! ./signup/signup.component */ "./src/app/signup/signup.component.ts"); var users_component_1 = __webpack_require__(/*! ./users/users.component */ "./src/app/users/users.component.ts"); // import { PaymentRequestsComponent } from './payment/paymentrequests/paymentrequests.component'; var ngx_csv_1 = __webpack_require__(/*! @ctrl/ngx-csv */ "./node_modules/@ctrl/ngx-csv/fesm5/ctrl-ngx-csv.js"); var ngx_datatable_1 = __webpack_require__(/*! @swimlane/ngx-datatable */ "./node_modules/@swimlane/ngx-datatable/release/index.js"); var submissionService_1 = __webpack_require__(/*! ./services/submissionService */ "./src/app/services/submissionService.ts"); var transactionService_1 = __webpack_require__(/*! ./services/transactionService */ "./src/app/services/transactionService.ts"); var transactions_component_1 = __webpack_require__(/*! ./Transactions/transactions.component */ "./src/app/Transactions/transactions.component.ts"); // import { SprintComponent } from './sprint/sprint.component'; // import { SubmissionsComponent } from './submissions/submissions.component'; // import { RewardsComponent } from './reward/rewards/rewards.component'; // import { TasksComponent } from './tasks/tasks.component'; // import { SprinteditComponent } from './sprintedit/sprintedit.component'; var animations_1 = __webpack_require__(/*! @angular/platform-browser/animations */ "./node_modules/@angular/platform-browser/fesm5/animations.js"); var ng_pick_datetime_1 = __webpack_require__(/*! ng-pick-datetime */ "./node_modules/ng-pick-datetime/picker.js"); var ng5_slider_1 = __webpack_require__(/*! ng5-slider */ "./node_modules/ng5-slider/esm5/ng5-slider.js"); var ngx_quill_1 = __webpack_require__(/*! ngx-quill */ "./node_modules/ngx-quill/fesm5/ngx-quill.js"); // import { TaskEditComponent } from './task-edit/task-edit.component'; // import { SprintsComponent } from './sprints/sprints.component'; // import { TaskFormComponent } from './task-form/task-form.component'; // import { QuestionComponent } from './components/question/question.component'; var modalTrigger_directive_1 = __webpack_require__(/*! ./services/modalTrigger.directive */ "./src/app/services/modalTrigger.directive.ts"); var simpleModal_component_1 = __webpack_require__(/*! ./services/simpleModal.component */ "./src/app/services/simpleModal.component.ts"); // import { SubmissionComponent } from './submission/submission.component'; // import { WorkerComponent } from './workers/worker/worker.component'; var core_3 = __webpack_require__(/*! @agm/core */ "./node_modules/@agm/core/index.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var agents_component_1 = __webpack_require__(/*! ./agents/agents.component */ "./src/app/agents/agents.component.ts"); var area_component_1 = __webpack_require__(/*! ./area/area.component */ "./src/app/area/area.component.ts"); var areas_component_1 = __webpack_require__(/*! ./areas/areas.component */ "./src/app/areas/areas.component.ts"); var dashboard_component_1 = __webpack_require__(/*! ./dashboard/dashboard.component */ "./src/app/dashboard/dashboard.component.ts"); var profile_component_1 = __webpack_require__(/*! ./profile/profile.component */ "./src/app/profile/profile.component.ts"); var FileUploadComponent_1 = __webpack_require__(/*! ./services/FileUploadComponent */ "./src/app/services/FileUploadComponent.ts"); var settings_component_1 = __webpack_require__(/*! ./settings/settings.component */ "./src/app/settings/settings.component.ts"); // import { WorkersListComponent } from './workers/workers-list/workerslist.component'; var common_1 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); var http_client_1 = __webpack_require__(/*! @ngx-loading-bar/http-client */ "./node_modules/@ngx-loading-bar/http-client/fesm5/ngx-loading-bar-http-client.js"); var angular4_word_cloud_1 = __webpack_require__(/*! angular4-word-cloud */ "./node_modules/angular4-word-cloud/angular4-word-cloud.umd.js"); var ngx_sortable_1 = __webpack_require__(/*! ngx-sortable */ "./node_modules/ngx-sortable/dist/index.js"); var agent_component_1 = __webpack_require__(/*! ./agent/agent.component */ "./src/app/agent/agent.component.ts"); var reportsadmin_component_1 = __webpack_require__(/*! ./reportsadmin/reportsadmin.component */ "./src/app/reportsadmin/reportsadmin.component.ts"); var tomtom_component_1 = __webpack_require__(/*! ./tomtom/tomtom.component */ "./src/app/tomtom/tomtom.component.ts"); var sprints_module_1 = __webpack_require__(/*! ./modules/sprints/sprints.module */ "./src/app/modules/sprints/sprints.module.ts"); var router_1 = __webpack_require__(/*! @ngx-loading-bar/router */ "./node_modules/@ngx-loading-bar/router/fesm5/ngx-loading-bar-router.js"); var angular_tag_cloud_module_1 = __webpack_require__(/*! angular-tag-cloud-module */ "./node_modules/angular-tag-cloud-module/fesm5/angular-tag-cloud-module.js"); var angular_tree_component_1 = __webpack_require__(/*! angular-tree-component */ "./node_modules/angular-tree-component/dist/angular-tree-component.js"); var demographics_component_1 = __webpack_require__(/*! ./demographics/demographics.component */ "./src/app/demographics/demographics.component.ts"); var insights_component_1 = __webpack_require__(/*! ./insights/insights.component */ "./src/app/insights/insights.component.ts"); var loader_component_1 = __webpack_require__(/*! ./loader/loader.component */ "./src/app/loader/loader.component.ts"); var payment_module_1 = __webpack_require__(/*! ./modules/payment/payment.module */ "./src/app/modules/payment/payment.module.ts"); var workers_module_1 = __webpack_require__(/*! ./modules/workers/workers.module */ "./src/app/modules/workers/workers.module.ts"); var tagcloud_component_1 = __webpack_require__(/*! ./tagcloud/tagcloud.component */ "./src/app/tagcloud/tagcloud.component.ts"); var tags_component_1 = __webpack_require__(/*! ./tags/tags.component */ "./src/app/tags/tags.component.ts"); var payments_module_1 = __webpack_require__(/*! ./modules/payments/payments.module */ "./src/app/modules/payments/payments.module.ts"); var toastr = window["toastr"]; var jQuery = window["$"]; function HttpLoaderFactory(http) { return new http_loader_1.TranslateHttpLoader(http); } exports.HttpLoaderFactory = HttpLoaderFactory; var AppModule = /** @class */ (function () { function AppModule() { } AppModule = __decorate([ core_1.NgModule({ declarations: [ app_component_1.AppComponent, login_component_1.LoginComponent, signup_component_1.SignupComponent, home_component_1.HomeComponent, users_component_1.UsersComponent, accounts_component_1.AccountsComponent, // SafePipe , // PaymentRequestsComponent, transactions_component_1.TransactionsComponent, // SubmissionsRequestComponent, // RewardsComponent, // TaskformsComponent, // TasksComponent, // TaskEditComponent, // TaskFormComponent, // QuestionComponent, modalTrigger_directive_1.ModalTriggerDirective, simpleModal_component_1.SimpleModalComponent, // SubmissionComponent, // ReportComponent, // WorkerComponent, FileUploadComponent_1.FileUploadComponent, area_component_1.AreaComponent, areas_component_1.AreasComponent, dashboard_component_1.DashboardComponent, profile_component_1.ProfileComponent, settings_component_1.SettingsComponent, agents_component_1.AgentsComponent, // WorkersListComponent, // ReportsComponent, reportsadmin_component_1.ReportsadminComponent, agent_component_1.AgentComponent, loader_component_1.LoaderComponent, tomtom_component_1.TomtomComponent, // SearchPipe, // SortbyPipe, tags_component_1.TagsComponent, tagcloud_component_1.TagcloudComponent, insights_component_1.InsightsComponent, demographics_component_1.DemographicsComponent, ], imports: [ ngx_datatable_1.NgxDatatableModule, angular_tag_cloud_module_1.TagCloudModule, angular4_word_cloud_1.AgWordCloudModule.forRoot(), platform_browser_1.BrowserModule, aws_amplify_angular_1.AmplifyAngularModule, http_1.HttpClientModule, app_routing_module_1.AppRoutingModule, forms_1.FormsModule, forms_1.ReactiveFormsModule, ngx_csv_1.CsvModule, ngx_select_ex_1.NgxSelectModule, ngx_uploader_1.NgxUploaderModule, ng_pick_datetime_1.OwlDateTimeModule, ngx_sortable_1.NgxSortableModule, ng_pick_datetime_1.OwlNativeDateTimeModule, animations_1.BrowserAnimationsModule, ngx_quill_1.QuillModule, http_client_1.LoadingBarHttpClientModule, router_1.LoadingBarRouterModule, ng5_slider_1.Ng5SliderModule, sprints_module_1.SprintsformModule, workers_module_1.WorkersModule, surveys_module_1.SurveysModule, payment_module_1.PaymentModule, payments_module_1.PaymentsModule, //TagCloudModule, angular_tree_component_1.TreeModule.forRoot(), ng_bootstrap_1.NgbModule.forRoot(), ngx_toastr_1.ToastrModule.forRoot(), core_3.AgmCoreModule.forRoot({ apiKey: "AIzaSyDa1UayxKz_79DUT2nmE2wHAuBwGdZVL3Y", // apiKey: "AIzaSyDP8ctBV6hZ-3zSmr7enXzQTHn5jFd_guc", libraries: ["drawing"], }), core_2.TranslateModule.forRoot({ loader: { provide: core_2.TranslateLoader, useFactory: HttpLoaderFactory, deps: [http_1.HttpClient], }, }), ], providers: [ aws_amplify_angular_1.AmplifyService, auth_service_1.AuthService, auth_guard_1.AuthGuard, workerService_1.WorkerService, accountService_1.AccountService, projectService_1.ProjectService, paymentRequestService_1.PaymentRequestService, submissionService_1.SubmissionService, common_1.DatePipe, transactionService_1.TransactionService, messagingService_1.MessagingSevice, google_services_1.GoogleService, { provide: toastr_service_1.TOASTR_TOKEN, useValue: toastr }, { provide: jQuery_service_1.JQ_TOKEN, useValue: jQuery }, ], bootstrap: [app_component_1.AppComponent], exports: [], }) ], AppModule); return AppModule; }()); exports.AppModule = AppModule; /***/ }), /***/ "./src/app/area/area.component.css": /*!*****************************************!*\ !*** ./src/app/area/area.component.css ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/area/area.component.html": /*!******************************************!*\ !*** ./src/app/area/area.component.html ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\r\n" /***/ }), /***/ "./src/app/area/area.component.ts": /*!****************************************!*\ !*** ./src/app/area/area.component.ts ***! \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var AreaComponent = /** @class */ (function () { function AreaComponent() { } AreaComponent.prototype.ngOnInit = function () { }; AreaComponent = __decorate([ core_1.Component({ selector: 'app-area', template: __webpack_require__(/*! ./area.component.html */ "./src/app/area/area.component.html"), styles: [__webpack_require__(/*! ./area.component.css */ "./src/app/area/area.component.css")], }), __metadata("design:paramtypes", []) ], AreaComponent); return AreaComponent; }()); exports.AreaComponent = AreaComponent; /***/ }), /***/ "./src/app/areas/areas.component.css": /*!*******************************************!*\ !*** ./src/app/areas/areas.component.css ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/areas/areas.component.html": /*!********************************************!*\ !*** ./src/app/areas/areas.component.html ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\n
    \r\n

    Areas

    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n\r\n\r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    {{country}}
    \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    Add New Area
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n Name is required\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n Name is required\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n\r\n \r\n\r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n" /***/ }), /***/ "./src/app/areas/areas.component.ts": /*!******************************************!*\ !*** ./src/app/areas/areas.component.ts ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var area_service_1 = __webpack_require__(/*! ./../services/area.service */ "./src/app/services/area.service.ts"); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var page_1 = __webpack_require__(/*! ../model/page */ "./src/app/model/page.ts"); var core_2 = __webpack_require__(/*! @agm/core */ "./node_modules/@agm/core/index.js"); var AreasComponent = /** @class */ (function () { function AreasComponent(areaService, toastr, mapsAPILoader) { this.areaService = areaService; this.toastr = toastr; this.mapsAPILoader = mapsAPILoader; this.parent = null; this.page = new page_1.Page(); this.selected = []; this.message = ''; this.range = "0"; this.expanded = {}; this.status = null; this.newstatus = 1; this.from = null; this.to = null; this.rows = []; this.temp = []; this.loadingIndicator = true; this.reorderable = true; this.loading = true; this.longitude = 56.2934; this.latitude = 25.2769; this.zoom = 5; this.model = {}; this.center = { lat: 33.5362475, lng: -111.9267386 }; this.managerOptions = { drawingControl: true, drawingControlOptions: { drawingModes: ['polygon'] }, polygonOptions: { draggable: true, editable: true, clickable: true }, drawingMode: "polygon" }; this.country = "United Arab Emirates"; this.geoJsonObject = { "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "MultiPolygon", "coordinates": [[[[56.2934, 25.2769], [56.2942, 25.2748], [56.2917, 25.2734], [56.2905, 25.272], [56.2886, 25.2709], [56.2865, 25.2667], [56.285, 25.2652], [56.2844, 25.2631], [56.2825, 25.2632], [56.2817, 25.2619], [56.2797, 25.2619], [56.277, 25.2627], [56.2739, 25.2607], [56.2717, 25.2613], [56.2703, 25.2631], [56.27, 25.2652], [56.2707, 25.2665], [56.2707, 25.2673], [56.271, 25.2683], [56.2708, 25.2693], [56.2717, 25.2718], [56.271, 25.2728], [56.2712, 25.274], [56.2702, 25.2754], [56.2725, 25.2795], [56.2751, 25.2807], [56.2765, 25.2828], [56.2794, 25.2835], [56.2811, 25.2849], [56.2827, 25.2833], [56.2839, 25.2822], [56.2853, 25.2797], [56.2871, 25.2775], [56.2892, 25.2768], [56.2909, 25.277], [56.2934, 25.2769]]], [[[54.4599, 25.1897], [54.453, 25.1577], [54.4404, 25.1271], [54.4223, 25.0986], [54.3995, 25.0732], [54.3723, 25.0514], [54.3401, 25.0332], [54.305, 25.0204], [54.268, 25.0132], [54.2302, 25.0119], [54.1928, 25.0165], [54.1764, 25.0194], [54.1311, 25.0299], [54.0893, 25.0487], [54.0707, 25.0607], [54.0535, 25.0743], [54.0379, 25.0894], [54.017, 25.1143], [53.9979, 25.147], [53.9853, 25.1792], [53.9819, 25.1922], [53.9777, 25.2242], [53.9783, 25.2381], [53.9781, 25.2432], [53.9794, 25.2578], [53.9831, 25.2799], [53.9884, 25.2986], [53.997, 25.3199], [54.0054, 25.3362], [54.0257, 25.3661], [54.0514, 25.3924], [54.0818, 25.4142], [54.1013, 25.4247], [54.13, 25.4373], [54.1824, 25.4506], [54.2064, 25.4529], [54.239, 25.4524], [54.2715, 25.4475], [54.2891, 25.4431], [54.3098, 25.4361], [54.357, 25.4123], [54.3773, 25.3967], [54.4056, 25.3701], [54.428, 25.3392], [54.4385, 25.3198], [54.4449, 25.3053], [54.4548, 25.2722], [54.4611, 25.2224], [54.4599, 25.1897]]], [[[56.6024, 25.3236], [56.6014, 25.3106], [56.6001, 25.2949], [56.5939, 25.2711], [56.5943, 25.2457], [56.5919, 25.2283], [56.5958, 25.211], [56.5975, 25.1857], [56.5947, 25.154], [56.5874, 25.1268], [56.5877, 25.116], [56.5854, 25.0876], [56.5912, 25.0666], [56.5921, 25.0631], [56.5947, 25.0398], [56.5939, 25.0097], [56.5941, 25.0075], [56.3826, 24.982], [56.3794, 24.9817], [56.3765, 24.9813], [56.3745, 24.9808], [56.3715, 24.9801], [56.371, 24.98], [56.3707, 24.98], [56.3616, 24.9779], [56.3572, 24.9769], [56.3548, 24.9767], [56.3523, 24.9767], [56.3516, 24.9766], [56.3512, 24.9766], [56.3508, 24.9765], [56.3502, 24.9761], [56.3433, 24.9723], [56.3352, 24.9727], [56.3342, 24.9728], [56.3234, 24.9728], [56.3233, 24.9728], [56.3233, 24.9727], [56.3233, 24.972], [56.3233, 24.9719], [56.3233, 24.9717], [56.3285, 24.9615], [56.3391, 24.9445], [56.339, 24.9422], [56.339, 24.9417], [56.339, 24.9416], [56.3389, 24.9411], [56.339, 24.9408], [56.3407, 24.9396], [56.3416, 24.9391], [56.342, 24.9392], [56.3425, 24.9395], [56.3429, 24.9396], [56.3432, 24.9396], [56.3489, 24.9344], [56.3487, 24.9337], [56.349, 24.9328], [56.347, 24.9293], [56.342, 24.9206], [56.3384, 24.9145], [56.3274, 24.9007], [56.3265, 24.9003], [56.3259, 24.9001], [56.3256, 24.8997], [56.3254, 24.8993], [56.3255, 24.8985], [56.3156, 24.8961], [56.3095, 24.8889], [56.3083, 24.8875], [56.3052, 24.8846], [56.2842, 24.8847], [56.2834, 24.8848], [56.2824, 24.8847], [56.2803, 24.8847], [56.2802, 24.8846], [56.2802, 24.8835], [56.2785, 24.8834], [56.2782, 24.8831], [56.277, 24.8824], [56.2769, 24.8821], [56.2769, 24.8819], [56.277, 24.8816], [56.2782, 24.88], [56.2795, 24.8798], [56.28, 24.8796], [56.2802, 24.8775], [56.2802, 24.8752], [56.2783, 24.8738], [56.2776, 24.8737], [56.2773, 24.8736], [56.2764, 24.8739], [56.2761, 24.8737], [56.2759, 24.8735], [56.2755, 24.8723], [56.2743, 24.871], [56.2728, 24.8699], [56.2685, 24.8677], [56.2682, 24.867], [56.2671, 24.8661], [56.2594, 24.8598], [56.2057, 24.8505], [56.2036, 24.8238], [56.2024, 24.8074], [56.2018, 24.8058], [56.2011, 24.7851], [56.1823, 24.7808], [56.1798, 24.779], [56.1785, 24.7785], [56.178, 24.7775], [56.1779, 24.7765], [56.1765, 24.7723], [56.1735, 24.7705], [56.166, 24.7666], [56.1583, 24.7627], [56.155, 24.7607], [56.1536, 24.7593], [56.1517, 24.754], [56.1499, 24.7454], [56.1443, 24.7416], [56.1364, 24.7389], [56.1297, 24.7368], [56.1196, 24.7343], [56.1072, 24.7356], [56.1037, 24.736], [56.0976, 24.7368], [56.0888, 24.7362], [56.0827, 24.738], [56.0764, 24.7395], [56.0761, 24.7395], [56.0674, 24.7414], [56.0606, 24.7466], [56.0543, 24.7521], [56.0531, 24.7606], [56.0508, 24.7621], [56.0535, 24.767], [56.0526, 24.7689], [56.0521, 24.7699], [56.0458, 24.7742], [56.0394, 24.782], [56.0352, 24.7901], [56.0368, 24.7951], [56.0381, 24.7983], [56.038, 24.8029], [56.0362, 24.8109], [55.9993, 24.8559], [55.9962, 24.8599], [55.9783, 24.8774], [55.9802, 24.8945], [56.057, 24.8721], [56.0622, 24.8708], [56.0548, 24.875], [56.0512, 24.8769], [56.042, 24.8866], [56.0413, 24.9076], [56.0589, 24.9494], [56.0421, 24.9477], [56.0455, 24.9679], [56.0299, 24.9739], [56.0115, 24.9908], [56.0069, 24.9947], [55.9723, 25.0033], [55.9614, 25.0059], [55.9611, 25.006], [55.9609, 25.006], [55.9608, 25.0059], [55.9109, 24.9657], [55.8515, 24.9658], [55.8124, 24.9108], [55.813, 24.8845], [55.8132, 24.8705], [55.8134, 24.8607], [55.8139, 24.8436], [55.8143, 24.8215], [55.8145, 24.8122], [55.8147, 24.7993], [55.815, 24.799], [55.8197, 24.7992], [55.8201, 24.7937], [55.821, 24.7915], [55.8216, 24.7911], [55.8223, 24.7897], [55.8233, 24.7885], [55.8257, 24.7867], [55.8279, 24.7835], [55.829, 24.7827], [55.8308, 24.7812], [55.8312, 24.7806], [55.8316, 24.7801], [55.8318, 24.7758], [55.8326, 24.7718], [55.8326, 24.7681], [55.8326, 24.7672], [55.8319, 24.7639], [55.8319, 24.7611], [55.8319, 24.76], [55.8317, 24.7592], [55.831, 24.7561], [55.8314, 24.751], [55.8311, 24.7463], [55.8299, 24.7423], [55.8291, 24.7402], [55.8284, 24.7384], [55.8287, 24.7339], [55.8273, 24.7301], [55.8272, 24.7253], [55.8274, 24.7213], [55.8287, 24.717], [55.8285, 24.713], [55.8284, 24.7094], [55.8285, 24.7045], [55.8289, 24.7034], [55.829, 24.7025], [55.8295, 24.701], [55.8311, 24.6961], [55.8327, 24.6924], [55.8343, 24.6883], [55.835, 24.6844], [55.8351, 24.68], [55.8359, 24.6758], [55.8362, 24.6742], [55.8366, 24.6713], [55.8365, 24.671], [55.8343, 24.6693], [55.7937, 24.6371], [55.7937, 24.6368], [55.8013, 24.6295], [55.8161, 24.6153], [55.788, 24.5907], [55.778, 24.5818], [55.7676, 24.5726], [55.7664, 24.5547], [55.7648, 24.5297], [55.7649, 24.5295], [55.7679, 24.5224], [55.7851, 24.4863], [55.7855, 24.4858], [55.7975, 24.47], [55.8203, 24.4403], [55.8205, 24.4398], [55.8268, 24.4126], [55.8274, 24.4099], [55.8277, 24.4096], [55.8342, 24.4096], [55.8342, 24.3976], [55.8341, 24.3923], [55.834, 24.3491], [55.8339, 24.3277], [55.8244, 24.3215], [55.8125, 24.3139], [55.8103, 24.3125], [55.8076, 24.3107], [55.8028, 24.3016], [55.7929, 24.2828], [55.7912, 24.2796], [55.7915, 24.2794], [55.787, 24.2759], [55.7826, 24.2725], [55.7809, 24.2713], [55.7777, 24.2691], [55.7681, 24.2624], [55.7679, 24.2623], [55.7676, 24.2622], [55.7674, 24.2622], [55.767, 24.2621], [55.7666, 24.2621], [55.7659, 24.262], [55.7594, 24.2611], [55.757, 24.2555], [55.7539, 24.2462], [55.7529, 24.2348], [55.7657, 24.2322], [55.7734, 24.2341], [55.7758, 24.2347], [55.7769, 24.2347], [55.7839, 24.2306], [55.7884, 24.2265], [55.7891, 24.226], [55.7901, 24.2257], [55.794, 24.2224], [55.8002, 24.2203], [55.8056, 24.2151], [55.8082, 24.2121], [55.8095, 24.2108], [55.8095, 24.211], [55.8099, 24.2108], [55.8101, 24.2113], [55.8112, 24.2114], [55.8136, 24.2109], [55.8154, 24.2101], [55.818, 24.209], [55.8215, 24.2071], [55.8231, 24.2064], [55.8239, 24.2057], [55.8249, 24.2053], [55.8258, 24.2052], [55.8309, 24.2027], [55.8332, 24.201], [55.8335, 24.2009], [55.8507, 24.2094], [55.8538, 24.2109], [55.8569, 24.2116], [55.8647, 24.2135], [55.8682, 24.2144], [55.8711, 24.2151], [55.8825, 24.2161], [55.9484, 24.2221], [55.9498, 24.2215], [55.9517, 24.2224], [55.9544, 24.2226], [55.9506, 24.214], [55.951, 24.2135], [55.9622, 24.2165], [55.9623, 24.2163], [55.9585, 24.2122], [55.9585, 24.2057], [55.9599, 24.1967], [55.9629, 24.195], [55.9647, 24.1897], [55.9656, 24.188], [55.967, 24.1867], [55.9689, 24.1854], [55.9693, 24.1849], [55.9697, 24.1823], [55.9607, 24.1703], [55.974, 24.1472], [55.975, 24.1457], [55.9909, 24.13], [55.9951, 24.1253], [55.9959, 24.1236], [55.9997, 24.1176], [56.0022, 24.1118], [56.0142, 24.09], [56.0127, 24.0878], [56.0174, 24.0665], [55.9841, 24.0627], [55.9685, 24.0617], [55.9598, 24.0611], [55.9538, 24.0591], [55.9415, 24.0549], [55.929, 24.0525], [55.9203, 24.0508], [55.9148, 24.0497], [55.9023, 24.0469], [55.8959, 24.0443], [55.8873, 24.0398], [55.8764, 24.0356], [55.8756, 24.0349], [55.8736, 24.0328], [55.8646, 24.029], [55.8581, 24.0242], [55.8552, 24.0225], [55.8518, 24.0228], [55.8496, 24.0222], [55.8479, 24.0224], [55.8474, 24.0224], [55.8471, 24.0223], [55.8469, 24.0222], [55.842, 24.0209], [55.8405, 24.0192], [55.8351, 24.0166], [55.8331, 24.0146], [55.8281, 24.0172], [55.82, 24.0213], [55.8138, 24.0233], [55.808, 24.0253], [55.8049, 24.0254], [55.8011, 24.0255], [55.7818, 24.0559], [55.7585, 24.0518], [55.7432, 24.0577], [55.743, 24.0576], [55.7414, 24.0564], [55.7412, 24.0563], [55.7404, 24.0563], [55.7389, 24.0567], [55.7381, 24.0571], [55.7378, 24.0573], [55.737, 24.058], [55.7364, 24.0583], [55.736, 24.0584], [55.735, 24.0585], [55.7335, 24.0583], [55.733, 24.0582], [55.7324, 24.0583], [55.7318, 24.0581], [55.7312, 24.0581], [55.7067, 24.0469], [55.678, 24.0354], [55.6595, 24.0293], [55.6474, 24.0252], [55.6331, 24.0202], [55.6156, 24.0118], [55.6041, 24.0062], [55.5994, 24.004], [55.5892, 23.9987], [55.5851, 23.9966], [55.58, 23.9913], [55.5786, 23.9902], [55.5775, 23.9894], [55.5763, 23.9888], [55.574, 23.9876], [55.5647, 23.9838], [55.5532, 23.9788], [55.5451, 23.9754], [55.5384, 23.9725], [55.5214, 23.9647], [55.5032, 23.958], [55.4952, 23.9536], [55.4907, 23.9501], [55.4853, 23.9444], [55.4845, 23.9421], [55.4851, 23.9399], [55.497, 23.9276], [55.499, 23.9238], [55.4999, 23.92], [55.5, 23.9158], [55.4998, 23.9079], [55.5006, 23.9057], [55.5059, 23.8986], [55.5139, 23.8933], [55.5198, 23.8851], [55.5246, 23.8771], [55.5337, 23.8494], [55.5349, 23.8435], [55.5346, 23.8359], [55.5327, 23.8241], [55.5315, 23.8074], [55.5357, 23.7714], [55.5351, 23.7687], [55.5315, 23.7599], [55.5319, 23.7573], [55.5331, 23.7558], [55.5451, 23.7461], [55.5592, 23.735], [55.5629, 23.731], [55.5692, 23.7207], [55.5719, 23.7029], [55.5698, 23.69], [55.5712, 23.6621], [55.5723, 23.6296], [55.571, 23.6252], [55.5658, 23.6151], [55.5568, 23.6056], [55.5502, 23.5987], [55.5443, 23.5927], [55.5376, 23.5834], [55.5347, 23.5793], [55.5318, 23.573], [55.5241, 23.5561], [55.5228, 23.5542], [55.51, 23.5427], [55.4981, 23.5335], [55.4911, 23.523], [55.4832, 23.5126], [55.4763, 23.4993], [55.4707, 23.49], [55.4653, 23.483], [55.4608, 23.4759], [55.4526, 23.4652], [55.4472, 23.4571], [55.4368, 23.412], [55.433, 23.4034], [55.4307, 23.3996], [55.4165, 23.3822], [55.4015, 23.3925], [55.3863, 23.3653], [55.3705, 23.336], [55.3598, 23.3166], [55.3546, 23.3069], [55.3478, 23.2929], [55.3425, 23.2839], [55.3379, 23.2757], [55.3347, 23.2701], [55.3315, 23.2645], [55.3248, 23.2535], [55.3183, 23.2417], [55.3158, 23.237], [55.3105, 23.2277], [55.3047, 23.2176], [55.2968, 23.204], [55.2869, 23.1881], [55.2807, 23.1777], [55.2709, 23.166], [55.2642, 23.1578], [55.2507, 23.1405], [55.2423, 23.1285], [55.2406, 23.1261], [55.2365, 23.1193], [55.2323, 23.1103], [55.2308, 23.1032], [55.2302, 23.0946], [55.2312, 23.0854], [55.2281, 23.0781], [55.2254, 23.0724], [55.2261, 23.0684], [55.227, 23.0635], [55.23, 23.0556], [55.2299, 23.0481], [55.2277, 23.0446], [55.2182, 23.0334], [55.2163, 23.0262], [55.2168, 23.021], [55.2171, 23.0179], [55.2171, 23.0097], [55.2193, 23.0013], [55.2202, 22.9946], [55.217, 22.9861], [55.2197, 22.9782], [55.2173, 22.9607], [55.2184, 22.9521], [55.2142, 22.9446], [55.2133, 22.9355], [55.2149, 22.9267], [55.2157, 22.9186], [55.2151, 22.9094], [55.2161, 22.9051], [55.2173, 22.9003], [55.223, 22.8927], [55.2252, 22.8849], [55.2254, 22.8751], [55.2243, 22.867], [55.2227, 22.8594], [55.2177, 22.8512], [55.2177, 22.8509], [55.2186, 22.8415], [55.2214, 22.8326], [55.2259, 22.8253], [55.226, 22.825], [55.2232, 22.8176], [55.223, 22.8171], [55.223, 22.8168], [55.2237, 22.8074], [55.2273, 22.7927], [55.2275, 22.7918], [55.2275, 22.7916], [55.2274, 22.7913], [55.227, 22.7901], [55.2202, 22.7656], [55.2186, 22.7534], [55.2179, 22.7457], [55.2175, 22.7421], [55.217, 22.7385], [55.217, 22.7383], [55.2168, 22.7372], [55.2166, 22.7354], [55.2161, 22.7324], [55.2154, 22.7279], [55.214, 22.7166], [55.2128, 22.7057], [55.2114, 22.7054], [55.2111, 22.7059], [55.2092, 22.7088], [55.2086, 22.7085], [55.2085, 22.7086], [55.2084, 22.7086], [55.2083, 22.7086], [55.2082, 22.7086], [55.2081, 22.7086], [55.208, 22.7085], [55.208, 22.7084], [55.208, 22.7083], [55.2062, 22.7068], [55.2029, 22.7041], [55.1942, 22.6945], [55.1922, 22.6924], [55.1908, 22.6907], [55.1904, 22.6909], [55.1878, 22.6879], [55.1852, 22.685], [55.1373, 22.6316], [55.0473, 22.6432], [54.9473, 22.6559], [54.8475, 22.6688], [54.6485, 22.6934], [54.5376, 22.7076], [54.38, 22.7269], [54.2308, 22.7453], [54.148, 22.7556], [53.8074, 22.7968], [53.658, 22.8147], [53.3313, 22.8533], [52.581, 22.9392], [52.464, 23.0807], [52.3379, 23.2328], [52.1634, 23.4426], [51.9202, 23.7377], [51.7581, 23.9306], [51.6481, 24.0591], [51.5978, 24.1184], [51.5904, 24.127], [51.5901, 24.1361], [51.59, 24.2412], [51.5899, 24.2536], [51.5898, 24.2659], [51.5295, 24.3364], [51.4849, 24.3547], [51.4559, 24.3638], [51.4161, 24.3932], [51.43, 24.4191], [51.4452, 24.4395], [51.4665, 24.4625], [51.4925, 24.4866], [51.5369, 24.5218], [51.5477, 24.5311], [51.557, 24.5416], [51.5652, 24.553], [51.5728, 24.5669], [51.5754, 24.5731], [51.5792, 24.5818], [51.5847, 24.5988], [51.5892, 24.6197], [51.5913, 24.6377], [51.5861, 24.6642], [51.8291, 24.7162], [52.0254, 24.7583], [52.0312, 24.7469], [52.0918, 24.6104], [52.1032, 24.6316], [52.1364, 24.6711], [52.1515, 24.686], [52.182, 24.7088], [52.212, 24.7243], [52.2237, 24.7292], [52.2519, 24.7374], [52.2697, 24.741], [52.2938, 24.7433], [52.3242, 24.7433], [52.3369, 24.7416], [52.3338, 24.753], [52.3297, 24.8021], [52.3348, 24.8394], [52.3434, 24.8659], [52.3473, 24.8742], [52.3783, 24.9003], [52.3716, 24.9037], [52.3638, 24.9095], [52.3524, 24.9207], [52.3475, 24.9277], [52.3422, 24.9397], [52.3411, 24.9413], [52.3371, 24.9493], [52.3347, 24.9577], [52.334, 24.967], [52.3348, 24.9752], [52.3371, 24.9833], [52.3409, 24.9908], [52.346, 24.9977], [52.3522, 25.0038], [52.3662, 25.0124], [52.3769, 25.0168], [52.3862, 25.019], [52.3964, 25.0196], [52.4059, 25.0188], [52.4152, 25.0164], [52.4238, 25.0126], [52.4316, 25.0076], [52.4383, 25.0013], [52.4438, 24.9941], [52.4477, 24.9861], [52.45, 24.983], [52.456, 24.9749], [52.4589, 24.9681], [52.488, 24.9925], [52.5211, 25.0006], [52.5554, 25.0031], [52.5761, 25.0025], [52.6099, 24.998], [52.6316, 24.9919], [52.6352, 25.0047], [52.6507, 25.0361], [52.67, 25.0622], [52.6566, 25.0946], [52.6491, 25.1248], [52.6472, 25.1431], [52.8039, 25.3547], [52.8375, 25.3615], [52.8766, 25.3638], [52.9089, 25.3615], [52.9389, 25.3553], [52.9563, 25.35], [52.9886, 25.3362], [53.0307, 25.3096], [53.0574, 25.2845], [53.079, 25.2556], [53.0947, 25.2236], [53.1041, 25.1897], [53.1069, 25.1546], [53.1029, 25.1198], [53.0981, 25.0974], [53.1261, 25.0931], [53.1483, 25.0864], [53.1912, 25.068], [53.2237, 25.0459], [53.2395, 25.032], [53.2632, 25.0076], [53.2842, 24.9778], [53.2992, 24.9451], [53.3081, 24.9114], [53.3122, 24.8772], [53.31, 24.8429], [53.3024, 24.8137], [53.3347, 24.8135], [53.3507, 24.8122], [53.3735, 24.8083], [53.408, 24.7981], [53.4172, 24.7937], [53.4343, 24.7893], [53.4708, 24.7727], [53.5033, 24.7502], [53.5307, 24.7227], [53.552, 24.691], [53.5682, 24.6507], [53.5738, 24.6253], [53.5748, 24.5934], [53.8204, 24.5236], [54.0142, 24.5548], [54.4265, 24.86], [54.4306, 24.874], [54.4468, 24.9056], [54.4701, 24.9353], [54.4754, 24.9454], [54.4976, 24.9739], [54.525, 24.9984], [54.5571, 25.0185], [54.5923, 25.0331], [54.6296, 25.0419], [54.638, 25.0425], [54.6691, 25.0574], [54.7069, 25.0683], [54.7154, 25.0693], [54.7232, 25.0792], [54.7433, 25.0988], [54.7642, 25.1143], [54.7746, 25.1301], [54.7924, 25.154], [54.821, 25.1819], [54.8564, 25.2058], [54.9044, 25.2261], [54.9062, 25.2422], [54.9106, 25.2653], [54.9163, 25.2851], [54.9295, 25.3181], [54.9476, 25.3518], [54.9691, 25.3798], [54.9958, 25.4044], [55.0105, 25.4144], [55.02, 25.4368], [55.0383, 25.4673], [55.0552, 25.4873], [55.0679, 25.5006], [55.0969, 25.5244], [55.0979, 25.5251], [55.116, 25.5365], [55.1314, 25.5447], [55.1704, 25.5602], [55.204, 25.5677], [55.2351, 25.5701], [55.2385, 25.5703], [55.2731, 25.568], [55.2796, 25.5666], [55.2893, 25.583], [55.3016, 25.5994], [55.3118, 25.6106], [55.3205, 25.6184], [55.3244, 25.623], [55.3348, 25.6352], [55.3488, 25.6597], [55.3758, 25.699], [55.3779, 25.7021], [55.3963, 25.7223], [55.4052, 25.7345], [55.4318, 25.7599], [55.4628, 25.7808], [55.4975, 25.7964], [55.5544, 25.8111], [55.5707, 25.8301], [55.5987, 25.8531], [55.6135, 25.8626], [55.6256, 25.8685], [55.6322, 25.875], [55.6423, 25.8824], [55.6661, 25.8978], [55.6984, 25.9124], [55.7116, 25.9165], [55.7333, 25.9221], [55.7682, 25.926], [55.7736, 25.9339], [55.8008, 25.9634], [55.8038, 25.9714], [55.8266, 26.007], [55.832, 26.0341], [55.8449, 26.0663], [55.8579, 26.0877], [55.8677, 26.1005], [55.8755, 26.1257], [55.8877, 26.1507], [55.8884, 26.1517], [56.0864, 26.0504], [56.0897, 26.0509], [56.0906, 26.0508], [56.0949, 26.0506], [56.0976, 26.0524], [56.0991, 26.0534], [56.101, 26.0538], [56.1028, 26.0533], [56.1057, 26.0542], [56.1067, 26.0554], [56.1076, 26.0554], [56.1095, 26.0545], [56.1165, 26.0506], [56.1202, 26.0512], [56.123, 26.0512], [56.1242, 26.0532], [56.126, 26.0553], [56.1283, 26.0567], [56.1328, 26.0558], [56.1354, 26.0573], [56.1388, 26.0624], [56.1421, 26.0671], [56.143, 26.0676], [56.1434, 26.0685], [56.144, 26.0688], [56.1464, 26.0683], [56.149, 26.0691], [56.1509, 26.0689], [56.1521, 26.0691], [56.1532, 26.0695], [56.1536, 26.0694], [56.1556, 26.0678], [56.1567, 26.064], [56.1591, 26.0621], [56.1619, 26.0563], [56.1633, 26.0532], [56.1626, 26.0481], [56.1648, 26.0408], [56.1687, 26.0355], [56.1704, 26.0304], [56.1726, 26.0253], [56.1746, 26.0221], [56.1786, 26.0177], [56.1823, 26.015], [56.1818, 26.0059], [56.1807, 26.003], [56.1811, 25.9998], [56.1816, 25.9986], [56.1818, 25.9982], [56.1821, 25.998], [56.1821, 25.9975], [56.1821, 25.9972], [56.1818, 25.9965], [56.1815, 25.996], [56.1812, 25.9958], [56.181, 25.9957], [56.181, 25.9957], [56.1799, 25.9955], [56.1803, 25.995], [56.1807, 25.9944], [56.1809, 25.9938], [56.1811, 25.9931], [56.1815, 25.9923], [56.182, 25.9914], [56.1825, 25.9909], [56.1839, 25.99], [56.1846, 25.9894], [56.1854, 25.9886], [56.1861, 25.988], [56.1871, 25.9874], [56.1872, 25.9872], [56.1874, 25.987], [56.1876, 25.9866], [56.1878, 25.9862], [56.1886, 25.9833], [56.1887, 25.9832], [56.1955, 25.9793], [56.1945, 25.977], [56.1932, 25.9746], [56.1913, 25.972], [56.1881, 25.9692], [56.1867, 25.9689], [56.1863, 25.9685], [56.1858, 25.9637], [56.1853, 25.9624], [56.1851, 25.961], [56.183, 25.9586], [56.1827, 25.9571], [56.1829, 25.9531], [56.1818, 25.953], [56.1792, 25.9524], [56.1778, 25.9513], [56.1768, 25.9509], [56.176, 25.9508], [56.1742, 25.9486], [56.1709, 25.9468], [56.1675, 25.9483], [56.1651, 25.9478], [56.164, 25.9469], [56.1641, 25.9463], [56.1645, 25.9454], [56.1646, 25.9449], [56.1646, 25.9446], [56.1644, 25.9441], [56.1632, 25.9422], [56.1647, 25.941], [56.1659, 25.9384], [56.1685, 25.9326], [56.1727, 25.9266], [56.1739, 25.9231], [56.1727, 25.9208], [56.1725, 25.9185], [56.1757, 25.9179], [56.1764, 25.9183], [56.1771, 25.9183], [56.1772, 25.9169], [56.1767, 25.9144], [56.1795, 25.9093], [56.1783, 25.9005], [56.1776, 25.8927], [56.1771, 25.8925], [56.1725, 25.8899], [56.1678, 25.886], [56.1662, 25.8853], [56.1642, 25.8816], [56.1596, 25.8756], [56.1694, 25.8683], [56.1661, 25.8647], [56.1619, 25.8614], [56.1583, 25.8578], [56.1547, 25.8539], [56.1514, 25.85], [56.1478, 25.8464], [56.1442, 25.8425], [56.1408, 25.8386], [56.1392, 25.8325], [56.14, 25.8269], [56.1399, 25.8212], [56.1428, 25.8164], [56.1444, 25.8114], [56.1453, 25.8058], [56.1478, 25.8014], [56.1503, 25.7969], [56.1528, 25.7925], [56.1556, 25.7883], [56.1597, 25.785], [56.1639, 25.7819], [56.1681, 25.7786], [56.1717, 25.775], [56.1725, 25.7692], [56.1703, 25.7639], [56.1675, 25.7594], [56.1631, 25.7564], [56.1589, 25.7533], [56.1542, 25.7511], [56.1506, 25.7472], [56.1464, 25.7442], [56.1428, 25.7403], [56.1408, 25.735], [56.14, 25.7283], [56.14, 25.7219], [56.1417, 25.7169], [56.1433, 25.7119], [56.145, 25.7069], [56.1467, 25.7019], [56.1469, 25.6958], [56.1461, 25.6889], [56.1453, 25.6819], [56.1436, 25.6761], [56.1456, 25.6711], [56.1472, 25.6661], [56.1514, 25.6628], [56.1572, 25.6608], [56.1639, 25.6594], [56.1708, 25.6583], [56.1775, 25.6569], [56.1833, 25.655], [56.1875, 25.6517], [56.1911, 25.6481], [56.1936, 25.6436], [56.1961, 25.6392], [56.1978, 25.6342], [56.1973, 25.6238], [56.1977, 25.6199], [56.1998, 25.6157], [56.2019, 25.612], [56.215, 25.6124], [56.229, 25.6096], [56.2533, 25.6022], [56.2574, 25.6035], [56.2625, 25.6051], [56.2663, 25.6063], [56.265, 25.6075], [56.2643, 25.6079], [56.2635, 25.6084], [56.2546, 25.6132], [56.2547, 25.6163], [56.2548, 25.6164], [56.255, 25.6167], [56.2552, 25.617], [56.2555, 25.6172], [56.2573, 25.6185], [56.2574, 25.6186], [56.2573, 25.6188], [56.2572, 25.6191], [56.2572, 25.6192], [56.2572, 25.6194], [56.2575, 25.6199], [56.2579, 25.6208], [56.2591, 25.6224], [56.2595, 25.6227], [56.2599, 25.6229], [56.2603, 25.623], [56.2606, 25.6231], [56.2609, 25.6231], [56.2613, 25.6233], [56.2621, 25.6242], [56.2625, 25.6246], [56.263, 25.6249], [56.2632, 25.6251], [56.2633, 25.6252], [56.2638, 25.6255], [56.2641, 25.6265], [56.264, 25.6273], [56.2641, 25.6275], [56.2642, 25.6277], [56.2644, 25.6278], [56.2647, 25.6278], [56.2655, 25.6278], [56.2671, 25.6278], [56.2682, 25.6282], [56.2699, 25.6291], [56.2774, 25.6313], [56.3052, 25.6394], [56.3433, 25.6545], [56.4184, 25.6827], [56.4651, 25.6908], [56.5492, 25.6927], [56.5514, 25.6892], [56.5663, 25.6574], [56.5743, 25.6336], [56.5768, 25.6222], [56.5797, 25.596], [56.5841, 25.5845], [56.5914, 25.5492], [56.5923, 25.509], [56.5877, 25.4801], [56.5876, 25.4629], [56.5906, 25.4424], [56.5901, 25.4175], [56.59, 25.4138], [56.5967, 25.3927], [56.6009, 25.3594], [56.6005, 25.3523], [56.6024, 25.3236]], [[56.3516, 25.303], [56.3486, 25.3067], [56.3356, 25.3048], [56.33, 25.3025], [56.3271, 25.302], [56.3216, 25.3028], [56.3187, 25.3024], [56.3154, 25.2961], [56.3135, 25.2969], [56.312, 25.299], [56.3101, 25.3008], [56.3105, 25.3042], [56.3043, 25.3043], [56.3051, 25.3098], [56.3047, 25.3121], [56.3027, 25.3196], [56.2975, 25.3203], [56.2942, 25.3163], [56.2912, 25.3179], [56.285, 25.3149], [56.2831, 25.3179], [56.2802, 25.3206], [56.274, 25.3216], [56.2706, 25.328], [56.2605, 25.3304], [56.257, 25.3262], [56.2485, 25.3227], [56.2457, 25.3202], [56.239, 25.3187], [56.2386, 25.3144], [56.2352, 25.3111], [56.2334, 25.3109], [56.2416, 25.3011], [56.2398, 25.2965], [56.2465, 25.2931], [56.2511, 25.2895], [56.2505, 25.2861], [56.2473, 25.2815], [56.2455, 25.2755], [56.22, 25.263], [56.208, 25.2562], [56.2093, 25.2419], [56.2128, 25.2394], [56.2158, 25.2416], [56.2338, 25.2322], [56.2358, 25.2285], [56.2457, 25.2292], [56.245, 25.235], [56.2621, 25.2337], [56.2634, 25.2294], [56.2708, 25.2272], [56.2735, 25.2322], [56.2796, 25.2331], [56.2807, 25.2366], [56.299, 25.2477], [56.3174, 25.2507], [56.3256, 25.2551], [56.3392, 25.2616], [56.3442, 25.2639], [56.3458, 25.2782], [56.3516, 25.303]]]] }, "properties": { "id": 206, "en_name": "United Arab Emirates" } }] }; this.page.pageNumber = 0; this.page.size = 100; } AreasComponent.prototype.ngOnInit = function () { this.getData({ offset: 0, size: 100 }); //this.geoCoder = new google.maps.Geocoder; }; // end on init AreasComponent.prototype.filter = function () { var p = this.parent; var temp = this.temp.filter(function (d) { return d.id === parent || (d.parent_id && d.parent_id.toString() === p) || !p; //return d.name.toLowerCase().indexOf(val) !== -1 || !val; }); this.rows = temp; }; AreasComponent.prototype.onMapReady = function (map) { this.initDrawingManager(map); }; AreasComponent.prototype.initDrawingManager = function (map) { var _this = this; var options = { drawingControl: true, drawingControlOptions: { drawingModes: ["polygon"] }, polygonOptions: { draggable: true, editable: true }, drawingMode: google.maps.drawing.OverlayType.POLYGON }; var drawingManager = new google.maps.drawing.DrawingManager(options); drawingManager.setMap(map); google.maps.event.addListener(drawingManager, 'overlaycomplete', function (event) { // Polygon drawn if (event.type === google.maps.drawing.OverlayType.POLYGON) { //this is the coordinate, you can assign it to a variable or pass into another function. _this.model.polygon = event.overlay.getPath().getArray(); //alert(event.overlay.getPath().getArray()); console.log(event.overlay.getPath().getArray()); } }); }; AreasComponent.prototype.clicked = function (clickEvent) { console.log(clickEvent); }; AreasComponent.prototype.styleFunc = function (feature) { return ({ clickable: false, fillColor: feature.getProperty('color'), strokeWeight: 1 }); }; AreasComponent.prototype.getType = function (type) { if (type === 0) return ' Country'; if (type === 1) return ' Region'; if (type === 2) return ' City'; if (type === 3) return ' District'; if (type === 4) return ' Custom'; }; AreasComponent.prototype.postForm = function () { var _this = this; var ids = []; // this.selected.map(s => ids.push(s.id)); var areas = this.model.polygon; var poly = 'MULTIPOLYGON ((('; for (var xx = 0; xx < areas.length; xx++) { poly += areas[xx].lng() + ' ' + areas[xx].lat() + ','; } //poly = poly.slice(0, -1); poly += areas[0].lng() + ' ' + areas[0].lat(); //areas.map(a=> poly +=); poly += ')))'; this.model.polygon = poly; this.areaService.saveArea(this.model).then(function (d) { _this.toastr.success('Operation Completed Successfully!'); _this.getData({ offset: 0, size: 100 }); }); }; AreasComponent.prototype.onActivate = function (event) { if (event.type == 'click') { this.geoJsonObject = event.row.polygon; this.country = event.row.name; } }; AreasComponent.prototype.getData = function (pageInfo) { var _this = this; this.page.size = 1000; this.page.pageNumber = pageInfo.offset; this.areaService.getAreas().then(function (pagedData) { _this.rows = pagedData; _this.temp = _this.rows.slice(); _this.loadingIndicator = false; }); }; AreasComponent.prototype.markerDragEnd = function ($event) { this.latitude = $event.coords.lat; this.longitude = $event.coords.lng; // this.getAddress(this.latitude, this.longitude); }; AreasComponent.prototype.polygonCreated = function ($event) { if (this.polygon) { this.polygon.setMap(null); } this.polygon = $event; this.addPolygonChangeEvent(this.polygon); google.maps.event.addListener(this.polygon, 'coordinates_changed', function (index, obj) { // Polygon object: yourPolygon console.log('coordinates_changed'); }); }; AreasComponent.prototype.getAddress = function (latitude, longitude) { var _this = this; this.geoCoder.geocode({ 'location': { lat: latitude, lng: longitude } }, function (results, status) { if (status === 'OK') { if (results[0]) { _this.zoom = 12; _this.address = results[0].formatted_address; } else { window.alert('No results found'); } } else { window.alert('Geocoder failed due to: ' + status); } }); }; AreasComponent.prototype.getPaths = function () { if (this.polygon) { var vertices = this.polygon.getPaths().getArray()[0]; var paths_1 = []; vertices.getArray().forEach(function (xy, i) { var latLng = { lat: xy.lat(), lng: xy.lng() }; paths_1.push(JSON.stringify(latLng)); }); return paths_1; } return []; }; AreasComponent.prototype.addPolygonChangeEvent = function (polygon) { var me = polygon, isBeingDragged = false, triggerCoordinatesChanged = function () { // Broadcast normalized event google.maps.event.trigger(me, 'coordinates_changed'); }; // If the overlay is being dragged, set_at gets called repeatedly, // so either we can debounce that or igore while dragging, // ignoring is more efficient google.maps.event.addListener(me, 'dragstart', function () { isBeingDragged = true; }); // If the overlay is dragged google.maps.event.addListener(me, 'dragend', function () { triggerCoordinatesChanged(); isBeingDragged = false; }); // Or vertices are added to any of the possible paths, or deleted var paths = me.getPaths(); paths.forEach(function (path, i) { google.maps.event.addListener(path, "insert_at", function () { triggerCoordinatesChanged(); }); google.maps.event.addListener(path, "set_at", function () { if (!isBeingDragged) { triggerCoordinatesChanged(); } }); google.maps.event.addListener(path, "remove_at", function () { triggerCoordinatesChanged(); }); }); }; ; __decorate([ core_1.ViewChild('myTable'), __metadata("design:type", Object) ], AreasComponent.prototype, "table", void 0); AreasComponent = __decorate([ core_1.Component({ selector: 'app-areas', styles: ['agm-map { height: 300px; /* height is required */ }'], template: __webpack_require__(/*! ./areas.component.html */ "./src/app/areas/areas.component.html"), styles: [__webpack_require__(/*! ./areas.component.css */ "./src/app/areas/areas.component.css")] }), __metadata("design:paramtypes", [area_service_1.AreaService, ngx_toastr_1.ToastrService, core_2.MapsAPILoader]) ], AreasComponent); return AreasComponent; }()); exports.AreasComponent = AreasComponent; /***/ }), /***/ "./src/app/auth/auth.guard.ts": /*!************************************!*\ !*** ./src/app/auth/auth.guard.ts ***! \************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js"); var auth_service_1 = __webpack_require__(/*! ./auth.service */ "./src/app/auth/auth.service.ts"); var AuthGuard = /** @class */ (function () { function AuthGuard(router, auth) { this.router = router; this.auth = auth; } AuthGuard.prototype.canActivate = function (next, state) { var _this = this; return this.auth.isAuthenticated() .pipe(operators_1.tap(function (loggedIn) { console.log('Is logged in?' + loggedIn); if (!loggedIn) { _this.router.navigateByUrl('/login'); } else { return true; } })); }; AuthGuard = __decorate([ core_1.Injectable(), __metadata("design:paramtypes", [router_1.Router, auth_service_1.AuthService]) ], AuthGuard); return AuthGuard; }()); exports.AuthGuard = AuthGuard; /***/ }), /***/ "./src/app/auth/auth.service.ts": /*!**************************************!*\ !*** ./src/app/auth/auth.service.ts ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var __awaiter = (this && this.__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 = (this && this.__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 = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [0, 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 _this = this; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var BehaviorSubject_1 = __webpack_require__(/*! rxjs/BehaviorSubject */ "./node_modules/rxjs-compat/_esm5/BehaviorSubject.js"); var fromPromise_1 = __webpack_require__(/*! rxjs/observable/fromPromise */ "./node_modules/rxjs-compat/_esm5/observable/fromPromise.js"); var operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js"); var of_1 = __webpack_require__(/*! rxjs/observable/of */ "./node_modules/rxjs-compat/_esm5/observable/of.js"); var aws_amplify_1 = __webpack_require__(/*! aws-amplify */ "./node_modules/aws-amplify/lib/index.js"); var environment_1 = __webpack_require__(/*! ./../../environments/environment */ "./src/environments/environment.ts"); aws_amplify_1.default.configure({ aws_project_region: "eu-central-1", aws_content_delivery_bucket: "muhimma-portalfiles", aws_content_delivery_bucket_region: "eu-central-1", aws_content_delivery_url: "https://d2wt1z63mzf0az.cloudfront.net", aws_cognito_identity_pool_id: "eu-central-1:19e0bd7d-8e4f-4235-8788-278f4d0f8519", aws_cognito_region: "eu-central-1", aws_user_pools_id: "eu-central-1_pyr68DNuJ", aws_user_pools_web_client_id: "1voulc6eucgvncb2kg73u0n18", aws_cloud_logic_custom: [ { name: "apiconfiguration", endpoint: "https://5cc8a8d24a.execute-api.us-east-2.amazonaws.com/Prod", region: "us-east-2", custom_header: function () { return __awaiter(_this, void 0, void 0, function () { var _a; return __generator(this, function (_b) { switch (_b.label) { case 0: _a = {}; return [4 /*yield*/, aws_amplify_1.Auth.currentSession()]; case 1: return [2 /*return*/, (_a.Authorization = (_b.sent()).getIdToken().getJwtToken(), _a)]; } }); }); } }, { name: "api", endpoint: "https://iveushzemk.execute-api.me-south-1.amazonaws.com/dev/", // endpoint: "https://api.muhimmaplatform.com/node1-dev-v1/", // endpoint: "https://50c8dzjrw3.execute-api.me-south-1.amazonaws.com/dev/", // endpoint: "https://apis.muhimmaplatform.com/v1/", region: "eu-central-1", custom_header: function () { return __awaiter(_this, void 0, void 0, function () { var _a; return __generator(this, function (_b) { switch (_b.label) { case 0: _a = {}; return [4 /*yield*/, aws_amplify_1.Auth.currentSession()]; case 1: return [2 /*return*/, (_a.Authorization = (_b.sent()).getIdToken().getJwtToken(), _a)]; } }); }); } }, { name: "geo", endpoint: "https://iveushzemk.execute-api.me-south-1.amazonaws.com/dev/geo", // endpoint: "https://50c8dzjrw3.execute-api.me-south-1.amazonaws.com/dev/geo", // endpoint: "https://apis.muhimmaplatform.com/v1/geo/", region: "1voulc6eucgvncb2kg73u0n18", custom_header: function () { return __awaiter(_this, void 0, void 0, function () { var _a; return __generator(this, function (_b) { switch (_b.label) { case 0: _a = {}; return [4 /*yield*/, aws_amplify_1.Auth.currentSession()]; case 1: return [2 /*return*/, (_a.Authorization = (_b.sent()).getIdToken().getJwtToken(), _a)]; } }); }); } }, { name: 'bahrain', endpoint: "https://iveushzemk.execute-api.me-south-1.amazonaws.com/dev/", // endpoint: "https://50c8dzjrw3.execute-api.me-south-1.amazonaws.com/dev/", // endpoint: 'https://apis.muhimmaplatform.com/v1/', region: 'me-south-1', custom_header: function () { return __awaiter(_this, void 0, void 0, function () { var _a; return __generator(this, function (_b) { switch (_b.label) { case 0: _a = {}; return [4 /*yield*/, aws_amplify_1.Auth.currentSession()]; case 1: return [2 /*return*/, (_a.Authorization = (_b.sent()).getIdToken().getJwtToken(), _a)]; } }); }); }, }, { name: "api_node_1", endpoint: environment_1.environment.api_node_1, // endpoint: "https://api.muhimmaplatform.com/node1-devt-v1/", // endpoint: "https://api.muhimmaplatform.com/node1-dev-v1/", // endpoint: "https://api.muhimmaplatform.com/node1-prod-v1/", custom_header: function () { return __awaiter(_this, void 0, void 0, function () { var _a; return __generator(this, function (_b) { switch (_b.label) { case 0: _a = {}; return [4 /*yield*/, aws_amplify_1.Auth.currentSession()]; case 1: return [2 /*return*/, (_a.Authorization = (_b.sent()).getIdToken().getJwtToken(), _a)]; } }); }); } }, { name: "api_node_2", endpoint: environment_1.environment.api_node_2, // endpoint: "https://api.muhimmaplatform.com/node2-devt-v1/", // endpoint: "https://api.muhimmaplatform.com/node2-dev-v1/", // endpoint: "https://api.muhimmaplatform.com/node2-prod-v1/", custom_header: function () { return __awaiter(_this, void 0, void 0, function () { var _a; return __generator(this, function (_b) { switch (_b.label) { case 0: _a = {}; return [4 /*yield*/, aws_amplify_1.Auth.currentSession()]; case 1: return [2 /*return*/, (_a.Authorization = (_b.sent()).getIdToken().getJwtToken(), _a)]; } }); }); } }, ] }); var AuthService = /** @class */ (function () { function AuthService(router) { this.router = router; //Amplify.configure(amplify); this.loggedIn = new BehaviorSubject_1.BehaviorSubject(false); } /** signup */ // public signUp(email, password): Observable { // return fromPromise(Auth.signUp(email, password)); // } AuthService.prototype.SignInFederated = function (token, expires_at, user) { return fromPromise_1.fromPromise(aws_amplify_1.Auth.federatedSignIn('facebook', { token: token, expires_at: expires_at }, user)); }; AuthService.prototype.getUser = function () { return fromPromise_1.fromPromise(aws_amplify_1.Auth.currentAuthenticatedUser() .then(function (user) { return user; }) .then(function (data) { return console.log(data); }) .catch(function (err) { return console.log(err); })); }; AuthService.prototype.updateUserAttributes = function (user, attributes) { return fromPromise_1.fromPromise(aws_amplify_1.Auth.updateUserAttributes(user, attributes).then(function (data) { return console.log(data); }) .catch(function (err) { return console.log(err); })); }; AuthService.prototype.changepassword = function (user, oldpassword, newpassword) { return fromPromise_1.fromPromise(aws_amplify_1.Auth.changePassword(user, oldpassword, newpassword).then(function (data) { return console.log(data); }) .catch(function (err) { return console.log(err); })); }; AuthService.prototype.signUp = function (emaill, passw0rd, mobile, birthDate, firstName, lastName, gender) { return fromPromise_1.fromPromise(aws_amplify_1.Auth.signUp({ username: emaill, password: passw0rd, attributes: { email: emaill, phone_number: mobile, gender: gender, birthdate: birthDate, given_name: firstName, family_name: lastName // Other custom attributes... }, validationData: [], }) .then(function (data) { return console.log(data); }) .catch(function (err) { return console.log(err); })); }; /** confirm code */ AuthService.prototype.confirmSignUp = function (email, code) { return fromPromise_1.fromPromise(aws_amplify_1.Auth.confirmSignUp(email, code)); }; /** signin */ AuthService.prototype.signIn = function (email, password) { var _this = this; return fromPromise_1.fromPromise(aws_amplify_1.Auth.signIn(email, password)) .pipe(operators_1.tap(function () { return _this.loggedIn.next(true); })); }; AuthService.prototype.forgotPassword = function (email) { return new Promise(function (resolve, reject) { aws_amplify_1.Auth.forgotPassword(email) .then(function (data) { console.log(data); resolve(data); }) .catch(function (err) { console.log(err); resolve(err); }); }); }; AuthService.prototype.changePassword = function (email, code, password) { return new Promise(function (resolve, reject) { aws_amplify_1.Auth.forgotPasswordSubmit(email, code, password) .then(function (data) { return resolve(data); }) .catch(function (err) { return resolve(err); }); }); }; /** get authenticat state */ AuthService.prototype.isAuthenticated = function () { var _this = this; return fromPromise_1.fromPromise(aws_amplify_1.Auth.currentAuthenticatedUser()) .pipe(operators_1.map(function (result) { _this.loggedIn.next(true); return true; }), operators_1.catchError(function (error) { _this.loggedIn.next(false); return of_1.of(false); })); }; /** signout */ AuthService.prototype.signOut = function () { var _this = this; fromPromise_1.fromPromise(aws_amplify_1.Auth.signOut()) .subscribe(function (result) { _this.loggedIn.next(false); localStorage.clear(); _this.router.navigate(['/login']); }, function (error) { return console.log(error); }); }; // end signout AuthService = __decorate([ core_1.Injectable(), __metadata("design:paramtypes", [router_1.Router]) ], AuthService); return AuthService; }()); exports.AuthService = AuthService; /***/ }), /***/ "./src/app/dashboard/dashboard.component.css": /*!***************************************************!*\ !*** ./src/app/dashboard/dashboard.component.css ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/dashboard/dashboard.component.html": /*!****************************************************!*\ !*** ./src/app/dashboard/dashboard.component.html ***! \****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "

    Dashoard

    \r\n\r\n" /***/ }), /***/ "./src/app/dashboard/dashboard.component.ts": /*!**************************************************!*\ !*** ./src/app/dashboard/dashboard.component.ts ***! \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var DashboardComponent = /** @class */ (function () { function DashboardComponent() { } DashboardComponent.prototype.ngOnInit = function () { }; DashboardComponent = __decorate([ core_1.Component({ selector: 'app-dashboard', template: __webpack_require__(/*! ./dashboard.component.html */ "./src/app/dashboard/dashboard.component.html"), styles: [__webpack_require__(/*! ./dashboard.component.css */ "./src/app/dashboard/dashboard.component.css")] }), __metadata("design:paramtypes", []) ], DashboardComponent); return DashboardComponent; }()); exports.DashboardComponent = DashboardComponent; /***/ }), /***/ "./src/app/demographics/demographics.component.css": /*!*********************************************************!*\ !*** ./src/app/demographics/demographics.component.css ***! \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "a{\r\n color: #f79621 !important;\r\n}\r\na:hover{\r\n color: #6e6e73 !important;\r\n}\r\n" /***/ }), /***/ "./src/app/demographics/demographics.component.html": /*!**********************************************************!*\ !*** ./src/app/demographics/demographics.component.html ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\n
    \r\n \r\n
    \r\n
    \r\n  \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n" /***/ }), /***/ "./src/app/demographics/demographics.component.ts": /*!********************************************************!*\ !*** ./src/app/demographics/demographics.component.ts ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var BreadCrumb_1 = __webpack_require__(/*! ../model/BreadCrumb */ "./src/app/model/BreadCrumb.ts"); var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var DemographicsComponent = /** @class */ (function () { function DemographicsComponent(router) { this.router = router; } DemographicsComponent.prototype.ngOnInit = function () { this.buildBreadCrumb(); }; DemographicsComponent.prototype.buildBreadCrumb = function () { //Sprints? Sprint()>Task Forms () this.crumbs = []; this.crumbs.push(new BreadCrumb_1.BreadCrumb('Home', '/')); this.crumbs.push(new BreadCrumb_1.BreadCrumb('Demographics', '/demographics')); }; DemographicsComponent.prototype.back = function () { this.router.navigate(['/home']); }; DemographicsComponent = __decorate([ core_1.Component({ selector: 'app-demographics', template: __webpack_require__(/*! ./demographics.component.html */ "./src/app/demographics/demographics.component.html"), styles: [__webpack_require__(/*! ./demographics.component.css */ "./src/app/demographics/demographics.component.css")] }), __metadata("design:paramtypes", [router_1.Router]) ], DemographicsComponent); return DemographicsComponent; }()); exports.DemographicsComponent = DemographicsComponent; /***/ }), /***/ "./src/app/home/home.component.css": /*!*****************************************!*\ !*** ./src/app/home/home.component.css ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "[_nghost-c3] {\r\n font-family: inherit !important;\r\n display: block;\r\n color:orange;\r\n cursor: pointer;\r\n\r\n}\r\n[_ngcontent-c6] {\r\n font-family: inherit !important;\r\n display: block;\r\n cursor: pointer;\r\n color:orange;\r\n}\r\n.btn-orange{\r\n font-size: 16px;\r\n font-weight: bold;\r\n background: orange;\r\n border: none;\r\n min-width: 140px;\r\n color:white;\r\n}\r\n.btn-orange:hover, .btn-orange:focus{\r\n background: #f8c55f !important;\r\n outline: none;\r\n}\r\n[_nghost-c3]span.w10 { color: #f79621 !important; }\r\n[_nghost-c3]span.w9 { color:#fac356; }\r\n[_nghost-c3]span.w8 { color:#f8c55f; }\r\n[_nghost-c3]span.w7 { color:#f3cf88; }\r\n[_nghost-c3]span.w6 { color: #f8c55f ; }\r\n[_nghost-c3]span.w5 { color: #f9e3bf ; }\r\n[_nghost-c3]span.w4 { color: #6e6e73; }\r\n[_nghost-c3]span.w3 { color: #edeeef; }\r\n[_nghost-c3]span.w2 { color: #aeacad ; }\r\n[_nghost-c3]span.w1 { color: #6e6e73; }\r\n::ng-deep angular-tag-cloud span.w10 { color: #f79621 !important; }\r\n::ng-deep angular-tag-cloud span.w9 { color:#fac356 !important; }\r\n::ng-deep angular-tag-cloud span.w8 { color:#f8c55f !important; }\r\n::ng-deep angular-tag-cloud span.w7 { color:#f3cf88 !important; }\r\n::ng-deep angular-tag-cloud span.w6 { color: #f8c55f !important; }\r\n::ng-deep angular-tag-cloud span.w5 { color: #f9e3bf !important; }\r\n::ng-deep angular-tag-cloud span.w4 { color: #f3cf88 !important; }\r\n::ng-deep angular-tag-cloud span.w3 { color: #f79621 !important; }\r\n::ng-deep angular-tag-cloud span.w2 { color: #aeacad !important; }\r\n::ng-deep angular-tag-cloud span.w1 { color: #6e6e73 !important; }\r\n" /***/ }), /***/ "./src/app/home/home.component.html": /*!******************************************!*\ !*** ./src/app/home/home.component.html ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\n \r\n
    \r\n
    \r\n
    \r\n Dashboard
    \r\n
    \r\n \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n \r\n \r\n \r\n\r\n
    \r\n
    0\">\r\n \r\n\r\n \r\n \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n\r\n
    \r\n
    \r\n
    \r\n" /***/ }), /***/ "./src/app/home/home.component.ts": /*!****************************************!*\ !*** ./src/app/home/home.component.ts ***! \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var projectService_1 = __webpack_require__(/*! ./../services/projectService */ "./src/app/services/projectService.ts"); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var tag_service_1 = __webpack_require__(/*! ../services/tag.service */ "./src/app/services/tag.service.ts"); var HomeComponent = /** @class */ (function () { function HomeComponent(projectService, router, _tagService) { this.projectService = projectService; this.router = router; this._tagService = _tagService; this.showDashBaord = false; this.User = null; this.role = 'admin'; this.isSales = false; this.tags = null; this.reportId = null; this.reports = [ { id: 0, name: 'Morning News', URL: 'https://analytics.zoho.com/open-view/1926563000004302508/d87dd533380f6c1f40a7113fff7e9e43' }, { id: 1, name: 'Default', URL: 'https://analytics.zoho.com/open-view/1926563000000368108' }, { id: 2, name: 'Hair Style', URL: 'https://analytics.zoho.com/open-view/1926563000002527477' }, ]; this.dashboardURL = 'https://analytics.zoho.com/open-view/1926563000000368108'; this.coptions = { width: 850, height: 400, overflow: false, zoomOnHover: { scale: 1.2, transitionTime: 0.3, delay: .3 }, realignOnResize: true }; this.data = null; } HomeComponent.prototype.ngOnInit = function () { if (localStorage.getItem('user') === null) { this.router.navigate(['/']); } this.User = JSON.parse(localStorage.getItem('user')); this.role = this.User.email.indexOf('sale') > -1 ? 'sales' : 'admin'; if (this.role === 'sales') { this.getData(); } // tslint:disable-next-line:max-line-length if (this.User.dashboard_url !== null && this.User.dashboard_url !== undefined && this.User.dashboard_url.length > 0) { this.dashboardURL = this.User.dashboard_url; } console.log('dashboard url is:' + this.dashboardURL); }; HomeComponent.prototype.getData = function () { var _this = this; this._tagService.getTags().then(function (data) { _this.tags = data; _this.getWeight(); }); }; HomeComponent.prototype.getWeight = function () { var _this = this; var total = 0; this.data = []; this.tags.forEach(function (t) { return total += t.taggings_count; }); this.tags.forEach(function (t) { return t.weight = Math.ceil(t.taggings_count * 100 / total) + 3; }); // @ts-ignore this.tags.forEach(function (t) { return _this.data.push({ id: t.id, text: t.name, weight: t.weight }); }); //, link: '/tags/'+t.id, color: 'orange' }; HomeComponent.prototype.changeURL = function () { var _this = this; var report = this.reports.find(function (r) { return r.id === +_this.reportId; }); this.dashboardURL = report.URL; }; HomeComponent.prototype.nodeClicked = function (node) { this.router.navigate(['/', 'tags', node.id]); console.log(node); }; HomeComponent = __decorate([ core_1.Component({ selector: 'app-home', template: __webpack_require__(/*! ./home.component.html */ "./src/app/home/home.component.html"), styles: [__webpack_require__(/*! ./home.component.css */ "./src/app/home/home.component.css")] }), __metadata("design:paramtypes", [projectService_1.ProjectService, router_1.Router, tag_service_1.TagService]) ], HomeComponent); return HomeComponent; }()); exports.HomeComponent = HomeComponent; /***/ }), /***/ "./src/app/insights/insights.component.css": /*!*************************************************!*\ !*** ./src/app/insights/insights.component.css ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/insights/insights.component.html": /*!**************************************************!*\ !*** ./src/app/insights/insights.component.html ***! \**************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "

    \r\n insights works!\r\n

    \r\n" /***/ }), /***/ "./src/app/insights/insights.component.ts": /*!************************************************!*\ !*** ./src/app/insights/insights.component.ts ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var tag_service_1 = __webpack_require__(/*! ../services/tag.service */ "./src/app/services/tag.service.ts"); var InsightsComponent = /** @class */ (function () { function InsightsComponent(_tagService) { this._tagService = _tagService; this.tags = null; this.options = {}; } InsightsComponent.prototype.ngOnInit = function () { this.getData(); }; InsightsComponent.prototype.getData = function () { var _this = this; this._tagService.getTags().then(function (data) { _this.tags = data; }); }; InsightsComponent = __decorate([ core_1.Component({ selector: 'app-insights', template: __webpack_require__(/*! ./insights.component.html */ "./src/app/insights/insights.component.html"), styles: [__webpack_require__(/*! ./insights.component.css */ "./src/app/insights/insights.component.css")] }), __metadata("design:paramtypes", [tag_service_1.TagService]) ], InsightsComponent); return InsightsComponent; }()); exports.InsightsComponent = InsightsComponent; /***/ }), /***/ "./src/app/loader/loader.component.css": /*!*********************************************!*\ !*** ./src/app/loader/loader.component.css ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/loader/loader.component.html": /*!**********************************************!*\ !*** ./src/app/loader/loader.component.html ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\r\n
    \r\n Loading...\r\n
    \r\n" /***/ }), /***/ "./src/app/loader/loader.component.ts": /*!********************************************!*\ !*** ./src/app/loader/loader.component.ts ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var loader_service_1 = __webpack_require__(/*! ../services/loader.service */ "./src/app/services/loader.service.ts"); var LoaderComponent = /** @class */ (function () { function LoaderComponent(loaderService) { var _this = this; this.loaderService = loaderService; this.loaderService.isLoading.subscribe(function (v) { console.log(v); _this.loading = v; }); } LoaderComponent.prototype.ngOnInit = function () { }; LoaderComponent = __decorate([ core_1.Component({ selector: 'app-loader', template: __webpack_require__(/*! ./loader.component.html */ "./src/app/loader/loader.component.html"), styles: [__webpack_require__(/*! ./loader.component.css */ "./src/app/loader/loader.component.css")] }), __metadata("design:paramtypes", [loader_service_1.LoaderService]) ], LoaderComponent); return LoaderComponent; }()); exports.LoaderComponent = LoaderComponent; /***/ }), /***/ "./src/app/login/login.component.css": /*!*******************************************!*\ !*** ./src/app/login/login.component.css ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".login-block{\r\n /* background: #DE6262; fallback for old browsers */\r\n/* background: -webkit-linear-gradient(to bottom, #FFB88C, #DE6262); Chrome 10-25, Safari 5.1-6 */\r\n/* background: linear-gradient(to bottom, #FFB88C, #DE6262); W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */\r\nfloat:left;\r\nwidth:100%;\r\npadding : 50px 0;\r\n}\r\n.banner-sec{background:url(https://static.pexels.com/photos/33972/pexels-photo.jpg) no-repeat left bottom; background-size:cover; min-height:500px; border-radius: 0 10px 10px 0; padding:0;}\r\n.container{background:#fff;\r\n border-radius: 10px;\r\n box-shadow: 0 15px 20px rgba(0, 0, 0, 0.3);\r\n}\r\n.carousel-inner{border-radius:0 10px 10px 0;}\r\n.carousel-caption{text-align:left; left:5%;}\r\n.login-sec{padding: 50px 30px; position:relative;}\r\n.login-sec .copy-text{position:absolute; width:80%; bottom:20px; font-size:13px; text-align:center;}\r\n.login-sec .copy-text i{color:#FEB58A;}\r\n.login-sec .copy-text a{color:#E36262;}\r\n.login-sec h2{margin-bottom:30px; font-weight:800; font-size:30px; color: #DE6262;}\r\n.login-sec h2:after{content:\" \"; width:100px; height:5px; background:#FEB58A; display:block; margin-top:20px; border-radius:3px; margin-left:auto;margin-right:auto}\r\n.btn-login{background: #DE6262; color:#fff; font-weight:600;}\r\n.banner-text{width:70%; position:absolute; bottom:40px; padding-left:20px;}\r\n.banner-text h2{color:#fff; font-weight:600;}\r\n/* .banner-text h2:after{content:\" \"; width:100px; height:5px; background:#FFF; display:block; margin-top:20px; border-radius:3px;} */\r\n.banner-text p{color:#fff;}\r\n.btn-facebook {\r\n color: white;\r\n background-color: #3b5998;\r\n}\r\n" /***/ }), /***/ "./src/app/login/login.component.html": /*!********************************************!*\ !*** ./src/app/login/login.component.html ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\n
    \r\n
    \r\n
    \r\n

    Login Now

    \r\n
    \r\n
    \r\n \r\n \r\n\r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n\r\n
    \r\n\r\n
    \r\n \r\n   \r\n   \r\n\r\n Facebook\r\n\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    {{message}}
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
      \r\n
    1. \r\n
    2. \r\n
    3. \r\n
    \r\n
    \r\n
    \r\n \"First\r\n
    \r\n
    \r\n

    Rich Analytics

    \r\n

    At your finger tips

    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \"First\r\n
    \r\n
    \r\n

    Insights

    \r\n

    Beyond the unknown

    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \"First\r\n
    \r\n
    \r\n

    Decision Suppor

    \r\n

    We will pave your path!

    \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n" /***/ }), /***/ "./src/app/login/login.component.ts": /*!******************************************!*\ !*** ./src/app/login/login.component.ts ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var projectService_1 = __webpack_require__(/*! ./../services/projectService */ "./src/app/services/projectService.ts"); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js"); var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var auth_service_1 = __webpack_require__(/*! ./../auth/auth.service */ "./src/app/auth/auth.service.ts"); var user_service_1 = __webpack_require__(/*! ../services/user.service */ "./src/app/services/user.service.ts"); var LoginComponent = /** @class */ (function () { function LoginComponent(fb, router, auth, projectService, userService) { this.fb = fb; this.router = router; this.auth = auth; this.projectService = projectService; this.userService = userService; this.loading = false; this.showConfirmation = false; this.loginText = 'Login'; this.message = ''; this.showPassword = false; this.email = ''; } LoginComponent.prototype.ngOnInit = function () { this.initForm(); //this.initFaceBook(); }; LoginComponent.prototype.initForm = function () { this.loginForm = this.fb.group({ email: ['', forms_1.Validators.required], password: ['', forms_1.Validators.required], code: [''] }); }; LoginComponent.prototype.forgotPassword = function () { var _this = this; this.loading = true; this.auth.forgotPassword(this.email) .then(function (d) { _this.loading = false; console.log('forgot password triggered.. now I should show password dialog' + d); _this.loginText = 'Set Password'; _this.message = 'A new password is required. Confirmation code sent to your mobile number'; _this.showConfirmation = true; }) .catch(function (errr) { return console.log('error in forgot password: ' + errr); }); }; LoginComponent.prototype.onSubmitLogin = function (value) { var _this = this; console.log(value); var code = value.code; var email = value.email, password = value.password; if (email == '' || password == '') { this.message = 'Invalid Email and Password'; return; } if (this.showConfirmation) { if (code == '') { this.message = 'Invalid Code'; return; } this.auth.changePassword(email, code, password). then(function (data) { console.log(data); _this.auth.signIn(email, password).subscribe(function (result) { _this.userService.getUser(email).then(function (user) { console.log('retrieved agent' + JSON.stringify(user)); _this.loading = false; _this.router.navigate(['/']); }); }); //end sign in }).catch(function (err) { return console.log(err); }); } else { this.loading = true; this.auth.signIn(email, password).subscribe(function (result) { //console.log(result); _this.userService.getUser(email).then(function (data) { localStorage.setItem("admin_id", data.id); console.log('retrieved agent' + JSON.stringify(data)); _this.loading = false; _this.router.navigate(['/']); }, function (error) { console.log(error); }); }, function (err) { _this.loading = false; console.log(err.code); if (err.code === 'UserNotConfirmedException') { console.log('The user is not confirmed Yet'); } else if (err.code === 'NotAuthorizedException') { _this.message = 'Invalid Username or Password.'; // The error happens when the incorrect password is provided } else if (err.code === 'PasswordResetRequiredException' || err.code === 'NotAuthorizedException') { _this.forgotPassword(); } else if (err.code === 'UserNotFoundException') { _this.message = 'User does not exist!'; } else { console.log(err); } }); } }; LoginComponent.prototype.initFaceBook = function () { window.fbAsyncInit = function () { FB.init({ appId: '269440380340389', cookie: true, xfbml: true, version: 'v3.2' }); console.log('done init FB'); FB.AppEvents.logPageView(); }; (function (d, s, id) { console.log('id is', id); var js, // tslint:disable-next-line:prefer-const fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) { return; } js = d.createElement(s); js.id = id; js.src = 'https://connect.facebook.net/en_US/sdk.js'; fjs.parentNode.insertBefore(js, fjs); console.log('donwloaded'); })(document, 'script', 'facebook-jssdk'); }; LoginComponent.prototype.loginWithFacebook = function () { var url = // tslint:disable-next-line:max-line-length 'https://frontendportal.auth.Inisghts Clouds.amazoncognito.com/oauth2/authorize?identity_provider=Facebook&redirect_uri=https://localhost:4200&response_type=CODE&client_id=6rkscc08nrb2puv0690hgjhcnm&scope=aws.cognito.signin.user.admin%20email%20openid%20phone%20profile'; console.log('will redirect to: ' + url); window.location.assign(url); }; LoginComponent.prototype.socialSignIn = function (socialPlatform) { var auth = this.auth; console.log('submit login to facebook'); FB.login(function (response) { console.log('submitLogin', response); if (response.authResponse) { console.log('Logged in yaaay' + JSON.stringify(response)); FB.api('/' + response.authResponse.userID + '/', { fields: 'id,name,first_name,middle_name,last_name,' + 'email,birthday,about,address,gender,hometown,link,location,education,work,relationship_status,picture' }, function (profile) { console.log('Good to see you, ' + profile.name + '. Full Profile' + JSON.stringify(profile)); var user = profile; auth.SignInFederated(response.authResponse.accessToken, response.authResponse.expiresIn, user).subscribe(function (result) { console.log(JSON.stringify(result)); }, function (error) { console.log(error); }); }); } else { console.log('User login failed'); } }, { scope: 'public_profile,email', return_scopes: true }); }; LoginComponent = __decorate([ core_1.Component({ selector: 'app-login', template: __webpack_require__(/*! ./login.component.html */ "./src/app/login/login.component.html"), styles: [__webpack_require__(/*! ./login.component.css */ "./src/app/login/login.component.css")] }), __metadata("design:paramtypes", [forms_1.FormBuilder, router_1.Router, auth_service_1.AuthService, projectService_1.ProjectService, user_service_1.UserService]) ], LoginComponent); return LoginComponent; }()); exports.LoginComponent = LoginComponent; /***/ }), /***/ "./src/app/model/BreadCrumb.ts": /*!*************************************!*\ !*** ./src/app/model/BreadCrumb.ts ***! \*************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var BreadCrumb = /** @class */ (function () { function BreadCrumb(label, url) { this.label = label; this.url = url; } return BreadCrumb; }()); exports.BreadCrumb = BreadCrumb; ; /***/ }), /***/ "./src/app/model/PaymentRequestForm.ts": /*!*********************************************!*\ !*** ./src/app/model/PaymentRequestForm.ts ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var BulkEvaluation = /** @class */ (function () { function BulkEvaluation(Ids, status, message, userId, rewardId) { this.Ids = Ids; this.status = status; this.message = message; this.userId = userId; this.rewardId = rewardId; } return BulkEvaluation; }()); exports.BulkEvaluation = BulkEvaluation; /***/ }), /***/ "./src/app/model/TransactionForm.ts": /*!******************************************!*\ !*** ./src/app/model/TransactionForm.ts ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var TransactionForm = /** @class */ (function () { function TransactionForm(id, worker_id, submission_id, amount, currency_id, transaction_type, message, description, created_at, updated_at, is_deleted) { this.id = id; this.worker_id = worker_id; this.submission_id = submission_id; this.amount = amount; this.currency_id = currency_id; this.transaction_type = transaction_type; this.message = message; this.description = description; this.created_at = created_at; this.updated_at = updated_at; this.is_deleted = is_deleted; } return TransactionForm; }()); exports.TransactionForm = TransactionForm; /***/ }), /***/ "./src/app/model/accountItem.ts": /*!**************************************!*\ !*** ./src/app/model/accountItem.ts ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var AccountItem = /** @class */ (function () { function AccountItem(id, name, country_id, parent_account_id, sector_id, created_at, updated_at, is_deleted) { this.id = id; this.name = name; this.country_id = country_id; this.parent_account_id = parent_account_id; this.sector_id = sector_id; this.created_at = created_at; this.updated_at = updated_at; } return AccountItem; }()); exports.AccountItem = AccountItem; /***/ }), /***/ "./src/app/model/page.ts": /*!*******************************!*\ !*** ./src/app/model/page.ts ***! \*******************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var Page = /** @class */ (function () { function Page() { // The number of elements in the page this.size = 0; // The total number of elements this.totalElements = 0; // The total number of pages this.totalPages = 0; // The current page number this.pageNumber = 0; } return Page; }()); exports.Page = Page; /***/ }), /***/ "./src/app/model/paged-data.ts": /*!*************************************!*\ !*** ./src/app/model/paged-data.ts ***! \*************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var page_1 = __webpack_require__(/*! ./page */ "./src/app/model/page.ts"); /** * An array of data with an associated page object used for paging */ var PagedData = /** @class */ (function () { function PagedData() { this.data = new Array(); this.page = new page_1.Page(); } return PagedData; }()); exports.PagedData = PagedData; /***/ }), /***/ "./src/app/model/sprint.ts": /*!*********************************!*\ !*** ./src/app/model/sprint.ts ***! \*********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var Type; (function (Type) { Type["Word"] = "word"; Type["Character"] = "character"; })(Type = exports.Type || (exports.Type = {})); // Converts JSON strings to/from your types // and asserts the results of JSON.parse at runtime var Convert; (function (Convert) { function toSprint(json) { return cast(JSON.parse(json), r("Sprint")); } Convert.toSprint = toSprint; function sprintToJson(value) { return JSON.stringify(uncast(value, r("Sprint")), null, 2); } Convert.sprintToJson = sprintToJson; function invalidValue(typ, val) { throw Error("Invalid value " + JSON.stringify(val) + " for type " + JSON.stringify(typ)); } function jsonToJSProps(typ) { if (typ.jsonToJS === undefined) { var map = {}; typ.props.forEach(function (p) { return map[p.json] = { key: p.js, typ: p.typ }; }); typ.jsonToJS = map; } return typ.jsonToJS; } function jsToJSONProps(typ) { if (typ.jsToJSON === undefined) { var map = {}; typ.props.forEach(function (p) { return map[p.js] = { key: p.json, typ: p.typ }; }); typ.jsToJSON = map; } return typ.jsToJSON; } function transform(val, typ, getProps) { function transformPrimitive(typ, val) { if (val === null) return val; if (val === undefined) return typ; if (typeof typ === typeof val) return val; return invalidValue(typ, val); } function transformUnion(typs, val) { // val must validate against one typ in typs var l = typs.length; for (var i = 0; i < l; i++) { var typ = typs[i]; try { return transform(val, typ, getProps); } catch (_) { } } return invalidValue(typs, val); } function transformEnum(cases, val) { if (cases.indexOf(val) !== -1) return val; return invalidValue(cases, val); } function transformArray(typ, val) { // val must be an array with no invalid elements if (!Array.isArray(val)) val = []; return val.map(function (el) { return transform(el, typ, getProps); }); } function transformDate(typ, val) { if (val === null) { return null; } var d = new Date(val); if (isNaN(d.valueOf())) { return invalidValue("Date", val); } return d; } function transformObject(props, additional, val) { if (val === null || typeof val !== "object" || Array.isArray(val)) { return invalidValue("object", val); } var result = {}; Object.getOwnPropertyNames(props).forEach(function (key) { var prop = props[key]; var v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined; result[prop.key] = transform(v, prop.typ, getProps); }); Object.getOwnPropertyNames(val).forEach(function (key) { if (!Object.prototype.hasOwnProperty.call(props, key)) { result[key] = transform(val[key], additional, getProps); } }); return result; } if (typ === "any") return val; if (typ === null) { if (val === null || val === true) return val; return invalidValue(typ, val); } if (typ === false) { return val; // return invalidValue(typ, val); } while (typeof typ === "object" && typ.ref !== undefined) { typ = typeMap[typ.ref]; } if (Array.isArray(typ)) return transformEnum(typ, val); if (typeof typ === "object") { return typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val) : typ.hasOwnProperty("arrayItems") ? transformArray(typ.arrayItems, val) : typ.hasOwnProperty("props") ? transformObject(getProps(typ), typ.additional, val) : invalidValue(typ, val); } // Numbers can be parsed by Date but shouldn't be. if (typ === Date && typeof val !== "number") return transformDate(typ, val); return transformPrimitive(typ, val); } function cast(val, typ) { return transform(val, typ, jsonToJSProps); } function uncast(val, typ) { return transform(val, typ, jsToJSONProps); } function a(typ) { return { arrayItems: typ }; } function u() { var typs = []; for (var _i = 0; _i < arguments.length; _i++) { typs[_i] = arguments[_i]; } return { unionMembers: typs }; } function o(props, additional) { return { props: props, additional: additional }; } function m(additional) { return { props: [], additional: additional }; } function r(name) { return { ref: name }; } var typeMap = { "Sprint": o([ { json: "id", js: "id", typ: 0 }, { json: "tag", js: "tag", typ: "" }, { json: "name", js: "name", typ: "" }, { json: "forms", js: "forms", typ: a(r("Form")) }, { json: "rules", js: "rules", typ: null }, { json: "tasks", js: "tasks", typ: a(r("Task")) }, { json: "namear", js: "namear", typ: "" }, { json: "status", js: "status", typ: 0 }, { json: "area_id", js: "area_id", typ: 0 }, { json: "iconurl", js: "iconurl", typ: "" }, { json: "backgroundurl", js: "backgroundurl", typ: "" }, { json: "dashboardurl", js: "dashboardurl", typ: "" }, { json: "rewards", js: "rewards", typ: a(r("Reward")) }, { json: "is_pilot", js: "is_pilot", typ: true }, { json: "priority", js: "priority", typ: 0 }, { json: "account_id", js: "account_id", typ: 0 }, { json: "country_id", js: "country_id", typ: 0 }, { json: "created_at", js: "created_at", typ: Date }, { json: "extra_text", js: "extra_text", typ: "" }, { json: "is_deleted", js: "is_deleted", typ: u(true, null) }, { json: "started_at", js: "started_at", typ: Date }, { json: "updated_at", js: "updated_at", typ: Date }, { json: "description", js: "description", typ: "" }, { json: "finished_at", js: "finished_at", typ: u(Date, null) }, { json: "schedulings", js: "schedulings", typ: a(r("Scheduling")) }, { json: "system_name", js: "system_name", typ: "" }, { json: "total_spent", js: "total_spent", typ: 0 }, { json: "is_community", js: "is_community", typ: true }, { json: "project_type", js: "project_type", typ: 0 }, { json: "customer_name", js: "customer_name", typ: "" }, { json: "descriptionar", js: "descriptionar", typ: "" }, { json: "account_deal_id", js: "account_deal_id", typ: null }, { json: "latest_activity", js: "latest_activity", typ: Date }, { json: "project_group_id", js: "project_group_id", typ: null }, { json: "short_description", js: "short_description", typ: "" }, { json: "allowed_worker_ids", js: "allowed_worker_ids", typ: a("any") }, { json: "is_auto_acceptable", js: "is_auto_acceptable", typ: true }, { json: "max_submission_count", js: "max_submission_count", typ: 0 }, { json: "short_description_ar", js: "short_description_ar", typ: "" }, { json: "disallowed_worker_ids", js: "disallowed_worker_ids", typ: a("any") }, { json: "active_submissions_count", js: "active_submissions_count", typ: 0 }, { json: "default_task_description", js: "default_task_description", typ: "" }, { json: "system_short_description", js: "system_short_description", typ: "" }, { json: "customer_short_description", js: "customer_short_description", typ: "" }, { json: "max_submission_count_per_worker", js: "max_submission_count_per_worker", typ: 0 }, { json: "rejected", js: "rejected", typ: 0 }, { json: "accepted", js: "accepted", typ: 0 }, { json: "submitted", js: "submitted", typ: 0 }, ], false), "File": o([ { json: "id", js: "id", typ: 0 }, { json: "url", js: "url", typ: "" }, { json: "created_at", js: "created_at", typ: Date }, { json: "is_deleted", js: "is_deleted", typ: u(true, null) }, { json: "updated_at", js: "updated_at", typ: Date }, { json: "upload_type", js: "upload_type", typ: 0 }, { json: "uploadable_id", js: "uploadable_id", typ: 0 }, { json: "uploadable_type", js: "uploadable_type", typ: "" }, ], false), "Form": o([ { json: "id", js: "id", typ: 0 }, { json: "tasks", js: "tasks", typ: a(r("Task")) }, { json: "title", js: "title", typ: "" }, { json: "titlear", js: "titlear", typ: "" }, { json: "questions", js: "questions", typ: u(a(r("Question")), null) }, { json: "created_at", js: "created_at", typ: Date }, { json: "is_deleted", js: "is_deleted", typ: u(true, null) }, { json: "is_visible", js: "is_visible", typ: u(true, null) }, { json: "project_id", js: "project_id", typ: 0 }, { json: "updated_at", js: "updated_at", typ: Date }, { json: "is_scorable", js: "is_scorable", typ: u(true, null) }, { json: "complete_duration", js: "complete_duration", typ: 0 }, ], false), "Question": o([ { json: "id", js: "id", typ: 0 }, { json: "opts", js: "opts", typ: u(a(r("Opt")), null) }, { json: "label", js: "label", typ: "" }, { json: "labelar", js: "labelar", typ: "" }, { json: "position", js: "position", typ: 0 }, { json: "is_random", js: "is_random", typ: u(true, null) }, { json: "is_required", js: "is_required", typ: u(true, null) }, { json: "created_at", js: "created_at", typ: Date }, { json: "is_deleted", js: "is_deleted", typ: u(true, null) }, { json: "updated_at", js: "updated_at", typ: Date }, { json: "constraints", js: "constraints", typ: u(r("Constraints"), null) }, { json: "description", js: "description", typ: "" }, { json: "task_form_id", js: "task_form_id", typ: 0 }, { json: "answer_points", js: "answer_points", typ: 0 }, { json: "question_type", js: "question_type", typ: 0 }, { json: "is_visible_client", js: "is_visible_client", typ: u(true, null) }, { json: "max_answer_points", js: "max_answer_points", typ: 0 }, ], false), "Constraints": o([ { json: "limit", js: "limit", typ: r("Limit") }, { json: "is_required", js: "is_required", typ: u(true, null) }, ], false), "Limit": o([ { json: "type", js: "type", typ: r("Type") }, { json: "min", js: "min", typ: u(0, 0) }, ], false), "Opt": o([ { json: "id", js: "id", typ: 0 }, { json: "label", js: "label", typ: "" }, { json: "labelar", js: "labelar", typ: "" }, { json: "jump_ids", js: "jump_ids", typ: a(0) }, { json: "position", js: "position", typ: 0 }, { json: "created_at", js: "created_at", typ: Date }, { json: "is_deleted", js: "is_deleted", typ: u(true, null) }, { json: "updated_at", js: "updated_at", typ: Date }, { json: "question_id", js: "question_id", typ: 0 }, { json: "answer_points", js: "answer_points", typ: 0 }, { json: "optional_label", js: "optional_label", typ: "" }, { json: "has_extra_payload", js: "has_extra_payload", typ: u(true, null) }, ], false), "Task": o([ { json: "id", js: "id", typ: 0 }, { json: "title", js: "title", typ: "" }, { json: "status", js: "status", typ: 0 }, { json: "address", js: "address", typ: "" }, { json: "area_id", js: "area_id", typ: 0 }, { json: "titlear", js: "titlear", typ: "" }, { json: "location", js: "location", typ: "" }, { json: "priority", js: "priority", typ: 0 }, { json: "reward_id", js: "reward_id", typ: 0 }, { json: "created_at", js: "created_at", typ: Date }, { json: "is_deleted", js: "is_deleted", typ: u(true, null) }, { json: "updated_at", js: "updated_at", typ: Date }, { json: "custom_info", js: "custom_info", typ: "" }, { json: "description", js: "description", typ: "" }, { json: "claim_radius", js: "claim_radius", typ: 0 }, { json: "task_form_id", js: "task_form_id", typ: 0 }, { json: "descriptionar", js: "descriptionar", typ: "" }, { json: "related_task_ids", js: "related_task_ids", typ: a("any") }, { json: "short_description", js: "short_description", typ: "" }, { json: "submission_radius", js: "submission_radius", typ: 0 }, { json: "allowed_worker_ids", js: "allowed_worker_ids", typ: a(0) }, { json: "max_submission_count", js: "max_submission_count", typ: 0 }, { json: "short_description_ar", js: "short_description_ar", typ: "" }, { json: "disallowed_worker_ids", js: "disallowed_worker_ids", typ: a("any") }, { json: "nationalities", js: "nationalities", typ: a("any") }, { json: "hard_prerequisite_ids", js: "hard_prerequisite_ids", typ: a(0) }, { json: "soft_prerequisite_ids", js: "soft_prerequisite_ids", typ: a("any") }, { json: "active_submissions_count", js: "active_submissions_count", typ: 0 }, { json: "max_submission_count_per_worker", js: "max_submission_count_per_worker", typ: 0 }, { json: "amount", js: "amount", typ: u(0, 0) }, { json: "gender", js: "gender", typ: u(0, 0) }, { json: "os", js: "os", typ: u(0, 0) }, { json: "min_age", js: "min_age", typ: u(0, 0) }, { json: "max_age", js: "max_age", typ: u(0, 0) }, { json: "currency_id", js: "currency_id", typ: u(0, 0) }, ], false), "Reward": o([ { json: "id", js: "id", typ: 0 }, { json: "cost", js: "cost", typ: u(0, null) }, { json: "title", js: "title", typ: "" }, { json: "amount", js: "amount", typ: 0 }, { json: "is_shown", js: "is_shown", typ: true }, { json: "created_at", js: "created_at", typ: Date }, { json: "is_deleted", js: "is_deleted", typ: u(true, null) }, { json: "project_id", js: "project_id", typ: 0 }, { json: "updated_at", js: "updated_at", typ: Date }, { json: "currency_id", js: "currency_id", typ: 0 }, ], false), "Scheduling": o([ { json: "id", js: "id", typ: 0 }, { json: "starts_at", js: "starts_at", typ: Date }, { json: "created_at", js: "created_at", typ: Date }, { json: "project_id", js: "project_id", typ: 0 }, { json: "updated_at", js: "updated_at", typ: Date }, { json: "finishes_at", js: "finishes_at", typ: Date }, { json: "available_to", js: "available_to", typ: 0 }, { json: "available_from", js: "available_from", typ: 0 }, { json: "available_on_friday", js: "available_on_friday", typ: u(true, null) }, { json: "available_on_monday", js: "available_on_monday", typ: u(true, null) }, { json: "available_on_sunday", js: "available_on_sunday", typ: u(true, null) }, { json: "available_on_tuesday", js: "available_on_tuesday", typ: u(true, null) }, { json: "available_on_saturday", js: "available_on_saturday", typ: u(true, null) }, { json: "available_on_thursday", js: "available_on_thursday", typ: u(true, null) }, { json: "available_on_wednesday", js: "available_on_wednesday", typ: u(true, null) }, ], false), "Type": [ "character", "word" ], }; })(Convert = exports.Convert || (exports.Convert = {})); /***/ }), /***/ "./src/app/model/user.ts": /*!*******************************!*\ !*** ./src/app/model/user.ts ***! \*******************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __extends = (this && this.__extends) || (function () { var 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 function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var User = /** @class */ (function () { function User(id, first_name, last_name, email, is_deleted, locale, created_at, updated_at, phone_number, country_id, account_id, dashboard_url, photo, is_blocked, role) { this.id = id; this.first_name = first_name; this.last_name = last_name; this.email = email; this.is_deleted = is_deleted; this.locale = locale; this.created_at = created_at; this.phone_number = phone_number; this.country_id = country_id; this.account_id = account_id; this.dashboard_url = dashboard_url; this.photo = photo; this.is_blocked = is_blocked; this.role = role; } User.prototype.name = function () { return this.first_name + " " + this.last_name; }; return User; }()); exports.User = User; var WorkerUser = /** @class */ (function (_super) { __extends(WorkerUser, _super); // construtor function WorkerUser(id, first_name, last_name, email, is_deleted, locale, last_location, fbuid, gender, birthdate, is_blocked, phone_number, created_at, updated_at, nationality_id) { var _this = _super.call(this, id, first_name, last_name, email, is_deleted, locale, created_at, updated_at, phone_number, null) || this; _this.last_location = last_location; _this.fbuid = fbuid; _this.gender = gender; _this.birthdate = birthdate; _this.is_blocked = is_blocked; _this.phone_number = phone_number; _this.nationality_id = nationality_id; return _this; } return WorkerUser; }(User)); exports.WorkerUser = WorkerUser; /***/ }), /***/ "./src/app/modules/payment/components/paymentrequests/paymentrequests.component.css": /*!******************************************************************************************!*\ !*** ./src/app/modules/payment/components/paymentrequests/paymentrequests.component.css ***! \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".form-control {\r\n padding-right: 30px;\r\n}\r\n\r\n.form-control + .fa {\r\n position: absolute;\r\n right: 0;\r\n padding: 8px 27px;\r\n}\r\n\r\n.badge{\r\n color: #fff;\r\n display: inline-block;\r\n padding: 4px 8px !important;\r\n font-size: 13px;\r\n border-radius: 3px;\r\n}\r\n\r\n.ngx-datatable.material .datatable-body .datatable-body-row .datatable-body-cell {\r\n padding: 0.75rem;\r\n padding-top: 0.0rem !important;\r\n padding-right: 0.75rem;\r\n padding-bottom: 0.75rem;\r\n padding-left: 0.75rem;\r\n text-align: left;\r\n vertical-align: top;\r\n}\r\n" /***/ }), /***/ "./src/app/modules/payment/components/paymentrequests/paymentrequests.component.html": /*!*******************************************************************************************!*\ !*** ./src/app/modules/payment/components/paymentrequests/paymentrequests.component.html ***! \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    Evaluate Payment Requests
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n Enter the new status for the selected payment requests.\r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n

    Payment Requests

    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n
    \r\n \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n\t\t\t\t
    \r\n\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    FulfillerFulfilled AtPayment Info
    \r\n\t\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t\t\t
    Name{{row['payment_information'].first_name + ' '+row['payment_information'].last_name }}
    Bank{{row['payment_information'].bank_name }}
    Branch{{row['payment_information'].bank_branch }}
    Address{{row['payment_information'].bank_address }}
    Account{{row['payment_information'].account_number }}
    Swift{{row['payment_information'].swift }}
    IBAN{{row['payment_information'].iban }}
    \r\n\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    Transaction IDTransaction AmountSubmission IDTask Name
    \r\n\t\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n Worker Id\r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n Name\r\n \r\n \r\n\r\n
    {{ value }}
    \r\n
    \r\n
    \r\n \r\n \r\n Email\r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n Phone\r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n Amount\r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n IBAN\r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n\r\n \r\n \r\n Status\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n Created At\r\n \r\n \r\n {{ value | date}}\r\n \r\n \r\n
    \r\n
    \r\n" /***/ }), /***/ "./src/app/modules/payment/components/paymentrequests/paymentrequests.component.ts": /*!*****************************************************************************************!*\ !*** ./src/app/modules/payment/components/paymentrequests/paymentrequests.component.ts ***! \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var PaymentsRequestForm_1 = __webpack_require__(/*! ../../model/PaymentsRequestForm */ "./src/app/modules/payment/model/PaymentsRequestForm.ts"); // import { PaymentRequestService } from '../../services/paymentRequestService'; var paymentRequestService_1 = __webpack_require__(/*! ../../service/paymentRequestService */ "./src/app/modules/payment/service/paymentRequestService.ts"); var workersService_1 = __webpack_require__(/*! src/app/modules/workers/service/workersService */ "./src/app/modules/workers/service/workersService.ts"); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); // import { Page} from '../model/page'; // import { Page } from 'src/app/submissionFile/model/pageSubmissionModel'; var pageSubmissionModel_1 = __webpack_require__(/*! src/app/modules/sprints/components/submissionFile/model/pageSubmissionModel */ "./src/app/modules/sprints/components/submissionFile/model/pageSubmissionModel.ts"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var PaymentRequestsComponent = /** @class */ (function () { function PaymentRequestsComponent(workerService, paymentRequestService, toastr) { this.workerService = workerService; this.paymentRequestService = paymentRequestService; this.toastr = toastr; this.page = new pageSubmissionModel_1.Page(); this.selected = []; this.message = ''; this.range = "0"; this.search = ''; this.expanded = {}; this.status = null; this.newstatus = 0; this.from = null; this.to = null; this.rows = []; this.temp = []; this.loadingIndicator = true; this.reorderable = true; this.email = null; this.loading = true; this.sortcolumn = 'id'; this.sortorder = 'desc'; this.name = null; this.phone = null; this.agel = null; this.ageg = null; this.userid = null; this.country = null; this.workertype = null; this.city = null; this.showAdvanced = false; this.nationalityid = null; this.device = null; this.userInfo = []; this.page.pageNumber = 0; this.page.size = 100; } PaymentRequestsComponent.prototype.ngOnInit = function () { this.setPage({ offset: 0, size: 100 }, null, null); }; // end on init // filter() { // this.userInfo = JSON.parse(localStorage.getItem('todoitems')); // this.paymentRequestService.getResult(this.page, this.email, (this.status == -1 ? null : this.status), // this.from, this.to).then(pagedData => { // this.page = pagedData.page; // this.rows = pagedData.data; // this.loadingIndicator = false; // }); // } PaymentRequestsComponent.prototype.filter = function () { this.selected = []; this.setPage({ offset: 0, size: this.page.size }, this.status, this.search); // this.page.size = this.page.size; // this.page.pageNumber = this.page.pageNumber; // this.workerService.getFullSearch(this.page, this.search, this.name, this.email , this.phone, this.nationalityid, // // tslint:disable-next-line:max-line-length // this.country, this.city, this.userid, this.status, this.agel, this.ageg, this.workertype, this.sortcolumn, this.sortorder, this.device).then(pagedData => { // this.page = pagedData.page; // this.rows = pagedData.data; // this.loading = false; // this.loadingIndicator = false; // }); }; PaymentRequestsComponent.prototype.toggleExpandRow = function (row) { console.log('Toggled Expand Row!', row); this.table.rowDetail.toggleExpandRow(row); }; PaymentRequestsComponent.prototype.onDetailToggle = function (event) { console.log('Detail Toggled', event); }; PaymentRequestsComponent.prototype.getStatus = function (status) { if (status === 0) return 'Requested'; if (status === 1) return 'Approved'; if (status === 2) return 'Rejected'; if (status === 3) return 'Paid'; return '-'; }; PaymentRequestsComponent.prototype.setDateRange = function () { var dt = new Date(); var month = dt.getMonth(), year = dt.getFullYear(); if (this.range === "0") this.from = new Date(year, month, 1); if (this.range === "0") this.to = new Date(year, month + 1, 0); if (this.range === "1") this.from = new Date(year, month - 1, 1); if (this.range === "1") this.to = new Date(year, month + 1, 0); if (this.range === "2") this.from = new Date(year, month - 3, 1); if (this.range === "2") this.to = new Date(year, month + 1, 0); if (this.range === "3") this.from = new Date(year, 1, 1); if (this.range === "3") this.to = new Date(year + 1, 1, 0); this.filter(); }; PaymentRequestsComponent.prototype.postForm = function () { var _this = this; var ids = []; this.selected.map(function (s) { return ids.push(s.id); }); var user_id = localStorage.getItem("admin_id"); var form = new PaymentsRequestForm_1.BulkEvaluation(ids, this.newstatus, this.message, Number(user_id), null); this.paymentRequestService.savePaymentRequestForm(form).then(function (d) { _this.toastr.success('Operation Completed Successfully!'); _this.setPage({ offset: 0, size: 100 }, null, null); _this.selected = []; // this.filter(); }); }; PaymentRequestsComponent.prototype.onSelect = function (_a) { var selected = _a.selected; console.log('Select Event', selected, this.selected); // this.selected = []; // this.selected.splice(0, this.selected.length); this.selected = selected; }; PaymentRequestsComponent.prototype.onActivate = function (event) { // console.log('Activate Event', event); }; PaymentRequestsComponent.prototype.setPage = function (pageInfo, status, keyword) { var _this = this; console.log(pageInfo); this.page.size = pageInfo.size; this.page.pageNumber = pageInfo.offset; if (keyword == "") { keyword = null; } console.log("keyword", keyword); console.log("status", status); this.paymentRequestService.getResult(this.page, this.email, status, this.from, this.to, keyword).then(function (pagedData) { console.log("response data ==>", pagedData); _this.page = pagedData.page; _this.rows = pagedData.data; console.log(_this.rows); _this.loadingIndicator = false; }); }; PaymentRequestsComponent.prototype.updateFilter = function (event) { var val = event.target.value.toLowerCase(); // filter our data var temp = this.temp.filter(function (d) { return d.name.toLowerCase().indexOf(val) !== -1 || !val; }); // update the rows this.rows = temp; }; __decorate([ core_1.ViewChild('myTable'), __metadata("design:type", Object) ], PaymentRequestsComponent.prototype, "table", void 0); PaymentRequestsComponent = __decorate([ core_1.Component({ selector: 'app-paymentrequests', template: __webpack_require__(/*! ./paymentrequests.component.html */ "./src/app/modules/payment/components/paymentrequests/paymentrequests.component.html"), styles: [__webpack_require__(/*! ./paymentrequests.component.css */ "./src/app/modules/payment/components/paymentrequests/paymentrequests.component.css")] }), __metadata("design:paramtypes", [workersService_1.WorkersService, paymentRequestService_1.PaymentsRequestService, ngx_toastr_1.ToastrService]) ], PaymentRequestsComponent); return PaymentRequestsComponent; }()); exports.PaymentRequestsComponent = PaymentRequestsComponent; /***/ }), /***/ "./src/app/modules/payment/model/PaymentsRequestForm.ts": /*!**************************************************************!*\ !*** ./src/app/modules/payment/model/PaymentsRequestForm.ts ***! \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var BulkEvaluation = /** @class */ (function () { function BulkEvaluation(Ids, status, message, userId, rewardId) { this.Ids = Ids; this.status = status; this.message = message; this.userId = userId; this.rewardId = rewardId; } return BulkEvaluation; }()); exports.BulkEvaluation = BulkEvaluation; /***/ }), /***/ "./src/app/modules/payment/payment-routing.module.ts": /*!***********************************************************!*\ !*** ./src/app/modules/payment/payment-routing.module.ts ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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; }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var auth_guard_1 = __webpack_require__(/*! ../../auth/auth.guard */ "./src/app/auth/auth.guard.ts"); var paymentrequests_component_1 = __webpack_require__(/*! ./components/paymentrequests/paymentrequests.component */ "./src/app/modules/payment/components/paymentrequests/paymentrequests.component.ts"); var routes = [ { path: '', component: paymentrequests_component_1.PaymentRequestsComponent, data: { returnUrl: window.location.pathname }, canActivate: [auth_guard_1.AuthGuard] }, { path: '', redirectTo: 'paymentrequests', pathMatch: 'full' }, { path: '**', redirectTo: '//paymentrequests', pathMatch: 'full' }, ]; var PaymentRoutingModule = /** @class */ (function () { function PaymentRoutingModule() { } PaymentRoutingModule = __decorate([ core_1.NgModule({ imports: [router_1.RouterModule.forChild(routes)], exports: [router_1.RouterModule] }) ], PaymentRoutingModule); return PaymentRoutingModule; }()); exports.PaymentRoutingModule = PaymentRoutingModule; /***/ }), /***/ "./src/app/modules/payment/payment.module.ts": /*!***************************************************!*\ !*** ./src/app/modules/payment/payment.module.ts ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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; }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var common_1 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); var forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js"); var http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); var ngx_select_ex_1 = __webpack_require__(/*! ngx-select-ex */ "./node_modules/ngx-select-ex/fesm5/ngx-select-ex.js"); var ngx_uploader_1 = __webpack_require__(/*! ngx-uploader */ "./node_modules/ngx-uploader/fesm5/ngx-uploader.js"); var ngx_datatable_1 = __webpack_require__(/*! @swimlane/ngx-datatable */ "./node_modules/@swimlane/ngx-datatable/release/index.js"); var ngx_csv_1 = __webpack_require__(/*! @ctrl/ngx-csv */ "./node_modules/@ctrl/ngx-csv/fesm5/ctrl-ngx-csv.js"); var aws_amplify_angular_1 = __webpack_require__(/*! aws-amplify-angular */ "./node_modules/aws-amplify-angular/dist/index.js"); var core_2 = __webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js"); var ng_pick_datetime_1 = __webpack_require__(/*! ng-pick-datetime */ "./node_modules/ng-pick-datetime/picker.js"); var ngx_quill_1 = __webpack_require__(/*! ngx-quill */ "./node_modules/ngx-quill/fesm5/ngx-quill.js"); var ng5_slider_1 = __webpack_require__(/*! ng5-slider */ "./node_modules/ng5-slider/esm5/ng5-slider.js"); var core_3 = __webpack_require__(/*! @agm/core */ "./node_modules/@agm/core/index.js"); var ngx_sortable_1 = __webpack_require__(/*! ngx-sortable */ "./node_modules/ngx-sortable/dist/index.js"); var common_2 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); // import { PaymentRequestsComponent } from './components/paymentrequests/paymentrequests.component'; var paymentrequests_component_1 = __webpack_require__(/*! ./components/paymentrequests/paymentrequests.component */ "./src/app/modules/payment/components/paymentrequests/paymentrequests.component.ts"); var payment_routing_module_1 = __webpack_require__(/*! ./payment-routing.module */ "./src/app/modules/payment/payment-routing.module.ts"); var PaymentModule = /** @class */ (function () { function PaymentModule() { } PaymentModule = __decorate([ core_1.NgModule({ imports: [ common_1.CommonModule, forms_1.ReactiveFormsModule, forms_1.FormsModule, http_1.HttpClientModule, ngx_datatable_1.NgxDatatableModule, ngx_select_ex_1.NgxSelectModule, ngx_uploader_1.NgxUploaderModule, ngx_csv_1.CsvModule, ngx_quill_1.QuillModule, ng_pick_datetime_1.OwlDateTimeModule, ng_pick_datetime_1.OwlNativeDateTimeModule, ng5_slider_1.Ng5SliderModule, aws_amplify_angular_1.AmplifyAngularModule, core_2.TranslateModule, ngx_sortable_1.NgxSortableModule, core_3.AgmCoreModule.forRoot({ apiKey: "AIzaSyDa1UayxKz_79DUT2nmE2wHAuBwGdZVL3Y", // apiKey: 'AIzaSyDP8ctBV6hZ-3zSmr7enXzQTHn5jFd_guc', libraries: ["drawing"], }), payment_routing_module_1.PaymentRoutingModule, ], declarations: [paymentrequests_component_1.PaymentRequestsComponent], providers: [ aws_amplify_angular_1.AmplifyService, // AuthService, // AuthGuard, // WorkerService, // AccountService, // ProjectService, // PaymentRequestService, // SubmissionService, common_2.DatePipe, ], exports: [paymentrequests_component_1.PaymentRequestsComponent], }) ], PaymentModule); return PaymentModule; }()); exports.PaymentModule = PaymentModule; /***/ }), /***/ "./src/app/modules/payment/service/paymentRequestService.ts": /*!******************************************************************!*\ !*** ./src/app/modules/payment/service/paymentRequestService.ts ***! \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js"); var paged_data_1 = __webpack_require__(/*! src/app/model/paged-data */ "./src/app/model/paged-data.ts"); var aws_amplify_1 = __webpack_require__(/*! aws-amplify */ "./node_modules/aws-amplify/lib/index.js"); var auth_service_1 = __webpack_require__(/*! src/app/auth/auth.service */ "./src/app/auth/auth.service.ts"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); /** * A server used to mock a paged data result from a server */ var PaymentsRequestService = /** @class */ (function () { function PaymentsRequestService(auth, toastr) { this.auth = auth; this.toastr = toastr; } /** * A method that mocks a paged server response * @param page The selected page * @returns {any} An observable containing the employee data */ PaymentsRequestService.prototype.getResults = function (page, search) { return rxjs_1.of(this.getPagedData(page, search)); }; PaymentsRequestService.prototype.getResult = function (page, email, status, from, to, keyword) { var _this = this; var pagedData = new paged_data_1.PagedData(); var apiName = 'api_node_1'; var s = status ? '&status=' + status : ''; if (page.size === null || page.size === undefined) page.size = 100; var path; if (status == null && keyword == null) { path = "paymentrequests?limit=" + page.size + "&offset=" + page.pageNumber * page.size; } else if (status != null && keyword != null) { keyword = keyword.toString(); path = "paymentrequests?limit=" + page.size + "&offset=" + page.pageNumber * page.size + "&status=" + status + "&keyword=" + keyword; } else if (status != null && keyword == null) { path = "paymentrequests?limit=" + page.size + "&offset=" + page.pageNumber * page.size + "&status=" + status; } else if (status == null && keyword != null) { keyword = keyword + ""; console.log(keyword); path = "paymentrequests?limit=" + page.size + "&offset=" + page.pageNumber * page.size + "&keyword=" + keyword; } var myInit = { headers: {}, response: true, queryStringParameters: {} }; var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { if (response.data.response_code == 200) { var data = response.data.data.data; console.log('data=>', data); page.totalElements = response.data.data.count; page.totalPages = page.totalElements / page.size; var start = page.pageNumber * page.size; var end = Math.min((start + page.size), page.totalElements); pagedData.page = page; pagedData.data = data; resolve(pagedData); } else { return _this.toastr.error(response.data.message); } }) .catch(function (error) { _this.toastr.error('Error in invoiking API:' + error); reject(error); }); }); // end promoise return promise; }; // end getresult PaymentsRequestService.prototype.savePaymentRequestForm = function (form) { var apiName = 'api_node_1'; var path = "paymentrequests"; var myInit = { body: form, headers: {} }; var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.put(apiName, path, myInit) .then(function (response) { var data = response.data; resolve('OK'); }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; /** * Package PaymentRequestItem into a PagedData object based on the selected Page * @param page The page data used to get the selected data from PaymentRequestItem * @returns {PagedData} An array of the selected data and page */ PaymentsRequestService.prototype.getPagedData = function (page, search) { var pagedData = new paged_data_1.PagedData(); var apiName = 'api_node_1'; var path = "paymentrequests?email=" + search + "&limit=" + page.size + "&offsert=" + page.pageNumber * page.size; var myInit = { headers: {}, response: true, queryStringParameters: {} }; aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { var data = response.data; page.totalElements = data.count; page.totalPages = page.totalElements / page.size; var start = page.pageNumber * page.size; var end = Math.min((start + page.size), page.totalElements); pagedData.data = data.data; }) .catch(function (error) { console.log('Error in invoiking API:' + error); }); pagedData.page = page; return pagedData; }; PaymentsRequestService = __decorate([ core_1.Injectable({ providedIn: "root" }), __metadata("design:paramtypes", [auth_service_1.AuthService, ngx_toastr_1.ToastrService]) ], PaymentsRequestService); return PaymentsRequestService; }()); exports.PaymentsRequestService = PaymentsRequestService; /***/ }), /***/ "./src/app/modules/payments/components/payments/payments.component.css": /*!*****************************************************************************!*\ !*** ./src/app/modules/payments/components/payments/payments.component.css ***! \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "agm-map {\r\n\theight: 300px;\r\n}\r\n\r\n.eye-icon {\r\n\tfont-size: 1.5rem;\r\n\tmargin: 0;\r\n}\r\n\r\n.table-container {\r\n\t/* max-width: fit-content; */\r\n\tmax-height: -webkit-fit-content;\r\n\tmax-height: -moz-fit-content;\r\n\tmax-height: fit-content;\r\n}\r\n\r\n.table-responsive {\r\n\theight: -webkit-fit-content;\r\n\theight: -moz-fit-content;\r\n\theight: fit-content;\r\n\toverflow: auto;\r\n\tmax-height: 65vh;\r\n}\r\n\r\n.fixed-table-head {\r\n\t/* min-width: max-content; */\r\n\twhite-space: nowrap;\r\n\theight: 100px !important;\r\n\tborder-collapse: collapse;\r\n}\r\n\r\n.fixed-table-head thead tr th,\r\n.fixed-table-head tbody tr td:first-child {\r\n\tposition: -webkit-sticky;\r\n\tposition: sticky;\r\n\tbackground-color: #fff;\r\n\tborder: 1px solid #dee2e6;\r\n}\r\n\r\n.fixed-table-head thead tr th {\r\n\ttop: 0;\r\n\tz-index: 2;\r\n}\r\n\r\n.fixed-table-head tbody tr td:first-child {\r\n\tz-index: 1;\r\n\tleft: 0;\r\n}\r\n\r\n.fixed-table-head tbody tr td,\r\n.fixed-table-head thead tr th {\r\n\ttext-align: center;\r\n\tvertical-align: center;\r\n}\r\n\r\n.fixed-table-head tbody tr td {\r\n\tvertical-align: middle !important;\r\n}\r\n" /***/ }), /***/ "./src/app/modules/payments/components/payments/payments.component.html": /*!******************************************************************************!*\ !*** ./src/app/modules/payments/components/payments/payments.component.html ***! \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\n\t
    \r\n\t\t

    Payments Report

    \r\n\t
    \r\n\r\n\t
    \r\n\t\t \r\n\t\t\r\n\t\t\t 0\"\r\n\t\t\t\t[data]=\"csvData\"\r\n\t\t\t\tstyle=\"color: white\"\r\n\t\t\t\t>\r\n\t\t\r\n\t
    \r\n\r\n\t
    \r\n\t\t\r\n\t\t\r\n\t\t\tSearch\r\n\t\t\r\n\t
    \r\n\r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{{ limit }} Records\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t\tFilter\r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t
    \r\n\t
    \r\n
    \r\n\r\n 0 && headers && headers.length > 0\">\r\n\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{{ header }}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{{ d[header] }}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t
    \r\n\t
    \r\n\t limit\"\r\n\t\t>
    \r\n\t\t\t\r\n\r\n" /***/ }), /***/ "./src/app/modules/payments/components/payments/payments.component.ts": /*!****************************************************************************!*\ !*** ./src/app/modules/payments/components/payments/payments.component.ts ***! \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var payment_service_1 = __webpack_require__(/*! ../../services/payment.service */ "./src/app/modules/payments/services/payment.service.ts"); var PaymentsComponent = /** @class */ (function () { function PaymentsComponent(paymentService, toastr, http) { this.paymentService = paymentService; this.toastr = toastr; this.http = http; this.difference = 90; this.from = new Date(Date.now() - this.difference * 24 * 60 * 60 * 1000); this.to = new Date(); this.maxDate = new Date(); this.data = null; this.headers = []; this.isDisabled = false; this.limit = 200; this.offset = 0; this.size = 0; this.range = 9; this.limits = []; this.csvData = []; this.searchQuery = ""; } PaymentsComponent.prototype.ngOnInit = function () { this.limits = this.generateNnumbersOfArrayWithDefineMultiple(5, 200); this.getAllData(); }; PaymentsComponent.prototype.search = function (searchValue) { this.searchQuery = searchValue; this.offset = 1; this.getAllData(); }; PaymentsComponent.prototype.rerender = function () { this.outletRef.clear(); this.outletRef.createEmbeddedView(this.contentRef); }; PaymentsComponent.prototype.getAllData = function () { var _this = this; var page = Math.floor(this.offset / this.limit); page = page + 1; console.log({ limit: this.limit, page: page, searchQuery: this.searchQuery.trim(), from: this.dateFormatter(this.from), to: this.dateFormatter(this.to), }); // this.paymentService // .getAllUsersAndSprintsData( // encodeURIComponent(this.searchQuery.trim()), // this.limit, // page, // this.dateFormatter(this.from), // this.dateFormatter(this.to) // ) // .then((res) => { // if (Object.keys(res).length > 0) { // this.setInitialData(res); // this.toastr.success(`Data fetched successfully!`); // } // }) // .catch((error) => { // this.toastr.error(`Error while making api call: ${error}`); // }); this.http.get("assets/payments.json").subscribe(function (res) { _this.setInitialData(res); }); }; PaymentsComponent.prototype.setInitialData = function (res) { var _this = this; this.data = res; this.headers = Object.keys(this.data[0]); this.data = this.data.slice(0, 500); this.size = this.data.length; if (this.data !== null) { this.csvData = []; this.csvData.push(this.headers); this.data.map(function (d) { _this.csvData.push(Object.values(d)); }); } this.rerender(); }; PaymentsComponent.prototype.answersJoinOrNot = function (question, type) { if (question.length > 0) { return question.map(function (ques) { return ques[type]; }).join(", "); } else { return question[type]; } }; PaymentsComponent.prototype.onPageChange = function (offset) { this.offset = offset; this.getAllData(); }; PaymentsComponent.prototype.filter = function () { this.offset = 1; this.getAllData(); }; PaymentsComponent.prototype.handleRecordsPerPage = function (limit) { this.offset = 1; this.limit = limit; this.getAllData(); }; PaymentsComponent.prototype.generateNnumbersOfArrayWithDefineMultiple = function (range, multiple) { return Array.from(Array(range).keys()).map(function (item) { item = item + 1; return multiple * item; }); }; PaymentsComponent.prototype.onDateChange = function (event, startOrEnd) { function datediff(first, second) { return Math.round((second - first) / (1000 * 60 * 60 * 24)); } function parseDate(str) { var date = str.split("/"); return new Date(date[2], date[0] - 1, date[1]); } if (startOrEnd === "start") { this.from = event; } else { this.to = event; } var difference = datediff(parseDate(this.from.toLocaleDateString()), parseDate(this.to.toLocaleDateString())); // if (difference > this.difference) { // this.isDisabled = true; // this.toastr.warning( // `You select ${difference} days please select date range between or exact ${this.difference} days!` // ); // } if (new Date(this.from) > new Date(this.to)) { this.isDisabled = true; this.toastr.warning("End date must be greater than start date!"); } else { this.isDisabled = false; } }; PaymentsComponent.prototype.dateFormatter = function (date) { if (date) { return date .toISOString() .split("T") .map(function (d, i) { return i === date.toISOString().split("T").length - 1 ? d.slice(0, -1) : d; }) .join(" "); } }; __decorate([ core_1.ViewChild("outlet", { read: core_1.ViewContainerRef }), __metadata("design:type", core_1.ViewContainerRef) ], PaymentsComponent.prototype, "outletRef", void 0); __decorate([ core_1.ViewChild("content", { read: core_1.TemplateRef }), __metadata("design:type", core_1.TemplateRef) ], PaymentsComponent.prototype, "contentRef", void 0); PaymentsComponent = __decorate([ core_1.Component({ selector: "app-payments", template: __webpack_require__(/*! ./payments.component.html */ "./src/app/modules/payments/components/payments/payments.component.html"), styles: [__webpack_require__(/*! ./payments.component.css */ "./src/app/modules/payments/components/payments/payments.component.css")], }), __metadata("design:paramtypes", [payment_service_1.PaymentService, ngx_toastr_1.ToastrService, http_1.HttpClient]) ], PaymentsComponent); return PaymentsComponent; }()); exports.PaymentsComponent = PaymentsComponent; /***/ }), /***/ "./src/app/modules/payments/payments-routing.module.ts": /*!*************************************************************!*\ !*** ./src/app/modules/payments/payments-routing.module.ts ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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; }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var auth_guard_1 = __webpack_require__(/*! src/app/auth/auth.guard */ "./src/app/auth/auth.guard.ts"); var payments_component_1 = __webpack_require__(/*! ./components/payments/payments.component */ "./src/app/modules/payments/components/payments/payments.component.ts"); var routes = [ { path: "", component: payments_component_1.PaymentsComponent, canActivate: [auth_guard_1.AuthGuard], }, ]; var PaymentsRoutingModule = /** @class */ (function () { function PaymentsRoutingModule() { } PaymentsRoutingModule = __decorate([ core_1.NgModule({ imports: [router_1.RouterModule.forChild(routes)], exports: [router_1.RouterModule], }) ], PaymentsRoutingModule); return PaymentsRoutingModule; }()); exports.PaymentsRoutingModule = PaymentsRoutingModule; /***/ }), /***/ "./src/app/modules/payments/payments.module.ts": /*!*****************************************************!*\ !*** ./src/app/modules/payments/payments.module.ts ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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; }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @agm/core */ "./node_modules/@agm/core/index.js"); var common_1 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); var http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); var core_2 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js"); var ngx_csv_1 = __webpack_require__(/*! @ctrl/ngx-csv */ "./node_modules/@ctrl/ngx-csv/fesm5/ctrl-ngx-csv.js"); var ngx_datatable_1 = __webpack_require__(/*! @swimlane/ngx-datatable */ "./node_modules/@swimlane/ngx-datatable/release/index.js"); var ng_pick_datetime_1 = __webpack_require__(/*! ng-pick-datetime */ "./node_modules/ng-pick-datetime/picker.js"); var ngx_quill_1 = __webpack_require__(/*! ngx-quill */ "./node_modules/ngx-quill/fesm5/ngx-quill.js"); var shared_module_1 = __webpack_require__(/*! ./../../shared/shared.module */ "./src/app/shared/shared.module.ts"); var payments_component_1 = __webpack_require__(/*! ./components/payments/payments.component */ "./src/app/modules/payments/components/payments/payments.component.ts"); var payments_routing_module_1 = __webpack_require__(/*! ./payments-routing.module */ "./src/app/modules/payments/payments-routing.module.ts"); var PaymentsModule = /** @class */ (function () { function PaymentsModule() { } PaymentsModule = __decorate([ core_2.NgModule({ imports: [ common_1.CommonModule, forms_1.FormsModule, payments_routing_module_1.PaymentsRoutingModule, shared_module_1.SharedModule, ngx_datatable_1.NgxDatatableModule, http_1.HttpClientModule, ngx_csv_1.CsvModule, ngx_quill_1.QuillModule, ng_pick_datetime_1.OwlDateTimeModule, ng_pick_datetime_1.OwlNativeDateTimeModule, core_1.AgmCoreModule.forRoot({ apiKey: "AIzaSyDa1UayxKz_79DUT2nmE2wHAuBwGdZVL3Y", // apiKey: "AIzaSyDP8ctBV6hZ-3zSmr7enXzQTHn5jFd_guc", libraries: ["drawing"], }), ], declarations: [payments_component_1.PaymentsComponent], exports: [payments_component_1.PaymentsComponent], }) ], PaymentsModule); return PaymentsModule; }()); exports.PaymentsModule = PaymentsModule; /***/ }), /***/ "./src/app/modules/payments/services/payment.service.ts": /*!**************************************************************!*\ !*** ./src/app/modules/payments/services/payment.service.ts ***! \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var core_2 = __webpack_require__(/*! @ngx-loading-bar/core */ "./node_modules/@ngx-loading-bar/core/fesm5/ngx-loading-bar-core.js"); var aws_amplify_1 = __webpack_require__(/*! aws-amplify */ "./node_modules/aws-amplify/lib/index.js"); var PaymentService = /** @class */ (function () { function PaymentService(loader) { this.loader = loader; } PaymentService.prototype.getAllUsersAndSprintsData = function (search, limit, page, startDate, endDate) { var _this = this; var apiName = "api_node_2"; var path = "combineddata/?search=" + (search ? search : "") + "&limit=" + limit + "&page=" + page + "&startDate=" + startDate + "&endDate=" + endDate; console.log({ limit: limit, page: page }); var myInit = { headers: {}, response: true, queryStringParameters: {}, }; var promise = new Promise(function (resolve, reject) { _this.loader.start(); aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { _this.loader.complete(); resolve(response.data.data); }) .catch(function (error) { _this.loader.complete(); console.log("Error in invoiking API:" + error); reject(error); }); }); return promise; }; PaymentService = __decorate([ core_1.Injectable({ providedIn: "root", }), __metadata("design:paramtypes", [core_2.LoadingBarService]) ], PaymentService); return PaymentService; }()); exports.PaymentService = PaymentService; /***/ }), /***/ "./src/app/modules/sprints/components/question/options-tag/options-tag.component.css": /*!*******************************************************************************************!*\ !*** ./src/app/modules/sprints/components/question/options-tag/options-tag.component.css ***! \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "input[type='checkbox'] {\r\n outline: none;\r\n border: none;\r\n}\r\n\r\ninput[type='checkbox']:focus {\r\n outline: none;\r\n box-shadow: none;\r\n}\r\n\r\ninput::-webkit-outer-spin-button,\r\ninput::-webkit-inner-spin-button {\r\n -webkit-appearance: none;\r\n margin: 0;\r\n}\r\n\r\n/* Firefox */\r\n\r\ninput[type=number] {\r\n -moz-appearance: textfield;\r\n}\r\n" /***/ }), /***/ "./src/app/modules/sprints/components/question/options-tag/options-tag.component.html": /*!********************************************************************************************!*\ !*** ./src/app/modules/sprints/components/question/options-tag/options-tag.component.html ***! \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\n\t
    \r\n\t\t
    \r\n\t\t\t
    Tags
    \r\n\t\t
    \r\n\t
    \r\n\t\r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\r\n\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\r\n\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\r\n\t\t\t
    \r\n\t\t
    \r\n\t
    \r\n
    \r\n" /***/ }), /***/ "./src/app/modules/sprints/components/question/options-tag/options-tag.component.ts": /*!******************************************************************************************!*\ !*** ./src/app/modules/sprints/components/question/options-tag/options-tag.component.ts ***! \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var OptionsTagComponent = /** @class */ (function () { function OptionsTagComponent(toastr) { this.toastr = toastr; this.valueChange = new core_1.EventEmitter(); } Object.defineProperty(OptionsTagComponent.prototype, "optionModel", { set: function (value) { this.questionOption = value; }, enumerable: true, configurable: true }); Object.defineProperty(OptionsTagComponent.prototype, "sprintTag", { set: function (value) { this.sprintTagList = value; }, enumerable: true, configurable: true }); OptionsTagComponent.prototype.ngOnInit = function () { }; OptionsTagComponent.prototype.handleTag = function (event, tagIndex) { var id = event[0].value; console.log(event); console.log(id); console.log(event[0]); console.log(tagIndex); var is_tag = false; this.questionOption.forEach(function (elementOpt, index) { console.log(elementOpt.tag_id, id); console.log(index, tagIndex); if (elementOpt.tag_id == id && index != tagIndex) { is_tag = true; } }); if (is_tag) { event[0].value = null; event[0].text = "Select Tag"; console.log(this.questionOption[tagIndex]); this.toastr.error("Tag selection must be unique"); } this.valueChange.emit(this.questionOption); return true; }; __decorate([ core_1.Output("TagOptionSaved"), __metadata("design:type", core_1.EventEmitter) ], OptionsTagComponent.prototype, "valueChange", void 0); __decorate([ core_1.Input("QuestionOptions"), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], OptionsTagComponent.prototype, "optionModel", null); __decorate([ core_1.Input("TagList"), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], OptionsTagComponent.prototype, "sprintTag", null); OptionsTagComponent = __decorate([ core_1.Component({ selector: "app-options-tag", template: __webpack_require__(/*! ./options-tag.component.html */ "./src/app/modules/sprints/components/question/options-tag/options-tag.component.html"), styles: [__webpack_require__(/*! ./options-tag.component.css */ "./src/app/modules/sprints/components/question/options-tag/options-tag.component.css")], }), __metadata("design:paramtypes", [ngx_toastr_1.ToastrService]) ], OptionsTagComponent); return OptionsTagComponent; }()); exports.OptionsTagComponent = OptionsTagComponent; /***/ }), /***/ "./src/app/modules/sprints/components/question/question.component.css": /*!****************************************************************************!*\ !*** ./src/app/modules/sprints/components/question/question.component.css ***! \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "input[type='checkbox'] {\r\n outline: none;\r\n border: none;\r\n}\r\n\r\ninput[type='checkbox']:focus {\r\n outline: none;\r\n box-shadow: none;\r\n}\r\n\r\ninput::-webkit-outer-spin-button,\r\ninput::-webkit-inner-spin-button {\r\n -webkit-appearance: none;\r\n margin: 0;\r\n}\r\n\r\n/* Firefox */\r\n\r\ninput[type=number] {\r\n -moz-appearance: textfield;\r\n}" /***/ }), /***/ "./src/app/modules/sprints/components/question/question.component.html": /*!*****************************************************************************!*\ !*** ./src/app/modules/sprints/components/question/question.component.html ***! \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\n\t\r\n\t
    \r\n\t\t
    \r\n\t\t\t{{ _model.id }}\r\n\t\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t  \r\n\t\t\t\r\n\t\t\t\t Close\r\n\t\t\t\r\n\t\t\t  \r\n\t\t\t\r\n\t\t\t\t Delete\r\n\t\t\t\r\n\t\t\t  \r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tSave\r\n\t\t\t\r\n\t\t
    \r\n\t
    \r\n\r\n\t\r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t
    \r\n\r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t
    \r\n\t
    \r\n\r\n\t\r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t   \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t
    \r\n\t
    \r\n\r\n\t\r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t\r\n\t\r\n\r\n\t\r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t
    \r\n\t
    \r\n\t\r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t
    \r\n\t
    \r\n\t\r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t
    \r\n\t
    \r\n\t\r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t
    \r\n\t
    \r\n\r\n\t\r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    Bulk Options
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t
    \r\n\t
    \r\n\r\n\t\r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    Options
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  Add\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\tSave Option\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t\t\r\n\t\t\t\t
    Options Not Defined Yet!
    \r\n\t\t\t
    \r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t*\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t{{ x.label }}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\tVisibilty\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tChoose Image\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tChange Image\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n\t\r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    Options
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\tSave Option\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    Rows
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  Add\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\r\n\t\t\t\t
    Options Not Defined Yet!
    \r\n\t\t\t
    \r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t*\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\tRandom\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\tMultiSelect\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\tRequired\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    Min
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t{{ ii + 1 }}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    Max
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t{{ ii + 1 }}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    Columns
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  Add\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\r\n\t\t\t\t
    Options Not Defined Yet!
    \r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t*\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\tRandom\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\tMultiSelect\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\tRequired\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    Min
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t{{ ii + 1 }}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    Max
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t{{ ii + 1 }}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n\t\r\n\t\r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    Options
    \r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    Validations:
    \r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tMinimum Input\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tMinimum Value\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tMaximum Input\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tMaximum Value\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\r\n\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    Required Input Fields:
    \r\n\t\t\t\t
    \r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\tMinimum Field\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\tMaximum Field\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t 1 ||\r\n\t\t\t\t\t\t\t\t\t\tmaxfieldNumeric.pristine\r\n\t\t\t\t\t\t\t\t\t\"\r\n\t\t\t\t\t\t\t\t\tclass=\"alert alert-danger\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\tValue must greater than 1.\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n\t\r\n\t\r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    Conditions
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    Jump
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  Add\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\r\n\t\t\t\t
    Options Not Defined Yet!
    \r\n\t\t\t
    \r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    1\">\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\tJump To\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t{{ x.label }}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\r\n\r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    Terminate
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  Add\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\r\n\t\t\t\t
    Options Not Defined Yet!
    \r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    1\">\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{{ ii + 1 }}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{{ ii + 1 }}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n\t\r\n\r\n\t\r\n\r\n\t\r\n\r\n\t\r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    Required Options
    \r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\r\n\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{{ ii + 1 }}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{{ ii + 1 }}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t
    \r\n\t\r\n\r\n\t\r\n\r\n\t\r\n\t\r\n\t\r\n\r\n\t\r\n\r\n\t\r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    Conditions
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    Jump
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  Add\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\r\n\t\t\t\t
    Options Not Defined Yet!
    \r\n\t\t\t
    \r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    1\">\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\tJump To\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\r\n\r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    Terminate
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  Add\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\r\n\t\t\t\t
    Options Not Defined Yet!
    \r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{{ value.name }}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t 1\r\n\t\t\t\t\t\t\t\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{{ ii + 1 }}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{{ ii + 1 }}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n\t\r\n\r\n\t\r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    Conditions
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    Jump
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  Add\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\r\n\t\t\t\t
    Options Not Defined Yet!
    \r\n\t\t\t
    \r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    1\">\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\tJump To\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t{{ x.label }}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t  Condition\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    Terminate
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  Add\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\r\n\t\t\t\t
    Options Not Defined Yet!
    \r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    1\">\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t\t 1\r\n\t\t\t\t\t\t\t\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{{ ii + 1 }}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t 1\r\n\t\t\t\t\t\t\t\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{{ ii + 1 }}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t  Condition\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n\t\r\n\r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    Files Upload Validation
    \r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\r\n\t\t\t\r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tLimit\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tMB\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tSEC\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\r\n\t\t
    \r\n\t\r\n\r\n\t\r\n\r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    Pre Conditions
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  Add\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\r\n\t\t\t\r\n\t\t\t\t
    Options Not Defined Yet!
    \r\n\t\t\t
    \r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{{ x.label }}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    1\">\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n" /***/ }), /***/ "./src/app/modules/sprints/components/question/question.component.ts": /*!***************************************************************************!*\ !*** ./src/app/modules/sprints/components/question/question.component.ts ***! \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var google_services_1 = __webpack_require__(/*! src/app/services/google.services */ "./src/app/services/google.services.ts"); var projectService_1 = __webpack_require__(/*! src/app/services/projectService */ "./src/app/services/projectService.ts"); var sprintModel_1 = __webpack_require__(/*! ../../model/sprintModel */ "./src/app/modules/sprints/model/sprintModel.ts"); var sprintService_1 = __webpack_require__(/*! ../../service/sprintService */ "./src/app/modules/sprints/service/sprintService.ts"); var QuestionComponent = /** @class */ (function () { // tslint:disable-next-line:max-line-length function QuestionComponent(projectService, sprintService, _google, http, toastr) { this.projectService = projectService; this.sprintService = sprintService; this._google = _google; this.http = http; this.toastr = toastr; this.uploadUrlForQuestionImage = "https://bu0vboz957.execute-api.us-east-2.amazonaws.com/development/file?name="; this.uploadUrl = "https://bu0vboz957.execute-api.us-east-2.amazonaws.com/development/file?name="; this.bulkoptions = ""; this.loading = false; this._model = null; this.optionId = 0; this.minNumericVal = 1; this.maxNumericVal = 10; this.minfieldNumericVal = 1; this.maxfieldNumericVal = 10; this.requiredFieldLength = []; this.getMultiJump = []; this.getMultiTerminate = []; this.disableTypeCondition = false; this.parrentArray = []; this.preConditionArray = []; this.drilldownQuestions = []; this.sprintTagList = []; this._tags = []; this.sprintParentTagList = []; this.select_deselect_Array = [ { id: "none", name: "none" }, { id: "All of the above", name: "All of the above" }, { id: "None of the above", name: "None of the above" }, ]; this.multi_loic_matrix = [ // {id: "none", name: "none"}, { id: "row_select", name: "Row Wise" }, { id: "column_select", name: "Column Wise" }, ]; this.question_category = [ { id: 0, name: "None" }, { id: 1, name: "Current Usage" }, { id: 2, name: "Tag" }, ]; this.valueChange = new core_1.EventEmitter(); this.googleObj = new google_services_1.GoogleObj(); this.result = ""; this.checkAllFieldsInput = false; this.getConditionArray = []; this.getMultiOptionArray = []; this.disablePreCondVal = []; this.disablePreCondValRule = []; this.getMultiConditionOptionArray = []; this.disableTypeCondition = false; } Object.defineProperty(QuestionComponent.prototype, "model", { get: function () { if (this._model === null || this._model === undefined) { this._model = { question_image: "", files: [], tags: [], name: "", task_form_id: 0, question_type: null, question_category: 0, is_visible_client: false, max_answer_points: 0, constraints: { is_required: false, limit: { type: sprintModel_1.Type.Character, min: 10 }, precondition: [], termination: [], jumps: [], validations: { minOpt: null, maxOpt: null }, logic_selection: "row_select", files: null, }, // description: '', id: 0, opts: [], row_names: [], column_names: [], jump_condition: null, terminate_condition: null, multiple_jump_condition: null, multiple_terminate_condition: null, label: null, labelar: null, position: 100, answer_points: 0, is_required: false, is_deleted: false, is_random: false, is_drilldown: false, is_drilldown_rowwise: false, is_drilldown_columnwise: false, is_spontaneous: false, is_cu_child: false, min_value: 0, max_value: 0, min_field_value: 0, max_field_value: 0, cu_parent_id: null, is_dd_child: false, dd_parent_id: 0, created_at: new Date(), updated_at: new Date(), is_tag_parent: false, is_tag_child: false, tag_condition: [], sprint_id: this.projectId, }; // tslint:disable-next-line:comment-format } //end if return this._model; }, set: function (value) { this._model = value; }, enumerable: true, configurable: true }); Object.defineProperty(QuestionComponent.prototype, "sprintID", { set: function (id) { this.projectId = id; }, enumerable: true, configurable: true }); Object.defineProperty(QuestionComponent.prototype, "setTag", { set: function (value) { this.sprintTagList = value; this._tags = value; }, enumerable: true, configurable: true }); QuestionComponent.prototype.translate = function () { var _this = this; if (this._model.label == null) { this._model.label = ""; } this.doTranslate(this._model.label).then(function (d) { _this._model.labelar = d.toString(); }); if (this.model.opts != null) { this.model.opts.forEach(function (element) { _this.doTranslate(element.label).then(function (d) { element.labelar = d.toString(); }); }); } if (this.model.row_names != null) { this.model.row_names.forEach(function (element) { _this.doTranslate(element.name).then(function (d) { element.name_ar = d.toString(); }); }); } if (this.model.column_names != null) { this.model.column_names.forEach(function (element) { _this.doTranslate(element.name).then(function (d) { element.name_ar = d.toString(); }); }); } }; QuestionComponent.prototype.doTranslate = function (key) { var _this = this; return new Promise(function (resolve, reject) { _this._google.translate(_this.googleObj, key).subscribe(function (res) { resolve(res.data.translations[0].translatedText); }, function (err) { console.log(err); reject(err); }); }); }; QuestionComponent.prototype.ngOnChanges = function (changes) { var _this = this; if (this.TaskForm != null) { if (this.sprintService.parentQuestionTagID) { this.getParentTagLists(this.sprintService.parentQuestionTagID); } if (this.TaskForm.questions != null) { if (this.TaskForm.questions.length != 0) { this.parrentArray = []; this.preConditionArray = []; this.drilldownQuestions = []; this.TaskForm.questions.forEach(function (elementQuestion) { if (elementQuestion.question_category == 1 && elementQuestion.is_cu_child == false && elementQuestion.position < _this.model.position) { _this.parrentArray.push(elementQuestion); } if (elementQuestion.question_type != 2 && elementQuestion.question_type != 3 && elementQuestion.question_type != 29) { if (elementQuestion.position < _this._model.position) { _this.preConditionArray.push(elementQuestion); if (elementQuestion.is_drilldown) { _this.drilldownQuestions.push(elementQuestion); } } } }); } } } if (this._model) { this.getConditionArray = []; if (this._model.row_names != null && this._model.column_names != null) { if (this._model.row_names.length > 0 && this._model.column_names.length > 0) { var count = this._model.row_names.length * this._model.column_names.length; this._model.row_names.forEach(function (elementRow) { if (!elementRow.is_deleted) { _this._model.column_names.forEach(function (elementColumn) { if (!elementColumn.is_deleted) { var name = elementRow.name + elementColumn.name; _this.getConditionArray.push({ name: name, }); } }); } }); } if (this._model.multiple_jump_condition != null && this._model.multiple_jump_condition != []) { if (this._model.multiple_jump_condition.length > 0) { this._model.multiple_jump_condition.forEach(function (element) { var arrayOpt = element.opt_array; var saveArray = []; for (var index = 0; index < arrayOpt.length; index++) { saveArray.push(arrayOpt[index].row_name + "__" + arrayOpt[index].column_name); } element.opt_array = saveArray; }); } } if (this._model.multiple_terminate_condition != null && this._model.multiple_terminate_condition != []) { if (this._model.multiple_terminate_condition.length > 0) { this._model.multiple_terminate_condition.forEach(function (element) { var arrayOpt = element.opt_array; var saveArray = []; for (var index = 0; index < arrayOpt.length; index++) { saveArray.push(arrayOpt[index].row_name + "__" + arrayOpt[index].column_name); } element.opt_array = saveArray; }); } } } this.disableTypeCondition = false; this.bulkoptions = ""; if (this._model.id != 0) { this.getMultiConditionOptionArray = []; this.disablePreCondValRule = []; this.getMultiOptionArray = []; this.disableTypeCondition = true; if (this._model.constraints.precondition != null && this._model.constraints.precondition != []) { if (this._model.constraints.precondition.length != 0) { var getAllQuestions = this.sprintService.getAllQuestions; this._model.constraints.precondition.forEach(function (precondition, indexPre) { var arrayOpt = []; var _loop_1 = function (index) { if (precondition.indexNo == getAllQuestions[index].id) { if (getAllQuestions[index] .question_type != 28) { getAllQuestions[index].opts.forEach(function (elementOpt) { if (!elementOpt.is_deleted) { arrayOpt.push(elementOpt.label); } }); } if (getAllQuestions[index] .question_type == 28) { getAllQuestions[index].row_names.forEach(function (elementRow) { if (!elementRow.is_deleted) { getAllQuestions[index].column_names.forEach(function (elementColumn) { if (!elementColumn.is_deleted) { arrayOpt.push(elementRow.name + elementColumn.name); } }); } }); } if (getAllQuestions[index] .question_type == 4) { _this.disablePreCondValRule[indexPre] = true; } } }; for (var index = 0; index < getAllQuestions.length; index++) { _loop_1(index); } _this.getMultiOptionArray[indexPre] = arrayOpt; }); } } if ((this._model.constraints.termination != null && this._model.constraints.termination != []) || (this._model.constraints.jumps != null && this._model.constraints.jumps != [])) { if (this._model.constraints.termination.length != 0 || this._model.constraints.jumps.length) { this.getMultiConditionOptionArray = []; if (this._model.opts != null) { if (this.model.opts.length != 0) { this.model.opts.forEach(function (elementOPt) { if (!elementOPt.is_deleted) { _this.getMultiConditionOptionArray.push({ id: elementOPt.label, name: elementOPt.label, }); } }); } } } } if (this._model.constraints.validations == null) { this._model.constraints.validations = { minOpt: null, maxOpt: null, }; } if (this._model.opts != null) { if (this._model.opts.length > 0) { var temperyArray_1 = []; this._model.opts.forEach(function (elementOpt) { if (!elementOpt.is_deleted) { temperyArray_1.push(elementOpt); } }); this.requiredFieldLength = new Array(temperyArray_1.length); // this.requiredFieldLength = dummyOptArray } } } else if (this._model.id == 0) { this.getMultiConditionOptionArray = []; this.getMultiOptionArray = []; this.disablePreCondValRule = []; this.requiredFieldLength = []; } } }; QuestionComponent.prototype.ngOnInit = function () { // console.log(this._model); // console.warn("from init " + this.Types.length); // console.warn( // "list", // this.Types.forEach((element) => { // console.log(element); // }) // ); // console.dir(this.TaskForm); }; QuestionComponent.prototype.onSubmit = function () { console.log("Question Form Submitted!"); }; QuestionComponent.prototype.showOptions = function () { if (this.model.question_type === 0 || this.model.question_type === 4 || this.model.question_type === 30) { this.model.is_drilldown_rowwise = false; this.model.is_spontaneous = false; this.model.row_names = null; this.model.column_names = null; this.getConditionArray = []; if (this.model.constraints.termination != null && this.model.constraints.termination != []) { if (this.model.constraints.termination.length != 0) { if (this.model.question_type == 4) { this.model.constraints.termination.forEach(function (elementTermination) { if (elementTermination.rule != "none") { elementTermination.rule = "none"; } if (elementTermination.options.length > 1) { elementTermination.options.length = 1; } }); } else { this.model.constraints.termination.forEach(function (elementTermination) { if (elementTermination.rule == "none") { elementTermination.rule = ""; } }); } } } if (this.model.question_type != 0) { this.model.constraints.jumps = []; } return true; } return false; }; QuestionComponent.prototype.logicMatrixOption = function () { //console.log("questionType", this.model.question_type); if (this.model.question_type === 28) { this.model.is_spontaneous = false; this.model.opts = null; return true; } return false; }; QuestionComponent.prototype.numericFieldOption = function () { if (this.model.question_type === 2) { this.model.row_names = null; this.model.column_names = null; this.model.is_drilldown_rowwise = false; this.getConditionArray = []; // if (this.model.question_category != 2) { // this.model.question_category = 0; // } // this.model.is_cu_child = false; return true; } return false; }; QuestionComponent.prototype.paragraphFieldOption = function () { if (this.model.question_type === 3) { this.model.row_names = null; this.model.column_names = null; this.model.is_drilldown_rowwise = false; this.getConditionArray = []; // if (this.model.question_category != 2) { // this.model.question_category = 0; // } // this.model.is_cu_child = false; return true; } return false; }; QuestionComponent.prototype.showSliderInputOptions = function () { if (this.model.question_type === 29) { this.model.row_names = null; this.model.column_names = null; this.model.is_drilldown_rowwise = false; this.getConditionArray = []; if (this.model.question_category != 2) { this.model.question_category = 0; } this.model.is_cu_child = false; return true; } return false; }; QuestionComponent.prototype.showContraints = function () { if (this.model.question_type === 5 || this.model.question_type === 9) { return true; } return false; }; QuestionComponent.prototype.postForm = function () { var _this = this; if (this.model.label !== null && this.model.label !== "" && this.model.labelar !== null && this.model.labelar !== "") { if (this.model.is_cu_child) { if (this.model.cu_parent_id == null) { var dismiss = document.getElementById("submitQuestions"); dismiss.removeAttribute("data-dismiss"); this.toastr.warning("Please select the Parent Current Usage Question"); return false; } var key = this.model.label.match(/cu_id/g); if (!key && this.model.id == 0) { var dismiss = document.getElementById("submitQuestions"); dismiss.removeAttribute("data-dismiss"); this.toastr.warning("Please add the uniquie key"); return false; } } if (this.model.question_type != 28) { this.model.constraints.logic_selection = "none"; if (this.model.question_type == 2) { if (this.model.min_value > this.model.max_value) { var dismiss = document.getElementById("submitQuestions"); dismiss.removeAttribute("data-dismiss"); return this.toastr.warning("Minimunm Value must be less than Maximum Value"); } } if ((this.model.question_type == 2 || this.model.question_type == 3) && this.model.is_spontaneous) { if (!this.model.min_field_value) { var dismiss = document.getElementById("submitQuestions"); dismiss.removeAttribute("data-dismiss"); return this.toastr.warning("Minimunm Value Field is required"); } if (!this.model.max_field_value) { var dismiss = document.getElementById("submitQuestions"); dismiss.removeAttribute("data-dismiss"); return this.toastr.warning("Maximunm Value Field is required"); } if (this.model.min_field_value > this.model.max_field_value) { var dismiss = document.getElementById("submitQuestions"); dismiss.removeAttribute("data-dismiss"); return this.toastr.warning("Minimunm Value Fields must be less than Maximum Value Field"); } if (this.model.min_field_value < 1 || this.model.max_field_value < 1) { var dismiss = document.getElementById("submitQuestions"); dismiss.removeAttribute("data-dismiss"); return this.toastr.warning("Required Input Fields must be greather than 0"); } if (this.model.max_field_value == 1) { var dismiss = document.getElementById("submitQuestions"); dismiss.removeAttribute("data-dismiss"); return this.toastr.warning("Maximum Input Fields must be greather than 1"); } } else if ((this.model.question_type == 2 || this.model.question_type == 3) && !this.model.is_spontaneous) { this.model.min_field_value = 1; this.model.max_field_value = 1; } if (this.model.question_type == 29) { if (this.model.min_value == null || this.model.max_value == null) { var dismiss = document.getElementById("submitQuestions"); dismiss.removeAttribute("data-dismiss"); this.toastr.warning("Please Input the Min and Max Value"); return false; } else if (this.model.min_value > this.model.max_value) { var dismiss = document.getElementById("submitQuestions"); dismiss.removeAttribute("data-dismiss"); this.toastr.warning("Min value must be greater than Max Value"); return false; } if (this.model.constraints.validations.minOpt != null) { if (this.model.constraints.validations.minOpt < this.model.min_value || this.model.constraints.validations.minOpt > this.model.max_value) { var dismiss = document.getElementById("submitQuestions"); dismiss.removeAttribute("data-dismiss"); this.toastr.warning("Min validate value must be between " + this.model.min_value + " and " + this.model.max_value); return false; } } if (this.model.constraints.validations.maxOpt != null) { if (this.model.constraints.validations.maxOpt < this.model.min_value || this.model.constraints.validations.maxOpt > this.model.max_value) { var dismiss = document.getElementById("submitQuestions"); dismiss.removeAttribute("data-dismiss"); this.toastr.warning("Max validate value must be between " + this.model.min_value + " and " + this.model.max_value); return false; } } if (this.model.constraints.validations.minOpt != null && this.model.constraints.validations.maxOpt != null) { if (this.model.constraints.validations.minOpt > this.model.constraints.validations.maxOpt) { var dismiss = document.getElementById("submitQuestions"); dismiss.removeAttribute("data-dismiss"); this.toastr.warning("Min validate value must be less than Max validate value"); return false; } } } } else if (this.model.question_type == 28) { // Check required validation var condCheck_1 = false; var requiredCount_1 = 0; var message_1 = ""; if (this.model.row_names == null || this.model.row_names.length == 0) { condCheck_1 = true; message_1 = "Please add thne minimum 1 row"; } if (this.model.column_names == null || this.model.column_names.length == 0) { condCheck_1 = true; message_1 = "Please add thne minimum 1 column"; } if (!condCheck_1) { this.model.row_names.forEach(function (elementRow) { if (!condCheck_1 && !elementRow.is_deleted) { if (elementRow.is_required) { requiredCount_1++; if (elementRow.min == 0) { condCheck_1 = true; message_1 = "Min value must not be equal to None in the case of Required Check true in the row (" + elementRow.name + ")"; } if (!condCheck_1) { if (elementRow.min != 0 && elementRow.max != 0) { if (elementRow.min > elementRow.max) { condCheck_1 = true; message_1 = "Min value must be less than or equal to Max value in the row (" + elementRow.name + ")"; } } } } else { if (elementRow.min != 0) { condCheck_1 = true; message_1 = "Min value must be equal to None in the case of Required Check false in the row (" + elementRow.name + ")"; } } } }); this.model.column_names.forEach(function (elementColumn) { if (!condCheck_1 && !elementColumn.is_deleted) { if (elementColumn.is_required) { requiredCount_1++; if (elementColumn.min == 0) { condCheck_1 = true; message_1 = "Min value must not be equal to None in the case of Required Check true in the coloumn (" + elementColumn.name + ")"; } if (!condCheck_1) { if (elementColumn.min != 0 && elementColumn.max != 0) { if (elementColumn.min > elementColumn.max) { condCheck_1 = true; message_1 = "Min value must be less than or equal to Max value in the column (" + elementColumn.name + ")"; } } } } else { if (elementColumn.min != 0) { condCheck_1 = true; message_1 = "Min value must be equal to None in the case of Required Check false in the column (" + elementColumn.name + ")"; } } } }); if (this.model.constraints.is_required) { if (requiredCount_1 == 0) { condCheck_1 = true; if (this.model.constraints.logic_selection == "row_select") { message_1 = "Please check the minimum one reuired field in any row"; } else { message_1 = "Please check the minimum one reuired field in any column"; } } } else { if (requiredCount_1 != 0) { condCheck_1 = true; if (this.model.constraints.logic_selection == "row_select") { message_1 = "Please check the Question level reuired field or uncheck the all row level required field"; } else { message_1 = "Please check the Question level reuired field or uncheck the all column level required field"; } } } } //Row and Column Min and max value validation check error message if (condCheck_1) { var dismiss = document.getElementById("submitQuestions"); dismiss.removeAttribute("data-dismiss"); this.toastr.warning(message_1); return false; } } // remove Single Selection termination and jump for logic matrix // Multi Logic Answers; var bolCheckV = false, getShowMessage = ""; _a = this.multiLogicCondition(false), bolCheckV = _a[0], getShowMessage = _a[1]; if (this.model.is_dd_child) { if (this.model.dd_parent_id == 0) { bolCheckV = true; getShowMessage = "Please Select the Parent Drilldown Question"; } } // Current Usage Codition Check if (this.model.question_category == 1) { if (this.model.question_type != 0 && this.model.question_type != 4 && this.model.question_type != 28) { bolCheckV = true; getShowMessage = "Current Usage Category not implement to this question type"; } } // Tag Implementation Codition Check if (this.model.question_category == 2 && !bolCheckV) { _b = this.tagImplementaion(), bolCheckV = _b[0], getShowMessage = _b[1]; } //Show Error Message in case of Multi Logic Condition if (bolCheckV == true) { var dismiss = document.getElementById("submitQuestions"); dismiss.removeAttribute("data-dismiss"); if (getShowMessage != "") { return this.toastr.warning(getShowMessage); } else { return this.toastr.warning("please fill the all Condition fields"); } } //Jump ID setting // this.jumpIdToIndexSetting(); //Precondition Check if (this.model.constraints.precondition != null && Array.isArray(this.model.constraints.precondition)) { if (this.model.constraints.precondition.length != 0) { var arrayCount = []; var bolCheck_1 = false; this.model.constraints.precondition.forEach(function (elementPreCondition, key) { if (elementPreCondition.indexNo == 0) { bolCheck_1 = true; } else if (elementPreCondition.options.length == 0) { bolCheck_1 = true; } else if (elementPreCondition.rule == "") { if (elementPreCondition.options.length > 1) { bolCheck_1 = true; } } if (elementPreCondition.options.length == 1) { elementPreCondition.rule = "OR"; } }); if (bolCheck_1 == true) { var dismiss = document.getElementById("submitQuestions"); dismiss.removeAttribute("data-dismiss"); return this.toastr.warning("please fill the all precondition fields"); } } } this.model.task_form_id = this.TaskForm.id; // this.model.questionImage = this.questionImageUrl; var dismiss = document.getElementById("submitQuestions"); dismiss.setAttribute("data-dismiss", "modal"); this.projectService .saveQuestion(this.model) .then(function (data) { _this.valueChange.emit(_this.model); _this.getConditionArray = []; }) .catch(function (err) { console.error("Error in saving questions: " + err); }); // this.model.opts = []; } else { var dismiss = document.getElementById("submitQuestions"); dismiss.removeAttribute("data-dismiss"); if (this.model.label == null || this.model.label == "") { this.toastr.error("Please enter english text"); } else { this.toastr.error("Please enter arabic text"); } } var _a, _b; }; QuestionComponent.prototype.compareFn = function (c1, c2) { // return c1.position === c2.position; return c1 && c2 ? c1.position === c2.position : c1 === c2; }; QuestionComponent.prototype.deleteQuestion = function () { var _this = this; if (confirm("Are you sure to delete " + this.model.label)) { this.model.task_form_id = this.TaskForm.id; this.model.is_deleted = true; this.projectService .saveQuestion(this.model) .then(function (data) { _this.valueChange.emit(_this.model); }) .catch(function (err) { console.error("Error in saving questions: " + err); }); } }; QuestionComponent.prototype.addOption = function () { this.getConditionArray = []; var p = 1; if (this.model.opts === null || this.model.opts === undefined) { this.model.opts = []; } if (this.model.opts.length > 0) { p = this.model.opts.length + 1; } this.requiredFieldLength.push(new Array(1)); this.model.opts.push({ id: 0, created_at: new Date(), updated_at: new Date(), jump_ids: [], label: "", labelar: "", answer_points: 0, select_deselect_label: "none", position: p, question_id: this.model.id, optional_label: "", has_extra_payload: false, option_image: null, tag_id: null, quota: null, }); }; QuestionComponent.prototype.addRowOption = function () { var p = 1; if (this.model.row_names === null || this.model.row_names === undefined) { this.model.row_names = []; if (this.model.constraints.logic_selection == "row_select") { this.model.constraints.is_required = false; } } if (this.model.row_names.length > 0) { p = this.model.row_names.length + 1; } this.model.row_names.push({ id: 0, name: "", name_ar: "", is_random: false, is_multiselect: false, is_required: false, select_deselect_label: "", min: 0, max: 0, is_deleted: false, }); }; QuestionComponent.prototype.addColumnOption = function () { var pp = 1; if (this.model.column_names === null || this.model.column_names === undefined) { this.model.column_names = []; if (this.model.constraints.logic_selection == "column_select") { this.model.constraints.is_required = false; } } if (this.model.column_names.length > 0) { pp = this.model.column_names.length + 1; } this.model.column_names.push({ id: 0, name: "", name_ar: "", is_random: false, is_multiselect: false, is_required: false, select_deselect_label: "", min: 0, max: 0, is_deleted: false, }); }; QuestionComponent.prototype.addMultiJumpCondition = function () { var ppp = 1; if (this.model.constraints.jumps === null || this.model.constraints.jumps === undefined) { this.model.constraints.jumps = []; } if (this.model.constraints.jumps.length > 0) { ppp = this.model.constraints.jumps.length + 1; } this.model.constraints.jumps.push({ indexNo: 0, rule: "", options: [], range: null, }); // } }; QuestionComponent.prototype.addMultiTerminateCondition = function () { var ppp = 1; if (this.model.constraints.termination === null || this.model.constraints.termination === undefined) { this.model.constraints.termination = []; } if (this.model.constraints.termination.length > 0) { ppp = this.model.constraints.termination.length + 1; } if (this.model.question_type == 0 || this.model.question_type == 28) { this.model.constraints.termination.push({ rule: "", options: [], range: null, terminateRule: "terminate", min: null, max: null, }); } else { if (this.model.constraints.termination.length == 0) { this.model.constraints.termination.push({ rule: "", options: [], range: null, terminateRule: "terminate", min: null, max: null, }); } else { if (this.model.constraints.termination[0].terminateRule == "terminate") { this.model.constraints.termination.push({ rule: "", options: [], range: null, terminateRule: "terminate", min: null, max: null, }); } else { return this.toastr.warning("Can not apply any other termination condition with 'Not Terminate'"); } } } // } }; QuestionComponent.prototype.addNumberTerminateCondition = function () { var ppp = 1; if (this.model.constraints.termination === null || this.model.constraints.termination === undefined) { this.model.constraints.termination = []; } if (this.model.constraints.termination.length > 0) { ppp = this.model.constraints.termination.length + 1; } this.model.constraints.termination.push({ rule: "", options: null, range: [], terminateRule: "terminate", min: null, max: null, }); }; QuestionComponent.prototype.addMultiJumpNumberCondition = function () { var ppp = 1; if (this.model.constraints.jumps === null || this.model.constraints.jumps === undefined) { this.model.constraints.jumps = []; } if (this.model.constraints.jumps.length > 0) { ppp = this.model.constraints.jumps.length + 1; } this.model.constraints.jumps.push({ indexNo: null, rule: "", options: null, range: [], }); }; QuestionComponent.prototype.addRangeJumpConditions = function (index) { var ppp = 1; if (this.model.constraints.jumps[index].range === null || this.model.constraints.jumps[index].range === undefined) { this.model.constraints.jumps[index].range = []; } if (this.model.constraints.jumps[index].range.length > 0) { ppp = this.model.constraints.jumps[index].range.length + 1; } this.model.constraints.jumps[index].range.push({ condition: "", value: null, }); }; QuestionComponent.prototype.addRangeTerminationConditions = function (index) { var ppp = 1; if (this.model.constraints.termination[index].range === null || this.model.constraints.termination[index].range === undefined) { this.model.constraints.termination[index].range = []; } if (this.model.constraints.termination[index].range.length > 0) { ppp = this.model.constraints.termination[index].range.length + 1; } this.model.constraints.termination[index].range.push({ condition: "", value: null, }); }; QuestionComponent.prototype.addPreCondtionOpt = function () { var pp = 1; this.disablePreCondVal.push(false); if (this.model.constraints.precondition === null || this.model.constraints.precondition === undefined) { this.model.constraints.precondition = []; } if (this.model.constraints.precondition.length > 0) { pp = this.model.constraints.precondition.length + 1; } this.model.constraints.precondition.push({ indexNo: 0, rule: "", options: [], }); }; QuestionComponent.prototype.selectDropdown = function (event) { var _a = event.target.value.split(": "), num = _a[0], stringVal = _a[1]; if (stringVal == "All of the above" || stringVal == "None of the above") { this.model.constraints.validations.minOpt = null; this.model.constraints.validations.maxOpt = null; } }; QuestionComponent.prototype.onUploadOutput = function (output, c, option, index) { var _this = this; switch (output.type) { case "allAddedToQueue": var file = c === "icon" ? this.iconFile : this.backroundFile; var name_1 = file ? file.name : new Date().getTime() + ".jpeg"; var reader = new FileReader(); // tslint:disable-next-line:comment-format //name = this.model.name.replace(/\s/g, '') + name; this.getBase64fromFile(file.nativeFile).then(function (d) { var headers = new http_1.HttpHeaders().set("Content-Type", "multipart/form-data"); headers.set("Accept", "application/json"); // tslint:disable-next-line:max-line-length if (c === "icon") { _this.model.iconurl = "../../assets/images/loading.gif"; } else { _this.model.backroundFile = "../../assets/images/loading.gif"; } _this.http .post(_this.uploadUrl + name_1, d.body, { headers: headers }) .subscribe(function (data) { if (c === "icon") { _this.model.iconurl = data.Location; } else { _this.model.backroundFile = data.Location; } if (_this.model.opts && _this.model.opts.length > 0) { // check } else { _this.model.opts = []; } //this.model.opts.forEach((val,index)=>{}) _this.model.opts = _this.model.opts.map(function (x) { if (x.id === option.id) { option.option_image = data.Location; } return x; }); // if(this.model.optsRow && this.model.optsRow.length > 0) // { // // check // } // else{ // this.model.optsRow = []; // } // //this.model.opts.forEach((val,index)=>{}) // this.model.optsRow = this.model.optsRow.map((x) => // { // if (x.id === option.id){ // option.option_image = data.Location; // } // return x; // }); // if(this.model.optsColumn && this.model.optsColumn.length > 0) // { // // check // } // else{ // this.model.optsColumn = []; // } // //this.model.opts.forEach((val,index)=>{}) // this.model.optsColumn = this.model.optsColumn.map((x) => // { // if (x.id === option.id){ // option.option_image = data.Location; // } // return x; // }); // this.imageUrl = data.Location; // // this.model.files.push(file); _this.toastr.success("File Uploaded"); }, function (error) { console.log("Error in uploaing file: " + error); }); }); break; case "addedToQueue": if (typeof output.file !== "undefined") { if (c === "icon") { this.iconFile = output.file; } else { this.backroundFile = output.file; } } break; case "uploading": if (typeof output.file !== "undefined") { // update current data in files array for uploading file // tslint:disable-next-line:no-shadowed-variable var index_1 = this.files.findIndex(function (file) { return typeof output.file !== "undefined" && file.id === output.file.id; }); this.files[index_1] = output.file; } break; case "removed": // remove file from array when removed // tslint:disable-next-line:no-shadowed-variable this.files = this.files.filter(function (file) { return file !== output.file; }); break; case "dragOver": this.dragOver = true; break; case "dragOut": case "drop": this.dragOver = false; break; case "done": // tslint:disable-next-line:max-line-length if (c === "icon") { this.model.iconurl = output.file.response.Location; } else { this.model.backroundFile = output.file.response.Location; } // The file is downloaded //////////////////////////////////////////////////////////////////////// if (this.model.files === null || this.model.files.length === 0 || this.model.files.find(function (f) { return f.upload_type === (c === "icon" ? 0 : 1); }) === undefined) { this.model.files.push({ id: null, created_at: new Date(), uploadable_type: "Project", uploadable_id: this.model.id, upload_type: c === "icon" ? 0 : 1, url: output.file.response.Location, is_deleted: false, updated_at: new Date(), }); } else { this.model.files.find(function (f) { return f.upload_type === (c === "icon" ? 0 : 1); }).url = output.file.response.Location; } break; } }; QuestionComponent.prototype.processBulk = function () { var _this = this; var p = 1; if (this.model.opts === null || this.model.opts === undefined) { this.model.opts = []; } if (this.model.opts.length > 0) { p = this.model.opts.length + 1; } if (this.bulkoptions == "") { this.toastr.warning("Please enter the comma separated text"); return false; } var texts = this.bulkoptions.split(","); texts.forEach(function (element) { _this.model.opts.push({ id: 0, created_at: new Date(), updated_at: new Date(), jump_ids: [], label: element, labelar: "", answer_points: 0, select_deselect_label: "none", position: p, question_id: _this.model.id, optional_label: "", has_extra_payload: false, option_image: null, }); ++p; _this.requiredFieldLength.push(new Array(1)); }); this.bulkoptions = ""; }; QuestionComponent.prototype.getBase64fromFile = function (file) { return new Promise(function (resolve, reject) { var reader = new FileReader(); reader.readAsDataURL(file); reader.onload = function () { console.log("getBase64fromFile success."); var spliced = reader.result.toString().split(","); var header = spliced[0]; spliced.shift(); resolve({ header: header, body: spliced.join(""), }); }; reader.onerror = function (err) { console.log("getBase64fromFile failed."); reject(err); }; }); }; QuestionComponent.prototype.onUploadPicture = function (output, c) { var _this = this; switch (output.type) { case "allAddedToQueue": var file = c === "icon" ? this.iconFile : this.questionImageFile; var name_2 = file ? file.name : new Date().getTime() + ".jpeg"; var reader = new FileReader(); // name = this.model.name.replace(/\s/g, '') + name; this.getBase64fromFile(file.nativeFile).then(function (d) { var headers = new http_1.HttpHeaders().set("Content-Type", "multipart/form-data"); headers.set("Accept", "application/json"); // tslint:disable-next-line:max-line-length if (c === "icon") { _this.model.iconurl = "../../assets/images/loading.gif"; } else { _this.model.question_image = "../../assets/images/loading.gif"; } _this.http .post(_this.uploadUrlForQuestionImage + name_2, d.body, { headers: headers }) .subscribe(function (data) { if (c === "icon") { _this.model.iconurl = data.Location; } else { _this.model.question_image = data.Location; } _this.questionImageUrl = data.Location; _this.toastr.success("File Uploaded"); }, function (error) { console.log("Error in uploaing file: " + error); }); }); break; case "addedToQueue": if (typeof output.file !== "undefined") { if (c === "icon") { this.iconFile = output.file; } else { this.questionImageFile = output.file; } } break; case "uploading": if (typeof output.file !== "undefined") { // update current data in files array for uploading file var index = this.files.findIndex(function (file) { return typeof output.file !== "undefined" && file.id === output.file.id; }); this.files[index] = output.file; } break; case "removed": // remove file from array when removed this.files = this.files.filter(function (file) { return file !== output.file; }); break; case "dragOver": this.dragOver = true; break; case "dragOut": case "drop": this.dragOver = false; break; case "done": // tslint:disable-next-line:max-line-length if (c === "icon") { this.model.iconurl = output.file.response.Location; } else { this.model.question_image = output.file.response.Location; } // The file is downloaded //////////////////////////////////////////////////////////////////////// if (this.model.files === null || this.model.files.length === 0 || this.model.files.find(function (f) { return f.upload_type === (c === "icon" ? 0 : 1); }) === undefined) { this.model.files.push({ id: null, created_at: new Date(), uploadable_type: "Project", uploadable_id: this.model.id, upload_type: c === "icon" ? 0 : 1, url: output.file.response.Location, is_deleted: false, updated_at: new Date(), }); } else { this.model.files.find(function (f) { return f.upload_type === (c === "icon" ? 0 : 1); }).url = output.file.response.Location; } break; } }; ///////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// QuestionComponent.prototype.getDrillValue = function (event) { }; QuestionComponent.prototype.changeSpontaneous = function (event) { this.checkSpontCond = event.target.checked; if (event.target.checked == false) { this.model.min_field_value = 1; this.model.max_field_value = 1; } }; QuestionComponent.prototype.changeTags = function (event) { if (event.target.checked) { this.model.is_tag_parent = false; if (this.model.opts != null) { if (this.model.opts.length != 0) { this.model.opts.forEach(function (elementOptions) { elementOptions.tag_id = null; elementOptions.quota = null; }); } } } else { this.model.is_tag_parent = true; } }; QuestionComponent.prototype.saveLogicMatrixOption = function () { var _this = this; this.getConditionArray = []; this.model.multiple_terminate_condition = []; this.model.multiple_jump_condition = []; this.checkAllFieldsInput = false; var getRowValue = 0; var getColumnValue = 0; this.model.row_names.forEach(function (element) { if (!element.is_deleted) { if (element.name != "") { getRowValue++; } else { _this.checkAllFieldsInput = true; return _this.toastr.warning("Please Fill the all row English titles"); } } }); this.model.column_names.forEach(function (element) { if (!element.is_deleted) { if (element.name != "") { getColumnValue++; } else { _this.checkAllFieldsInput = true; return _this.toastr.warning("Please Fill the all column English titles"); } } }); if (this.checkAllFieldsInput == false) { this.model.row_names.forEach(function (elementRow) { if (!elementRow.is_deleted) { _this.model.column_names.forEach(function (elementColumn) { if (!elementColumn.is_deleted) { _this.getConditionArray.push({ name: elementRow.name + elementColumn.name, }); } }); } }); } }; QuestionComponent.prototype.changeDrillOption = function (event) { if (this.model.question_type === 28) { this.model.is_drilldown_rowwise = event.target.checked; } else { this.model.is_drilldown_rowwise = false; } }; QuestionComponent.prototype.changeDrillRowWise = function (event) { // if (event.target.checked == false) { // this.model.is_drilldown = false; // } }; QuestionComponent.prototype.changeDrillChildOption = function (event) { if (!event.target.checked) { this.model.dd_parent_id = 0; } }; QuestionComponent.prototype.changeQuestionRequired = function (event) { // if (this.model.question_type == 28) { // if (event.target.checked) { // if (this.model.constraints.logic_selection == "row_select") { // if (this.model.row_names == null || this.model.row_names.length == 0) { // event.target.checked = false; // return this.toastr.warning("Please add the rows first"); // } // let requiredCheck = false; // this.model.row_names.forEach(elementRow => { // if (elementRow.is_required) { // requiredCheck = true; // } // }); // if (!requiredCheck) { // event.target.checked = false; // return this.toastr.warning("Minimum one check is required in any row"); // } // } // else // { // if (this.model.column_names == null || this.model.column_names.length == 0) { // event.target.checked = false; // return this.toastr.warning("Please add the column first"); // } // let requiredCheck = false; // this.model.column_names.forEach(elementcolumn => { // if (elementcolumn.is_required) { // requiredCheck = true; // } // }); // if (!requiredCheck) { // event.target.checked = false; // return this.toastr.warning("Minimum one check is required in any column"); // } // } // } // else // { // if (this.model.constraints.logic_selection == "row_select") { // if (this.model.row_names != null || this.model.row_names.length != 0) { // let requiredCheck = false; // this.model.row_names.forEach(elementRow => { // if (elementRow.is_required) { // requiredCheck = true; // } // }); // if (requiredCheck) { // event.target.checked = true; // return this.toastr.warning("Please uncheck the required field in all rows"); // } // } // } // else // { // if (this.model.column_names != null || this.model.column_names.length != 0) { // let requiredCheck = false; // this.model.column_names.forEach(elementColumn => { // if (elementColumn.is_required) { // requiredCheck = true; // } // }); // if (requiredCheck) { // event.target.checked = true; // return this.toastr.warning("Please uncheck the required field in all columns"); // } // } // } // } // } }; QuestionComponent.prototype.getPreCondQuestion = function (event, indexFront) { var _a = event.target.value.split(" "), space = _a[0], id = _a[1]; if (id != 0) { var getAllQuestions = this.sprintService.getAllQuestions; // this.getMultiOptionArray = []; this.disablePreCondValRule[indexFront] = false; var arrayValue = []; var condCheck = false; var _loop_2 = function (index) { if (getAllQuestions[index].id == id) { if (getAllQuestions[index].question_type != 28 && getAllQuestions[index].question_type != 2 && getAllQuestions[index].question_type != 3) { this_1.disablePreCondVal[indexFront] = false; if (getAllQuestions[index].opts.length != 0) { getAllQuestions[index].opts.forEach(function (element) { if (!element.is_deleted) { arrayValue.push(element.label); } }); } } if (getAllQuestions[index].question_type == 28) { this_1.disablePreCondVal[indexFront] = false; if (getAllQuestions[index].row_names.length != 0 && getAllQuestions[index].column_names.length != 0) { getAllQuestions[index].row_names.forEach(function (elementRow) { if (!elementRow.is_deleted) { getAllQuestions[index].column_names.forEach(function (elementColumn) { if (!elementColumn.is_deleted) { arrayValue.push(elementRow.name + elementColumn.name); } }); } }); } } if (getAllQuestions[index].question_type == 2 || getAllQuestions[index].question_type == 3) { this_1.disablePreCondVal[indexFront] = true; this_1.getMultiOptionArray[indexFront] = null; this_1.model.constraints.precondition[indexFront].options = null; condCheck = true; this_1.toastr.warning("Pre Condition is not applicable in this question"); } if (getAllQuestions[index].question_type == 4) { this_1.disablePreCondValRule[indexFront] = true; this_1.model.constraints.precondition[indexFront].rule = "OR"; } } }; var this_1 = this; for (var index = 0; index < getAllQuestions.length; index++) { _loop_2(index); } if (condCheck == false) { this.getMultiOptionArray[indexFront] = arrayValue; } } else { this.getMultiOptionArray[indexFront] = []; } }; QuestionComponent.prototype.SavemultiCondtionOption = function () { this.getMultiConditionOptionArray = []; if (this.model.opts != null) { if (this.model.opts.length != 0) { var arrayOPt = []; var bolCon = false; this.model.opts.forEach(function (elementOpt) { if (bolCon == false) { if (!elementOpt.is_deleted) { if (elementOpt.label == "") { bolCon = true; } else { arrayOPt.push({ id: elementOpt.label, name: elementOpt.label, }); } } } }); if (bolCon == false) { this.getMultiConditionOptionArray = arrayOPt; } else { this.toastr.warning("Please fill the all option english labels"); } } } }; QuestionComponent.prototype.changeQuestionCategory = function (event) { if (event[0].value == 0) { this.model.is_cu_child = false; this.model.cu_parent_id = null; } if (event[0].value != 2) { if (this.model.opts != null) { this.model.opts.forEach(function (elementOpt) { elementOpt.tag_id = null; elementOpt.quota = null; }); } this.model.is_tag_child = false; this.model.is_tag_parent = false; } else if (event[0].value == 2) { if (this.model.question_type == 4) { this.model.is_tag_parent = true; this.model.is_tag_child = false; } else { this.model.is_tag_parent = false; this.model.is_tag_child = true; } } }; QuestionComponent.prototype.changeQuestionType = function (event) { if (this.model.question_type != 4) { if (this.model.opts != null) { this.model.opts.forEach(function (elementOpt) { elementOpt.tag_id = null; elementOpt.quota = null; }); } this.model.is_tag_parent = false; } if (this.model.question_type == 4 && !this.model.is_tag_parent) { if (this.model.opts != null) { this.model.opts.forEach(function (elementOpt) { elementOpt.tag_id = null; elementOpt.quota = null; }); } } }; QuestionComponent.prototype.numberOnly = function (event) { // if (this.loginForm.value.ContactCode == "+966" || this.loginForm.value.ContactCode == "+971" || this.loginForm.value.ContactCode == "+962") { // this.maxContactLength = 9; // } else if (this.loginForm.value.ContactCode == "+20") { // this.maxContactLength = 10; // } else if (this.loginForm.value.ContactCode == "+965" || this.loginForm.value.ContactCode == "+968") { // this.maxContactLength = 8; // } var charCode = event.which ? event.which : event.keyCode; if (charCode > 31 && (charCode < 48 || charCode > 57)) { return false; } return true; }; QuestionComponent.prototype.checkValidateMultValue = function () { var _this = this; var disableMessage = false; this.model.opts.forEach(function (elementOPT) { if (!elementOPT.is_deleted) { if (elementOPT.select_deselect_label == "All of the above" || elementOPT.select_deselect_label == "None of the above") { if (_this.model.constraints.validations.minOpt > 0 || _this.model.constraints.validations.maxOpt > 0) { _this.model.constraints.validations.minOpt = null; _this.model.constraints.validations.maxOpt = null; disableMessage = true; } } } }); if (disableMessage == true) { return this.toastr.warning("Validation is apply only when Select All and Deselect All not selected"); } if (this.model.constraints.validations.minOpt != null && this.model.constraints.validations.maxOpt != null) { if (this.model.constraints.validations.minOpt > this.model.constraints.validations.maxOpt) { this.model.constraints.validations.maxOpt = null; return this.toastr.warning("Validation of maximum value must be greater than minimun value"); } } }; QuestionComponent.prototype.ChangeTerminateValidation = function (index) { if (this.model.constraints.termination[index].min != null && this.model.constraints.termination[index].max != null) { if (this.model.constraints.termination[index].min > this.model.constraints.termination[index].max) { this.model.constraints.termination[index].max = null; return this.toastr.warning("Validation for termination of maximum value must be greater than minimun value"); } } }; QuestionComponent.prototype.changeTerminationRule = function (index) { if (this.model.constraints.termination[index].rule == "AND") { this.model.constraints.termination[index].min = null; this.model.constraints.termination[index].max = null; } }; QuestionComponent.prototype.changeTerminationExclusive = function (index) { if (this.model.constraints.termination.length > 1) { if (this.model.constraints.termination[index].terminateRule == "notTerminate") { this.model.constraints.termination[index].terminateRule = "terminate"; return this.toastr.warning("Can not select both Terminate' and 'Not Terminate' within the same question"); } } }; QuestionComponent.prototype.multiLogicCondition = function (bolCheckV) { var _this = this; var showMessage = ""; if (this.model.question_type == 0) { if (this.model.opts != null) { if (this.model.opts.length != 0) { this.model.opts.forEach(function (elementOPT) { elementOPT.jump_ids = []; if (elementOPT.select_deselect_label == null) { elementOPT.select_deselect_label = "none"; } if (elementOPT.labelar == "" && !elementOPT.is_deleted) { bolCheckV = true; showMessage = "Please fill the all option Arabic titles"; } if (elementOPT.label == "" && !elementOPT.is_deleted) { bolCheckV = true; showMessage = "Please fill the all option English titles"; } }); } } if (this.model.constraints.jumps != null) { if (this.model.constraints.jumps.length != 0) { this.model.constraints.jumps.forEach(function (elementJump) { if (elementJump.options.length == 1) { elementJump.rule = ""; } if (elementJump.options.length == 0) { bolCheckV = true; } else if (elementJump.options.length > 1 && elementJump.rule == "") { bolCheckV = true; } else if (elementJump.indexNo == 0) { bolCheckV = true; } elementJump.options.forEach(function (elementCondOpt, getIndex) { var condCheck = true; _this.model.opts.forEach(function (elementQuesOpt) { if (condCheck == true) { if (elementCondOpt == elementQuesOpt.label) { condCheck = false; } } }); if (condCheck) { bolCheckV = condCheck; showMessage = "Jump Options of " + elementCondOpt + " is not exit in the options"; return false; } }); }); } } if (this.model.constraints.termination != null) { if (this.model.constraints.termination.length != 0) { this.model.constraints.termination.forEach(function (elementTermination) { if (elementTermination.options.length == 1) { elementTermination.rule = ""; } if (elementTermination.options.length == 0) { bolCheckV = true; } else if (elementTermination.options.length > 1 && elementTermination.rule == "") { bolCheckV = true; } elementTermination.options.forEach(function (elementCondOpt) { var condCheck = true; _this.model.opts.forEach(function (elementQuesOpt) { if (condCheck == true) { if (elementCondOpt == elementQuesOpt.label) { condCheck = false; } } }); if (condCheck) { bolCheckV = condCheck; showMessage = "Termination Options of " + elementCondOpt + " is not exit in the options"; return false; } }); }); } } } if (this.model.question_type == 2 || this.model.question_type == 3 || this.model.question_type == 29) { if (this.model.opts != null) { if (this.model.opts.length != 0) { this.model.opts.forEach(function (elementOPT) { elementOPT.select_deselect_label = "none"; }); } } if (this.model.constraints.termination != null) { if (this.model.constraints.termination.length != 0) { this.model.constraints.termination.forEach(function (elementTermination) { if (elementTermination.range.length == 1) { elementTermination.rule = ""; } if (elementTermination.range.length == 0) { bolCheckV = true; } else if (elementTermination.range.length > 1 && elementTermination.rule == "") { bolCheckV = true; } if (elementTermination.range.length > 0) { elementTermination.range.forEach(function (elementRangeV) { if (elementRangeV.value == null || elementRangeV.condition == "") { bolCheckV = true; } }); } }); } } if (this.model.constraints.jumps != null) { if (this.model.constraints.jumps.length != 0) { this.model.constraints.jumps.forEach(function (elementJump) { if (elementJump.range.length == 1) { elementJump.rule = ""; } if (elementJump.range.length == 0) { bolCheckV = true; } else if (elementJump.range.length > 1 && elementJump.rule == "") { bolCheckV = true; } else if (elementJump.indexNo == 0) { bolCheckV = true; } if (elementJump.range.length > 0) { elementJump.range.forEach(function (elementRangeV) { if (elementRangeV.value == null || elementRangeV.condition == "") { bolCheckV = true; } }); } }); } } } if (this.model.question_type == 4 || this.model.question_type == 30) { if (this.model.constraints.termination != null) { if (this.model.constraints.termination.length != 0) { this.model.constraints.termination.forEach(function (elementTermination) { elementTermination.rule = ""; if (elementTermination.options.length == 0) { bolCheckV = true; } elementTermination.options.forEach(function (elementCondOpt) { var condCheck = true; _this.model.opts.forEach(function (elementQuesOpt) { if (condCheck == true) { if (elementCondOpt == elementQuesOpt.label) { condCheck = false; } } }); if (condCheck) { bolCheckV = condCheck; showMessage = "Termination Options of " + elementCondOpt + " is not exit in the options"; return false; } }); }); } } if (this.model.opts != null) { this.model.opts.forEach(function (elementOPT) { if (elementOPT.labelar == "" && !elementOPT.is_deleted) { bolCheckV = true; showMessage = "Please fill the all option Arabic titles"; } if (elementOPT.label == "" && !elementOPT.is_deleted) { bolCheckV = true; showMessage = "Please fill the all option English titles"; } }); } if (this.model.is_drilldown) { bolCheckV = true; showMessage = "Drilldown is not acceptable in Single Selection, please uncheck"; } } if (this.model.question_type == 28) { var dummyOPtionArray_1 = []; var endCcond_1 = false; if (this.model.row_names != null && this.model.column_names != null) { this.model.row_names.forEach(function (element) { if (element.name_ar == "" && !element.is_deleted) { bolCheckV = true; endCcond_1 = true; showMessage = "Please Fill the all row Arabic titles"; } if (element.name == "" && !element.is_deleted) { bolCheckV = true; endCcond_1 = true; showMessage = "Please Fill the all row English titles"; } }); this.model.column_names.forEach(function (element) { if (element.name_ar == "" && !element.is_deleted) { bolCheckV = true; endCcond_1 = true; showMessage = "Please Fill the all column Arabic titles"; } if (element.name == "" && !element.is_deleted) { bolCheckV = true; endCcond_1 = true; showMessage = "Please Fill the all column English titles"; } }); this.model.row_names.forEach(function (elementRow) { if (!elementRow.is_deleted) { _this.model.column_names.forEach(function (elementColumn) { if (!elementColumn.is_deleted) { dummyOPtionArray_1.push({ name: elementRow.name + elementColumn.name, }); } }); } }); } if (endCcond_1) { return [bolCheckV, showMessage]; } if (this.model.constraints.jumps != null) { if (this.model.constraints.jumps.length != 0) { this.model.constraints.jumps.forEach(function (elementJump) { if (elementJump.options.length == 1) { elementJump.rule = ""; } if (elementJump.options.length == 0) { bolCheckV = true; } else if (elementJump.options.length > 1 && elementJump.rule == "") { bolCheckV = true; } else if (elementJump.indexNo == 0) { bolCheckV = true; } elementJump.options.forEach(function (elementCondOpt) { var condCheck = true; dummyOPtionArray_1.forEach(function (elementQuesOpt) { if (condCheck == true) { if (elementCondOpt == elementQuesOpt.name) { condCheck = false; } } }); if (condCheck) { bolCheckV = condCheck; showMessage = "Jump Options of " + elementCondOpt + " is not exit in the options of ROw and Column"; return false; } }); }); } } if (this.model.constraints.termination != null) { if (this.model.constraints.termination.length != 0) { this.model.constraints.termination.forEach(function (elementTermination) { if (elementTermination.options.length == 1) { elementTermination.rule = ""; } if (elementTermination.options.length == 0) { bolCheckV = true; } else if (elementTermination.options.length > 1 && elementTermination.rule == "") { bolCheckV = true; } elementTermination.options.forEach(function (elementCondOpt) { var condCheck = true; dummyOPtionArray_1.forEach(function (elementQuesOpt) { if (condCheck == true) { if (elementCondOpt == elementQuesOpt.name) { condCheck = false; } } }); if (condCheck) { bolCheckV = condCheck; showMessage = "Termination Options of " + elementCondOpt + " is not exit in the options of ROw and Column"; return false; } }); }); } } } return [bolCheckV, showMessage]; }; QuestionComponent.prototype.changelogicMatrixSelection = function (event) { if (event[0].value == "row_select") { if (this.model.column_names) { this.model.column_names.forEach(function (elementColumn) { elementColumn.is_multiselect = false; elementColumn.is_required = false; elementColumn.select_deselect_label = ""; elementColumn.min = 0; elementColumn.max = 0; }); } } else if (event[0].value == "column_select") { if (this.model.row_names) { this.model.row_names.forEach(function (elementRow) { elementRow.is_multiselect = false; elementRow.is_required = false; elementRow.select_deselect_label = ""; elementRow.min = 0; elementRow.max = 0; }); } } // else if (event[0].value == "none") { // if (this.model.column_names) { // this.model.column_names.forEach(elementColumn => { // elementColumn.is_multiselect = false; // elementColumn.select_deselect_label = ""; // elementColumn.min = 0; // elementColumn.max = 0; // }); // } // if (this.model.row_names) { // this.model.row_names.forEach(elementRow => { // elementRow.is_multiselect = false; // elementRow.select_deselect_label = ""; // elementRow.min = 0; // elementRow.max = 0; // }); // } // } }; QuestionComponent.prototype.changeColumnMulti = function (event, index) { if (!event.target.checked) { this.model.column_names[index].select_deselect_label = ""; this.model.column_names[index].min = 0; this.model.column_names[index].max = 0; } }; QuestionComponent.prototype.changeRowMulti = function (event, index) { if (!event.target.checked) { this.model.row_names[index].select_deselect_label = ""; this.model.row_names[index].min = 0; this.model.row_names[index].max = 0; } }; QuestionComponent.prototype.changeRowRequired = function (event, index) { if (event.target.checked) { this.model.row_names[index].select_deselect_label = ""; this.model.row_names[index].min = 1; this.model.row_names[index].max = 0; if (!this.model.constraints.is_required) { this.model.constraints.is_required = true; } } else { this.model.row_names[index].select_deselect_label = ""; this.model.row_names[index].min = 0; this.model.row_names[index].max = 0; } }; QuestionComponent.prototype.changeColumnRequired = function (event, index) { if (event.target.checked) { this.model.column_names[index].select_deselect_label = ""; this.model.column_names[index].min = 1; this.model.column_names[index].max = 0; if (!this.model.constraints.is_required) { this.model.constraints.is_required = true; } } else { this.model.column_names[index].select_deselect_label = ""; this.model.column_names[index].min = 0; this.model.column_names[index].max = 0; } }; QuestionComponent.prototype.ChangeRowValidation = function (index) { if (this.model.row_names[index].min != 0 && this.model.row_names[index].max != 0) { if (this.model.row_names[index].min > this.model.row_names[index].max) { this.model.row_names[index].max = 0; this.model.row_names[index].min = 0; return this.toastr.warning("Maximum value must be greater than Minimun value of " + this.model.row_names[index].name + " row"); } } }; QuestionComponent.prototype.ChangeColumnValidation = function (index) { if (this.model.column_names[index].min != 0 && this.model.column_names[index].max != 0) { if (this.model.column_names[index].min > this.model.column_names[index].max) { this.model.column_names[index].max = 0; this.model.column_names[index].min = 0; return this.toastr.warning("Maximum value must be greater than Minimun value of " + this.model.column_names[index].name + " column"); } } }; QuestionComponent.prototype.jumpIdToIndexSetting = function () { var _this = this; if (this.model.question_type == 4) { if (this.model.opts != null) { if (this.model.opts.length != 0) { this.model.opts.forEach(function (elementOPT) { if (elementOPT.jump_ids.length != 0) { _this.TaskForm.questions.forEach(function (elementAllQues) { if (elementAllQues.id == elementOPT.jump_ids[0]) { elementOPT.jump_ids[0] = elementAllQues.position; } }); } }); } } } else { if (this.model.constraints.jumps != null) { if (this.model.constraints.jumps.length != 0) { this.model.constraints.jumps.forEach(function (elementJump) { _this.TaskForm.questions.forEach(function (elementAllQues) { if (elementJump.indexNo == elementAllQues.id) { elementJump.indexNo = elementAllQues.position; } }); }); } } } }; QuestionComponent.prototype.multimediaUploads = function () { if (this.model.question_type == 31) { this.model.constraints.files.type = "image"; this.model.constraints.files.duration = 0; } else if (this.model.question_type == 32) { this.model.constraints.files.type = "audio"; } else if (this.model.question_type == 33) { this.model.constraints.files.type = "video"; } if (this.model.question_type == 31 || this.model.question_type == 32 || this.model.question_type == 33) { return true; } return false; }; QuestionComponent.prototype.tagImplementaion = function () { var Is_query = false; var message = ""; if (this.model.is_tag_parent && this.sprintService.parentQuestionTagID != null && this.sprintService.parentQuestionTagID != 0 && this.model.id == 0) { Is_query = true; message = "Do not create more than than 1 tag parent question"; } else if (this.model.is_tag_parent && this.model.question_type != 4) { Is_query = true; message = "Parent tag category not implement except single Selection Question Type"; } else if (this.model.is_tag_child && !this.sprintService.parentQuestionTagID) { Is_query = true; message = "Please add the parent tag question first"; } else if (this.model.is_tag_child && this.model.tag_condition.length == 0) { Is_query = true; message = "Please add the atleast one parent tag"; } if (!Is_query) { if (this.model.opts == null && this.model.is_tag_parent) { Is_query = true; message = "Please add the options"; } else { if (this.model.is_tag_parent) { var isQuota_1 = false; this.model.opts.forEach(function (elementOpt) { if (!elementOpt.is_deleted) { if (elementOpt.tag_id == null) { Is_query = true; message = "Please select the tag against the all options"; } if (elementOpt.quota != null) { isQuota_1 = true; } } }); if (isQuota_1) { var quotaCount_1 = 0; var isQuotaError_1 = true; this.model.opts.forEach(function (options) { if (!options.is_deleted) { if (options.quota == null) { isQuotaError_1 = false; Is_query = true; message = "Please add quota in all quota fields in tag section."; } else if (options.quota < 1) { isQuotaError_1 = false; Is_query = true; message = "Quota must be greater than 1"; } else { quotaCount_1 = quotaCount_1 + options.quota; } } }); if (isQuotaError_1) { if (quotaCount_1 != 100) { Is_query = true; message = "Quota must be equal to 100"; } } } } } } return [Is_query, message]; }; QuestionComponent.prototype.getParentTagLists = function (id) { var _this = this; this.sprintService.ParentTagLists(id).then(function (parentTags) { _this.sprintParentTagList = parentTags; }, function (err) { _this.toastr.error(err.message); }); }; QuestionComponent.prototype.tagOptionSaved = function (option) { this.model.opts = option; }; __decorate([ core_1.Output("QuestionSaved"), __metadata("design:type", core_1.EventEmitter) ], QuestionComponent.prototype, "valueChange", void 0); __decorate([ core_1.Input("Question"), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], QuestionComponent.prototype, "model", null); __decorate([ core_1.Input("SprintID"), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], QuestionComponent.prototype, "sprintID", null); __decorate([ core_1.Input("SprintTag"), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], QuestionComponent.prototype, "setTag", null); __decorate([ core_1.Input("Types"), __metadata("design:type", Array) ], QuestionComponent.prototype, "Types", void 0); __decorate([ core_1.Input("TaskForm"), __metadata("design:type", Object) ], QuestionComponent.prototype, "TaskForm", void 0); __decorate([ core_1.ViewChild("backgroundFileInput"), __metadata("design:type", core_1.ElementRef) ], QuestionComponent.prototype, "fileInput", void 0); QuestionComponent = __decorate([ core_1.Component({ selector: "app-question", template: __webpack_require__(/*! ./question.component.html */ "./src/app/modules/sprints/components/question/question.component.html"), styles: [ "\n\t\t\t.custom-control {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmargin-left: 5px;\n\t\t\t}\n\t\t", ], styles: [__webpack_require__(/*! ./question.component.css */ "./src/app/modules/sprints/components/question/question.component.css")], }), __metadata("design:paramtypes", [projectService_1.ProjectService, sprintService_1.SprintService, google_services_1.GoogleService, http_1.HttpClient, ngx_toastr_1.ToastrService]) ], QuestionComponent); return QuestionComponent; }()); exports.QuestionComponent = QuestionComponent; /***/ }), /***/ "./src/app/modules/sprints/components/reward/rewards/rewards.component.css": /*!*********************************************************************************!*\ !*** ./src/app/modules/sprints/components/reward/rewards/rewards.component.css ***! \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/modules/sprints/components/reward/rewards/rewards.component.html": /*!**********************************************************************************!*\ !*** ./src/app/modules/sprints/components/reward/rewards/rewards.component.html ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\n
    \r\n
    \r\n
    \r\n
    Add New Reward
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n Name is required\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n Amount is required\r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n

    Rewards

    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n Title\r\n \r\n \r\n {{ value }}\r\n \r\n \r\n\r\n \r\n \r\n Amount\r\n \r\n \r\n {{ value }} {{ row['currency_id'] == 10? 'AED':'SAR'}}\r\n \r\n \r\n\r\n \r\n \r\n Is Shown?\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Created At\r\n \r\n \r\n {{ value | date}}\r\n \r\n \r\n\t\t\r\n \r\n Edit\r\n \r\n \r\n Edit\r\n \r\n \r\n\r\n \r\n
    \r\n" /***/ }), /***/ "./src/app/modules/sprints/components/reward/rewards/rewards.component.ts": /*!********************************************************************************!*\ !*** ./src/app/modules/sprints/components/reward/rewards/rewards.component.ts ***! \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var rewardService_1 = __webpack_require__(/*! ../service/rewardService */ "./src/app/modules/sprints/components/reward/service/rewardService.ts"); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var RewardsComponent = /** @class */ (function () { // @Input('Sprint') // set sprint(value: Sprint) { // this._sprint = value; // //this.valueChange.emit(this._model); // } function RewardsComponent(rewardService, toastr) { this.rewardService = rewardService; this.toastr = toastr; this.amount = 10; this.currency = 10; this.message = ""; this.model = null; this._sprint = null; this.id = 0; this.valueChange = new core_1.EventEmitter(); } RewardsComponent.prototype.ngOnInit = function () { this.getReward(); }; RewardsComponent.prototype.getReward = function () { var _this = this; if (this.id === 0 || this._sprint.rewards == null) this.model = { id: 0, title: "", project_id: this.sprintId, is_shown: true, amount: 0, currency_id: 10, created_at: new Date(), updated_at: new Date(), is_deleted: false, }; else return this._sprint.rewards.find(function (r) { return r.id === _this.id; }); }; RewardsComponent.prototype.postForm = function () { var _this = this; if (this.model.title == "") { var dismiss = document.getElementById("submitReward"); dismiss.removeAttribute("data-dismiss"); this.toastr.warning("Title is required"); return false; } var dismiss = document.getElementById("submitReward"); dismiss.setAttribute("data-dismiss", "modal"); this.rewardService .saveReward(this.model) .then(function (data) { _this.model.id = data["id"]; console.log("Saved.." + data); _this.toastr.success("Saved Successfully!"); _this.valueChange.emit(_this.model); }) .catch(function (err) { _this.toastr.error("Error in saving reward"); console.error(err); }); }; RewardsComponent.prototype.changeReward = function (value) { this.model = value; }; __decorate([ core_1.Input(), __metadata("design:type", Number) ], RewardsComponent.prototype, "sprintId", void 0); __decorate([ core_1.Output("RewardSaved"), __metadata("design:type", core_1.EventEmitter) ], RewardsComponent.prototype, "valueChange", void 0); __decorate([ core_1.Input(), __metadata("design:type", Array) ], RewardsComponent.prototype, "rows", void 0); RewardsComponent = __decorate([ core_1.Component({ selector: "app-rewards", template: __webpack_require__(/*! ./rewards.component.html */ "./src/app/modules/sprints/components/reward/rewards/rewards.component.html"), styles: [__webpack_require__(/*! ./rewards.component.css */ "./src/app/modules/sprints/components/reward/rewards/rewards.component.css")], }), __metadata("design:paramtypes", [rewardService_1.RewardService, ngx_toastr_1.ToastrService]) ], RewardsComponent); return RewardsComponent; }()); exports.RewardsComponent = RewardsComponent; /***/ }), /***/ "./src/app/modules/sprints/components/reward/service/rewardService.ts": /*!****************************************************************************!*\ !*** ./src/app/modules/sprints/components/reward/service/rewardService.ts ***! \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var api_1 = __webpack_require__(/*! @aws-amplify/api */ "./node_modules/@aws-amplify/api/lib-esm/index.js"); // import { AuthService } from '../auth/auth.service'; var auth_service_1 = __webpack_require__(/*! src/app/auth/auth.service */ "./src/app/auth/auth.service.ts"); var core_2 = __webpack_require__(/*! @ngx-loading-bar/core */ "./node_modules/@ngx-loading-bar/core/fesm5/ngx-loading-bar-core.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var RewardService = /** @class */ (function () { function RewardService(auth, loader, toastr) { this.auth = auth; this.loader = loader; this.toastr = toastr; } /** * A method that mocks a paged server response * @param page The selected page * @returns {any} An observable containing the employee data */ RewardService.prototype.saveReward = function (model) { var _this = this; var apiName = 'api_node_2'; var path = "reward"; var myInit = { body: model, headers: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.post(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response; console.log("data --->", data); if (data.response_code == 200) { var value = data.data; console.log("value --->", value); resolve(value); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { _this.toastr.error(error); reject(error); }); }); // end promoise return promise; }; RewardService = __decorate([ core_1.Injectable({ providedIn: "root" }), __metadata("design:paramtypes", [auth_service_1.AuthService, core_2.LoadingBarService, ngx_toastr_1.ToastrService]) ], RewardService); return RewardService; }()); exports.RewardService = RewardService; /***/ }), /***/ "./src/app/modules/sprints/components/sprint-detail/sprint-detail.component.css": /*!**************************************************************************************!*\ !*** ./src/app/modules/sprints/components/sprint-detail/sprint-detail.component.css ***! \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".sprintlogo {\r\n margin-top: -10px !important;\r\n}" /***/ }), /***/ "./src/app/modules/sprints/components/sprint-detail/sprint-detail.component.html": /*!***************************************************************************************!*\ !*** ./src/app/modules/sprints/components/sprint-detail/sprint-detail.component.html ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t

    760\">\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{{ Sprint.name }}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t

    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{{ Sprint.name }}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    900\">\r\n\t\t\t\t\t\t\t Back\r\n\t\t\t\t\t\t\t Make\r\n\t\t\t\t\t\t\t\tAvailable\r\n\t\t\t\t\t\t\t Mark Not\r\n\t\t\t\t\t\t\t\tAvailable\r\n\t\t\t\t\t\t\t  Edit\r\n\t\t\t\t\t\t\t Delete\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\r\n\t\t\t
    \r\n\t\t\t\t
    760\">\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    Account
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t{{ Sprint.customer_name }}\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    Status
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    Background
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    Icon
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    Country
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t 0\r\n\t\t\t\t\t\t\t\t\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\tTimeline\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t 0\r\n\t\t\t\t\t\t\t\t\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t{{ Sprint.schedulings[0].starts_at | date }}\r\n\t\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\t\tSprint.schedulings[0].finishes_at ===\r\n\t\t\t\t\t\t\t\t\t\"infinity\"\r\n\t\t\t\t\t\t\t\t\t\t? \" to infinity! \"\r\n\t\t\t\t\t\t\t\t\t\t: \" to \"\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\t\tSprint.schedulings[0].finishes_at ===\r\n\t\t\t\t\t\t\t\t\t\"infinity\"\r\n\t\t\t\t\t\t\t\t\t\t? \"\"\r\n\t\t\t\t\t\t\t\t\t\t: (Sprint.schedulings[0].finishes_at\r\n\t\t\t\t\t\t\t\t\t\t | date)\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    Allowed Workers
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t{{ Sprint.allowed_worker_ids }}\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tDisallowed Workers\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\tSprint.disallowed_worker_ids\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    Description
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    Arabic Description
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tShort Description\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tShort Description (AR)\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    Submissions
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{{ Sprint.submitted_count }}\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{{ Sprint.accepted_count }}\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{{ Sprint.rejected_count }}\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    Account
    \r\n\t\t\t\t\t\t
    {{ Sprint.customer_name }}
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    Status
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    Background
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    Icon
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    Country
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t 0\r\n\t\t\t\t\t\t\t\t\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\tTimeline\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t 0\r\n\t\t\t\t\t\t\t\t\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t{{ Sprint.schedulings[0].starts_at | date }}\r\n\t\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\t\tSprint.schedulings[0].finishes_at ===\r\n\t\t\t\t\t\t\t\t\t\"infinity\"\r\n\t\t\t\t\t\t\t\t\t\t? \" to infinity! \"\r\n\t\t\t\t\t\t\t\t\t\t: \" to \"\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\t\tSprint.schedulings[0].finishes_at ===\r\n\t\t\t\t\t\t\t\t\t\"infinity\"\r\n\t\t\t\t\t\t\t\t\t\t? \"\"\r\n\t\t\t\t\t\t\t\t\t\t: (Sprint.schedulings[0].finishes_at\r\n\t\t\t\t\t\t\t\t\t\t | date)\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tAllowed Workers\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t{{ Sprint.allowed_worker_ids }}\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tDisallowed Workers\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\tSprint.disallowed_worker_ids\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    Description
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    Arabic Description
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    Short Description
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    Short Description (AR)
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    Submissions
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{{ Sprint.submitted_count }}\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{{ Sprint.accepted_count }}\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{{ Sprint.rejected_count }}\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t

    \r\n\t\t\r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t
    \r\n\r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t
    \r\n\r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t
    \r\n\t\t\r\n\t\r\n\r\n\r\n
    \r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\r\n\t\r\n
    \r\n" /***/ }), /***/ "./src/app/modules/sprints/components/sprint-detail/sprint-detail.component.ts": /*!*************************************************************************************!*\ !*** ./src/app/modules/sprints/components/sprint-detail/sprint-detail.component.ts ***! \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); // import { Sprint } from './../model/sprint'; // import { Sprint } from 'src/app/model/sprint'; var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var platform_browser_1 = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js"); // import { Page} from '../model/page'; // import { ProjectService } from './../services/projectService'; var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var sprintService_1 = __webpack_require__(/*! ../../service/sprintService */ "./src/app/modules/sprints/service/sprintService.ts"); var SprintDetailComponent = /** @class */ (function () { function SprintDetailComponent(sprintService, activatedRoute, sanitizer, toastr, router) { this.sprintService = sprintService; this.activatedRoute = activatedRoute; this.sanitizer = sanitizer; this.toastr = toastr; this.router = router; this.Sprint = null; this.url = null; this.email = ""; this.backgroundImage = null; this.loading = true; this.id = ""; this.innerWidth = 0; this.taskIds = []; } SprintDetailComponent.prototype.ngOnInit = function () { var _this = this; this.innerWidth = window.innerWidth; this.activatedRoute.queryParams.subscribe(function (params) { _this.id = _this.activatedRoute.snapshot.paramMap.get("id"); console.log(_this.id); _this.GetSprint(); }); }; // end on init SprintDetailComponent.prototype.GetSprint = function () { var _this = this; this.sprintService.getSprint(this.email, this.id).then(function (sprint) { console.log("sprint>>", sprint); if (sprint.finishes_at == "infinity") sprint.finishes_at = new Date(2020, 1, 1); _this.Sprint = sprint; var getID = _this.Sprint.id; localStorage.setItem("localSprintID", getID); localStorage.setItem("saveTotalQuota", sprint.max_submission_count); if (_this.Sprint.backgroundurl === null || _this.Sprint.backgroundurl === "") _this.Sprint.backgroundurl = "/assets/images/bg.png"; if (_this.Sprint.iconurl === null || _this.Sprint.iconurl === "") _this.Sprint.iconurl = "/assets/images/icon.png"; _this.backgroundImage = _this.sanitizer.bypassSecurityTrustStyle("url(" + _this.Sprint.backgroundurl + ")"); console.log(_this.backgroundImage); _this.url = _this.sanitizer.bypassSecurityTrustUrl(_this.Sprint.backgroundurl); _this.loading = false; _this.Sprint.tasks.filter(function (task) { _this.taskIds.push(task.id); }); }); }; SprintDetailComponent.prototype.rewardSaved = function () { this.GetSprint(); }; SprintDetailComponent.prototype.getWidthTotals = function (submitted, accepted, rejected, a) { var width = 0; var total = accepted * 1 + rejected * 1 + submitted * 1; if (total === 0) return 0; if (a === 1) width = submitted / total; //; if (a === 2) width = accepted / total; //; if (a === 3) width = rejected / total; //; width = Math.ceil(width * 100); return width; }; SprintDetailComponent.prototype.getStatus = function (status) { if (status === 0) return ' Draft'; if (status === 1) return ' Available'; if (status === 2) return ' Not Available'; }; SprintDetailComponent.prototype.getCounty = function (country) { if (country === 206) return ' United Arab Emirates'; if (country === 166) return ' Saudi Arabia'; if (country === 58) return ' Egypt'; }; SprintDetailComponent.prototype.stripHtml = function (text) { return text ? String(text).replace(/<[^>]+>/gm, "") : ""; }; SprintDetailComponent.prototype.changeStatus = function (status) { var _this = this; this.Sprint.status = status; this.sprintService .saveProject(this.Sprint) .then(function (data) { // this.Sprint = data; _this.GetSprint(); if (_this.Sprint.id !== undefined && _this.Sprint.id !== null) { //this.router.navigate(['/sprints', this.Sprint.id]) } _this.toastr.success(_this.Sprint.name + " was saved successfully!!!"); }) .catch(function (err) { _this.toastr.success("Error in saving Sprint: " + JSON.stringify(err)); console.log(err); }); }; SprintDetailComponent.prototype.deleteProject = function () { var _this = this; if (confirm("Are you sure to delete " + this.Sprint.name)) { this.Sprint.is_deleted = true; this.sprintService .saveProject(this.Sprint) .then(function (data) { _this.toastr.success(_this.Sprint.name + " was deleted successfully!!!"); _this.router.navigate(["/sprints"]); _this.Sprint = data; }) .catch(function (err) { _this.toastr.success("Error in deleting Sprint: " + JSON.stringify(err)); console.log(err); }); } //end confirm }; //end delete function SprintDetailComponent.prototype.inerWindth = function () { this.innerWidth = window.innerWidth; return this.innerWidth; }; SprintDetailComponent = __decorate([ core_1.Component({ selector: "app-sprint-detail", template: __webpack_require__(/*! ./sprint-detail.component.html */ "./src/app/modules/sprints/components/sprint-detail/sprint-detail.component.html"), styles: [__webpack_require__(/*! ./sprint-detail.component.css */ "./src/app/modules/sprints/components/sprint-detail/sprint-detail.component.css")], }), __metadata("design:paramtypes", [sprintService_1.SprintService, router_1.ActivatedRoute, platform_browser_1.DomSanitizer, ngx_toastr_1.ToastrService, router_1.Router]) ], SprintDetailComponent); return SprintDetailComponent; }()); exports.SprintDetailComponent = SprintDetailComponent; //this.toastr.info(JSON.stringify(question)); // if(this.model.rewards === undefined || this.model.rewards === null) this.model.questions = []; // if(question.id != null && question.id !== 0) this.model.questions.splice(this.model.questions.findIndex(q=>q.id=== question.id), 1, question); // else this.model.questions.push(question); // /***/ }), /***/ "./src/app/modules/sprints/components/sprint-edit/sprint-edit.component.css": /*!**********************************************************************************!*\ !*** ./src/app/modules/sprints/components/sprint-edit/sprint-edit.component.css ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/modules/sprints/components/sprint-edit/sprint-edit.component.html": /*!***********************************************************************************!*\ !*** ./src/app/modules/sprints/components/sprint-edit/sprint-edit.component.html ***! \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\r\n\r\n\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t  \r\n\t\t\t\r\n\t\t\t  \r\n\t\t\t\r\n\t\t
    \r\n\t
    \r\n\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t\t Basic Details\r\n\t\t
    \r\n\t\t\r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tArabic Name\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tArabic Name is required\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tSystem Name\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tSystem Name is required\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\r\n\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tAccount\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tAccount is required\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tCustomer Name\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tCustomer Name is required\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tCountry\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tCountry is required\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tPriority\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tPriority is required\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tQuota\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tQuota is required\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tQuota Per Worker\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tQuota Per Worker is required\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t\t Sprint Details\r\n\t\t
    \r\n\t\t\r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tBackground\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tChoose Background File..\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tIcon\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tChoose Icon File..\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tAllowed Worker Ids\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tCommunity\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tAuto Accept\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\r\n\t\t\r\n\t\r\n\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t\t Scheduling\r\n\t\t\t\r\n\t\t
    \r\n\t\t\r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tRun Sprint Immediatly\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tStart and End Date\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tRun Sprint everyday\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tApply Date Hour Limits\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\tFROM\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tTO\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t\t Targeting\r\n\t\t\t\r\n\t\t
    \r\n\t\t\r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\r\n\t\t\r\n\t\r\n\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t  \r\n\t\t\t\r\n\t\t
    \r\n\t
    \r\n\r\n" /***/ }), /***/ "./src/app/modules/sprints/components/sprint-edit/sprint-edit.component.ts": /*!*********************************************************************************!*\ !*** ./src/app/modules/sprints/components/sprint-edit/sprint-edit.component.ts ***! \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); // import { AccountService } from './../services/accountService'; var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var accountService_1 = __webpack_require__(/*! src/app/services/accountService */ "./src/app/services/accountService.ts"); // import { Page } from '../model/page'; // import { Page } from 'src/app/model/page'; var pageSubmissionModel_1 = __webpack_require__(/*! src/app/modules/sprints/components/submissionFile/model/pageSubmissionModel */ "./src/app/modules/sprints/components/submissionFile/model/pageSubmissionModel.ts"); var sprintService_1 = __webpack_require__(/*! ../../service/sprintService */ "./src/app/modules/sprints/service/sprintService.ts"); // import { ProjectService } from '../services/projectService'; var http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var ngx_uploader_1 = __webpack_require__(/*! ngx-uploader */ "./node_modules/ngx-uploader/fesm5/ngx-uploader.js"); // import { BreadCrumb } from '../model/BreadCrumb'; var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var BreadCrumb_1 = __webpack_require__(/*! src/app/model/BreadCrumb */ "./src/app/model/BreadCrumb.ts"); // import { GoogleService, GoogleObj } from '../services/google.services'; var google_services_1 = __webpack_require__(/*! src/app/services/google.services */ "./src/app/services/google.services.ts"); var SprintEditComponent = /** @class */ (function () { function SprintEditComponent(accountService, sprintService, _google, activatedRoute, http, router, toastr) { this.accountService = accountService; this.sprintService = sprintService; this._google = _google; this.activatedRoute = activatedRoute; this.http = http; this.router = router; this.toastr = toastr; this.uploadUrl = "https://bu0vboz957.execute-api.us-east-2.amazonaws.com/development/file?name="; this.googleObj = new google_services_1.GoogleObj(); this.minDate = new Date(); this.submitted = false; this.schedule = false; this.availability = false; this.minValue = 1; this.maxValue = 99; this.allowed = null; this.disallowed = null; this.os = 0; this.gender = 0; this.imageUrl = ""; this.from = new Date(); // to = new Date(); this.to = null; this.sliderOptions = { floor: 0, ceil: 100, step: 5, }; this.accounts = []; this.countries = [ { id: 206, name: " United Arab Emirates", image: "/assets/icons/uae-round.png", }, { id: 166, name: " Saudi Arabia", image: "/assets/icons/ksa-round.png", }, { id: 58, name: " Egypt", image: "/assets/icons/egypt-round.png" }, { id: 999, name: " Global", image: "/assets/icons/earth1.png" }, ]; this.quill = null; this.loading = true; this.email = null; this.id = null; this.user = null; this.model = { id: null, name: "", namear: "", account_id: null, customer_name: "Muhimma", status: 0, country_id: 999, is_auto_acceptable: true, is_community: false, is_pilot: false, tag: "Muhimma", forms: [], tasks: [], files: [], rewards: [], priority: 5, created_at: new Date(), updated_at: new Date(), schedulings: [], system_name: "", max_submission_count: 100, max_submission_count_per_worker: 1, // tslint:disable-next-line:max-line-length description: "", descriptionar: "", short_description: "", short_description_ar: "", extra_text: "", is_deleted: false, started_at: new Date(), finished_at: null, area_id: null, iconurl: null, backgroundurl: "", }; this.filterAccounts(null); this.options = { concurrency: 1, maxUploads: 3 }; this.files = []; // local uploading files array this.uploadInput = new core_1.EventEmitter(); // input events, we use this to emit data to ngx-uploader this.humanizeBytes = ngx_uploader_1.humanizeBytes; } SprintEditComponent.prototype.onEditorCreated = function (quill) { var toolbar = quill.getModule("toolbar"); toolbar.addHandler("image", this.imageHandler()); this.quill = quill; // console.log("Editor Created was invoked" + quill); }; SprintEditComponent.prototype.imageHandler = function () { var _this = this; var Imageinput = document.createElement("input"); Imageinput.setAttribute("type", "file"); Imageinput.setAttribute("accept", "image/png, image/gif, image/jpeg, image/bmp, image/x-icon"); Imageinput.classList.add("ql-image"); Imageinput.addEventListener("change", function () { var file = Imageinput.files[0]; if (Imageinput.files != null && Imageinput.files[0] != null) { _this.uploadFile(Imageinput.files[0]); _this.pushImageToEditor(); } }); // Imageinput.click(); }; SprintEditComponent.prototype.pushImageToEditor = function () { var range = this.quill.getSelection(true); var index = range.index + range.length; this.quill.insertEmbed(range.index, "image", this.imageUrl); }; SprintEditComponent.prototype.ngOnInit = function () { var _this = this; this.user = JSON.parse(localStorage.getItem("user")); var role = this.user ? this.user.role : "a"; if (role === "a") { // this.countries = this.countries.filter(c => c.id === this.user.country_id); } this.activatedRoute.queryParams.subscribe(function (params) { _this.id = _this.activatedRoute.snapshot.paramMap.get("id"); // console.log(this.email); if (_this.id > 0) { _this.sprintService .getSprint(_this.email, _this.id) .then(function (sprint) { _this.model = sprint; _this.startDate = _this.model.started_at; _this.endDate = _this.model.finished_at; _this.allowed = _this.model.allowed_worker_ids; _this.disallowed = _this.model.disallowed_worker_ids; if (_this.model.schedulings !== null && _this.model.schedulings !== undefined) { // this.schedule = true; if (_this.model.schedulings !== undefined && _this.model.schedulings !== null && _this.model.schedulings.length > 0) { _this.from = _this.model.schedulings[0].starts_at; _this.to = _this.model.schedulings[0].finishes_at; if (_this.model.schedulings[0].finishes_at) { _this.schedule = true; } } } _this.buildBreadCrumb(); _this.loading = false; }); } else { _this.loading = false; } }); }; SprintEditComponent.prototype.onSubmit = function () { this.submitted = true; }; SprintEditComponent.prototype.getURL = function (name) { return this.uploadUrl + this.model.name.replace(/\s/g, "") + name; }; SprintEditComponent.prototype.filterAccounts = function (search) { var _this = this; var p = new pageSubmissionModel_1.Page(); p.pageNumber = 0; p.totalElements = 100; p.totalPages = 1; p.size = 100; this.accountService .getResult(p, this.email) .then(function (accounts) { return (_this.accounts = accounts.data); }); }; SprintEditComponent.prototype.buildBreadCrumb = function () { // tslint:disable-next-line:comment-format //Sprints? Sprint()>Task Forms () this.crumbs = []; this.crumbs.push(new BreadCrumb_1.BreadCrumb("Home", "/")); this.crumbs.push(new BreadCrumb_1.BreadCrumb("Sprints", "/sprints")); this.crumbs.push(new BreadCrumb_1.BreadCrumb(this.model.name ? this.model.name : "Sprint", "")); }; SprintEditComponent.prototype.translate = function () { var _this = this; this.doTranslate(this.model.name).then(function (d) { _this.model.namear = d.toString(); }); this.doTranslate(this.model.description).then(function (d) { _this.model.descriptionar = d.toString(); }); this.doTranslate(this.model.short_description).then(function (d) { _this.model.short_description_ar = d.toString(); }); }; SprintEditComponent.prototype.doTranslate = function (key) { var _this = this; return new Promise(function (resolve, reject) { _this._google.translate(_this.googleObj, key).subscribe(function (res) { resolve(res.data.translations[0].translatedText); }, function (err) { console.log(err); reject(err); }); }); }; //////////////////////////////////////////////////////////// SprintEditComponent.prototype.onUploadOutput = function (output, c) { var _this = this; switch (output.type) { case "allAddedToQueue": var file = c === "icon" ? this.iconFile : this.backroundFile; var name_1 = file ? file.name : new Date().getTime() + ".jpeg"; var reader = new FileReader(); name_1 = this.model.name.replace(/\s/g, "") + name_1; this.getBase64fromFile(file.nativeFile).then(function (d) { var headers = new http_1.HttpHeaders().set("Content-Type", "multipart/form-data"); headers.set("Accept", "application/json"); // tslint:disable-next-line:max-line-length if (c === "icon") { _this.model.iconurl = "../../assets/images/loading.gif"; } else { _this.model.backgroundurl = "../../assets/images/loading.gif"; } _this.http .post(_this.uploadUrl + name_1, d.body, { headers: headers }) .subscribe(function (data) { if (c === "icon") { _this.model.iconurl = data.Location; } else { _this.model.backgroundurl = data.Location; } _this.toastr.success("File Uploaded"); }, function (error) { console.log("Error in uoloaing file: " + error); }); }); break; case "addedToQueue": if (typeof output.file !== "undefined") { if (c === "icon") { this.iconFile = output.file; } else { this.backroundFile = output.file; } } break; case "uploading": if (typeof output.file !== "undefined") { // update current data in files array for uploading file var index = this.files.findIndex(function (file) { return typeof output.file !== "undefined" && file.id === output.file.id; }); this.files[index] = output.file; } break; case "removed": // remove file from array when removed this.files = this.files.filter(function (file) { return file !== output.file; }); break; case "dragOver": this.dragOver = true; break; case "dragOut": case "drop": this.dragOver = false; break; case "done": console.log(output.file.response.Location); // tslint:disable-next-line:max-line-length if (c === "icon") { this.model.iconurl = output.file.response.Location; } else { this.model.backgroundurl = output.file.response.Location; } // The file is downloaded //////////////////////////////////////////////////////////////////////// if (this.model.files === null || this.model.files.length === 0 || this.model.files.find(function (f) { return f.upload_type === (c === "icon" ? 0 : 1); }) === undefined) { this.model.files.push({ id: null, created_at: new Date(), uploadable_type: "Project", uploadable_id: this.model.id, upload_type: c === "icon" ? 0 : 1, url: output.file.response.Location, is_deleted: false, updated_at: new Date(), }); } else { this.model.files.find(function (f) { return f.upload_type === (c === "icon" ? 0 : 1); }).url = output.file.response.Location; } break; } }; SprintEditComponent.prototype.uploadFile = function (file) { var _this = this; var reader = new FileReader(); var name = this.model.name.replace(/\s/g, "") + new Date().getMilliseconds(); this.getBase64fromFile(file.nativeFile).then(function (d) { var headers = new http_1.HttpHeaders().set("Content-Type", "multipart/form-data"); headers.set("Accept", "application/json"); _this.http .post(_this.uploadUrl + name, d.body, { headers: headers }) .subscribe(function (data) { _this.imageUrl = data.Location; _this.toastr.success("File Uploaded"); }, function (error) { console.log("Error in uoloaing file: " + error); }); }); }; SprintEditComponent.prototype.startUpload = function () { var event = { type: "uploadAll", url: this.uploadUrl, method: "POST", data: { name: "bar.jpeg" }, }; this.uploadInput.emit(event); }; SprintEditComponent.prototype.cancelUpload = function (id) { this.uploadInput.emit({ type: "cancel", id: id }); }; SprintEditComponent.prototype.removeFile = function (id) { this.uploadInput.emit({ type: "remove", id: id }); }; SprintEditComponent.prototype.removeAllFiles = function () { this.uploadInput.emit({ type: "removeAll" }); }; SprintEditComponent.prototype.getBase64fromFile = function (file) { return new Promise(function (resolve, reject) { var reader = new FileReader(); reader.readAsDataURL(file); reader.onload = function () { console.log("getBase64fromFile success."); var spliced = reader.result.toString().split(","); var header = spliced[0]; spliced.shift(); resolve({ header: header, body: spliced.join(""), }); }; reader.onerror = function (err) { console.log("getBase64fromFile failed."); reject(err); }; }); }; ///////////////////////////////////////////////////////////////// SprintEditComponent.prototype.back = function () { if (this.model.id == null) { this.router.navigate(["sprints"]); } else { this.router.navigate(["sprints", this.model.id]); } }; SprintEditComponent.prototype.postForm = function () { var _this = this; if (this.model.name == "") { this.toastr.warning("Please insert the English Name"); return false; } if (this.model.namear == "") { this.toastr.warning("Please insert the Arabic Name"); return false; } if (this.model.system_name == "") { this.toastr.warning("Please insert the System Name"); return false; } if (this.model.customer_name == "") { this.toastr.warning("Please insert the Customer Name"); return false; } if (this.model.max_submission_count <= 0 || this.model.max_submission_count == null || !this.model.max_submission_count) { this.toastr.warning("Quota must be greater than 0"); return false; } if (this.model.priority <= 0 || this.model.priority == null || !this.model.priority) { this.toastr.warning("Priority must be greater than 0"); return false; } if (this.model.max_submission_count_per_worker <= 0 || this.model.max_submission_count_per_worker == null || !this.model.max_submission_count_per_worker) { this.toastr.warning("Worker Quota must be greater than 0"); return false; } var bolv = false; var messageError = ""; if (this.allowed !== null && this.allowed.length > 0) { console.log(this.allowed); this.model.allowed_worker_ids = this.allowed .toString() .split(",") .map(Number); this.model.allowed_worker_ids.forEach(function (elementAllowd) { if (elementAllowd <= 0) { bolv = true; messageError = "Allowd Worker Ids should not be a negative and not be equal to zero"; } }); } else { this.model.allowed_worker_ids = []; } // tslint:disable-next-line:max-line-length if (this.disallowed !== null && this.disallowed.length > 0) { this.model.disallowed_worker_ids = this.disallowed .toString() .split(",") .map(Number); this.model.disallowed_worker_ids.forEach(function (elementDisAllowd) { if (elementDisAllowd <= 0) { bolv = true; messageError = "disallowd Worker Ids should not be a negative and not be equal to zero"; } }); } else { this.model.disallowed_worker_ids = []; } if (bolv) { this.toastr.warning(messageError); return false; } if (this.from !== null) { if (this.model.schedulings === null || this.model.schedulings.length === 0) { this.model.schedulings.push({ id: null, created_at: new Date(), updated_at: new Date(), starts_at: this.from, finishes_at: this.to, available_on_friday: true, available_on_monday: true, available_on_tuesday: true, available_on_sunday: true, available_on_saturday: true, available_on_thursday: true, available_on_wednesday: true, }); } else { this.model.schedulings[0].starts_at = this.from; this.model.schedulings[0].finishes_at = this.to; } //add a new scheduling } if (!this.model.files) { this.model.files = []; } if (this.model.backgroundurl !== null && this.model.backgroundurl !== undefined) { var file = this.model.files.find(function (f) { return f.upload_type === 1; }); if (file) { file.url = this.model.backgroundurl; } else { this.model.files.push({ id: null, created_at: new Date(), updated_at: new Date(), upload_type: 1, uploadable_id: this.model.id, uploadable_type: "Project", url: this.model.backgroundurl, is_deleted: false, }); } } if (this.model.iconurl !== null && this.model.iconurl !== undefined) { var file = this.model.files.find(function (f) { return f.upload_type === 0; }); if (file) { this.model.files.find(function (f) { return f.upload_type === 0; }).url = this.model.iconurl; } else { this.model.files.push({ id: null, created_at: new Date(), updated_at: new Date(), upload_type: 0, uploadable_id: this.model.id, uploadable_type: "Project", url: this.model.iconurl, is_deleted: false, }); } } var targeting = { gender: this.gender, os: this.os, updated_at: new Date(), created_at: new Date(), id: null, project_id: this.model.id, min: this.minValue, max: this.maxValue, }; this.sprintService .saveProject(this.model) .then(function (data) { _this.model = data; if (_this.model.id !== undefined && _this.model.id !== null) { targeting.project_id = _this.model.id; // tslint:disable-next-line:max-line-length _this.sprintService .saveTargeting(targeting) .then(function (data) { return console.log("Saved Targeting"); }) .catch(function (err) { return console.log("targeting was not saved" + JSON.stringify(err)); }); _this.router.navigate(["/sprints", _this.model.id]); } _this.toastr.success(_this.model.name + " was saved successfully!!!"); }) .catch(function (err) { _this.toastr.success("Error in saving Sprint: " + JSON.stringify(err)); console.log(err); }); }; // end post form SprintEditComponent.prototype.handleScheduleTiming = function () { if (this.schedule === false) { this.from = new Date(); this.model.started_at = new Date(); this.to = null; this.model.finished_at = null; } else { this.from = this.startDate; this.model.started_at = this.startDate; this.to = this.endDate; this.model.finished_at = this.endDate; } }; SprintEditComponent.prototype.onDateChange = function (event, startOrEnd) { if (startOrEnd === "start") { this.from = event; this.model.started_at = event; } else { this.to = event; this.model.finished_at = event; } // console.log({ // from: this.from, // to: this.to, // event, // minDate: this.minDate, // }); // this.endDate = event; // console.log("ENDDATE:" + this.endDate); // console.log("STARTDATE:" + this.startDate); }; SprintEditComponent = __decorate([ core_1.Component({ selector: "app-sprint-edit", template: __webpack_require__(/*! ./sprint-edit.component.html */ "./src/app/modules/sprints/components/sprint-edit/sprint-edit.component.html"), styles: [__webpack_require__(/*! ./sprint-edit.component.css */ "./src/app/modules/sprints/components/sprint-edit/sprint-edit.component.css")], }), __metadata("design:paramtypes", [accountService_1.AccountService, sprintService_1.SprintService, google_services_1.GoogleService, router_1.ActivatedRoute, http_1.HttpClient, router_1.Router, ngx_toastr_1.ToastrService]) ], SprintEditComponent); return SprintEditComponent; }()); exports.SprintEditComponent = SprintEditComponent; /***/ }), /***/ "./src/app/modules/sprints/components/sprint-list/sprint-list.component.css": /*!**********************************************************************************!*\ !*** ./src/app/modules/sprints/components/sprint-list/sprint-list.component.css ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".datatable-body-cell img {\r\n margin-top: -5px;\r\n padding-top: 0px !important;\r\n}\r\n\r\n.ngx-datatable.bootstrap .datatable-body .datatable-body-row .datatable-body-cell {\r\n padding: 0.75rem;\r\n padding-top: 0.0rem !important;\r\n padding-right: 0.75rem;\r\n padding-bottom: 0.75rem;\r\n padding-left: 0.75rem;\r\n text-align: left;\r\n vertical-align: top;\r\n}\r\n\r\n.logo {\r\n margin-top: -10px !important;\r\n}\r\n\r\n@media (max-width: 768px) {\r\n .700hide {\r\n display: none !important;\r\n }\r\n}" /***/ }), /***/ "./src/app/modules/sprints/components/sprint-list/sprint-list.component.html": /*!***********************************************************************************!*\ !*** ./src/app/modules/sprints/components/sprint-list/sprint-list.component.html ***! \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\n\t
    \r\n\t\t
    \r\n\t\t\t

    Sprints

    \r\n\t\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t
    \r\n\t
    \r\n
    \r\n
    760\">\r\n\t
    \r\n\t\t
    \r\n\t\t\t

    Sprints

    \r\n\t\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t
    \r\n\r\n\t\t
    \r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t\t\r\n\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t
    \r\n\t\t
    \r\n\t\t\t\r\n\r\n\t\t\tNew Sprint\r\n\t\t
    \r\n\t
    \r\n\r\n
    \r\n\r\n
    \r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{{ value }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{{ value }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\tCompletion\r\n\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\tgetWidth(\r\n\t\t\t\t\t\t\t\trow[\"max_submission_count\"],\r\n\t\t\t\t\t\t\t\trow[\"accepted_count\"]\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t}}%\r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\tSubmissions\r\n\r\n\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{{ row[\"submitted_count\"] }}\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{{ row[\"accepted_count\"] }}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{{ row[\"rejected_count\"] }}\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\r\n\t\t\r\n\t\t\r\n\t\t\t Start \r\n\t\t\t\r\n\t\t\t\t{{ value | date : \"shortDate\" }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t Finish \r\n\t\t\t\r\n\t\t\t\t{{ value | date : \"shortDate\" }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\tLastest Acticity\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t{{ value | date : \"shortDate\" }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\tTotal Spent\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t{{ value }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t \r\n\t\t\t\r\n\t\t\t\t Edit\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n" /***/ }), /***/ "./src/app/modules/sprints/components/sprint-list/sprint-list.component.ts": /*!*********************************************************************************!*\ !*** ./src/app/modules/sprints/components/sprint-list/sprint-list.component.ts ***! \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); // import { Sprint } from './../model/sprint'; var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); // import { Page} from '../model/page'; // import { Page } from 'src/app/model/page'; var pageSubmissionModel_1 = __webpack_require__(/*! src/app/modules/sprints/components/submissionFile/model/pageSubmissionModel */ "./src/app/modules/sprints/components/submissionFile/model/pageSubmissionModel.ts"); // import { ProjectService } from './../services/projectService'; var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var sprintService_1 = __webpack_require__(/*! ../../service/sprintService */ "./src/app/modules/sprints/service/sprintService.ts"); var SprintListComponent = /** @class */ (function () { function SprintListComponent(sprintService, toastr) { this.sprintService = sprintService; this.toastr = toastr; this.allowed = true; this.page = new pageSubmissionModel_1.Page(); this.rows = []; this.loadingIndicator = true; this.reorderable = true; this.search = ""; this.loading = true; this.range = "0"; this.expanded = {}; this.status = 1; this.newstatus = 1; this.country = null; this.from = null; this.to = null; this.account = null; this.sort = null; this.innerWidth = 0; this.searchCount = 0; this.page.pageNumber = 0; this.page.size = 30; } SprintListComponent.prototype.ngOnInit = function () { this.innerWidth = window.innerWidth; this.setPage({ offset: 0, pageSize: 30 }); }; SprintListComponent.prototype.setPage = function (pageInfo) { this.page.size = pageInfo.pageSize; this.page.pageNumber = pageInfo.offset; this.loadingIndicator = true; this.filter(); }; SprintListComponent.prototype.filter = function () { var _this = this; if (this.search && this.searchCount === 0) { this.searchCount = this.searchCount + 1; this.page.pageNumber = 0; } this.loadingIndicator = true; this.sprintService .getResult(this.page, null, this.search.trim(), this.country, this.account, this.status) .then(function (pagedData) { _this.page = pagedData.page; if (!_this.page.size) _this.page.size = 30; if (pagedData.data.response_code == 200) { var record = pagedData.data.data.data; _this.rows = record; _this.loading = false; _this.loadingIndicator = false; console.log(_this.rows); } else if (pagedData.data.response_code == 422) { _this.loading = false; _this.loadingIndicator = false; return _this.toastr.error(pagedData.data.message); } else if (pagedData.data.response_code == 500) { _this.loading = false; _this.loadingIndicator = false; return _this.toastr.error(pagedData.data.message); } }); }; SprintListComponent.prototype.setDateRange = function () { var dt = new Date(); var month = dt.getMonth(), year = dt.getFullYear(); if (this.range === "0") this.from = new Date(year, month, 0); if (this.range === "0") this.to = new Date(year, month + 1, 0); if (this.range === "1") this.from = new Date(year, month - 1, 1); if (this.range === "1") this.to = new Date(year, month + 1, 0); if (this.range === "2") this.from = new Date(year, month - 3, 1); if (this.range === "2") this.to = new Date(year, month + 1, 0); if (this.range === "3") this.from = new Date(year, 1, 1); if (this.range === "3") this.to = new Date(year + 1, 1, 0); //console.log(this.range, this.from, this.to); this.filter(); }; SprintListComponent.prototype.onSort = function (event) { var _this = this; // event was triggered, start sort sequence console.log("Sort Event", event); this.loading = true; setTimeout(function () { _this.loading = false; }, 1000); }; //end sort SprintListComponent.prototype.getWidth = function (required, completed) { // console.log("x ==>",required,completed) // let width = 0; // if((completed*1) > 0) {width = (required*1)/(completed*1);} // if(width>100 ) width=100; // width = Math.ceil(width); // return width; var width = 0; if (completed * 1 > 0) { width = ((completed * 1) / (required * 1)) * 100; } if (width > 100) width = 100; width = Math.ceil(width); return width; }; SprintListComponent.prototype.getWidthTotals = function (submitted, accepted, rejected, a) { var width = 0; var total = accepted * 1 + rejected * 1 + submitted * 1; if (total === 0) return 0; if (a === 1) width = submitted / total; //; if (a === 2) width = accepted / total; //; if (a === 3) width = rejected / total; //; width = Math.ceil(width * 100); return width; }; SprintListComponent.prototype.getCompletion = function (required, completed) { var html = ""; var width = 0; if (completed * 1 > 0) { width = (required * 1) / (completed * 1); } if (width > 100) width = 100; width = Math.ceil(width); // html = `
    //
    ${width}%
    //
    `; html = '
    '; return html; }; SprintListComponent.prototype.getStatus = function (status) { if (status === 0 || status === "Draft") return 'Draft'; if (status === 1 || status === "Available") return 'Available'; if (status === 2 || status === "NotAvailable") return 'Not Available'; }; SprintListComponent = __decorate([ core_1.Component({ selector: "app-sprint-list", template: __webpack_require__(/*! ./sprint-list.component.html */ "./src/app/modules/sprints/components/sprint-list/sprint-list.component.html"), styles: [__webpack_require__(/*! ./sprint-list.component.css */ "./src/app/modules/sprints/components/sprint-list/sprint-list.component.css")], }), __metadata("design:paramtypes", [sprintService_1.SprintService, ngx_toastr_1.ToastrService]) ], SprintListComponent); return SprintListComponent; }()); exports.SprintListComponent = SprintListComponent; /***/ }), /***/ "./src/app/modules/sprints/components/submissionFile/model/pageSubmissionModel.ts": /*!****************************************************************************************!*\ !*** ./src/app/modules/sprints/components/submissionFile/model/pageSubmissionModel.ts ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var Page = /** @class */ (function () { function Page() { // The number of elements in the page this.size = 0; // The total number of elements this.totalElements = 0; // The total number of pages this.totalPages = 0; // The current page number this.pageNumber = 0; } return Page; }()); exports.Page = Page; /***/ }), /***/ "./src/app/modules/sprints/components/submissionFile/service/submissionReqService.ts": /*!*******************************************************************************************!*\ !*** ./src/app/modules/sprints/components/submissionFile/service/submissionReqService.ts ***! \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); // import { PagedData } from '../model/paged-data'; var paged_data_1 = __webpack_require__(/*! src/app/model/paged-data */ "./src/app/model/paged-data.ts"); var aws_amplify_1 = __webpack_require__(/*! aws-amplify */ "./node_modules/aws-amplify/lib/index.js"); // import { AuthService } from '../auth/auth.service'; var auth_service_1 = __webpack_require__(/*! src/app/auth/auth.service */ "./src/app/auth/auth.service.ts"); var core_2 = __webpack_require__(/*! @ngx-loading-bar/core */ "./node_modules/@ngx-loading-bar/core/fesm5/ngx-loading-bar-core.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); /** * A server used to mock a paged data result from a server */ var SubmissionReqService = /** @class */ (function () { function SubmissionReqService(auth, loader, toastr) { this.auth = auth; this.loader = loader; this.toastr = toastr; } /** * A method that mocks a paged server response * @param page The selected page * @returns {any} An observable containing the employee data */ // public getResults(page: Page, email: string, worker_id: number, status:number, type: number ): Observable> { // return of(this.getPagedData(page, email, worker_id, status, type)); // } SubmissionReqService.prototype.getById = function (email, id) { var _this = this; var apiName = 'api_node_1'; var path = "submission?email=" + email + "&id=" + id; var myInit = { headers: {}, response: true, queryStringParameters: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { var data = response.data; if (data.response_code == 200) { _this.loader.complete(); resolve(data.data); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { console.log('Error in invoiking API:' + error); reject(error); }); }); // end promoise return promise; }; SubmissionReqService.prototype.getResult = function (page, email, worker_id, status, type, project, reportable, from, to) { var _this = this; var pagedData = new paged_data_1.PagedData(); if (page.size === null || page.size === undefined) page.size = 100; var apiName = 'api_node_1'; var s = (status ? '&status=' + status : '') + (worker_id ? '&worker=' + worker_id : '') + (project ? '&project=' + project : '') + (reportable ? '&reportable=' + reportable : '') + (from ? '&from=' + from : '') + (to ? '&to=' + to : '') + (type ? '&type=' + type : ''); var path = "submissions?1=1" + s + "&limit=" + page.size + "&offset=" + page.pageNumber * page.size; var myInit = { headers: {}, response: true, queryStringParameters: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { var data = response.data; _this.loader.complete(); if (data.response_code == 200) { page.totalElements = data.data.count; page.totalPages = page.totalElements / page.size; var start = page.pageNumber * page.size; var end = Math.min((start + page.size), page.totalElements); pagedData.page = page; pagedData.data = data.data.data; console.log("submission details = >", pagedData); resolve(pagedData); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { console.log('Error in invoiking API:' + error); reject(error); }); }); // end promoise return promise; }; // end getresult // public getTomTomResults(page: Page,worker_id: number, status:number, project: number ): Observable> { // return of(this.getTomtomPagedData(page, worker_id, status, project)); // } // private getPagedData(page: Page, email: string, worker_id: number, staus:number, type: number ): PagedData { // const pagedData = new PagedData(); // const apiName = 'api'; // let s = (status ? '&status=' + status : '') + (worker_id ? '&worker='+worker_id: '')+(type ? '&type='+type: ''); // const path = `submissions?email=${email}${s}&limit=${page.size}&offset=${page.pageNumber * page.size}`; const myInit = { // headers: {}, // OPTIONAL // response: true, // OPTIONAL (return the entire Axios response object instead of only response.data) // queryStringParameters: {} // }; // API.get(apiName, path, myInit) // .then(response => { // const data = response.data; // page.totalElements = data.count; // page.totalPages = page.totalElements / page.size; // const start = page.pageNumber * page.size; // const end = Math.min((start + page.size), page.totalElements); // pagedData.data = data.data; // }) // .catch(error => { // console.log('Error in invoiking API:' + error); // }); // pagedData.page = page; // return pagedData; // } SubmissionReqService.prototype.getSubmissionTelly = function (id) { var _this = this; var apiName = 'api_node_2'; var path = "sprint/task-quota-usage?id=" + id; var myInit = { headers: {}, response: true, queryStringParameters: {} }; var promise = new Promise(function (resolve, reject) { _this.loader.start(); aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { console.log(response); var data = response.data; if (data.response_code == 200) { _this.loader.complete(); resolve(data); } else { return _this.toastr.error(data.error); } }) .catch(function (error) { _this.toastr.error(error); reject(error); }); }); // end promoise return promise; }; SubmissionReqService.prototype.saveSubmissions = function (form) { var _this = this; var apiName = 'api_node_1'; var path = "submissions"; var myInit = { body: form, headers: {} }; var promise = new Promise(function (resolve, reject) { _this.loader.start(); aws_amplify_1.API.post(apiName, path, myInit) .then(function (response) { var data = response; console.log("success message check =>", data); if (data.response_code == 200) { _this.loader.complete(); resolve(data.data); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; SubmissionReqService.prototype.saveSubmission = function (id, agent_id, status) { var _this = this; var apiName = 'api'; var path = "submission?submission=" + id + "&agent=" + agent_id + "&status=" + status; var myInit = { // body: form, headers: {} }; var promise = new Promise(function (resolve, reject) { _this.loader.start(); aws_amplify_1.API.put(apiName, path, myInit) .then(function (response) { var data = response.data; _this.loader.complete(); resolve('OK'); }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; SubmissionReqService.prototype.exportIntoSpss = function (ids) { var _this = this; var apiName = 'api_node_2'; var path = "submission/export"; var myInit = { body: ids, headers: {} }; var promise = new Promise(function (resolve, reject) { _this.loader.start(); aws_amplify_1.API.post(apiName, path, myInit) .then(function (response) { var data = response; console.log("success message check =>", data); if (data.response_code == 200) { _this.loader.complete(); resolve(data.data); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; SubmissionReqService = __decorate([ core_1.Injectable({ providedIn: "root" }), __metadata("design:paramtypes", [auth_service_1.AuthService, core_2.LoadingBarService, ngx_toastr_1.ToastrService]) ], SubmissionReqService); return SubmissionReqService; }()); exports.SubmissionReqService = SubmissionReqService; /***/ }), /***/ "./src/app/modules/sprints/components/submissionFile/submission-telly/submission-telly.component.css": /*!***********************************************************************************************************!*\ !*** ./src/app/modules/sprints/components/submissionFile/submission-telly/submission-telly.component.css ***! \***********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "ul {\r\n\tlist-style: none;\r\n\tpadding: 0;\r\n}\r\nspan {\r\n\tcolor: black;\r\n}\r\n" /***/ }), /***/ "./src/app/modules/sprints/components/submissionFile/submission-telly/submission-telly.component.html": /*!************************************************************************************************************!*\ !*** ./src/app/modules/sprints/components/submissionFile/submission-telly/submission-telly.component.html ***! \************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n OS\r\n \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n
    NameUsage QuotaTotal Quota
    \r\n\t\t\t\t\t\t\t\t\t\t\t
      \r\n\t\t\t\t\t\t\t\t\t\t\t\t
    • \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{{lebel}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t
    • \r\n\t\t\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t
    {{os.count}}{{os.quota}}
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n Age\r\n \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
    RangeUsage QuotaTotal Quota
    {{age.label}}{{age.count}}{{age.quota}}
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n Area\r\n \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n
    NameUsage QuotaTotal Quota
    \r\n\t\t\t\t\t\t\t\t\t\t\t
      \r\n\t\t\t\t\t\t\t\t\t\t\t\t
    • \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{{lebel}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t
    • \r\n\t\t\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t
    {{area.count}}{{area.quota}}
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n
    NameUsage QuotaTotal Quota
    \r\n\t\t\t\t\t\t\t\t\t\t\t
      \r\n\t\t\t\t\t\t\t\t\t\t\t\t
    • \r\n\t\t\t\t\t\t\t\t\t\t\t\t\tMale\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tFemale\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tALL\r\n\t\t\t\t\t\t\t\t\t\t\t\t
    • \r\n\t\t\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t
    {{gender.count}}{{gender.quota}}
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n
    NameUsage QuotaTotal Quota
    \r\n\t\t\t\t\t\t\t\t\t\t\t
      \r\n\t\t\t\t\t\t\t\t\t\t\t\t
    • \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{{lebel}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t
    • \r\n\t\t\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t
    {{nationality.count}}{{nationality.quota}}
    \r\n
    \r\n\r\n
    \r\n
    \r\n\t\t\t\t\t
    \r\n
    0\">\r\n
    \r\n \r\n Tags\r\n \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n
    NameUsage QuotaTotal Quota
    {{tag.name_en}}{{tag.count}}{{tag.quota}}
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n" /***/ }), /***/ "./src/app/modules/sprints/components/submissionFile/submission-telly/submission-telly.component.ts": /*!**********************************************************************************************************!*\ !*** ./src/app/modules/sprints/components/submissionFile/submission-telly/submission-telly.component.ts ***! \**********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var SubmissionTellyComponent = /** @class */ (function () { function SubmissionTellyComponent() { this._quotaData = []; } Object.defineProperty(SubmissionTellyComponent.prototype, "quotaData", { get: function () { return this._quotaData; }, set: function (name) { this._quotaData = (name) || ''; }, enumerable: true, configurable: true }); SubmissionTellyComponent.prototype.ngOnInit = function () { }; __decorate([ core_1.Input(), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], SubmissionTellyComponent.prototype, "quotaData", null); SubmissionTellyComponent = __decorate([ core_1.Component({ selector: 'app-submission-telly', template: __webpack_require__(/*! ./submission-telly.component.html */ "./src/app/modules/sprints/components/submissionFile/submission-telly/submission-telly.component.html"), styles: [__webpack_require__(/*! ./submission-telly.component.css */ "./src/app/modules/sprints/components/submissionFile/submission-telly/submission-telly.component.css")] }), __metadata("design:paramtypes", []) ], SubmissionTellyComponent); return SubmissionTellyComponent; }()); exports.SubmissionTellyComponent = SubmissionTellyComponent; /***/ }), /***/ "./src/app/modules/sprints/components/submissionFile/submission/multimedia-model/multimedia-model.component.css": /*!**********************************************************************************************************************!*\ !*** ./src/app/modules/sprints/components/submissionFile/submission/multimedia-model/multimedia-model.component.css ***! \**********************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/modules/sprints/components/submissionFile/submission/multimedia-model/multimedia-model.component.html": /*!***********************************************************************************************************************!*\ !*** ./src/app/modules/sprints/components/submissionFile/submission/multimedia-model/multimedia-model.component.html ***! \***********************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\r\n\t
    \r\n\t\t
    Multimedia
    \r\n\t\t
    \r\n\t\t\t

    ×

    \r\n\t\t
    \r\n\t
    \r\n\t
    \r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t
    \r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n" /***/ }), /***/ "./src/app/modules/sprints/components/submissionFile/submission/multimedia-model/multimedia-model.component.ts": /*!*********************************************************************************************************************!*\ !*** ./src/app/modules/sprints/components/submissionFile/submission/multimedia-model/multimedia-model.component.ts ***! \*********************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var __awaiter = (this && this.__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 = (this && this.__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 = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [0, 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 }; } }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ng_bootstrap_1 = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ "./node_modules/@ng-bootstrap/ng-bootstrap/index.js"); var submissionReqService_1 = __webpack_require__(/*! ../../service/submissionReqService */ "./src/app/modules/sprints/components/submissionFile/service/submissionReqService.ts"); var MultimediaModelComponent = /** @class */ (function () { // @Input() // get Files(): any { // return this._Files; // } // set Files(value: any) { // console.log(value); // this._Files =this.subService.mediaFile; // this.fileUrl= null; // if (value) { // this._Files = value || ''; // this.fileUrl = value.url || ''; // this.setAudioUrl(value); // } // } function MultimediaModelComponent(subService, modal) { this.subService = subService; this.modal = modal; // console.log(this.Files); } MultimediaModelComponent.prototype.ngOnInit = function () { this.Files = this.subService.mediaFile || ''; this.fileUrl = this.subService.mediaFile.url || ''; this.setAudioUrl(this.subService.mediaFile); }; MultimediaModelComponent.prototype.setAudioUrl = function (file) { return __awaiter(this, void 0, void 0, function () { var audio, video; return __generator(this, function (_a) { switch (_a.label) { case 0: if (!(file.type == 32)) return [3 /*break*/, 2]; return [4 /*yield*/, document.getElementById("audioPlayer")]; case 1: audio = _a.sent(); if (audio) { audio.currentTime = 0; } return [3 /*break*/, 4]; case 2: if (!(file.type == 33)) return [3 /*break*/, 4]; return [4 /*yield*/, document.getElementById("video-container")]; case 3: video = _a.sent(); if (video) { video.currentTime = 0; } _a.label = 4; case 4: return [2 /*return*/]; } }); }); }; MultimediaModelComponent.prototype.closeMultimediaModal = function () { if (this.Files.type == 32) { var audio = document.getElementById("audioPlayer"); console.log("enetr audio"); audio.pause(); } this.subService.mediaFile = null; }; MultimediaModelComponent = __decorate([ core_1.Component({ selector: "app-multimedia-model", template: __webpack_require__(/*! ./multimedia-model.component.html */ "./src/app/modules/sprints/components/submissionFile/submission/multimedia-model/multimedia-model.component.html"), styles: [__webpack_require__(/*! ./multimedia-model.component.css */ "./src/app/modules/sprints/components/submissionFile/submission/multimedia-model/multimedia-model.component.css")], }), __metadata("design:paramtypes", [submissionReqService_1.SubmissionReqService, ng_bootstrap_1.NgbActiveModal]) ], MultimediaModelComponent); return MultimediaModelComponent; }()); exports.MultimediaModelComponent = MultimediaModelComponent; /***/ }), /***/ "./src/app/modules/sprints/components/submissionFile/submission/submission.component.css": /*!***********************************************************************************************!*\ !*** ./src/app/modules/sprints/components/submissionFile/submission/submission.component.css ***! \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".card-body {\r\n padding:0.25rem !important;\r\n}\r\n.truncate {\r\n width: 400px;\r\n max-width: 500px;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n}\r\n" /***/ }), /***/ "./src/app/modules/sprints/components/submissionFile/submission/submission.component.html": /*!************************************************************************************************!*\ !*** ./src/app/modules/sprints/components/submissionFile/submission/submission.component.html ***! \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t\t Details\r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    Claimed At
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\t\tsprintService.utcToLocal(model.created_at)\r\n\t\t\t\t\t\t\t\t\t\t| date: \"dd-MM-yyyy HH:mm\"\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    Submitted At
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\t\tsprintService.utcToLocal(model.submitted_at)\r\n\t\t\t\t\t\t\t\t\t\t| date: \"dd-MM-yyyy HH:mm\"\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    Task
    \r\n\t\t\t\t\t\t\t
    {{ model.task.title }}
    \r\n\t\t\t\t\t\t\t
    Reward
    \r\n\t\t\t\t\t\t\t
    {{ model.task.reward }}
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    Location
    \r\n\t\t\t\t\t\t\t
    {{ model.task.area }}
    \r\n\t\t\t\t\t\t\t
    Form
    \r\n\t\t\t\t\t\t\t
    {{ model.task.form }}
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    Description
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    Location
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\tToggle Map\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t\t
    0\">\r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t\t Answers\r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    {{ answer.question }}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\t\t\t\tgetAnswer(answer)?.address\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\t\t\t\t\tgetAnswer(answer)?.lat\r\n\t\t\t\t\t\t\t\t\t\t\t}}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t - \r\n\r\n\t\t\t\t\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\t\t\t\t\tgetAnswer(answer)?.long\r\n\t\t\t\t\t\t\t\t\t\t\t}}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t - \r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\tToggle Map\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\t\t\tgetAnswer(answer)\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t{{ model.worker.name }} ( {{ model.worker.id }})\r\n\t\t\t
    \r\n\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    Email
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t{{ model.worker.email }}\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    Phone
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t{{ model.worker.phone_number }}\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    Gender
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t{{ model.worker.genderlabel }}\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\tNationality\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t{{ model.worker.nationality }}\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    Age
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t{{ model.worker.age }}\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    Lives In
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t{{ model.worker.city }}\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    OS
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t{{ model.worker.platform }} - ({{\r\n\t\t\t\t\t\t\t\t\t\t\tmodel.worker.device.osversion\r\n\t\t\t\t\t\t\t\t\t\t}})\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\tApp Version\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t{{ model.worker.device.appversion }}\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t\r\n\t\t 0\"\r\n\t\t>\r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t\t Evaluations\r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    {{ evaluation.agent }}{{ evaluation.message }}{{ evaluation.created_at | date }}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\r\n\t\t\r\n\t\t
    \r\n\t\t
    \r\n\t\t\t
    Message
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t\t
    Reward
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tReward is required\r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t\t\r\n\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t\tBack    \r\n\t\t\t\t\r\n\t\t\t\t\tApprove \r\n\t\t\t\t\r\n\t\t\t\t   \r\n\t\t\t\t\r\n\t\t\t\t\tReject \r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t\t
    \r\n\t\t\r\n\t\r\n\r\n
    \r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    Image
    \r\n\t\t\t\t\r\n\t\t\t\t\t×\r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t
    \r\n\t
    \r\n
    \r\n\r\n\r\n" /***/ }), /***/ "./src/app/modules/sprints/components/submissionFile/submission/submission.component.ts": /*!**********************************************************************************************!*\ !*** ./src/app/modules/sprints/components/submissionFile/submission/submission.component.ts ***! \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); // import { ProjectService } from './../services/projectService'; var sprintService_1 = __webpack_require__(/*! src/app/modules/sprints/service/sprintService */ "./src/app/modules/sprints/service/sprintService.ts"); // import { SubmissionService } from './../services/submissionService'; var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var submissionReqService_1 = __webpack_require__(/*! ../service/submissionReqService */ "./src/app/modules/sprints/components/submissionFile/service/submissionReqService.ts"); // import { BulkEvaluation } from '../model/PaymentRequestForm'; var ng_bootstrap_1 = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ "./node_modules/@ng-bootstrap/ng-bootstrap/index.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var PaymentRequestForm_1 = __webpack_require__(/*! src/app/model/PaymentRequestForm */ "./src/app/model/PaymentRequestForm.ts"); var pageSubmissionModel_1 = __webpack_require__(/*! ../model/pageSubmissionModel */ "./src/app/modules/sprints/components/submissionFile/model/pageSubmissionModel.ts"); var multimedia_model_component_1 = __webpack_require__(/*! ./multimedia-model/multimedia-model.component */ "./src/app/modules/sprints/components/submissionFile/submission/multimedia-model/multimedia-model.component.ts"); var SubmissionComponent = /** @class */ (function () { function SubmissionComponent(activatedRoute, router, submissionService, sprintService, toastr, modalService) { this.activatedRoute = activatedRoute; this.router = router; this.submissionService = submissionService; this.sprintService = sprintService; this.toastr = toastr; this.modalService = modalService; this.id = 1; this.message = ""; this.imgUrl = ""; this.page = new pageSubmissionModel_1.Page(); this.mapView = false; this.shouldredirect = false; this.email = "affan@muhimmaapp.com"; this.loading = true; this.rewardId = null; this._model = null; this.valueChange = new core_1.EventEmitter(); this.binded = new core_1.EventEmitter(); this.showMap = false; this.latitude = 0; this.longitude = 0; this.displayQuestionMap = false; this.QuestionTypes = [ { id: 0, name: "MultiChoice", namear: "MultiChoice", class: "far fa-check-square", }, { id: 1, name: "DropDownList", namear: "DropDownList", class: "fas fa-caret-square-down", }, { id: 2, name: "Number", namear: "Number", class: "fas fa-keyboard" }, { id: 3, name: "Paragraph", namear: "Paragraph", class: "fas fa-paragraph", }, { id: 4, name: "SingleSelection", namear: "SingleSelection", class: "fas fa-caret-square-down", }, { id: 5, name: "Text", namear: "Text", class: "fas fa-ad" }, { id: 6, name: "ImageUpload", namear: "ImageUpload", class: "fas fa-image", }, { id: 7, name: "MultipleImageUpload", namear: "MultipleImageUpload", class: "fas fa-images", }, { id: 8, name: "MultiChoice", namear: "MultiChoice", class: "fas fa-images", }, { id: 9, name: "MultipleImageCapture", namear: "MultipleImageCapture", class: "fas fa-images", }, { id: 10, name: "LocationStamp", namear: "LocationStamp", class: "fas fa-map-marker", }, { id: 11, name: "LocationMap", namear: "LocationMap", class: "fas fa-map", }, { id: 12, name: "VoiceRecording", namear: "VoiceRecording", class: "fas fa-microphone", }, { id: 13, name: "MultiChoice", namear: "MultiChoice", class: "far fa-check-square", }, { id: 14, name: "Phone", namear: "Phone", class: "fas fa-phone" }, { id: 15, name: "Date", namear: "Date", class: "far fa-calendar" }, { id: 16, name: "DateTime", namear: "DateTime", class: "fas fa-clock" }, { id: 17, name: "Range", namear: "Range", class: "fas fa-exchange-alt", }, { id: 19, name: "TagList", namear: "TagList", class: "fas fa-tags" }, { id: 21, name: "SelectionWithText", namear: "SelectionWithText", class: "fas fa-caret-square-down", }, { id: 23, name: "Infomation", namear: "Infomation", class: "fas fa-info", }, { id: 28, name: "LogicMatrix", namear: "LogicMatrix", class: "fa fa-table", }, { id: 29, name: "Slider Input", namear: "SliderInput", class: "fas fa-sliders-h", }, { id: 30, name: "Horizontal Scale", namear: "HorizontalScale", class: "fas fa-minus", }, { id: 31, name: "Image Upload", namear: "رفع الصور", class: "fas fa-image", }, { id: 32, name: "Audio Upload", namear: "تحميل الصوت", class: "fas fa-microphone", }, { id: 33, name: "Video Upload", namear: "تحميل الفيديو", class: "fas fa-video", }, ]; this.shouldredirect = router.url.indexOf("submission") > -1; console.log("model value;", this.model); } Object.defineProperty(SubmissionComponent.prototype, "model", { get: function () { return this._model; }, set: function (value) { if (!value) return; // console.log(typeof(value.latitude)); var lat = value.latitude; if (lat < 1) { //lat = lat.replace("0.",""); //lat = lat.slice(0, 2) + "." + lat.slice(2); lat = lat * 100; console.log("latitude", lat); value.latitude = lat; } this._model = value; this.getRewards(); //console.log('called set model::' + JSON.stringify(this._model)); this.binded.emit(0); //this.valueChange.emit(this._model); }, enumerable: true, configurable: true }); SubmissionComponent.prototype.ngOnInit = function () { var _this = this; this.activatedRoute.queryParams.subscribe(function (params) { _this.id = +_this.activatedRoute.snapshot.paramMap.get("submission"); _this.sprintID = +_this.activatedRoute.snapshot.paramMap.get("id"); if (_this.id > 0) { _this.submissionService .getById(_this.email, _this.id) .then(function (submission) { _this.model = submission.data[0]; _this.model.answers.forEach(function (modelAnswer) { if (modelAnswer.other && modelAnswer.answer) { if (modelAnswer.question_type === 34) modelAnswer.answer = modelAnswer.answer; else modelAnswer.answer = modelAnswer.answer + ", " + modelAnswer.other; } else if (modelAnswer.other && !modelAnswer.answer) modelAnswer.answer = modelAnswer.other; }); console.log("model.answers", _this.model.answers); _this.loading = false; _this.getRewards(); }); } console.log("model=>>", _this.model); }); }; SubmissionComponent.prototype.toggleMap = function () { this.showMap = !this.showMap; }; SubmissionComponent.prototype.displayLocation = function (lat, long) { this.latitude = Number(lat); this.longitude = Number(long); this.displayQuestionMap = !this.displayQuestionMap; }; SubmissionComponent.prototype.styleFunc = function (feature) { return { clickable: false, fillColor: feature.getProperty("color"), strokeWeight: 1, }; }; SubmissionComponent.prototype.setImageUrl = function (url) { this.imgUrl = url; }; SubmissionComponent.prototype.stripHtml = function (text) { return text ? String(text).replace(/<[^>]+>/gm, "") : ""; }; SubmissionComponent.prototype.getRewards = function () { var _this = this; console.log("enter rewad fun"); if (this.model === null) return; this.sprintService .getSprint("joanna@muhimmaapp.com", this.sprintID) .then(function (sprint) { _this.rewards = sprint.rewards; _this.rewardId = sprint.tasks.find(function (r) { return r.id === _this._model.task_id; }).reward_id; console.log(_this.rewardId); }); }; SubmissionComponent.prototype.getStatus = function (status) { if (status === 0) return 'Draft'; if (status === 1) return 'Submitted'; if (status === 2) return 'Approved'; if (status === 3) return 'Rejected'; if (status === 4) return 'Withdrawn'; return '-'; }; SubmissionComponent.prototype.getImageHtml = function (a) { var html = ""; if (a === undefined || a === null) return ""; var urls = a.split(","); for (var x = 0; x < urls.length; x++) { html += '"; } return html; }; SubmissionComponent.prototype.getMediaFile = function (url, type, index) { this.multimedia = ""; if (url === undefined || url === null) return ""; var paths = url.split(","); paths = paths.filter(function (x) { return x != " "; }); this.multimedia = { type: type, url: paths[index], }; var modalRef = this.modalService.open(multimedia_model_component_1.MultimediaModelComponent, { ariaLabelledBy: "modal-basic-title", windowClass: "add-library-Modal", backdrop: "static", keyboard: false, }); modalRef.componentInstance.id = this.multimedia; modalRef.result.then(function () { }, function () { }); this.submissionService.mediaFile = this.multimedia; }; SubmissionComponent.prototype.getURLs = function (url, type) { if (url === undefined || url === null) return ""; var paths = url.split(","); paths = paths.filter(function (x) { return x != " "; }); if (type == 32) { var duumyUrl_1 = []; paths.forEach(function (elementUrl) { duumyUrl_1.push("../../../../../../assets/images/dummy_audio.png"); }); return duumyUrl_1; } else if (type == 33) { var duumyUrl_2 = []; paths.forEach(function (elementUrl) { duumyUrl_2.push("../../../../../../assets/images/video_icon.png"); }); return duumyUrl_2; } else { return paths; } }; SubmissionComponent.prototype.getAnswer = function (answer) { var html = answer.answer; var a = answer.answer; if (a !== null && a !== undefined && a.indexOf(".m4a") > -1) { a = a.replace("/files", "/audios"); a = a.replace(".m4a", ".mp3"); } if (answer.question_type === 7 || answer.question_type === 6 || answer.question_type === 8 || answer.question_type === 9) html = this.getImageHtml(answer.answer); else if (answer.question_type === 12) html = ''; else if (answer.question_type === 34) { html = JSON.parse(answer.answer); } return html; }; SubmissionComponent.prototype.getQuestionType = function (answer) { var s = "fas fa-info"; try { s = this.QuestionTypes.filter(function (qt) { return qt.id === answer.question_type; })[0].class; } catch (e) { } var html = ''; return html; }; SubmissionComponent.prototype.getEvaluation = function (evaluation) { if (evaluation.evaluation_type === 0) return 'Accepted'; else return 'Rejected'; }; SubmissionComponent.prototype.approve = function () { var _this = this; console.log("Clicked approve"); var ids = []; console.log(localStorage.getItem("saveTotalQuota")); var totalQuota = localStorage.getItem("saveTotalQuota"); this.page.size = 100; var workerId = null; var reportable = -1; var reportableValue = reportable == -1 ? null : reportable == 1; var projectId = parseInt(localStorage.getItem("localSprintID")); // this.submissionService.getResult(this.page, this.email, workerId, 2, null, // this.sprintID, reportableValue, null, null).then(pagedData => { // console.log(pagedData.data.length); // let getCount = pagedData.data.length; // if (getCount < totalQuota) { // ids.push(this.model.id); // let form = new BulkEvaluation(ids, 2, this.message, 4, this.rewardId); // this.submissionService.saveSubmissions(form).then((result) => { // this.redirect(); // this.toastr.success('Submission Approved'); // }).catch((err) => { // this.redirect(); // }); // } // else // { // return this.toastr.error("Approval Quota is full. You can't approve this submission") // } // }); ids.push(this.model.id); var form = new PaymentRequestForm_1.BulkEvaluation(ids, 2, this.message, 4, this.rewardId); this.submissionService .saveSubmissions(form) .then(function (result) { _this.redirect(); _this.toastr.success("Submission Approved"); }) .catch(function (err) { _this.redirect(); }); // this.submissionService.saveSubmission(this.model.id, 4, 2).then((result) => { // this.redirect(); // }).catch((err) => { // this.redirect(); // }); }; SubmissionComponent.prototype.reject = function () { var _this = this; console.log("Clicked reject"); var ids = []; ids.push(this.model.id); var form = new PaymentRequestForm_1.BulkEvaluation(ids, 3, this.message, 4, this.rewardId); this.submissionService .saveSubmissions(form) .then(function (result) { _this.toastr.success("Submission Rejected"); _this.redirect(); _this.closeModal.nativeElement.click(); //<-- here }) .catch(function (err) { _this.redirect(); }); this.closeModal.nativeElement.click(); //<-- here }; SubmissionComponent.prototype.openURL = function (id) { window.open("https://muhimmaplatform.com/workers/" + id + "/edit"); }; SubmissionComponent.prototype.redirect = function () { console.log("got too the redirect"); if (this.shouldredirect) this.router.navigate(["/sprints/", this.sprintID]); this.valueChange.emit(0); }; __decorate([ core_1.Input(), __metadata("design:type", Number) ], SubmissionComponent.prototype, "sprintID", void 0); __decorate([ core_1.Input(), __metadata("design:type", Number) ], SubmissionComponent.prototype, "previous", void 0); __decorate([ core_1.Input(), __metadata("design:type", Number) ], SubmissionComponent.prototype, "next", void 0); __decorate([ core_1.Output("SubmissionSaved"), __metadata("design:type", core_1.EventEmitter) ], SubmissionComponent.prototype, "valueChange", void 0); __decorate([ core_1.Output("SubmissionBinded"), __metadata("design:type", core_1.EventEmitter) ], SubmissionComponent.prototype, "binded", void 0); __decorate([ core_1.Input("Submission"), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], SubmissionComponent.prototype, "model", null); __decorate([ core_1.ViewChild("closeModal"), __metadata("design:type", core_1.ElementRef) ], SubmissionComponent.prototype, "closeModal", void 0); SubmissionComponent = __decorate([ core_1.Component({ selector: "app-submission", template: __webpack_require__(/*! ./submission.component.html */ "./src/app/modules/sprints/components/submissionFile/submission/submission.component.html"), styles: [__webpack_require__(/*! ./submission.component.css */ "./src/app/modules/sprints/components/submissionFile/submission/submission.component.css")], styles: ["agm-map { height: 300px; /* height is required */ }"], }), __metadata("design:paramtypes", [router_1.ActivatedRoute, router_1.Router, submissionReqService_1.SubmissionReqService, sprintService_1.SprintService, ngx_toastr_1.ToastrService, ng_bootstrap_1.NgbModal]) ], SubmissionComponent); return SubmissionComponent; }()); exports.SubmissionComponent = SubmissionComponent; /***/ }), /***/ "./src/app/modules/sprints/components/submissionFile/submissions-request/submissionsrequest.component.css": /*!****************************************************************************************************************!*\ !*** ./src/app/modules/sprints/components/submissionFile/submissions-request/submissionsrequest.component.css ***! \****************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".form-control {\r\n padding-right: 30px;\r\n}\r\n\r\n.form-control+.fa {\r\n position: absolute;\r\n right: 0;\r\n padding: 8px 27px;\r\n}\r\n\r\n.badge {\r\n color: #fff;\r\n display: inline-block;\r\n padding: 4px 8px !important;\r\n font-size: 13px;\r\n border-radius: 3px;\r\n}" /***/ }), /***/ "./src/app/modules/sprints/components/submissionFile/submissions-request/submissionsrequest.component.html": /*!*****************************************************************************************************************!*\ !*** ./src/app/modules/sprints/components/submissionFile/submissions-request/submissionsrequest.component.html ***! \*****************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\r\n\r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    Evaluate Submissions
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n Enter the new status for the selected submission(s).\r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n\r\n\r\n\r\n
    \r\n\r\n
    \r\n \r\n\r\n \r\n \r\n\t\t\t\t\r\n\t\t\t\t\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Task\r\n \r\n \r\n \r\n \r\n {{value}} ({{row['task_id']}})\r\n \r\n \r\n \r\n \r\n \r\n Worker\r\n \r\n \r\n {{ value }} ({{row['worker_id']}})\r\n \r\n \r\n \r\n \r\n Reward\r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n Submitted At\r\n \r\n \r\n {{ sprintService.utcToLocal(value) | date:'dd-MM-yy HH:mm' }}\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n Details\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    Submission {{Submission.id}} Details\r\n \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    Submission Quota Details\r\n \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n" /***/ }), /***/ "./src/app/modules/sprints/components/submissionFile/submissions-request/submissionsrequest.component.ts": /*!***************************************************************************************************************!*\ !*** ./src/app/modules/sprints/components/submissionFile/submissions-request/submissionsrequest.component.ts ***! \***************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var submissionReqService_1 = __webpack_require__(/*! ../service/submissionReqService */ "./src/app/modules/sprints/components/submissionFile/service/submissionReqService.ts"); // import { BulkEvaluation } from './../model/PaymentRequestForm'; var PaymentRequestForm_1 = __webpack_require__(/*! src/app/model/PaymentRequestForm */ "./src/app/model/PaymentRequestForm.ts"); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); // import { Page } from '../model/page'; // import { Page } from 'src/app/model/page'; var pageSubmissionModel_1 = __webpack_require__(/*! ../model/pageSubmissionModel */ "./src/app/modules/sprints/components/submissionFile/model/pageSubmissionModel.ts"); var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var sprintService_1 = __webpack_require__(/*! ../../../service/sprintService */ "./src/app/modules/sprints/service/sprintService.ts"); var SubmissionsRequestComponent = /** @class */ (function () { function SubmissionsRequestComponent(activatedRoute, submissionService, router, toastr, sprintService) { this.activatedRoute = activatedRoute; this.submissionService = submissionService; this.toastr = toastr; this.sprintService = sprintService; // projectId: number; this.workerId = null; this.rewardId = null; this.ids = []; this.page = new pageSubmissionModel_1.Page(); this.selected = []; this.range = "0"; this.approvedArray = 0; this.idscommas = null; this.expanded = {}; this.Submission = null; this.previous = 0; this.next = 0; this.status = 1; this.reportable = -1; this.newstatus = 2; this.message = ""; this.from = null; this.to = null; this.rows = []; this.count = 0; this.loadingIndicator = true; this.reorderable = true; this.email = 'affan@muhimmaapp.com'; this.quotaData = []; this.loading = true; this.shouldredirect = false; this.page.pageNumber = 0; this.page.size = 100; this.projectId = parseInt(localStorage.getItem("localSprintID")); } SubmissionsRequestComponent.prototype.ngOnInit = function () { this.setPage({ offset: 0, size: 100 }); }; // end on init SubmissionsRequestComponent.prototype.filter = function () { var _this = this; this.selected = []; this.loadingIndicator = true; var status = (this.status == -1 ? null : this.status); var reportable = (this.reportable == -1 ? null : this.reportable == 1); this.submissionService.getResult(this.page, this.email, this.workerId, status, null, this.projectId, reportable, this.from, this.to).then(function (pagedData) { _this.page = pagedData.page; _this.rows = pagedData.data ? pagedData.data : []; console.log("rows data submission =>", _this.rows); _this.count = pagedData.page.totalElements; _this.loadingIndicator = false; var tableid = document.getElementById("details"); tableid.setAttribute("class", "collapse show"); }); // this.submissionService.getResult(this.page, this.email, this.workerId, 2, null, // this.projectId, reportable, this.from, this.to).then(pagedData => { // this.approvedArray = 0; // this.selected = []; // console.log(pagedData); // if (pagedData.data != null) { // if (pagedData.data.length != 0) { // pagedData.data.forEach(elementData => { // if (elementData.status == 2) { // this.approvedArray = this.approvedArray + 1; // } // }); // } // } // }); console.log(this.approvedArray); }; SubmissionsRequestComponent.prototype.toggleExpandRow = function (row) { console.log('Toggled Expand Row!', row); this.table.rowDetail.toggleExpandRow(row); }; SubmissionsRequestComponent.prototype.onDetailToggle = function (event) { console.log('Detail Toggled', event); }; SubmissionsRequestComponent.prototype.getSubmission = function (id) { var _this = this; this.loading = true; this.submissionService.getById(this.email, id).then(function (submission) { _this.Submission = submission.data[0]; _this.Submission.answers.forEach(function (modelAnswer) { if (modelAnswer.other && modelAnswer.answer) { if (modelAnswer.question_type === 34) modelAnswer.answer = modelAnswer.answer; else modelAnswer.answer = modelAnswer.answer + ", " + modelAnswer.other; } else if (modelAnswer.other && !modelAnswer.answer) modelAnswer.answer = modelAnswer.other; }); _this.loading = false; }); }; SubmissionsRequestComponent.prototype.mapids = function () { var _this = this; this.ids = []; this.selected.map(function (s) { return _this.ids.push(s.id); }); this.idscommas = this.ids.join(','); }; SubmissionsRequestComponent.prototype.postForm = function () { var _this = this; if (this.idscommas === null || this.idscommas === '') return; this.ids = this.idscommas.split(','); var totalQuota = localStorage.getItem("saveTotalQuota"); var count = parseInt(totalQuota); // if (this.newstatus == 2) { // console.log(this.approvedArray) // const getLength = this.approvedArray + this.ids.length; // console.log(getLength); // if (getLength <= count) { // let form = new BulkEvaluation(this.ids, this.newstatus, this.message, 1000, this.rewardId); // this.submissionService.saveSubmissions(form); // this.filter(); // } // else // { // return this.toastr.warning("Can not exceed set quota for the task"); // } // } // else // { // let form = new BulkEvaluation(this.ids, this.newstatus, this.message, 1000, this.rewardId); // this.submissionService.saveSubmissions(form); // this.filter(); // } var form = new PaymentRequestForm_1.BulkEvaluation(this.ids, this.newstatus, this.message, 1000, this.rewardId); this.submissionService.saveSubmissions(form).then(function (x) { var value = x; console.log(value); if (value.response_code == 200) { _this.toastr.success(value.message); } else if (value.response_code == 422) { _this.toastr.error(value.message); } _this.filter(); }); }; SubmissionsRequestComponent.prototype.onSelect = function (_a) { //console.log('Select Event', selected, this.selected); var selected = _a.selected; this.selected.splice(0, this.selected.length); (_b = this.selected).push.apply(_b, selected); console.log("Slect Value", this.selected.length); var _b; }; SubmissionsRequestComponent.prototype.onActivate = function (event) { //console.log('Activate Event', event); }; SubmissionsRequestComponent.prototype.setPage = function (pageInfo) { console.log(pageInfo); this.page.size = pageInfo.size; this.page.pageNumber = pageInfo.offset; this.filter(); }; //end setPage SubmissionsRequestComponent.prototype.getId = function (id, status) { //console.log(id,status); if (status === 0) return ' ' + id; if (status === 1) return ' ' + id; if (status === 2) return ' ' + id; if (status === 3) return ' ' + id; if (status === 4) return ' ' + id; if (status === 5) return ' ' + id; return '-'; }; SubmissionsRequestComponent.prototype.getStatus = function (status) { if (status === 0) return 'In Progress'; if (status === 1) return 'Approved'; if (status === 2) return 'Rejected'; if (status === 3) return 'Completed'; return '-'; }; SubmissionsRequestComponent.prototype.setDateRange = function () { var dt = new Date(); var month = dt.getMonth(), year = dt.getFullYear(); if (this.range === "0") this.from = new Date(year, month, 1); if (this.range === "0") this.to = new Date(year, month + 1, 0); if (this.range === "1") this.from = new Date(year, month - 1, 1); if (this.range === "1") this.to = new Date(year, month + 1, 0); if (this.range === "2") this.from = new Date(year, month - 3, 1); if (this.range === "2") this.to = new Date(year, month + 1, 0); if (this.range === "3") this.from = new Date(year, 1, 1); if (this.range === "3") this.to = new Date(year + 1, 1, 0); this.filter(); }; SubmissionsRequestComponent.prototype.openModal = function (a) { document.getElementById("openModalButton").click(); }; SubmissionsRequestComponent.prototype.getSubmissionStatus = function (status) { if (status === 0) return 'Draft'; if (status === 1) return 'Submitted'; if (status === 2) return 'Approved'; if (status === 3) return 'Rejected'; if (status === 4) return 'Withdrawn'; return '-'; }; SubmissionsRequestComponent.prototype.submissionSaved = function (question) { console.log('emitted the value now the popup should close' + this.closeModal.nativeElement); this.closeModal.nativeElement.click(); this.filter(); }; SubmissionsRequestComponent.prototype.submissionTally = function () { var _this = this; var reportable = (this.reportable == -1 ? null : this.reportable == 1); this.submissionService.getSubmissionTelly(this.projectId).then(function (quotaData) { console.log(quotaData); _this.quotaData = quotaData; _this.quotaData = _this.quotaData.data; _this.quotaData.forEach(function (elementData) { if (elementData.data.age.length != 0) { elementData.data.age.forEach(function (elementAge) { var _a = elementAge.label.split("["), letf = _a[0], string = _a[1]; var _b = string.split("]"), string2 = _b[0], right = _b[1]; var _c = string2.split(","), value1 = _c[0], value2 = _c[1]; elementAge.label = value1 + " - " + value2; }); } // if (elementData.data.gender.length != 0) { // elementData.data.gender.forEach(elementGender => { // elementGender.label.forEach(label => { // if (label == '0') { // label = "Male"; // } // else if (label == '1') { // label = "Female"; // } // else if (label == '2') { // label = "All"; // } // }); // }); // } }); }, function (error) { _this.toastr.error("Something went wrong, Please check the internet connection"); }); }; SubmissionsRequestComponent.prototype.exportSpss = function () { console.log(this.selected); var id = []; id = this.selected.map(function (x) { return x.id; }); if (this.taskIds.length) { this.exportAndDownloadSubmissions(id); } else { return this.toastr.error("there is no task in this sprint"); } }; SubmissionsRequestComponent.prototype.handleExportAndDownload = function (type, filename) { console.log(this.selected); var id = []; id = this.selected.map(function (x) { return x.id; }); if (this.taskIds.length) { this.exportAndDownloadSubmissions(id, type, filename); } else { return this.toastr.error("there is no task in this sprint"); } }; SubmissionsRequestComponent.prototype.exportAndDownloadSubmissions = function (id, type, fileName) { var _this = this; if (type === void 0) { type = 0; } if (fileName === void 0) { fileName = "submission.sav"; } var submissionid = { submission_id: id, task_id: this.taskIds, status: this.status, type: type }; this.submissionService.exportIntoSpss(submissionid).then(function (response) { console.log(response); var link = document.createElement("a"); link.href = response.Location; link.download = fileName; link.click(); _this.selected = []; }, function (error) { _this.toastr.error("Something went wrong, Please check the internet connection"); }); }; __decorate([ core_1.Input(), __metadata("design:type", Number) ], SubmissionsRequestComponent.prototype, "projectId", void 0); __decorate([ core_1.Input(), __metadata("design:type", Object) ], SubmissionsRequestComponent.prototype, "taskIds", void 0); __decorate([ core_1.ViewChild('closeModal'), __metadata("design:type", core_1.ElementRef) ], SubmissionsRequestComponent.prototype, "closeModal", void 0); __decorate([ core_1.ViewChild('myTable'), __metadata("design:type", Object) ], SubmissionsRequestComponent.prototype, "table", void 0); SubmissionsRequestComponent = __decorate([ core_1.Component({ selector: 'app-submissions', template: __webpack_require__(/*! ./submissionsrequest.component.html */ "./src/app/modules/sprints/components/submissionFile/submissions-request/submissionsrequest.component.html"), styles: [__webpack_require__(/*! ./submissionsrequest.component.css */ "./src/app/modules/sprints/components/submissionFile/submissions-request/submissionsrequest.component.css")] }), __metadata("design:paramtypes", [router_1.ActivatedRoute, submissionReqService_1.SubmissionReqService, router_1.Router, ngx_toastr_1.ToastrService, sprintService_1.SprintService]) ], SubmissionsRequestComponent); return SubmissionsRequestComponent; }()); exports.SubmissionsRequestComponent = SubmissionsRequestComponent; /***/ }), /***/ "./src/app/modules/sprints/components/tag/tag.component.css": /*!******************************************************************!*\ !*** ./src/app/modules/sprints/components/tag/tag.component.css ***! \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/modules/sprints/components/tag/tag.component.html": /*!*******************************************************************!*\ !*** ./src/app/modules/sprints/components/tag/tag.component.html ***! \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\n
    \r\n
    \r\n
    \r\n
    Add New Tag
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n Name is required\r\n
    \r\n
    \r\n
    \r\n\t\t\t\t\t\t
    \r\n \r\n \r\n
    \r\n Amount is required\r\n
    \r\n
    \r\n
    \r\n\r\n\r\n
    \r\n
    \r\n\r\n
    \r\n\t\t\t\t\r\n\r\n \r\n\r\n\t\t\t\t\r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    Delete Tag
    \r\n \r\n
    \r\n
    \r\n Are you sure you wnat to delete this \"{{this.model.name_en}}\" tag.\r\n
    \r\n\r\n
    \r\n \r\n\r\n\t\t\t\t\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n\t
    \r\n\t\t

    Tags

    \r\n\t
    \r\n\t
    \r\n\t
    \r\n\r\n\t
    \r\n\t\t\r\n\r\n\t\t\r\n\t\t\t \r\n\t\t\r\n\t
    \r\n
    \r\n
    \r\n
    \r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{{ value }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t Title \r\n\t\t\t\r\n\t\t\t\t{{ value }}\r\n\t\t\t\r\n\t\t\r\n\r\n\r\n\t\t\r\n\t\t\t\r\n\t\t\t\tCreated At\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t{{ value | date }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t Edit \r\n\t\t\t\r\n\t\t\t\tEdit\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t Delete \r\n\t\t\t\r\n\t\t\t\tDelete\r\n\t\t\t\r\n\t\t\r\n\t\r\n
    \r\n" /***/ }), /***/ "./src/app/modules/sprints/components/tag/tag.component.ts": /*!*****************************************************************!*\ !*** ./src/app/modules/sprints/components/tag/tag.component.ts ***! \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var google_services_1 = __webpack_require__(/*! src/app/services/google.services */ "./src/app/services/google.services.ts"); var sprintService_1 = __webpack_require__(/*! ../../service/sprintService */ "./src/app/modules/sprints/service/sprintService.ts"); var TagComponent = /** @class */ (function () { function TagComponent(toastr, _google, sprintService) { this.toastr = toastr; this._google = _google; this.sprintService = sprintService; this.model = null; this._sprint = null; this.id = 0; this.valueChange = new core_1.EventEmitter(); this.googleObj = new google_services_1.GoogleObj(); } TagComponent.prototype.ngOnInit = function () { this.getTag(); }; TagComponent.prototype.getTag = function () { var _this = this; if (this.id === 0 || this._sprint.rewards == null) this.model = { id: 0, name_ar: "", name_en: "", project_id: this.sprintId, }; else return this._sprint.rewards.find(function (r) { return r.id === _this.id; }); }; TagComponent.prototype.postForm = function () { var _this = this; if (this.model.name_en == "" || this.model.name_ar == "") { var dismiss = document.getElementById("submi-tag"); dismiss.removeAttribute("data-dismiss"); this.toastr.warning("Both fields are required"); return false; } var dismiss = document.getElementById("submi-tag"); dismiss.setAttribute("data-dismiss", "modal"); this.sprintService .saveTag(this.model) .then(function (data) { _this.model.id = data["id"]; console.log("Saved.." + data); _this.toastr.success("Saved Successfully!"); _this.valueChange.emit(_this.model); }) .catch(function (err) { _this.toastr.error("Error in saving tag"); console.error(err); }); }; TagComponent.prototype.changeTag = function (value) { this.model = value; }; TagComponent.prototype.deleteTag = function (value) { this.model = value; }; TagComponent.prototype.translate = function () { var _this = this; this.doTranslate(this.model.name_en).then(function (d) { _this.model.name_ar = d.toString(); }); }; TagComponent.prototype.doTranslate = function (key) { var _this = this; return new Promise(function (resolve, reject) { _this._google.translate(_this.googleObj, key).subscribe(function (res) { resolve(res.data.translations[0].translatedText); }, function (err) { console.log(err); reject(err); }); }); }; TagComponent.prototype.confirmDelete = function (id) { var _this = this; this.sprintService .deleteTag(id) .then(function (data) { console.log("Delete.." + data); _this.toastr.success("Delete Successfully!"); _this.valueChange.emit(_this.model); }) .catch(function (err) { _this.toastr.error("Error in saving reward"); console.error(err); }); }; __decorate([ core_1.Input(), __metadata("design:type", Number) ], TagComponent.prototype, "sprintId", void 0); __decorate([ core_1.Output("TagSaved"), __metadata("design:type", core_1.EventEmitter) ], TagComponent.prototype, "valueChange", void 0); __decorate([ core_1.Input(), __metadata("design:type", Array) ], TagComponent.prototype, "rows", void 0); TagComponent = __decorate([ core_1.Component({ selector: "app-tag", template: __webpack_require__(/*! ./tag.component.html */ "./src/app/modules/sprints/components/tag/tag.component.html"), styles: [__webpack_require__(/*! ./tag.component.css */ "./src/app/modules/sprints/components/tag/tag.component.css")], }), __metadata("design:paramtypes", [ngx_toastr_1.ToastrService, google_services_1.GoogleService, sprintService_1.SprintService]) ], TagComponent); return TagComponent; }()); exports.TagComponent = TagComponent; /***/ }), /***/ "./src/app/modules/sprints/components/taskforms/taskform-detail/taskform-detail.component.css": /*!****************************************************************************************************!*\ !*** ./src/app/modules/sprints/components/taskforms/taskform-detail/taskform-detail.component.css ***! \****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".sortable-container {\r\n width: 100% !important;\r\n border: none;\r\n\r\n}\r\n.sortable-header{\r\n display: none;\r\n}\r\n::ng-deep .ngx-select__choices{\r\n\twidth: auto !important;\r\n\tmin-width: 100% !important;\r\n}\r\n" /***/ }), /***/ "./src/app/modules/sprints/components/taskforms/taskform-detail/taskform-detail.component.html": /*!*****************************************************************************************************!*\ !*** ./src/app/modules/sprints/components/taskforms/taskform-detail/taskform-detail.component.html ***! \*****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\r\n\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t\t Duplicate  `\r\n\t\t\t\r\n\t\t\t  \r\n\t\t\t\r\n\t\t\t  \r\n\t\t\t\r\n\t\t
    \r\n\t
    \r\n\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t\t Basic Details\r\n\t\t
    \r\n\t\t\r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tArabic Title\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tArabic Title is required\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tCompl. Duration\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tCompletion Duration is required\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tIs Scorable?\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tYes\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\r\n\r\n\t\t\t\t
    0\">\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    Questions
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t{{ item.position }}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t{{ item.label }}\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n
    \r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    Question Details
    \r\n\t\t\t\t\r\n\t\t\t\t\t×\r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t
    \r\n\t
    \r\n
    \r\n\r\n
    \r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    Duplicate Data
    \r\n\t\t\t\t\r\n\t\t\t\t\t×\r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\tCopy Question\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t
    \r\n\t
    \r\n
    \r\n" /***/ }), /***/ "./src/app/modules/sprints/components/taskforms/taskform-detail/taskform-detail.component.ts": /*!***************************************************************************************************!*\ !*** ./src/app/modules/sprints/components/taskforms/taskform-detail/taskform-detail.component.ts ***! \***************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); // import { TagService } from '../../services/tag.service'; var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var BreadCrumb_1 = __webpack_require__(/*! src/app/model/BreadCrumb */ "./src/app/model/BreadCrumb.ts"); var tag_service_1 = __webpack_require__(/*! src/app/services/tag.service */ "./src/app/services/tag.service.ts"); // import { Task, Sprint, Question, Form,Type } from 'src/app/model/sprint'; var sprintModel_1 = __webpack_require__(/*! ../../../model/sprintModel */ "./src/app/modules/sprints/model/sprintModel.ts"); // import { Page } from '../../model/page'; // import { ProjectService } from '../../services/projectService'; var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var sprintService_1 = __webpack_require__(/*! src/app/modules/sprints/service/sprintService */ "./src/app/modules/sprints/service/sprintService.ts"); var google_services_1 = __webpack_require__(/*! src/app/services/google.services */ "./src/app/services/google.services.ts"); var TaskFormComponent = /** @class */ (function () { function TaskFormComponent(projectService, activatedRoute, router, toastr, tagService, _google) { this.projectService = projectService; this.activatedRoute = activatedRoute; this.router = router; this.toastr = toastr; this.tagService = tagService; this._google = _google; this.submitted = false; this.Sprint = null; this.loading = true; this.email = null; this.id = null; this.projectId = null; this.model = null; this.Questions = null; this.sprintTags = []; this.sprintList = []; this.taskFormList = []; this.taskSprintId = null; this.questionSprintId = null; this.sprintTaskFormtId = null; this.questionId = null; this.googleObj = new google_services_1.GoogleObj(); ///////////////////////////////////////////////////////////////////////////////////////////// this.QuestionTypes = [ { id: 0, name: "MultiChoice", namear: "MultiChoice", class: "far fa-check-square", }, // { 'id': 1, 'name':'DropDownList', 'namear':'DropDownList', 'class':'fas fa-caret-square-down'}, { id: 2, name: "Number", namear: "Number", class: "fas fa-keyboard" }, { id: 3, name: "Paragraph", namear: "Paragraph", class: "fas fa-paragraph", }, { id: 4, name: "SingleSelection", namear: "SingleSelection", class: "fas fa-caret-square-down", }, { id: 28, name: "LogicMatrix", namear: "LogicMatrix", class: "fa fa-table", }, // { 'id': 29, 'name':'Slider Input', 'namear':'SliderInput', 'class':'fas fa-sliders-h'}, // { 'id': 30, 'name':'Horizontal Scale', 'namear':'HorizontalScale', 'class':'fas fa-minus'}, { id: 31, name: "Image Upload", namear: "رفع الصور", class: "fas fa-image", }, { id: 32, name: "Audio Upload", namear: "تحميل الصوت", class: "fas fa-microphone", }, { id: 33, name: "Video Upload", namear: "تحميل الفيديو", class: "fas fa-video", }, { id: 34, name: "Current Location", namear: "الموقع الحالي", class: "fas fa-map-marker-alt", }, ]; } TaskFormComponent.prototype.ngOnInit = function () { var _this = this; this.activatedRoute.queryParams.subscribe(function (params) { _this.projectId = +_this.activatedRoute.snapshot.paramMap.get("id"); _this.id = +_this.activatedRoute.snapshot.paramMap.get("form"); _this.GetSprint(); _this.getTages(); _this.getSprintLists(); }); }; //end on init TaskFormComponent.prototype.GetSprint = function (id) { var _this = this; if (id) { this.model.id = id; this.id = id; // console.log( // "The model id is:: " + this.model.id + " and the id is: " + id // ); } this.projectService .getSprint(this.email, this.projectId) .then(function (sprint) { _this.Sprint = sprint; if (_this.id > 0) { _this.model = _this.Sprint.forms.find(function (t) { return t.id === _this.id; }); _this.Questions = _this.model.questions.sort(function (q1, q2) { if (q1.position > q2.position) { return 1; } if (q1.position < q2.position) { return -1; } return 0; }); _this.projectService.parentQuestionTagID = _this.model.tag_question_parent; _this.model.questions = _this.Questions; console.log("update ", _this.model.questions); _this.projectService.getAllQuestions = _this.model.questions; } //end id is greater than 0 else { _this.model = { id: null, title: "", project_id: _this.Sprint.id, created_at: new Date(), updated_at: new Date(), complete_duration: 10, titlear: "", }; } _this.buildBreadCrumb(); _this.loading = false; }); }; TaskFormComponent.prototype.onSubmit = function () { this.submitted = true; }; TaskFormComponent.prototype.getClass = function (id) { return this.QuestionTypes.find(function (qt) { return qt.id === id; }).class; }; TaskFormComponent.prototype.buildBreadCrumb = function () { //Sprints? Sprint()>Task Forms () this.crumbs = []; this.crumbs.push(new BreadCrumb_1.BreadCrumb("Home", "/")); this.crumbs.push(new BreadCrumb_1.BreadCrumb("Sprints", "/sprints")); this.crumbs.push(new BreadCrumb_1.BreadCrumb(this.Sprint.name, "/sprints/" + this.Sprint.id)); this.crumbs.push(new BreadCrumb_1.BreadCrumb(this.model.title ? this.model.title : "Task Form", "")); }; TaskFormComponent.prototype.addQuestion = function () { var p = 1; if (this.model.questions === null || this.model.questions === undefined) this.model.questions = []; if (this.model.questions.length > 0) p = this.model.questions.length + 1; this.Question = { files: [], name: "", task_form_id: this.model.id, question_type: null, question_category: 0, is_visible_client: true, max_answer_points: 0, constraints: { is_required: true, limit: { type: sprintModel_1.Type.Character, min: 10 }, precondition: [], termination: [], jumps: [], validations: { minOpt: null, maxOpt: null }, logic_selection: "row_select", files: { type: "", limit: 0, size: 0, duration: 0, }, }, description: "", id: 0, opts: null, label: null, labelar: null, position: p, answer_points: 0, is_required: true, is_deleted: false, is_random: false, jump_condition: null, terminate_condition: null, multiple_jump_condition: null, multiple_terminate_condition: null, is_cu_child: false, cu_parent_id: null, min_field_value: 1, max_field_value: 1, created_at: new Date(), updated_at: new Date(), question_image: null, is_dd_child: false, dd_parent_id: 0, is_tag_parent: true, is_tag_child: false, tag_condition: [], sprint_id: this.projectId, }; console.log(this.Question); }; TaskFormComponent.prototype.postForm = function () { var _this = this; if (this.model.title == "") { this.toastr.error("Please add the English Name"); return false; } if (this.model.titlear == "") { this.toastr.error("Please add the Arabic Title"); return false; } this.projectService .saveForm(this.model) .then(function (data) { //this.activatedRoute.snapshot.paramMap('form') _this.model.id = data.id; console.log("Saved..", data); if (+_this.activatedRoute.snapshot.paramMap.get("form") === 0) { var queryParams = { form: _this.model.id }; // this.router.navigateByUrl('/sprints/'+this.model.project_id+'/taskform/'+this.model.id); // this.router.navigate( // [], // { // relativeTo: this.activatedRoute, // queryParams: queryParams, // queryParamsHandling: 'merge', // remove to replace all query params by provided // }); } // this.back(); }) .catch(function (err) { _this.toastr.error("Error in saving form"); console.error(err); }); //this.back(); }; //end post form TaskFormComponent.prototype.back = function () { this.router.navigate(["sprints", this.Sprint.id]); }; TaskFormComponent.prototype.questionSaved = function (question) { //this.toastr.info(JSON.stringify(question)); if (this.model.questions === undefined || this.model.questions === null) this.model.questions = []; if (question.id != null && question.id !== 0) this.model.questions.splice(this.model.questions.findIndex(function (q) { return q.id === question.id; }), 1, question); else this.model.questions.push(question); console.log("The question has been added:" + JSON.stringify(question)); this.GetSprint(this.model.id); // this.GetSprint(); }; TaskFormComponent.prototype.listSorted = function (list) { this.model.questions = []; for (var x = 0; x < list.length; x++) { list[x].position = x + 1; this.model.questions.push(list[x]); } }; TaskFormComponent.prototype.getspecificQuestion = function (item) { this.GetSprint(); console.log({ item: item }); this.Question = item; }; TaskFormComponent.prototype.translate = function () { var _this = this; this.doTranslate(this.model.title).then(function (d) { _this.model.titlear = d.toString(); }); }; TaskFormComponent.prototype.doTranslate = function (key) { var _this = this; return new Promise(function (resolve, reject) { _this._google.translate(_this.googleObj, key).subscribe(function (res) { resolve(res.data.translations[0].translatedText); }, function (err) { console.log(err); reject(err); }); }); }; TaskFormComponent.prototype.numberOnly = function (event) { var charCode = event.which ? event.which : event.keyCode; if (charCode > 31 && (charCode < 45 || charCode > 57)) { return false; } return true; }; TaskFormComponent.prototype.getTages = function () { var _this = this; this.projectService.getSprintTags(this.projectId).then(function (tags) { _this.sprintTags = tags; }, function (err) { _this.toastr.error(err.message); }); }; TaskFormComponent.prototype.getSprintLists = function () { var _this = this; this.projectService.sprintLists().then(function (sprints) { _this.sprintList = sprints; }); }; TaskFormComponent.prototype.dublicateData = function (type) { var _this = this; var taskFormId = type == 0 ? this.id : this.sprintTaskFormtId; var sprintId = type == 0 ? this.taskSprintId : this.questionSprintId; var question = type == 0 ? null : this.questionId; var request = { project_id: sprintId, task_form_id: taskFormId, type: type, question_id: question, }; if (type == 1 && !question) { return this.toastr.error("Please Select the question in case of question dublicate"); } if (sprintId && taskFormId) { this.projectService .dublicateTaskFormData(request) .then(function (data) { // this.toastr.success('Success'); _this.sprintTaskFormtId = null; _this.taskSprintId = null; _this.questionSprintId = null; _this.questionId = null; _this.GetSprint(); }) .catch(function (err) { _this.toastr.error("Error in saving form"); console.error(err); }); } else { this.toastr.error(sprintId ? "Select the task form" : "Select the sprint"); } }; TaskFormComponent.prototype.changeTaskSprint = function (event) { console.log(event[0].value); var sprintList = this.sprintList.filter(function (sprint) { return sprint.id == event[0].value; }); this.taskFormList = sprintList[0].task_forms; console.log("this.taskFormList ==>", this.taskFormList); }; TaskFormComponent = __decorate([ core_1.Component({ selector: "app-task-form", template: __webpack_require__(/*! ./taskform-detail.component.html */ "./src/app/modules/sprints/components/taskforms/taskform-detail/taskform-detail.component.html"), styles: [__webpack_require__(/*! ./taskform-detail.component.css */ "./src/app/modules/sprints/components/taskforms/taskform-detail/taskform-detail.component.css")], }), __metadata("design:paramtypes", [sprintService_1.SprintService, router_1.ActivatedRoute, router_1.Router, ngx_toastr_1.ToastrService, tag_service_1.TagService, google_services_1.GoogleService]) ], TaskFormComponent); return TaskFormComponent; }()); exports.TaskFormComponent = TaskFormComponent; /***/ }), /***/ "./src/app/modules/sprints/components/taskforms/taskform-list/taskform-list.component.css": /*!************************************************************************************************!*\ !*** ./src/app/modules/sprints/components/taskforms/taskform-list/taskform-list.component.css ***! \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/modules/sprints/components/taskforms/taskform-list/taskform-list.component.html": /*!*************************************************************************************************!*\ !*** ./src/app/modules/sprints/components/taskforms/taskform-list/taskform-list.component.html ***! \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\n\t
    \r\n\t\t

    Task Forms

    \r\n\t
    \r\n\t
    \r\n\t
    \r\n\r\n\t
    \r\n\t\t\r\n\r\n\t\t\r\n\t\t\t \r\n\t\t\r\n\t
    \r\n
    \r\n
    \r\n
    \r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{{ value }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t Title \r\n\t\t\t\r\n\t\t\t\t{{ value }}\r\n\t\t\t\r\n\t\t\r\n\r\n\t\t\r\n\t\t\t Questions \r\n\t\t\t\r\n\t\t\t\t{{ value.length }}\r\n\t\t\t\r\n\t\t\r\n\r\n\t\t\r\n\t\t\t\r\n\t\t\t\tCreated At\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t{{ value | date }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t Edit \r\n\t\t\t\r\n\t\t\t\tEdit\r\n\t\t\t\r\n\t\t\r\n\t\r\n
    \r\n" /***/ }), /***/ "./src/app/modules/sprints/components/taskforms/taskform-list/taskform-list.component.ts": /*!***********************************************************************************************!*\ !*** ./src/app/modules/sprints/components/taskforms/taskform-list/taskform-list.component.ts ***! \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var TaskformsComponent = /** @class */ (function () { function TaskformsComponent() { } TaskformsComponent.prototype.ngOnInit = function () { }; __decorate([ core_1.Input(), __metadata("design:type", Array) ], TaskformsComponent.prototype, "rows", void 0); TaskformsComponent = __decorate([ core_1.Component({ selector: 'app-taskforms', template: __webpack_require__(/*! ./taskform-list.component.html */ "./src/app/modules/sprints/components/taskforms/taskform-list/taskform-list.component.html"), styles: [__webpack_require__(/*! ./taskform-list.component.css */ "./src/app/modules/sprints/components/taskforms/taskform-list/taskform-list.component.css")] }), __metadata("design:paramtypes", []) ], TaskformsComponent); return TaskformsComponent; }()); exports.TaskformsComponent = TaskformsComponent; /***/ }), /***/ "./src/app/modules/sprints/components/tasks/task-edit/task-edit.component.css": /*!************************************************************************************!*\ !*** ./src/app/modules/sprints/components/tasks/task-edit/task-edit.component.css ***! \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "input::-webkit-outer-spin-button,\r\ninput::-webkit-inner-spin-button {\r\n -webkit-appearance: none;\r\n margin: 0;\r\n}\r\n\r\n\r\n/* Firefox */\r\n\r\n\r\ninput[type=number] {\r\n -moz-appearance: textfield;\r\n}\r\n\r\n\r\ninput[type='checkbox'] {\r\n outline: none;\r\n /* border: none; */\r\n width: 40px;\r\n height: 40px;\r\n border: 1px solid gray;\r\n}\r\n\r\n\r\ninput[type='checkbox']:focus {\r\n outline: none;\r\n box-shadow: none;\r\n}\r\n" /***/ }), /***/ "./src/app/modules/sprints/components/tasks/task-edit/task-edit.component.html": /*!*************************************************************************************!*\ !*** ./src/app/modules/sprints/components/tasks/task-edit/task-edit.component.html ***! \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\r\n\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t  \r\n\t\t\t\r\n\t\t\t  \r\n\t\t\t\r\n\t\t\t  \r\n\r\n\t\t\t\r\n\t\t
    \r\n\t
    \r\n\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t\t Basic Details\r\n\t\t
    \r\n\t\t\r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tArabic Title\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tArabic Title is required\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tRelated Tasks\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tReward\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tReward is required\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tTask Form\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tTask Form is required\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tAllowed Worker Ids\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tDisallowed Ids\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tShort Description\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tShort Description is required\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tShort Description (AR)\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tShort Description is required\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tDescription\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tDescription (AR)\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tSoft Prequisites\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tHard Prequisites\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tQuota\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tQuota is required\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tQuota Per Worker\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tQuota Per Worker is required\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tSubmission Radius\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tSubmission Radius is required\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tClaim Radius\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tClaim Radius is required\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tArea\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\tQuota\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t 1\r\n\t\t\t\t\t\t\t\t\t\t\"\r\n\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tCurrent Location\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tNationalities\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\tQuota\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t 1\r\n\t\t\t\t\t\t\t\t\t\t\"\r\n\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tAge Range\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\tQuota\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t 1\"\r\n\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t  \r\n\t\t\t\r\n\t\t
    \r\n\t
    \r\n\r\n" /***/ }), /***/ "./src/app/modules/sprints/components/tasks/task-edit/task-edit.component.ts": /*!***********************************************************************************!*\ !*** ./src/app/modules/sprints/components/tasks/task-edit/task-edit.component.ts ***! \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var area_service_1 = __webpack_require__(/*! src/app/services/area.service */ "./src/app/services/area.service.ts"); // import { Task, Sprint } from 'src/app/model/sprint'; var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var BreadCrumb_1 = __webpack_require__(/*! src/app/model/BreadCrumb */ "./src/app/model/BreadCrumb.ts"); var sprintService_1 = __webpack_require__(/*! src/app/modules/sprints/service/sprintService */ "./src/app/modules/sprints/service/sprintService.ts"); var google_services_1 = __webpack_require__(/*! src/app/services/google.services */ "./src/app/services/google.services.ts"); var TaskEditComponent = /** @class */ (function () { function TaskEditComponent(projectService, activatedRoute, router, toastr, _google, areaService) { this.projectService = projectService; this.activatedRoute = activatedRoute; this.router = router; this.toastr = toastr; this._google = _google; this.areaService = areaService; this.isShown = false; this.minValue = 1; this.maxValue = 50; this.submitted = false; this.Sprint = null; this.loading = true; this.email = null; this.id = null; this.projectId = null; this.model = null; this.areas = null; this.user = null; this.genders = [ { id: 2, name: "All" }, { id: 0, name: "Male" }, { id: 1, name: "Female" }, ]; this.oses = [ { id: "all", name: "All" }, { id: "Android", name: "Android" }, { id: "iOS", name: "IOS" }, { id: "web", name: "Web" }, ]; this.countries = [ { id: 0, name: "Global" }, { id: 1, name: "Afghanistan" }, { id: 2, name: "Albania" }, { id: 3, name: "Algeria" }, { id: 4, name: "Andorra" }, { id: 5, name: "Angola" }, { id: 6, name: "Anguilla" }, { id: 7, name: "Antigua and Barbuda" }, { id: 8, name: "Argentina" }, { id: 9, name: "Armenia" }, { id: 10, name: "Australia" }, { id: 11, name: "Austria" }, { id: 12, name: "Azerbaijan" }, { id: 13, name: "Bahrain" }, { id: 14, name: "Bangladesh" }, { id: 15, name: "Barbados" }, { id: 16, name: "Belarus" }, { id: 17, name: "Belgium" }, { id: 18, name: "Belize" }, { id: 19, name: "Benin" }, { id: 20, name: "Bermuda" }, { id: 21, name: "Bhutan" }, { id: 22, name: "Bolivia" }, { id: 23, name: "Bosnia and Herzegovina" }, { id: 24, name: "Botswana" }, { id: 25, name: "Brazil" }, { id: 26, name: "British Indian Ocean Territory" }, { id: 27, name: "Virgin Islands (British)" }, { id: 28, name: "Brunei" }, { id: 29, name: "Bulgaria" }, { id: 30, name: "Burkina Faso" }, { id: 31, name: "Burundi" }, { id: 32, name: "Cambodia" }, { id: 33, name: "Cameroon" }, { id: 34, name: "Canada" }, { id: 35, name: "Cape Verde" }, { id: 36, name: "Cayman Islands" }, { id: 37, name: "Central African Republic" }, { id: 38, name: "Chad" }, { id: 39, name: "Chile" }, { id: 40, name: "China" }, { id: 41, name: "Colombia" }, { id: 42, name: "Comoros" }, { id: 43, name: "Republic of the Congo" }, { id: 44, name: "Democratic Republic of the Congo" }, { id: 45, name: "Cook Islands" }, { id: 46, name: "Costa Rica" }, { id: 47, name: "Croatia" }, { id: 48, name: "Cuba" }, { id: 49, name: "Cyprus" }, { id: 50, name: "Czech Republic" }, { id: 51, name: "Ivory Coast" }, { id: 52, name: "Denmark" }, { id: 53, name: "Djibouti" }, { id: 54, name: "Dominica" }, { id: 55, name: "Dominican Republic" }, { id: 56, name: "East Timor" }, { id: 57, name: "Ecuador" }, { id: 58, name: "Egypt" }, { id: 59, name: "El Salvador" }, { id: 60, name: "Equatorial Guinea" }, { id: 61, name: "Eritrea" }, { id: 62, name: "Estonia" }, { id: 63, name: "Ethiopia" }, { id: 64, name: "Falkland Islands" }, { id: 65, name: "Faroe Islands" }, { id: 66, name: "Federated States of Micronesia" }, { id: 67, name: "Fiji" }, { id: 68, name: "Finland" }, { id: 69, name: "France" }, { id: 70, name: "Gabon" }, { id: 71, name: "The Gambia" }, { id: 72, name: "Georgia" }, { id: 73, name: "Germany" }, { id: 74, name: "Ghana" }, { id: 75, name: "Gibraltar" }, { id: 76, name: "Greece" }, { id: 77, name: "Greenland" }, { id: 78, name: "Grenada" }, { id: 79, name: "Guatemala" }, { id: 80, name: "Guernsey" }, { id: 81, name: "Guinea" }, { id: 82, name: "Guinea-Bissau" }, { id: 83, name: "Guyana" }, { id: 84, name: "Haiti" }, { id: 85, name: "Honduras" }, { id: 86, name: "Hungary" }, { id: 87, name: "Iceland" }, { id: 88, name: "India" }, { id: 89, name: "Indonesia" }, { id: 90, name: "Iran" }, { id: 91, name: "Iraq" }, { id: 92, name: "Republic of Ireland" }, { id: 93, name: "Isle of Man" }, { id: 94, name: "Israel" }, { id: 95, name: "Italy" }, { id: 96, name: "Jamaica" }, { id: 97, name: "Japan" }, { id: 98, name: "Jersey" }, { id: 99, name: "Jordan" }, { id: 100, name: "Kazakhstan" }, { id: 101, name: "Kenya" }, { id: 102, name: "Kiribati" }, { id: 103, name: "Republic of Kosovo" }, { id: 104, name: "Kuwait" }, { id: 105, name: "Kyrgyzstan" }, { id: 106, name: "Laos" }, { id: 107, name: "Latvia" }, { id: 108, name: "Lebanon" }, { id: 109, name: "Lesotho" }, { id: 110, name: "Liberia" }, { id: 111, name: "Libya" }, { id: 112, name: "Liechtenstein" }, { id: 113, name: "Lithuania" }, { id: 114, name: "Luxembourg" }, { id: 115, name: "Republic of Macedonia" }, { id: 116, name: "Madagascar" }, { id: 117, name: "Malawi" }, { id: 118, name: "Malaysia" }, { id: 119, name: "Maldives" }, { id: 120, name: "Mali" }, { id: 121, name: "Malta" }, { id: 122, name: "Marshall Islands" }, { id: 123, name: "Mauritania" }, { id: 124, name: "Mauritius" }, { id: 125, name: "Mexico" }, { id: 126, name: "Moldova" }, { id: 127, name: "Monaco" }, { id: 128, name: "Mongolia" }, { id: 129, name: "Montenegro" }, { id: 130, name: "Montserrat" }, { id: 131, name: "Morocco" }, { id: 132, name: "Mozambique" }, { id: 133, name: "Myanmar" }, { id: 134, name: "Namibia" }, { id: 135, name: "Nauru" }, { id: 136, name: "Nepal" }, { id: 137, name: "New Zealand" }, { id: 138, name: "Nicaragua" }, { id: 139, name: "Niger" }, { id: 140, name: "Nigeria" }, { id: 141, name: "Niue" }, { id: 142, name: "North Korea" }, { id: 143, name: "Norway" }, { id: 144, name: "Oman" }, { id: 145, name: "Pakistan" }, { id: 146, name: "Palau" }, { id: 147, name: "Palestine" }, { id: 148, name: "Panama" }, { id: 149, name: "Papua New Guinea" }, { id: 150, name: "Paraguay" }, { id: 151, name: "Peru" }, { id: 152, name: "Philippines" }, { id: 153, name: "Pitcairn Islands" }, { id: 154, name: "Poland" }, { id: 155, name: "Portugal" }, { id: 156, name: "Qatar" }, { id: 157, name: "Romania" }, { id: 158, name: "Russia" }, { id: 159, name: "Rwanda" }, { id: 160, name: "Saint Helena" }, { id: 161, name: "Saint Kitts and Nevis" }, { id: 162, name: "Saint Lucia" }, { id: 163, name: "Saint Vincent and the Grenadines" }, { id: 164, name: "Samoa" }, { id: 165, name: "San Marino" }, { id: 166, name: "Saudi Arabia" }, { id: 167, name: "Senegal" }, { id: 168, name: "Serbia" }, { id: 169, name: "Seychelles" }, { id: 170, name: "Sierra Leone" }, { id: 171, name: "Singapore" }, { id: 172, name: "Slovakia" }, { id: 173, name: "Slovenia" }, { id: 174, name: "Solomon Islands" }, { id: 175, name: "Somalia" }, { id: 176, name: "South Africa" }, { id: 177, name: "South Georgia" }, { id: 178, name: "South Korea" }, { id: 179, name: "South Sudan" }, { id: 180, name: "Spain" }, { id: 181, name: "Sri Lanka" }, { id: 182, name: "Sudan" }, { id: 183, name: "Suriname" }, { id: 184, name: "Swaziland" }, { id: 185, name: "Sweden" }, { id: 186, name: "Switzerland" }, { id: 187, name: "Syria" }, { id: 188, name: "São Tomé and Príncipe" }, { id: 189, name: "Taiwan" }, { id: 190, name: "Tajikistan" }, { id: 191, name: "Tanzania" }, { id: 192, name: "Thailand" }, { id: 193, name: "The Bahamas" }, { id: 194, name: "Netherlands" }, { id: 195, name: "Togo" }, { id: 196, name: "Tokelau" }, { id: 197, name: "Tonga" }, { id: 198, name: "Trinidad and Tobago" }, { id: 199, name: "Tunisia" }, { id: 200, name: "Turkey" }, { id: 201, name: "Turkmenistan" }, { id: 202, name: "Turks and Caicos Islands" }, { id: 203, name: "Tuvalu" }, { id: 204, name: "Uganda" }, { id: 205, name: "Ukraine" }, { id: 206, name: "United Arab Emirates" }, { id: 207, name: "United Kingdom" }, { id: 208, name: "United States" }, { id: 209, name: "Uruguay" }, { id: 210, name: "Uzbekistan" }, { id: 211, name: "Vanuatu" }, { id: 212, name: "Holy See" }, { id: 213, name: "Venezuela" }, { id: 214, name: "Vietnam" }, { id: 215, name: "Yemen" }, { id: 216, name: "Zambia" }, { id: 217, name: "Zimbabwe" }, ]; this.options = { floor: 0, ceil: 99, }; this.saveQuota = 0; this.googleObj = new google_services_1.GoogleObj(); } TaskEditComponent.prototype.ngOnInit = function () { var _this = this; this.user = JSON.parse(localStorage.getItem("user")); this.activatedRoute.queryParams.subscribe(function (params) { _this.projectId = +_this.activatedRoute.snapshot.paramMap.get("id"); _this.id = +_this.activatedRoute.snapshot.paramMap.get("task"); _this.hideDelbutton(_this.id); _this.projectService .getSprint(_this.email, _this.projectId) .then(function (sprint) { _this.Sprint = sprint; console.log(_this.Sprint); if (_this.id > 0) { _this.model = _this.Sprint.tasks.find(function (t) { return t.id === _this.id; }); } else { _this.model = { id: null, title: "", titlear: "", task_form_id: null, status: 0, max_submission_count: 100, max_submission_count_per_worker: 1, area_id: null, address: null, amount: 0, related_task_ids: null, hard_prerequisite_ids: null, reward_id: null, created_at: new Date(), updated_at: new Date(), location: null, min_age: 1, max_age: 99, os: 0, gender: 2, description: "", descriptionar: "", short_description: "", short_description_ar: "", is_current_location: true, age_constraints: [{ value: [0, 99], quota: 100 }], gender_constraints: [{ value: [2], quota: 100 }], os_constraints: [{ value: ["all"], quota: 100 }], nationality_constraints: [ { value: [0], quota: 100 }, ], area_constraints: [{ value: [0], quota: 100 }], }; } if (_this.model.age_constraints == null) { _this.model.age_constraints = [ { value: [0, 99], quota: _this.model.max_submission_count, }, ]; } if (_this.model.gender_constraints == null) { _this.model.gender_constraints = [ { value: [2], quota: _this.model.max_submission_count, }, ]; } if (_this.model.os_constraints == null) { _this.model.os_constraints = [ { value: ["all"], quota: _this.model.max_submission_count, }, ]; } if (_this.model.nationality_constraints == null) { _this.model.nationality_constraints = [ { value: [0], quota: _this.model.max_submission_count, }, ]; } if (_this.model.area_constraints == null) { _this.model.area_constraints = [ { value: [0], quota: _this.model.max_submission_count, }, ]; } _this.saveQuota = _this.model.max_submission_count; console.log(_this.model); _this.buildBreadCrumb(); _this.loading = false; _this.areaService.getAreas().then(function (a) { var globalArray = [{ id: 0, name: "Global" }]; _this.areas = globalArray.concat(a); if (_this.user.role === "a") { _this.areas = a.filter(function (c) { return c.parent_id === _this.user.country_id; }); } }); }); }); }; //eznd on init TaskEditComponent.prototype.translate = function () { var _this = this; this.doTranslate(this.model.title).then(function (d) { _this.model.titlear = d.toString(); }); this.doTranslate(this.model.description).then(function (d) { _this.model.descriptionar = d.toString(); }); this.doTranslate(this.model.short_description).then(function (d) { _this.model.short_description_ar = d.toString(); }); }; TaskEditComponent.prototype.hideDelbutton = function (id) { if (id != 0) { this.isShown = !this.isShown; } else { this.isShown == this.isShown; } }; TaskEditComponent.prototype.doTranslate = function (key) { var _this = this; return new Promise(function (resolve, reject) { _this._google.translate(_this.googleObj, key).subscribe(function (res) { resolve(res.data.translations[0].translatedText); }, function (err) { console.log(err); reject(err); }); }); }; TaskEditComponent.prototype.onSubmit = function () { this.submitted = true; }; TaskEditComponent.prototype.buildBreadCrumb = function () { //Sprints? Sprint()>Task Forms () this.crumbs = []; this.crumbs.push(new BreadCrumb_1.BreadCrumb("Home", "/")); this.crumbs.push(new BreadCrumb_1.BreadCrumb("Sprints", "/sprints")); this.crumbs.push(new BreadCrumb_1.BreadCrumb(this.Sprint.name, "/sprints/" + this.Sprint.id)); this.crumbs.push(new BreadCrumb_1.BreadCrumb(this.model.title ? this.model.title : "Task", "")); }; TaskEditComponent.prototype.delete = function () { var _this = this; this.model.is_deleted = true; this.projectService .saveTask(this.model) .then(function (data) { _this.toastr.success("Deleted Successfully!"); _this.back(); }) .catch(function (err) { _this.toastr.error("Error in"); // console.error(err); }); //this.back(); }; //end post form TaskEditComponent.prototype.postForm = function () { var _this = this; if (this.model.description === null) this.model.description = ""; if (this.model.descriptionar === null) this.model.descriptionar = ""; if (this.model.short_description === null) this.model.short_description = ""; if (this.model.short_description_ar === null) this.model.short_description_ar = ""; if (this.model.titlear == "") { this.toastr.warning("Please insert in the Arabic Title"); return false; } if (this.model.reward_id == null) { this.toastr.warning("Reward must be selected"); return false; } if (this.model.task_form_id == null) { this.toastr.warning("Taskform must be selected"); return false; } if (this.model.max_submission_count == 0 || this.model.max_submission_count == null || !this.model.max_submission_count) { this.toastr.warning("Quota must be greater than 0"); return false; } if (this.model.max_submission_count_per_worker == 0 || this.model.max_submission_count_per_worker == null || !this.model.max_submission_count_per_worker) { this.toastr.warning("Quota Per Worker must be greater than 0"); return false; } if (this.model.submission_radius == null) { this.toastr.warning("Please Enter the Submission Radius"); return false; } if (this.model.claim_radius == null) { this.toastr.warning("Please Enter the Claim Radius"); return false; } var bolCheck = false; var globalCheck = false; var bolCheckValue = false; var message; var globalMessage; var valueName; this.model.age_constraints.forEach(function (element) { if (element.quota == 0) { bolCheck = true; message = "Age"; } }); this.model.gender_constraints.forEach(function (element) { if (element.quota == 0) { bolCheck = true; message = "Gender"; } if (_this.model.gender_constraints.length > 1) { var value = element.value.filter(function (x) { return x == 2; }); if (value.length > 0) { globalCheck = true; globalMessage = "Can not add an additional criteria with All option"; } } else { var value = element.value.filter(function (x) { return x == 2; }); if (value.length > 0 && element.value.length > 1) { globalCheck = true; globalMessage = "Can not add an additional criteria with All option"; } } }); this.model.nationality_constraints.forEach(function (element) { if (element.quota == 0) { bolCheck = true; message = "Nationality"; } if (_this.model.nationality_constraints.length > 1) { var value = element.value.filter(function (x) { return x == 0; }); if (value.length > 0) { globalCheck = true; globalMessage = "Can not add an additional criteria with Global option"; } } else { var value = element.value.filter(function (x) { return x == 0; }); if (value.length > 0 && element.value.length > 1) { globalCheck = true; globalMessage = "Can not add an additional criteria with Global option"; } } }); this.model.area_constraints.forEach(function (element) { if (element.quota == 0) { bolCheck = true; message = "Area"; } if (_this.model.area_constraints.length > 1) { var value = element.value.filter(function (x) { return x == 0; }); if (value.length > 0) { globalCheck = true; globalMessage = "Can not add an additional criteria with Global option"; } } else { var value = element.value.filter(function (x) { return x == 0; }); if (value.length > 0 && element.value.length > 1) { globalCheck = true; globalMessage = "Can not add an additional criteria with Global option"; } } }); this.model.os_constraints.forEach(function (element) { if (element.quota == 0) { bolCheck = true; message = "OS"; } if (_this.model.os_constraints.length > 1) { var value = element.value.filter(function (x) { return x == "all"; }); if (value.length > 0) { globalCheck = true; globalMessage = "Can not add an additional criteria with All option"; } } else { var value = element.value.filter(function (x) { return x == "all"; }); if (value.length > 0 && element.value.length > 1) { globalCheck = true; globalMessage = "Can not add an additional criteria with All option"; } } }); if (bolCheck) { this.toastr.warning("Quota of " + message + " must be greater than 0"); return false; } if (bolCheckValue) { this.toastr.warning(valueName + " must be selected"); return false; } if (globalCheck) { this.toastr.warning(globalMessage); return false; } this.projectService .saveTask(this.model) .then(function (data) { _this.toastr.success("Saved Successfully!"); _this.back(); }) .catch(function (err) { _this.toastr.error("Error in"); // console.error(err); }); //this.back(); }; //end post form TaskEditComponent.prototype.back = function () { this.router.navigate(["sprints", this.Sprint.id]); }; TaskEditComponent.prototype.addAgeConstrait = function () { var quotaCount = 0; this.model.age_constraints.forEach(function (elementAge) { quotaCount = quotaCount + Number(elementAge.quota); }); if (quotaCount < this.model.max_submission_count) { var remainingQuota = this.model.max_submission_count - quotaCount; this.model.age_constraints.push({ value: [0, 99], quota: remainingQuota, }); } else { this.toastr.warning("Age Quoata is full"); } }; TaskEditComponent.prototype.addGenderConstrait = function () { var quotaCount = 0; var checkAll = false; this.model.gender_constraints.forEach(function (elementG) { quotaCount = quotaCount + Number(elementG.quota); elementG.value.forEach(function (value) { if (value == 2) { checkAll = true; } }); }); if (quotaCount < this.model.max_submission_count) { var remainingQuota = this.model.max_submission_count - quotaCount; if (!checkAll) { if (this.model.gender_constraints.length < 3) { this.model.gender_constraints.push({ value: [0], quota: remainingQuota, }); } else { this.toastr.warning("No add more gender fields"); } } else { return this.toastr.warning("Can not add an additional criteria with All option"); } } else { this.toastr.warning("Gender Quoata is full"); } }; TaskEditComponent.prototype.addOSConstrait = function () { var quotaCount = 0; var checkAll = false; this.model.os_constraints.forEach(function (elementOS) { quotaCount = quotaCount + Number(elementOS.quota); elementOS.value.forEach(function (value) { if (value == "all") { checkAll = true; } }); }); if (quotaCount < this.model.max_submission_count) { var remainingQuota = this.model.max_submission_count - quotaCount; if (!checkAll) { if (this.model.os_constraints.length < 4) { this.model.os_constraints.push({ value: ["all"], quota: remainingQuota, }); } else { this.toastr.warning("No add more OS fields"); } } else { return this.toastr.warning("Can not add an additional criteria with All option"); } } else { this.toastr.warning("OS Quoata is full"); } }; TaskEditComponent.prototype.addNationalityConstrait = function () { var quotaCount = 0; var checkAll = false; this.model.nationality_constraints.forEach(function (elementN) { quotaCount = quotaCount + Number(elementN.quota); elementN.value.forEach(function (value) { if (value == 0) { checkAll = true; } }); }); if (quotaCount < this.model.max_submission_count) { var remainingQuota = this.model.max_submission_count - quotaCount; if (!checkAll) { this.model.nationality_constraints.push({ value: [0], quota: remainingQuota, }); } else { return this.toastr.warning("Can not add an additional criteria with Global option"); } } else { this.toastr.warning("Nationality Quoata is full"); } }; TaskEditComponent.prototype.addAreaConstrait = function () { var quotaCount = 0; var checkAll = false; this.model.area_constraints.forEach(function (elementA) { quotaCount = quotaCount + Number(elementA.quota); elementA.value.forEach(function (value) { if (value == 0) { checkAll = true; } }); }); console.log(quotaCount); if (quotaCount < this.model.max_submission_count) { var remainingQuota = this.model.max_submission_count - quotaCount; if (!checkAll) { this.model.area_constraints.push({ value: [0], quota: remainingQuota, }); } else { return this.toastr.warning("Can not add an additional criteria with Global option"); } } else { this.toastr.warning("Area Quoata is full"); } }; TaskEditComponent.prototype.valAreaQuaota = function (arrayVal, event, index) { console.log(arrayVal); console.log(event.target.value); var saveVal = 0; var remianingVal = 0; var updateVal = 0; arrayVal.forEach(function (elementArr, ind) { saveVal = saveVal + Number(elementArr.quota); if (ind == index) { updateVal = Number(elementArr.quota); } }); console.log(saveVal); if (saveVal > this.model.max_submission_count) { // remianingVal = this.model.max_submission_count - saveVal; remianingVal = this.model.max_submission_count - (saveVal - updateVal); arrayVal[index].quota = remianingVal; return this.toastr.warning("You cannot enter the value above the quota"); } }; TaskEditComponent.prototype.changeQuota = function () { console.log(this.saveQuota); this.model.age_constraints.forEach(function (element) { element.quota = 0; }); this.model.gender_constraints.forEach(function (element) { element.quota = 0; }); this.model.nationality_constraints.forEach(function (element) { element.quota = 0; }); this.model.area_constraints.forEach(function (element) { element.quota = 0; }); this.model.os_constraints.forEach(function (element) { element.quota = 0; }); // this.model.age_constraints = [{value: [0,99], quota: this.model.max_submission_count}]; // this.model.gender_constraints = [{value: 0, quota: this.model.max_submission_count}]; // this.model.nationality_constraints = [{value: null, quota: this.model.max_submission_count}]; // this.model.area_constraints = [{value: null, quota: this.model.max_submission_count}]; // this.model.os_constraints = [{value: 0, quota: this.model.max_submission_count}]; }; TaskEditComponent = __decorate([ core_1.Component({ selector: "app-task-edit", template: __webpack_require__(/*! ./task-edit.component.html */ "./src/app/modules/sprints/components/tasks/task-edit/task-edit.component.html"), styles: [__webpack_require__(/*! ./task-edit.component.css */ "./src/app/modules/sprints/components/tasks/task-edit/task-edit.component.css")], }), __metadata("design:paramtypes", [sprintService_1.SprintService, router_1.ActivatedRoute, router_1.Router, ngx_toastr_1.ToastrService, google_services_1.GoogleService, area_service_1.AreaService]) ], TaskEditComponent); return TaskEditComponent; }()); //end xomponent exports.TaskEditComponent = TaskEditComponent; /***/ }), /***/ "./src/app/modules/sprints/components/tasks/task-list/task-list.component.css": /*!************************************************************************************!*\ !*** ./src/app/modules/sprints/components/tasks/task-list/task-list.component.css ***! \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/modules/sprints/components/tasks/task-list/task-list.component.html": /*!*************************************************************************************!*\ !*** ./src/app/modules/sprints/components/tasks/task-list/task-list.component.html ***! \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\n
    \r\n

    Tasks

    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n Title\r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n amount\r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n Status\r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n \r\n \r\n Created At\r\n \r\n \r\n {{ value | date}}\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n Edit\r\n \r\n \r\n \r\n
    \r\n" /***/ }), /***/ "./src/app/modules/sprints/components/tasks/task-list/task-list.component.ts": /*!***********************************************************************************!*\ !*** ./src/app/modules/sprints/components/tasks/task-list/task-list.component.ts ***! \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); //import { CloudOptions, CloudData } from 'angular-tag-cloud-module'; var TasksComponent = /** @class */ (function () { function TasksComponent() { } TasksComponent.prototype.ngOnInit = function () { }; TasksComponent.prototype.getStatus = function (status) { if (status === 0) return 'Available'; if (status === 1) return 'Not Available'; return '-'; }; __decorate([ core_1.Input(), __metadata("design:type", Array) ], TasksComponent.prototype, "rows", void 0); TasksComponent = __decorate([ core_1.Component({ selector: 'app-tasks', template: __webpack_require__(/*! ./task-list.component.html */ "./src/app/modules/sprints/components/tasks/task-list/task-list.component.html"), styles: [__webpack_require__(/*! ./task-list.component.css */ "./src/app/modules/sprints/components/tasks/task-list/task-list.component.css")] }), __metadata("design:paramtypes", []) ], TasksComponent); return TasksComponent; }()); exports.TasksComponent = TasksComponent; /***/ }), /***/ "./src/app/modules/sprints/model/sprintModel.ts": /*!******************************************************!*\ !*** ./src/app/modules/sprints/model/sprintModel.ts ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var Type; (function (Type) { Type["Word"] = "word"; Type["Character"] = "character"; })(Type = exports.Type || (exports.Type = {})); // Converts JSON strings to/from your types // and asserts the results of JSON.parse at runtime var Convert; (function (Convert) { function toSprint(json) { return cast(JSON.parse(json), r("Sprint")); } Convert.toSprint = toSprint; function sprintToJson(value) { return JSON.stringify(uncast(value, r("Sprint")), null, 2); } Convert.sprintToJson = sprintToJson; function invalidValue(typ, val) { throw Error("Invalid value " + JSON.stringify(val) + " for type " + JSON.stringify(typ)); } function jsonToJSProps(typ) { if (typ.jsonToJS === undefined) { var map = {}; typ.props.forEach(function (p) { return map[p.json] = { key: p.js, typ: p.typ }; }); typ.jsonToJS = map; } return typ.jsonToJS; } function jsToJSONProps(typ) { if (typ.jsToJSON === undefined) { var map = {}; typ.props.forEach(function (p) { return map[p.js] = { key: p.json, typ: p.typ }; }); typ.jsToJSON = map; } return typ.jsToJSON; } function transform(val, typ, getProps) { function transformPrimitive(typ, val) { if (val === null) return val; if (val === undefined) return typ; if (typeof typ === typeof val) return val; return invalidValue(typ, val); } function transformUnion(typs, val) { // val must validate against one typ in typs var l = typs.length; for (var i = 0; i < l; i++) { var typ = typs[i]; try { return transform(val, typ, getProps); } catch (_) { } } return invalidValue(typs, val); } function transformEnum(cases, val) { if (cases.indexOf(val) !== -1) return val; return invalidValue(cases, val); } function transformArray(typ, val) { // val must be an array with no invalid elements if (!Array.isArray(val)) val = []; return val.map(function (el) { return transform(el, typ, getProps); }); } function transformDate(typ, val) { if (val === null) { return null; } var d = new Date(val); if (isNaN(d.valueOf())) { return invalidValue("Date", val); } return d; } function transformObject(props, additional, val) { if (val === null || typeof val !== "object" || Array.isArray(val)) { return invalidValue("object", val); } var result = {}; Object.getOwnPropertyNames(props).forEach(function (key) { var prop = props[key]; var v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined; result[prop.key] = transform(v, prop.typ, getProps); }); Object.getOwnPropertyNames(val).forEach(function (key) { if (!Object.prototype.hasOwnProperty.call(props, key)) { result[key] = transform(val[key], additional, getProps); } }); return result; } if (typ === "any") return val; if (typ === null) { if (val === null || val === true) return val; return invalidValue(typ, val); } if (typ === false) { return val; // return invalidValue(typ, val); } while (typeof typ === "object" && typ.ref !== undefined) { typ = typeMap[typ.ref]; } if (Array.isArray(typ)) return transformEnum(typ, val); if (typeof typ === "object") { return typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val) : typ.hasOwnProperty("arrayItems") ? transformArray(typ.arrayItems, val) : typ.hasOwnProperty("props") ? transformObject(getProps(typ), typ.additional, val) : invalidValue(typ, val); } // Numbers can be parsed by Date but shouldn't be. if (typ === Date && typeof val !== "number") return transformDate(typ, val); return transformPrimitive(typ, val); } function cast(val, typ) { return transform(val, typ, jsonToJSProps); } function uncast(val, typ) { return transform(val, typ, jsToJSONProps); } function a(typ) { return { arrayItems: typ }; } function u() { var typs = []; for (var _i = 0; _i < arguments.length; _i++) { typs[_i] = arguments[_i]; } return { unionMembers: typs }; } function o(props, additional) { return { props: props, additional: additional }; } function m(additional) { return { props: [], additional: additional }; } function r(name) { return { ref: name }; } var typeMap = { "Sprint": o([ { json: "id", js: "id", typ: 0 }, { json: "tag", js: "tag", typ: "" }, { json: "name", js: "name", typ: "" }, { json: "forms", js: "forms", typ: a(r("Form")) }, { json: "rules", js: "rules", typ: null }, { json: "tasks", js: "tasks", typ: a(r("Task")) }, { json: "namear", js: "namear", typ: "" }, { json: "status", js: "status", typ: 0 }, { json: "area_id", js: "area_id", typ: 0 }, { json: "iconurl", js: "iconurl", typ: "" }, { json: "backgroundurl", js: "backgroundurl", typ: "" }, { json: "dashboardurl", js: "dashboardurl", typ: "" }, { json: "rewards", js: "rewards", typ: a(r("Reward")) }, { json: "is_pilot", js: "is_pilot", typ: true }, { json: "priority", js: "priority", typ: 0 }, { json: "account_id", js: "account_id", typ: 0 }, { json: "country_id", js: "country_id", typ: 0 }, { json: "created_at", js: "created_at", typ: Date }, { json: "extra_text", js: "extra_text", typ: "" }, { json: "is_deleted", js: "is_deleted", typ: u(true, null) }, { json: "started_at", js: "started_at", typ: Date }, { json: "updated_at", js: "updated_at", typ: Date }, { json: "description", js: "description", typ: "" }, { json: "finished_at", js: "finished_at", typ: u(Date, null) }, { json: "schedulings", js: "schedulings", typ: a(r("Scheduling")) }, { json: "system_name", js: "system_name", typ: "" }, { json: "total_spent", js: "total_spent", typ: 0 }, { json: "is_community", js: "is_community", typ: true }, { json: "project_type", js: "project_type", typ: 0 }, { json: "customer_name", js: "customer_name", typ: "" }, { json: "descriptionar", js: "descriptionar", typ: "" }, { json: "account_deal_id", js: "account_deal_id", typ: null }, { json: "latest_activity", js: "latest_activity", typ: Date }, { json: "project_group_id", js: "project_group_id", typ: null }, { json: "short_description", js: "short_description", typ: "" }, { json: "allowed_worker_ids", js: "allowed_worker_ids", typ: a("any") }, { json: "is_auto_acceptable", js: "is_auto_acceptable", typ: true }, { json: "max_submission_count", js: "max_submission_count", typ: 0 }, { json: "short_description_ar", js: "short_description_ar", typ: "" }, { json: "disallowed_worker_ids", js: "disallowed_worker_ids", typ: a("any") }, { json: "active_submissions_count", js: "active_submissions_count", typ: 0 }, { json: "default_task_description", js: "default_task_description", typ: "" }, { json: "system_short_description", js: "system_short_description", typ: "" }, { json: "customer_short_description", js: "customer_short_description", typ: "" }, { json: "max_submission_count_per_worker", js: "max_submission_count_per_worker", typ: 0 }, { json: "rejected", js: "rejected", typ: 0 }, { json: "accepted", js: "accepted", typ: 0 }, { json: "submitted", js: "submitted", typ: 0 }, ], false), "File": o([ { json: "id", js: "id", typ: 0 }, { json: "url", js: "url", typ: "" }, { json: "created_at", js: "created_at", typ: Date }, { json: "is_deleted", js: "is_deleted", typ: u(true, null) }, { json: "updated_at", js: "updated_at", typ: Date }, { json: "upload_type", js: "upload_type", typ: 0 }, { json: "uploadable_id", js: "uploadable_id", typ: 0 }, { json: "uploadable_type", js: "uploadable_type", typ: "" }, ], false), "Form": o([ { json: "id", js: "id", typ: 0 }, { json: "tasks", js: "tasks", typ: a(r("Task")) }, { json: "title", js: "title", typ: "" }, { json: "titlear", js: "titlear", typ: "" }, { json: "questions", js: "questions", typ: u(a(r("Question")), null) }, { json: "created_at", js: "created_at", typ: Date }, { json: "is_deleted", js: "is_deleted", typ: u(true, null) }, { json: "is_visible", js: "is_visible", typ: u(true, null) }, { json: "project_id", js: "project_id", typ: 0 }, { json: "updated_at", js: "updated_at", typ: Date }, { json: "is_scorable", js: "is_scorable", typ: u(true, null) }, { json: "complete_duration", js: "complete_duration", typ: 0 }, ], false), "Question": o([ { json: "id", js: "id", typ: 0 }, { json: "opts", js: "opts", typ: u(a(r("Opt")), null) }, { json: "label", js: "label", typ: "" }, { json: "labelar", js: "labelar", typ: "" }, { json: "position", js: "position", typ: 0 }, { json: "is_random", js: "is_random", typ: u(true, null) }, { json: "is_required", js: "is_required", typ: u(true, null) }, { json: "created_at", js: "created_at", typ: Date }, { json: "is_deleted", js: "is_deleted", typ: u(true, null) }, { json: "updated_at", js: "updated_at", typ: Date }, { json: "constraints", js: "constraints", typ: u(r("Constraints"), null) }, { json: "description", js: "description", typ: "" }, { json: "task_form_id", js: "task_form_id", typ: 0 }, { json: "answer_points", js: "answer_points", typ: 0 }, { json: "question_type", js: "question_type", typ: 0 }, { json: "is_visible_client", js: "is_visible_client", typ: u(true, null) }, { json: "max_answer_points", js: "max_answer_points", typ: 0 }, ], false), "Constraints": o([ { json: "limit", js: "limit", typ: r("Limit") }, { json: "is_required", js: "is_required", typ: u(true, null) }, ], false), "Limit": o([ { json: "type", js: "type", typ: r("Type") }, { json: "min", js: "min", typ: u(0, 0) }, ], false), "Opt": o([ { json: "id", js: "id", typ: 0 }, { json: "label", js: "label", typ: "" }, { json: "labelar", js: "labelar", typ: "" }, { json: "jump_ids", js: "jump_ids", typ: a(0) }, { json: "position", js: "position", typ: 0 }, { json: "created_at", js: "created_at", typ: Date }, { json: "is_deleted", js: "is_deleted", typ: u(true, null) }, { json: "updated_at", js: "updated_at", typ: Date }, { json: "question_id", js: "question_id", typ: 0 }, { json: "answer_points", js: "answer_points", typ: 0 }, { json: "optional_label", js: "optional_label", typ: "" }, { json: "has_extra_payload", js: "has_extra_payload", typ: u(true, null) }, ], false), "Task": o([ { json: "id", js: "id", typ: 0 }, { json: "title", js: "title", typ: "" }, { json: "status", js: "status", typ: 0 }, { json: "address", js: "address", typ: "" }, { json: "area_id", js: "area_id", typ: 0 }, { json: "titlear", js: "titlear", typ: "" }, { json: "location", js: "location", typ: "" }, { json: "priority", js: "priority", typ: 0 }, { json: "reward_id", js: "reward_id", typ: 0 }, { json: "created_at", js: "created_at", typ: Date }, { json: "is_deleted", js: "is_deleted", typ: u(true, null) }, { json: "updated_at", js: "updated_at", typ: Date }, { json: "custom_info", js: "custom_info", typ: "" }, { json: "description", js: "description", typ: "" }, { json: "claim_radius", js: "claim_radius", typ: 0 }, { json: "task_form_id", js: "task_form_id", typ: 0 }, { json: "descriptionar", js: "descriptionar", typ: "" }, { json: "related_task_ids", js: "related_task_ids", typ: a("any") }, { json: "short_description", js: "short_description", typ: "" }, { json: "submission_radius", js: "submission_radius", typ: 0 }, { json: "allowed_worker_ids", js: "allowed_worker_ids", typ: a(0) }, { json: "max_submission_count", js: "max_submission_count", typ: 0 }, { json: "short_description_ar", js: "short_description_ar", typ: "" }, { json: "disallowed_worker_ids", js: "disallowed_worker_ids", typ: a("any") }, { json: "nationalities", js: "nationalities", typ: a("any") }, { json: "hard_prerequisite_ids", js: "hard_prerequisite_ids", typ: a(0) }, { json: "soft_prerequisite_ids", js: "soft_prerequisite_ids", typ: a("any") }, { json: "active_submissions_count", js: "active_submissions_count", typ: 0 }, { json: "max_submission_count_per_worker", js: "max_submission_count_per_worker", typ: 0 }, { json: "amount", js: "amount", typ: u(0, 0) }, { json: "gender", js: "gender", typ: u(0, 0) }, { json: "os", js: "os", typ: u(0, 0) }, { json: "min_age", js: "min_age", typ: u(0, 0) }, { json: "max_age", js: "max_age", typ: u(0, 0) }, { json: "currency_id", js: "currency_id", typ: u(0, 0) }, ], false), "Reward": o([ { json: "id", js: "id", typ: 0 }, { json: "cost", js: "cost", typ: u(0, null) }, { json: "title", js: "title", typ: "" }, { json: "amount", js: "amount", typ: 0 }, { json: "is_shown", js: "is_shown", typ: true }, { json: "created_at", js: "created_at", typ: Date }, { json: "is_deleted", js: "is_deleted", typ: u(true, null) }, { json: "project_id", js: "project_id", typ: 0 }, { json: "updated_at", js: "updated_at", typ: Date }, { json: "currency_id", js: "currency_id", typ: 0 }, ], false), "Scheduling": o([ { json: "id", js: "id", typ: 0 }, { json: "starts_at", js: "starts_at", typ: Date }, { json: "created_at", js: "created_at", typ: Date }, { json: "project_id", js: "project_id", typ: 0 }, { json: "updated_at", js: "updated_at", typ: Date }, { json: "finishes_at", js: "finishes_at", typ: Date }, { json: "available_to", js: "available_to", typ: 0 }, { json: "available_from", js: "available_from", typ: 0 }, { json: "available_on_friday", js: "available_on_friday", typ: u(true, null) }, { json: "available_on_monday", js: "available_on_monday", typ: u(true, null) }, { json: "available_on_sunday", js: "available_on_sunday", typ: u(true, null) }, { json: "available_on_tuesday", js: "available_on_tuesday", typ: u(true, null) }, { json: "available_on_saturday", js: "available_on_saturday", typ: u(true, null) }, { json: "available_on_thursday", js: "available_on_thursday", typ: u(true, null) }, { json: "available_on_wednesday", js: "available_on_wednesday", typ: u(true, null) }, ], false), "Type": [ "character", "word" ], }; })(Convert = exports.Convert || (exports.Convert = {})); /***/ }), /***/ "./src/app/modules/sprints/service/sprintService.ts": /*!**********************************************************!*\ !*** ./src/app/modules/sprints/service/sprintService.ts ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js"); var paged_data_1 = __webpack_require__(/*! src/app/model/paged-data */ "./src/app/model/paged-data.ts"); // import { ProjectItem } from "src/app/model/projectitem"; var api_1 = __webpack_require__(/*! @aws-amplify/api */ "./node_modules/@aws-amplify/api/lib-esm/index.js"); var core_2 = __webpack_require__(/*! @ngx-loading-bar/core */ "./node_modules/@ngx-loading-bar/core/fesm5/ngx-loading-bar-core.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var auth_service_1 = __webpack_require__(/*! src/app/auth/auth.service */ "./src/app/auth/auth.service.ts"); var sprintModel_1 = __webpack_require__(/*! ../model/sprintModel */ "./src/app/modules/sprints/model/sprintModel.ts"); var SprintService = /** @class */ (function () { function SprintService(auth, loader, toastr) { this.auth = auth; this.loader = loader; this.toastr = toastr; /** * A method that mocks a paged server response * @param page The selected page * @returns {any} An observable containing the employee data */ this.getAllQuestions = []; } SprintService.prototype.getResults = function (page, search) { return rxjs_1.of(this.getPagedData(page, search)); }; SprintService.prototype.getResult = function (page, email, search, country, account, status) { var _this = this; var pagedData = new paged_data_1.PagedData(); var apiName = "api_node_1"; var offset = page.pageNumber * (page.size || 30); var path = "sprints?" + (status ? "status=" + status : "") + (country ? "&country=" + country : "") + "&limit=" + page.size + "&offset=" + offset + "&search=" + search; var myInit = { headers: {}, response: true, queryStringParameters: {}, }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.get(apiName, path, myInit) .then(function (response) { var data = response.data; page.totalElements = data.data.count; page.totalPages = page.totalElements / page.size; var start = page.pageNumber * page.size; var end = Math.min(start + page.size, page.totalElements); pagedData.page = page; pagedData.data = data; _this.loader.complete(); resolve(pagedData); }) .catch(function (error) { console.log("Error in invoiking API:" + error); reject(error); }); }); // end promoise return promise; }; // end getresult SprintService.prototype.getPagedData = function (page, search) { var _this = this; var pagedData = new paged_data_1.PagedData(); var apiName = "api_node_1"; var path = "sprints?email=" + search + "&limit=" + page.size + "&offsert=" + page.pageNumber * page.size; var myInit = { headers: {}, response: true, queryStringParameters: {}, }; this.loader.start(); api_1.default.get(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response.data; page.totalElements = data.count; page.totalPages = page.totalElements / page.size; var start = page.pageNumber * page.size; var end = Math.min(start + page.size, page.totalElements); pagedData.data = data.data; }) .catch(function (error) { console.log("Error in invoiking API:" + error); }); pagedData.page = page; return pagedData; }; SprintService.prototype.getSprint = function (email, id) { var _this = this; var sprint = null; var apiName = "api_node_1"; var path = "sprint?email=" + email + "&id=" + id; var myInit = { headers: {}, response: true, queryStringParameters: {}, }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.get(apiName, path, myInit) .then(function (response) { _this.loader.complete(); if (response.data.response_code == 200) { var s = response.data.data.data[0]; sprint = sprintModel_1.Convert.toSprint(JSON.stringify(s)); resolve(sprint); } else { return _this.toastr.error(response.data.message); } }) .catch(function (error) { console.log("Error in invoiking API:" + error); reject(error); }); }); return promise; }; SprintService.prototype.saveProject = function (sprint) { var _this = this; var apiName = "api_node_2"; var path = "sprint"; var myInit = { body: sprint, headers: {}, }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.post(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response; if (data.response_code == 200) { var record = data.data; resolve(record); } }) .catch(function (error) { console.log(error); reject(error); }); }); // end promoise return promise; }; SprintService.prototype.saveTargeting = function (target) { var apiName = "api_node_1"; var path = "sprint/targeting"; var myInit = { body: target, headers: {}, }; var promise = new Promise(function (resolve, reject) { api_1.default.post(apiName, path, myInit) .then(function (response) { var data = response; resolve(data); }) .catch(function (error) { console.log(error); reject(error); }); }); // end promoise return promise; }; SprintService.prototype.saveForm = function (model) { var _this = this; var apiName = "api_node_2"; var path = "form"; var myInit = { body: model, headers: {}, }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.post(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response; if (data.response_code == 200) { resolve(data.data); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { console.log(error); reject(error); }); }); // end promoise return promise; }; SprintService.prototype.saveTask = function (model) { var _this = this; var apiName = "api_node_2"; var path = "task"; var myInit = { body: model, headers: {}, }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.post(apiName, path, myInit) .then(function (response) { console.log("task save response", response); var data = response; if (data.response_code == 200) { _this.loader.complete(); _this.toastr.success(data.message); resolve("OK"); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { console.log(error); reject(error); }); }); // end promoise return promise; }; SprintService.prototype.saveQuestion = function (model) { var _this = this; var apiName = "api_node_2"; var path = "question"; var myInit = { body: model, headers: {}, }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.post(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response; console.log("data ==>", data); if (data.response_code == 200) { resolve(data.data); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { _this.toastr.error(error); reject(error); }); }); // end promoise return promise; }; SprintService.prototype.saveTag = function (model) { var _this = this; var apiName = "api_node_2"; var path = "sprints/tags/save"; var myInit = { body: model, headers: {}, }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.post(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response; console.log("data ==>", data); if (data.response_code == 200) { resolve(data.data); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { _this.toastr.error(error); reject(error); }); }); // end promoise return promise; }; SprintService.prototype.deleteTag = function (id) { var _this = this; var apiName = "api_node_2"; var path = "sprints/tags?id=" + id; var myInit = { headers: {}, response: true, queryStringParameters: {}, }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.del(apiName, path, myInit) .then(function (response) { _this.loader.complete(); if (response.data.response_code == 200) { var s = response.data.data; resolve(s); } else { return _this.toastr.error(response.data.message); } }) .catch(function (error) { console.log("Error in invoiking API:" + error); reject(error); }); }); return promise; }; SprintService.prototype.getSprintTags = function (id) { var _this = this; var apiName = "api_node_2"; var path = "sprints/tags?project_id=" + id; var myInit = { headers: {}, response: true, queryStringParameters: {}, }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.get(apiName, path, myInit) .then(function (response) { _this.loader.complete(); if (response.data.response_code == 200) { var tagLists = response.data.data; resolve(tagLists); } else { return _this.toastr.error(response.data.message); } }) .catch(function (error) { console.log("Error in invoiking API:" + error); reject(error); }); }); return promise; }; SprintService.prototype.ParentTagLists = function (id) { var _this = this; var apiName = "api_node_2"; var path = "questions/tags?id=" + id; var myInit = { headers: {}, response: true, queryStringParameters: {}, }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.get(apiName, path, myInit) .then(function (response) { _this.loader.complete(); if (response.data.response_code == 200) { var parentTagList = response.data.data; console.log("tag list ==> ", parentTagList); resolve(parentTagList); } else { return _this.toastr.error(response.data.message); } }) .catch(function (error) { console.log("Error in invoiking API:" + error); reject(error); }); }); return promise; }; SprintService.prototype.sprintLists = function () { var _this = this; var apiName = "api_node_2"; var path = "sprint/list"; var myInit = { headers: {}, response: true, queryStringParameters: {}, }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.get(apiName, path, myInit) .then(function (response) { _this.loader.complete(); if (response.data.response_code == 200) { var sprintLists = response.data.data; resolve(sprintLists); } else { return _this.toastr.error(response.data.message); } }) .catch(function (error) { console.log("Error in invoiking API:" + error); reject(error); }); }); return promise; }; SprintService.prototype.dublicateTaskFormData = function (data) { var _this = this; var apiName = "api_node_2"; var path = "sprint/data-duplication"; var myInit = { body: data, headers: {}, }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.post(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response; if (data.response_code == 200) { _this.toastr.success(data.message); resolve(data.data); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { console.log(error); reject(error); }); }); // end promoise return promise; }; SprintService.prototype.utcToLocal = function (date) { if (date) { var dateTime = new Date(date + "Z"); var local = dateTime.getTime(); var offset = dateTime.getTimezoneOffset() * (60 * 1000); var utc = new Date(local + offset); var riyadh = new Date(utc.getTime() + 3 * 60 * 60 * 1000); return riyadh; } return date; }; SprintService = __decorate([ core_1.Injectable({ providedIn: "root" }), __metadata("design:paramtypes", [auth_service_1.AuthService, core_2.LoadingBarService, ngx_toastr_1.ToastrService]) ], SprintService); return SprintService; }()); exports.SprintService = SprintService; /***/ }), /***/ "./src/app/modules/sprints/sprints-routing.module.ts": /*!***********************************************************!*\ !*** ./src/app/modules/sprints/sprints-routing.module.ts ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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; }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var sprint_detail_component_1 = __webpack_require__(/*! ./components/sprint-detail/sprint-detail.component */ "./src/app/modules/sprints/components/sprint-detail/sprint-detail.component.ts"); var sprint_edit_component_1 = __webpack_require__(/*! ./components/sprint-edit/sprint-edit.component */ "./src/app/modules/sprints/components/sprint-edit/sprint-edit.component.ts"); var sprint_list_component_1 = __webpack_require__(/*! ./components/sprint-list/sprint-list.component */ "./src/app/modules/sprints/components/sprint-list/sprint-list.component.ts"); var sprints_component_1 = __webpack_require__(/*! ./sprints.component */ "./src/app/modules/sprints/sprints.component.ts"); var submission_component_1 = __webpack_require__(/*! ./components/submissionFile/submission/submission.component */ "./src/app/modules/sprints/components/submissionFile/submission/submission.component.ts"); var task_edit_component_1 = __webpack_require__(/*! ./components/tasks/task-edit/task-edit.component */ "./src/app/modules/sprints/components/tasks/task-edit/task-edit.component.ts"); var taskform_detail_component_1 = __webpack_require__(/*! ./components/taskforms/taskform-detail/taskform-detail.component */ "./src/app/modules/sprints/components/taskforms/taskform-detail/taskform-detail.component.ts"); var auth_guard_1 = __webpack_require__(/*! ../../auth/auth.guard */ "./src/app/auth/auth.guard.ts"); var routes = [ { path: '', component: sprints_component_1.SprintsformComponent, children: [ // { // path: '', // redirectTo: '', // pathMatch: 'full' // }, { path: '', component: sprint_list_component_1.SprintListComponent, data: { returnUrl: window.location.pathname }, canActivate: [auth_guard_1.AuthGuard], }, { path: ':id/edit', component: sprint_edit_component_1.SprintEditComponent, data: { returnUrl: window.location.pathname }, canActivate: [auth_guard_1.AuthGuard], }, { path: ':id', component: sprint_detail_component_1.SprintDetailComponent, data: { returnUrl: window.location.pathname }, canActivate: [auth_guard_1.AuthGuard], }, { path: ':id/task/:task', component: task_edit_component_1.TaskEditComponent, data: { returnUrl: window.location.pathname }, canActivate: [auth_guard_1.AuthGuard], }, { path: ':id/taskform/:form', component: taskform_detail_component_1.TaskFormComponent, data: { returnUrl: window.location.pathname }, canActivate: [auth_guard_1.AuthGuard], }, { path: ':id/submission/:submission', component: submission_component_1.SubmissionComponent, data: { returnUrl: window.location.pathname }, canActivate: [auth_guard_1.AuthGuard], }, { path: '', redirectTo: 'sprints', pathMatch: 'full' }, { path: '**', redirectTo: '//sprints', pathMatch: 'full' }, ] } ]; var SprintsformRoutingModule = /** @class */ (function () { function SprintsformRoutingModule() { } SprintsformRoutingModule = __decorate([ core_1.NgModule({ imports: [router_1.RouterModule.forChild(routes)], exports: [router_1.RouterModule] }) ], SprintsformRoutingModule); return SprintsformRoutingModule; }()); exports.SprintsformRoutingModule = SprintsformRoutingModule; /***/ }), /***/ "./src/app/modules/sprints/sprints.component.css": /*!*******************************************************!*\ !*** ./src/app/modules/sprints/sprints.component.css ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/modules/sprints/sprints.component.html": /*!********************************************************!*\ !*** ./src/app/modules/sprints/sprints.component.html ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\r\n" /***/ }), /***/ "./src/app/modules/sprints/sprints.component.ts": /*!******************************************************!*\ !*** ./src/app/modules/sprints/sprints.component.ts ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var SprintsformComponent = /** @class */ (function () { function SprintsformComponent() { } SprintsformComponent.prototype.ngOnInit = function () { }; SprintsformComponent = __decorate([ core_1.Component({ selector: 'app-sprints', template: __webpack_require__(/*! ./sprints.component.html */ "./src/app/modules/sprints/sprints.component.html"), styles: [__webpack_require__(/*! ./sprints.component.css */ "./src/app/modules/sprints/sprints.component.css")] }), __metadata("design:paramtypes", []) ], SprintsformComponent); return SprintsformComponent; }()); exports.SprintsformComponent = SprintsformComponent; /***/ }), /***/ "./src/app/modules/sprints/sprints.module.ts": /*!***************************************************!*\ !*** ./src/app/modules/sprints/sprints.module.ts ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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; }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var common_1 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); var forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js"); var http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); var ngx_select_ex_1 = __webpack_require__(/*! ngx-select-ex */ "./node_modules/ngx-select-ex/fesm5/ngx-select-ex.js"); var ngx_uploader_1 = __webpack_require__(/*! ngx-uploader */ "./node_modules/ngx-uploader/fesm5/ngx-uploader.js"); var ngx_datatable_1 = __webpack_require__(/*! @swimlane/ngx-datatable */ "./node_modules/@swimlane/ngx-datatable/release/index.js"); var ngx_csv_1 = __webpack_require__(/*! @ctrl/ngx-csv */ "./node_modules/@ctrl/ngx-csv/fesm5/ctrl-ngx-csv.js"); var aws_amplify_angular_1 = __webpack_require__(/*! aws-amplify-angular */ "./node_modules/aws-amplify-angular/dist/index.js"); var core_2 = __webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js"); var ng_pick_datetime_1 = __webpack_require__(/*! ng-pick-datetime */ "./node_modules/ng-pick-datetime/picker.js"); var ngx_quill_1 = __webpack_require__(/*! ngx-quill */ "./node_modules/ngx-quill/fesm5/ngx-quill.js"); var ng5_slider_1 = __webpack_require__(/*! ng5-slider */ "./node_modules/ng5-slider/esm5/ng5-slider.js"); var sprints_routing_module_1 = __webpack_require__(/*! ./sprints-routing.module */ "./src/app/modules/sprints/sprints-routing.module.ts"); var core_3 = __webpack_require__(/*! @agm/core */ "./node_modules/@agm/core/index.js"); var ngx_sortable_1 = __webpack_require__(/*! ngx-sortable */ "./node_modules/ngx-sortable/dist/index.js"); var common_2 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); var safe_pipe_1 = __webpack_require__(/*! ../../safe.pipe */ "./src/app/safe.pipe.ts"); var sprints_component_1 = __webpack_require__(/*! ./sprints.component */ "./src/app/modules/sprints/sprints.component.ts"); var sprint_detail_component_1 = __webpack_require__(/*! ./components/sprint-detail/sprint-detail.component */ "./src/app/modules/sprints/components/sprint-detail/sprint-detail.component.ts"); var sprint_list_component_1 = __webpack_require__(/*! ./components/sprint-list/sprint-list.component */ "./src/app/modules/sprints/components/sprint-list/sprint-list.component.ts"); var sprint_edit_component_1 = __webpack_require__(/*! ./components/sprint-edit/sprint-edit.component */ "./src/app/modules/sprints/components/sprint-edit/sprint-edit.component.ts"); var submission_component_1 = __webpack_require__(/*! ./components/submissionFile/submission/submission.component */ "./src/app/modules/sprints/components/submissionFile/submission/submission.component.ts"); var submissionsrequest_component_1 = __webpack_require__(/*! ./components/submissionFile/submissions-request/submissionsrequest.component */ "./src/app/modules/sprints/components/submissionFile/submissions-request/submissionsrequest.component.ts"); var task_list_component_1 = __webpack_require__(/*! ./components/tasks/task-list/task-list.component */ "./src/app/modules/sprints/components/tasks/task-list/task-list.component.ts"); var taskform_list_component_1 = __webpack_require__(/*! ./components/taskforms/taskform-list/taskform-list.component */ "./src/app/modules/sprints/components/taskforms/taskform-list/taskform-list.component.ts"); var rewards_component_1 = __webpack_require__(/*! ./components/reward/rewards/rewards.component */ "./src/app/modules/sprints/components/reward/rewards/rewards.component.ts"); var reports_component_1 = __webpack_require__(/*! ../../reports/reports.component */ "./src/app/reports/reports.component.ts"); var task_edit_component_1 = __webpack_require__(/*! ./components/tasks/task-edit/task-edit.component */ "./src/app/modules/sprints/components/tasks/task-edit/task-edit.component.ts"); var taskform_detail_component_1 = __webpack_require__(/*! ./components/taskforms/taskform-detail/taskform-detail.component */ "./src/app/modules/sprints/components/taskforms/taskform-detail/taskform-detail.component.ts"); var report_component_1 = __webpack_require__(/*! ../../report/report.component */ "./src/app/report/report.component.ts"); var question_component_1 = __webpack_require__(/*! ./components/question/question.component */ "./src/app/modules/sprints/components/question/question.component.ts"); var submission_telly_component_1 = __webpack_require__(/*! ./components/submissionFile/submission-telly/submission-telly.component */ "./src/app/modules/sprints/components/submissionFile/submission-telly/submission-telly.component.ts"); var multimedia_model_component_1 = __webpack_require__(/*! ./components/submissionFile/submission/multimedia-model/multimedia-model.component */ "./src/app/modules/sprints/components/submissionFile/submission/multimedia-model/multimedia-model.component.ts"); var tag_component_1 = __webpack_require__(/*! ./components/tag/tag.component */ "./src/app/modules/sprints/components/tag/tag.component.ts"); var options_tag_component_1 = __webpack_require__(/*! ./components/question/options-tag/options-tag.component */ "./src/app/modules/sprints/components/question/options-tag/options-tag.component.ts"); var ng_bootstrap_1 = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ "./node_modules/@ng-bootstrap/ng-bootstrap/index.js"); var SprintsformModule = /** @class */ (function () { function SprintsformModule() { } SprintsformModule = __decorate([ core_1.NgModule({ imports: [ ng_bootstrap_1.NgbModule, common_1.CommonModule, sprints_routing_module_1.SprintsformRoutingModule, forms_1.ReactiveFormsModule, forms_1.FormsModule, http_1.HttpClientModule, ngx_datatable_1.NgxDatatableModule, ngx_select_ex_1.NgxSelectModule, ngx_uploader_1.NgxUploaderModule, ngx_csv_1.CsvModule, ngx_quill_1.QuillModule, ng_pick_datetime_1.OwlDateTimeModule, ng_pick_datetime_1.OwlNativeDateTimeModule, ng5_slider_1.Ng5SliderModule, aws_amplify_angular_1.AmplifyAngularModule, core_2.TranslateModule, ngx_sortable_1.NgxSortableModule, core_3.AgmCoreModule.forRoot({ apiKey: "AIzaSyDa1UayxKz_79DUT2nmE2wHAuBwGdZVL3Y", // apiKey: 'AIzaSyDP8ctBV6hZ-3zSmr7enXzQTHn5jFd_guc', libraries: ["drawing"], }), ], declarations: [ sprints_component_1.SprintsformComponent, sprint_detail_component_1.SprintDetailComponent, sprint_list_component_1.SprintListComponent, sprint_edit_component_1.SprintEditComponent, submission_component_1.SubmissionComponent, submissionsrequest_component_1.SubmissionsRequestComponent, task_list_component_1.TasksComponent, task_edit_component_1.TaskEditComponent, taskform_detail_component_1.TaskFormComponent, reports_component_1.ReportsComponent, report_component_1.ReportComponent, taskform_list_component_1.TaskformsComponent, rewards_component_1.RewardsComponent, question_component_1.QuestionComponent, safe_pipe_1.SafePipe, submission_telly_component_1.SubmissionTellyComponent, multimedia_model_component_1.MultimediaModelComponent, tag_component_1.TagComponent, options_tag_component_1.OptionsTagComponent, ], entryComponents: [multimedia_model_component_1.MultimediaModelComponent], providers: [ aws_amplify_angular_1.AmplifyService, // AuthService, // AuthGuard, // WorkerService, // AccountService, // ProjectService, // PaymentRequestService, // SubmissionService, common_2.DatePipe, ], exports: [ submission_component_1.SubmissionComponent, submissionsrequest_component_1.SubmissionsRequestComponent, task_list_component_1.TasksComponent, reports_component_1.ReportsComponent, taskform_list_component_1.TaskformsComponent, rewards_component_1.RewardsComponent, safe_pipe_1.SafePipe, task_edit_component_1.TaskEditComponent, taskform_detail_component_1.TaskFormComponent, report_component_1.ReportComponent, question_component_1.QuestionComponent, ], }) ], SprintsformModule); return SprintsformModule; }()); exports.SprintsformModule = SprintsformModule; /***/ }), /***/ "./src/app/modules/surveys/components/surveys/surveys.component.css": /*!**************************************************************************!*\ !*** ./src/app/modules/surveys/components/surveys/surveys.component.css ***! \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "agm-map {\r\n\theight: 300px;\r\n}\r\n\r\n.eye-icon {\r\n\tfont-size: 1.5rem;\r\n\tmargin: 0;\r\n}\r\n\r\n.table-container {\r\n\t/* max-width: fit-content; */\r\n\tmax-height: -webkit-fit-content;\r\n\tmax-height: -moz-fit-content;\r\n\tmax-height: fit-content;\r\n}\r\n\r\n.table-responsive {\r\n\theight: -webkit-fit-content;\r\n\theight: -moz-fit-content;\r\n\theight: fit-content;\r\n\toverflow: auto;\r\n\tmax-height: 65vh;\r\n}\r\n\r\n.fixed-table-head {\r\n\t/* min-width: max-content; */\r\n\twhite-space: nowrap;\r\n\theight: 100px !important;\r\n\tborder-collapse: collapse;\r\n}\r\n\r\n.fixed-table-head thead tr th,\r\n.fixed-table-head tbody tr td:first-child {\r\n\tposition: -webkit-sticky;\r\n\tposition: sticky;\r\n\tbackground-color: #fff;\r\n\tborder: 1px solid #dee2e6;\r\n}\r\n\r\n.fixed-table-head thead tr th {\r\n\ttop: 0;\r\n\tz-index: 2;\r\n}\r\n\r\n.fixed-table-head tbody tr td:first-child {\r\n\tz-index: 1;\r\n\tleft: 0;\r\n}\r\n\r\n.fixed-table-head tbody tr td,\r\n.fixed-table-head thead tr th {\r\n\ttext-align: center;\r\n\tvertical-align: center;\r\n}\r\n\r\n.fixed-table-head tbody tr td {\r\n\tvertical-align: middle !important;\r\n}\r\n" /***/ }), /***/ "./src/app/modules/surveys/components/surveys/surveys.component.html": /*!***************************************************************************!*\ !*** ./src/app/modules/surveys/components/surveys/surveys.component.html ***! \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\r\n\r\n\r\n
    \r\n\t
    \r\n\t\t

    Surveys

    \r\n\t
    \r\n\r\n\t
    \r\n\t\t \r\n\t\t\r\n\t\t\t 0\"\r\n\t\t\t\t[data]=\"csvData\"\r\n\t\t\t\tstyle=\"color: white\"\r\n\t\t\t\t>\r\n\t\t\r\n\t
    \r\n\r\n\t
    \r\n\t\t\r\n\t\t\r\n\t\t\tSearch\r\n\t\t\r\n\t
    \r\n\r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{{ limit }} Records\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t\tFilter\r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t
    \r\n\t
    \r\n
    \r\n\r\n\r\n 0\">\r\n\t\r\n\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t 0\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\tDemographics\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t 0\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\tSurveys\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tId\r\n\r\n\t\t\t\t\t\t 0\">\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{{ user }}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t 0\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{{ task }}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t 0\">\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{{ user[\"id\"] }}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{{ u }}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t 0\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t 0;\r\n\t\t\t\t\t\t\t\t\t\t\tthen hasSubmissions;\r\n\t\t\t\t\t\t\t\t\t\t\telse hasNotSubmissions\r\n\t\t\t\t\t\t\t\t\t\t\"\r\n\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tSubmissons\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tNo Submissons\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t
    \r\n\t
    \r\n\r\n\t limit\"\r\n\t\t>
    \r\n\t\t\t\r\n\r\n\r\n\r\n\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tDemographics\r\n\t\t\t\t\t\t 0\"\r\n\t\t\t\t\t\t\t[attr.colspan]=\"tasksColspan\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\tSurveys\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tId\r\n\t\t\t\t\t\tage\r\n\t\t\t\t\t\tcity\r\n\t\t\t\t\t\tname\r\n\t\t\t\t\t\temail\r\n\t\t\t\t\t\tgender\r\n\t\t\t\t\t\tnationality\r\n\t\t\t\t\t\tphone_number\r\n\t\t\t\t\t\tnationalitygroup\r\n\r\n\t\t\t\t\t\t 0\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{{ task }}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t
    \r\n\t
    \r\n
    \r\n\r\n
    \r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t{{ user }}'s Submissions ({{ task }}):\r\n\t\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t\t×\r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t

    \r\n\t\t\t\t\t\t\t\t{{ task.key }}\r\n\t\t\t\t\t\t\t

    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t{{ task.key }}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tS.No\r\n\t\t\t\t\t\t\t\t\t\tSubmission ID\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tquestion.value[0]\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.question_name\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{{ i + 1 }}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{ question.key }}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetAnswer(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tques.value\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetAnswer(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tques.value\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.address\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t-\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetAnswer(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tques.value\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.lat\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t-\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetAnswer(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tques.value\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.long\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToggle\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMap\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t\tClose\r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t
    \r\n\t
    \r\n\r\n" /***/ }), /***/ "./src/app/modules/surveys/components/surveys/surveys.component.ts": /*!*************************************************************************!*\ !*** ./src/app/modules/surveys/components/surveys/surveys.component.ts ***! \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ng_bootstrap_1 = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ "./node_modules/@ng-bootstrap/ng-bootstrap/index.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var survey_service_1 = __webpack_require__(/*! ../../services/survey.service */ "./src/app/modules/surveys/services/survey.service.ts"); var submissionReqService_1 = __webpack_require__(/*! ./../../../sprints/components/submissionFile/service/submissionReqService */ "./src/app/modules/sprints/components/submissionFile/service/submissionReqService.ts"); var multimedia_model_component_1 = __webpack_require__(/*! ./../../../sprints/components/submissionFile/submission/multimedia-model/multimedia-model.component */ "./src/app/modules/sprints/components/submissionFile/submission/multimedia-model/multimedia-model.component.ts"); var SurveysComponent = /** @class */ (function () { function SurveysComponent(surveyService, toastr, modalService, submissionService) { this.surveyService = surveyService; this.toastr = toastr; this.modalService = modalService; this.submissionService = submissionService; this.difference = 90; this.from = new Date(Date.now() - this.difference * 24 * 60 * 60 * 1000); this.to = new Date(); this.maxDate = new Date(); this.data = null; this.users = []; this.user = ""; this.usersColspan = 0; this.tasks = []; this.task = ""; this.tasksColspan = 0; this.submissions = []; this.submissionsBasedOnUserIDAndTaskID = []; this.submissionsBasedOnUserTaskAndTaskFormID = []; this.questionsBasedOnUserTaskTaskFormAndSubmissionID = []; this.isDisabled = false; this.limit = 200; this.offset = 0; this.size = 0; this.range = 9; this.limits = []; // limits: number[] = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]; this.dataGroupByTaskFormSubmissionAnQuestionsId = []; this.rows = []; this.tableData = null; this.csvData = []; this.questionsAndAnswers = []; this.toggleMap = false; this.latitude = 0; this.longitude = 0; this.searchQuery = ""; } SurveysComponent.prototype.ngOnInit = function () { this.limits = this.generateNnumbersOfArrayWithDefineMultiple(5, 200); this.getAllData(); }; SurveysComponent.prototype.search = function (searchValue) { this.searchQuery = searchValue; this.offset = 1; this.getAllData(); }; SurveysComponent.prototype.rerender = function () { this.outletRef.clear(); this.outletRef.createEmbeddedView(this.contentRef); }; SurveysComponent.prototype.getAllData = function () { var _this = this; var page = Math.floor(this.offset / this.limit); page = page + 1; this.surveyService .getAllUsersAndSprintsData(encodeURIComponent(this.searchQuery.trim()), this.limit, page, this.dateFormatter(this.from), this.dateFormatter(this.to)) .then(function (res) { if (Object.keys(res).length > 0) { _this.setInitialData(res); _this.toastr.success("Data fetched successfully!"); } }) .catch(function (error) { _this.toastr.error("Error while making api call: " + error); }); }; SurveysComponent.prototype.setInitialData = function (res) { var _this = this; this.data = res; var _a = this.data, workers = _a.workers, tasks = _a.tasks, submissions = _a.submissions, workersCount = _a.workersCount; this.size = workersCount; this.users = workers; this.tasks = tasks; this.submissions = submissions; if (this.users !== null) { this.userSectionTableHeadings = this.users && this.users.length > 0 && this.users[0]; this.userSectionTableHeadings = Object.keys(this.userSectionTableHeadings); this.userSectionTableHeadings.shift(); this.usersColspan = Object.keys(this.userSectionTableHeadings).length; } if (this.tasks !== null) { this.tasksColspan = this.tasks.length; this.taskSectionTableHeadings = this.tasks.map(function (task) { return task.task_name; }); } if (this.users !== null) { var csvFileHeaders = [ "id" ].concat(this.userSectionTableHeadings, this.taskSectionTableHeadings); this.csvData = []; this.csvData.push(csvFileHeaders); var csvFileBody = []; this.users.map(function (user) { var demographics = [ user.id ].concat(_this.getUserObjectValues(user)); if (_this.tasks !== null && _this.tasks.length > 0) { var hasSubmissions_1 = []; var count_1 = 0; _this.tasks.map(function (task) { count_1++; hasSubmissions_1.push(_this.checkUserHasSubmissions(user.id, task.task_id) .length > 0 ? "Yes" : "No"); }); _this.csvData.push(demographics.concat(hasSubmissions_1)); } else { _this.csvData.push([ user.id, "" ].concat(_this.getUserObjectValues(user))); } }); } this.rerender(); }; SurveysComponent.prototype.answersJoinOrNot = function (question, type) { if (question.length > 0) { return question.map(function (ques) { return ques[type]; }).join(", "); } else { return question[type]; } }; SurveysComponent.prototype.getAnswer = function (question) { if (question[0].geo_answer && question[0].question_type === 34) { return JSON.parse(question[0].geo_answer); } else if (question[0].raw_answer && question[0].question_type === 34) { return JSON.parse(question[0].raw_answer); } else if (question[0].raw_answer && question[0].question_type !== 34) { // console.log(question, "raw_answer"); return this.answersJoinOrNot(question, "raw_answer"); } else if (question[0].selection_answer && question[0].question_type !== 34) { // console.log(question, "selection_answer"); return this.answersJoinOrNot(question, "selection_answer"); } else if (question[0].geo_answer && question[0].question_type !== 34) { // console.log(question, "geo_answer"); return this.answersJoinOrNot(question, "geo_answer"); } else if (!question[0].geo_answer && !question[0].raw_answer && !question[0].selection_answer) { return null; } }; SurveysComponent.prototype.getUrls = function (question) { if (question[0].question_type === 31) { return question.map(function (ques) { return ques.raw_answer; }); } else if (question[0].question_type === 32) { return question.map(function (ques) { return "../../../../assets/images/dummy_audio.png"; }); } else if (question[0].question_type === 33) { return question.map(function (ques) { return "../../../../assets/images/video_icon.png"; }); } }; SurveysComponent.prototype.getMediaFile = function (url, type) { this.multimedia = ""; this.multimedia = { type: type, url: url, }; var modalRef = this.modalService.open(multimedia_model_component_1.MultimediaModelComponent, { ariaLabelledBy: "modal-basic-title", windowClass: "add-library-Modal", backdrop: "static", keyboard: false, }); modalRef.componentInstance.id = this.multimedia; modalRef.result.then(function () { }, function () { }); this.submissionService.mediaFile = this.multimedia; }; SurveysComponent.prototype.displayLocation = function (lat, long) { this.latitude = Number(lat); this.longitude = Number(long); this.toggleMap = !this.toggleMap; }; SurveysComponent.prototype.checkUserHasSubmissions = function (userId, taskId) { if (this.submissions !== null && this.tasks !== null && userId && taskId) { var submissions = this.submissions.filter(function (submission) { if (submission.worker_id == userId && submission.task_id == taskId) { return submission; } }); return submissions; } else { return []; } }; SurveysComponent.prototype.showSubmissionsModal = function (user, task) { var _this = this; this.userId = user["id"]; this.taskId = task["task_id"]; this.user = user["name"].trim(); this.task = task["task_name"].trim(); this.submissionsBasedOnUserTaskAndTaskFormID = []; this.questionsBasedOnUserTaskTaskFormAndSubmissionID = []; this.dataGroupByTaskFormSubmissionAnQuestionsId = []; if (this.submissions !== null && this.tasks !== null && this.userId && this.taskId) { this.submissionsBasedOnUserIDAndTaskID = this.checkUserHasSubmissions(this.userId, this.taskId); if (this.submissionsBasedOnUserIDAndTaskID && this.submissionsBasedOnUserIDAndTaskID.length > 0) { this.taskForms = this.groupBy(this.submissionsBasedOnUserIDAndTaskID, "task_form_id"); var questionsGroupBy_1; Object.values(this.taskForms).map(function (tasks) { var submissionsGroupByTaskFromId = _this.groupBy(tasks, "submission_id"); _this.submissionsBasedOnUserTaskAndTaskFormID.push((_a = {}, _a["" + tasks[0].task_form_name] = submissionsGroupByTaskFromId, _a)); Object.entries(submissionsGroupByTaskFromId).map(function (_a) { var key = _a[0], value = _a[1]; var questionsGroupBySubmissionId = _this.groupBy(value, "question_id"); _this.questionsBasedOnUserTaskTaskFormAndSubmissionID.push((_b = {}, _b[key] = questionsGroupBySubmissionId, _b)); questionsGroupBy_1 = (_c = {}, _c["" + tasks[0].task_form_name] = _this .questionsBasedOnUserTaskTaskFormAndSubmissionID, _c); var _b, _c; }); _this.dataGroupByTaskFormSubmissionAnQuestionsId.push(questionsGroupBy_1); var _a; }); console.log("dataGroupByTaskFormSubmissionAnQuestionsId", this.dataGroupByTaskFormSubmissionAnQuestionsId); } } }; SurveysComponent.prototype.groupBy = function (array, key) { if (Array.isArray(array) && array.length > 0) { return array.reduce(function (item, index) { (item[index[key]] = item[index[key]] || []).push(index); return item; }, {}); } }; SurveysComponent.prototype.getUserObjectValues = function (user) { if (user) { var worker = Object.values(user); worker.shift(); return worker; } }; SurveysComponent.prototype.onPageChange = function (offset) { this.offset = offset; this.getAllData(); }; SurveysComponent.prototype.filter = function () { this.offset = 1; this.getAllData(); }; SurveysComponent.prototype.handleRecordsPerPage = function (limit) { this.offset = 1; this.limit = limit; this.getAllData(); }; SurveysComponent.prototype.generateNnumbersOfArrayWithDefineMultiple = function (range, multiple) { // [...Array(5).keys()] return Array.from(Array(range).keys()).map(function (item) { item = item + 1; return multiple * item; }); }; SurveysComponent.prototype.unique = function (array) { if (Array.isArray(array) && array.length > 0) { var uniqueIds_1 = []; var unique = array.filter(function (element) { var isDuplicate = uniqueIds_1.includes(element.id); if (!isDuplicate) { uniqueIds_1.push(element.id); return true; } return false; }); return unique; } }; SurveysComponent.prototype.onDateChange = function (event, startOrEnd) { function datediff(first, second) { return Math.round((second - first) / (1000 * 60 * 60 * 24)); } function parseDate(str) { var date = str.split("/"); return new Date(date[2], date[0] - 1, date[1]); } if (startOrEnd === "start") { this.from = event; } else { this.to = event; } var difference = datediff(parseDate(this.from.toLocaleDateString()), parseDate(this.to.toLocaleDateString())); // if (difference > this.difference) { // this.isDisabled = true; // this.toastr.warning( // `You select ${difference} days please select date range between or exact ${this.difference} days!` // ); // } if (new Date(this.from) > new Date(this.to)) { this.isDisabled = true; this.toastr.warning("End date must be greater than start date!"); } else { this.isDisabled = false; } }; SurveysComponent.prototype.dateFormatter = function (date) { if (date) { return date .toISOString() .split("T") .map(function (d, i) { return i === date.toISOString().split("T").length - 1 ? d.slice(0, -1) : d; }) .join(" "); } }; __decorate([ core_1.ViewChild("outlet", { read: core_1.ViewContainerRef }), __metadata("design:type", core_1.ViewContainerRef) ], SurveysComponent.prototype, "outletRef", void 0); __decorate([ core_1.ViewChild("content", { read: core_1.TemplateRef }), __metadata("design:type", core_1.TemplateRef) ], SurveysComponent.prototype, "contentRef", void 0); SurveysComponent = __decorate([ core_1.Component({ selector: "app-surveys", template: __webpack_require__(/*! ./surveys.component.html */ "./src/app/modules/surveys/components/surveys/surveys.component.html"), styles: [__webpack_require__(/*! ./surveys.component.css */ "./src/app/modules/surveys/components/surveys/surveys.component.css")], }), __metadata("design:paramtypes", [survey_service_1.SurveyService, ngx_toastr_1.ToastrService, ng_bootstrap_1.NgbModal, submissionReqService_1.SubmissionReqService]) ], SurveysComponent); return SurveysComponent; }()); exports.SurveysComponent = SurveysComponent; /***/ }), /***/ "./src/app/modules/surveys/services/survey.service.ts": /*!************************************************************!*\ !*** ./src/app/modules/surveys/services/survey.service.ts ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var core_2 = __webpack_require__(/*! @ngx-loading-bar/core */ "./node_modules/@ngx-loading-bar/core/fesm5/ngx-loading-bar-core.js"); var aws_amplify_1 = __webpack_require__(/*! aws-amplify */ "./node_modules/aws-amplify/lib/index.js"); var SurveyService = /** @class */ (function () { function SurveyService(loader) { this.loader = loader; } SurveyService.prototype.getAllUsersAndSprintsData = function (search, limit, page, startDate, endDate) { var _this = this; var apiName = "api_node_2"; var path = "combineddata/?search=" + (search ? search : "") + "&limit=" + limit + "&page=" + page + "&startDate=" + startDate + "&endDate=" + endDate; console.log({ limit: limit, page: page }); var myInit = { headers: {}, response: true, queryStringParameters: {}, }; var promise = new Promise(function (resolve, reject) { _this.loader.start(); aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { _this.loader.complete(); resolve(response.data.data); }) .catch(function (error) { _this.loader.complete(); console.log("Error in invoiking API:" + error); reject(error); }); }); return promise; }; SurveyService = __decorate([ core_1.Injectable({ providedIn: "root", }), __metadata("design:paramtypes", [core_2.LoadingBarService]) ], SurveyService); return SurveyService; }()); exports.SurveyService = SurveyService; /***/ }), /***/ "./src/app/modules/surveys/surveys-routing.module.ts": /*!***********************************************************!*\ !*** ./src/app/modules/surveys/surveys-routing.module.ts ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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; }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var auth_guard_1 = __webpack_require__(/*! ./../../auth/auth.guard */ "./src/app/auth/auth.guard.ts"); var surveys_component_1 = __webpack_require__(/*! ./components/surveys/surveys.component */ "./src/app/modules/surveys/components/surveys/surveys.component.ts"); var routes = [ { path: "", component: surveys_component_1.SurveysComponent, canActivate: [auth_guard_1.AuthGuard], }, ]; var SurveysRoutingModule = /** @class */ (function () { function SurveysRoutingModule() { } SurveysRoutingModule = __decorate([ core_1.NgModule({ imports: [router_1.RouterModule.forChild(routes)], exports: [router_1.RouterModule], }) ], SurveysRoutingModule); return SurveysRoutingModule; }()); exports.SurveysRoutingModule = SurveysRoutingModule; /***/ }), /***/ "./src/app/modules/surveys/surveys.module.ts": /*!***************************************************!*\ !*** ./src/app/modules/surveys/surveys.module.ts ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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; }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @agm/core */ "./node_modules/@agm/core/index.js"); var common_1 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); var http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); var core_2 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js"); var ngx_csv_1 = __webpack_require__(/*! @ctrl/ngx-csv */ "./node_modules/@ctrl/ngx-csv/fesm5/ctrl-ngx-csv.js"); var ngx_datatable_1 = __webpack_require__(/*! @swimlane/ngx-datatable */ "./node_modules/@swimlane/ngx-datatable/release/index.js"); var ng_pick_datetime_1 = __webpack_require__(/*! ng-pick-datetime */ "./node_modules/ng-pick-datetime/picker.js"); var ngx_quill_1 = __webpack_require__(/*! ngx-quill */ "./node_modules/ngx-quill/fesm5/ngx-quill.js"); var shared_module_1 = __webpack_require__(/*! ./../../shared/shared.module */ "./src/app/shared/shared.module.ts"); var surveys_component_1 = __webpack_require__(/*! ./components/surveys/surveys.component */ "./src/app/modules/surveys/components/surveys/surveys.component.ts"); var surveys_routing_module_1 = __webpack_require__(/*! ./surveys-routing.module */ "./src/app/modules/surveys/surveys-routing.module.ts"); var SurveysModule = /** @class */ (function () { function SurveysModule() { } SurveysModule = __decorate([ core_2.NgModule({ imports: [ common_1.CommonModule, forms_1.FormsModule, surveys_routing_module_1.SurveysRoutingModule, shared_module_1.SharedModule, ngx_datatable_1.NgxDatatableModule, http_1.HttpClientModule, ngx_csv_1.CsvModule, ngx_quill_1.QuillModule, ng_pick_datetime_1.OwlDateTimeModule, ng_pick_datetime_1.OwlNativeDateTimeModule, core_1.AgmCoreModule.forRoot({ apiKey: "AIzaSyDa1UayxKz_79DUT2nmE2wHAuBwGdZVL3Y", // apiKey: "AIzaSyDP8ctBV6hZ-3zSmr7enXzQTHn5jFd_guc", libraries: ["drawing"], }), ], declarations: [surveys_component_1.SurveysComponent], exports: [surveys_component_1.SurveysComponent], }) ], SurveysModule); return SurveysModule; }()); exports.SurveysModule = SurveysModule; /***/ }), /***/ "./src/app/modules/workers/components/worker/worker.component.html": /*!*************************************************************************!*\ !*** ./src/app/modules/workers/components/worker/worker.component.html ***! \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\r\n\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t  \r\n\t\t\t\r\n\t\t
    \r\n\t
    \r\n\t\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t
    \r\n\t\t\t\t\t\r\n\t\t\t\tID: {{ model.id }}Name: {{ model.first_name + \" \" + model.last_name }}Last Active: {{ model.last_active }} daysAddress: {{ model.country }} - {{ model.city }}Demographics\r\n\t\t\t\t\t{{\r\n\t\t\t\t\t\tmodel.age +\r\n\t\t\t\t\t\t\t\" years, \" +\r\n\t\t\t\t\t\t\tmodel.genderlabel +\r\n\t\t\t\t\t\t\t\" from \" +\r\n\t\t\t\t\t\t\tmodel.nationality\r\n\t\t\t\t\t}}\r\n\t\t\t\t
    Phone\r\n\t\t\t\t\t{{\r\n\t\t\t\t\t\tmodel.phone_number\r\n\t\t\t\t\t}}\r\n\t\t\t\tEmail\r\n\t\t\t\t\t{{ model.email }}\r\n\t\t\t\tSignedup On: {{ model.created_at | date }}Balance: {{ model.balance }} - {{ model.currency }}Device\r\n\t\t\t\t\t{{\r\n\t\t\t\t\t\tmodel.device.OS +\r\n\t\t\t\t\t\t\t\" (\" +\r\n\t\t\t\t\t\t\tmodel.device.osversion +\r\n\t\t\t\t\t\t\t\") with app version:\" +\r\n\t\t\t\t\t\t\tmodel.device.appversion\r\n\t\t\t\t\t}}\r\n\t\t\t\t
    \r\n\r\n\t
    \r\n\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t\t Basic Details\r\n\t\t
    \r\n\r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tEmail\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tFirst Name\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tLast Name\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tGender\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t{{ gender.name }}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tNationality\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t{{ nation.text }}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tPlatform\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t{{ model.device.OS }}\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tApp Version\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t{{ model.device.appversion }}\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tSubmissions\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\t\tmodel.submissions != null\r\n\t\t\t\t\t\t\t\t\t\t? model.submissions.length\r\n\t\t\t\t\t\t\t\t\t\t: 0\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tBalance\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t{{ model.balance }} - {{ model.currency }}\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tPhoto\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\tCity\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t{{ city.name_en }} - {{ city.name_ar }}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tCity is required\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t
    \r\n\t\r\n\r\n\t 0\r\n\t\t\"\r\n\t>\r\n\t\t
    \r\n\t\t\t\r\n\t\t\t\t Payment\r\n\t\t\t\tInfomation\r\n\t\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tId\r\n\t\t\t\t\t\tTitle\r\n\t\t\t\t\t\tBank\r\n\t\t\t\t\t\tIBAN\r\n\t\t\t\t\t\tSwift\r\n\t\t\t\t\t\tCreated\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{{ record.id }}\r\n\t\t\t\t\t\t\t{{ record.title }}\r\n\t\t\t\t\t\t\t{{ record.data.bank_name }}\r\n\t\t\t\t\t\t\t{{ record.data.iban }}\r\n\t\t\t\t\t\t\t{{ record.data.swift }}\r\n\r\n\t\t\t\t\t\t\t{{ record.created_at | date }}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t
    \r\n\t\r\n\t 0\r\n\t\t\"\r\n\t>\r\n\t\t
    \r\n\t\t\t\r\n\t\t\t\t Payment\r\n\t\t\t\tRequests\r\n\t\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tId\r\n\t\t\t\t\t\tAmount\r\n\t\t\t\t\t\tStatus\r\n\t\t\t\t\t\tAgent\r\n\t\t\t\t\t\tFullfiled At\r\n\t\t\t\t\t\tCreated\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{{ record.id }}\r\n\t\t\t\t\t\t\t{{ record.cache_amount }}\r\n\t\t\t\t\t\t\t{{ record.status }}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{{ record.first_name }} {{ record.last_name }}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{{ record.accepted_at | date }}\r\n\t\t\t\t\t\t\t{{ record.created_at | date }}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t
    \r\n\t\r\n\t 0\"\r\n\t>\r\n\t\t
    \r\n\t\t\t\r\n\t\t\t\t Submissions\r\n\t\t\t\r\n\t\t
    \r\n\t\t\r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tId\r\n\t\t\t\t\t\tTask\r\n\t\t\t\t\t\tStatus\r\n\t\t\t\t\t\tCreated\r\n\t\t\t\t\t\tReward\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{{ record.id }}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{{ record.title }}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\t\trecord.created_at\r\n\t\t\t\t\t\t\t\t\t\t| date : \"dd-MM-yyyy HH:mm\"\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{{ record?.reward }}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\t 0\r\n\t\t\"\r\n\t>\r\n\t\t
    \r\n\t\t\t\r\n\t\t\t\t Notifications\r\n\t\t\t\r\n\t\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tId\r\n\t\t\t\t\t\tType\r\n\t\t\t\t\t\tMessage\r\n\t\t\t\t\t\tRead\r\n\t\t\t\t\t\tCreated\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{{ record.id }}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{{ record.notifiable_type }} -\r\n\t\t\t\t\t\t\t\t{{ record.notifiable_id }}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{{ record.message }}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{{ record.created_at | date }}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t
    \r\n\t\r\n\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t  \r\n\t\t\t\r\n\t\t
    \r\n\t
    \r\n\r\n" /***/ }), /***/ "./src/app/modules/workers/components/worker/worker.component.ts": /*!***********************************************************************!*\ !*** ./src/app/modules/workers/components/worker/worker.component.ts ***! \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js"); // import { File } from './../model/sprint'; // import { S3Response } from './../model/S3Response'; // import { AccountService } from './../services/accountService'; var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var accountService_1 = __webpack_require__(/*! src/app/services/accountService */ "./src/app/services/accountService.ts"); // import { Sprint, File as Upload } from '../model/sprint'; // import { Worker } from '../model/worker'; // import { Page } from '../model/page'; var pageSubmissionModel_1 = __webpack_require__(/*! src/app/modules/sprints/components/submissionFile/model/pageSubmissionModel */ "./src/app/modules/sprints/components/submissionFile/model/pageSubmissionModel.ts"); // import { ProjectService } from '../services/projectService'; var http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var ngx_uploader_1 = __webpack_require__(/*! ngx-uploader */ "./node_modules/ngx-uploader/fesm5/ngx-uploader.js"); // import { BreadCrumb } from '../model/BreadCrumb'; var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var BreadCrumb_1 = __webpack_require__(/*! src/app/model/BreadCrumb */ "./src/app/model/BreadCrumb.ts"); // import { WorkerService } from '../services/workerService'; var workersService_1 = __webpack_require__(/*! ../../service/workersService */ "./src/app/modules/workers/service/workersService.ts"); var environment_1 = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts"); var WorkerComponent = /** @class */ (function () { function WorkerComponent(accountService, workerService, activatedRoute, http, router, toastr) { this.accountService = accountService; this.workerService = workerService; this.activatedRoute = activatedRoute; this.http = http; this.router = router; this.toastr = toastr; this.genders = [ { id: 0, name: "Male" }, { id: 1, name: "Female" }, ]; this.uploadUrl = "https://gateway.backendapis.net/node/file?name="; this.submitted = false; this.schedule = false; this.availability = false; this.minValue = 1; this.maxValue = 99; this.allowed = null; this.disallowed = null; this.from = null; this.to = null; this.sliderOptions = { floor: 0, ceil: 100, step: 5, }; this.accounts = []; this.countries = [ { id: 206, name: " United Arab Emirates", image: "/assets/icons/uae-round.png", }, { id: 166, name: " Saudi Arabia", image: "/assets/icons/ksa-round.png", }, { id: 58, name: " Egypt", image: "/assets/icons/egypt-round.png" }, ]; this.loginForm = new forms_1.FormGroup({ ContactCode: new forms_1.FormControl(null, [forms_1.Validators.required]), ContactNumber: new forms_1.FormControl(null, [forms_1.Validators.required]), }); this.loading = true; this.email = null; this.id = null; this.model = null; this.showMap = false; this.filterAccounts(null); this.options = { concurrency: 1, maxUploads: 3 }; this.files = []; // local uploading files array this.uploadInput = new core_1.EventEmitter(); // input events, we use this to emit data to ngx-uploader this.humanizeBytes = ngx_uploader_1.humanizeBytes; } WorkerComponent.prototype.toggleMap = function () { this.showMap = !this.showMap; }; WorkerComponent.prototype.ngOnInit = function () { var _this = this; this.activatedRoute.queryParams.subscribe(function (params) { _this.id = _this.activatedRoute.snapshot.paramMap.get("id"); //console.log(this.email); if (_this.id > 0) { _this.workerService .getWorker(_this.email, _this.id) .then(function (worker) { //worker.birthdate = new DatePipe('en-US').transform(worker.birthdate, 'MM/dd/yyyy'); _this.model = worker; _this.buildBreadCrumb(); _this.loading = false; }); } else { _this.loading = false; } }); this.http.get("assets/data.json").subscribe(function (data) { _this.nationalities = data; }); this.http .get(environment_1.environment.api_node_1 + "worker/workerid?worker_id=" + this.id // `https://api.muhimmaplatform.com/node1-prod-v3/worker/workerid?worker_id=${this.id}` ) .subscribe(function (res) { _this.cities = res; _this.cities = _this.cities.data.cities; }); }; WorkerComponent.prototype.onSubmit = function () { this.submitted = true; }; WorkerComponent.prototype.getSubmissionStatus = function (status) { if (status === 0) return 'Draft'; if (status === 1) return 'Submitted'; if (status === 2) return 'Approved'; if (status === 3) return 'Rejected'; return '-'; }; WorkerComponent.prototype.getURL = function (name) { return this.uploadUrl + this.model.name.replace(/\s/g, "") + name; }; WorkerComponent.prototype.styleFunc = function (feature) { return { clickable: false, fillColor: feature.getProperty("color"), strokeWeight: 1, }; }; WorkerComponent.prototype.filterAccounts = function (search) { var _this = this; var p = new pageSubmissionModel_1.Page(); p.pageNumber = 0; p.totalElements = 100; p.totalPages = 1; p.size = 100; this.accountService .getResult(p, this.email) .then(function (accounts) { return (_this.accounts = accounts.data); }); }; WorkerComponent.prototype.buildBreadCrumb = function () { //Sprints? Sprint()>Task Forms () this.crumbs = []; this.crumbs.push(new BreadCrumb_1.BreadCrumb("Home", "/")); this.crumbs.push(new BreadCrumb_1.BreadCrumb("Workers", "/workers")); this.crumbs.push(new BreadCrumb_1.BreadCrumb(this.model.first_name ? this.model.first_name + " " + this.model.last_name + "(" + this.model.id + ")" : "Worker", "")); }; WorkerComponent.prototype.numberOnly = function (event) { var charCode = event.which ? event.which : event.keyCode; var startPos = document.getElementById("phone_number")["selectionStart"]; console.log(startPos, event.key, event.keyCode); if (this.model.phone_number.startsWith("+966") || this.model.phone_number.startsWith("+971") || this.model.phone_number.startsWith("+962")) { this.maxContactLength = 13; } else if (this.model.phone_number.startsWith("+20")) { this.maxContactLength = 13; } else if (this.model.phone_number.startsWith("+965") || this.model.phone_number.startsWith("+968")) { this.maxContactLength = 12; } if (startPos === 0 && (event.key === "+" || event.key === "ArrowRight" || event.key === "Backspace")) { return true; } else if ((startPos === 0 && event.key !== "+") || ((startPos === 3 || startPos === 4) && event.key === "0") || // (charCode > 31 && (charCode < 48 || charCode > 57)) // (charCode >= 65 && charCode <= 90) || // (charCode >= 97 && charCode <= 122) [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "!", "\"", "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/", ":", ";", "<", "=", ">", "?", "@", " ", ].includes(event.key)) { return false; } return true; }; WorkerComponent.prototype.onUploadOutput = function (output, c) { switch (output.type) { case "allAddedToQueue": var file = c === "icon" ? this.iconFile : this.backroundFile; var name_1 = file ? file.name : new Date().getTime() + ".jpeg"; var reader = new FileReader(); name_1 = this.model.name.replace(/\s/g, "") + name_1; this.getBase64fromFile(file.nativeFile).then(function (d) { var headers = new http_1.HttpHeaders().set("Content-Type", "multipart/form-data"); headers.set("Accept", "application/json"); // this.http.post(this.uploadUrl +name, d.body, { headers }) // .subscribe( // (data: S3Response) => { // if(c === 'icon') this.model.iconurl = data.Location; // else this.model.backgroundurl = data.Location; // this.toastr.success('File Uploaded'); // }, // error => { console.log('Error in uoloaing file: '+error);} // ); }); break; case "addedToQueue": if (typeof output.file !== "undefined") { if (c === "icon") this.iconFile = output.file; else this.backroundFile = output.file; } break; case "uploading": if (typeof output.file !== "undefined") { // update current data in files array for uploading file var index = this.files.findIndex(function (file) { return typeof output.file !== "undefined" && file.id === output.file.id; }); this.files[index] = output.file; } break; case "removed": // remove file from array when removed this.files = this.files.filter(function (file) { return file !== output.file; }); break; case "dragOver": this.dragOver = true; break; case "dragOut": case "drop": this.dragOver = false; break; case "done": // console.log(output.file.response.Location); // if(c === 'icon') {this.model.iconurl = output.file.response.Location; } // else { this.model.backgroundurl = output.file.response.Location; } // // The file is downloaded // //////////////////////////////////////////////////////////////////////// // if((this.model.files === null || this.model.files.length === 0) || // this.model.files.find(f => f.upload_type == (c=== 'icon' ? 0:1)) === undefined){ // this.model.files.push({ id: null, created_at: new Date(), uploadable_type:'Project', uploadable_id : this.model.id, // upload_type: (c=== 'icon' ? 0:1),url: output.file.response.Location, is_deleted: false, updated_at: new Date() }); // }//end if new // else{ // this.model.files.find(f => f.upload_type == (c=== 'icon' ? 0:1)).url = output.file.response.Location; // } break; } }; WorkerComponent.prototype.startUpload = function () { var event = { type: "uploadAll", url: this.uploadUrl, method: "POST", data: { name: "bar.jpeg" }, }; this.uploadInput.emit(event); }; WorkerComponent.prototype.cancelUpload = function (id) { this.uploadInput.emit({ type: "cancel", id: id }); }; WorkerComponent.prototype.removeFile = function (id) { this.uploadInput.emit({ type: "remove", id: id }); }; WorkerComponent.prototype.removeAllFiles = function () { this.uploadInput.emit({ type: "removeAll" }); }; WorkerComponent.prototype.getBase64fromFile = function (file) { return new Promise(function (resolve, reject) { var reader = new FileReader(); reader.readAsDataURL(file); reader.onload = function () { console.log("getBase64fromFile success."); var spliced = reader.result.toString().split(","); var header = spliced[0]; spliced.shift(); resolve({ header: header, body: spliced.join(""), }); }; reader.onerror = function (err) { console.log("getBase64fromFile failed."); reject(err); }; }); }; WorkerComponent.prototype.back = function () { this.router.navigate(["/workers"]); }; WorkerComponent.prototype.postForm = function () { var _this = this; if (!this.model.city_id) { this.toastr.error("City is required please select a city from the cities dropdown!"); } if (this.model.phone_number.length < this.maxContactLength) { this.toastr.error("Phone number must be at least " + this.maxContactLength + " digits long including + character and country code."); } else { this.workerService .saveWorker(this.model) .then(function (res) { if (res.response_code === 200) { _this.router.navigate(["/workers"]); } }) .catch(function (error) { console.log({ error: error }); _this.toastr.error(error.message); }); } }; WorkerComponent = __decorate([ core_1.Component({ selector: "app-worker", template: __webpack_require__(/*! ./worker.component.html */ "./src/app/modules/workers/components/worker/worker.component.html"), styles: ["agm-map { height: 300px; /* height is required */ }"], }), __metadata("design:paramtypes", [accountService_1.AccountService, workersService_1.WorkersService, router_1.ActivatedRoute, http_1.HttpClient, router_1.Router, ngx_toastr_1.ToastrService]) ], WorkerComponent); return WorkerComponent; }()); exports.WorkerComponent = WorkerComponent; /***/ }), /***/ "./src/app/modules/workers/components/workers-list/workerslist.component.css": /*!***********************************************************************************!*\ !*** ./src/app/modules/workers/components/workers-list/workerslist.component.css ***! \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".form-control {\r\n padding-right: 30px;\r\n}\r\n\r\n.form-control + .fa {\r\n position: absolute;\r\n right: 0;\r\n padding: 8px 27px;\r\n}\r\n\r\n.blue{\r\n color:darkblue;\r\n font-size: 24px;\r\n\r\n}\r\n\r\n.pink{\r\n color:pink;\r\n font-size: 24px;\r\n}\r\n" /***/ }), /***/ "./src/app/modules/workers/components/workers-list/workerslist.component.html": /*!************************************************************************************!*\ !*** ./src/app/modules/workers/components/workers-list/workerslist.component.html ***! \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\n\t
    \r\n\t\t

    Workers

    \r\n\t
    \r\n\t
    \r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t
    \r\n\t\t\r\n\t\r\n\r\n\t
    \r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t
    \r\n\t
    \r\n\t\t\r\n\t\t \r\n\t\t\r\n\t\t \r\n\t\t\r\n\r\n\t\t\r\n\t
    \r\n\t\r\n\t
    \r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    Name
    \r\n\t\t\t\t
    Phone
    \r\n\t\t\t\t
    Email
    \r\n\t\t\t\t
    Country
    \r\n\t\t\t\t
    City
    \r\n\t\t\t\t
    Nationality
    \r\n\t\t\t\t
    Blocked?
    \r\n\t\t\t\t
    Age Max
    \r\n\t\t\t\t
    Age Min
    \r\n\t\t\t\t
    Type
    \r\n\t\t\t\t
    Records
    \r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t Search\r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t
    \r\n\t
    \r\n\r\n
    \r\n
    \r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t {{ value }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{{ value }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\tMobile \r\n\t\t\t\r\n\t\t\t\t{{ value }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{{ value }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{{ value }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t Country \r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\tSubmissions\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t{{ value }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{{ value }}\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\tReason\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{{ row[\"reason\"].substring(0, 9) + \"...\" }}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\tChat\r\n\t\t\t\r\n\t\t\t\t  Chat\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\tReset\r\n\t\t\t\r\n\t\t\t\t Pin/SA\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\tAction\r\n\t\t\t\r\n\t\t\t\t  Block\r\n\t\t\t\t  Unblock\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\tAction\r\n\t\t\t\r\n\t\t\t\t  Delete\r\n\t\t\t\t  Recover\r\n\t\t\t\r\n\t\t\r\n\r\n\t\t\r\n\t\r\n
    \r\n" /***/ }), /***/ "./src/app/modules/workers/components/workers-list/workerslist.component.ts": /*!**********************************************************************************!*\ !*** ./src/app/modules/workers/components/workers-list/workerslist.component.ts ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); // import { UserService } from './../services/user.service'; var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var user_service_1 = __webpack_require__(/*! src/app/services/user.service */ "./src/app/services/user.service.ts"); // import { Page} from '../model/page'; var pageSubmissionModel_1 = __webpack_require__(/*! src/app/modules/sprints/components/submissionFile/model/pageSubmissionModel */ "./src/app/modules/sprints/components/submissionFile/model/pageSubmissionModel.ts"); // import { WorkerService } from './../services/workerService'; var workersService_1 = __webpack_require__(/*! ../../service/workersService */ "./src/app/modules/workers/service/workersService.ts"); // import { MessagingSevice } from '../services/messagingService'; var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var messagingService_1 = __webpack_require__(/*! src/app/services/messagingService */ "./src/app/services/messagingService.ts"); var WorkersListComponent = /** @class */ (function () { function WorkersListComponent(workerService, messaging, toastr, userService) { this.workerService = workerService; this.messaging = messaging; this.toastr = toastr; this.userService = userService; this.page = new pageSubmissionModel_1.Page(); this.rows = []; this.loadingIndicator = true; this.reorderable = true; this.search = ""; this.device = null; this.users = []; this.loading = true; this.sortcolumn = "id"; this.sortorder = "desc"; this.email = null; this.name = null; this.phone = null; this.agel = null; this.ageg = null; this.status = null; this.userid = null; this.country = null; this.workertype = null; this.city = null; this.showAdvanced = false; this.nationalityid = null; this.isFirstTime = true; this.countries = [ { id: 206, name: "United Arab Emirates", image: "/assets/icons/uae-round.png", }, { id: 166, name: "Saudi Arabia", image: "/assets/icons/ksa-round.png" }, { id: 58, name: "Egypt", image: "/assets/icons/egypt-round.png" }, ]; this.cities = [ { id: 21842, name: "Alexandria", parent_id: 58 }, { id: 21843, name: "Cairo", parent_id: 58 }, { id: 21838, name: "AD+AIN+DXB+SHJ", parent_id: 206 }, { id: 21839, name: "Abu Dhabi", parent_id: 206 }, { id: 21840, name: "Sharjah", parent_id: 206 }, { id: 21832, name: "Dubai", parent_id: 206 }, ]; this.page.pageNumber = 0; this.page.size = 50; } WorkersListComponent.prototype.ngOnInit = function () { this.setPage({ offset: 0, pageSize: 20 }); }; // end on init WorkersListComponent.prototype.toggleAdvancedSearch = function () { this.showAdvanced = !this.showAdvanced; }; WorkersListComponent.prototype.filter = function () { this.setPage({ offset: 0, pageSize: 20 }); // this.page.size = this.page.size; // this.page.pageNumber = this.page.pageNumber; // this.workerService.getFullSearch(this.page, this.search, this.name, this.email , this.phone, this.nationalityid, // // tslint:disable-next-line:max-line-length // this.country, this.city, this.userid, this.status, this.agel, this.ageg, this.workertype, this.sortcolumn, this.sortorder, this.device).then(pagedData => { // console.log("Device name" + this.device); // this.page = pagedData.page; // this.rows = pagedData.data; // this.loading = false; // this.loadingIndicator = false; // }); }; WorkersListComponent.prototype.toggleUser = function (email, condition) { var _this = this; console.log({ email: email, condition: condition }); // tslint:disable-next-line:max-line-length this.userService .toggleWorker(email, condition) .then(function (data) { _this.toastr.success("User was " + (condition === 1 ? "blocked" : "unblocked") + " successfully!"); _this.filter(); }) .catch(function (e) { return _this.toastr.error("Operation was not completed"); }); }; WorkersListComponent.prototype.deleteUser = function (id) { var _this = this; this.userService .deleteUser(id) .then(function (data) { _this.toastr.success("User was deleted successfully!"); _this.filter(); }) .catch(function (e) { return console.log("Operation was not completed"); }); }; WorkersListComponent.prototype.recoverUser = function (id, email, phone_number) { var _this = this; this.userService .recoverUser(id, email, phone_number) .then(function (data) { _this.toastr.success("User recovered successfully!"); _this.filter(); }) .catch(function (e) { return console.log("Operation was not completed"); }); }; WorkersListComponent.prototype.setPage = function (pageInfo) { var _this = this; this.page.size = pageInfo.pageSize; this.page.pageNumber = pageInfo.offset; this.workerService .getResult(this.page, this.search) .then(function (pagedData) { _this.page = pagedData.page; _this.rows = pagedData.data; console.log(_this.rows); _this.loading = false; _this.loadingIndicator = false; }); }; WorkersListComponent.prototype.resetPinAndSecretAnswers = function (userId) { var _this = this; this.workerService .resetPinAndSecretAnswers(userId) .then(function (res) { if (res.response_code === 200) { _this.toastr.success("User pin/SA reset successfully!"); } }) .catch(function (error) { console.log({ error: error }); _this.toastr.error(error.message || "Error while calling API!"); }); }; WorkersListComponent.prototype.getUser = function (email) { console.log("Called get user with email:" + email); this.messaging .GetIntercomUser(email) .toPromise() .then(function (data) { console.dir(data); }) .catch(function (e) { return console.log("Error in retrieving nIntercom User" + JSON.stringify(e)); }); }; WorkersListComponent.prototype.onSort = function (event) { // event was triggered, start sort sequence console.log("Sort Event", event); this.loading = true; var sort = event.sorts[0]; this.sortcolumn = sort.prop; this.sortorder = sort.dir; this.filter(); }; WorkersListComponent.prototype.uploadCsvFile = function (event) { var _this = this; if (event.target.files.length > 0) { var body = new FormData(); console.log("log file", event); var files = event.target.files[0]; // FileList object console.log("log filess", files); body.append("file", files); this.userService.uploadCsv(body).subscribe(function (data) { console.log("data upload result ==>", data); if (data.response_code == 200) { _this.toastr.success(data.message); } else { _this.toastr.error(data.message); } _this.filter(); event.target.value = null; }); // .then(e => console.log('Operation was not completed')); // } } }; WorkersListComponent = __decorate([ core_1.Component({ selector: "app-workers", template: __webpack_require__(/*! ./workerslist.component.html */ "./src/app/modules/workers/components/workers-list/workerslist.component.html"), styles: [__webpack_require__(/*! ./workerslist.component.css */ "./src/app/modules/workers/components/workers-list/workerslist.component.css")], }), __metadata("design:paramtypes", [workersService_1.WorkersService, messagingService_1.MessagingSevice, ngx_toastr_1.ToastrService, user_service_1.UserService]) ], WorkersListComponent); return WorkersListComponent; }()); exports.WorkersListComponent = WorkersListComponent; /***/ }), /***/ "./src/app/modules/workers/service/workersService.ts": /*!***********************************************************!*\ !*** ./src/app/modules/workers/service/workersService.ts ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) t[p[i]] = s[p[i]]; return t; }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js"); var paged_data_1 = __webpack_require__(/*! src/app/model/paged-data */ "./src/app/model/paged-data.ts"); var aws_amplify_1 = __webpack_require__(/*! aws-amplify */ "./node_modules/aws-amplify/lib/index.js"); // import aws_exports from '' var auth_service_1 = __webpack_require__(/*! src/app/auth/auth.service */ "./src/app/auth/auth.service.ts"); // import {Convert} from '../model/Worker'; var core_2 = __webpack_require__(/*! @ngx-loading-bar/core */ "./node_modules/@ngx-loading-bar/core/fesm5/ngx-loading-bar-core.js"); var http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); /** * A server used to mock a paged data result from a server */ var WorkersService = /** @class */ (function () { function WorkersService(auth, loader, httpClient, toastr) { this.auth = auth; this.loader = loader; this.httpClient = httpClient; this.toastr = toastr; this._worker = null; } /** * A method that mocks a paged server response * @param page The selected page * @returns {any} An observable containing the employee data */ WorkersService.prototype.getResults = function (page, search) { return rxjs_1.of(this.getPagedData(page, search)); }; WorkersService.prototype.getWorker = function (email, id) { var _this = this; var worker = null; var apiName = "api_node_1"; var path = "worker/id?email=" + email + "&id=" + id; var myInit = { headers: {}, response: true, queryStringParameters: {}, }; var promise = new Promise(function (resolve, reject) { _this.loader.start(); aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { _this.loader.complete(); //worker = Convert.toWorker(JSON.stringify(response.data[0]))[0]; resolve(response.data.data); }) .catch(function (error) { console.log("Error in invoiking API:" + error); reject(error); }); }); return promise; }; WorkersService.prototype.getWorkerByEmail = function (email) { var _this = this; var worker = null; var apiName = "api"; var path = "worker?email=" + email; var myInit = { headers: {}, response: true, queryStringParameters: {}, }; var promise = new Promise(function (resolve, reject) { _this.loader.start(); aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { _this._worker = response.data; localStorage.setItem("worker", JSON.stringify(_this._worker)); _this.loader.complete(); //worker = Convert.toWorker(JSON.stringify(response.data[0]))[0]; resolve(response.data); }) .catch(function (error) { console.log("Error in invoiking API:" + error); reject(error); }); }); return promise; }; // tslint:disable-next-line:no-shadowed-variable WorkersService.prototype.saveWorker = function (worker) { var _this = this; var device = worker.device, events = worker.events, last_location = worker.last_location, paymentinformation = worker.paymentinformation, paymentrequests = worker.paymentrequests, submissions = worker.submissions, workernotifications = worker.workernotifications, remainingWorker = __rest(worker, ["device", "events", "last_location", "paymentinformation", "paymentrequests", "submissions", "workernotifications"]); var apiName = "api_node_2"; var path = "worker/"; var myInit = { body: remainingWorker, headers: {}, }; var promise = new Promise(function (resolve, reject) { _this.loader.start(); aws_amplify_1.API.post(apiName, path, myInit) .then(function (res) { resolve(res); _this.loader.complete(); }) .catch(function (error) { reject(error); _this.loader.complete(); }); }); return promise; }; WorkersService.prototype.resetPinAndSecretAnswers = function (userId) { var _this = this; var apiName = "api_node_2"; var path = "reset?id=" + userId; var myInit = { headers: {}, }; var promise = new Promise(function (resolve, reject) { _this.loader.start(); aws_amplify_1.API.put(apiName, path, myInit) .then(function (res) { resolve(res); _this.loader.complete(); }) .catch(function (error) { reject(error); _this.loader.complete(); }); }); return promise; }; WorkersService.prototype.toggleWorker = function (email, condition) { var apiName = "api"; var path = condition ? "user/toggle" : "user/toggle"; var myInit = { body: { email: email, condition: condition }, headers: {}, }; var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.post(apiName, path, myInit) .then(function (response) { var data = response.data; resolve("OK"); }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; WorkersService.prototype.getResult = function (page, search) { var _this = this; var pagedData = new paged_data_1.PagedData(); var apiName = "api_node_1"; var s = search === null || search === "" || search === "null" ? "" : "&search=" + search; var path = "workers?limit=" + page.size + "&offset=" + page.pageNumber * page.size + s; var myInit = { headers: {}, response: true, queryStringParameters: {}, }; this.loader.start(); var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { var data = response.data; if (data.response_code == 200) { page.totalElements = data.data.count; page.totalPages = page.totalElements / page.size; _this.loader.complete(); var start = page.pageNumber * page.size; var end = Math.min(start + page.size, page.totalElements); pagedData.page = page; pagedData.data = data.data.data; resolve(pagedData); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { _this.toastr.error("Error in invoiking API:" + error); reject(error); }); }); // end promoise return promise; }; // end getresult WorkersService.prototype.getFullSearch = function (page, search, name, email, phone, nationalityid, countryid, cityid, userid, status, agel, agea, workertype, devicename, sortcolumn, sortorder) { var _this = this; var pagedData = new paged_data_1.PagedData(); var apiName = "api_node_1"; var s = search === null || search === "" || search === "null" ? "" : "&search=" + search; var al = agel === null || agel === "" || agel === "null" ? "" : "&agel=" + agel; var ag = agea === null || agea === "" || search === "null" ? "" : "&ageg=" + agea; var n = name === null || name === "" || name === "null" ? "" : "&name=" + name; var e = email === null || email === "" || email === "null" ? "" : "&email=" + email; var p = phone === null || phone === "" || phone === "null" ? "" : "&phone=" + phone; var nat = nationalityid === null || nationalityid === "" || nationalityid === "null" ? "" : "&nationalityid=" + nationalityid; var count = countryid === null || countryid === "" || countryid === "null" ? "" : "&countryid=" + countryid; var city = cityid === null || cityid === "" || cityid === "null" ? "" : "&cityid=" + cityid; var u = userid === null || userid === "" || userid === "null" ? "" : "&userid=" + userid; var sts = status === null || status === "" || status === "null" ? "" : "&status=" + status; var so = sortorder === null || sortorder === "" || sortorder === "null" ? "" : "&sortorder=" + sortorder; var sc = sortcolumn === null || sortcolumn === "" || sortcolumn === "null" ? "" : "&sortcolumn=" + sortcolumn; var wt = workertype === null || workertype === "" || workertype === "null" ? "" : "&workertype=" + workertype; var dn = devicename === null || devicename === "" || devicename === "null" ? "" : "&device_name=" + devicename; var path = "workers/full?limit=" + page.size + "&offset=" + page.pageNumber * page.size + s + al + ag + n + e + p + nat + count + city + u + sts + so + sc + wt; console.log(path); var myInit = { headers: {}, response: true, queryStringParameters: {}, }; this.loader.start(); var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { var data = response.data; if (data.response_code == 200) { _this.loader.complete(); page.totalElements = data.data.count; page.totalPages = page.totalElements / page.size; var start = page.pageNumber * page.size; var end = Math.min(start + page.size, page.totalElements); pagedData.page = page; pagedData.data = data.data.data; resolve(pagedData); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { _this.toastr.error("Error in invoiking API:" + error); reject(error); }); }); // end promoise return promise; }; // end getresult /** * Package companyData into a PagedData object based on the selected Page * @param page The page data used to get the selected data from companyData * @returns {PagedData} An array of the selected data and page */ WorkersService.prototype.getPagedData = function (page, search) { var _this = this; var pagedData = new paged_data_1.PagedData(); var apiName = "api"; var path = "workers?search=" + search + "&limit=" + page.size + "&offsert=" + page.pageNumber * page.size; var myInit = { headers: {}, response: true, queryStringParameters: {}, }; this.loader.start(); aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response.data; page.totalElements = data.count; page.totalPages = page.totalElements / page.size; var start = page.pageNumber * page.size; var end = Math.min(start + page.size, page.totalElements); pagedData.data = data.data; }) .catch(function (error) { console.log("Error in invoiking API:" + error); }); pagedData.page = page; return pagedData; }; WorkersService.prototype.getCompleteResult = function (page, search, isfirsttime) { var _this = this; var pagedData = new paged_data_1.PagedData(); var apiName = "api"; var s = search === null || search === "" || search === "null" ? "" : "&search=" + search; var i = isfirsttime; var path = "workers?limit=" + page.size + "&offset=" + page.pageNumber * page.size + "&isFirstTime=" + i + s; var myInit = { headers: {}, response: true, queryStringParameters: {}, }; this.loader.start(); var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { var data = response.data; page.totalElements = data.count; page.totalPages = page.totalElements / page.size; _this.loader.complete(); var start = page.pageNumber * page.size; var end = Math.min(start + page.size, page.totalElements); pagedData.page = page; pagedData.data = data.data; resolve(pagedData); }) .catch(function (error) { console.log("Error in invoiking API:" + error); reject(error); }); }); // end promoise return promise; }; // end getresult WorkersService = __decorate([ core_1.Injectable({ providedIn: "root" }), __metadata("design:paramtypes", [auth_service_1.AuthService, core_2.LoadingBarService, http_1.HttpClient, ngx_toastr_1.ToastrService]) ], WorkersService); return WorkersService; }()); exports.WorkersService = WorkersService; /***/ }), /***/ "./src/app/modules/workers/workers-routing.module.ts": /*!***********************************************************!*\ !*** ./src/app/modules/workers/workers-routing.module.ts ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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; }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var auth_guard_1 = __webpack_require__(/*! ../../auth/auth.guard */ "./src/app/auth/auth.guard.ts"); var worker_component_1 = __webpack_require__(/*! ./components/worker/worker.component */ "./src/app/modules/workers/components/worker/worker.component.ts"); var workerslist_component_1 = __webpack_require__(/*! ./components/workers-list/workerslist.component */ "./src/app/modules/workers/components/workers-list/workerslist.component.ts"); var routes = [ { path: '', component: workerslist_component_1.WorkersListComponent, canActivate: [auth_guard_1.AuthGuard], }, { path: ':id/edit', component: worker_component_1.WorkerComponent, data: { returnUrl: window.location.pathname }, canActivate: [auth_guard_1.AuthGuard] }, { path: '', redirectTo: 'workers', pathMatch: 'full' }, { path: '**', redirectTo: '//workers', pathMatch: 'full' }, ]; var WorkersRoutingModule = /** @class */ (function () { function WorkersRoutingModule() { } WorkersRoutingModule = __decorate([ core_1.NgModule({ imports: [router_1.RouterModule.forChild(routes)], exports: [router_1.RouterModule] }) ], WorkersRoutingModule); return WorkersRoutingModule; }()); exports.WorkersRoutingModule = WorkersRoutingModule; /***/ }), /***/ "./src/app/modules/workers/workers.module.ts": /*!***************************************************!*\ !*** ./src/app/modules/workers/workers.module.ts ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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; }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @agm/core */ "./node_modules/@agm/core/index.js"); var common_1 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); var http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); var core_2 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js"); var ngx_csv_1 = __webpack_require__(/*! @ctrl/ngx-csv */ "./node_modules/@ctrl/ngx-csv/fesm5/ctrl-ngx-csv.js"); var core_3 = __webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js"); var ngx_datatable_1 = __webpack_require__(/*! @swimlane/ngx-datatable */ "./node_modules/@swimlane/ngx-datatable/release/index.js"); var aws_amplify_angular_1 = __webpack_require__(/*! aws-amplify-angular */ "./node_modules/aws-amplify-angular/dist/index.js"); var ng_pick_datetime_1 = __webpack_require__(/*! ng-pick-datetime */ "./node_modules/ng-pick-datetime/picker.js"); var ng5_slider_1 = __webpack_require__(/*! ng5-slider */ "./node_modules/ng5-slider/esm5/ng5-slider.js"); var ngx_quill_1 = __webpack_require__(/*! ngx-quill */ "./node_modules/ngx-quill/fesm5/ngx-quill.js"); var ngx_select_ex_1 = __webpack_require__(/*! ngx-select-ex */ "./node_modules/ngx-select-ex/fesm5/ngx-select-ex.js"); var ngx_sortable_1 = __webpack_require__(/*! ngx-sortable */ "./node_modules/ngx-sortable/dist/index.js"); var ngx_uploader_1 = __webpack_require__(/*! ngx-uploader */ "./node_modules/ngx-uploader/fesm5/ngx-uploader.js"); var search_pipe_1 = __webpack_require__(/*! ../../search.pipe */ "./src/app/search.pipe.ts"); var sortby_pipe_1 = __webpack_require__(/*! ../../sortby.pipe */ "./src/app/sortby.pipe.ts"); var worker_component_1 = __webpack_require__(/*! ./components/worker/worker.component */ "./src/app/modules/workers/components/worker/worker.component.ts"); var workerslist_component_1 = __webpack_require__(/*! ./components/workers-list/workerslist.component */ "./src/app/modules/workers/components/workers-list/workerslist.component.ts"); var workers_routing_module_1 = __webpack_require__(/*! ./workers-routing.module */ "./src/app/modules/workers/workers-routing.module.ts"); var WorkersModule = /** @class */ (function () { function WorkersModule() { } WorkersModule = __decorate([ core_2.NgModule({ imports: [ common_1.CommonModule, forms_1.ReactiveFormsModule, forms_1.FormsModule, http_1.HttpClientModule, ngx_datatable_1.NgxDatatableModule, ngx_select_ex_1.NgxSelectModule, ngx_uploader_1.NgxUploaderModule, ngx_csv_1.CsvModule, ngx_quill_1.QuillModule, ng_pick_datetime_1.OwlDateTimeModule, ng_pick_datetime_1.OwlNativeDateTimeModule, ng5_slider_1.Ng5SliderModule, aws_amplify_angular_1.AmplifyAngularModule, core_3.TranslateModule, ngx_sortable_1.NgxSortableModule, core_1.AgmCoreModule.forRoot({ apiKey: "AIzaSyDa1UayxKz_79DUT2nmE2wHAuBwGdZVL3Y", // apiKey: "AIzaSyDP8ctBV6hZ-3zSmr7enXzQTHn5jFd_guc", libraries: ["drawing"], }), workers_routing_module_1.WorkersRoutingModule, ], declarations: [ workerslist_component_1.WorkersListComponent, worker_component_1.WorkerComponent, search_pipe_1.SearchPipe, sortby_pipe_1.SortbyPipe, ], providers: [ aws_amplify_angular_1.AmplifyService, // AuthService, // AuthGuard, // WorkerService, // AccountService, // ProjectService, // PaymentRequestService, // SubmissionService, common_1.DatePipe, ], exports: [workerslist_component_1.WorkersListComponent, worker_component_1.WorkerComponent, search_pipe_1.SearchPipe, sortby_pipe_1.SortbyPipe], }) ], WorkersModule); return WorkersModule; }()); exports.WorkersModule = WorkersModule; /***/ }), /***/ "./src/app/profile/profile.component.css": /*!***********************************************!*\ !*** ./src/app/profile/profile.component.css ***! \***********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/profile/profile.component.html": /*!************************************************!*\ !*** ./src/app/profile/profile.component.html ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "

    Profile

    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n\r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n First Name is required\r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n Last Name is required\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n Mobile is required\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n\r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n" /***/ }), /***/ "./src/app/profile/profile.component.ts": /*!**********************************************!*\ !*** ./src/app/profile/profile.component.ts ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ProfileComponent = /** @class */ (function () { function ProfileComponent() { this.loading = true; this.user = null; this.model = null; } ProfileComponent.prototype.ngOnInit = function () { this.user = JSON.parse(localStorage.getItem('user')); this.model = this.user; }; ProfileComponent = __decorate([ core_1.Component({ selector: 'app-profile', template: __webpack_require__(/*! ./profile.component.html */ "./src/app/profile/profile.component.html"), styles: [__webpack_require__(/*! ./profile.component.css */ "./src/app/profile/profile.component.css")] }), __metadata("design:paramtypes", []) ], ProfileComponent); return ProfileComponent; }()); exports.ProfileComponent = ProfileComponent; /***/ }), /***/ "./src/app/report/report.component.css": /*!*********************************************!*\ !*** ./src/app/report/report.component.css ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/report/report.component.html": /*!**********************************************!*\ !*** ./src/app/report/report.component.html ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\nthis is the report component!\r\n" /***/ }), /***/ "./src/app/report/report.component.ts": /*!********************************************!*\ !*** ./src/app/report/report.component.ts ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ReportComponent = /** @class */ (function () { function ReportComponent() { } ReportComponent.prototype.ngOnInit = function () { var placeholderDiv = document.getElementById('vizContainer'); var url = ''; // 'https://dub01.online.tableau.com/t/muhimma/views/Julphar_CrossTabs/AgreeToShareAnswer?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no'; var options = { hideTabs: true, width: "80%", height: "500px", onFirstInteractive: function () { console.log("Run this code when the viz has finished loading."); } }; // this.viz = new tableau.Viz(placeholderDiv, url, options); }; ReportComponent = __decorate([ core_1.Component({ selector: 'app-report', template: __webpack_require__(/*! ./report.component.html */ "./src/app/report/report.component.html"), styles: [__webpack_require__(/*! ./report.component.css */ "./src/app/report/report.component.css")] }), __metadata("design:paramtypes", []) ], ReportComponent); return ReportComponent; }()); exports.ReportComponent = ReportComponent; /***/ }), /***/ "./src/app/reports/reports.component.css": /*!***********************************************!*\ !*** ./src/app/reports/reports.component.css ***! \***********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".modal-dialog {\r\n width: 98%;\r\n height: 92%;\r\n padding: 0;\r\n}\r\n\r\n.modal-content {\r\n height: 99%;\r\n}\r\n" /***/ }), /***/ "./src/app/reports/reports.component.html": /*!************************************************!*\ !*** ./src/app/reports/reports.component.html ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\n
    \r\n
    \r\n
    \r\n
    {{model.title}}
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    Request New Report
    \r\n \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n Name is required\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n Description is required\r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n

    Reports

    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n\r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n Title\r\n \r\n \r\n {{ value }}\r\n \r\n \r\n\r\n \r\n \r\n Status\r\n \r\n \r\n {{value}}\r\n \r\n \r\n\r\n\r\n \r\n \r\n Created At\r\n \r\n \r\n {{ value | date}}\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n   View\r\n \r\n\r\n\r\n \r\n\r\n \r\n\r\n   Edit\r\n\r\n\r\n\r\n\r\n
    \r\n\r\n" /***/ }), /***/ "./src/app/reports/reports.component.ts": /*!**********************************************!*\ !*** ./src/app/reports/reports.component.ts ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var report_service_1 = __webpack_require__(/*! ./../services/report.service */ "./src/app/services/report.service.ts"); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var ReportsComponent = /** @class */ (function () { function ReportsComponent(reportService, toastr) { this.reportService = reportService; this.toastr = toastr; this.admin = false; this.message = ''; this.model = null; this._sprint = null; this.id = 0; this.valueChange = new core_1.EventEmitter(); } ReportsComponent.prototype.ngOnInit = function () { this.GetRecord(0); }; ReportsComponent.prototype.GetRecord = function (id) { if (id === 0) this.model = { id: 0, title: '', description: '', url: '', status: 0, reportable_id: this.sprintId, reportable_type: 'Project', creator_id: null, creator_type: 'Agent', attributes: null, created_at: new Date(), updated_at: new Date(), is_deleted: false }; else this.model = this.rows.find(function (r) { return r.id === id; }); }; ReportsComponent.prototype.postForm = function () { var _this = this; this.model.reportable_id = this.projectId; this.model.reportable_type = 'Project'; this.reportService.saveReport(this.model) .then(function (data) { _this.model.id = data['id']; console.log('Saved..' + data); _this.toastr.success('Saved Successfully!'); _this.valueChange.emit(_this.model); }) .catch(function (err) { _this.toastr.error('Error in saving reward'); console.error(err); }); }; __decorate([ core_1.Input(), __metadata("design:type", Array) ], ReportsComponent.prototype, "rows", void 0); __decorate([ core_1.Input(), __metadata("design:type", Object) ], ReportsComponent.prototype, "projectId", void 0); __decorate([ core_1.Input(), __metadata("design:type", Boolean) ], ReportsComponent.prototype, "admin", void 0); __decorate([ core_1.Input(), __metadata("design:type", Number) ], ReportsComponent.prototype, "sprintId", void 0); __decorate([ core_1.Output('ReportSaved'), __metadata("design:type", core_1.EventEmitter) ], ReportsComponent.prototype, "valueChange", void 0); ReportsComponent = __decorate([ core_1.Component({ selector: 'app-reports', template: __webpack_require__(/*! ./reports.component.html */ "./src/app/reports/reports.component.html"), styles: [__webpack_require__(/*! ./reports.component.css */ "./src/app/reports/reports.component.css")] }), __metadata("design:paramtypes", [report_service_1.ReportService, ngx_toastr_1.ToastrService]) ], ReportsComponent); return ReportsComponent; }()); exports.ReportsComponent = ReportsComponent; /***/ }), /***/ "./src/app/reportsadmin/reportsadmin.component.css": /*!*********************************************************!*\ !*** ./src/app/reportsadmin/reportsadmin.component.css ***! \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".modal-dialog,\r\n.modal-content {\r\n /* 80% of window height */\r\n height: 95%;\r\n}\r\n\r\n.modal-body {\r\n /* 100% = dialog height, 120px = header + footer */\r\n max-height: calc(100% - 120px);\r\n overflow-y: scroll;\r\n}\r\n" /***/ }), /***/ "./src/app/reportsadmin/reportsadmin.component.html": /*!**********************************************************!*\ !*** ./src/app/reportsadmin/reportsadmin.component.html ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\r\n\r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    Request New Report
    \r\n \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n Name is required\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n Description is required\r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n

    Reports

    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n \r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n Title\r\n \r\n \r\n {{ value }}\r\n \r\n \r\n\r\n \r\n \r\n Status\r\n \r\n \r\n {{value}}\r\n \r\n \r\n\r\n\r\n \r\n \r\n Created At\r\n \r\n \r\n {{ value | date}}\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n 0\" data-toggle=\"modal\" data-target=\"#viewModal\"\r\n (click)=\"GetRecord(row['id'])\">   View\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n   Edit\r\n\r\n \r\n \r\n \r\n
    \r\n\r\n" /***/ }), /***/ "./src/app/reportsadmin/reportsadmin.component.ts": /*!********************************************************!*\ !*** ./src/app/reportsadmin/reportsadmin.component.ts ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var sprintService_1 = __webpack_require__(/*! ../modules/sprints/service/sprintService */ "./src/app/modules/sprints/service/sprintService.ts"); var report_service_1 = __webpack_require__(/*! ./../services/report.service */ "./src/app/services/report.service.ts"); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var page_1 = __webpack_require__(/*! ../model/page */ "./src/app/model/page.ts"); var ReportsadminComponent = /** @class */ (function () { function ReportsadminComponent(reportService, SprintService, toastr) { this.reportService = reportService; this.SprintService = SprintService; this.toastr = toastr; this.rows = []; this.projectId = null; this.statusId = null; this.projects = []; this.search = null; this.admin = false; this.message = ''; this.model = null; this.id = 0; this.loadingIndicator = true; } ReportsadminComponent.prototype.ngOnInit = function () { this.GetRecords(); this.GetRecord(0); this.GetProjects(); }; ReportsadminComponent.prototype.GetProjects = function () { var _this = this; var p = new page_1.Page(); p.pageNumber = 0; p.totalElements = 100; p.totalPages = 1; p.size = 100; this.SprintService.getResult(p, null, this.search, null, null, 1).then(function (pagedData) { _this.projects = pagedData.data.data.data; console.log("pagedData=>>>>>>", _this.projects); }); }; ReportsadminComponent.prototype.GetRecord = function (id) { if (id === 0) this.model = { id: 0, title: '', description: '', url: '', status: 0, reportable_id: null, reportable_type: 'Project', creator_id: null, creator_type: 'Agent', attributes: null, created_at: new Date(), updated_at: new Date(), is_deleted: false }; else this.model = this.rows.find(function (r) { return r.id === id; }); }; ReportsadminComponent.prototype.GetRecords = function () { var _this = this; this.reportService.getReports(this.projectId, this.statusId, this.search).then(function (data) { _this.loadingIndicator = false; console.log("data", data); if (data.response_code == 200) { _this.rows = data.data.data; } else if (data.response_code == 422) { return _this.toastr.error(data.message); } else if (data.response_code == 500) { return _this.toastr.error(data.message); } }); }; ReportsadminComponent.prototype.postForm = function () { var _this = this; this.model.reportable_id = this.projectId; this.model.reportable_type = 'Project'; this.reportService.saveReport(this.model) .then(function (data) { _this.model.id = data['id']; console.log('Saved..' + data); _this.toastr.success('Saved Successfully!'); _this.GetRecords(); }) .catch(function (err) { console.error('Error in saving reward'); console.error(err); }); }; __decorate([ core_1.Input(), __metadata("design:type", Boolean) ], ReportsadminComponent.prototype, "admin", void 0); ReportsadminComponent = __decorate([ core_1.Component({ selector: 'app-reportsadmin', template: __webpack_require__(/*! ./reportsadmin.component.html */ "./src/app/reportsadmin/reportsadmin.component.html"), styles: [__webpack_require__(/*! ./reportsadmin.component.css */ "./src/app/reportsadmin/reportsadmin.component.css")] }), __metadata("design:paramtypes", [report_service_1.ReportService, sprintService_1.SprintService, ngx_toastr_1.ToastrService]) ], ReportsadminComponent); return ReportsadminComponent; }()); exports.ReportsadminComponent = ReportsadminComponent; /***/ }), /***/ "./src/app/safe.pipe.ts": /*!******************************!*\ !*** ./src/app/safe.pipe.ts ***! \******************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var platform_browser_1 = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js"); var SafePipe = /** @class */ (function () { function SafePipe(sanitizer) { this.sanitizer = sanitizer; } SafePipe.prototype.transform = function (value, type) { switch (type) { case 'html': return this.sanitizer.bypassSecurityTrustHtml(value); case 'style': return this.sanitizer.bypassSecurityTrustStyle(value); case 'script': return this.sanitizer.bypassSecurityTrustScript(value); case 'url': return this.sanitizer.bypassSecurityTrustUrl(value); case 'resourceUrl': return this.sanitizer.bypassSecurityTrustResourceUrl(value); default: throw new Error("Invalid safe type specified: " + type); } }; SafePipe = __decorate([ core_1.Pipe({ name: 'safe' }), __metadata("design:paramtypes", [platform_browser_1.DomSanitizer]) ], SafePipe); return SafePipe; }()); exports.SafePipe = SafePipe; /***/ }), /***/ "./src/app/search.pipe.ts": /*!********************************!*\ !*** ./src/app/search.pipe.ts ***! \********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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; }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var SearchPipe = /** @class */ (function () { function SearchPipe() { } SearchPipe.prototype.transform = function (value, args) { if (!value) return null; if (!args) return value; args = args.toLowerCase(); return value.filter(function (item) { return JSON.stringify(item).toLowerCase().includes(args); }); }; SearchPipe = __decorate([ core_1.Pipe({ name: 'POIFilter' }) ], SearchPipe); return SearchPipe; }()); exports.SearchPipe = SearchPipe; /***/ }), /***/ "./src/app/services/FileUploadComponent.ts": /*!*************************************************!*\ !*** ./src/app/services/FileUploadComponent.ts ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js"); var FileUploadComponent = /** @class */ (function () { function FileUploadComponent(http) { var _this = this; this.http = http; this.selectedFileName = null; this.file = null; this.propagateChange = function (_) { var spliced = _.split(','); var h = spliced[0]; spliced.shift(); var send = { header: h, body: spliced.join('') }; var url = 'https://gateway.backendapis.net/node/file/multipart?name=' + _this.selectedFileName; var formData = new FormData(); formData.append('uploadFile', _this.file, _this.file.name); var header = new Headers(); header.append('Content-Type', 'multipart/form-data'); header.append('Accept', 'application/json'); //let options = new RequestOptions({ headers: headers }); var headers = new http_1.HttpHeaders().set('Content-Type', 'multipart/form-data'); headers.set('Accept', 'application/json'); _this.http.post(url, send.body, { headers: headers }) .subscribe(function (data) { console.log(JSON.stringify(data)); }, function (error) { return console.log(error); }); }; } FileUploadComponent_1 = FileUploadComponent; FileUploadComponent.prototype.writeValue = function (value) { //Handle write value }; FileUploadComponent.prototype.registerOnChange = function (fn) { this.propagateChange = fn; }; FileUploadComponent.prototype.registerOnTouched = function () { }; FileUploadComponent.prototype.changeListener = function ($event) { this.readThis($event.target); }; FileUploadComponent.prototype.readThis = function (inputValue) { var _this = this; this.file = inputValue.files[0]; var myReader = new FileReader(); myReader.onloadend = function (e) { _this.selectedFileName = _this.file.name; _this.propagateChange(myReader.result); }; myReader.readAsDataURL(this.file); }; __decorate([ core_1.Input(), __metadata("design:type", Boolean) ], FileUploadComponent.prototype, "showFileNameInput", void 0); __decorate([ core_1.Input(), __metadata("design:type", String) ], FileUploadComponent.prototype, "uploadButtonText", void 0); FileUploadComponent = FileUploadComponent_1 = __decorate([ core_1.Component({ selector: 'file-upload', template: "\n
    \n {{uploadButtonText}}\n \n
    ", providers: [ { provide: forms_1.NG_VALUE_ACCESSOR, useExisting: core_1.forwardRef(function () { return FileUploadComponent_1; }), multi: true } ] }), __metadata("design:paramtypes", [http_1.HttpClient]) ], FileUploadComponent); return FileUploadComponent; var FileUploadComponent_1; }()); exports.FileUploadComponent = FileUploadComponent; /***/ }), /***/ "./src/app/services/accountService.ts": /*!********************************************!*\ !*** ./src/app/services/accountService.ts ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js"); var paged_data_1 = __webpack_require__(/*! ../model/paged-data */ "./src/app/model/paged-data.ts"); var aws_amplify_1 = __webpack_require__(/*! aws-amplify */ "./node_modules/aws-amplify/lib/index.js"); var auth_service_1 = __webpack_require__(/*! ../auth/auth.service */ "./src/app/auth/auth.service.ts"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); /** * A server used to mock a paged data result from a server */ var AccountService = /** @class */ (function () { function AccountService(auth, toastr) { this.auth = auth; this.toastr = toastr; } /** * A method that mocks a paged server response * @param page The selected page * @returns {any} An observable containing the employee data */ AccountService.prototype.getResults = function (page, search) { return rxjs_1.of(this.getPagedData(page, search)); }; AccountService.prototype.getResult = function (page, search) { var _this = this; var pagedData = new paged_data_1.PagedData(); var apiName = 'api_node_1'; var path = "accounts?email=" + search + "&limit=" + page.size + "&offset=" + page.pageNumber * page.size; var myInit = { headers: {}, response: true, queryStringParameters: {} }; var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { var data = response.data; if (data.response_code == 200) { page.totalElements = data.data.count; page.totalPages = page.totalElements / page.size; var start = page.pageNumber * page.size; var end = Math.min((start + page.size), page.totalElements); pagedData.page = page; pagedData.data = data.data.data; resolve(pagedData); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { _this.toastr.error('Error in invoiking API:' + error); reject(error); }); }); // end promoise return promise; }; // end getresult /** * Package companyData into a PagedData object based on the selected Page * @param page The page data used to get the selected data from companyData * @returns {PagedData} An array of the selected data and page */ AccountService.prototype.getPagedData = function (page, search) { var pagedData = new paged_data_1.PagedData(); var apiName = 'api'; var path = "workers?search=" + search + "&limit=" + page.size + "&offsert=" + page.pageNumber * page.size; var myInit = { headers: {}, response: true, queryStringParameters: {} }; aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { var data = response.data; page.totalElements = data.count; page.totalPages = page.totalElements / page.size; var start = page.pageNumber * page.size; var end = Math.min((start + page.size), page.totalElements); pagedData.data = data.data; }) .catch(function (error) { console.log('Error in invoiking API:' + error); }); pagedData.page = page; return pagedData; }; AccountService.prototype.saveAccount = function (form) { var _this = this; var apiName = 'api'; var path = "accounts"; var myInit = { body: form, headers: {} }; var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.post(apiName, path, myInit) .then(function (response) { var data = response; if (data.response_code == 200) { resolve(data.data); } else { _this.toastr.error(data.message); } }) .catch(function (error) { _this.toastr.error(error); reject(error); }); }); // end promoise return promise; }; AccountService.prototype.saveCustomer = function (form) { var _this = this; var apiName = 'api_node_2'; var path = "accounts/user"; var myInit = { body: form, headers: {} }; var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.post(apiName, path, myInit) .then(function (response) { var data = response; if (data.response_code == 200) { resolve(data.data); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { _this.toastr.error(error); reject(error); }); }); // end promoise return promise; }; AccountService = __decorate([ core_1.Injectable(), __metadata("design:paramtypes", [auth_service_1.AuthService, ngx_toastr_1.ToastrService]) ], AccountService); return AccountService; }()); exports.AccountService = AccountService; /***/ }), /***/ "./src/app/services/agent.service.ts": /*!*******************************************!*\ !*** ./src/app/services/agent.service.ts ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var core_2 = __webpack_require__(/*! @ngx-loading-bar/core */ "./node_modules/@ngx-loading-bar/core/fesm5/ngx-loading-bar-core.js"); var aws_amplify_1 = __webpack_require__(/*! aws-amplify */ "./node_modules/aws-amplify/lib/index.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var AgentService = /** @class */ (function () { function AgentService(loader, toastr) { this.loader = loader; this.toastr = toastr; } AgentService.prototype.getAgents = function () { var _this = this; var apiName = 'api_node_1'; var path = "agents"; var myInit = { headers: {}, response: true, queryStringParameters: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response.data; if (data.response_code == 200) { resolve(data.data.data); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { _this.toastr.error(error); reject(error); }); }); // end promoise return promise; }; // end getresult AgentService.prototype.saveAgent = function (model) { var _this = this; var apiName = 'api_node_2'; var path = 'agents'; var myInit = { body: model, headers: {} }; var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.post(apiName, path, myInit) .then(function (response) { var data = response; if (data.response_code == 200) { resolve(data); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { _this.toastr.error(error); reject(error); }); }); // end promoise return promise; }; AgentService = __decorate([ core_1.Injectable({ providedIn: 'root' }), __metadata("design:paramtypes", [core_2.LoadingBarService, ngx_toastr_1.ToastrService]) ], AgentService); return AgentService; }()); exports.AgentService = AgentService; /***/ }), /***/ "./src/app/services/area.service.ts": /*!******************************************!*\ !*** ./src/app/services/area.service.ts ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var core_2 = __webpack_require__(/*! @ngx-loading-bar/core */ "./node_modules/@ngx-loading-bar/core/fesm5/ngx-loading-bar-core.js"); var aws_amplify_1 = __webpack_require__(/*! aws-amplify */ "./node_modules/aws-amplify/lib/index.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var AreaService = /** @class */ (function () { function AreaService(loader, toastr) { this.loader = loader; this.toastr = toastr; } AreaService.prototype.getAreas = function () { var _this = this; var apiName = 'api_node_1'; var path = "areas"; var myInit = { headers: {}, response: true, queryStringParameters: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { var data = response.data; if (data.response_code == 200) { _this.loader.complete(); resolve(data.data.data); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { _this.toastr.error(error); reject(error); }); }); // end promoise return promise; }; // end getresult AreaService.prototype.saveArea = function (model) { var _this = this; var apiName = 'api_node_2'; var path = 'areas'; var myInit = { body: model, headers: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.post(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response; resolve(data); }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; AreaService = __decorate([ core_1.Injectable({ providedIn: 'root' }), __metadata("design:paramtypes", [core_2.LoadingBarService, ngx_toastr_1.ToastrService]) ], AreaService); return AreaService; }()); exports.AreaService = AreaService; /***/ }), /***/ "./src/app/services/google.services.ts": /*!*********************************************!*\ !*** ./src/app/services/google.services.ts ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); var GoogleService = /** @class */ (function () { function GoogleService(_http) { this._http = _http; } GoogleService.prototype.translate = function (obj, key) { return this._http.post(url + key, obj); }; GoogleService = __decorate([ core_1.Injectable(), __metadata("design:paramtypes", [http_1.HttpClient]) ], GoogleService); return GoogleService; }()); exports.GoogleService = GoogleService; var url = "https://translation.googleapis.com/language/translate/v2?key=AIzaSyDa1UayxKz_79DUT2nmE2wHAuBwGdZVL3Y&source=en&target=ar&q="; // Muhimma Admin Account // const url = 'https://translation.googleapis.com/language/translate/v2?key=AIzaSyDP8ctBV6hZ-3zSmr7enXzQTHn5jFd_guc&source=en&target=ar&q='; var GoogleObj = /** @class */ (function () { function GoogleObj() { this.source = "en"; this.target = "ar"; this.format = "text"; } return GoogleObj; }()); exports.GoogleObj = GoogleObj; /***/ }), /***/ "./src/app/services/jQuery.service.ts": /*!********************************************!*\ !*** ./src/app/services/jQuery.service.ts ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); exports.JQ_TOKEN = new core_1.InjectionToken('jQuery'); /***/ }), /***/ "./src/app/services/loader.service.ts": /*!********************************************!*\ !*** ./src/app/services/loader.service.ts ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js"); var LoaderService = /** @class */ (function () { function LoaderService() { this.isLoading = new rxjs_1.BehaviorSubject(false); } LoaderService = __decorate([ core_1.Injectable({ providedIn: 'root' }), __metadata("design:paramtypes", []) ], LoaderService); return LoaderService; }()); exports.LoaderService = LoaderService; /***/ }), /***/ "./src/app/services/messagingService.ts": /*!**********************************************!*\ !*** ./src/app/services/messagingService.ts ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); var MessagingSevice = /** @class */ (function () { function MessagingSevice(http) { this.http = http; } MessagingSevice.prototype.GetIntercomUser = function (email) { var httpOptions = { headers: new http_1.HttpHeaders({ 'Content-Type': 'application/json', 'Authorization': 'Token dG9rOjA2YzUxMGZkX2JiN2VfNDIzN19iMDVjXzdlYmU2ODIxM2JlNDoxOjA=' }) }; // headers.append('Accepts','application/json'); // headers.append('Authorization', 'Token dG9rOjA2YzUxMGZkX2JiN2VfNDIzN19iMDVjXzdlYmU2ODIxM2JlNDoxOjA='); console.log('HEaders', JSON.stringify(httpOptions)); return this.http.get("https://api.intercom.io/users?email=" + email, httpOptions); }; MessagingSevice = __decorate([ core_1.Injectable(), __metadata("design:paramtypes", [http_1.HttpClient]) ], MessagingSevice); return MessagingSevice; }()); exports.MessagingSevice = MessagingSevice; /***/ }), /***/ "./src/app/services/modalTrigger.directive.ts": /*!****************************************************!*\ !*** ./src/app/services/modalTrigger.directive.ts ***! \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var __param = (this && this.__param) || function (paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var jQuery_service_1 = __webpack_require__(/*! ./jQuery.service */ "./src/app/services/jQuery.service.ts"); var ModalTriggerDirective = /** @class */ (function () { function ModalTriggerDirective(ref, $) { this.$ = $; this.el = ref.nativeElement; } ModalTriggerDirective.prototype.ngOnInit = function () { var _this = this; this.el.addEventListener('click', function (e) { _this.$("#" + _this.modalId).modal({}); }); }; __decorate([ core_1.Input('modal-trigger'), __metadata("design:type", String) ], ModalTriggerDirective.prototype, "modalId", void 0); ModalTriggerDirective = __decorate([ core_1.Directive({ selector: '[modal-trigger]' }), __param(1, core_1.Inject(jQuery_service_1.JQ_TOKEN)), __metadata("design:paramtypes", [core_1.ElementRef, Object]) ], ModalTriggerDirective); return ModalTriggerDirective; }()); exports.ModalTriggerDirective = ModalTriggerDirective; /***/ }), /***/ "./src/app/services/paymentRequestService.ts": /*!***************************************************!*\ !*** ./src/app/services/paymentRequestService.ts ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js"); var paged_data_1 = __webpack_require__(/*! ../model/paged-data */ "./src/app/model/paged-data.ts"); var aws_amplify_1 = __webpack_require__(/*! aws-amplify */ "./node_modules/aws-amplify/lib/index.js"); var auth_service_1 = __webpack_require__(/*! ../auth/auth.service */ "./src/app/auth/auth.service.ts"); /** * A server used to mock a paged data result from a server */ var PaymentRequestService = /** @class */ (function () { function PaymentRequestService(auth) { this.auth = auth; } /** * A method that mocks a paged server response * @param page The selected page * @returns {any} An observable containing the employee data */ PaymentRequestService.prototype.getResults = function (page, search) { return rxjs_1.of(this.getPagedData(page, search)); }; PaymentRequestService.prototype.getResult = function (page, email, status, from, to) { var pagedData = new paged_data_1.PagedData(); var apiName = 'api_node_1'; var s = status ? '&status=' + status : ''; if (page.size === null || page.size === undefined) page.size = 100; var path = "paymentrequests?email=" + email + s + "&limit=" + page.size + "&offset=" + page.pageNumber * page.size; var myInit = { headers: {}, response: true, queryStringParameters: {} }; var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { var data = response.data; page.totalElements = data.count; page.totalPages = page.totalElements / page.size; var start = page.pageNumber * page.size; var end = Math.min((start + page.size), page.totalElements); pagedData.page = page; pagedData.data = data.data; resolve(pagedData); }) .catch(function (error) { console.log('Error in invoiking API:' + error); reject(error); }); }); // end promoise return promise; }; // end getresult PaymentRequestService.prototype.savePaymentRequestForm = function (form) { var apiName = 'api_node_1'; var path = "paymentrequests"; var myInit = { body: form, headers: {} }; var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.put(apiName, path, myInit) .then(function (response) { var data = response.data; resolve('OK'); }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; /** * Package PaymentRequestItem into a PagedData object based on the selected Page * @param page The page data used to get the selected data from PaymentRequestItem * @returns {PagedData} An array of the selected data and page */ PaymentRequestService.prototype.getPagedData = function (page, search) { var pagedData = new paged_data_1.PagedData(); var apiName = 'api_node_1'; var path = "paymentrequests?email=" + search + "&limit=" + page.size + "&offsert=" + page.pageNumber * page.size; var myInit = { headers: {}, response: true, queryStringParameters: {} }; aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { var data = response.data; page.totalElements = data.count; page.totalPages = page.totalElements / page.size; var start = page.pageNumber * page.size; var end = Math.min((start + page.size), page.totalElements); pagedData.data = data.data; }) .catch(function (error) { console.log('Error in invoiking API:' + error); }); pagedData.page = page; return pagedData; }; PaymentRequestService = __decorate([ core_1.Injectable(), __metadata("design:paramtypes", [auth_service_1.AuthService]) ], PaymentRequestService); return PaymentRequestService; }()); exports.PaymentRequestService = PaymentRequestService; /***/ }), /***/ "./src/app/services/projectService.ts": /*!********************************************!*\ !*** ./src/app/services/projectService.ts ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js"); var paged_data_1 = __webpack_require__(/*! ../model/paged-data */ "./src/app/model/paged-data.ts"); var sprint_1 = __webpack_require__(/*! ../model/sprint */ "./src/app/model/sprint.ts"); var api_1 = __webpack_require__(/*! @aws-amplify/api */ "./node_modules/@aws-amplify/api/lib-esm/index.js"); var auth_service_1 = __webpack_require__(/*! ../auth/auth.service */ "./src/app/auth/auth.service.ts"); var core_2 = __webpack_require__(/*! @ngx-loading-bar/core */ "./node_modules/@ngx-loading-bar/core/fesm5/ngx-loading-bar-core.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var ProjectService = /** @class */ (function () { function ProjectService(auth, loader, toastr) { this.auth = auth; this.loader = loader; this.toastr = toastr; } /** * A method that mocks a paged server response * @param page The selected page * @returns {any} An observable containing the employee data */ ProjectService.prototype.getResults = function (page, search) { return rxjs_1.of(this.getPagedData(page, search)); }; ProjectService.prototype.getResult = function (page, email, search, country, account, status) { var _this = this; var pagedData = new paged_data_1.PagedData(); var apiName = 'api_node_1'; var offset = page.pageNumber * (page.size === undefined || page.size === NaN ? 30 : page.size); var path = "sprints?email=" + email + (search ? '&search=' + search : '') + (country ? '&country=' + country : '') + (status ? '&status=' + status : '') + (country ? '&country=' + country : '') + "&limit=" + page.size + "&offset=" + offset; var myInit = { headers: {}, response: true, queryStringParameters: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.get(apiName, path, myInit) .then(function (response) { var data = response.data; page.totalElements = data.count; page.totalPages = page.totalElements / page.size; var start = page.pageNumber * page.size; var end = Math.min((start + page.size), page.totalElements); pagedData.page = page; pagedData.data = data.data; _this.loader.complete(); resolve(pagedData); }) .catch(function (error) { console.log('Error in invoiking API:' + error); reject(error); }); }); // end promoise return promise; }; // end getresult ProjectService.prototype.getPagedData = function (page, search) { var _this = this; var pagedData = new paged_data_1.PagedData(); var apiName = 'api_node_1'; var path = "sprints?email=" + search + "&limit=" + page.size + "&offsert=" + page.pageNumber * page.size; var myInit = { headers: {}, response: true, queryStringParameters: {} }; this.loader.start(); api_1.default.get(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response.data; page.totalElements = data.count; page.totalPages = page.totalElements / page.size; var start = page.pageNumber * page.size; var end = Math.min((start + page.size), page.totalElements); pagedData.data = data.data; }) .catch(function (error) { console.log('Error in invoiking API:' + error); }); pagedData.page = page; return pagedData; }; ProjectService.prototype.getSprint = function (email, id) { var _this = this; var sprint = null; var apiName = 'api_node_1'; var path = "sprint?email=" + email + "&id=" + id; var myInit = { headers: {}, response: true, queryStringParameters: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.get(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var s = response.data; sprint = sprint_1.Convert.toSprint(JSON.stringify(s)); resolve(sprint); }) .catch(function (error) { console.log('Error in invoiking API:' + error); reject(error); }); }); return promise; }; ProjectService.prototype.saveProject = function (sprint) { var _this = this; var apiName = 'api_node_2'; var path = "sprint"; var myInit = { body: sprint, headers: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.post(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response; resolve(data); }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; ProjectService.prototype.saveTargeting = function (target) { var apiName = 'api_node_1'; var path = "sprint/targeting"; var myInit = { body: target, headers: {} }; var promise = new Promise(function (resolve, reject) { api_1.default.post(apiName, path, myInit) .then(function (response) { var data = response; resolve(data); }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; ProjectService.prototype.saveForm = function (model) { var _this = this; var apiName = 'api_node_2'; var path = 'form'; var myInit = { body: model, headers: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.post(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response; resolve(data); }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; ProjectService.prototype.saveQuestion = function (model) { var _this = this; var apiName = 'api_node_2'; var path = 'question'; var myInit = { body: model, headers: {} // }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.post(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response; if (data.response_code == 200) { resolve(data.data); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; ProjectService.prototype.saveTask = function (model) { var _this = this; var apiName = 'api_node_2'; var path = "task"; var myInit = { body: model, headers: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.post(apiName, path, myInit) .then(function (response) { var data = response.data; _this.loader.complete(); resolve('OK'); }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; ProjectService.prototype.saveReward = function (model) { var _this = this; var apiName = 'api_node_2'; var path = "reward"; var myInit = { body: model, headers: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.post(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response.data; resolve('OK'); }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; ProjectService = __decorate([ core_1.Injectable(), __metadata("design:paramtypes", [auth_service_1.AuthService, core_2.LoadingBarService, ngx_toastr_1.ToastrService]) ], ProjectService); return ProjectService; }()); exports.ProjectService = ProjectService; /***/ }), /***/ "./src/app/services/report.service.ts": /*!********************************************!*\ !*** ./src/app/services/report.service.ts ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var core_2 = __webpack_require__(/*! @ngx-loading-bar/core */ "./node_modules/@ngx-loading-bar/core/fesm5/ngx-loading-bar-core.js"); var aws_amplify_1 = __webpack_require__(/*! aws-amplify */ "./node_modules/aws-amplify/lib/index.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var ReportService = /** @class */ (function () { function ReportService(loader, toastr) { this.loader = loader; this.toastr = toastr; } ReportService.prototype.getReports = function (project, status, search) { var apiName = 'api_node_1'; var path = "reports?1=1" + (project ? '&project=' + project : '') + (search ? '&r=' + search : '') + (status ? '&status=' + status : ''); var myInit = { headers: {}, response: true, queryStringParameters: {} }; var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { //sprint = Convert.toSprint(JSON.stringify(response.data.data[0])); resolve(response.data); }) .catch(function (error) { console.log('Error in invoiking API:' + error); reject(error); }); }); return promise; }; ReportService.prototype.saveReport = function (model) { var _this = this; var apiName = 'api_node_2'; var path = "report"; var myInit = { body: model, headers: {} }; var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.post(apiName, path, myInit) .then(function (response) { var data = response.data; if (data.response_code == 200) { resolve(data.data); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { _this.toastr.error(error); reject(error); }); }); // end promoise return promise; }; ReportService = __decorate([ core_1.Injectable({ providedIn: 'root' }), __metadata("design:paramtypes", [core_2.LoadingBarService, ngx_toastr_1.ToastrService]) ], ReportService); return ReportService; }()); exports.ReportService = ReportService; /***/ }), /***/ "./src/app/services/setting.service.ts": /*!*********************************************!*\ !*** ./src/app/services/setting.service.ts ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var core_2 = __webpack_require__(/*! @ngx-loading-bar/core */ "./node_modules/@ngx-loading-bar/core/fesm5/ngx-loading-bar-core.js"); var aws_amplify_1 = __webpack_require__(/*! aws-amplify */ "./node_modules/aws-amplify/lib/index.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var SettingService = /** @class */ (function () { function SettingService(loader, toastr) { this.loader = loader; this.toastr = toastr; } SettingService.prototype.saveSetting = function (model) { var _this = this; var apiName = "api_node_2"; var path = "settings/admin"; var myInit = { body: model, headers: {}, response: true, queryStringParameters: {}, }; this.loader.start(); var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.post(apiName, path, myInit) .then(function (response) { _this.loader.complete(); if (response.data.response_code == 200) { resolve(response.data.data); } else { return _this.toastr.error(response.data.message); } }) .catch(function (error) { _this.toastr.error(error); reject(error); }); }); // end promoise return promise; }; SettingService.prototype.getSettings = function () { var _this = this; var apiName = "api_node_1"; var path = "settings/admin"; var myInit = { headers: {}, response: true, queryStringParameters: {}, }; this.loader.start(); var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response.data; if (data.response_code == 200) { resolve(data.data.data); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { _this.toastr.error(error); reject(error); }); }); return promise; }; SettingService = __decorate([ core_1.Injectable({ providedIn: "root", }), __metadata("design:paramtypes", [core_2.LoadingBarService, ngx_toastr_1.ToastrService]) ], SettingService); return SettingService; }()); exports.SettingService = SettingService; /***/ }), /***/ "./src/app/services/simpleModal.component.ts": /*!***************************************************!*\ !*** ./src/app/services/simpleModal.component.ts ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var __param = (this && this.__param) || function (paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var jQuery_service_1 = __webpack_require__(/*! ./jQuery.service */ "./src/app/services/jQuery.service.ts"); var SimpleModalComponent = /** @class */ (function () { function SimpleModalComponent($) { this.$ = $; } SimpleModalComponent.prototype.closeModal = function () { if (this.closeOnBodyClick.toLocaleLowerCase() === "true") { console.log(this.$); this.$(this.containerEl.nativeElement).modal('hide'); } }; __decorate([ core_1.Input(), __metadata("design:type", String) ], SimpleModalComponent.prototype, "title", void 0); __decorate([ core_1.Input(), __metadata("design:type", String) ], SimpleModalComponent.prototype, "elementId", void 0); __decorate([ core_1.Input(), __metadata("design:type", String) ], SimpleModalComponent.prototype, "closeOnBodyClick", void 0); __decorate([ core_1.ViewChild('modalcontainer'), __metadata("design:type", core_1.ElementRef) ], SimpleModalComponent.prototype, "containerEl", void 0); SimpleModalComponent = __decorate([ core_1.Component({ selector: 'simple-modal', template: "\n
    \n
    \n
    \n
    \n

    {{title}}

    \n \n\n
    \n
    \n \n
    \n
    \n
    \n
    \n ", styles: ["\n .modal-body { overflow-y: scroll; }\n "] }), __param(0, core_1.Inject(jQuery_service_1.JQ_TOKEN)), __metadata("design:paramtypes", [Object]) ], SimpleModalComponent); return SimpleModalComponent; }()); exports.SimpleModalComponent = SimpleModalComponent; /***/ }), /***/ "./src/app/services/submissionService.ts": /*!***********************************************!*\ !*** ./src/app/services/submissionService.ts ***! \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var paged_data_1 = __webpack_require__(/*! ../model/paged-data */ "./src/app/model/paged-data.ts"); var aws_amplify_1 = __webpack_require__(/*! aws-amplify */ "./node_modules/aws-amplify/lib/index.js"); var auth_service_1 = __webpack_require__(/*! ../auth/auth.service */ "./src/app/auth/auth.service.ts"); var core_2 = __webpack_require__(/*! @ngx-loading-bar/core */ "./node_modules/@ngx-loading-bar/core/fesm5/ngx-loading-bar-core.js"); /** * A server used to mock a paged data result from a server */ var SubmissionService = /** @class */ (function () { function SubmissionService(auth, loader) { this.auth = auth; this.loader = loader; } /** * A method that mocks a paged server response * @param page The selected page * @returns {any} An observable containing the employee data */ // public getResults(page: Page, email: string, worker_id: number, status:number, type: number ): Observable> { // return of(this.getPagedData(page, email, worker_id, status, type)); // } SubmissionService.prototype.getById = function (email, id) { var _this = this; var apiName = 'api'; var path = "submission?email=" + email + "&id=" + id; var myInit = { headers: {}, response: true, queryStringParameters: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { var data = response.data; _this.loader.complete(); resolve(data); }) .catch(function (error) { console.log('Error in invoiking API:' + error); reject(error); }); }); // end promoise return promise; }; SubmissionService.prototype.getResult = function (page, email, worker_id, status, type, project, reportable, from, to) { var _this = this; var pagedData = new paged_data_1.PagedData(); if (page.size === null || page.size === undefined) page.size = 100; var apiName = 'api'; var s = (status ? '&status=' + status : '') + (worker_id ? '&worker=' + worker_id : '') + (project ? '&project=' + project : '') + (reportable ? '&reportable=' + reportable : '') + (from ? '&from=' + from : '') + (to ? '&to=' + to : '') + (type ? '&type=' + type : ''); var path = "submissions?1=1" + s + "&limit=" + page.size + "&offset=" + page.pageNumber * page.size; var myInit = { headers: {}, response: true, queryStringParameters: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { var data = response.data; _this.loader.complete(); page.totalElements = data.count; page.totalPages = page.totalElements / page.size; var start = page.pageNumber * page.size; var end = Math.min((start + page.size), page.totalElements); pagedData.page = page; pagedData.data = data.data; resolve(pagedData); }) .catch(function (error) { console.log('Error in invoiking API:' + error); reject(error); }); }); // end promoise return promise; }; // end getresult // public getTomTomResults(page: Page,worker_id: number, status:number, project: number ): Observable> { // return of(this.getTomtomPagedData(page, worker_id, status, project)); // } SubmissionService.prototype.getTomtomResult = function (page, worker_id, status, project, prod) { var _this = this; var pagedData = new paged_data_1.PagedData(); var apiName = 'api'; var s = (status ? '&status=' + status : '') + (worker_id ? '&worker=' + worker_id : '') + (project ? '&project=' + project : ''); var path = "submissions/tomtom?1=1&prod=" + prod + "&sortorder=desc&sortcolumn=id" + s + "&limit=" + page.size + "&offset=" + page.pageNumber * page.size; var myInit = { headers: {}, response: true, queryStringParameters: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response.data; page.totalElements = data.count; page.totalPages = page.totalElements / page.size; var start = page.pageNumber * page.size; var end = Math.min((start + page.size), page.totalElements); pagedData.page = page; pagedData.data = data.data; resolve(pagedData); }) .catch(function (error) { console.log('Error in invoiking API:' + error); reject(error); }); }); // end promoise return promise; }; SubmissionService.prototype.getNearBy = function (longitude, latitude) { var _this = this; var apiName = 'geo'; var path = "nearby?longitude=" + longitude + "&latitude=" + latitude; var myInit = { headers: {}, response: true, queryStringParameters: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { _this.loader.complete(); resolve(response); }) .catch(function (error) { _this.loader.complete(); console.log('Error in invoiking API:' + error); reject(error); }); }); // end promoise return promise; }; // private getPagedData(page: Page, email: string, worker_id: number, staus:number, type: number ): PagedData { // const pagedData = new PagedData(); // const apiName = 'api'; // let s = (status ? '&status=' + status : '') + (worker_id ? '&worker='+worker_id: '')+(type ? '&type='+type: ''); // const path = `submissions?email=${email}${s}&limit=${page.size}&offset=${page.pageNumber * page.size}`; const myInit = { // headers: {}, // OPTIONAL // response: true, // OPTIONAL (return the entire Axios response object instead of only response.data) // queryStringParameters: {} // }; // API.get(apiName, path, myInit) // .then(response => { // const data = response.data; // page.totalElements = data.count; // page.totalPages = page.totalElements / page.size; // const start = page.pageNumber * page.size; // const end = Math.min((start + page.size), page.totalElements); // pagedData.data = data.data; // }) // .catch(error => { // console.log('Error in invoiking API:' + error); // }); // pagedData.page = page; // return pagedData; // } SubmissionService.prototype.saveSubmissions = function (form) { var _this = this; var apiName = 'api_node_1'; var path = "submissions"; var myInit = { body: form, headers: {} }; var promise = new Promise(function (resolve, reject) { _this.loader.start(); aws_amplify_1.API.post(apiName, path, myInit) .then(function (response) { var data = response.data; _this.loader.complete(); resolve('OK'); }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; SubmissionService.prototype.saveTomtomSubmissions = function (form, prod) { var _this = this; var apiName = 'api'; var path = "submissions/tomtom/submissions?prod=" + prod; var myInit = { body: form, headers: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.post(apiName, path, myInit) .then(function (response) { var data = response.data; _this.loader.complete(); resolve('OK'); }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; SubmissionService.prototype.saveTomtomSubmission = function (id, status, agent_id, message, long, lat, name, namear, categoryid, subcategory, brand, openinghours, prod) { var _this = this; name = name.replace('\'', ''); if (namear === null) namear = ''; namear = namear.replace('\'', ''); var apiName = 'api'; var path = "submissions/tomtom?submission_id=" + id + "&agent=" + agent_id + "&categoryid=" + categoryid + "&status=" + status + "&message=" + message + "&longitude=" + long + "&latitude=" + lat + "&longitude=" + long + "&name=" + name + "&namear=" + namear + "&telephone=" + subcategory + "&website=" + brand + "&openinghours=" + openinghours + "&prod=" + prod; var myInit = { // body: form, headers: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.post(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response.data; resolve('OK'); }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; SubmissionService.prototype.saveSubmission = function (id, agent_id, status) { var _this = this; var apiName = 'api'; var path = "submission?submission=" + id + "&agent=" + agent_id + "&status=" + status; var myInit = { // body: form, headers: {} }; var promise = new Promise(function (resolve, reject) { _this.loader.start(); aws_amplify_1.API.put(apiName, path, myInit) .then(function (response) { var data = response.data; _this.loader.complete(); resolve('OK'); }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; SubmissionService = __decorate([ core_1.Injectable(), __metadata("design:paramtypes", [auth_service_1.AuthService, core_2.LoadingBarService]) ], SubmissionService); return SubmissionService; }()); exports.SubmissionService = SubmissionService; /***/ }), /***/ "./src/app/services/tag.service.ts": /*!*****************************************!*\ !*** ./src/app/services/tag.service.ts ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var aws_amplify_1 = __webpack_require__(/*! aws-amplify */ "./node_modules/aws-amplify/lib/index.js"); var core_2 = __webpack_require__(/*! @ngx-loading-bar/core */ "./node_modules/@ngx-loading-bar/core/fesm5/ngx-loading-bar-core.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var TagService = /** @class */ (function () { function TagService(loader, toastr) { this.loader = loader; this.toastr = toastr; } TagService.prototype.getTags = function () { var _this = this; // const apiName = 'bahrain'; var apiName = 'api_node_2'; var path = "tags"; var myInit = { headers: {}, response: true, queryStringParameters: {} }; var promise = new Promise(function (resolve, reject) { _this.loader.start(); aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response.data; if (data.response_code == 200) { resolve(data.data); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { console.log('Error in invoiking API:' + error); reject(error); }); }); return promise; }; TagService.prototype.getQuestionByTag = function (tags, text) { var _this = this; var apiName = 'geo'; var path = "questions/bytags?tags=" + tags + (text ? '&text=' + text : ''); var myInit = { headers: {}, response: true, queryStringParameters: {} }; var promise = new Promise(function (resolve, reject) { _this.loader.start(); aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { _this.loader.complete(); resolve(response.data); }) .catch(function (error) { console.log('Error in invoiking API:' + error); reject(error); }); }); return promise; }; TagService.prototype.saveTag = function (tag) { var _this = this; // const apiName = 'bahrain'; var apiName = 'api_node_2'; var path = "tags"; var myInit = { body: tag, headers: {} }; var promise = new Promise(function (resolve, reject) { _this.loader.start(); aws_amplify_1.API.post(apiName, path, myInit) .then(function (response) { var data = response.data; resolve('OK'); _this.loader.complete(); }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; TagService = __decorate([ core_1.Injectable({ providedIn: 'root' }), __metadata("design:paramtypes", [core_2.LoadingBarService, ngx_toastr_1.ToastrService]) ], TagService); return TagService; }()); exports.TagService = TagService; /***/ }), /***/ "./src/app/services/toastr.service.ts": /*!********************************************!*\ !*** ./src/app/services/toastr.service.ts ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); exports.TOASTR_TOKEN = new core_1.InjectionToken('toastr'); /***/ }), /***/ "./src/app/services/transactionService.ts": /*!************************************************!*\ !*** ./src/app/services/transactionService.ts ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js"); var paged_data_1 = __webpack_require__(/*! ../model/paged-data */ "./src/app/model/paged-data.ts"); var aws_amplify_1 = __webpack_require__(/*! aws-amplify */ "./node_modules/aws-amplify/lib/index.js"); var auth_service_1 = __webpack_require__(/*! ../auth/auth.service */ "./src/app/auth/auth.service.ts"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); /** * A server used to mock a paged data result from a server */ var TransactionService = /** @class */ (function () { function TransactionService(auth, toastr) { this.auth = auth; this.toastr = toastr; } /** * A method that mocks a paged server response * @param page The selected page * @returns {any} An observable containing the employee data */ TransactionService.prototype.getResults = function (page, email, worker_id, status, type) { return rxjs_1.of(this.getPagedData(page, email, worker_id, status, type)); }; TransactionService.prototype.getResult = function (page, email, worker_id, staus, type) { var _this = this; var pagedData = new paged_data_1.PagedData(); var apiName = 'api_node_1'; var s = (status ? '&status=' + status : '') + (worker_id ? '&worker=' + worker_id : '') + (type ? '&type=' + type : ''); var path = "transactions?email=" + email + s + "&limit=" + page.size + "&offset=" + page.pageNumber * page.size; var myInit = { headers: {}, response: true, queryStringParameters: {} }; var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { var data = response.data; if (data.response_code == 200) { page.totalElements = data.data.count; page.totalPages = page.totalElements / page.size; var start = page.pageNumber * page.size; var end = Math.min((start + page.size), page.totalElements); pagedData.page = page; pagedData.data = data.data.data; resolve(pagedData); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { _this.toastr.error(error); reject(error); }); }); // end promoise return promise; }; // end getresult TransactionService.prototype.saveTransaction = function (form) { var apiName = 'api_node_2'; var path = "transactions"; var myInit = { body: form, headers: {} }; var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.post(apiName, path, myInit) .then(function (response) { var data = response.data; resolve('OK'); }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; /** * Package companyData into a PagedData object based on the selected Page * @param page The page data used to get the selected data from companyData * @returns {PagedData} An array of the selected data and page */ TransactionService.prototype.getPagedData = function (page, email, worker_id, staus, type) { var pagedData = new paged_data_1.PagedData(); var apiName = 'api_node_1'; var s = (status ? '&status=' + status : '') + (worker_id ? '&worker=' + worker_id : '') + (type ? '&type=' + type : ''); var path = "transactions?email=" + email + s + "&limit=" + page.size + "&offset=" + page.pageNumber * page.size; var myInit = { headers: {}, response: true, queryStringParameters: {} }; aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { var data = response.data; page.totalElements = data.count; page.totalPages = page.totalElements / page.size; var start = page.pageNumber * page.size; var end = Math.min((start + page.size), page.totalElements); pagedData.data = data.data; }) .catch(function (error) { console.log('Error in invoiking API:' + error); }); pagedData.page = page; return pagedData; }; TransactionService = __decorate([ core_1.Injectable(), __metadata("design:paramtypes", [auth_service_1.AuthService, ngx_toastr_1.ToastrService]) ], TransactionService); return TransactionService; }()); exports.TransactionService = TransactionService; /***/ }), /***/ "./src/app/services/user.service.ts": /*!******************************************!*\ !*** ./src/app/services/user.service.ts ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var api_1 = __webpack_require__(/*! @aws-amplify/api */ "./node_modules/@aws-amplify/api/lib-esm/index.js"); var core_2 = __webpack_require__(/*! @ngx-loading-bar/core */ "./node_modules/@ngx-loading-bar/core/fesm5/ngx-loading-bar-core.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var environment_1 = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts"); var auth_service_1 = __webpack_require__(/*! ../auth/auth.service */ "./src/app/auth/auth.service.ts"); var UserService = /** @class */ (function () { function UserService(auth, loader, toastr, httpClient) { this.auth = auth; this.loader = loader; this.toastr = toastr; this.httpClient = httpClient; this.User = null; } UserService.prototype.getUser = function (email) { var _this = this; var apiName = "api_node_2"; var path = "user?email=" + email; var myInit = { headers: {}, response: true, queryStringParameters: {}, }; this.loader.start(); var promise = new Promise(function (resolve, reject) { api_1.default.get(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response.data; try { _this.User = data.db[0]; localStorage.setItem("user", JSON.stringify(_this.User)); _this.loader.complete(); } catch (x) { console.log("error in retrieving agent" + x); _this.loader.complete(); } resolve(_this.User); }) .catch(function (error) { _this.loader.start(); console.log("Error in invoiking API:" + error); reject(error); }); }); // end promoise return promise; }; // end getUser UserService.prototype.resetPassword = function (email, newpassword, forWorker) { var _this = this; var apiName = "api_node_2"; var path = "user/reset"; var myInit = { body: { email: email, password: newpassword, worker: forWorker }, headers: {}, }; var promise = new Promise(function (resolve, reject) { api_1.default.post(apiName, path, myInit) .then(function (response) { var data = response; if (data.response_code == 200) { resolve(data); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { _this.toastr.error(error); reject(error); }); }); // end promoise return promise; }; UserService.prototype.toggleUser = function (email, condition, id) { var _this = this; var apiName = "api_node_2"; var path = "user/toggle"; var myInit = { body: { email: email, condition: condition, id: id, }, headers: {}, }; var promise = new Promise(function (resolve, reject) { api_1.default.post(apiName, path, myInit) .then(function (response) { var data = response; if (data.response_code == 200) { resolve(data.data); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { _this.toastr.error(error); reject(error); }); }); // end promoise return promise; }; UserService.prototype.deleteUser = function (id) { var _this = this; var apiName = "api_node_2"; var path = "worker"; var myInit = { body: { id: id, reason_id: 5, is_comment: false, comment: "", }, headers: {}, }; var promise = new Promise(function (resolve, reject) { api_1.default.del(apiName, path, myInit) .then(function (response) { var data = response; if (data.response_code == 200) { resolve(data.data); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { _this.toastr.error(error); reject(error); }); }); return promise; }; UserService.prototype.recoverUser = function (id, email, phone_number) { var _this = this; var apiName = "api_node_2"; // const path = `worker?id=${id}`; var path = "worker"; var myInit = { body: { id: id, email: email, phone_number: phone_number, }, headers: {}, }; var promise = new Promise(function (resolve, reject) { api_1.default.put(apiName, path, myInit) .then(function (response) { var data = response; if (data.response_code == 200) { resolve(data.data); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { _this.toastr.error(error); reject(error); }); }); return promise; }; // public deleteUser( // email: string, // forWorker: bool, // condition: number // ): Promise { // const apiName = "api"; // const path = `user/toggle`; // const myInit = { // body: { email: email, worker: forWorker, condition: condition }, // headers: {}, // }; // const promise = new Promise((resolve, reject) => { // API.post(apiName, path, myInit) // .then((response) => { // const data = response; // resolve(data); // }) // .catch((error) => { // console.log(error.response); // reject(error); // }); // }); // end promoise // return promise; // } UserService.prototype.toggleWorker = function (email, condition) { var apiName = "api_node_2"; var path = "worker/toggle"; var myInit = { body: { email: email, condition: condition }, headers: {}, }; var promise = new Promise(function (resolve, reject) { api_1.default.post(apiName, path, myInit) .then(function (response) { var data = response; resolve(data); }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; UserService.prototype.uploadCsv = function (csv) { // const httpOptions = { // headers: new HttpHeaders({ // "Content-Type": "multipart/form-data", // 'Authorization': 'bNLvlGInFS2Md39PyeiO8amVUhj5Wg' // }) // }; var headers = new http_1.HttpHeaders({ "Content-Type": "multipart/form-data", Authorization: "bNLvlGInFS2Md39PyeiO8amVUhj5Wg", }); // headers.set("Accept", "application/json"); var apiName = environment_1.environment.api_node_2; var path = "worker/bulk-upload"; return this.httpClient.post(apiName + path, csv, { headers: headers }); }; UserService = __decorate([ core_1.Injectable({ providedIn: "root", }), __metadata("design:paramtypes", [auth_service_1.AuthService, core_2.LoadingBarService, ngx_toastr_1.ToastrService, http_1.HttpClient]) ], UserService); return UserService; }()); exports.UserService = UserService; /***/ }), /***/ "./src/app/services/workerService.ts": /*!*******************************************!*\ !*** ./src/app/services/workerService.ts ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js"); var paged_data_1 = __webpack_require__(/*! ../model/paged-data */ "./src/app/model/paged-data.ts"); var aws_amplify_1 = __webpack_require__(/*! aws-amplify */ "./node_modules/aws-amplify/lib/index.js"); var auth_service_1 = __webpack_require__(/*! ../auth/auth.service */ "./src/app/auth/auth.service.ts"); var core_2 = __webpack_require__(/*! @ngx-loading-bar/core */ "./node_modules/@ngx-loading-bar/core/fesm5/ngx-loading-bar-core.js"); var http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); /** * A server used to mock a paged data result from a server */ var WorkerService = /** @class */ (function () { function WorkerService(auth, loader, httpClient, toastr) { this.auth = auth; this.loader = loader; this.httpClient = httpClient; this.toastr = toastr; this._worker = null; } /** * A method that mocks a paged server response * @param page The selected page * @returns {any} An observable containing the employee data */ WorkerService.prototype.getResults = function (page, search) { return rxjs_1.of(this.getPagedData(page, search)); }; WorkerService.prototype.getWorker = function (email, id) { var _this = this; var worker = null; var apiName = 'api_node_1'; var path = "worker/id?email=" + email + "&id=" + id; var myInit = { headers: {}, response: true, queryStringParameters: {} }; var promise = new Promise(function (resolve, reject) { _this.loader.start(); aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { _this.loader.complete(); //worker = Convert.toWorker(JSON.stringify(response.data[0]))[0]; resolve(response.data); }) .catch(function (error) { console.log('Error in invoiking API:' + error); reject(error); }); }); return promise; }; WorkerService.prototype.getWorkerByEmail = function (email) { var _this = this; var worker = null; var apiName = 'api'; var path = "worker?email=" + email; var myInit = { headers: {}, response: true, queryStringParameters: {} }; var promise = new Promise(function (resolve, reject) { _this.loader.start(); aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { _this._worker = response.data; localStorage.setItem('worker', JSON.stringify(_this._worker)); _this.loader.complete(); //worker = Convert.toWorker(JSON.stringify(response.data[0]))[0]; resolve(response.data); }) .catch(function (error) { console.log('Error in invoiking API:' + error); reject(error); }); }); return promise; }; // tslint:disable-next-line:no-shadowed-variable WorkerService.prototype.saveWorker = function (worker, fromPortal) { var _this = this; var apiName = 'api'; var path = "worker/"; var myInit = { body: { 'worker': worker, 'fromPortal': fromPortal }, headers: {}, }; var promise = new Promise(function (resolve, reject) { _this.loader.start(); aws_amplify_1.API.post(apiName, path, myInit) .then(function (response) { var data = response.data; resolve('OK'); _this.loader.complete(); }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; WorkerService.prototype.toggleWorker = function (email, condition) { var apiName = 'api'; var path = condition ? 'user/toggle' : 'user/toggle'; var myInit = { body: { 'email': email, 'condition': condition }, headers: {} }; var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.post(apiName, path, myInit) .then(function (response) { var data = response.data; resolve('OK'); }) .catch(function (error) { console.log(error.response); reject(error); }); }); // end promoise return promise; }; WorkerService.prototype.getResult = function (page, search) { var _this = this; var pagedData = new paged_data_1.PagedData(); var apiName = 'api'; var s = (search === null || search === '' || search === 'null') ? '' : '&search=' + search; var path = "workers?limit=" + page.size + "&offset=" + page.pageNumber * page.size + s; var myInit = { headers: {}, response: true, queryStringParameters: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { var data = response.data; if (data.response_code == 200) { page.totalElements = data.data.count; page.totalPages = page.totalElements / page.size; _this.loader.complete(); var start = page.pageNumber * page.size; var end = Math.min((start + page.size), page.totalElements); pagedData.page = page; pagedData.data = data.data.data; resolve(pagedData); } else { return _this.toastr.error(data.message); } }) .catch(function (error) { _this.toastr.error('Error in invoiking API:' + error); reject(error); }); }); // end promoise return promise; }; // end getresult WorkerService.prototype.getFullSearch = function (page, search, name, email, phone, nationalityid, countryid, cityid, userid, status, agel, agea, workertype, devicename, sortcolumn, sortorder) { var _this = this; var pagedData = new paged_data_1.PagedData(); var apiName = 'api'; var s = (search === null || search === '' || search === 'null') ? '' : '&search=' + search; var al = (agel === null || agel === '' || agel === 'null') ? '' : '&agel=' + agel; var ag = (agea === null || agea === '' || search === 'null') ? '' : '&ageg=' + agea; var n = (name === null || name === '' || name === 'null') ? '' : '&name=' + name; var e = (email === null || email === '' || email === 'null') ? '' : '&email=' + email; var p = (phone === null || phone === '' || phone === 'null') ? '' : '&phone=' + phone; var nat = (nationalityid === null || nationalityid === '' || nationalityid === 'null') ? '' : '&nationalityid=' + nationalityid; var count = (countryid === null || countryid === '' || countryid === 'null') ? '' : '&countryid=' + countryid; var city = (cityid === null || cityid === '' || cityid === 'null') ? '' : '&cityid=' + cityid; var u = (userid === null || userid === '' || userid === 'null') ? '' : '&userid=' + userid; var sts = (status === null || status === '' || status === 'null') ? '' : '&status=' + status; var so = (sortorder === null || sortorder === '' || sortorder === 'null') ? '' : '&sortorder=' + sortorder; var sc = (sortcolumn === null || sortcolumn === '' || sortcolumn === 'null') ? '' : '&sortcolumn=' + sortcolumn; var wt = (workertype === null || workertype === '' || workertype === 'null') ? '' : '&workertype=' + workertype; var dn = (devicename === null || devicename === '' || devicename === 'null') ? '' : '&device_name=' + devicename; var path = "workers/full?limit=" + page.size + "&offset=" + page.pageNumber * page.size + s + al + ag + n + e + p + nat + count + city + u + sts + so + sc + wt; console.log(path); var myInit = { headers: {}, response: true, queryStringParameters: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { var data = response.data; _this.loader.complete(); page.totalElements = data.count; page.totalPages = page.totalElements / page.size; var start = page.pageNumber * page.size; var end = Math.min((start + page.size), page.totalElements); pagedData.page = page; pagedData.data = data.data; resolve(pagedData); }) .catch(function (error) { console.log('Error in invoiking API:' + error); reject(error); }); }); // end promoise return promise; }; // end getresult /** * Package companyData into a PagedData object based on the selected Page * @param page The page data used to get the selected data from companyData * @returns {PagedData} An array of the selected data and page */ WorkerService.prototype.getPagedData = function (page, search) { var _this = this; var pagedData = new paged_data_1.PagedData(); var apiName = 'api'; var path = "workers?search=" + search + "&limit=" + page.size + "&offsert=" + page.pageNumber * page.size; var myInit = { headers: {}, response: true, queryStringParameters: {} }; this.loader.start(); aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { _this.loader.complete(); var data = response.data; page.totalElements = data.count; page.totalPages = page.totalElements / page.size; var start = page.pageNumber * page.size; var end = Math.min((start + page.size), page.totalElements); pagedData.data = data.data; }) .catch(function (error) { console.log('Error in invoiking API:' + error); }); pagedData.page = page; return pagedData; }; WorkerService.prototype.getCompleteResult = function (page, search, isfirsttime) { var _this = this; var pagedData = new paged_data_1.PagedData(); var apiName = 'api'; var s = (search === null || search === '' || search === 'null') ? '' : '&search=' + search; var i = isfirsttime; var path = "workers?limit=" + page.size + "&offset=" + page.pageNumber * page.size + "&isFirstTime=" + i + s; var myInit = { headers: {}, response: true, queryStringParameters: {} }; this.loader.start(); var promise = new Promise(function (resolve, reject) { aws_amplify_1.API.get(apiName, path, myInit) .then(function (response) { var data = response.data; page.totalElements = data.count; page.totalPages = page.totalElements / page.size; _this.loader.complete(); var start = page.pageNumber * page.size; var end = Math.min((start + page.size), page.totalElements); pagedData.page = page; pagedData.data = data.data; resolve(pagedData); }) .catch(function (error) { console.log('Error in invoiking API:' + error); reject(error); }); }); // end promoise return promise; }; // end getresult WorkerService = __decorate([ core_1.Injectable(), __metadata("design:paramtypes", [auth_service_1.AuthService, core_2.LoadingBarService, http_1.HttpClient, ngx_toastr_1.ToastrService]) ], WorkerService); return WorkerService; }()); exports.WorkerService = WorkerService; /***/ }), /***/ "./src/app/settings/settings.component.css": /*!*************************************************!*\ !*** ./src/app/settings/settings.component.css ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/settings/settings.component.html": /*!**************************************************!*\ !*** ./src/app/settings/settings.component.html ***! \**************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\n
    \r\n

    Settings

    \r\n
    \r\n
    \r\n \r\n
    \r\n
    760\">\r\n\r\n \r\n
    \r\n
    \r\n 760\" [data]=\"rows\" style=\"color:white;\"> \r\n \r\n
    \r\n\r\n\r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n Name\r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n English Value\r\n \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n \r\n Arabic Value\r\n \r\n \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n \r\n Created At\r\n \r\n \r\n {{ value | date }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n  Edit\r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    {{ model ? model.name: 'Add new Setting'}}
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n Name is required\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n English Value is required\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n Arabic Value is required\r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n" /***/ }), /***/ "./src/app/settings/settings.component.ts": /*!************************************************!*\ !*** ./src/app/settings/settings.component.ts ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var setting_service_1 = __webpack_require__(/*! ./../services/setting.service */ "./src/app/services/setting.service.ts"); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var SettingsComponent = /** @class */ (function () { function SettingsComponent(settingService, toastr) { this.settingService = settingService; this.toastr = toastr; this.loadingIndicator = true; this.message = ""; this.model = { id: 0, name: "", country_id: null, valuear: "", valueen: "", created_at: new Date(), updated_at: new Date(), is_deleted: false, }; this.temp = []; this.id = 0; this.country = 0; this.innerWidth = 0; this.model = this.GetSetting(0); } SettingsComponent.prototype.ngOnInit = function () { this.innerWidth = window.innerWidth; this.GetSettings(); }; SettingsComponent.prototype.GetSettings = function () { var _this = this; this.settingService .getSettings() .then(function (data) { _this.rows = data; _this.temp = data; _this.settings = data; _this.loadingIndicator = false; }) .catch(function (e) { return _this.toastr.error("Could Not Retrive Settings!"); }); }; SettingsComponent.prototype.filter = function () { var _this = this; this.rows = this.country == 0 ? this.settings : this.settings.filter(function (s) { return s.country_id == _this.country; }); }; SettingsComponent.prototype.GetSetting = function (id) { //console.log(id); if (id === 0) this.model = { id: 0, name: "", country_id: null, valuear: "", valueen: "", created_at: new Date(), updated_at: new Date(), is_deleted: false, }; else this.model = this.rows.find(function (r) { return r.id === id; }); }; SettingsComponent.prototype.postForm = function () { var _this = this; this.settingService .saveSetting(this.model) .then(function (data) { _this.model.id = data["id"]; _this.toastr.success("Saved Successfully!"); }) .catch(function (err) { _this.toastr.error("Error in saving setting"); console.error(err); }); }; SettingsComponent.prototype.updateFilter = function (event) { var val = event.target.value.toLowerCase(); // filter our data var temp = this.temp.filter(function (d) { return d.name.toLowerCase().indexOf(val) !== -1 || !val; }); // update the rows this.rows = temp; }; SettingsComponent = __decorate([ core_1.Component({ selector: "app-settings", template: __webpack_require__(/*! ./settings.component.html */ "./src/app/settings/settings.component.html"), styles: [__webpack_require__(/*! ./settings.component.css */ "./src/app/settings/settings.component.css")], }), __metadata("design:paramtypes", [setting_service_1.SettingService, ngx_toastr_1.ToastrService]) ], SettingsComponent); return SettingsComponent; }()); exports.SettingsComponent = SettingsComponent; /***/ }), /***/ "./src/app/shared/pagination/pagination.component.css": /*!************************************************************!*\ !*** ./src/app/shared/pagination/pagination.component.css ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/shared/pagination/pagination.component.html": /*!*************************************************************!*\ !*** ./src/app/shared/pagination/pagination.component.html ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\r\n" /***/ }), /***/ "./src/app/shared/pagination/pagination.component.ts": /*!***********************************************************!*\ !*** ./src/app/shared/pagination/pagination.component.ts ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js"); var operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js"); var PaginationComponent = /** @class */ (function () { function PaginationComponent() { this._range = 3; this.pageChange = new core_1.EventEmitter(); } PaginationComponent.prototype.ngOnInit = function () { this.getPages(this.offset, this.limit, this.size); }; PaginationComponent.prototype.ngOnChanges = function () { this.getPages(this.offset, this.limit, this.size); console.log({ offset: this.offset, limit: this.limit, size: this.size, _range: this._range, }); }; PaginationComponent.prototype.getCurrentPage = function (offset, limit) { return Math.floor(offset / limit) + 1; }; PaginationComponent.prototype.getTotalPages = function (limit, size) { return Math.ceil(Math.max(size, 1) / Math.max(limit, 1)); }; PaginationComponent.prototype.getPages = function (offset, limit, size) { var _this = this; this.currentPage = this.getCurrentPage(offset, limit); this.totalPages = this.getTotalPages(limit, size); this.pages = rxjs_1.range(-this._range, this._range * 2 + 1).pipe(operators_1.map(function (offset) { return _this.currentPage + offset; }), operators_1.filter(function (page) { return _this.isValidPageNumber(page, _this.totalPages); }), operators_1.toArray()); }; PaginationComponent.prototype.isValidPageNumber = function (page, totalPages) { return page > 0 && page <= totalPages; }; PaginationComponent.prototype.selectPage = function (page, event) { event.preventDefault(); if (this.isValidPageNumber(page, this.totalPages)) { this.pageChange.emit((page - 1) * this.limit); } }; PaginationComponent.prototype.cancelEvent = function (event) { event.preventDefault(); }; __decorate([ core_1.Input(), __metadata("design:type", Number) ], PaginationComponent.prototype, "offset", void 0); __decorate([ core_1.Input(), __metadata("design:type", Number) ], PaginationComponent.prototype, "limit", void 0); __decorate([ core_1.Input(), __metadata("design:type", Number) ], PaginationComponent.prototype, "size", void 0); __decorate([ core_1.Input("range"), __metadata("design:type", Number) ], PaginationComponent.prototype, "_range", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], PaginationComponent.prototype, "pageChange", void 0); PaginationComponent = __decorate([ core_1.Component({ selector: "app-pagination", template: __webpack_require__(/*! ./pagination.component.html */ "./src/app/shared/pagination/pagination.component.html"), styles: [__webpack_require__(/*! ./pagination.component.css */ "./src/app/shared/pagination/pagination.component.css")], }), __metadata("design:paramtypes", []) ], PaginationComponent); return PaginationComponent; }()); exports.PaginationComponent = PaginationComponent; /***/ }), /***/ "./src/app/shared/shared.module.ts": /*!*****************************************!*\ !*** ./src/app/shared/shared.module.ts ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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; }; Object.defineProperty(exports, "__esModule", { value: true }); var common_1 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var pagination_component_1 = __webpack_require__(/*! ./pagination/pagination.component */ "./src/app/shared/pagination/pagination.component.ts"); var SharedModule = /** @class */ (function () { function SharedModule() { } SharedModule = __decorate([ core_1.NgModule({ imports: [common_1.CommonModule], declarations: [pagination_component_1.PaginationComponent], exports: [pagination_component_1.PaginationComponent], }) ], SharedModule); return SharedModule; }()); exports.SharedModule = SharedModule; /***/ }), /***/ "./src/app/signup/signup.component.css": /*!*********************************************!*\ !*** ./src/app/signup/signup.component.css ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\r\n.form-control{\r\n background: #f2f2f2;\r\n box-shadow: none !important;\r\n border: none;\r\n}\r\n\r\n.form-control:focus{\r\n background: #e2e2e2;\r\n}\r\n\r\n.form-control, .btn{ \r\n border-radius: 3px;\r\n}\r\n\r\n.signup-container{\r\n background-color: #e2e2e2;\r\nwidth: 100%;\r\nheight:100%;\r\npadding: 10px;\r\n}\r\n\r\n.signup-form{\r\n width: 50%;\r\n margin: 30px auto;\r\n}\r\n\r\n.signup-form form{\r\n color: #999;\r\n border-radius: 3px;\r\n margin-bottom: 15px;\r\n background: #fff;\r\n box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);\r\n padding: 20px;\r\n \r\n}\r\n\r\n.signup-form h2 {\r\n color: #333;\r\n font-weight: bold;\r\n margin-top: 0;\r\n text-align: center;\r\n}\r\n\r\n.signup-form hr {\r\n margin: 0 -30px 20px;\r\n}\r\n\r\n.signup-form .form-group{\r\n margin-bottom: 20px;\r\n}\r\n\r\n.signup-form input[type=\"checkbox\"]{\r\n margin-top: 3px;\r\n}\r\n\r\n.signup-form .row div:first-child{\r\n padding-right: 10px;\r\n}\r\n\r\n.signup-form .row div:last-child{\r\n padding-left: 10px;\r\n}\r\n\r\n.signup-form .btn{ \r\n font-size: 16px;\r\n font-weight: bold;\r\n background: orange;\r\n border: none;\r\n min-width: 140px;\r\n}\r\n\r\n.signup-form .btn:hover, .signup-form .btn:focus{\r\n background: #2389cd !important;\r\n outline: none;\r\n}\r\n\r\n.signup-form a:hover{\r\n text-decoration: none;\r\n}\r\n\r\n.signup-form form a{\r\n color: orange;\r\n text-decoration: none;\r\n}\r\n\r\n.signup-form form a:hover{\r\n text-decoration: underline;\r\n}\r\n\r\n.signup-form .hint-text {\r\n padding-bottom: 15px;\r\n text-align: center;\r\n}\r\n\r\n.or-seperator {\r\n margin: 25px 0 10px;\r\n text-align: center;\r\n border-top: 1px solid #e0e0e0;\r\n}\r\n\r\n.or-seperator b {\r\n padding: 0 10px;\r\n width: 40px;\r\n height: 40px;\r\n font-size: 16px;\r\n text-align: center;\r\n line-height: 40px;\r\n background: #fff;\r\n display: inline-block;\r\n border: 1px solid #e0e0e0;\r\n border-radius: 50%;\r\n position: relative;\r\n top: -22px;\r\n z-index: 1;\r\n}\r\n\r\n.social-btn .btn {\r\n color: #fff !important;\r\n margin: 10px 0 0 15px;\r\n font-size: 15px;\r\n border-radius: 50px;\r\n font-weight: normal;\r\n border: none;\r\n -webkit-transition: all 0.4s;\r\n transition: all 0.4s;\r\n}\r\n\r\n.social-btn .btn a{\r\n color: #fff !important;\r\n}\r\n\r\n.social-btn .btn:first-child {\r\n margin-left: 0;\r\n}\r\n\r\n.social-btn .btn:hover {\r\n opacity: 0.8;\r\n}\r\n\r\n.social-btn .btn-primary {\r\n background: #507cc0;\r\n}\r\n\r\n.btn-secondary {\r\n background-color: #f2ae6f !important;\r\n}\r\n\r\n.active {\r\n background-color: orange !important; \r\n}" /***/ }), /***/ "./src/app/signup/signup.component.html": /*!**********************************************!*\ !*** ./src/app/signup/signup.component.html ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\n
    \r\n
    \r\n

    Sign Up

    \r\n

    Sign up with your Facebook account or email address

    \r\n\t\t
    \r\n Facebook\r\n
    \r\n
    or
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    Already have an account? Login here
    \r\n\r\n
    \r\n
    \r\n\r\n\r\n\r\n\r\n\r\n
    \r\n\r\n\r\n\r\n\r\n\r\n\r\n
    \r\n
    \r\n

    \r\n \r\n \r\n

    \r\n

    \r\n \r\n \r\n

    \r\n \r\n
    \r\n
    \r\n
    \r\n" /***/ }), /***/ "./src/app/signup/signup.component.ts": /*!********************************************!*\ !*** ./src/app/signup/signup.component.ts ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js"); var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var auth_service_1 = __webpack_require__(/*! ./../auth/auth.service */ "./src/app/auth/auth.service.ts"); var SignupComponent = /** @class */ (function () { function SignupComponent(fb, router, auth) { this.fb = fb; this.router = router; this.auth = auth; } SignupComponent.prototype.ngOnInit = function () { this.initForm(); }; SignupComponent.prototype.initForm = function () { this.signupForm = this.fb.group({ email: ['', forms_1.Validators.required], password: ['', forms_1.Validators.required], phone: ['', forms_1.Validators.required], firstName: ['', forms_1.Validators.required], lastName: ['', forms_1.Validators.required], gender: ['', forms_1.Validators.required], birthDate: ['', forms_1.Validators.required] }); this.confirmationForm = this.fb.group({ email: ['', forms_1.Validators.required], confirmationCode: ['', forms_1.Validators.required] }); }; SignupComponent.prototype.loginWithFacebook = function () { var url = // tslint:disable-next-line:max-line-length 'https://frontendportal.auth.us-east-2.amazoncognito.com/oauth2/authorize?identity_provider=Facebook&redirect_uri=https://localhost:4200&response_type=CODE&client_id=6rkscc08nrb2puv0690hgjhcnm&scope=aws.cognito.signin.user.admin%20email%20openid%20phone%20profile'; window.location.assign(url); }; SignupComponent.prototype.onSubmitSignup = function (value) { var _this = this; console.log(value); var email = value.email, password = value.password, phone = value.phone; this.auth .signUp(email, password, phone, value.birthDate, value.firstName, value.lastName, value.gender) .subscribe(function (result) { _this.successfullySignup = true; }, function (error) { console.log(error); }); }; SignupComponent.prototype.onSubmitConfirmation = function (value) { var _this = this; var email = value.email, confirmationCode = value.confirmationCode; this.auth.confirmSignUp(email, confirmationCode).subscribe(function (result) { _this.router.navigate(['/login']); }, function (error) { console.log(error); }); }; SignupComponent = __decorate([ core_1.Component({ selector: 'app-signup', template: __webpack_require__(/*! ./signup.component.html */ "./src/app/signup/signup.component.html"), styles: [__webpack_require__(/*! ./signup.component.css */ "./src/app/signup/signup.component.css")] }), __metadata("design:paramtypes", [forms_1.FormBuilder, router_1.Router, auth_service_1.AuthService]) ], SignupComponent); return SignupComponent; }()); exports.SignupComponent = SignupComponent; /***/ }), /***/ "./src/app/sortby.pipe.ts": /*!********************************!*\ !*** ./src/app/sortby.pipe.ts ***! \********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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; }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var SortbyPipe = /** @class */ (function () { function SortbyPipe() { } SortbyPipe.prototype.transform = function (value, propertyName) { if (propertyName) return value.sort(function (a, b) { return b[propertyName].localeCompare(a[propertyName]); }); else return value; }; SortbyPipe = __decorate([ core_1.Pipe({ name: 'sortby', pure: true }) ], SortbyPipe); return SortbyPipe; }()); exports.SortbyPipe = SortbyPipe; /***/ }), /***/ "./src/app/tagcloud/tagcloud.component.css": /*!*************************************************!*\ !*** ./src/app/tagcloud/tagcloud.component.css ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "" /***/ }), /***/ "./src/app/tagcloud/tagcloud.component.html": /*!**************************************************!*\ !*** ./src/app/tagcloud/tagcloud.component.html ***! \**************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "

    \r\n tagcloud works!\r\n

    \r\n" /***/ }), /***/ "./src/app/tagcloud/tagcloud.component.ts": /*!************************************************!*\ !*** ./src/app/tagcloud/tagcloud.component.ts ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var TagcloudComponent = /** @class */ (function () { function TagcloudComponent() { } TagcloudComponent.prototype.ngOnInit = function () { }; TagcloudComponent = __decorate([ core_1.Component({ selector: 'app-tagcloud', template: __webpack_require__(/*! ./tagcloud.component.html */ "./src/app/tagcloud/tagcloud.component.html"), styles: [__webpack_require__(/*! ./tagcloud.component.css */ "./src/app/tagcloud/tagcloud.component.css")] }), __metadata("design:paramtypes", []) ], TagcloudComponent); return TagcloudComponent; }()); exports.TagcloudComponent = TagcloudComponent; /***/ }), /***/ "./src/app/tags/tags.component.css": /*!*****************************************!*\ !*** ./src/app/tags/tags.component.css ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".btn-default{\r\n background-color: #6e6e73;\r\n color:white !important;\r\n\r\n}\r\n.btn-default:hover{\r\n background-color: #f79621;\r\n}\r\na{\r\n color: #f79621 !important;\r\n}\r\na:hover{\r\n color: #6e6e73 !important;\r\n text-decoration: none;\r\n}\r\n" /***/ }), /***/ "./src/app/tags/tags.component.html": /*!******************************************!*\ !*** ./src/app/tags/tags.component.html ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n  \r\n
    \r\n
    \r\n
    \r\n

    Query Engine

    \r\n
    \r\n
    \r\n
    \r\n

    \r\n\r\n
    \r\n
    \r\n\r\n\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n Get Questions\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n   \r\n \r\n
    \r\n
    \r\n
    \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n
    #Question
    {{(i+1)}}
    {{question.label}}
    \r\n\r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    {{model.label}}
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n" /***/ }), /***/ "./src/app/tags/tags.component.ts": /*!****************************************!*\ !*** ./src/app/tags/tags.component.ts ***! \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var tag_service_1 = __webpack_require__(/*! ./../services/tag.service */ "./src/app/services/tag.service.ts"); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var BreadCrumb_1 = __webpack_require__(/*! ../model/BreadCrumb */ "./src/app/model/BreadCrumb.ts"); var WordCloud = __webpack_require__(/*! wordcloud */ "./node_modules/wordcloud/src/wordcloud2.js"); //import { CloudOptions, CloudData } from 'angular-tag-cloud-module'; var TagsComponent = /** @class */ (function () { function TagsComponent(_tagService, toastr, activatedRoute, router) { var _this = this; this._tagService = _tagService; this.toastr = toastr; this.activatedRoute = activatedRoute; this.router = router; this.questions = null; this.tags = [{ id: 1, name: "Advertising", taggings_count: 28, "namear": "Advertising", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 2, name: "Automotive", taggings_count: 14, "namear": "Automotive", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 3, name: "Banking", taggings_count: 3, "namear": "Banking", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 4, name: "Beauty & grooming", taggings_count: 14, "namear": "Beauty & grooming", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 5, name: "Brand perception", taggings_count: 34, "namear": "Brand perception", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 6, name: "Charity & Giving", taggings_count: 1, "namear": "Charity & Giving", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 7, name: "Coffee", taggings_count: 3, "namear": "Coffee", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 8, name: "Consumables", taggings_count: 8, "namear": "Consumables", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 9, name: "Demographics", taggings_count: 10, "namear": "Demographics", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 10, name: "Driving Pleasures", taggings_count: 0, "namear": "Driving Pleasures", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 11, name: "Eating", taggings_count: 75, "namear": "Eating", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 12, name: "Ecommerce", taggings_count: 3, "namear": "Ecommerce", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 13, name: "Entertainment", taggings_count: 18, "namear": "Entertainment", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 15, name: "F&B", taggings_count: 36, "namear": "F&B", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 16, name: "Fashion", taggings_count: 28, "namear": "Fashion", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 17, name: "Fitness", taggings_count: 33, "namear": "Fitness", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 18, name: "Health", taggings_count: 43, "namear": "Health", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 19, name: "Holidays", taggings_count: 2, "namear": "Holidays", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 20, name: "Hospitality", taggings_count: 15, "namear": "Hospitality", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 21, name: "Insurance", taggings_count: 15, "namear": "Insurance", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 22, name: "Leisure", taggings_count: 87, "namear": "Leisure", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 23, name: "Lifestyle", taggings_count: 50, "namear": "Lifestyle", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 24, name: "Luxury", taggings_count: 1, "namear": "Luxury", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 25, name: "Malls", taggings_count: 20, "namear": "Malls", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 26, name: "Family", taggings_count: 2, "namear": "Family", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 27, name: "New Year", taggings_count: 0, "namear": "New Year", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 28, name: "Personal", taggings_count: 5, "namear": "Personal", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 29, name: "Personal care", taggings_count: 13, "namear": "Personal care", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 30, name: "Personal Finance", taggings_count: 73, "namear": "Personal Finance", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 31, name: "Personal goals", taggings_count: 0, "namear": "Personal goals", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 32, name: "Personal productivity", taggings_count: 4, "namear": "Personal productivity", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 33, name: "Perspectives", taggings_count: 1, "namear": "Perspectives", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 34, name: "Pets", taggings_count: 24, "namear": "Pets", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 35, name: "Public holidays", taggings_count: 17, "namear": "Public holidays", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 36, name: "Real Estate", taggings_count: 19, "namear": "Real Estate", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 37, name: "Retail", taggings_count: 1, "namear": "Retail", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 38, name: "Services", taggings_count: 18, "namear": "Services", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 39, name: "Shopping", taggings_count: 111, "namear": "Shopping", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 40, name: "Social responsibility", taggings_count: 13, "namear": "Social responsibility", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 41, name: "Spending", taggings_count: 1, "namear": "Spending", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 42, name: "Streaming services", taggings_count: 1, "namear": "Streaming services", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 43, name: "Style & Fashion", taggings_count: 4, "namear": "Style & Fashion", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 44, name: "Taxation", taggings_count: 13, "namear": "Taxation", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 45, name: "Telecom", taggings_count: 12, "namear": "Telecom", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 46, name: "Travel", taggings_count: 21, "namear": "Travel", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 47, name: "Weekend plans", taggings_count: 1, "namear": "Weekend plans", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 48, name: "Weekends", taggings_count: 21, "namear": "Weekends", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 49, name: "Welfare", taggings_count: 2, "namear": "Welfare", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }, { id: 50, name: "Work", taggings_count: 6, "namear": "Work", parent_id: null, dashboard_url: "https://analytics.zoho.com/open-view/1926563000000368108" }]; this.filteredTags = null; this.tagTree = null; this.model = null; this.dashboard_url = null; this.tagids = []; this.id = null; this.text = ''; this.options = { useCheckbox: true }; this.wordData = null; this.wcoptions = { settings: { minFontSize: 10, maxFontSize: 100, }, margin: { top: 10, right: 10, bottom: 10, left: 10 }, labels: true // false to hide hover labels }; this.coptions = { width: 1000, height: 400, overflow: false, }; this.data = null; this.onEvent = function ($event) { //console.log($event.eventName); if ($event.eventName === 'deactivate' || $event.eventName === 'deselect') { var index = _this.tagids.indexOf($event.node.data.id); if (index > -1) { _this.tagids.splice(index, 1); } } //deactivate if ($event.eventName === 'activate' || $event.eventName === 'select') { _this.tagids.push($event.node.data.id); } //deactivate }; //end event this.x = 0; } TagsComponent.prototype.ngOnInit = function () { var _this = this; this.buildBreadCrumb(); this.activatedRoute.queryParams.subscribe(function (params) { _this.id = +_this.activatedRoute.snapshot.paramMap.get('id'); _this.tagids = [_this.id]; _this.getQuestions(); }); this.getData(); }; TagsComponent.prototype.getData = function () { var _this = this; this._tagService.getTags().then(function (data) { _this.tags = data; _this.getWeight(); _this.initCloud(); // this.initCanvas(); // this.tagTree=this.buildTree(this.tags); }); }; TagsComponent.prototype.getWeight = function () { var total = 0; this.tags.forEach(function (t) { return total += t.taggings_count; }); this.tags.forEach(function (t) { return t.weight = Math.ceil(t.taggings_count * 100 / total) + 3; }); }; TagsComponent.prototype.initCloud = function () { var _this = this; this.wordData = []; this.tags.forEach(function (t) { return _this.wordData.push({ text: t.name, size: t.weight * 50 }); }); //, color: '#00FF00' }; TagsComponent.prototype.wordCloudClick = function (item, dimension, event) { var element = document.getElementById('openModal'); element.click(); console.log(element); }; TagsComponent.prototype.initCanvas = function () { var _this = this; var words = []; // console.log(document.getElementById("my_canvas").offsetWidth); this.tags.forEach(function (tag) { return words.push([tag.name, tag.weight, tag.dashboard_url]); }); this.tags.forEach(function (tag) { return console.log(tag.weight, tag.name); }); var cwidth = document.getElementById("my_canvas").offsetWidth; WordCloud(document.getElementById("my_canvas"), { list: words, gridSize: Math.round(16 * cwidth / 1024), weightFactor: function (size) { return Math.pow(size, 2.1) * cwidth / 1024; }, fontFamily: 'Times, serif', rotateRatio: 0.5, rotationSteps: 2, backgroundColor: 'transparent', //origin:[200,50], click: function (data) { _this.dashboard_url = data[2]; console.log(_this.dashboard_url); if (_this.model) { _this.model.label = data[0]; _this.model.id = 998877; } else { _this.model = { files: [], name: '', id: 998877, label: data[0], labelar: data[0], answer_points: 0, position: 0 }; _this.model.label = data[0]; _this.model.id = 998877; } document.getElementById("openModalButton").click(); }, minRotation: 0, maxRotation: 0, shape: 'square', }); }; //since it is max 3 levels then I will keep it simple TagsComponent.prototype.buildTree = function (tags) { var tree = [], mappedArr = {}, arrElem, mappedElem; // First map the nodes of the array to an object -> create a hash table. for (var i = 0, len = tags.length; i < len; i++) { arrElem = tags[i]; mappedArr[arrElem.id] = arrElem; mappedArr[arrElem.id]['children'] = []; } for (var id in mappedArr) { if (mappedArr.hasOwnProperty(id)) { mappedElem = mappedArr[id]; // If the element is not at the root level, add it to its parent array of children. if (mappedElem.parent_id) { mappedArr[mappedElem['parent_id']]['children'].push(mappedElem); } else { tree.push(mappedElem); } } } return tree; }; TagsComponent.prototype.setModel = function (id, name) { if (this.model) { this.model.label = name; this.model.id = id; } else { this.model = { files: [], name: '', id: id, label: name, labelar: name, answer_points: 0, position: 0 }; this.model.label = name; this.model.id = id; } }; TagsComponent.prototype.filterTags = function () { var _this = this; if (!this.tagids || !this.tags) return null; this.filteredTags = this.tags.filter(function (t) { return _this.tagids.indexOf(t.id) > -1; }); }; TagsComponent.prototype.GetURL = function (id) { console.log('Get URL for id', id); if (id < 100) return this.dashboard_url; //https://analytics.zoho.com/open-view/1926563000002529339/3087c5059414b78b1e386f10dcce9c25 return 'https://analytics.zoho.com/open-view/1926563000002529339/3087c5059414b78b1e386f10dcce9c25?zoho_criteria=(question_id=' + id + ' or brother_id=' + id + ')'; }; TagsComponent.prototype.getCount = function () { var _this = this; return this.questions.filter(function (q) { return q.label.indexOf(_this.text) > -1; }).length + ' out of '; }; TagsComponent.prototype.getQuestions = function () { var _this = this; if (this.tagids === null || this.tagids.length === 0) { this.toastr.error('Choose one or more tags'); return; } this.filterTags(); this._tagService.getQuestionByTag(this.tagids, this.text === '' ? null : this.text).then(function (data) { _this.questions = data.data; }); }; TagsComponent.prototype.buildBreadCrumb = function () { //Sprints? Sprint()>Task Forms () this.crumbs = []; this.crumbs.push(new BreadCrumb_1.BreadCrumb('Home', '/')); this.crumbs.push(new BreadCrumb_1.BreadCrumb('Inisghts Clouds', '/tags')); }; TagsComponent.prototype.back = function () { this.router.navigate(['/home']); }; TagsComponent.prototype.getClass = function () { ++this.x; if (this.x % 2 !== 0) return ' btn-info'; else return 'btn-primary'; }; TagsComponent = __decorate([ core_1.Component({ selector: 'app-tags', template: __webpack_require__(/*! ./tags.component.html */ "./src/app/tags/tags.component.html"), styles: [__webpack_require__(/*! ./tags.component.css */ "./src/app/tags/tags.component.css")] }), __metadata("design:paramtypes", [tag_service_1.TagService, ngx_toastr_1.ToastrService, router_1.ActivatedRoute, router_1.Router]) ], TagsComponent); return TagsComponent; }()); exports.TagsComponent = TagsComponent; /***/ }), /***/ "./src/app/tomtom/tomtom.component.css": /*!*********************************************!*\ !*** ./src/app/tomtom/tomtom.component.css ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".agm-map {\r\n height: 600px !important;\r\n}\r\nagm-map {\r\n height: 600px !important;\r\n}\r\n.center{\r\nposition: relative;\r\n top: 50%;\r\n left: 50%;\r\n}\r\n" /***/ }), /***/ "./src/app/tomtom/tomtom.component.html": /*!**********************************************!*\ !*** ./src/app/tomtom/tomtom.component.html ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    0\">\r\n
    \r\n Tasks\r\n  Map
    \r\n
    \r\n
    \r\n
     
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n\r\n \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n

    No data was found! Try different search criteria!

    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    0 && !mapView\">\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    WorkerPhoneEmailNationalityGenderSubmissions
    \r\n \r\n \r\n {{worker.worker}} ({{ worker.worker_id}}){{worker.phone_number}}{{worker.email}}{{worker.nationality}} {{worker.gender}}({{worker.age}})\r\n
    \r\n
    {{worker.submitted}}
    \r\n
    {{worker.accepted}}
    \r\n
    {{worker.rejected}}
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n
    Task Id StatusImageOfficial NameArabic NameTypeNear ByCreated\r\n
    0\">\r\n \r\n  \r\n \r\n
    \r\n
    \r\n
    \r\n {{submission.task.replace('ADD NEW LOCATION POINTS - ','')}}
    \r\n
    {{submission.submission_id}}\r\n
    \r\n
    {{submission.name}}\r\n {{submission.namear}}\r\n {{getCategory(submission.categoryid)}}\r\n \r\n {{submission.nearby}}{{submission.created_at | date:'dd-MM HH:mm'}}\r\n \r\n  \r\n \r\n\r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n
    \r\n
    \r\n
    Location:{{ submission.longitude }},{{submission.latitude}}
    Name:\r\n \r\n
    Image:\r\n \r\n
    Name(AR):\r\n \r\n
    Brand:\r\n \r\n
    Category:\r\n \r\n\r\n
    SubCategory
    \r\n \r\n  \r\n \r\n  \r\n \r\n  \r\n \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    Edit Submission
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    Location:{{ current_submission.longitude }},{{current_submission.latitude}}
    Name:\r\n \r\n
    Name(AR):\r\n \r\n
    Brand:\r\n \r\n
    Category:\r\n \r\n\r\n\r\n
    SubCategory:
    Image:
    \r\n \r\n  \r\n \r\n  \r\n \r\n  \r\n \r\n\r\n
    \r\n
    \r\n
    \r\n

    Invalid Location

    \r\n
    \r\n
    \r\n
    \r\n
    Map\r\n  List
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
    \r\n
    \r\n
    • {{item.name}}
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n" /***/ }), /***/ "./src/app/tomtom/tomtom.component.ts": /*!********************************************!*\ !*** ./src/app/tomtom/tomtom.component.ts ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var submissionService_1 = __webpack_require__(/*! ../services/submissionService */ "./src/app/services/submissionService.ts"); var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); var page_1 = __webpack_require__(/*! ../model/page */ "./src/app/model/page.ts"); var common_1 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); var PaymentRequestForm_1 = __webpack_require__(/*! ../model/PaymentRequestForm */ "./src/app/model/PaymentRequestForm.ts"); var ngx_toastr_1 = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js"); var google_services_1 = __webpack_require__(/*! ../services/google.services */ "./src/app/services/google.services.ts"); //import * as obj from '../../assets/dubai.json'; var TomtomComponent = /** @class */ (function () { function TomtomComponent(submissionService, router, datePipe, toastr, _google) { this.submissionService = submissionService; this.datePipe = datePipe; this.toastr = toastr; this._google = _google; this.projectId = 347; this.geoJsonObject = null; this.workerId = null; this.workers = null; this.ids = []; this.googleObj = new google_services_1.GoogleObj(); this.page = new page_1.Page(); this.selected = []; this.pois = []; this.range = "0"; this.idscommas = null; this.expanded = {}; this.Submission = null; this.previous = 0; this.next = 0; this.status = 1; this.mapView = false; this.reportable = -1; this.newstatus = 2; this.message = ""; this.from = null; this.to = null; this.rows = []; this.valid = true; this.loadingIndicator = true; this.email = 'affan@muhimmaapp.com'; this.submissions = null; this.questionId = 0; this.question = ''; this.answer = ''; this.submissionId = 0; this.poiAnswer = ''; this.submissionIds = []; this.infoWindowOpened = null; this.previous_info_window = null; this.current_submission = null; this.showList = false; this.query = ''; this.subcategoriesfiltered = []; this.projects = [{ "id": 347, "name": "Mapping Project" }, { "id": 338, "name": "PWA Mapping Project" }]; this.subcategories = [{ "id": 7389001, "name": "Unspecified", "parent": "Access Gateway" }, { "id": 7389002, "name": "Airline Access", "parent": "Access Gateway" }, { "id": 7389003, "name": "Station Access", "parent": "Access Gateway" }, { "id": 7389004, "name": "Security Gate", "parent": "Access Gateway" }, { "id": 7305000, "name": "Unspecified", "parent": "Adventure Sports Venue" }, { "id": 7335001, "name": "Unspecified", "parent": "Agriculture Business" }, { "id": 7335002, "name": "Horticulture", "parent": "Agriculture Business" }, { "id": 7335003, "name": "Primary Producer", "parent": "Agriculture Business" }, { "id": 7335004, "name": "Farm", "parent": "Agriculture Business" }, { "id": 7383001, "name": "Unspecified", "parent": "Airport" }, { "id": 7383002, "name": "Public Authority", "parent": "Airport" }, { "id": 7383003, "name": "Private Authority", "parent": "Airport" }, { "id": 7383004, "name": "Military Authority", "parent": "Airport" }, { "id": 7383005, "name": "Airfield", "parent": "Airport" }, { "id": 9902001, "name": "Unspecified", "parent": "Amusement Park" }, { "id": 9902002, "name": "Amusement Arcade", "parent": "Amusement Park" }, { "id": 9902003, "name": "Amusement Park", "parent": "Amusement Park" }, { "id": 9902004, "name": "Amusement Place", "parent": "Amusement Park" }, { "id": 9910001, "name": "Unspecified", "parent": "Automotive Dealer" }, { "id": 9910002, "name": "Car", "parent": "Automotive Dealer" }, { "id": 9910003, "name": "Motorcycle", "parent": "Automotive Dealer" }, { "id": 9910004, "name": "Boat", "parent": "Automotive Dealer" }, { "id": 9910005, "name": "Recreational Vehicles", "parent": "Automotive Dealer" }, { "id": 9910006, "name": "Truck", "parent": "Automotive Dealer" }, { "id": 9910007, "name": "Van", "parent": "Automotive Dealer" }, { "id": 9910008, "name": "Bus", "parent": "Automotive Dealer" }, { "id": 9910009, "name": "ATV/Snowmobile", "parent": "Automotive Dealer" }, { "id": 7328000, "name": "Unspecified", "parent": "Bank" }, { "id": 9357000, "name": "Unspecified", "parent": "Beach" }, { "id": 7378000, "name": "Unspecified", "parent": "Business Park" }, { "id": 9376001, "name": "Unspecified", "parent": "Café/Pub" }, { "id": 9376002, "name": "Café", "parent": "Café/Pub" }, { "id": 9376003, "name": "Pub", "parent": "Café/Pub" }, { "id": 9376004, "name": "Internet Café", "parent": "Café/Pub" }, { "id": 9376005, "name": "Tea House", "parent": "Café/Pub" }, { "id": 9376006, "name": "Coffee Shop", "parent": "Café/Pub" }, { "id": 9376007, "name": "Microbrewery/Beer Garden", "parent": "Café/Pub" }, { "id": 7360001, "name": "Unspecified", "parent": "Camping Ground" }, { "id": 7360002, "name": "Recreational", "parent": "Camping Ground" }, { "id": 7360003, "name": "Caravan Site", "parent": "Camping Ground" }, { "id": 9155001, "name": "Unspecified", "parent": "Car Wash" }, { "id": 9155002, "name": "Car Wash", "parent": "Car Wash" }, { "id": 9155003, "name": "Truck Wash", "parent": "Car Wash" }, { "id": 7397000, "name": "Unspecified", "parent": "Cash Dispenser" }, { "id": 7341000, "name": "Unspecified", "parent": "Casino" }, { "id": 7342001, "name": "Unspecified", "parent": "Cinema" }, { "id": 7342002, "name": "Cinema", "parent": "Cinema" }, { "id": 7342003, "name": "Drive-In Cinema", "parent": "Cinema" }, { "id": 7379000, "name": "Unspecified", "parent": "City Center" }, { "id": 9937001, "name": "Unspecified", "parent": "Club & Association" }, { "id": 9937002, "name": "Beach Club", "parent": "Club & Association" }, { "id": 9937003, "name": "Hockey Club", "parent": "Club & Association" }, { "id": 7377001, "name": "Unspecified", "parent": "College/University" }, { "id": 7377002, "name": "College/University", "parent": "College/University" }, { "id": 7377003, "name": "Junior College/Community College", "parent": "College/University" }, { "id": 9382000, "name": "Unspecified", "parent": "Commercial Building" }, { "id": 7363000, "name": "Unspecified", "parent": "Community Center" }, { "id": 9352001, "name": "Unspecified", "parent": "Company" }, { "id": 9352002, "name": "Service", "parent": "Company" }, { "id": 9352003, "name": "Advertising/Marketing", "parent": "Company" }, { "id": 9352004, "name": "Computer & Data Services", "parent": "Company" }, { "id": 9352005, "name": "Computer Software", "parent": "Company" }, { "id": 9352006, "name": "Diversified Finanacials", "parent": "Company" }, { "id": 9352007, "name": "Insurance", "parent": "Company" }, { "id": 9352008, "name": "Mail/Package/Freight Delivery", "parent": "Company" }, { "id": 9352009, "name": "Real Estate", "parent": "Company" }, { "id": 9352010, "name": "Savings Institution", "parent": "Company" }, { "id": 9352011, "name": "Manufacturing", "parent": "Company" }, { "id": 9352012, "name": "Agricultural Technology", "parent": "Company" }, { "id": 9352013, "name": "Automobile", "parent": "Company" }, { "id": 9352014, "name": "Chemicals", "parent": "Company" }, { "id": 9352015, "name": "Electronics", "parent": "Company" }, { "id": 9352016, "name": "Mechanical Engineering", "parent": "Company" }, { "id": 9352017, "name": "Public Health Technologies", "parent": "Company" }, { "id": 9352018, "name": "Pharmaceuticals", "parent": "Company" }, { "id": 9352019, "name": "Publishing Technologies", "parent": "Company" }, { "id": 9352020, "name": "Tele Communications", "parent": "Company" }, { "id": 9352021, "name": "OEM", "parent": "Company" }, { "id": 9352022, "name": "Tax Services", "parent": "Company" }, { "id": 9352023, "name": "Legal Services", "parent": "Company" }, { "id": 9352024, "name": "Transport", "parent": "Company" }, { "id": 9352025, "name": "Bus Charter & Rentals", "parent": "Company" }, { "id": 9352026, "name": "Taxi, Limousine & Shuttle Service", "parent": "Company" }, { "id": 9352027, "name": "Bus Lines", "parent": "Company" }, { "id": 9352028, "name": "School Bus", "parent": "Company" }, { "id": 9352029, "name": "Cleaning Services", "parent": "Company" }, { "id": 9352030, "name": "Oil & Natural Gas", "parent": "Company" }, { "id": 9352031, "name": "Mining", "parent": "Company" }, { "id": 9352032, "name": "Construction", "parent": "Company" }, { "id": 9352033, "name": "Moving & Storage", "parent": "Company" }, { "id": 9352034, "name": "Airline", "parent": "Company" }, { "id": 9352035, "name": "Bridge & Tunnel Operations", "parent": "Company" }, { "id": 9352036, "name": "Funeral Service & Mortuaries", "parent": "Company" }, { "id": 9352037, "name": "Investment Advisors", "parent": "Company" }, { "id": 9352038, "name": "Equipment Rental", "parent": "Company" }, { "id": 9352039, "name": "Business Services", "parent": "Company" }, { "id": 9352040, "name": "Cable & Telephone", "parent": "Company" }, { "id": 9352041, "name": "Automobile Manufacturing", "parent": "Company" }, { "id": 9352042, "name": "Import/Export and Distribution", "parent": "Company" }, { "id": 9352043, "name": "Catering", "parent": "Company" }, { "id": 9352044, "name": "Home Appliance Repair", "parent": "Company" }, { "id": 9352045, "name": "Animal Shelter", "parent": "Company" }, { "id": 9352046, "name": "Wedding Services", "parent": "Company" }, { "id": 7388000, "name": "Unspecified", "parent": "Courier Drop Box" }, { "id": 9363000, "name": "Unspecified", "parent": "Courthouse" }, { "id": 7319000, "name": "Unspecified", "parent": "Cultural Center" }, { "id": 9374000, "name": "Unspecified", "parent": "Dentist" }, { "id": 7327000, "name": "Unspecified", "parent": "Department Store" }, { "id": 9373001, "name": "Unspecified", "parent": "Doctor" }, { "id": 9373002, "name": "General Practitioner", "parent": "Doctor" }, { "id": 9373003, "name": "Specialist", "parent": "Doctor" }, { "id": 7309000, "name": "Unspecified", "parent": "Electric Vehicle Station" }, { "id": 7365000, "name": "Unspecified", "parent": "Embassy" }, { "id": 7391000, "name": "Unspecified", "parent": "Emergency Medical Service" }, { "id": 9900000, "name": "Unspecified", "parent": "Entertainment" }, { "id": 9920000, "name": "Unspecified", "parent": "Entry Point" }, { "id": 9160001, "name": "Unspecified", "parent": "Exchange" }, { "id": 9160002, "name": "Stock Exchange", "parent": "Exchange" }, { "id": 9160003, "name": "Gold Exchange", "parent": "Exchange" }, { "id": 9160004, "name": "Currency Exchange", "parent": "Exchange" }, { "id": 9377000, "name": "Unspecified", "parent": "Exhibition & Convention Center" }, { "id": 7352000, "name": "Unspecified", "parent": "Ferry Terminal" }, { "id": 7392000, "name": "Unspecified", "parent": "Fire Station/Brigade" }, { "id": 7366000, "name": "Unspecified", "parent": "Frontier Crossing" }, { "id": 8099001, "name": "Unspecified", "parent": "Geographic Feature" }, { "id": 8099002, "name": "Mountain Peak", "parent": "Geographic Feature" }, { "id": 8099003, "name": "Cave", "parent": "Geographic Feature" }, { "id": 8099004, "name": "Ridge", "parent": "Geographic Feature" }, { "id": 8099005, "name": "Dune", "parent": "Geographic Feature" }, { "id": 8099006, "name": "Valley", "parent": "Geographic Feature" }, { "id": 8099007, "name": "Plain/Flat", "parent": "Geographic Feature" }, { "id": 8099008, "name": "Plateau", "parent": "Geographic Feature" }, { "id": 8099009, "name": "Pan", "parent": "Geographic Feature" }, { "id": 8099010, "name": "Well", "parent": "Geographic Feature" }, { "id": 8099011, "name": "Oasis", "parent": "Geographic Feature" }, { "id": 8099012, "name": "Rocks", "parent": "Geographic Feature" }, { "id": 8099013, "name": "Reservoir", "parent": "Geographic Feature" }, { "id": 8099014, "name": "Reef", "parent": "Geographic Feature" }, { "id": 8099015, "name": "Rapids", "parent": "Geographic Feature" }, { "id": 8099016, "name": "Bay", "parent": "Geographic Feature" }, { "id": 8099017, "name": "Cove", "parent": "Geographic Feature" }, { "id": 8099018, "name": "Harbor", "parent": "Geographic Feature" }, { "id": 8099019, "name": "Lagoon", "parent": "Geographic Feature" }, { "id": 8099020, "name": "Cape", "parent": "Geographic Feature" }, { "id": 8099021, "name": "Mineral/Hot Springs", "parent": "Geographic Feature" }, { "id": 8099022, "name": "Island", "parent": "Geographic Feature" }, { "id": 8099023, "name": "Marsh/Swamp/Vlei", "parent": "Geographic Feature" }, { "id": 8099024, "name": "River Crossing", "parent": "Geographic Feature" }, { "id": 8099025, "name": "Hill", "parent": "Geographic Feature" }, { "id": 8099026, "name": "Quarry", "parent": "Geographic Feature" }, { "id": 8099027, "name": "Locale", "parent": "Geographic Feature" }, { "id": 9911000, "name": "Unspecified", "parent": "Golf Course" }, { "id": 7367001, "name": "Unspecified", "parent": "Government Office" }, { "id": 7367002, "name": "Order 9 Area", "parent": "Government Office" }, { "id": 7367003, "name": "Order 8 Area", "parent": "Government Office" }, { "id": 7367004, "name": "Order 7 Area", "parent": "Government Office" }, { "id": 7367005, "name": "Order 6 Area", "parent": "Government Office" }, { "id": 7367006, "name": "Order 5 Area", "parent": "Government Office" }, { "id": 7367007, "name": "Order 4 Area", "parent": "Government Office" }, { "id": 7367008, "name": "Order 3 Area", "parent": "Government Office" }, { "id": 7367009, "name": "Order 2 Area", "parent": "Government Office" }, { "id": 7367010, "name": "Order 1 Area", "parent": "Government Office" }, { "id": 7367011, "name": "National", "parent": "Government Office" }, { "id": 7367012, "name": "Supra National", "parent": "Government Office" }, { "id": 9663001, "name": "Unspecified", "parent": "Health Care Service" }, { "id": 9663002, "name": "Personal Service", "parent": "Health Care Service" }, { "id": 9663003, "name": "Personal Care Facility", "parent": "Health Care Service" }, { "id": 9663004, "name": "Blood Bank", "parent": "Health Care Service" }, { "id": 9663005, "name": "Ambulance Unit", "parent": "Health Care Service" }, { "id": 7308000, "name": "Unspecified", "parent": "Helipad/Helicopter Landing" }, { "id": 7304001, "name": "Unspecified", "parent": "Holiday Rental" }, { "id": 7304002, "name": "Cottage", "parent": "Holiday Rental" }, { "id": 7304003, "name": "Villa", "parent": "Holiday Rental" }, { "id": 7304004, "name": "Bungalow", "parent": "Holiday Rental" }, { "id": 7304005, "name": "Chalet", "parent": "Holiday Rental" }, { "id": 7304006, "name": "Apartment", "parent": "Holiday Rental" }, { "id": 7321001, "name": "Unspecified", "parent": "Hospital/Polyclinic" }, { "id": 7321002, "name": "General", "parent": "Hospital/Polyclinic" }, { "id": 7321003, "name": "Special", "parent": "Hospital/Polyclinic" }, { "id": 7321004, "name": "Hospital of Chinese Medicine", "parent": "Hospital/Polyclinic" }, { "id": 7321005, "name": "Hospital for Women and Children", "parent": "Hospital/Polyclinic" }, { "id": 7314001, "name": "Unspecified", "parent": "Hotel/Motel" }, { "id": 7314002, "name": "Bed & Breakfast & Guest Houses", "parent": "Hotel/Motel" }, { "id": 7314003, "name": "Hotel", "parent": "Hotel/Motel" }, { "id": 7314004, "name": "Hostel", "parent": "Hotel/Motel" }, { "id": 7314005, "name": "Resort", "parent": "Hotel/Motel" }, { "id": 7314006, "name": "Motel", "parent": "Hotel/Motel" }, { "id": 7314007, "name": "Cabins & Lodges", "parent": "Hotel/Motel" }, { "id": 7314008, "name": "Rest Camps", "parent": "Hotel/Motel" }, { "id": 9360000, "name": "Unspecified", "parent": "Ice Skating Rink" }, { "id": 7376001, "name": "Unspecified", "parent": "Important Tourist Attraction" }, { "id": 7376002, "name": "Building", "parent": "Important Tourist Attraction" }, { "id": 7376003, "name": "Monument", "parent": "Important Tourist Attraction" }, { "id": 7376004, "name": "Natural Attraction", "parent": "Important Tourist Attraction" }, { "id": 7376005, "name": "Observatory", "parent": "Important Tourist Attraction" }, { "id": 7376006, "name": "Planetarium", "parent": "Important Tourist Attraction" }, { "id": 7376007, "name": "Dam", "parent": "Important Tourist Attraction" }, { "id": 7376008, "name": "Tunnel", "parent": "Important Tourist Attraction" }, { "id": 7376009, "name": "Tower", "parent": "Important Tourist Attraction" }, { "id": 7376010, "name": "Bridge", "parent": "Important Tourist Attraction" }, { "id": 7376011, "name": "Mausoleum/Grave", "parent": "Important Tourist Attraction" }, { "id": 7376012, "name": "Arch", "parent": "Important Tourist Attraction" }, { "id": 7376013, "name": "Statue", "parent": "Important Tourist Attraction" }, { "id": 7376014, "name": "Water Hole", "parent": "Important Tourist Attraction" }, { "id": 9383000, "name": "Unspecified", "parent": "Industrial Building" }, { "id": 9378001, "name": "Unspecified", "parent": "Leisure Center" }, { "id": 9378002, "name": "Bowling", "parent": "Leisure Center" }, { "id": 9378003, "name": "Dance Studio & School", "parent": "Leisure Center" }, { "id": 9378004, "name": "Flying Club", "parent": "Leisure Center" }, { "id": 9378005, "name": "Sauna, Solarium & Massage", "parent": "Leisure Center" }, { "id": 9378006, "name": "Snooker, Pool & Billiard", "parent": "Leisure Center" }, { "id": 9913000, "name": "Unspecified", "parent": "Library" }, { "id": 9156000, "name": "Unspecified", "parent": "Manufacturing Facility" }, { "id": 7347001, "name": "Unspecified", "parent": "Marina" }, { "id": 7347002, "name": "Marina", "parent": "Marina" }, { "id": 7347003, "name": "Yacht Basin", "parent": "Marina" }, { "id": 7332001, "name": "Unspecified", "parent": "Market" }, { "id": 7332002, "name": "Informal", "parent": "Market" }, { "id": 7332003, "name": "Public", "parent": "Market" }, { "id": 7332004, "name": "Farmers", "parent": "Market" }, { "id": 7332005, "name": "Supermarkets & Hypermarkets", "parent": "Market" }, { "id": 9158000, "name": "Unspecified", "parent": "Media Facility" }, { "id": 9388000, "name": "Unspecified", "parent": "Military Installation" }, { "id": 7368000, "name": "Unspecified", "parent": "Motoring Organization Office" }, { "id": 9935000, "name": "Unspecified", "parent": "Mountain Pass" }, { "id": 7317000, "name": "Unspecified", "parent": "Museum" }, { "id": 9389000, "name": "Unspecified", "parent": "Native Reservation" }, { "id": 9379001, "name": "Unspecified", "parent": "Nightlife" }, { "id": 9379002, "name": "Discotheque", "parent": "Nightlife" }, { "id": 9379003, "name": "Private Club", "parent": "Nightlife" }, { "id": 9379004, "name": "Bar", "parent": "Nightlife" }, { "id": 9379006, "name": "Cocktail Bar", "parent": "Nightlife" }, { "id": 9379007, "name": "Wine Bar", "parent": "Nightlife" }, { "id": 9379008, "name": "Jazz Club", "parent": "Nightlife" }, { "id": 9379009, "name": "Comedy Club", "parent": "Nightlife" }, { "id": 9379010, "name": "Karaoke Club", "parent": "Nightlife" }, { "id": 9152000, "name": "Unspecified", "parent": "Non Governmental Organization" }, { "id": 7369000, "name": "Unspecified", "parent": "Open Parking Area" }, { "id": 9362001, "name": "Unspecified", "parent": "Park and Recreation Area" }, { "id": 9362002, "name": "Battlefield", "parent": "Park and Recreation Area" }, { "id": 9362003, "name": "Cemetery", "parent": "Park and Recreation Area" }, { "id": 9362004, "name": "Historic Site", "parent": "Park and Recreation Area" }, { "id": 9362005, "name": "Historical Park", "parent": "Park and Recreation Area" }, { "id": 9362006, "name": "Lakeshore", "parent": "Park and Recreation Area" }, { "id": 9362007, "name": "Memorial", "parent": "Park and Recreation Area" }, { "id": 9362008, "name": "Park", "parent": "Park and Recreation Area" }, { "id": 9362009, "name": "Parkway", "parent": "Park and Recreation Area" }, { "id": 9362010, "name": "Preserve", "parent": "Park and Recreation Area" }, { "id": 9362011, "name": "Recreation Area", "parent": "Park and Recreation Area" }, { "id": 9362013, "name": "Seashore", "parent": "Park and Recreation Area" }, { "id": 9362014, "name": "Wilderness Area", "parent": "Park and Recreation Area" }, { "id": 9362015, "name": "Forest Area", "parent": "Park and Recreation Area" }, { "id": 9362016, "name": "Fishing & Hunting Area", "parent": "Park and Recreation Area" }, { "id": 9362017, "name": "Fairground", "parent": "Park and Recreation Area" }, { "id": 9362025, "name": "Other Winter Sport", "parent": "Park and Recreation Area" }, { "id": 9362026, "name": "Ski Resort", "parent": "Park and Recreation Area" }, { "id": 9362030, "name": "Natural Attraction", "parent": "Park and Recreation Area" }, { "id": 9362032, "name": "Boat Launching Ramp", "parent": "Park and Recreation Area" }, { "id": 9362033, "name": "Picnic Area", "parent": "Park and Recreation Area" }, { "id": 9362036, "name": "River Scenic Area", "parent": "Park and Recreation Area" }, { "id": 7313000, "name": "Unspecified", "parent": "Parking Garage" }, { "id": 7311000, "name": "Unspecified", "parent": "Petrol Station" }, { "id": 7326000, "name": "Unspecified", "parent": "Pharmacy" }, { "id": 7339001, "name": "Unspecified", "parent": "Place of Worship" }, { "id": 7339002, "name": "Church", "parent": "Place of Worship" }, { "id": 7339003, "name": "Mosque", "parent": "Place of Worship" }, { "id": 7339004, "name": "Synagogue", "parent": "Place of Worship" }, { "id": 7339005, "name": "Temple", "parent": "Place of Worship" }, { "id": 7339006, "name": "Gurudwara", "parent": "Place of Worship" }, { "id": 7339007, "name": "Ashram", "parent": "Place of Worship" }, { "id": 7339008, "name": "Pagoda", "parent": "Place of Worship" }, { "id": 7322001, "name": "Unspecified", "parent": "Police Station" }, { "id": 7322002, "name": "Order 9 Area", "parent": "Police Station" }, { "id": 7322003, "name": "Order 8 Area", "parent": "Police Station" }, { "id": 7322004, "name": "Order 1 Area", "parent": "Police Station" }, { "id": 9159000, "name": "Unspecified", "parent": "Port/Warehouse Facility" }, { "id": 7324001, "name": "Unspecified", "parent": "Post Office" }, { "id": 7324002, "name": "General", "parent": "Post Office" }, { "id": 7324003, "name": "Local", "parent": "Post Office" }, { "id": 9150000, "name": "Unspecified", "parent": "Primary Resource/Utility" }, { "id": 9154000, "name": "Unspecified", "parent": "Prison/Correctional Facility" }, { "id": 9932001, "name": "Unspecified", "parent": "Public Amenity" }, { "id": 9932002, "name": "Passenger Transport Ticket Office", "parent": "Public Amenity" }, { "id": 9932003, "name": "Pedestrian Subway", "parent": "Public Amenity" }, { "id": 9932004, "name": "Public Call Box", "parent": "Public Amenity" }, { "id": 9932005, "name": "Toilet", "parent": "Public Amenity" }, { "id": 9932006, "name": "Road Rescue", "parent": "Public Amenity" }, { "id": 9942001, "name": "Unspecified", "parent": "Public Transport Stop" }, { "id": 9942002, "name": "Bus Stop", "parent": "Public Transport Stop" }, { "id": 9942003, "name": "Taxi Stand", "parent": "Public Transport Stop" }, { "id": 9942004, "name": "Tram Stop", "parent": "Public Transport Stop" }, { "id": 9942005, "name": "Coach Stop", "parent": "Public Transport Stop" }, { "id": 7380001, "name": "Unspecified", "parent": "Railway Station" }, { "id": 7380002, "name": "International", "parent": "Railway Station" }, { "id": 7380003, "name": "National", "parent": "Railway Station" }, { "id": 7380004, "name": "(Sub) Urban", "parent": "Railway Station" }, { "id": 7380005, "name": "Metro", "parent": "Railway Station" }, { "id": 7380006, "name": "Railway Siding", "parent": "Railway Station" }, { "id": 7312000, "name": "Unspecified", "parent": "Rent-a-Car Facility" }, { "id": 9930000, "name": "Unspecified", "parent": "Rent-a-Car Parking" }, { "id": 7310001, "name": "Unspecified", "parent": "Repair Facility" }, { "id": 7310002, "name": "Bodyshops", "parent": "Repair Facility" }, { "id": 7310003, "name": "Car Glass Replacement Shops", "parent": "Repair Facility" }, { "id": 7310004, "name": "General Car Repair & Servicing", "parent": "Repair Facility" }, { "id": 7310005, "name": "Other Repair Shops", "parent": "Repair Facility" }, { "id": 7310006, "name": "Sale & Installation of Car Accessories", "parent": "Repair Facility" }, { "id": 7310007, "name": "Tyre (Tire) Services", "parent": "Repair Facility" }, { "id": 7310008, "name": "Motorcycle Repair", "parent": "Repair Facility" }, { "id": 7310009, "name": "Truck Repair and Service", "parent": "Repair Facility" }, { "id": 9157000, "name": "Unspecified", "parent": "Research Facility" }, { "id": 7303001, "name": "Unspecified", "parent": "Residential Accommodation" }, { "id": 7303002, "name": "Retirement Community", "parent": "Residential Accommodation" }, { "id": 7303003, "name": "Flats/Apartment Complex", "parent": "Residential Accommodation" }, { "id": 7303004, "name": "Residential Estate", "parent": "Residential Accommodation" }, { "id": 7303005, "name": "Townhouse Complex", "parent": "Residential Accommodation" }, { "id": 7303006, "name": "Condominium Complex", "parent": "Residential Accommodation" }, { "id": 7395000, "name": "Unspecified", "parent": "Rest Area" }, { "id": 7315001, "name": "Unspecified", "parent": "Restaurant" }, { "id": 7315002, "name": "African", "parent": "Restaurant" }, { "id": 7315003, "name": "American", "parent": "Restaurant" }, { "id": 7315004, "name": "Austrian", "parent": "Restaurant" }, { "id": 7315005, "name": "Barbecue", "parent": "Restaurant" }, { "id": 7315006, "name": "Belgian", "parent": "Restaurant" }, { "id": 7315007, "name": "Bistro", "parent": "Restaurant" }, { "id": 7315008, "name": "British", "parent": "Restaurant" }, { "id": 7315009, "name": "Californian", "parent": "Restaurant" }, { "id": 7315010, "name": "Canadian", "parent": "Restaurant" }, { "id": 7315011, "name": "Caribbean", "parent": "Restaurant" }, { "id": 7315012, "name": "Chinese", "parent": "Restaurant" }, { "id": 7315013, "name": "Crêperie", "parent": "Restaurant" }, { "id": 7315014, "name": "Dutch", "parent": "Restaurant" }, { "id": 7315015, "name": "Fast Food", "parent": "Restaurant" }, { "id": 7315016, "name": "Filipino", "parent": "Restaurant" }, { "id": 7315017, "name": "French", "parent": "Restaurant" }, { "id": 7315018, "name": "German", "parent": "Restaurant" }, { "id": 7315019, "name": "Greek", "parent": "Restaurant" }, { "id": 7315020, "name": "Grill", "parent": "Restaurant" }, { "id": 7315021, "name": "Hawaiian", "parent": "Restaurant" }, { "id": 7315022, "name": "Hungarian", "parent": "Restaurant" }, { "id": 7315023, "name": "Indian", "parent": "Restaurant" }, { "id": 7315024, "name": "Indonesian", "parent": "Restaurant" }, { "id": 7315025, "name": "Italian", "parent": "Restaurant" }, { "id": 7315026, "name": "Japanese", "parent": "Restaurant" }, { "id": 7315027, "name": "Jewish", "parent": "Restaurant" }, { "id": 7315028, "name": "Korean", "parent": "Restaurant" }, { "id": 7315029, "name": "Latin American", "parent": "Restaurant" }, { "id": 7315030, "name": "Lebanese", "parent": "Restaurant" }, { "id": 7315031, "name": "Maltese", "parent": "Restaurant" }, { "id": 7315032, "name": "Mediterranean", "parent": "Restaurant" }, { "id": 7315033, "name": "Mexican", "parent": "Restaurant" }, { "id": 7315034, "name": "Middle Eastern", "parent": "Restaurant" }, { "id": 7315035, "name": "Oriental", "parent": "Restaurant" }, { "id": 7315036, "name": "Pizza", "parent": "Restaurant" }, { "id": 7315037, "name": "Polish", "parent": "Restaurant" }, { "id": 7315038, "name": "Portuguese", "parent": "Restaurant" }, { "id": 7315039, "name": "Pub Food", "parent": "Restaurant" }, { "id": 7315040, "name": "Russian", "parent": "Restaurant" }, { "id": 7315041, "name": "Roadside", "parent": "Restaurant" }, { "id": 7315042, "name": "Sandwich", "parent": "Restaurant" }, { "id": 7315043, "name": "Seafood", "parent": "Restaurant" }, { "id": 7315044, "name": "Spanish", "parent": "Restaurant" }, { "id": 7315045, "name": "Steak House", "parent": "Restaurant" }, { "id": 7315046, "name": "Surinamese", "parent": "Restaurant" }, { "id": 7315047, "name": "Swiss", "parent": "Restaurant" }, { "id": 7315048, "name": "Thai", "parent": "Restaurant" }, { "id": 7315049, "name": "Turkish", "parent": "Restaurant" }, { "id": 7315050, "name": "Vegetarian", "parent": "Restaurant" }, { "id": 7315051, "name": "Vietnamese", "parent": "Restaurant" }, { "id": 7315052, "name": "Hunan", "parent": "Restaurant" }, { "id": 7315053, "name": "Shandong", "parent": "Restaurant" }, { "id": 7315054, "name": "Guangdong", "parent": "Restaurant" }, { "id": 7315055, "name": "Shanghai", "parent": "Restaurant" }, { "id": 7315056, "name": "Sichuan", "parent": "Restaurant" }, { "id": 7315057, "name": "Dongbei", "parent": "Restaurant" }, { "id": 7315058, "name": "Hot Pot", "parent": "Restaurant" }, { "id": 7315059, "name": "Taiwanese", "parent": "Restaurant" }, { "id": 7315060, "name": "Western & Continental", "parent": "Restaurant" }, { "id": 7315061, "name": "Peruvian", "parent": "Restaurant" }, { "id": 7315062, "name": "Asian (other)", "parent": "Restaurant" }, { "id": 7315063, "name": "Creole-Cajun", "parent": "Restaurant" }, { "id": 7315064, "name": "Soul Food", "parent": "Restaurant" }, { "id": 7315065, "name": "Irish", "parent": "Restaurant" }, { "id": 7315066, "name": "Jamaican", "parent": "Restaurant" }, { "id": 7315067, "name": "Kosher", "parent": "Restaurant" }, { "id": 7315068, "name": "Czech", "parent": "Restaurant" }, { "id": 7315069, "name": "Hamburgers", "parent": "Restaurant" }, { "id": 7315070, "name": "Chicken", "parent": "Restaurant" }, { "id": 7315071, "name": "Fusion", "parent": "Restaurant" }, { "id": 7315072, "name": "Brazilian", "parent": "Restaurant" }, { "id": 7315073, "name": "International", "parent": "Restaurant" }, { "id": 7315074, "name": "Moroccan", "parent": "Restaurant" }, { "id": 7315075, "name": "Organic", "parent": "Restaurant" }, { "id": 7315076, "name": "Tapas", "parent": "Restaurant" }, { "id": 7315078, "name": "Ice Cream Parlor", "parent": "Restaurant" }, { "id": 7315079, "name": "Doughnuts", "parent": "Restaurant" }, { "id": 7315080, "name": "Slovak", "parent": "Restaurant" }, { "id": 7315081, "name": "Afghan", "parent": "Restaurant" }, { "id": 7315082, "name": "Algerian", "parent": "Restaurant" }, { "id": 7315083, "name": "Arabian", "parent": "Restaurant" }, { "id": 7315084, "name": "Argentinean", "parent": "Restaurant" }, { "id": 7315085, "name": "Armenian", "parent": "Restaurant" }, { "id": 7315086, "name": "Australian", "parent": "Restaurant" }, { "id": 7315087, "name": "Basque", "parent": "Restaurant" }, { "id": 7315088, "name": "Bolivian", "parent": "Restaurant" }, { "id": 7315089, "name": "Bosnian", "parent": "Restaurant" }, { "id": 7315090, "name": "Bulgarian", "parent": "Restaurant" }, { "id": 7315091, "name": "Burmese", "parent": "Restaurant" }, { "id": 7315092, "name": "Cambodian", "parent": "Restaurant" }, { "id": 7315093, "name": "Chilean", "parent": "Restaurant" }, { "id": 7315094, "name": "Colombian", "parent": "Restaurant" }, { "id": 7315095, "name": "Corsican", "parent": "Restaurant" }, { "id": 7315096, "name": "Cuban", "parent": "Restaurant" }, { "id": 7315097, "name": "Cypriot", "parent": "Restaurant" }, { "id": 7315098, "name": "Danish", "parent": "Restaurant" }, { "id": 7315099, "name": "Dominican", "parent": "Restaurant" }, { "id": 7315100, "name": "Egyptian", "parent": "Restaurant" }, { "id": 7315101, "name": "English", "parent": "Restaurant" }, { "id": 7315102, "name": "Ethiopian", "parent": "Restaurant" }, { "id": 7315104, "name": "Finnish", "parent": "Restaurant" }, { "id": 7315105, "name": "Iranian", "parent": "Restaurant" }, { "id": 7315106, "name": "Israeli", "parent": "Restaurant" }, { "id": 7315107, "name": "Luxembourgian", "parent": "Restaurant" }, { "id": 7315108, "name": "Maghrib", "parent": "Restaurant" }, { "id": 7315109, "name": "Mauritian", "parent": "Restaurant" }, { "id": 7315110, "name": "Mongolian", "parent": "Restaurant" }, { "id": 7315111, "name": "Nepalese", "parent": "Restaurant" }, { "id": 7315112, "name": "Norwegian", "parent": "Restaurant" }, { "id": 7315113, "name": "Savoyan", "parent": "Restaurant" }, { "id": 7315114, "name": "Scandinavian", "parent": "Restaurant" }, { "id": 7315115, "name": "Scottish", "parent": "Restaurant" }, { "id": 7315116, "name": "Sicilian", "parent": "Restaurant" }, { "id": 7315117, "name": "Slavic", "parent": "Restaurant" }, { "id": 7315118, "name": "Sudanese", "parent": "Restaurant" }, { "id": 7315119, "name": "Swedish", "parent": "Restaurant" }, { "id": 7315120, "name": "Syrian", "parent": "Restaurant" }, { "id": 7315121, "name": "Teppanyakki", "parent": "Restaurant" }, { "id": 7315122, "name": "Tibetan", "parent": "Restaurant" }, { "id": 7315123, "name": "Tunisian", "parent": "Restaurant" }, { "id": 7315124, "name": "Uruguayan", "parent": "Restaurant" }, { "id": 7315125, "name": "Venezuelan", "parent": "Restaurant" }, { "id": 7315126, "name": "Welsh", "parent": "Restaurant" }, { "id": 7315127, "name": "Pakistani", "parent": "Restaurant" }, { "id": 7315129, "name": "Polynesian", "parent": "Restaurant" }, { "id": 7315130, "name": "Provençal", "parent": "Restaurant" }, { "id": 7315131, "name": "Rumanian", "parent": "Restaurant" }, { "id": 7315132, "name": "Erotic", "parent": "Restaurant" }, { "id": 7315133, "name": "Exotic", "parent": "Restaurant" }, { "id": 7315134, "name": "Fondue", "parent": "Restaurant" }, { "id": 7315135, "name": "Macrobiotic", "parent": "Restaurant" }, { "id": 7315136, "name": "Mussels", "parent": "Restaurant" }, { "id": 7315139, "name": "Snacks", "parent": "Restaurant" }, { "id": 7315140, "name": "Soup", "parent": "Restaurant" }, { "id": 7315142, "name": "Buffet", "parent": "Restaurant" }, { "id": 7315143, "name": "Salad Bar", "parent": "Restaurant" }, { "id": 7315145, "name": "Take away", "parent": "Restaurant" }, { "id": 7315146, "name": "Banquet Rooms", "parent": "Restaurant" }, { "id": 7315147, "name": "Cafeterias", "parent": "Restaurant" }, { "id": 7315148, "name": "Sushi", "parent": "Restaurant" }, { "id": 7315149, "name": "Yogurt/Juice Bar", "parent": "Restaurant" }, { "id": 9359000, "name": "Unspecified", "parent": "Restaurant Area" }, { "id": 7337000, "name": "Unspecified", "parent": "Scenic/Panoramic View" }, { "id": 7372001, "name": "Unspecified", "parent": "School" }, { "id": 7372002, "name": "School", "parent": "School" }, { "id": 7372003, "name": "Child Care Facility", "parent": "School" }, { "id": 7372004, "name": "Pre School", "parent": "School" }, { "id": 7372005, "name": "Primary School", "parent": "School" }, { "id": 7372006, "name": "High School", "parent": "School" }, { "id": 7372007, "name": "Senior High School", "parent": "School" }, { "id": 7372008, "name": "Vocational Training", "parent": "School" }, { "id": 7372009, "name": "Technical School", "parent": "School" }, { "id": 7372010, "name": "Language School", "parent": "School" }, { "id": 7372011, "name": "Sport School", "parent": "School" }, { "id": 7372012, "name": "Art School", "parent": "School" }, { "id": 7372013, "name": "Special School", "parent": "School" }, { "id": 7372014, "name": "Middle School", "parent": "School" }, { "id": 7372015, "name": "Culinary School", "parent": "School" }, { "id": 7372016, "name": "Driving School", "parent": "School" }, { "id": 9361001, "name": "Unspecified", "parent": "Shop" }, { "id": 9361002, "name": "Book Shops", "parent": "Shop" }, { "id": 9361003, "name": "CDs, DVD & Videos", "parent": "Shop" }, { "id": 9361004, "name": "Clothing & Accessories: Children", "parent": "Shop" }, { "id": 9361005, "name": "Clothing & Accessories: Footwear & Shoe Repairs", "parent": "Shop" }, { "id": 9361006, "name": "Clothing & Accessories: General", "parent": "Shop" }, { "id": 9361007, "name": "Clothing & Accessories: Men", "parent": "Shop" }, { "id": 9361008, "name": "Clothing & Accessories: Women", "parent": "Shop" }, { "id": 9361009, "name": "Convenience Stores", "parent": "Shop" }, { "id": 9361010, "name": "Dry cleaners", "parent": "Shop" }, { "id": 9361011, "name": "Electrical, Office & IT: Cameras & Photography", "parent": "Shop" }, { "id": 9361012, "name": "Electrical, Office & IT: Computer & Computer Supplies", "parent": "Shop" }, { "id": 9361013, "name": "Electrical, Office & IT: Consumer Electronics", "parent": "Shop" }, { "id": 9361014, "name": "Electrical, Office & IT: Office Equipment", "parent": "Shop" }, { "id": 9361015, "name": "Real Estate Agents", "parent": "Shop" }, { "id": 9361016, "name": "Factory Outlet", "parent": "Shop" }, { "id": 9361017, "name": "Florists", "parent": "Shop" }, { "id": 9361018, "name": "Food & Drinks: Bakers", "parent": "Shop" }, { "id": 9361019, "name": "Food & Drinks: Butchers", "parent": "Shop" }, { "id": 9361020, "name": "Food & Drinks: Fishmongers", "parent": "Shop" }, { "id": 9361021, "name": "Food & Drinks: Food markets", "parent": "Shop" }, { "id": 9361022, "name": "Food & Drinks: Green Grocers", "parent": "Shop" }, { "id": 9361023, "name": "Food & Drinks: Grocers", "parent": "Shop" }, { "id": 9361024, "name": "Food & Drinks: Other Food Shops", "parent": "Shop" }, { "id": 9361025, "name": "Food & Drinks: Wine & Spirits", "parent": "Shop" }, { "id": 9361026, "name": "Gifts, Cards, Novelties & Souvenirs", "parent": "Shop" }, { "id": 9361027, "name": "Hairdressers & Barbers", "parent": "Shop" }, { "id": 9361028, "name": "House & Garden: Carpet/Floor Coverings", "parent": "Shop" }, { "id": 9361029, "name": "House & Garden: Curtains/Textiles", "parent": "Shop" }, { "id": 9361030, "name": "House & Garden: Do-It-Yourself Centers", "parent": "Shop" }, { "id": 9361031, "name": "House & Garden: Furniture & Fittings", "parent": "Shop" }, { "id": 9361032, "name": "House & Garden: Garden Centers & Services", "parent": "Shop" }, { "id": 9361033, "name": "House & Garden: Kitchens & Bathrooms", "parent": "Shop" }, { "id": 9361034, "name": "House & Garden: Lighting", "parent": "Shop" }, { "id": 9361035, "name": "House & Garden: Painting & Decorating", "parent": "Shop" }, { "id": 9361036, "name": "Jewelry, Clocks & Watches", "parent": "Shop" }, { "id": 9361037, "name": "Newsagents & Tobacconists", "parent": "Shop" }, { "id": 9361038, "name": "Opticians", "parent": "Shop" }, { "id": 9361039, "name": "Sports Equipment & Clothing", "parent": "Shop" }, { "id": 9361040, "name": "Toys & Games", "parent": "Shop" }, { "id": 9361041, "name": "Travel Agents", "parent": "Shop" }, { "id": 9361042, "name": "Construction Material & Equipment", "parent": "Shop" }, { "id": 9361043, "name": "Medical Supplies & Equipment", "parent": "Shop" }, { "id": 9361044, "name": "CD/Video Rental", "parent": "Shop" }, { "id": 9361045, "name": "Laundry", "parent": "Shop" }, { "id": 9361046, "name": "Photo Lab/Development", "parent": "Shop" }, { "id": 9361047, "name": "Photocopy", "parent": "Shop" }, { "id": 9361048, "name": "Animal Services", "parent": "Shop" }, { "id": 9361049, "name": "Antique/Art", "parent": "Shop" }, { "id": 9361050, "name": "Beauty Supplies", "parent": "Shop" }, { "id": 9361051, "name": "Drug Store", "parent": "Shop" }, { "id": 9361052, "name": "Electrical Appliance", "parent": "Shop" }, { "id": 9361053, "name": "Hobby/Free Time", "parent": "Shop" }, { "id": 9361054, "name": "Furniture/Home Furnishings", "parent": "Shop" }, { "id": 9361055, "name": "Glassware/Ceramic", "parent": "Shop" }, { "id": 9361056, "name": "Local Specialities", "parent": "Shop" }, { "id": 9361057, "name": "Recycling Shop", "parent": "Shop" }, { "id": 9361058, "name": "Bags & Leatherwear", "parent": "Shop" }, { "id": 9361059, "name": "Musical Instruments", "parent": "Shop" }, { "id": 9361060, "name": "Delicatessen", "parent": "Shop" }, { "id": 9361061, "name": "Specialty Foods", "parent": "Shop" }, { "id": 9361062, "name": "Shopping Service", "parent": "Shop" }, { "id": 9361063, "name": "Retail Outlet", "parent": "Shop" }, { "id": 9361064, "name": "Pet Supplies", "parent": "Shop" }, { "id": 9361065, "name": "Marine Electronic Equipment", "parent": "Shop" }, { "id": 9361066, "name": "Wholesale Clubs", "parent": "Shop" }, { "id": 9361067, "name": "Beauty Salon", "parent": "Shop" }, { "id": 9361068, "name": "Nail Salon", "parent": "Shop" }, { "id": 9361069, "name": "Hardware", "parent": "Shop" }, { "id": 9361070, "name": "Pawn Shop", "parent": "Shop" }, { "id": 9361071, "name": "Lottery Shop", "parent": "Shop" }, { "id": 9361072, "name": "Betting Station", "parent": "Shop" }, { "id": 9361073, "name": "Agricultural Supplies", "parent": "Shop" }, { "id": 9361074, "name": "Stamp Shop", "parent": "Shop" }, { "id": 9361075, "name": "Mobile Phone Shop", "parent": "Shop" }, { "id": 9361076, "name": "Drive Through Bottle Shop", "parent": "Shop" }, { "id": 9361077, "name": "Tailor Shop", "parent": "Shop" }, { "id": 9361078, "name": "Security Products", "parent": "Shop" }, { "id": 9361079, "name": "Clothing & Accessories: Specialty", "parent": "Shop" }, { "id": 9361080, "name": "House & Garden: Glass & Windows", "parent": "Shop" }, { "id": 9361081, "name": "Variety Store", "parent": "Shop" }, { "id": 9361082, "name": "Christmas/Holiday Store", "parent": "Shop" }, { "id": 9361083, "name": "Boating Equipment & Accessories", "parent": "Shop" }, { "id": 7373000, "name": "Unspecified", "parent": "Shopping Center" }, { "id": 7320001, "name": "Unspecified", "parent": "Sports Center" }, { "id": 7320002, "name": "Fitness Club & Center", "parent": "Sports Center" }, { "id": 7320003, "name": "Horse Riding", "parent": "Sports Center" }, { "id": 7320004, "name": "Sports Center", "parent": "Sports Center" }, { "id": 7320005, "name": "Thematic Sport", "parent": "Sports Center" }, { "id": 7320006, "name": "Squash Court", "parent": "Sports Center" }, { "id": 7374001, "name": "Unspecified", "parent": "Stadium" }, { "id": 7374002, "name": "Athletic", "parent": "Stadium" }, { "id": 7374003, "name": "Cricket Ground", "parent": "Stadium" }, { "id": 7374004, "name": "Soccer", "parent": "Stadium" }, { "id": 7374005, "name": "Horse Racing", "parent": "Stadium" }, { "id": 7374006, "name": "Multi-Purpose", "parent": "Stadium" }, { "id": 7374007, "name": "Rugby Ground", "parent": "Stadium" }, { "id": 7374008, "name": "Ice Hockey", "parent": "Stadium" }, { "id": 7374009, "name": "Baseball", "parent": "Stadium" }, { "id": 7374010, "name": "Football", "parent": "Stadium" }, { "id": 7374011, "name": "Motor Sport", "parent": "Stadium" }, { "id": 7374012, "name": "Basketball", "parent": "Stadium" }, { "id": 7374013, "name": "Race Track", "parent": "Stadium" }, { "id": 7374014, "name": "Netball", "parent": "Stadium" }, { "id": 7338000, "name": "Unspecified", "parent": "Swimming Pool" }, { "id": 9369000, "name": "Unspecified", "parent": "Tennis Court" }, { "id": 7318001, "name": "Unspecified", "parent": "Theater" }, { "id": 7318002, "name": "Concert Hall", "parent": "Theater" }, { "id": 7318003, "name": "Music Center", "parent": "Theater" }, { "id": 7318004, "name": "Opera", "parent": "Theater" }, { "id": 7318005, "name": "Theater", "parent": "Theater" }, { "id": 7318006, "name": "Cabaret", "parent": "Theater" }, { "id": 7318007, "name": "Amphitheater", "parent": "Theater" }, { "id": 7318008, "name": "Dinner Theater", "parent": "Theater" }, { "id": 7375000, "name": "Unspecified", "parent": "Toll Gate" }, { "id": 7316000, "name": "Unspecified", "parent": "Tourist Information Office" }, { "id": 7301001, "name": "Unspecified", "parent": "Traffic Service Center" }, { "id": 7301002, "name": "Traffic Control Department", "parent": "Traffic Service Center" }, { "id": 7302001, "name": "Unspecified", "parent": "Trail System" }, { "id": 7302002, "name": "Mountain Bike", "parent": "Trail System" }, { "id": 7302003, "name": "Adventure Vehicle", "parent": "Trail System" }, { "id": 7302004, "name": "Hiking", "parent": "Trail System" }, { "id": 7302005, "name": "Horse Riding", "parent": "Trail System" }, { "id": 7302006, "name": "Rock Climbing", "parent": "Trail System" }, { "id": 9151000, "name": "Unspecified", "parent": "Transport Authority/Vehicle Registration" }, { "id": 7358000, "name": "Unspecified", "parent": "Truck Stop" }, { "id": 9375000, "name": "Unspecified", "parent": "Veterinarian" }, { "id": 9371000, "name": "Unspecified", "parent": "Water Sport" }, { "id": 7359001, "name": "Unspecified", "parent": "Weigh Station" }, { "id": 7359002, "name": "Weigh Station", "parent": "Weigh Station" }, { "id": 7359003, "name": "Weigh Scales", "parent": "Weigh Station" }, { "id": 9153000, "name": "Unspecified", "parent": "Welfare Organization" }, { "id": 7349000, "name": "Unspecified", "parent": "Winery" }, { "id": 9927001, "name": "Unspecified", "parent": "Zoo, Arboreta & Botanical Garden" }, { "id": 9927002, "name": "Arboreta & Botanical Gardens", "parent": "Zoo, Arboreta & Botanical Garden" }, { "id": 9927003, "name": "Zoo", "parent": "Zoo, Arboreta & Botanical Garden" }, { "id": 9927004, "name": "Aquatic Zoo & Marine Park", "parent": "Zoo, Arboreta & Botanical Garden" }, { "id": 9927005, "name": "Wildlife Park", "parent": "Zoo, Arboreta & Botanical Garden" }]; this.categories = []; this.categoriesDev = [{ "id": 12842, "label": "Access Gateway" }, { "id": 12843, "label": "Airport" }, { "id": 12844, "label": "Amusement Park" }, { "id": 12845, "label": "Adventure Sports Venue" }, { "id": 12846, "label": "Automotive Dealer" }, { "id": 12847, "label": "Bank" }, { "id": 12848, "label": "Beach" }, { "id": 12849, "label": "Business Park" }, { "id": 12850, "label": "Café/Pub" }, { "id": 12851, "label": "Car Wash" }, { "id": 12852, "label": "Cash Dispenser" }, { "id": 12853, "label": "Cinema" }, { "id": 12854, "label": "City Center" }, { "id": 12855, "label": "Club & Association" }, { "id": 12856, "label": "College/University" }, { "id": 12857, "label": "Commercial Building" }, { "id": 12858, "label": "Community Center" }, { "id": 12859, "label": "Company" }, { "id": 12860, "label": "Courier Drop Box" }, { "id": 12861, "label": "Courthouse" }, { "id": 12862, "label": "Cultural Center" }, { "id": 12863, "label": "Dentist" }, { "id": 12864, "label": "Department Store" }, { "id": 12865, "label": "Doctor" }, { "id": 12866, "label": "Electric Vehicle Station" }, { "id": 12867, "label": "Embassy" }, { "id": 12868, "label": "Emergency Medical Service" }, { "id": 12869, "label": "Entertainment" }, { "id": 12870, "label": "Entry Point" }, { "id": 12871, "label": "Exchange" }, { "id": 12872, "label": "Exhibition & Convention Center" }, { "id": 12873, "label": "Fire Station/Brigade" }, { "id": 12874, "label": "Geographic Feature" }, { "id": 12875, "label": "Golf Course" }, { "id": 12876, "label": "Government Office" }, { "id": 12877, "label": "Health Care Service" }, { "id": 12878, "label": "Holiday Rental" }, { "id": 12879, "label": "Hospital/Polyclinic" }, { "id": 12880, "label": "Hotel/Motel" }, { "id": 12881, "label": "Ice Skating Rink" }, { "id": 12882, "label": "Important Tourist Attraction" }, { "id": 12883, "label": "Industrial Building" }, { "id": 12884, "label": "Library" }, { "id": 12885, "label": "Manufacturing Facility" }, { "id": 12886, "label": "Marina" }, { "id": 12887, "label": "Market" }, { "id": 12888, "label": "Media Facility" }, { "id": 12889, "label": "Museum" }, { "id": 12890, "label": "Nightlife" }, { "id": 12891, "label": "Non Governmental Organization" }, { "id": 12892, "label": "Open Parking Area" }, { "id": 12893, "label": "Park and Recreation Area" }, { "id": 12894, "label": "Parking Garage" }, { "id": 12895, "label": "Petrol Station" }, { "id": 12896, "label": "Pharmacy" }, { "id": 12897, "label": "Place of Worship" }, { "id": 12898, "label": "Police Station" }, { "id": 12899, "label": "Port/Warehouse Facility" }, { "id": 12900, "label": "Post Office" }, { "id": 12901, "label": "Public Amenity" }, { "id": 12902, "label": "Public Transport Stop" }, { "id": 12903, "label": "Railway Station" }, { "id": 12904, "label": "Rent-a-Car Facility" }, { "id": 12905, "label": "Residential Accommodation" }, { "id": 12906, "label": "Rest Area" }, { "id": 12907, "label": "Restaurant" }, { "id": 12908, "label": "Scenic/Panoramic View" }, { "id": 12909, "label": "School" }, { "id": 12910, "label": "Shop" }, { "id": 12911, "label": "Shopping Center" }, { "id": 12912, "label": "Sports Center" }, { "id": 12913, "label": "Stadium" }, { "id": 12914, "label": "Swimming Pool" }, { "id": 12915, "label": "Tennis Court" }, { "id": 12916, "label": "Theater" }, { "id": 12917, "label": "Toll Gate" }, { "id": 12918, "label": "Tourist Information Office" }, { "id": 12919, "label": "Traffic Service Center" }, { "id": 12920, "label": "Transport Authority/Vehicle Registration" }, { "id": 12921, "label": "Veterinarian" }, { "id": 12922, "label": "Weigh Station" }, { "id": 12923, "label": "Welfare Organization" }, { "id": 12924, "label": "Zoo, Arboreta & Botanical Garden" }, { "id": 12925, "label": "Leisure Center" }]; this.categoriesProd = [{ "id": 12701, "label": "Leisure Center" }, { "id": 12689, "label": "Zoo, Arboreta & Botanical Garden" }, { "id": 12688, "label": "Welfare Organization" }, { "id": 12687, "label": "Weigh Station" }, { "id": 12686, "label": "Veterinarian" }, { "id": 12685, "label": "Transport Authority/Vehicle Registration" }, { "id": 12684, "label": "Traffic Service Center" }, { "id": 12683, "label": "Tourist Information Office" }, { "id": 12682, "label": "Toll Gate" }, { "id": 12681, "label": "Theater" }, { "id": 12680, "label": "Tennis Court" }, { "id": 12679, "label": "Swimming Pool" }, { "id": 12678, "label": "Stadium" }, { "id": 12677, "label": "Sports Center" }, { "id": 12676, "label": "Shopping Center" }, { "id": 12675, "label": "Shop" }, { "id": 12674, "label": "School" }, { "id": 12673, "label": "Scenic/Panoramic View" }, { "id": 12672, "label": "Restaurant" }, { "id": 12671, "label": "Rest Area" }, { "id": 12670, "label": "Residential Accommodation" }, { "id": 12669, "label": "Rent-a-Car Facility" }, { "id": 12668, "label": "Railway Station" }, { "id": 12667, "label": "Public Transport Stop" }, { "id": 12666, "label": "Public Amenity" }, { "id": 12665, "label": "Post Office" }, { "id": 12664, "label": "Port/Warehouse Facility" }, { "id": 12663, "label": "Police Station" }, { "id": 12662, "label": "Place of Worship" }, { "id": 12661, "label": "Pharmacy" }, { "id": 12660, "label": "Petrol Station" }, { "id": 12659, "label": "Parking Garage" }, { "id": 12658, "label": "Park and Recreation Area" }, { "id": 12657, "label": "Open Parking Area" }, { "id": 12656, "label": "Non Governmental Organization" }, { "id": 12655, "label": "Nightlife" }, { "id": 12654, "label": "Museum" }, { "id": 12653, "label": "Media Facility" }, { "id": 12652, "label": "Market" }, { "id": 12651, "label": "Marina" }, { "id": 12650, "label": "Manufacturing Facility" }, { "id": 12649, "label": "Library" }, { "id": 12648, "label": "Industrial Building" }, { "id": 12647, "label": "Important Tourist Attraction" }, { "id": 12646, "label": "Ice Skating Rink" }, { "id": 12645, "label": "Hotel/Motel" }, { "id": 12644, "label": "Hospital/Polyclinic" }, { "id": 12643, "label": "Holiday Rental" }, { "id": 12642, "label": "Health Care Service" }, { "id": 12641, "label": "Government Office" }, { "id": 12640, "label": "Golf Course" }, { "id": 12639, "label": "Geographic Feature" }, { "id": 12638, "label": "Fire Station/Brigade" }, { "id": 12637, "label": "Exhibition & Convention Center" }, { "id": 12636, "label": "Exchange" }, { "id": 12635, "label": "Entry Point" }, { "id": 12634, "label": "Entertainment" }, { "id": 12633, "label": "Emergency Medical Service" }, { "id": 12632, "label": "Embassy" }, { "id": 12631, "label": "Electric Vehicle Station" }, { "id": 12630, "label": "Doctor" }, { "id": 12629, "label": "Department Store" }, { "id": 12628, "label": "Dentist" }, { "id": 12627, "label": "Cultural Center" }, { "id": 12626, "label": "Courthouse" }, { "id": 12625, "label": "Courier Drop Box" }, { "id": 12624, "label": "Company" }, { "id": 12623, "label": "Community Center" }, { "id": 12622, "label": "Commercial Building" }, { "id": 12621, "label": "College/University" }, { "id": 12620, "label": "Club & Association" }, { "id": 12619, "label": "City Center" }, { "id": 12618, "label": "Cinema" }, { "id": 12617, "label": "Cash Dispenser" }, { "id": 12616, "label": "Car Wash" }, { "id": 12615, "label": "Cafe/Pub" }, { "id": 12614, "label": "Business Park" }, { "id": 12613, "label": "Beach" }, { "id": 12612, "label": "Bank" }, { "id": 12611, "label": "Automotive Dealer" }, { "id": 12610, "label": "Adventure Sports Venue" }, { "id": 12609, "label": "Amusement Park" }, { "id": 12608, "label": "Airport" }, { "id": 12607, "label": "Access Gateway" }, { "id": 12599, "label": "Restaurant" }, { "id": 12600, "label": "ATM" }, { "id": 12601, "label": "Hospital" }, { "id": 12602, "label": "Other" }, { "id": 12604, "label": "Business Park" }, { "id": 12603, "label": "Beach" }, { "id": 12598, "label": "School" }, { "id": 12597, "label": "Bank" }]; this.geoJsonObject = {}; this.page.pageNumber = 0; this.page.size = 100; } TomtomComponent.prototype.ngOnInit = function () { this.categories = this.projectId === 347 ? this.categoriesProd : this.categoriesDev; this.filter(); }; TomtomComponent.prototype.translate = function (submission) { this.doTranslate(submission.name).then(function (d) { submission.namear = d.toString(); }); submission.name = this.titleCase(submission.name); submission.brand = this.titleCase(submission.brand); return submission; }; TomtomComponent.prototype.getAnswer = function (answers, id) { return answers.find(function (a) { return a.id === id; }).answer; }; TomtomComponent.prototype.getWidthTotals = function (submitted, accepted, rejected, a) { var width = 0; var total = accepted * 1 + rejected * 1 + submitted * 1; if (total === 0) return 0; if (a === 1) width = submitted / total; //; if (a === 2) width = accepted / total; //; if (a === 3) width = rejected / total; //; width = Math.ceil(width * 100); return width; }; TomtomComponent.prototype.close_window = function () { if (this.previous_info_window != null) { this.previous_info_window.close(); } }; TomtomComponent.prototype.select_marker = function (infoWindow, submission) { var _this = this; this.submissionService.getNearBy(submission.longitude, submission.latitude).then(function (data) { _this.valid = data.data.count === 100; _this.pois = data.data.data; }); if (this.previous_info_window == null) this.previous_info_window = infoWindow; else { this.infoWindowOpened = infoWindow; this.previous_info_window.close(); } this.previous_info_window = infoWindow; }; TomtomComponent.prototype.setActive = function (submission) { var _this = this; this.current_submission = this.translate(submission); ; this.submissionService.getNearBy(submission.longitude, submission.latitude).then(function (data) { _this.pois = data.data.data; _this.valid = data.data.count !== 0; }); // this.questionId = questionId; // this.answer = this.getAnswer(submission.answers, questionId); // this.question = submission.answers.find(q => q.id === questionId).label; this.workerId = submission.worker; this.submissionId = submission.submission_id; try { var cat_1 = this.categories.filter(function (cat) { return cat.id === submission.categoryid; }); this.subcategoriesfiltered = this.subcategories.filter(function (su) { return su.parent === cat_1[0].label; }); } catch (error) { } // this.poiAnswer = poiAnswer; }; TomtomComponent.prototype.getStatus = function (status) { if (status === 'Submitted') return 'In Progress'; if (status === 'Accepted' || status === 'Approved') return 'Approved'; if (status === 'Rejected') return 'Rejected'; if (status === '') return 'Completed'; return '' + status + ''; }; TomtomComponent.prototype.getStatusText = function (submission) { var status = submission.status; var text = submission.worker + '(' + submission.worker_id + ')' + ' at: ' + this.datePipe.transform(submission.created_at, 'dd-MM HH:mm'); if (status === 'Submitted') return '' + text + ''; if (status === 'Accepted' || status === 'Approved') return '' + text + ''; if (status === 'Rejected') return '' + text + ''; if (status === '') return '' + text + ''; return '' + status + ''; }; TomtomComponent.prototype.saveSubmission = function (submission) { var _this = this; this.submissionService.saveTomtomSubmission(submission.submission_id, submission.submission_status, 4, '', submission.longitude, submission.latitude, submission.name, submission.namear, submission.categoryid, submission.subcategory, submission.brand, submission.openinghours, this.projectId === 347).then(function (data) { //this.filter(); _this.close_window(); console.log('Saved..' + data); _this.toastr.success('Saved Successfully!'); }); }; TomtomComponent.prototype.setStatus = function (submission, statusId) { submission.submission_status = statusId; this.saveSubmission(submission); }; TomtomComponent.prototype.setStatuses = function (statusId) { var _this = this; var request = new PaymentRequestForm_1.BulkEvaluation(this.submissionIds, statusId, '', 4, 0); this.submissionService.saveTomtomSubmissions(request, this.projectId === 347) .then(function (data) { _this.filter(); console.log('Saved..' + data); _this.toastr.success('Saved Successfully!'); _this.submissionIds = []; }); }; TomtomComponent.prototype.toggleId = function (id) { var index = this.submissionIds.indexOf(id); if (index > -1) { this.submissionIds.splice(index, 1); } else { this.submissionIds.push(id); } }; TomtomComponent.prototype.markerDragEnd = function (submission, $event) { console.log('dragEnd', submission, $event); var index = this.submissions.findIndex(function (s) { return s.submission_id === submission.submission_id; }); if (index > -1) { this.submissions[index].longitude = $event.coords.lng; this.submissions[index].latitude = $event.coords.lat; this.submissions[index].allowSave = true; } }; TomtomComponent.prototype.markerDragEndGreen = function ($event) { var _this = this; console.log('dragEnd', $event); var latitude = $event.coords.lat; var longitude = $event.coords.lng; this.submissionService.getNearBy(longitude, latitude).then(function (data) { _this.pois = data.data.data; }); }; TomtomComponent.prototype.toggleDetails = function (i) { if (this.workers[i].showDetails === null) this.workers[i].showDetails = false; this.workers[i].showDetails = !this.workers[i].showDetails; }; TomtomComponent.prototype.getCategory = function (id) { if (id === null) return 'Unspecified'; if (this.categories.filter(function (cat) { return cat.id === id; }) === null || this.categories.filter(function (cat) { return cat.id === id; }) === undefined) return ''; return this.categories.filter(function (cat) { return cat.id === id; })[0].label; }; TomtomComponent.prototype.filter = function () { var _this = this; this.categories = this.projectId === 347 ? this.categoriesProd : this.categoriesDev; this.loadingIndicator = true; var status = (this.status == -1 ? null : this.status); this.submissionService.getTomtomResult(this.page, this.workerId, status, this.projectId, this.projectId === 347).then(function (pagedData) { _this.page = pagedData.page; var sbs = pagedData.data ? pagedData.data : []; if (sbs.length === 0) { _this.submissions = []; _this.loadingIndicator = false; return; } var wrks = []; wrks.push(sbs[0]); var _loop_1 = function (x) { if (wrks.find(function (w) { return w.worker === sbs[x].worker; }) === undefined) { wrks.push(sbs[x]); } }; for (var x = 0; x < sbs.length; x++) { _loop_1(x); } //wrks = wrks.map(w=>w.submissions = sbs.filter(s=>s.worker === w.worker)); for (var i in wrks) { wrks[i].submissions = sbs.filter(function (s) { return s.worker === wrks[i].worker; }); } _this.workers = wrks; _this.submissions = sbs; _this.loadingIndicator = false; }); }; TomtomComponent.prototype.category_selected = function ($event) { console.log($event); try { this.subcategoriesfiltered = this.subcategories.filter(function (su) { return su.parent === $event[0].text; }); } catch (error) { } }; TomtomComponent.prototype.doTranslate = function (key) { var _this = this; return new Promise(function (resolve, reject) { _this._google.translate(_this.googleObj, key).subscribe(function (res) { resolve(res.data.translations[0].translatedText); }, function (err) { console.log(err); reject(err); }); }); }; TomtomComponent.prototype.titleCase = function (str) { if (str === null || str === undefined || str === '') return ''; var splitStr = str.toLowerCase().split(' '); for (var i = 0; i < splitStr.length; i++) { // You do not need to check if i is larger than splitStr length, as your for does that for you // Assign it back to the array splitStr[i] = splitStr[i].charAt(0).toUpperCase() + splitStr[i].substring(1); } // Directly return the joined string return splitStr.join(' '); }; TomtomComponent.prototype.projectChanged = function ($event) { this.filter(); }; TomtomComponent = __decorate([ core_1.Component({ selector: 'app-tomtom', template: __webpack_require__(/*! ./tomtom.component.html */ "./src/app/tomtom/tomtom.component.html"), styles: [__webpack_require__(/*! ./tomtom.component.css */ "./src/app/tomtom/tomtom.component.css")] }), __metadata("design:paramtypes", [submissionService_1.SubmissionService, router_1.Router, common_1.DatePipe, ngx_toastr_1.ToastrService, google_services_1.GoogleService]) ], TomtomComponent); return TomtomComponent; }()); exports.TomtomComponent = TomtomComponent; /***/ }), /***/ "./src/app/users/users.component.css": /*!*******************************************!*\ !*** ./src/app/users/users.component.css ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = ".form-control {\r\n padding-right: 30px;\r\n}\r\n\r\n.form-control + .fa {\r\n position: absolute;\r\n right: 0;\r\n padding: 8px 27px;\r\n}\r\n" /***/ }), /***/ "./src/app/users/users.component.html": /*!********************************************!*\ !*** ./src/app/users/users.component.html ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
    \r\n

    Workers

    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n {{ value }}\r\n \r\n \r\n\r\n\r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n Mobile\r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n {{ value }}\r\n \r\n \r\n \r\n \r\n Country\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n Submissions\r\n \r\n \r\n {{ value}}\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n   Edit\r\n \r\n \r\n \r\n \r\n \r\n \r\n  Chat\r\n \r\n \r\n \r\n
    \r\n" /***/ }), /***/ "./src/app/users/users.component.ts": /*!******************************************!*\ !*** ./src/app/users/users.component.ts ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var page_1 = __webpack_require__(/*! ../model/page */ "./src/app/model/page.ts"); var workerService_1 = __webpack_require__(/*! ./../services/workerService */ "./src/app/services/workerService.ts"); var UsersComponent = /** @class */ (function () { function UsersComponent(workerService) { this.workerService = workerService; this.page = new page_1.Page(); this.rows = []; this.loadingIndicator = true; this.reorderable = true; this.search = ''; this.users = []; this.loading = true; this.page.pageNumber = 0; this.page.size = 20; } UsersComponent.prototype.ngOnInit = function () { this.setPage({ offset: 0, pageSize: 20 }); }; // end on init UsersComponent.prototype.filter = function () { var _this = this; this.workerService.getResult(this.page, this.search).then(function (pagedData) { _this.page = pagedData.page; _this.rows = pagedData.data; _this.loading = false; }); }; UsersComponent.prototype.setPage = function (pageInfo) { var _this = this; console.log('Page Info:' + JSON.stringify(pageInfo)); this.page.size = pageInfo.pageSize; this.page.pageNumber = pageInfo.offset; //this.page this.workerService.getResult(this.page, this.search).then(function (pagedData) { _this.page = pagedData.page; _this.rows = pagedData.data; _this.loading = false; _this.loadingIndicator = false; }); }; UsersComponent = __decorate([ core_1.Component({ selector: 'app-users', template: __webpack_require__(/*! ./users.component.html */ "./src/app/users/users.component.html"), styles: [__webpack_require__(/*! ./users.component.css */ "./src/app/users/users.component.css")] }), __metadata("design:paramtypes", [workerService_1.WorkerService]) ], UsersComponent); return UsersComponent; }()); exports.UsersComponent = UsersComponent; /***/ }), /***/ "./src/environments/environment.ts": /*!*****************************************!*\ !*** ./src/environments/environment.ts ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // This file can be replaced during build by using the `fileReplacements` array. // `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`. // The list of file replacements can be found in `angular.json`. var version = __webpack_require__(/*! ../../package.json */ "./package.json").version; exports.environment = { production: false, // api_node_1: "http://localhost:3000/node1-devt-v1/", // api_node_1: "http://localhost:3000/node1-dev-v1/", // api_node_1: "http://localhost:3000/node1-prod-v3/", // api_node_1: "https://api.muhimmaplatform.com/node1-devt-v1/", // api_node_1: "https://api.muhimmaplatform.com/node1-dev-v1/", api_node_1: "https://api.muhimmaplatform.com/node1-prod-v3/", // api_node_2: "http://localhost:4000/node2-devt-v1/", // api_node_2: "http://localhost:4000/node2-dev-v1/", // api_node_2: "http://localhost:4000/node2-prod-v3/", // api_node_2: "https://api.muhimmaplatform.com/node2-devt-v1/", // api_node_2: "https://api.muhimmaplatform.com/node2-dev-v1/", api_node_2: "https://api.muhimmaplatform.com/node2-prod-v3/", version: version, }; /* * In development mode, to ignore zone related error stack frames such as * `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can * import the following file, but please comment it out in production mode * because it will have performance impact when throw error */ // import 'zone.js/dist/zone-error'; // Included with Angular CLI. /***/ }), /***/ "./src/main.ts": /*!*********************!*\ !*** ./src/main.ts ***! \*********************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var platform_browser_dynamic_1 = __webpack_require__(/*! @angular/platform-browser-dynamic */ "./node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js"); var aws_amplify_1 = __webpack_require__(/*! aws-amplify */ "./node_modules/aws-amplify/lib/index.js"); var app_module_1 = __webpack_require__(/*! ./app/app.module */ "./src/app/app.module.ts"); var environment_1 = __webpack_require__(/*! ./environments/environment */ "./src/environments/environment.ts"); var oauthConfig = { domain: 'frontendportal.auth.us-east-2.amazoncognito.com', scope: ['phone', 'email', 'profile', 'openid', 'aws.cognito.signin.user.admin'], redirectSignIn: 'https://localhost:4200', redirectSignOut: 'https://localhost:4200', responseType: 'code', options: { // Indicates if the data collection is enabled to support Cognito advanced security features. By default, this flag is set to true. AdvancedSecurityDataCollectionFlag: false } }; aws_amplify_1.Auth.configure({ oath: oauthConfig }); if (environment_1.environment.production) { core_1.enableProdMode(); } platform_browser_dynamic_1.platformBrowserDynamic().bootstrapModule(app_module_1.AppModule) .catch(function (err) { return console.log(err); }); /***/ }), /***/ 0: /*!***************************!*\ !*** multi ./src/main.ts ***! \***************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(/*! C:\Malik\muhimma\angular-admin-portal-development\src\main.ts */"./src/main.ts"); /***/ }), /***/ 1: /*!********************!*\ !*** fs (ignored) ***! \********************/ /*! no static exports found */ /***/ (function(module, exports) { /* (ignored) */ /***/ }) },[[0,"runtime","vendor"]]]); //# sourceMappingURL=main.js.map