AWS Usermangement
This commit is contained in:
parent
361f13e9af
commit
3e22bc5e11
125
ng6-seed/dist/3rdpartylicenses.txt
vendored
125
ng6-seed/dist/3rdpartylicenses.txt
vendored
@ -843,6 +843,83 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
babel-runtime@6.26.0
|
||||||
|
MIT
|
||||||
|
MIT
|
||||||
|
|
||||||
|
libphonenumber-js@0.4.52
|
||||||
|
MIT
|
||||||
|
(The MIT License)
|
||||||
|
|
||||||
|
Copyright (c) 2016 @catamphetamine <purecatamphetamine@gmail.com>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
'Software'), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
ng2-validation@4.2.0
|
||||||
|
MIT
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2016 YangYang Yu
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
hammerjs@2.0.8
|
||||||
|
MIT
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (C) 2011-2014 by Jorik Tangelder (Eight Media)
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
|
||||||
simple-line-icons@2.4.1
|
simple-line-icons@2.4.1
|
||||||
MIT
|
MIT
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
@ -1524,58 +1601,10 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
ngx-perfect-scrollbar@5.0.0-7
|
|
||||||
MIT
|
|
||||||
The MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2016 Zef Oy
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
|
|
||||||
querystring@0.2.0
|
querystring@0.2.0
|
||||||
MIT
|
MIT
|
||||||
MIT
|
MIT
|
||||||
|
|
||||||
resize-observer-polyfill@1.5.0
|
|
||||||
MIT
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2016 Denis Rul
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
rxjs-compat@6.3.2
|
rxjs-compat@6.3.2
|
||||||
Apache-2.0
|
Apache-2.0
|
||||||
Apache License
|
Apache License
|
||||||
|
|||||||
61
ng6-seed/dist/common.js
vendored
Normal file
61
ng6-seed/dist/common.js
vendored
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["common"],{
|
||||||
|
|
||||||
|
/***/ "./src/app/settings/service/user.service.ts":
|
||||||
|
/*!**************************************************!*\
|
||||||
|
!*** ./src/app/settings/service/user.service.ts ***!
|
||||||
|
\**************************************************/
|
||||||
|
/*! exports provided: UserService */
|
||||||
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UserService", function() { return UserService; });
|
||||||
|
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
|
||||||
|
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
|
||||||
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||||
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||||
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||||
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||||
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||||
|
};
|
||||||
|
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
|
||||||
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
var apiurl = 'http://localhost/sineedge/sparqapi/api/';
|
||||||
|
var UserService = /** @class */ (function () {
|
||||||
|
function UserService(http) {
|
||||||
|
this.http = http;
|
||||||
|
}
|
||||||
|
UserService.prototype.getuserdata = function () {
|
||||||
|
return this.http.get(apiurl + 'getListOfUsers');
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* Admin Local Update
|
||||||
|
* @param records
|
||||||
|
*/
|
||||||
|
UserService.prototype.adminupendis = function (records) {
|
||||||
|
//let headers = this.shared.headercofig('');
|
||||||
|
// console.log(headers);
|
||||||
|
//let session = this.shared.getAccessToken() || "";
|
||||||
|
var formData = new FormData();
|
||||||
|
formData.append('records', JSON.stringify(records));
|
||||||
|
return this.http.post(apiurl + 'updateExistUser', formData);
|
||||||
|
//console.log(users);
|
||||||
|
};
|
||||||
|
UserService = __decorate([
|
||||||
|
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
|
||||||
|
providedIn: 'root'
|
||||||
|
}),
|
||||||
|
__metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"]])
|
||||||
|
], UserService);
|
||||||
|
return UserService;
|
||||||
|
}());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
|
||||||
|
}]);
|
||||||
|
//# sourceMappingURL=common.js.map
|
||||||
1
ng6-seed/dist/common.js.map
vendored
Normal file
1
ng6-seed/dist/common.js.map
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":["webpack:///./src/app/settings/service/user.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAA2C;AACO;AAElD,IAAM,MAAM,GAAG,yCAAyC,CAAC;AAKzD;IAEE,qBAAmB,IAAe;QAAf,SAAI,GAAJ,IAAI,CAAW;IAAI,CAAC;IAGvC,iCAAW,GAAX;QAEE,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,gBAAgB,CAAC,CAAC;IAGlD,CAAC;IAED;;;OAGG;IACH,kCAAY,GAAZ,UAAa,OAAO;QAClB,4CAA4C;QAC7C,wBAAwB;QACxB,mDAAmD;QAClD,IAAI,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC9B,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;QAEpD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAC,iBAAiB,EAAC,QAAQ,CAAE,CAAC;QACzD,qBAAqB;IAEvB,CAAC;IA1BU,WAAW;QAJvB,gEAAU,CAAC;YACV,UAAU,EAAE,MAAM;SACnB,CAAC;yCAIwB,+DAAU;OAFvB,WAAW,CA4BvB;IAAD,kBAAC;CAAA;AA5BuB","file":"common.js","sourcesContent":["import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\nconst apiurl = 'http://localhost/sineedge/sparqapi/api/';\n@Injectable({\n providedIn: 'root'\n})\n\nexport class UserService {\n\n constructor(public http:HttpClient) { }\n\n\n getuserdata() {\n \n return this.http.get(apiurl + 'getListOfUsers');\n \n \n }\n\n /**\n * Admin Local Update\n * @param records \n */\n adminupendis(records){\n //let headers = this.shared.headercofig('');\n // console.log(headers);\n //let session = this.shared.getAccessToken() || \"\";\n let formData = new FormData();\n formData.append('records',JSON.stringify(records));\n \n return this.http.post(apiurl+'updateExistUser',formData,);\n //console.log(users);\n \n }\n\n}\n\n"],"sourceRoot":""}
|
||||||
1420
ng6-seed/dist/main.js
vendored
1420
ng6-seed/dist/main.js
vendored
File diff suppressed because one or more lines are too long
2
ng6-seed/dist/main.js.map
vendored
2
ng6-seed/dist/main.js.map
vendored
File diff suppressed because one or more lines are too long
2
ng6-seed/dist/runtime.js
vendored
2
ng6-seed/dist/runtime.js
vendored
@ -61,7 +61,7 @@
|
|||||||
/******/
|
/******/
|
||||||
/******/ // script path function
|
/******/ // script path function
|
||||||
/******/ function jsonpScriptSrc(chunkId) {
|
/******/ function jsonpScriptSrc(chunkId) {
|
||||||
/******/ return __webpack_require__.p + "" + ({"dashboard-dashboard-module":"dashboard-dashboard-module","error-error-module":"error-error-module","session-session-module":"session-session-module","users-users-module":"users-users-module"}[chunkId]||chunkId) + ".js"
|
/******/ return __webpack_require__.p + "" + ({"common":"common","settings-settings-module":"settings-settings-module","users-users-module":"users-users-module","dashboard-dashboard-module":"dashboard-dashboard-module","error-error-module":"error-error-module","session-session-module":"session-session-module"}[chunkId]||chunkId) + ".js"
|
||||||
/******/ }
|
/******/ }
|
||||||
/******/
|
/******/
|
||||||
/******/ // The require function
|
/******/ // The require function
|
||||||
|
|||||||
2
ng6-seed/dist/runtime.js.map
vendored
2
ng6-seed/dist/runtime.js.map
vendored
File diff suppressed because one or more lines are too long
6870
ng6-seed/dist/session-session-module.js
vendored
6870
ng6-seed/dist/session-session-module.js
vendored
File diff suppressed because one or more lines are too long
2
ng6-seed/dist/session-session-module.js.map
vendored
2
ng6-seed/dist/session-session-module.js.map
vendored
File diff suppressed because one or more lines are too long
2736
ng6-seed/dist/settings-settings-module.js
vendored
Normal file
2736
ng6-seed/dist/settings-settings-module.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
ng6-seed/dist/settings-settings-module.js.map
vendored
Normal file
1
ng6-seed/dist/settings-settings-module.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
465
ng6-seed/dist/users-users-module.js
vendored
465
ng6-seed/dist/users-users-module.js
vendored
File diff suppressed because one or more lines are too long
2
ng6-seed/dist/users-users-module.js.map
vendored
2
ng6-seed/dist/users-users-module.js.map
vendored
File diff suppressed because one or more lines are too long
4410
ng6-seed/dist/vendor.js
vendored
4410
ng6-seed/dist/vendor.js
vendored
File diff suppressed because one or more lines are too long
2
ng6-seed/dist/vendor.js.map
vendored
2
ng6-seed/dist/vendor.js.map
vendored
File diff suppressed because one or more lines are too long
44
ng6-seed/package-lock.json
generated
44
ng6-seed/package-lock.json
generated
@ -573,6 +573,15 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@swimlane/ngx-datatable/-/ngx-datatable-11.1.5.tgz",
|
"resolved": "https://registry.npmjs.org/@swimlane/ngx-datatable/-/ngx-datatable-11.1.5.tgz",
|
||||||
"integrity": "sha512-BRRHMrgw9tG0BezTnfszzFTlpW9B9Zh5kyZF/pxqfJxpUsZ0aA/uXlL4cloe4+msQ6yIdu1/jhUCDInwSzmpFw=="
|
"integrity": "sha512-BRRHMrgw9tG0BezTnfszzFTlpW9B9Zh5kyZF/pxqfJxpUsZ0aA/uXlL4cloe4+msQ6yIdu1/jhUCDInwSzmpFw=="
|
||||||
},
|
},
|
||||||
|
"@types/aws-sdk": {
|
||||||
|
"version": "2.7.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/aws-sdk/-/aws-sdk-2.7.0.tgz",
|
||||||
|
"integrity": "sha1-g1iLPRTr3KHUzl4CM4dXdWjOgvM=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"aws-sdk": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@types/jasmine": {
|
"@types/jasmine": {
|
||||||
"version": "2.5.52",
|
"version": "2.5.52",
|
||||||
"resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.5.52.tgz",
|
"resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.5.52.tgz",
|
||||||
@ -586,9 +595,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "8.9.5",
|
"version": "8.10.29",
|
||||||
"resolved": "http://registry.npmjs.org/@types/node/-/node-8.9.5.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.29.tgz",
|
||||||
"integrity": "sha512-jRHfWsvyMtXdbhnz5CVHxaBgnV6duZnPlQuRSo/dm/GnmikNcmZhxIES4E9OZjUmQ8C+HCl4KJux+cXN/ErGDQ==",
|
"integrity": "sha512-zbteaWZ2mdduacm0byELwtRyhYE40aK+pAanQk415gr1eRuu67x7QGOLmn8jz5zI8LDK7d0WI/oT6r5Trz4rzQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/q": {
|
"@types/q": {
|
||||||
@ -1234,9 +1243,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"aws-sdk": {
|
"aws-sdk": {
|
||||||
"version": "2.318.0",
|
"version": "2.319.0",
|
||||||
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.318.0.tgz",
|
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.319.0.tgz",
|
||||||
"integrity": "sha512-w2XT+DOKOczoRaB9R0cRCZSwHkw4JfngMlUKeRhMbzOvW9orOZB2SeMgz+Pz1jKU3VSJDMpvB/Z3P68nvDxb8Q==",
|
"integrity": "sha512-Ez8rs036lMoKJxHast6W3m07o1Wzg5h3RffsAoOwRwVmuNXW3xtnPR6XW3+/HaG7vSIk55tZjHo1PECaOY3aeg==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"buffer": "4.9.1",
|
"buffer": "4.9.1",
|
||||||
"events": "1.1.1",
|
"events": "1.1.1",
|
||||||
@ -1252,22 +1262,26 @@
|
|||||||
"ieee754": {
|
"ieee754": {
|
||||||
"version": "1.1.8",
|
"version": "1.1.8",
|
||||||
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz",
|
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz",
|
||||||
"integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q="
|
"integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"punycode": {
|
"punycode": {
|
||||||
"version": "1.3.2",
|
"version": "1.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
|
||||||
"integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0="
|
"integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"sax": {
|
"sax": {
|
||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
"resolved": "http://registry.npmjs.org/sax/-/sax-1.2.1.tgz",
|
"resolved": "http://registry.npmjs.org/sax/-/sax-1.2.1.tgz",
|
||||||
"integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o="
|
"integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"version": "0.10.3",
|
"version": "0.10.3",
|
||||||
"resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz",
|
"resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz",
|
||||||
"integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=",
|
"integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"punycode": "1.3.2",
|
"punycode": "1.3.2",
|
||||||
"querystring": "0.2.0"
|
"querystring": "0.2.0"
|
||||||
@ -1276,7 +1290,8 @@
|
|||||||
"uuid": {
|
"uuid": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz",
|
||||||
"integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g=="
|
"integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==",
|
||||||
|
"dev": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -3637,7 +3652,8 @@
|
|||||||
"events": {
|
"events": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
|
||||||
"integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ="
|
"integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"eventsource": {
|
"eventsource": {
|
||||||
"version": "0.1.6",
|
"version": "0.1.6",
|
||||||
@ -6158,7 +6174,8 @@
|
|||||||
"jmespath": {
|
"jmespath": {
|
||||||
"version": "0.15.0",
|
"version": "0.15.0",
|
||||||
"resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz",
|
"resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz",
|
||||||
"integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc="
|
"integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"jquery": {
|
"jquery": {
|
||||||
"version": "3.2.1",
|
"version": "3.2.1",
|
||||||
@ -8420,7 +8437,8 @@
|
|||||||
"querystring": {
|
"querystring": {
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
|
||||||
"integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA="
|
"integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"querystring-es3": {
|
"querystring-es3": {
|
||||||
"version": "0.2.1",
|
"version": "0.2.1",
|
||||||
|
|||||||
@ -33,7 +33,6 @@
|
|||||||
"angular-calendar": "0.23.3",
|
"angular-calendar": "0.23.3",
|
||||||
"angular-sortablejs": "^2.0.6",
|
"angular-sortablejs": "^2.0.6",
|
||||||
"angular-tree-component": "6.1.0",
|
"angular-tree-component": "6.1.0",
|
||||||
"aws-sdk": "^2.318.0",
|
|
||||||
"chart.js": "2.6.0",
|
"chart.js": "2.6.0",
|
||||||
"core-js": "^2.5.5",
|
"core-js": "^2.5.5",
|
||||||
"d3": "^4.9.1",
|
"d3": "^4.9.1",
|
||||||
@ -65,18 +64,20 @@
|
|||||||
"@angular-devkit/build-angular": "~0.6.1",
|
"@angular-devkit/build-angular": "~0.6.1",
|
||||||
"@angular/cli": "^6.0.0-rc.5",
|
"@angular/cli": "^6.0.0-rc.5",
|
||||||
"@angular/compiler-cli": "^6.0.0-rc.5",
|
"@angular/compiler-cli": "^6.0.0-rc.5",
|
||||||
"@types/node": "~8.9.4",
|
"@types/aws-sdk": "^2.7.0",
|
||||||
"codelyzer": "~4.1.0",
|
|
||||||
"@types/jasmine": "2.5.52",
|
"@types/jasmine": "2.5.52",
|
||||||
"@types/jquery": "3.2.0",
|
"@types/jquery": "3.2.0",
|
||||||
|
"@types/node": "^8.10.29",
|
||||||
|
"aws-sdk": "^2.300.0",
|
||||||
|
"codelyzer": "~4.1.0",
|
||||||
"jasmine-core": "2.6.3",
|
"jasmine-core": "2.6.3",
|
||||||
"jasmine-spec-reporter": "4.1.0",
|
"jasmine-spec-reporter": "4.1.0",
|
||||||
"karma": "1.7.0",
|
"karma": "1.7.0",
|
||||||
"karma-chrome-launcher": "2.1.1",
|
"karma-chrome-launcher": "2.1.1",
|
||||||
"karma-cli": "1.0.1",
|
"karma-cli": "1.0.1",
|
||||||
|
"karma-coverage-istanbul-reporter": "1.3.0",
|
||||||
"karma-jasmine": "1.1.0",
|
"karma-jasmine": "1.1.0",
|
||||||
"karma-jasmine-html-reporter": "^0.2.2",
|
"karma-jasmine-html-reporter": "^0.2.2",
|
||||||
"karma-coverage-istanbul-reporter": "1.3.0",
|
|
||||||
"protractor": "5.1.2",
|
"protractor": "5.1.2",
|
||||||
"ts-node": "~5.0.0",
|
"ts-node": "~5.0.0",
|
||||||
"tslint": "~5.9.1",
|
"tslint": "~5.9.1",
|
||||||
|
|||||||
@ -8,9 +8,11 @@ import {
|
|||||||
ISignUpResult,
|
ISignUpResult,
|
||||||
CognitoUserSession
|
CognitoUserSession
|
||||||
} from "amazon-cognito-identity-js";
|
} from "amazon-cognito-identity-js";
|
||||||
|
import * as AWS from "aws-sdk";
|
||||||
|
|
||||||
import { Observable } from "rxjs/Observable";
|
import { Observable } from "rxjs/Observable";
|
||||||
import "rxjs/add/operator/map";
|
import "rxjs/add/operator/map";
|
||||||
import * as AWS from "aws-sdk";
|
// import AWS from "aws-sdk/dist/aws-sdk";
|
||||||
|
|
||||||
//environment
|
//environment
|
||||||
import { environment } from '../../environments/environment';
|
import { environment } from '../../environments/environment';
|
||||||
@ -18,7 +20,7 @@ import { environment } from '../../environments/environment';
|
|||||||
import { Http, Headers, RequestOptions } from '@angular/http';
|
import { Http, Headers, RequestOptions } from '@angular/http';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import 'rxjs/add/operator/map';
|
import 'rxjs/add/operator/map';
|
||||||
|
import { CognitoService } from './cognito.service';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -46,7 +48,7 @@ const sineedgedevUserpool = new CognitoUserPool(sineedgedev_poolData);
|
|||||||
/**
|
/**
|
||||||
* Identity PoolID
|
* Identity PoolID
|
||||||
*/
|
*/
|
||||||
const sineedgeIdentity = "ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961";//"ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961";
|
const sineedgeIdentity = environment.identityPoolId//"ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961";//"ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961";
|
||||||
const lenderIdentity = "ap-south-1:ca22dabc-db59-4af5-9bb8-265f7ec95907";
|
const lenderIdentity = "ap-south-1:ca22dabc-db59-4af5-9bb8-265f7ec95907";
|
||||||
const vendorIdenttiy = "";
|
const vendorIdenttiy = "";
|
||||||
// serviceProvider
|
// serviceProvider
|
||||||
@ -66,7 +68,7 @@ export class AwsService {
|
|||||||
jwttoken: any;
|
jwttoken: any;
|
||||||
cognitousers: any;
|
cognitousers: any;
|
||||||
localUserId:any = '';
|
localUserId:any = '';
|
||||||
constructor(public http: Http, public RequestOptions: RequestOptions) { }
|
constructor(public http: Http, public RequestOptions: RequestOptions,public shared:CognitoService) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Login Function
|
* Login Function
|
||||||
@ -162,4 +164,452 @@ export class AwsService {
|
|||||||
/**
|
/**
|
||||||
* End of the function
|
* End of the function
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logout function
|
||||||
|
*/
|
||||||
|
logout(){
|
||||||
|
return Observable.create(observe=>{
|
||||||
|
this.shared.getCurrentUser().signOut();
|
||||||
|
observe.next();
|
||||||
|
observe.complete();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Config function
|
||||||
|
*/
|
||||||
|
getconfig() {
|
||||||
|
let session:any = this.shared.getAccessToken() || "";
|
||||||
|
let config = "";
|
||||||
|
config += AWS.config.region = environment.region;
|
||||||
|
config += AWS.config.credentials = new AWS.CognitoIdentityCredentials({
|
||||||
|
IdentityPoolId: sineedgeIdentity, // for sineedge_DEV
|
||||||
|
Logins: {
|
||||||
|
"cognito-idp.ap-south-1.amazonaws.com/ap-south-1_qQ85yQZJO": session
|
||||||
|
.getIdToken()
|
||||||
|
.getJwtToken()
|
||||||
|
}
|
||||||
|
// NOTE: getSession must be called to authenticate user before calling getUserAttributes
|
||||||
|
});
|
||||||
|
return config;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* admin Disable user
|
||||||
|
* @param userdata
|
||||||
|
* @param awsName
|
||||||
|
*/
|
||||||
|
admindisabelUser(userdata, awsName) {
|
||||||
|
let session:any = this.shared.getAccessToken() || "";
|
||||||
|
this.getconfig();
|
||||||
|
// let config = "";
|
||||||
|
// AWS.config.region = "ap-south-1";//environment.region;
|
||||||
|
// AWS.config.credentials = new AWS.CognitoIdentityCredentials({
|
||||||
|
// IdentityPoolId: sineedgeIdentity, // for sineedge_DEV
|
||||||
|
// Logins: {
|
||||||
|
// "cognito-idp.ap-south-1.amazonaws.com/ap-south-1_qQ85yQZJO": session
|
||||||
|
// .getIdToken()
|
||||||
|
// .getJwtToken()
|
||||||
|
// }
|
||||||
|
// // NOTE: getSession must be called to authenticate user before calling getUserAttributes
|
||||||
|
// });
|
||||||
|
let userGroup = session.idToken.payload["cognito:groups"].filter(
|
||||||
|
usergroup => usergroup == "ADMIN"
|
||||||
|
)[0];
|
||||||
|
//cognitosdata = 7;
|
||||||
|
let params: any;
|
||||||
|
if (userGroup == 'ADMIN') {
|
||||||
|
console.log(userdata);
|
||||||
|
if (userdata.fk_entity_id == 1) {
|
||||||
|
params = {
|
||||||
|
UserPoolId: sineedgedev_poolData.UserPoolId, /* required */
|
||||||
|
Username: awsName /* required */
|
||||||
|
};
|
||||||
|
} else if (userdata.fk_entity_id == 2) {
|
||||||
|
params = {
|
||||||
|
UserPoolId: lender_poolData.UserPoolId, /* required */
|
||||||
|
Username: awsName /* required */
|
||||||
|
};
|
||||||
|
}
|
||||||
|
console.log(params);
|
||||||
|
return Observable.create(observe => {
|
||||||
|
let cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider();
|
||||||
|
cognitoidentityserviceprovider.adminDisableUser(params, function (err, data) {
|
||||||
|
if (err) console.log(err, err.stack); // an error occurred
|
||||||
|
observe.next("0"); // successful response
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Admin enable user
|
||||||
|
* @param userdata
|
||||||
|
* @param awsName
|
||||||
|
*/
|
||||||
|
adminenableUser(userdata, awsName) {
|
||||||
|
let session:any = this.shared.getAccessToken() || "";
|
||||||
|
// this.getconfig();
|
||||||
|
|
||||||
|
let config = "";
|
||||||
|
AWS.config.region = environment.region;
|
||||||
|
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
|
||||||
|
IdentityPoolId: sineedgeIdentity, // for sineedge_DEV
|
||||||
|
Logins: {
|
||||||
|
"cognito-idp.ap-south-1.amazonaws.com/ap-south-1_qQ85yQZJO": session
|
||||||
|
.getIdToken()
|
||||||
|
.getJwtToken()
|
||||||
|
}
|
||||||
|
// NOTE: getSession must be called to authenticate user before calling getUserAttributes
|
||||||
|
});
|
||||||
|
let userGroup = session.idToken.payload["cognito:groups"].filter(
|
||||||
|
usergroup => usergroup == "ADMIN"
|
||||||
|
)[0];
|
||||||
|
//cognitosdata = 7;
|
||||||
|
let params: any;
|
||||||
|
if (userGroup == 'ADMIN') {
|
||||||
|
console.log(userdata);
|
||||||
|
if (userdata.fk_entity_id == 1) {
|
||||||
|
params = {
|
||||||
|
UserPoolId: sineedgedev_poolData.UserPoolId, /* required */
|
||||||
|
Username: awsName /* required */
|
||||||
|
};
|
||||||
|
} else if (userdata.fk_entity_id == 2) {
|
||||||
|
params = {
|
||||||
|
UserPoolId: lender_poolData.UserPoolId, /* required */
|
||||||
|
Username: awsName /* required */
|
||||||
|
};
|
||||||
|
}
|
||||||
|
console.log(params);
|
||||||
|
return Observable.create(observe => {
|
||||||
|
let cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider();
|
||||||
|
cognitoidentityserviceprovider.adminEnableUser(params, function (err, data) {
|
||||||
|
if (err) console.log(err, err.stack); // an error occurred
|
||||||
|
observe.next("1"); // successful response
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
register(userData) {
|
||||||
|
let session:any = this.shared.getAccessToken() || "";
|
||||||
|
|
||||||
|
this.getconfig();
|
||||||
|
let registeredData: any = "";
|
||||||
|
let params: any;
|
||||||
|
let userGroup = session.idToken.payload["cognito:groups"].filter(
|
||||||
|
usergroup => usergroup == "ADMIN"
|
||||||
|
)[0];
|
||||||
|
// (userGroup);
|
||||||
|
if (userGroup == "ADMIN") {
|
||||||
|
if (userData.type.entity_type_id == 1) {
|
||||||
|
params = {
|
||||||
|
UserPoolId: sineedgedev_poolData.UserPoolId /* required */,
|
||||||
|
Username: userData.email /* required */,
|
||||||
|
DesiredDeliveryMediums: [
|
||||||
|
"EMAIL"
|
||||||
|
/* more items */
|
||||||
|
],
|
||||||
|
// ForceAliasCreation: true || false,
|
||||||
|
MessageAction: "SUPPRESS",
|
||||||
|
TemporaryPassword: "temp1234",
|
||||||
|
UserAttributes: [
|
||||||
|
{
|
||||||
|
Name: "email" /* required */,
|
||||||
|
Value: userData.email
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "phone_number" /* required */,
|
||||||
|
Value: "+91" + userData.phone
|
||||||
|
}
|
||||||
|
/* more items */
|
||||||
|
]
|
||||||
|
};
|
||||||
|
} else if (userData.type.entity_type_id == 2) {
|
||||||
|
console.log(2);
|
||||||
|
params = {
|
||||||
|
UserPoolId: lender_poolData.UserPoolId /* required */,
|
||||||
|
Username: userData.email /* required */,
|
||||||
|
DesiredDeliveryMediums: [
|
||||||
|
"EMAIL"
|
||||||
|
/* more items */
|
||||||
|
],
|
||||||
|
// ForceAliasCreation: true || false,
|
||||||
|
MessageAction: "SUPPRESS",
|
||||||
|
TemporaryPassword: "temp1234",
|
||||||
|
UserAttributes: [
|
||||||
|
{
|
||||||
|
Name: "email" /* required */,
|
||||||
|
Value: userData.email
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "phone_number" /* required */,
|
||||||
|
Value: "+91" + userData.phone
|
||||||
|
}
|
||||||
|
/* more items */
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
console.log(params);
|
||||||
|
return Observable.create(observe => {
|
||||||
|
let cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider();
|
||||||
|
|
||||||
|
cognitoidentityserviceprovider.adminCreateUser(params, (
|
||||||
|
err,
|
||||||
|
data
|
||||||
|
) => {
|
||||||
|
if (err) { alert(err.stack); }
|
||||||
|
// an error occurred
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
observe.next(data);
|
||||||
|
|
||||||
|
|
||||||
|
// successful response
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
return alert('Admin Only create user');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
UserGroup(cognitodata, userData) {
|
||||||
|
//console.log(cognitodata);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.getconfig();
|
||||||
|
|
||||||
|
//let cognitodata = "539bfefa-ae42-4bee-bf79-4b15d1a2af7f";
|
||||||
|
if(userData.userid === null ){
|
||||||
|
for(let role of userData.role){
|
||||||
|
|
||||||
|
let params: any;
|
||||||
|
if (userData.type.entity_type_id == 1) {
|
||||||
|
|
||||||
|
params = {
|
||||||
|
GroupName: role.value /* required */,
|
||||||
|
UserPoolId: sineedgedev_poolData.UserPoolId,//"ap-south-1_y7dt3iEaX" /* required */,
|
||||||
|
Username: cognitodata.User.Username //'539bfefa-ae42-4bee-bf79-4b15d1a2af7f' /* required */
|
||||||
|
};
|
||||||
|
|
||||||
|
} else if (userData.type.entity_type_id == 2) {
|
||||||
|
params = {
|
||||||
|
GroupName: role.value /* required */,
|
||||||
|
UserPoolId: lender_poolData.UserPoolId,//"ap-south-1_y7dt3iEaX" /* required */,
|
||||||
|
Username: cognitodata.User.Username //'539bfefa-ae42-4bee-bf79-4b15d1a2af7f' /* required */
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
//(params);
|
||||||
|
return Observable.create(observe=>{
|
||||||
|
let cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider();
|
||||||
|
|
||||||
|
cognitoidentityserviceprovider.adminAddUserToGroup(params, function (
|
||||||
|
err,
|
||||||
|
data
|
||||||
|
) {
|
||||||
|
if (err) {
|
||||||
|
alert(err.stack);
|
||||||
|
}//(err, err.stack);
|
||||||
|
// an error occurred
|
||||||
|
else {//(data);
|
||||||
|
|
||||||
|
observe.next(cognitodata);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
let params :any;
|
||||||
|
console.log(userData);
|
||||||
|
console.log(cognitodata);
|
||||||
|
if (userData.fk_entity_id == 1) {
|
||||||
|
|
||||||
|
params = {
|
||||||
|
GroupName: cognitodata.value /* required */,
|
||||||
|
UserPoolId: sineedgedev_poolData.UserPoolId,//"ap-south-1_y7dt3iEaX" /* required */,
|
||||||
|
Username: userData.aws_name //'539bfefa-ae42-4bee-bf79-4b15d1a2af7f' /* required */
|
||||||
|
};
|
||||||
|
|
||||||
|
} else if (userData.fk_entity_id == 2) {
|
||||||
|
params = {
|
||||||
|
GroupName: cognitodata.value /* required */,
|
||||||
|
UserPoolId: lender_poolData.UserPoolId,//"ap-south-1_y7dt3iEaX" /* required */,
|
||||||
|
Username: userData.aws_name //'539bfefa-ae42-4bee-bf79-4b15d1a2af7f' /* required */
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
//(params);
|
||||||
|
let cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider();
|
||||||
|
|
||||||
|
cognitoidentityserviceprovider.adminAddUserToGroup(params, function (
|
||||||
|
err,
|
||||||
|
data
|
||||||
|
) {
|
||||||
|
if (err) {
|
||||||
|
alert(err.stack);
|
||||||
|
}//(err, err.stack);
|
||||||
|
// an error occurred
|
||||||
|
else {//(data);
|
||||||
|
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* admin User update
|
||||||
|
* @param username,clientid params
|
||||||
|
**/
|
||||||
|
adminUpdateuser(user, cognitosdata) {
|
||||||
|
let session:any = this.shared.getAccessToken() || "";
|
||||||
|
this.getconfig();
|
||||||
|
|
||||||
|
//let cognitodata = "539bfefa-ae42-4bee-bf79-4b15d1a2af7f";
|
||||||
|
let userGroup = session.idToken.payload["cognito:groups"].filter(
|
||||||
|
usergroup => usergroup == "ADMIN"
|
||||||
|
)[0];
|
||||||
|
//cognitosdata = 7;
|
||||||
|
let params:any;
|
||||||
|
if (userGroup == 'ADMIN') {
|
||||||
|
if(user.type.entity_type_id ==1){
|
||||||
|
params = {
|
||||||
|
UserAttributes: [ /* required */
|
||||||
|
{
|
||||||
|
Name: 'locale', /* required */
|
||||||
|
Value: cognitosdata.toString()
|
||||||
|
},
|
||||||
|
/* more items */
|
||||||
|
],
|
||||||
|
UserPoolId: sineedgedev_poolData.UserPoolId, /* required */
|
||||||
|
Username: user.email /* required */
|
||||||
|
};
|
||||||
|
}else if(user.type.entity_type_id ==2){
|
||||||
|
params = {
|
||||||
|
UserAttributes: [ /* required */
|
||||||
|
{
|
||||||
|
Name: 'locale', /* required */
|
||||||
|
Value: cognitosdata.toString()
|
||||||
|
},
|
||||||
|
/* more items */
|
||||||
|
],
|
||||||
|
UserPoolId: lender_poolData.UserPoolId, /* required */
|
||||||
|
Username: user.email /* required */
|
||||||
|
};
|
||||||
|
}
|
||||||
|
//console.log(params);
|
||||||
|
return Observable.create(observe => {
|
||||||
|
let cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider();
|
||||||
|
|
||||||
|
cognitoidentityserviceprovider.adminUpdateUserAttributes(params, function (err, data) {
|
||||||
|
if (err) //(err, err.stack);
|
||||||
|
console.log(data); // an error occurred
|
||||||
|
observe.next(data); // successful response
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
getlocale(){
|
||||||
|
let session:any = this.shared.getAccessToken() || "";
|
||||||
|
return session.idToken.payload.locale;
|
||||||
|
}
|
||||||
|
|
||||||
|
adminchangeData(userData,changeusers){
|
||||||
|
console.log(userData);
|
||||||
|
console.log(changeusers);
|
||||||
|
let session:any = this.shared.getAccessToken() || "";
|
||||||
|
this.getconfig();
|
||||||
|
let registeredData: any = "";
|
||||||
|
let params:any='';
|
||||||
|
let userGroup = session.idToken.payload["cognito:groups"].filter(
|
||||||
|
usergroup => usergroup == "ADMIN"
|
||||||
|
)[0];
|
||||||
|
// (userGroup);
|
||||||
|
if (userGroup == "ADMIN") {
|
||||||
|
if (userData.fk_entity_id == 1) {
|
||||||
|
params = {
|
||||||
|
UserPoolId: sineedgedev_poolData.UserPoolId /* required */,
|
||||||
|
Username: userData.aws_name,//userData.email /* required */,
|
||||||
|
|
||||||
|
// ForceAliasCreation: true || false,
|
||||||
|
|
||||||
|
UserAttributes: [
|
||||||
|
{
|
||||||
|
Name: "email" /* required */,
|
||||||
|
Value: changeusers.email,//userData.email
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "phone_number" /* required */,
|
||||||
|
Value: "+91"+ changeusers.phone
|
||||||
|
}
|
||||||
|
/* more items */
|
||||||
|
]
|
||||||
|
};
|
||||||
|
} else if (userData.fk_entity_id == 2) {
|
||||||
|
params = {
|
||||||
|
UserPoolId: lender_poolData.UserPoolId /* required */,
|
||||||
|
Username: userData.aws_name /* required */,
|
||||||
|
|
||||||
|
UserAttributes: [
|
||||||
|
{
|
||||||
|
Name: "email" /* required */,
|
||||||
|
Value: changeusers.email
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "phone_number" /* required */,
|
||||||
|
Value: "+91" + changeusers.phone
|
||||||
|
}
|
||||||
|
/* more items */
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
console.log(params);
|
||||||
|
return Observable.create(observe=>{
|
||||||
|
let cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider();
|
||||||
|
cognitoidentityserviceprovider.adminUpdateUserAttributes(params, function(err, data) {
|
||||||
|
if (err) console.log(err, err.stack); // an error occurred
|
||||||
|
observe.next(data); // successful response
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
adminremoveGroup(roles,users){
|
||||||
|
console.log(roles);
|
||||||
|
console.log(users);
|
||||||
|
if(users !==undefined){
|
||||||
|
|
||||||
|
let session:any = this.shared.getAccessToken() ||"";
|
||||||
|
this.getconfig();
|
||||||
|
var params = {
|
||||||
|
GroupName: roles.value, /* required */
|
||||||
|
UserPoolId: sineedgedev_poolData.UserPoolId, /* required */
|
||||||
|
Username: users.aws_name//'2c64866e-e96f-453b-903f-2b6f831688af' /* required */
|
||||||
|
};
|
||||||
|
let cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider();
|
||||||
|
cognitoidentityserviceprovider.adminRemoveUserFromGroup(params, function(err, data) {
|
||||||
|
if (err) console.log(err, err.stack); // an error occurred
|
||||||
|
else console.log(data); // successful response
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,16 +74,16 @@ getAccessToken(){
|
|||||||
let jwttoken = '';
|
let jwttoken = '';
|
||||||
if (this.getCurrentUser() != null) {
|
if (this.getCurrentUser() != null) {
|
||||||
//console.log(JSON.stringify(this.getCurrentUser()));
|
//console.log(JSON.stringify(this.getCurrentUser()));
|
||||||
console.log('76 if');
|
// console.log('76 if');
|
||||||
this.getCurrentUser().getSession(function (err, session) {
|
this.getCurrentUser().getSession(function (err, session) {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log("CognitoUtil: Can't set the credentials:" + err);
|
console.log("CognitoUtil: Can't set the credentials:" + err);
|
||||||
jwttoken ='';
|
jwttoken ='';
|
||||||
console.log('81 if')
|
// console.log('81 if')
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (session.isValid()) {
|
if (session.isValid()) {
|
||||||
console.log('85 else if');
|
// console.log('85 else if');
|
||||||
jwttoken = session;
|
jwttoken = session;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ getAccessToken(){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log("else");
|
//console.log("else");
|
||||||
|
|
||||||
}
|
}
|
||||||
return jwttoken;
|
return jwttoken;
|
||||||
@ -102,16 +102,16 @@ getToken():boolean {
|
|||||||
let isloggin = false;
|
let isloggin = false;
|
||||||
if (this.getCurrentUser() != null) {
|
if (this.getCurrentUser() != null) {
|
||||||
//console.log(JSON.stringify(this.getCurrentUser()));
|
//console.log(JSON.stringify(this.getCurrentUser()));
|
||||||
console.log('76 if');
|
//console.log('76 if');
|
||||||
this.getCurrentUser().getSession(function (err, session) {
|
this.getCurrentUser().getSession(function (err, session) {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log("CognitoUtil: Can't set the credentials:" + err);
|
// console.log("CognitoUtil: Can't set the credentials:" + err);
|
||||||
isloggin = false;
|
isloggin = false;
|
||||||
console.log('81 if')
|
//console.log('81 if')
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (session.isValid()) {
|
if (session.isValid()) {
|
||||||
console.log('85 else if');
|
// console.log('85 else if');
|
||||||
isloggin = true;
|
isloggin = true;
|
||||||
} else {
|
} else {
|
||||||
isloggin = false;
|
isloggin = false;
|
||||||
@ -120,7 +120,7 @@ getToken():boolean {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log("else");
|
// console.log("else");
|
||||||
isloggin = false;
|
isloggin = false;
|
||||||
}
|
}
|
||||||
return isloggin;
|
return isloggin;
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import { catchError, map, tap } from 'rxjs/operators';
|
|||||||
import { HttpErrorResponse } from "@angular/common/http";
|
import { HttpErrorResponse } from "@angular/common/http";
|
||||||
|
|
||||||
import { CognitoService } from '../AwsService/cognito.service';
|
import { CognitoService } from '../AwsService/cognito.service';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class TokenInterceptor implements HttpInterceptor{
|
export class TokenInterceptor implements HttpInterceptor{
|
||||||
constructor( private router: Router,public shared:CognitoService) {}
|
constructor( private router: Router,public shared:CognitoService) {}
|
||||||
@ -24,12 +25,12 @@ export class TokenInterceptor implements HttpInterceptor{
|
|||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
let token:any = this.shared.getAccessToken() ||"";
|
let token:any = this.shared.getAccessToken() ||"";
|
||||||
console.log(token);
|
//console.log(token);
|
||||||
let requests = request.clone({
|
let requests = request.clone({
|
||||||
headers:new HttpHeaders({
|
headers:new HttpHeaders({
|
||||||
'Content-Type': 'application/json',
|
|
||||||
'Authorization': 'sparqvenba2018',
|
'Authorization': 'sparqvenba2018',
|
||||||
'token': token.getIdToken().getJwtToken()
|
'Token': token.getIdToken().getJwtToken()
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
return next.handle(requests).pipe(
|
return next.handle(requests).pipe(
|
||||||
|
|||||||
@ -12,5 +12,5 @@ export class AppComponent {
|
|||||||
|
|
||||||
const browserLang: string = translate.getBrowserLang();
|
const browserLang: string = translate.getBrowserLang();
|
||||||
translate.use(browserLang.match(/en|fr/) ? browserLang : 'en');
|
translate.use(browserLang.match(/en|fr/) ? browserLang : 'en');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -164,7 +164,7 @@
|
|||||||
<mat-icon>notifications_off</mat-icon>
|
<mat-icon>notifications_off</mat-icon>
|
||||||
Disable notifications
|
Disable notifications
|
||||||
</button>
|
</button>
|
||||||
<button mat-menu-item>
|
<button mat-menu-item (click)="logout()">
|
||||||
<mat-icon>exit_to_app</mat-icon>
|
<mat-icon>exit_to_app</mat-icon>
|
||||||
Sign Out
|
Sign Out
|
||||||
</button>
|
</button>
|
||||||
@ -254,7 +254,7 @@
|
|||||||
<mat-icon>notifications_off</mat-icon>
|
<mat-icon>notifications_off</mat-icon>
|
||||||
Disable notifications
|
Disable notifications
|
||||||
</button>
|
</button>
|
||||||
<button mat-menu-item>
|
<button mat-menu-item (click)="logout()">
|
||||||
<mat-icon>exit_to_app</mat-icon>
|
<mat-icon>exit_to_app</mat-icon>
|
||||||
Sign Out
|
Sign Out
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -10,6 +10,8 @@ import PerfectScrollbar from 'perfect-scrollbar';
|
|||||||
import { PerfectScrollbarConfigInterface,
|
import { PerfectScrollbarConfigInterface,
|
||||||
PerfectScrollbarComponent, PerfectScrollbarDirective } from 'ngx-perfect-scrollbar';
|
PerfectScrollbarComponent, PerfectScrollbarDirective } from 'ngx-perfect-scrollbar';
|
||||||
|
|
||||||
|
import { AwsService } from '../../AwsService/aws.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-layout',
|
selector: 'app-layout',
|
||||||
templateUrl: './admin-layout.component.html'
|
templateUrl: './admin-layout.component.html'
|
||||||
@ -38,7 +40,7 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
|
|||||||
@ViewChild('sidemenu') sidemenu;
|
@ViewChild('sidemenu') sidemenu;
|
||||||
public config: PerfectScrollbarConfigInterface = {};
|
public config: PerfectScrollbarConfigInterface = {};
|
||||||
|
|
||||||
constructor(private router: Router, public menuItems: MenuItems, public horizontalMenuItems : HorizontalMenuItems, public translate: TranslateService ) {
|
constructor(private router: Router, public menuItems: MenuItems, public horizontalMenuItems : HorizontalMenuItems, public translate: TranslateService,public aws:AwsService ) {
|
||||||
const browserLang: string = translate.getBrowserLang();
|
const browserLang: string = translate.getBrowserLang();
|
||||||
translate.use(browserLang.match(/en|fr/) ? browserLang : 'en');
|
translate.use(browserLang.match(/en|fr/) ? browserLang : 'en');
|
||||||
}
|
}
|
||||||
@ -200,4 +202,11 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
|
|||||||
]
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
logout(){
|
||||||
|
//alert();
|
||||||
|
this.aws.logout().subscribe(res=>{
|
||||||
|
//alert("res");
|
||||||
|
this.router.navigate(['/authentication/login']);
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
177
ng6-seed/src/app/settings/service/user.service.ts
Normal file
177
ng6-seed/src/app/settings/service/user.service.ts
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { HttpClient } from '@angular/common/http';
|
||||||
|
import { Observable } from 'rxjs/internal/Observable';
|
||||||
|
import { AwsService } from '../../AwsService/aws.service';
|
||||||
|
const apiurl = 'http://localhost/sineedge/sparqapi/api/';
|
||||||
|
const currentdate = new Date().toJSON().slice(0,19).replace('T',' ');
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
|
||||||
|
export class UserService {
|
||||||
|
|
||||||
|
localUserId: any;
|
||||||
|
constructor(public http:HttpClient,public aws:AwsService) { }
|
||||||
|
|
||||||
|
|
||||||
|
getuserdata() {
|
||||||
|
|
||||||
|
return this.http.get(apiurl + 'getListOfUsers');
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Admin Local Update
|
||||||
|
* @param records
|
||||||
|
*/
|
||||||
|
adminupendis(records){
|
||||||
|
//let headers = this.shared.headercofig('');
|
||||||
|
// console.log(headers);
|
||||||
|
//let session = this.shared.getAccessToken() || "";
|
||||||
|
let formData = new FormData();
|
||||||
|
formData.append('records',JSON.stringify(records));
|
||||||
|
|
||||||
|
return this.http.post(apiurl+'updateExistUser',formData);
|
||||||
|
//console.log(users);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
entityType(){
|
||||||
|
|
||||||
|
let master_name = {'master_name':'ENTITYTYPE'};
|
||||||
|
return this.http.post(apiurl+'getListOfMaster',master_name);
|
||||||
|
}
|
||||||
|
City(){
|
||||||
|
|
||||||
|
let master_name = {'master_name':'CITY'};
|
||||||
|
return this.http.post(apiurl+'getListOfMaster',master_name);
|
||||||
|
}
|
||||||
|
State(){
|
||||||
|
|
||||||
|
let master_name = {'master_name':'STATE'};
|
||||||
|
return this.http.post(apiurl+'getListOfMaster',master_name);
|
||||||
|
}
|
||||||
|
designation(){
|
||||||
|
|
||||||
|
let master_name = {'master_name':'DESIGNATION'};
|
||||||
|
return this.http.post(apiurl+'getListOfMaster',master_name);
|
||||||
|
}
|
||||||
|
lenderHierarchy(){
|
||||||
|
|
||||||
|
let master_name = {'master_name':'LENDERHIERARCHY'};
|
||||||
|
return this.http.post(apiurl+'getListOfMaster',master_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* AWS User Create Local DB
|
||||||
|
* @param cognitousers,users
|
||||||
|
**/
|
||||||
|
saveRecords(cognitousers, users) {
|
||||||
|
|
||||||
|
let data: any = '';
|
||||||
|
|
||||||
|
if (cognitousers != '' && cognitousers !== undefined) {
|
||||||
|
//console.log(users);
|
||||||
|
let aws_name :any;
|
||||||
|
let updateby:any;
|
||||||
|
let createdby:any;
|
||||||
|
let createdon:any;
|
||||||
|
let updateon:any;
|
||||||
|
|
||||||
|
if(users.userid != null){
|
||||||
|
aws_name = users.aws_name;
|
||||||
|
updateby = this.aws.getlocale() || "";
|
||||||
|
updateon = currentdate;
|
||||||
|
}else{
|
||||||
|
aws_name = cognitousers.User.Username;
|
||||||
|
createdby = this.aws.getlocale() || "";
|
||||||
|
createdon = currentdate;
|
||||||
|
}
|
||||||
|
|
||||||
|
let profilepic:any;
|
||||||
|
if(users.userpic !=null && users.userpic !='' && users.userpic !==undefined){
|
||||||
|
profilepic= users.userpic.name;
|
||||||
|
}
|
||||||
|
console.log(profilepic);
|
||||||
|
let formData = new FormData();
|
||||||
|
console.log(users);
|
||||||
|
|
||||||
|
|
||||||
|
let roles:any=[];
|
||||||
|
for(var role of users.role){
|
||||||
|
|
||||||
|
roles.push({ "user_role": role.value });
|
||||||
|
}
|
||||||
|
let designation:any;
|
||||||
|
if(users.type.entity_type_id ==2){
|
||||||
|
let lenderhie:any =[];
|
||||||
|
lenderhie.push(users.lenderHierarchy);
|
||||||
|
formData.append('lender_hierarchy',JSON.stringify(lenderhie));
|
||||||
|
designation = '';
|
||||||
|
}else if(users.type.entity_type_id ==1){
|
||||||
|
designation =users.designation.designation_id;
|
||||||
|
}
|
||||||
|
let records:any = {
|
||||||
|
"userid":users.userid,
|
||||||
|
"aws_name": aws_name,
|
||||||
|
"first_name": users.firstName,
|
||||||
|
"last_name": users.lastName,
|
||||||
|
"mobile_no": users.phone,
|
||||||
|
"email": users.email,
|
||||||
|
"alt_email":users.alt_email,
|
||||||
|
"alt_mobile_no":users.alt_mobile_no,
|
||||||
|
"addressline1":users.address1,
|
||||||
|
"addressline2":users.address2,
|
||||||
|
"addressline3":users.address3,
|
||||||
|
"isactive":users.isactive,
|
||||||
|
"fk_entity_id":users.type.entity_type_id,
|
||||||
|
"fk_designation":designation,
|
||||||
|
"fk_city":users.city.city_id,
|
||||||
|
"fk_state":users.state.state_id,
|
||||||
|
"pincode":users.pincode,
|
||||||
|
"profilepic":profilepic,
|
||||||
|
"fk_createdby":createdby,
|
||||||
|
"fk_updatedby":updateby,
|
||||||
|
"createdon":createdon,
|
||||||
|
"updatedon":updateon,
|
||||||
|
};
|
||||||
|
//console.log(roles);
|
||||||
|
formData.append('records',JSON.stringify(records));
|
||||||
|
formData.append('roles',JSON.stringify(roles));
|
||||||
|
formData.append('profilepic',users.userpic);
|
||||||
|
|
||||||
|
//new Response(formData).text().then(console.log);
|
||||||
|
//let headers = this.shared.headercofig('');
|
||||||
|
|
||||||
|
|
||||||
|
//(request);
|
||||||
|
if(users.userid !='' && users.userid !=null && users.userid !==undefined){
|
||||||
|
delete this.localUserId;
|
||||||
|
return this.http.post(apiurl+'updateExistUser',formData);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
return this.http.post(apiurl + "saveNewUser", formData);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
adminGetUsers(userId){
|
||||||
|
console.log(userId);
|
||||||
|
this.localUserId = userId;
|
||||||
|
return Observable.create(observe=>{
|
||||||
|
console.log(this.localUserId);
|
||||||
|
observe.next(this.localUserId);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@ -1,18 +1,47 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { UserComponent } from './user/user.component';
|
|
||||||
|
import {
|
||||||
|
MatCardModule,
|
||||||
|
MatIconModule,
|
||||||
|
MatInputModule,
|
||||||
|
MatRadioModule,
|
||||||
|
MatButtonModule,MatTableModule,MatPaginatorModule,
|
||||||
|
MatProgressBarModule,MatDialogModule, MatSortModule,
|
||||||
|
MatToolbarModule,MatSelectModule } from '@angular/material';
|
||||||
|
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
||||||
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
|
import { FileUploadModule } from 'ng2-file-upload/ng2-file-upload';
|
||||||
|
import { TreeModule } from 'angular-tree-component';
|
||||||
|
import { NgxDatatableModule } from '@swimlane/ngx-datatable';
|
||||||
|
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||||
|
|
||||||
|
import { DemoMaterialModule } from '../shared/demo.module';
|
||||||
|
// import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
|
||||||
|
import 'hammerjs';
|
||||||
|
|
||||||
|
|
||||||
|
import { UserListComponent } from './users/user-list/user-list.component';
|
||||||
import { RouterModule } from '@angular/router';
|
import { RouterModule } from '@angular/router';
|
||||||
import { UserRoutes} from './users.routing';
|
import { SettingsRoutes } from './settings.routing';
|
||||||
import { RegisterComponent } from './register/register.component';
|
import { RegisterComponent } from '../session/register/register.component';
|
||||||
import { UserService } from './user.service';
|
import { UserService } from './service/user.service';
|
||||||
|
|
||||||
// import { HttpClientModule } from '@angular/common/http';
|
// import { HttpClientModule } from '@angular/common/http';
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
RouterModule.forChild(UserRoutes),
|
RouterModule.forChild(SettingsRoutes),MatCardModule,
|
||||||
|
MatIconModule,
|
||||||
|
MatInputModule,
|
||||||
|
MatRadioModule,
|
||||||
|
MatButtonModule,MatTableModule,MatPaginatorModule,
|
||||||
|
MatProgressBarModule,MatDialogModule, MatSortModule,
|
||||||
|
MatToolbarModule,MatSelectModule,
|
||||||
|
FormsModule,ReactiveFormsModule,
|
||||||
// HttpClientModule,
|
// HttpClientModule,
|
||||||
],
|
],
|
||||||
declarations: [UserComponent, RegisterComponent],
|
|
||||||
providers:[
|
providers:[
|
||||||
UserService
|
UserService
|
||||||
]
|
]
|
||||||
|
|||||||
10
ng6-seed/src/app/settings/settings.routing.ts
Normal file
10
ng6-seed/src/app/settings/settings.routing.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { Routes } from '@angular/router';
|
||||||
|
|
||||||
|
|
||||||
|
export const SettingsRoutes: Routes = [{
|
||||||
|
path: '',
|
||||||
|
children:[{
|
||||||
|
path:'users',
|
||||||
|
loadChildren:'./users/users.module#UsersModule'
|
||||||
|
}]
|
||||||
|
}]
|
||||||
174
ng6-seed/src/app/settings/users/register/register.component.html
Executable file
174
ng6-seed/src/app/settings/users/register/register.component.html
Executable file
@ -0,0 +1,174 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<mat-card>
|
||||||
|
|
||||||
|
<mat-card-title> <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon button" (click)="back()"><mat-icon>chevron_left</mat-icon></button> User Registration</mat-card-title>
|
||||||
|
<!-- <mat-card-subtitle>Angular2 custom validation</mat-card-subtitle> -->
|
||||||
|
<form [formGroup]="regForm" (ngSubmit)="register(regForm.value)">
|
||||||
|
<mat-card-content>
|
||||||
|
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
|
<input matInput placeholder="First name" [formControl]="regForm.controls['firstName']">
|
||||||
|
<mat-error *ngIf="regForm.controls['firstName'].hasError('required') && regForm.controls['firstName'].touched" class="mat-text-warn">You must include a first name.</mat-error>
|
||||||
|
<mat-error *ngIf="regForm.controls['firstName'].hasError('minlength') && regForm.controls['firstName'].touched" class="mat-text-warn">Your first name must be at least 5 characters long.</mat-error>
|
||||||
|
<mat-error *ngIf="regForm.controls['firstName'].hasError('maxlength') && regForm.controls['firstName'].touched" class="mat-text-warn">Your first name cannot exceed 10 characters.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
|
<input matInput placeholder="Last name" [formControl]="regForm.controls['lastName']">
|
||||||
|
<mat-error *ngIf="regForm.controls['lastName'].hasError('required') && regForm.controls['lastName'].touched" class="mat-text-warn">You must include a last name.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
<!-- <mat-error *ngIf="regForm.controls['lastName'].hasError('minlength') && regForm.controls['lastName'].touched" class="mat-text-warn">Your first name must be at least 5 characters long.</mat-error>
|
||||||
|
<mat-error *ngIf="regForm.controls['lastName'].hasError('maxlength') && regForm.controls['lastName'].touched" class="mat-text-warn">Your first name cannot exceed 10 characters.</mat-error> -->
|
||||||
|
<mat-form-field style="display: none;">
|
||||||
|
<input matInput placeholder="User Id" [formControl]="regForm.controls['userid']">
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
|
<input matInput placeholder="Email address" [formControl]="regForm.controls['email']" type="email">
|
||||||
|
<mat-error *ngIf="regForm.controls['email'].hasError('required') && regForm.controls['email'].touched" class="mat-text-warn">You must include an email address.</mat-error>
|
||||||
|
<mat-error *ngIf="regForm.controls['email'].errors?.email && regForm.controls['email'].touched" class="mat-text-warn">You must include a valid email address.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
|
<input matInput placeholder="Alt Email address" [formControl]="regForm.controls['altemail']" type="email">
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-error *ngIf="regForm.controls['email'].errors?.email && regForm.controls['altemail'].touched" class="mat-text-warn">You must include a valid email address.</mat-error>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
|
<input matInput placeholder="Phone number" [formControl]="regForm.controls['phone']" type="text">
|
||||||
|
<mat-error *ngIf="regForm.controls['phone'].hasError('required') && regForm.controls['phone'].touched" class="mat-text-warn">You must include phone number.</mat-error>
|
||||||
|
<mat-error *ngIf="regForm.controls['phone'].errors?.phone && regForm.controls['phone'].touched" class="mat-text-warn">You must include a valid phone number.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
|
<input matInput placeholder="Alt Phone number" [formControl]="regForm.controls['altphone']" type="text">
|
||||||
|
<mat-error *ngIf="regForm.controls['altphone'].errors?.phone && regForm.controls['phone'].touched" class="mat-text-warn">You must include a valid phone number.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
<!-- <mat-error *ngIf="regForm.controls['phone'].hasError('required') && regForm.controls['phone'].touched" class="mat-text-warn">You must include phone number.</mat-error> -->
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
|
|
||||||
|
<input matInput placeholder="Address 1" [formControl]="regForm.controls['address1']">
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
|
|
||||||
|
<input matInput placeholder="Address 2" [formControl]="regForm.controls['address2']">
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
|
|
||||||
|
<input matInput placeholder="Address 3" [formControl]="regForm.controls['address3']">
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
|
|
||||||
|
<input matInput placeholder="Pincode" [formControl]="regForm.controls['pincode']">
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
|
<mat-select matInput placeholder="Select Role" [formControl]="regForm.controls['role']" required multiple>
|
||||||
|
<!-- <mat-option #allSelected (click)="toggleAllSelection()" [value]="0">ALL</mat-option> -->
|
||||||
|
<mat-option *ngFor="let role of roles" [value]="role" (onSelectionChange)="toggleAllSelection($event)" >
|
||||||
|
{{role.name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
|
||||||
|
<mat-error *ngIf="regForm.controls['role'].hasError('required') && regForm.controls['role'].touched" class="mat-text-warn">Select User Role</mat-error>
|
||||||
|
<mat-error *ngIf="regForm.controls['role'].errors?.phone && regForm.controls['role'].touched" class="mat-text-warn">Select User Role</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
<!-- <pre>{{regForm.controls['role'].value | json}}</pre> -->
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
|
<mat-select matInput placeholder="Select type" (selectionChange)="checktype($event.value)"[formControl]="regForm.controls['type']" required>
|
||||||
|
<mat-option>--</mat-option>
|
||||||
|
<mat-option *ngFor="let types of types" [value]="types" >
|
||||||
|
{{types.name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="regForm.controls['type'].hasError('required') && regForm.controls['type'].touched" class="mat-text-warn">Select User Role</mat-error>
|
||||||
|
<mat-error *ngIf="regForm.controls['type'].errors?.phone && regForm.controls['type'].touched" class="mat-text-warn">Select User Role</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
|
<mat-select matInput placeholder="Select State" [formControl]="regForm.controls['state']" required>
|
||||||
|
<mat-option>--</mat-option>
|
||||||
|
<mat-option *ngFor="let s of State" [value]="s">
|
||||||
|
{{s.name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
|
<mat-select matInput placeholder="Select City" [formControl]="regForm.controls['city']" required>
|
||||||
|
<mat-option>--</mat-option>
|
||||||
|
<mat-option *ngFor="let c of City" [value]="c">
|
||||||
|
{{c.name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" *ngIf="typeValue == '1'">
|
||||||
|
<mat-select matInput placeholder="Select designation" [formControl]="regForm.controls['designation']" required>
|
||||||
|
<mat-option>--</mat-option>
|
||||||
|
<mat-option *ngFor="let d of designation" [value]="d">
|
||||||
|
{{d.name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" *ngIf="typeValue == '2'">
|
||||||
|
<mat-select matInput placeholder="Select lenderHierarchy" [formControl]="regForm.controls['lenderHierarchy']" required>
|
||||||
|
<mat-option>--</mat-option>
|
||||||
|
<mat-option *ngFor="let l of lenderHierarchy" [value]="l">
|
||||||
|
{{l.lender_hierarchy}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||||
|
UserProfile
|
||||||
|
<input type="file" (change)="onFileChange($event)" [formControl]="regForm.controls['userpic']"/>
|
||||||
|
|
||||||
|
<span *ngIf="usersData!=''">{{img}}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<mat-slide-toggle color="primary" [formControl]="regForm.controls['isactive']">
|
||||||
|
Isactive
|
||||||
|
</mat-slide-toggle>
|
||||||
|
</mat-card-content>
|
||||||
|
<hr>
|
||||||
|
<!-- <pre>{{regForm.controls['userid'].value | json}}</pre> -->
|
||||||
|
|
||||||
|
<mat-card-actions >
|
||||||
|
|
||||||
|
|
||||||
|
<button mat-raised-button color="primary" type="submit">Submit</button>
|
||||||
|
</mat-card-actions>
|
||||||
|
</form>
|
||||||
|
<!-- <button mat-raised-button color="primary" (click)="userupdate()" >Submit</button> -->
|
||||||
|
</mat-card>
|
||||||
|
<div *ngIf="loader">
|
||||||
|
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
|
||||||
|
|
||||||
|
</div>
|
||||||
16
ng6-seed/src/app/settings/users/register/register.component.scss
Executable file
16
ng6-seed/src/app/settings/users/register/register.component.scss
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
// .mat-card-title{
|
||||||
|
|
||||||
|
// color: #fff;
|
||||||
|
// margin-left: 13px;
|
||||||
|
// background: rgba(157, 69, 124, 1);
|
||||||
|
// box-shadow: 0 4px 20px 0 rgba(157, 69, 124, 1), 0 7px 10px -5px rgba(157, 69, 124, 1);;
|
||||||
|
// display: inline-block;
|
||||||
|
// border-radius: 6px;
|
||||||
|
// padding: 10px;
|
||||||
|
// margin-top: -52px;
|
||||||
|
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
25
ng6-seed/src/app/settings/users/register/register.component.spec.ts
Executable file
25
ng6-seed/src/app/settings/users/register/register.component.spec.ts
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { RegisterComponent } from './register.component';
|
||||||
|
|
||||||
|
describe('RegisterComponent', () => {
|
||||||
|
let component: RegisterComponent;
|
||||||
|
let fixture: ComponentFixture<RegisterComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ RegisterComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(RegisterComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
305
ng6-seed/src/app/settings/users/register/register.component.ts
Executable file
305
ng6-seed/src/app/settings/users/register/register.component.ts
Executable file
@ -0,0 +1,305 @@
|
|||||||
|
import { Component, OnInit, ChangeDetectorRef, ViewChild, ElementRef,Pipe } from '@angular/core';
|
||||||
|
|
||||||
|
import { Router } from "@angular/router";
|
||||||
|
import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
|
||||||
|
import { CustomValidators } from 'ng2-validation';
|
||||||
|
import { AwsService } from '../../../AwsService/aws.service';
|
||||||
|
import { FileUploader } from 'ng2-file-upload/ng2-file-upload';
|
||||||
|
// import { SharedService } from '../../shared.service';
|
||||||
|
import { MatOption } from '@angular/material';
|
||||||
|
import { UserService } from '../../service/user.service';
|
||||||
|
import { ifStmt } from '@angular/compiler/src/output/output_ast';
|
||||||
|
@Component({
|
||||||
|
selector: 'app-register',
|
||||||
|
templateUrl: './register.component.html',
|
||||||
|
styleUrls: ['./register.component.scss']
|
||||||
|
})
|
||||||
|
export class RegisterComponent implements OnInit {
|
||||||
|
img: any;
|
||||||
|
roles: any;
|
||||||
|
types: any;
|
||||||
|
loader:boolean = false;
|
||||||
|
public regForm: FormGroup;
|
||||||
|
|
||||||
|
// name: string;
|
||||||
|
// email: string;
|
||||||
|
// password: string;
|
||||||
|
// passwordConfirm: string;
|
||||||
|
entityType: any;
|
||||||
|
City: any;
|
||||||
|
State: any;
|
||||||
|
designation: any;
|
||||||
|
hierarchy:any=[];
|
||||||
|
files: File = null
|
||||||
|
usersData: any;
|
||||||
|
sampledrop:any;
|
||||||
|
typeValue:any;
|
||||||
|
lenderHierarchy:any;
|
||||||
|
@ViewChild('allSelected') private allSelected: MatOption;
|
||||||
|
constructor(
|
||||||
|
private router: Router, public fb: FormBuilder, public AWS: AwsService, private cd: ChangeDetectorRef
|
||||||
|
,private elementRef: ElementRef,public users:UserService) { }
|
||||||
|
ngOnInit() {
|
||||||
|
console.log(this.users.localUserId);
|
||||||
|
if (this.users.localUserId != '' && this.users.localUserId != null && this.users.localUserId !== undefined) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.regdata();
|
||||||
|
}
|
||||||
|
this.roles = [
|
||||||
|
{ name: 'Admin', value: 'ADMIN' },
|
||||||
|
{ name: 'Audit', value: 'AUDIT' }
|
||||||
|
];
|
||||||
|
|
||||||
|
this.regForm = this.fb.group({
|
||||||
|
userid: [null],
|
||||||
|
firstName: [null, Validators.compose([Validators.required, Validators.minLength(2), Validators.maxLength(10)])],
|
||||||
|
lastName: [null, Validators.compose([Validators.required])],
|
||||||
|
phone: [null, Validators.compose([Validators.required, Validators.minLength(10), Validators.maxLength(12)])],
|
||||||
|
altphone: [null, Validators.compose([Validators.minLength(10), Validators.maxLength(12)])],
|
||||||
|
email: [null, Validators.compose([Validators.required, CustomValidators.email])],
|
||||||
|
altemail: [null, Validators.compose([CustomValidators.email])],
|
||||||
|
role: [null, Validators.compose([Validators.required])],
|
||||||
|
type: [null, Validators.compose([Validators.required])],
|
||||||
|
address1: [null, ''],
|
||||||
|
address2: [null, ''],
|
||||||
|
address3: [null, ''],
|
||||||
|
state: [null, Validators.compose([Validators.required])],
|
||||||
|
city: [null, Validators.compose([Validators.required])],
|
||||||
|
designation: [null, Validators.compose([Validators.required])],
|
||||||
|
userpic: [null],
|
||||||
|
isactive: [true],
|
||||||
|
pincode: [null],
|
||||||
|
lenderHierarchy:[null,Validators.compose([Validators.required])],
|
||||||
|
|
||||||
|
});
|
||||||
|
this.userupdate();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
onSelect(e){
|
||||||
|
// alert();
|
||||||
|
// console.log(e)
|
||||||
|
// console.log(e.isUserInput);
|
||||||
|
// console.log(this.regForm.controls['role'].value);
|
||||||
|
}
|
||||||
|
|
||||||
|
regdata() {
|
||||||
|
this.users.entityType().subscribe(res => {
|
||||||
|
this.types = res;
|
||||||
|
if (this.types.status == 200) {
|
||||||
|
this.types = this.types.records;
|
||||||
|
//console.log(this.types);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.users.City().subscribe(res => {
|
||||||
|
this.City = res;
|
||||||
|
if (this.City.status == 200) {
|
||||||
|
this.City = this.City.records;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.users.State().subscribe(res => {
|
||||||
|
this.State = res;
|
||||||
|
if (this.State.status == 200) {
|
||||||
|
this.State = this.State.records;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.users.designation().subscribe(res => {
|
||||||
|
this.designation = res;
|
||||||
|
if (this.designation.status == 200) {
|
||||||
|
this.designation = this.designation.records;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.users.lenderHierarchy().subscribe(res=>{
|
||||||
|
this.lenderHierarchy = res;
|
||||||
|
if(this.lenderHierarchy.status ==200){
|
||||||
|
this.lenderHierarchy = this.lenderHierarchy.records;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
//console.log(this.State+''+this.types+''+this.City+''+this.designation);
|
||||||
|
}
|
||||||
|
onFileChange($event) {
|
||||||
|
//console.log($event.target.files[0]);
|
||||||
|
|
||||||
|
//if($event.target.files[0] < 0 ){
|
||||||
|
this.files = $event.target.files[0];
|
||||||
|
//}
|
||||||
|
//console.log(this.files);
|
||||||
|
}
|
||||||
|
register(userData) {
|
||||||
|
let data:any;
|
||||||
|
console.log(this.usersData);
|
||||||
|
// console.log(this.files);
|
||||||
|
if (this.usersData != '' && this.usersData !== undefined) {
|
||||||
|
if (this.files) {
|
||||||
|
userData.userpic = this.files;
|
||||||
|
} else {
|
||||||
|
userData.userpic = this.usersData.profilepic;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (this.files) {
|
||||||
|
userData.userpic = this.files;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//console.log(this.usersData);
|
||||||
|
this.loader = true;
|
||||||
|
if (this.usersData === undefined) {
|
||||||
|
|
||||||
|
this.AWS.register(userData).subscribe(res => {
|
||||||
|
if (res.User.UserStatus != '' && res.User.UserStatus !== undefined && res.User.UserStatus != null) {
|
||||||
|
this.AWS.UserGroup(res,userData).subscribe(res=>{
|
||||||
|
this.users.saveRecords(res, userData).subscribe(res => {
|
||||||
|
data = res;
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.AWS.adminUpdateuser(userData, data.record).subscribe(res => {
|
||||||
|
this.loader =false;
|
||||||
|
console.log(res);
|
||||||
|
alert('user Created');
|
||||||
|
this.router.navigate(['setting/users/userlist']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.AWS.adminchangeData(this.usersData,userData).subscribe(res=>{
|
||||||
|
this.users.saveRecords(res,userData).subscribe(res=>{
|
||||||
|
this.loader = false;
|
||||||
|
alert('Update User');
|
||||||
|
this.router.navigate(['setting/users/userlist']);
|
||||||
|
//this.shared.redirectTo('settings/userListing');
|
||||||
|
delete this.AWS.localUserId;
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
toggleAllSelection(e) {
|
||||||
|
|
||||||
|
|
||||||
|
if (this.usersData != '' && this.usersData !==undefined) {
|
||||||
|
let users: any;
|
||||||
|
console.log(this.usersData);
|
||||||
|
//for (let role of this.usersData[0]) {
|
||||||
|
//this.AWS.adminremoveGroup(roles,this.usersData);
|
||||||
|
if(e.source.selected){
|
||||||
|
this.AWS.UserGroup(e.source.value,this.usersData);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
this.AWS.adminremoveGroup(e.source.value,this.usersData);
|
||||||
|
console.log("else");
|
||||||
|
}
|
||||||
|
//this.AWS.adminremoveGroup()
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
userupdate() {
|
||||||
|
|
||||||
|
if (this.users.localUserId != '' && this.users.localUserId != null && this.users.localUserId !== undefined) {
|
||||||
|
this.usersData = this.users.localUserId;
|
||||||
|
console.log(this.usersData);
|
||||||
|
console.log(this.usersData);
|
||||||
|
this.users.entityType().subscribe(res => {
|
||||||
|
this.types = res;
|
||||||
|
if (this.types.status == 200) {
|
||||||
|
this.types = this.types.records;
|
||||||
|
let type = this.types.filter(type => type.entity_type_id == this.usersData.fk_entity_id)[0];
|
||||||
|
this.regForm.controls['type'].setValue(type);
|
||||||
|
this.checktype(type);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.users.City().subscribe(res => {
|
||||||
|
this.City = res;
|
||||||
|
if (this.City.status == 200) {
|
||||||
|
this.City = this.City.records;
|
||||||
|
let citys = this.City.filter(city => city.city_id == this.usersData.fk_city)[0];
|
||||||
|
this.regForm.controls['city'].setValue(citys);
|
||||||
|
// console.log(this.City);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.users.State().subscribe(res => {
|
||||||
|
this.State = res;
|
||||||
|
if (this.State.status == 200) {
|
||||||
|
this.State = this.State.records;
|
||||||
|
let states = this.State.filter(state => state.state_id == this.usersData.fk_state)[0];
|
||||||
|
// console.log(this.State);
|
||||||
|
this.regForm.controls['state'].setValue(states);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.users.designation().subscribe(res => {
|
||||||
|
this.designation = res;
|
||||||
|
if (this.designation.status == 200) {
|
||||||
|
this.designation = this.designation.records;
|
||||||
|
let des = this.designation.filter(des => des.designation_id == this.usersData.fk_designation)[0];
|
||||||
|
this.regForm.controls['designation'].setValue(des);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.users.lenderHierarchy().subscribe(res=>{
|
||||||
|
this.lenderHierarchy = res;
|
||||||
|
if(this.lenderHierarchy.status ==200){
|
||||||
|
this.lenderHierarchy = this.lenderHierarchy.records;
|
||||||
|
let hie = this.lenderHierarchy.filter(hie => hie.lender_hierarchy_id == this.usersData.fk_hierarchy_id)[0];
|
||||||
|
console.log(hie);
|
||||||
|
this.regForm.controls['lenderHierarchy'].setValue(hie);
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let userRole: any = [];
|
||||||
|
//console.log(this.usersData.profilepic);
|
||||||
|
for (let role of this.usersData[0]) {
|
||||||
|
//console.log(role);
|
||||||
|
userRole.push(this.roles.filter(roles => roles.value == role.user_role)[0]);
|
||||||
|
//console.log(userRole);
|
||||||
|
}
|
||||||
|
|
||||||
|
//console.log(userRole);
|
||||||
|
// this.regForm.controls['firstName'].setValue({'firstName':'sriram'});
|
||||||
|
this.regForm.controls['userid'].setValue(this.usersData.userid);
|
||||||
|
this.regForm.controls['firstName'].setValue(this.usersData.user_first_name);
|
||||||
|
this.regForm.controls['lastName'].setValue(this.usersData.user_last_name);
|
||||||
|
this.regForm.controls['phone'].setValue(this.usersData.mobile_no);
|
||||||
|
this.regForm.controls['altphone'].setValue(this.usersData.alt_mobile_no);
|
||||||
|
this.regForm.controls['email'].setValue(this.usersData.email);
|
||||||
|
this.regForm.controls['altemail'].setValue(this.usersData.alt_email);
|
||||||
|
this.regForm.controls['address1'].setValue(this.usersData.addressline1);
|
||||||
|
this.regForm.controls['address2'].setValue(this.usersData.addressline2);
|
||||||
|
this.regForm.controls['address3'].setValue(this.usersData.addressline3);
|
||||||
|
if (this.usersData.isactive == 1) {
|
||||||
|
this.regForm.controls['isactive'].setValue(true);
|
||||||
|
} else {
|
||||||
|
this.regForm.controls['isactive'].setValue(false);
|
||||||
|
}
|
||||||
|
this.regForm.controls['role'].setValue(userRole);
|
||||||
|
// this.regForm.controls['userpic'].setValue(this.usersData.profilepic);
|
||||||
|
this.regForm.controls['pincode'].setValue(this.usersData.pincode);
|
||||||
|
this.img = this.usersData.profilepic;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
checktype(e){
|
||||||
|
console.log(e);
|
||||||
|
if(e !== undefined){
|
||||||
|
switch (e.entity_type_id) {
|
||||||
|
case "1":
|
||||||
|
this.typeValue =1;
|
||||||
|
break;
|
||||||
|
case "2":
|
||||||
|
this.typeValue =2;
|
||||||
|
break;
|
||||||
|
case "3":
|
||||||
|
this.typeValue =3;
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
this.typeValue = -1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
back(){
|
||||||
|
delete this.users.localUserId;
|
||||||
|
this.router.navigate(['setting/users/userlist']);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
import {Router} from "@angular/router";
|
||||||
|
import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
|
||||||
|
import { CustomValidators } from 'ng2-validation';
|
||||||
|
import { AwsService } from '../../aws.service';
|
||||||
|
@Component({
|
||||||
|
selector: 'app-register',
|
||||||
|
templateUrl: './register.component.html',
|
||||||
|
styleUrls: ['./register.component.scss']
|
||||||
|
})
|
||||||
|
export class RegisterComponent implements OnInit {
|
||||||
|
roles:any;
|
||||||
|
types:any;
|
||||||
|
public regForm :FormGroup;
|
||||||
|
|
||||||
|
// name: string;
|
||||||
|
// email: string;
|
||||||
|
// password: string;
|
||||||
|
// passwordConfirm: string;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
private router: Router,public fb:FormBuilder,public AWS:AwsService
|
||||||
|
) { }
|
||||||
|
ngOnInit(){
|
||||||
|
this.roles = [
|
||||||
|
{name:'Admin',value:'ADMIN'},
|
||||||
|
{name:'Audit',value:'AUDIT'}
|
||||||
|
]
|
||||||
|
this.types = [
|
||||||
|
{name:'Sineedge',value:'1'},
|
||||||
|
{name:'Lender',value:'2'}
|
||||||
|
]
|
||||||
|
this.regForm = this.fb.group({
|
||||||
|
firstName:[null, Validators.compose([Validators.required, Validators.minLength(5), Validators.maxLength(10)])],
|
||||||
|
lastName:[null,Validators.compose([Validators.required])],
|
||||||
|
phone:[null,Validators.compose([Validators.required,Validators.minLength(10),Validators.maxLength(12)])],
|
||||||
|
email:[null,Validators.compose([Validators.required,CustomValidators.email])],
|
||||||
|
role:[null,Validators.compose([Validators.required])],
|
||||||
|
type:[null,Validators.compose([Validators.required])]
|
||||||
|
|
||||||
|
})
|
||||||
|
this.AWS.adminGetuser();
|
||||||
|
}
|
||||||
|
|
||||||
|
register(userData) {
|
||||||
|
console.log(userData);
|
||||||
|
this.AWS.register(userData);
|
||||||
|
// this.router.navigate(['/']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
import {Router} from "@angular/router";
|
||||||
|
import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
|
||||||
|
import { CustomValidators } from 'ng2-validation';
|
||||||
|
import { AwsService } from '../../aws.service';
|
||||||
|
@Component({
|
||||||
|
selector: 'app-register',
|
||||||
|
templateUrl: './register.component.html',
|
||||||
|
styleUrls: ['./register.component.scss']
|
||||||
|
})
|
||||||
|
export class RegisterComponent implements OnInit {
|
||||||
|
roles:any;
|
||||||
|
types:any;
|
||||||
|
public regForm :FormGroup;
|
||||||
|
|
||||||
|
// name: string;
|
||||||
|
// email: string;
|
||||||
|
// password: string;
|
||||||
|
// passwordConfirm: string;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
private router: Router,public fb:FormBuilder,public AWS:AwsService
|
||||||
|
) { }
|
||||||
|
ngOnInit(){
|
||||||
|
this.roles = [
|
||||||
|
{name:'Admin',value:'ADMIN'},
|
||||||
|
{name:'Audit',value:'AUDIT'}
|
||||||
|
];
|
||||||
|
this.types = [
|
||||||
|
{name:'Sineedge',value:'1'},
|
||||||
|
{name:'Lender',value:'2'}
|
||||||
|
];
|
||||||
|
this.regForm = this.fb.group({
|
||||||
|
firstName:[null, Validators.compose([Validators.required, Validators.minLength(5), Validators.maxLength(10)])],
|
||||||
|
lastName:[null,Validators.compose([Validators.required])],
|
||||||
|
phone:[null,Validators.compose([Validators.required,Validators.minLength(10),Validators.maxLength(12)])],
|
||||||
|
email:[null,Validators.compose([Validators.required,CustomValidators.email])],
|
||||||
|
role:[null,Validators.compose([Validators.required])],
|
||||||
|
type:[null,Validators.compose([Validators.required])]
|
||||||
|
|
||||||
|
})
|
||||||
|
this.AWS.adminGetuser();
|
||||||
|
}
|
||||||
|
|
||||||
|
register(userData) {
|
||||||
|
console.log(userData);
|
||||||
|
this.AWS.register(userData);
|
||||||
|
// this.router.navigate(['/']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
<div *ngIf="loader">
|
||||||
|
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: right;">
|
||||||
|
<button mat-raised-button color="primary" (click)="add()">Add Register</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<mat-card>
|
||||||
|
<div datatable>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<table style="border-collapse: collapse">
|
||||||
|
<thead>
|
||||||
|
<th style="text-align: center;">No</th>
|
||||||
|
<th style="text-align: center;">FirstName</th>
|
||||||
|
<th style="text-align: center;">Email</th>
|
||||||
|
<th style="text-align: center;">Mobile No</th>
|
||||||
|
<th style="text-align: center;">Action</th>
|
||||||
|
<th style="text-align: center;">Isactive</th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr *ngFor="let us of userdata; let i=index;" >
|
||||||
|
<td style="text-align: center;">{{i+1}}</td>
|
||||||
|
|
||||||
|
<td style="text-align: center;">{{us.user_first_name}} {{us.user_last_name}}</td>
|
||||||
|
<td style="text-align: center;">{{us.email}}</td>
|
||||||
|
<td style="text-align: center;">{{us.mobile_no}}</td>
|
||||||
|
<td style="text-align: center;font-size: 20px"><a (click)="editUserDetails(us.userid,us.aws_name)"><mat-icon>edit</mat-icon></a></td>
|
||||||
|
|
||||||
|
<td *ngIf="us.isactive ==1" style="text-align: center;"><a class="active" (click)="isactive(us.userid,us.aws_name)"><mat-icon>done</mat-icon></a></td>
|
||||||
|
|
||||||
|
<td *ngIf="us.isactive ==0" style="text-align: center;"><a class="deactive" (click)="isactive(us.userid,us.aws_name)"><mat-icon>close</mat-icon></a></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.active{
|
||||||
|
|
||||||
|
color: green;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
.active:hover{
|
||||||
|
color:red;
|
||||||
|
font-size:25px;
|
||||||
|
}
|
||||||
|
.deactive{
|
||||||
|
|
||||||
|
color: red;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
.deactive:hover{
|
||||||
|
color: green;
|
||||||
|
font-size: 25px;
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { UserListComponent } from './user-list.component';
|
||||||
|
|
||||||
|
describe('UserListComponent', () => {
|
||||||
|
let component: UserListComponent;
|
||||||
|
let fixture: ComponentFixture<UserListComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ UserListComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(UserListComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,97 @@
|
|||||||
|
import { Component, OnInit, ViewChild, } from '@angular/core';
|
||||||
|
import { Router, RouterOutlet } from '@angular/router';
|
||||||
|
import { AwsService } from '../../../AwsService/aws.service';
|
||||||
|
import { MatPaginator, MatTableDataSource } from '@angular/material';
|
||||||
|
import { UserService } from '../../service/user.service';
|
||||||
|
@Component({
|
||||||
|
selector: 'app-user-list',
|
||||||
|
templateUrl: './user-list.component.html',
|
||||||
|
styleUrls: ['./user-list.component.scss']
|
||||||
|
})
|
||||||
|
export class UserListComponent implements OnInit {
|
||||||
|
displayedColumns: string[] = ['position', 'name', 'weight', 'symbol'];
|
||||||
|
|
||||||
|
userdata: any = [];
|
||||||
|
loader: boolean = false;
|
||||||
|
|
||||||
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
|
|
||||||
|
constructor(public aws: AwsService, public route: Router,public users:UserService) { }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.getusers();
|
||||||
|
delete this.aws.localUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
getusers() {
|
||||||
|
this.loader = true;
|
||||||
|
let data:any;
|
||||||
|
this.users.getuserdata().subscribe(res => {
|
||||||
|
this.loader = false;
|
||||||
|
console.log(res);
|
||||||
|
data = res;
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.userdata = data.records;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
isactive(id, awsname) {
|
||||||
|
let data:any;
|
||||||
|
let userstatus = this.userdata.filter((users) => users.userid == id)[0];
|
||||||
|
if (userstatus.isactive == 1) {
|
||||||
|
this.aws.admindisabelUser(userstatus, awsname).subscribe(res => {
|
||||||
|
if (res == 0) {
|
||||||
|
let users = {
|
||||||
|
|
||||||
|
'userid': userstatus.userid,
|
||||||
|
'isactive': '0',
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.users.adminupendis(users).subscribe(res => {
|
||||||
|
data = res;
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.getusers();
|
||||||
|
//this.shared.redirectTo(this.route.url);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.aws.adminenableUser(userstatus, awsname).subscribe(res => {
|
||||||
|
console.log(res);
|
||||||
|
if (res == 1) {
|
||||||
|
let users = {
|
||||||
|
'userid': userstatus.userid,
|
||||||
|
'isactive': '1',
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.users.adminupendis(users).subscribe(res => {
|
||||||
|
data = res;
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.getusers();
|
||||||
|
//this.shared.redirectTo(this.route.url);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
editUserDetails(userId){
|
||||||
|
|
||||||
|
let userDetails = this.userdata.filter(users=>users.userid == userId)[0];
|
||||||
|
this.users.adminGetUsers(userDetails).subscribe(res=>{
|
||||||
|
|
||||||
|
this.route.navigate(['setting/users/register']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
add(){
|
||||||
|
this.route.navigate(['setting/users/register']);
|
||||||
|
}
|
||||||
|
}
|
||||||
38
ng6-seed/src/app/settings/users/users.module.ts
Normal file
38
ng6-seed/src/app/settings/users/users.module.ts
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import {
|
||||||
|
MatCardModule,
|
||||||
|
MatIconModule,
|
||||||
|
MatInputModule,
|
||||||
|
MatRadioModule,
|
||||||
|
MatButtonModule,MatTableModule,MatPaginatorModule,
|
||||||
|
MatProgressBarModule,MatDialogModule, MatSortModule,
|
||||||
|
MatToolbarModule,MatSelectModule } from '@angular/material';
|
||||||
|
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
||||||
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
|
|
||||||
|
|
||||||
|
import { RouterModule } from '@angular/router';
|
||||||
|
import { UserRoutes} from './users.routing';
|
||||||
|
import { RegisterComponent } from './register/register.component';
|
||||||
|
import { UserListComponent} from './user-list/user-list.component';
|
||||||
|
// import { HttpClientModule } from '@angular/common/http';
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
RouterModule.forChild(UserRoutes),
|
||||||
|
MatCardModule,
|
||||||
|
MatIconModule,
|
||||||
|
MatInputModule,
|
||||||
|
MatRadioModule,
|
||||||
|
MatButtonModule,MatTableModule,MatPaginatorModule,
|
||||||
|
MatProgressBarModule,MatDialogModule, MatSortModule,
|
||||||
|
MatToolbarModule,MatSelectModule,
|
||||||
|
MatSlideToggleModule,
|
||||||
|
FormsModule, ReactiveFormsModule,
|
||||||
|
// HttpClientModule,
|
||||||
|
],
|
||||||
|
declarations: [UserListComponent, RegisterComponent],
|
||||||
|
|
||||||
|
})
|
||||||
|
export class UsersModule { }
|
||||||
18
ng6-seed/src/app/settings/users/users.routing.ts
Normal file
18
ng6-seed/src/app/settings/users/users.routing.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { Routes } from '@angular/router';
|
||||||
|
|
||||||
|
import { UserListComponent } from './user-list/user-list.component';
|
||||||
|
import { RegisterComponent } from './register/register.component';
|
||||||
|
export const UserRoutes: Routes = [{
|
||||||
|
path: '',
|
||||||
|
redirectTo: 'userlist',
|
||||||
|
pathMatch: 'full',
|
||||||
|
},{
|
||||||
|
path: '',
|
||||||
|
children: [{
|
||||||
|
path: 'userlist',
|
||||||
|
component: UserListComponent
|
||||||
|
},{
|
||||||
|
path: 'register',
|
||||||
|
component: RegisterComponent
|
||||||
|
}]
|
||||||
|
}];
|
||||||
@ -32,8 +32,8 @@ const MENUITEMS : Menu[] = [
|
|||||||
type:'sub',
|
type:'sub',
|
||||||
icon:'explore',
|
icon:'explore',
|
||||||
children:[
|
children:[
|
||||||
{state:'userlist',name:'User List'},
|
{state:'users',name:'User List'},
|
||||||
{state:'register',name:'Register'},
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -22,5 +22,6 @@ export const environment = {
|
|||||||
cognito_identity_endpoint: '',
|
cognito_identity_endpoint: '',
|
||||||
sts_endpoint: '',
|
sts_endpoint: '',
|
||||||
dynamodb_endpoint: '',
|
dynamodb_endpoint: '',
|
||||||
s3_endpoint: ''
|
s3_endpoint: '',
|
||||||
|
accessToken:''
|
||||||
};
|
};
|
||||||
|
|||||||
@ -9,12 +9,9 @@
|
|||||||
<title>Optima - Angular 6 Material Admin Template</title>
|
<title>Optima - Angular 6 Material Admin Template</title>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var global = global || window;
|
if (global === undefined) {
|
||||||
var Buffer = Buffer || [];
|
var global = window;
|
||||||
var process = process || {
|
}
|
||||||
env: { DEBUG: undefined },
|
|
||||||
version: []
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user