Your Personal Share Submission has not been approved. Please contact the Sanlam Head of Compliance @ gerardine.kelly@sanlam.ie for further detail.
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Loading...
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n Personal Share Dealing Retrospective Information Records \r\n
\r\n
\r\n
\r\n
Personal Share Dealing Retrospective Information Records \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
"
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/dealing/dealing.component.css":
/*!**********************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/dealing/dealing.component.css ***!
\**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "#Gratification_Record{\r\n background-color: #fff;\r\n}\r\n\r\n.showQuery {\r\n width: 100%;\r\n float: left;\r\n border: 1px solid;\r\n overflow-y: scroll;\r\n height: 200px;\r\n}\r\n\r\n.showQuery_user {\r\n float: left;\r\n width: 100%;\r\n width: 51%;\r\n font-size: 16px; \r\n margin: 0px;\r\n}\r\n\r\n.showQuery_me {\r\n float: right;\r\n width: 51%;\r\n font-size: 16px;\r\n /* border: 1px solid; */\r\n margin: 0px;\r\n}\r\n\r\ninput[type=checkbox]:checked:after{\r\n background: none !important;\r\n content: none !important;\r\n color: #fff;\r\n height: 25px;\r\n width: 26px;\r\n margin: -3px -3px;\r\n border-radius: 50%;\r\n position: absolute;\r\n text-align: center;\r\n cursor: pointer;\r\n}\r\n\r\ninput[type=checkbox]:checked+label:before {\r\n background: none !important;\r\n color: #333;\r\n content: none !important;\r\n text-align: center;\r\n}"
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/dealing/dealing.component.html":
/*!***********************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/dealing/dealing.component.html ***!
\***********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n Loading...
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n Loading...
\r\n \r\n
\r\n \r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n Personal Share Dealing Information Records \r\n
\r\n
\r\n
\r\n \r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n
\r\n\r\n
\r\n\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n Name \r\n \r\n {{UserDetailsByid.firstname | titlecase }} {{UserDetailsByid.lastname | titlecase}}\r\n \r\n \r\n \r\n Name of investment \r\n {{UserDetailsByid.Investment_name| titlecase}} \r\n \r\n \r\n Intended trade ISIN \r\n {{UserDetailsByid.intended_trade_isin| titlecase }}\r\n \r\n \r\n \r\n Intended trade date \r\n {{ UserDetailsByid.intended_trade_date }} \r\n \r\n \r\n Value \r\n {{UserDetailsByid.number_of_shares}} \r\n \r\n \r\n Currency \r\n {{UserDetailsByid.Unit_Amount}} \r\n \r\n \r\n Amount \r\n {{UserDetailsByid.amount}} \r\n \r\n \r\n Request Date \r\n {{UserDetailsByid.created_at}} \r\n \r\n \r\n Contract Note \r\n \r\n {{UserDetailsByid.File}} \r\n \r\n \r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n\r\n\r\n\r\n
\r\n \r\n \r\n \r\n\r\n
\r\n \r\n \r\n \r\n Name \r\n User Role \r\n Name of investment \r\n Intended Trade Date \r\n Value \r\n Currency \r\n Amount \r\n Status \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{e.firstname | titlecase }} {{e.lastname | titlecase}}\r\n \r\n {{e.userRole | titlecase}} \r\n \r\n {{e.Investment_name| titlecase}}\r\n \r\n {{ e.intended_trade_date }} \r\n {{ e.number_of_shares }} \r\n {{ e.Unit_Amount }} \r\n {{ e.amount }} \r\n {{e.permission | titlecase}} \r\n \r\n \r\n
\r\n
"
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/dealing/dealing.component.ts":
/*!*********************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/dealing/dealing.component.ts ***!
\*********************************************************************************/
/*! exports provided: DealingComponent, Dealing1Component */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DealingComponent", function() { return DealingComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Dealing1Component", function() { return Dealing1Component; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var angular_datatables__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! angular-datatables */ "./node_modules/angular-datatables/index.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var ngx_bootstrap_modal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-bootstrap/modal */ "./node_modules/ngx-bootstrap/modal/fesm5/ngx-bootstrap-modal.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2 */ "./node_modules/sweetalert2/dist/sweetalert2.all.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! aws-sdk/clients/s3 */ "./node_modules/aws-sdk/clients/s3.js");
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var ngx_spinner__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ngx-spinner */ "./node_modules/ngx-spinner/fesm5/ngx-spinner.js");
/* harmony import */ var src_app_services_exportservices_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! src/app/services/exportservices.service */ "./src/app/services/exportservices.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var jsPDF = __webpack_require__(/*! jspdf */ "./node_modules/jspdf/dist/jspdf.min.js");
__webpack_require__(/*! jspdf-autotable */ "./node_modules/jspdf-autotable/dist/jspdf.plugin.autotable.js");
// import { NgxSpinnerService } from "ngx-spinner";
// require('jspdf-autotable');
var dt = __webpack_require__(/*! datatables.net */ "./node_modules/datatables.net/js/jquery.dataTables.js");
var Person = /** @class */ (function () {
function Person() {
}
return Person;
}());
var DataTablesResponse = /** @class */ (function () {
function DataTablesResponse() {
}
return DataTablesResponse;
}());
var DealingComponent = /** @class */ (function () {
function DealingComponent(form, router, common, cognito, rootNode, spinner, modalService, pdf) {
this.form = form;
this.router = router;
this.common = common;
this.cognito = cognito;
this.spinner = spinner;
this.modalService = modalService;
this.pdf = pdf;
this.title = "Share Permission Request";
this.loading = false;
this.userRole = localStorage.getItem("custom:user_role");
this.email = localStorage.getItem("custom:first_name");
this.userName = localStorage.getItem("custom:first_name");
this.LastuserName = localStorage.getItem("custom:last_name");
this.AddRecordUrl = "/Gratification_Reporting/" + this.userRole + "/AddDealing";
this.UrlLastAtribute = window.location.href.substr(window.location.href.lastIndexOf("/") + 1);
this.data = new FormData();
this.currentUerId = this.cognito.getCurrentUser();
this.bsValue = new Date();
// Filter Data Option start
this.FilterByName = '';
this.FilterFromDate = '';
this.FilterEndDate = '';
// FilterStatus = '';
this.FilterStatus = 'user';
this.isDtInitialized = false;
this.dtOptions = {};
this.dtTrigger = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
this.User = [];
this.tilesName = "Personal Share Dealing Permission Request Record";
this.RequestDetail = [];
this.userDetails = [];
this.arrayFilename = [];
this.Newarray = [];
this.CommentDatad = [];
this.ExportAll_Data = [];
this.Alluser_details = [];
this.ALl_User = [];
this.FOLDER = "assets/Pa-share-Upload Document/";
if (localStorage.getItem("token") == null ||
localStorage.getItem("token") == "") {
this.router.navigateByUrl("/login");
}
else {
this.detePickerConfig = Object.assign({}, {
showWeekNumbers: false,
dateInputFormat: "DD-MM-YYYY",
minDate: this.bsValue,
// maxDate: this.bsValue,
dayDisabled: "[0,6]"
});
this.rootNode = rootNode;
this.Comment_Record = form.group({
queryId: "",
mod_type: "Dealing Request",
from_type: "",
from_id: "",
to_type: "",
to_id: "",
query: ["", _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required]
});
}
}
DealingComponent.prototype.FilerDataBYUser = function (FilterByName, FilterFromDate, FilterEndDate) {
var _this = this;
var startDate = new Date(FilterFromDate);
var endDate = new Date(FilterEndDate);
// this.userDetails = JSON.parse(sessionStorage.getItem('PA-sharing-Data'));
// // this.userDetails = this.userDetails.filter(function (person) {
// var resultProductData = this.userDetails.filter(function (a) {
// var hitDates = a.intended_trade_date || {};
// var ShowDate =hitDates.split("/");
// var checkDate = new Date(ShowDate[2] + '/' + ShowDate[1] + '/' + ShowDate[0]);
// // 2015-08-04"
// hitDates = new Date(ShowDate[2] + '-' + ShowDate[1] + '-' + ShowDate[0]);
// var date = new Date(hitDates);
// // console.log(hitDates)
// // console.log(startDate)
// // console.log(endDate)
// return checkDate.getDate() >= startDate.getDate() &&
// checkDate.getMonth() >= startDate.getMonth() &&
// checkDate.getUTCFullYear() >= startDate.getUTCFullYear()&&
// checkDate.getDate() >= endDate.getDate()&&
// checkDate.getMonth() >= endDate.getMonth()&&
// checkDate.getUTCFullYear() >= endDate.getUTCFullYear()
// // return (hitDates >= startDate && hitDates <= endDate);
// });
// console.log(resultProductData);
if (FilterByName == '' && FilterFromDate == '' && FilterEndDate == '') {
this.userDetails = [];
this.userDetails = JSON.parse(sessionStorage.getItem('PA-sharing-Data'));
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (FilterByName != '' && FilterFromDate == '' && FilterEndDate == '') {
this.userDetails = JSON.parse(sessionStorage.getItem('PA-sharing-Data'));
this.userDetails = this.userDetails.filter(function (person) {
// console.log(FilterByName);
return person.firstname + ' ' + person.lastname == FilterByName.trim();
});
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (FilterByName != '' && FilterFromDate != '' && FilterEndDate == '') {
this.userDetails = JSON.parse(sessionStorage.getItem('PA-sharing-Data'));
var FromDate = new Date(FilterFromDate);
var EndDate = new Date();
this.userDetails = this.userDetails.filter(function (person) {
var ShowDate = person.intended_trade_date.split("/");
var checkDate = new Date(ShowDate[1] + '/' + ShowDate[0] + '/' + ShowDate[2]);
return checkDate.getDate() >= startDate.getDate() &&
checkDate.getMonth() >= startDate.getMonth() &&
checkDate.getUTCFullYear() >= startDate.getUTCFullYear() &&
person.firstname + ' ' + person.lastname == FilterByName.trim();
});
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (FilterByName != '' && FilterFromDate == '' && FilterEndDate != '') {
this.userDetails = JSON.parse(sessionStorage.getItem('PA-sharing-Data'));
var FromDate = new Date();
var EndDate = new Date(FilterEndDate);
this.userDetails = this.userDetails.filter(function (person) {
var ShowDate = person.intended_trade_date.split("/");
var checkDate = new Date(ShowDate[1] + '/' + ShowDate[0] + '/' + ShowDate[2]);
return checkDate.getDate() <= EndDate.getDate() &&
checkDate.getMonth() <= EndDate.getMonth() &&
checkDate.getUTCFullYear() <= EndDate.getUTCFullYear() && person.firstname + ' ' + person.lastname == FilterByName.trim();
});
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (FilterByName != '' && FilterFromDate != '' && FilterEndDate != '') {
this.userDetails = JSON.parse(sessionStorage.getItem('PA-sharing-Data'));
var FromDate = new Date(FilterFromDate);
var EndDate = new Date(FilterEndDate);
this.userDetails = this.userDetails.filter(function (person) {
var ShowDate = person.intended_trade_date.split("/");
var checkDate = new Date(ShowDate[1] + '/' + ShowDate[0] + '/' + ShowDate[2]);
return checkDate.getDate() >= FromDate.getDate() &&
checkDate.getMonth() >= FromDate.getMonth() &&
checkDate.getUTCFullYear() >= FromDate.getUTCFullYear() &&
checkDate.getDate() <= EndDate.getDate() &&
checkDate.getMonth() <= EndDate.getMonth() &&
checkDate.getUTCFullYear() <= EndDate.getUTCFullYear()
// return checkDate.getTime() >= FromDate.getTime();
&& person.firstname + ' ' + person.lastname == FilterByName.trim();
});
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (FilterByName == '' && FilterFromDate == '' && FilterEndDate != '') {
this.userDetails = JSON.parse(sessionStorage.getItem('PA-sharing-Data'));
var EndDate = new Date(FilterEndDate);
this.userDetails = this.userDetails.filter(function (person) {
var ShowDate = person.intended_trade_date.split("/");
var checkDate = new Date(ShowDate[1] + '/' + ShowDate[0] + '/' + ShowDate[2]);
return checkDate.getDate() + "<=" + EndDate.getDate();
// return checkDate.getTime() <= EndDate.getTime();
});
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (FilterByName == '' && FilterFromDate != '' && FilterEndDate == '') {
this.userDetails = JSON.parse(sessionStorage.getItem('PA-sharing-Data'));
var FromDate = new Date(FilterFromDate);
this.userDetails = this.userDetails.filter(function (person) {
var ShowDate = person.intended_trade_date.split("/");
var checkDate = new Date(ShowDate[1] + '/' + ShowDate[0] + '/' + ShowDate[2]);
return checkDate.getDate() >= FromDate.getDate() &&
checkDate.getMonth() >= FromDate.getMonth() &&
checkDate.getUTCFullYear() >= FromDate.getUTCFullYear();
// checkDate.getDate() >= endDate.getDate()&&
// checkDate.getMonth() >= endDate.getMonth()&&
// checkDate.getUTCFullYear() >= endDate.getUTCFullYear()
// return checkDate.getTime() >= FromDate.getTime();
});
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (FilterByName == '' && FilterFromDate != '' && FilterEndDate != '') {
this.userDetails = JSON.parse(sessionStorage.getItem('PA-sharing-Data'));
var FromDate = new Date(FilterFromDate);
var EndDate = new Date(FilterEndDate);
this.userDetails = this.userDetails.filter(function (person) {
var ShowDate = person.intended_trade_date.split("/");
console.log(startDate);
var checkDate = new Date(ShowDate[1] + '/' + ShowDate[0] + '/' + ShowDate[2]);
return checkDate.getTime() >= startDate.getTime() && checkDate.getTime() <= endDate.getTime();
});
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
};
DealingComponent.prototype.ngOnInit = function () {
this.dtOptions = {
pagingType: "full_numbers",
// pageLength: 10
pageLength: -1,
lengthMenu: [[-1, 10, 20, 25, 50, 100, 200], ['All', 10, 20, 25, 50, 100, 200]]
};
this.getRequestDetails();
};
DealingComponent.prototype.ngOnDestroy = function () {
// Do not forget to unsubscribe the event
sessionStorage.removeItem('PA-sharing-Data');
this.dtTrigger.unsubscribe();
this.getCommentData('value');
};
DealingComponent.prototype.Comment = function (value) {
var _this = this;
//this function for add new user form
this.getCommentData(value["manco_userid"]);
this.GetComment = setInterval(function () {
_this.getCommentData(value["manco_userid"]);
}, 5000);
this.Comment_Record.controls["from_type"].setValue(this.userRole);
this.Comment_Record.controls["from_id"].setValue(this.currentUerId["username"]);
this.Comment_Record.controls["to_type"].setValue("manco user");
this.Comment_Record.controls["to_id"].setValue(value["manco_userid"]);
document.getElementById("models").click();
};
DealingComponent.prototype.openModal = function (value, template) {
this.UserDetailsByid = value;
this.modalRef = this.modalService.show(template);
};
// this function for send email for user Cancel Request Status
DealingComponent.prototype.send_cancel_Message = function (role) {
// console.log(role);
var MailEmail = [];
if (role.status !== '') {
MailEmail.push(role.email);
}
var data = {
action: "commonMailservice",
to: MailEmail,
subject: "Regstone PA Share & Grats Submissions",
message: "Hi,
\n Your Personal Share Submission has not been approved. Please contact the Sanlam Head of Compliance @william.ferguson@sanlam.ie for further detail.
Regards,
The Sanlam Regstone Team
"
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
}
else {
}
});
};
DealingComponent.prototype.Permission = function (value, shape) {
var _this = this;
if (shape.value === 'Delete request') {
sweetalert2__WEBPACK_IMPORTED_MODULE_9___default()({
title: 'Are you sure?',
text: "You won't be able to delete this!",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes'
}).then(function (result) {
if (result.value) {
var delete_Data = {
"LastUrl": "https://3z1tfh0og1.execute-api.us-east-2.amazonaws.com/prod/api/deleteDatabyTabelName",
"table": "psd_request",
"id": { "requestId": value.requestId }
};
_this.common.Post(delete_Data).subscribe(function (response) {
if (response.status == 200) {
toastr.success('Data deleted successfully');
_this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
});
}
_this.getRequestDetails();
}, function (err) {
console.log(err);
});
sweetalert2__WEBPACK_IMPORTED_MODULE_9___default()('Deleted!', 'Your file has been deleted.', 'success');
}
else {
sweetalert2__WEBPACK_IMPORTED_MODULE_9___default()({
type: 'error',
title: 'Oops...',
text: ''
});
}
});
}
else {
var MessageArray_1 = {
email: value.mail,
userRole: value.role,
username: value.firstname + " " + value.lastname,
status: shape.value
};
var updatedata = value;
updatedata["action"] = "psdrequestaction";
if (this.userRole == "administrator") {
updatedata["permission"] = shape.value;
updatedata['director_permission'] = shape.value;
}
else if (this.userRole == "Manco Head" || this.userRole == "administrator") {
updatedata["permission"] = shape.value;
updatedata['director_permission'] = shape.value;
}
else if (this.userRole == "director" ||
this.userRole == "administrator") {
updatedata["permission"] = shape.value;
updatedata["director_permission"] = shape.value;
}
this.common.saveFundRiskData(updatedata).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
if (shape.value === 'Approve pending Contract Note') {
_this.sendMessage(MessageArray_1);
}
else if (shape.value === "Further Review Required" || shape.value === "Request Cancelled") {
_this.send_cancel_Message(MessageArray_1);
}
toastr.success("Request updated successfully", "Success !");
}
else {
//toastr.error(res.message, 'Error !');
}
}, function (error) {
console.log("Server Internal Error");
});
}
};
// this function for send email for update user Request updates Status
DealingComponent.prototype.sendMessage = function (role) {
var MailEmail = [];
if (role.status !== '') {
MailEmail.push(role.email);
}
var data = {
action: "commonMailservice",
to: MailEmail,
subject: "Regstone PA Share & Grats Submissions",
message: "Hi,
\n Your share submission request has been processed. Please logon at " + _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].redirect_url + " for further details.
Regards, The Sanlam Regstone Team
"
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
}
else {
}
});
};
DealingComponent.prototype.getRequestDetails = function () {
var _this = this;
var Details;
var FileData;
var FilesData;
var Information = [];
var data = {
'action': 'listAll_psdrequestaction',
};
// let Newdata = {
// LastUrl: "https://3z1tfh0og1.execute-api.us-east-2.amazonaws.com/prod/api/GerDatabyTableName",
// // table: "demo_psd_request"
// table: "psd_request",
// acttion:'listAll_psdrequestaction',
// };
this.common.saveFundRiskData(data).subscribe(function (res_data) {
var res = JSON.parse(res_data._body);
var response = JSON.parse(res.body);
// console.log(response)
if (response.status == "200") {
if (response.data.length > 0) {
var Userdata = {
// LastUrl: "https://3z1tfh0og1.execute-api.us-east-2.amazonaws.com/prod/SanlamUserList"
action: 'getalluser'
};
_this.common.saveFundRiskData(Userdata).subscribe(function (users) {
var res_user = JSON.parse(users._body);
var userData = JSON.parse(res_user.body);
var _loop_1 = function (i) {
// User", "Name of investment", "Intended trade ISIN", "Intended trade date", "Value", "Currency", "Amount
Details = userData.data.filter(function (person) {
return person.username == response.data[i].manco_userid;
});
_this.ExportAll_Data.push({
User: Details[0].firstname + ' ' + Details[0].lastname,
// mail: Details[0].mail,
Investment_name: response.data[i].Investment_name,
intended_trade_isin: response.data[i].intended_trade_isin,
intended_trade_date: response.data[i].intended_trade_date,
number_of_shares: response.data[i].number_of_shares,
Unit_Amount: response.data[i].Unit_Amount,
amount: response.data[i].amount
// status:List.data[i].permission
});
// console.log(response.data[i]["executed_trade_isin"]);
if (response.data[i]["executed_trade_isin"]) {
tmp = response.data[i]["executed_trade_isin"];
Contract = tmp.split("/");
fileNmae = decodeURIComponent(Contract[Contract.length - 1]);
}
else {
fileNmae = '';
}
All_filter_Details = _this.ALl_User.filter(function (person) {
return person.username == response.data[i].manco_userid;
});
if (All_filter_Details.length == 0) {
_this.ALl_User.push({
lastname: Details[0].lastname,
role: Details[0].role,
sanlamuserid: Details[0].sanlamuserid,
username: Details[0].username,
status: Details[0].status,
firstname: Details[0].firstname,
mail: Details[0].mail
});
}
Information.push({
Investment_name: response.data[i].Investment_name,
Unit_Amount: response.data[i].Unit_Amount,
amount: response.data[i].amount,
created_at: response.data[i].requestDate,
director_permission: response.data[i].director_permission,
executed_trade_date: response.data[i].executed_trade_date,
executed_trade_isin: response.data[i].executed_trade_isin,
intended_trade_date: response.data[i].intended_trade_date,
intended_trade_isin: response.data[i].intended_trade_isin,
manco_userid: response.data[i].manco_userid,
number_of_shares: response.data[i].number_of_shares,
permission: response.data[i].permission,
requestId: response.data[i].requestId,
requestType: response.data[i].requestType,
updated_at: response.data[i].updated_at,
userRole: response.data[i].userRole,
additional_comments: response.data[i].additional_comments,
Additional_detail: response.data[i].Additional_detail,
lastname: Details[0].lastname,
role: Details[0].role,
sanlamuserid: Details[0].sanlamuserid,
status: Details[0].status,
firstname: Details[0].firstname,
mail: Details[0].mail,
// dataid: FileData[0].dataid,
// documentId: FileData[0].documentId,
Link: response.data[i]["executed_trade_isin"],
File: fileNmae,
});
};
var fileNmae, tmp, Contract, All_filter_Details;
for (var i = 0; i < response.data.length; i++) {
_loop_1(i);
}
_this.userDetails = [];
_this.userDetails = Information;
console.log(_this.userDetails);
_this.Alluser_details = Information;
sessionStorage.setItem('PA-sharing-Data', JSON.stringify(_this.userDetails));
_this.dtTrigger.next();
}, function (error) { return console.log(error); });
}
else {
_this.dtTrigger.next();
}
}
else {
_this.dtTrigger.next();
}
}, function (error) {
// this.getUserGratificationList();
console.log("Serve Error");
});
};
DealingComponent.prototype.IndusuvalPdf = function (Data) {
var doc = new jsPDF();
var finalY = doc.previousAutoTable.finalY; //this gives you the value of the end-y-axis-position of the previous autotable.
// doc.text("Text to be shown relative to the table", 12);
doc.text("PA Share Dealing Reporting", 60, 10);
doc.autoTable({
head: [[Data.requestId, '']],
body: [
['Name', Data.firstname + ' ' + Data.lastname],
['User Role', Data.userRole],
['Name of Investment', Data.Investment_name],
['Intended trade ISIN', Data.intended_trade_isin],
['Value', Data.number_of_shares], ['Currency', Data.Unit_Amount], ['Amount', Data.amount], ['Status', Data.permission]
]
});
doc.save('table.pdf');
};
DealingComponent.prototype.closeModal = function () {
// this function for close bootstrap model
this.closeBtn.nativeElement.click();
this.GratificationRequest.reset();
};
DealingComponent.prototype.SendMessage = function (value) {
var _this = this;
var data = value;
data["to_from_id"] = value["to_id"] + "|" + this.currentUerId["username"];
data["action"] = "allactionquerypoint";
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
var div = document.getElementById("messages");
var newHeight = div.scrollHeight + 101;
_this.Comment_Record.controls["query"].setValue("");
_this.CommentDatad = res.data;
}
else {
//toastr.error(res.message);
}
}, function (error) {
console.log("Server Internal Error");
});
};
DealingComponent.prototype.getCommentData = function (id) {
var _this = this;
var data = {
action: "allToactionquerypoint",
mod_type: "Dealing Request",
to_from_id: id + "|" + this.currentUerId["username"]
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
if (res.data != null || res.data != "") {
setTimeout(function () {
var div = document.getElementById("messages");
div.scrollTop = div.scrollHeight;
}, 1000);
_this.CommentDatad = res.data;
}
else {
}
}
else {
}
}, function (error) {
console.log("Server Internal Error");
});
};
DealingComponent.prototype.exportData = function (data) {
var value = {
column: ["Name", "Name of investment", "Intended trade ISIN", "Intended trade date", "Value", "Currency", "Amount", "Request Date", "Document", "Additional Detail", "Additional Comment"],
data: this.userDetails
};
this.pdf.DownloadChat(value);
};
DealingComponent.prototype.exportAllData = function () {
var doc = new jsPDF();
var finalY = doc.previousAutoTable.finalY; //this gives you the value of the end-y-axis-position of the previous autotable.
// doc.text("Text to be shown relative to the table", 12);
doc.text("PA Share Dealing Reporting", 60, 10);
doc.autoTable({ html: '#AdditionalTable_1' });
doc.save("Regstone PA Share & Gratifications Request.pdf");
// this.pdf.DownloadChat(value);
};
DealingComponent.prototype.upload_Contract = function () {
(document.getElementById("upload_Contract")).click();
};
DealingComponent.prototype.fileEvent = function (RowData, event) {
var _this = this;
this.spinner.show();
this.selectFIles = event.target.files[0];
if (this.selectFIles != null) {
if (this.selectFIles["type"] == "application/pdf" ||
this.selectFIles["type"] == "application/vnd.ms-excel") {
var bucket = new aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_10__({
accessKeyId: _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].accessKeyId,
secretAccessKey: _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].secretAccessKey,
region: _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].S3region
});
var params = {
Bucket: _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].BucketName,
Key: 'assets/Pa-share-Upload Document/' + event.target.files[0].name,
Body: this.selectFIles
};
bucket.upload(params, function (err, data) {
if (err) {
console.log(err);
// this.errorMessage = err;
}
_this.imageFile = data["Location"];
var updateData = RowData;
updateData["executed_trade_isin"] = _this.imageFile;
updateData["permission"] = 'Approved';
updateData['director_permission'] = 'Approved';
updateData['action'] = "psdrequestaction";
_this.common.saveFundRiskData(updateData).subscribe(function (response) {
toastr.success("uploaded a contract note successfully updaed");
_this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
});
_this.spinner.hide();
_this.getRequestDetails();
}, function (err) { console.log(err); _this.spinner.hide(); });
});
}
else {
toastr.error("File type not allowed.", "Error !!!");
this.spinner.hide();
}
}
else {
this.spinner.hide();
}
};
DealingComponent.prototype.edit_changes = function (data) {
sessionStorage.setItem('Edit_PA-share', JSON.stringify(data));
this.router.navigate(['/Gratification_Reporting/director/AddDealing']);
};
DealingComponent.prototype.DownloadChat = function (value) {
var _this = this;
this.Newarray = [];
var data = {
action: "allToactionquerypoint",
mod_type: "Dealing Request",
to_from_id: value["manco_userid"] + "|" + this.currentUerId["username"]
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
if (res.data != null || res.data != "") {
_this.CommentDatad = res.data;
var months_arr = [
"Jan",
"Feb",
"March",
"April",
"May",
"June",
"July",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
];
var days_arr = [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
];
for (var i = 0; i < res.data.length; i++) {
var date = new Date(res.data[i]["created_at"] * 1);
var year = date.getFullYear();
var dates = date.getDate();
var day = days_arr[date.getDay()];
var month = date.getMonth() + 1;
var hours = date.toLocaleTimeString();
var minutes = date.getMinutes();
var time = day + "," + dates + "/" + month + "/" + year + ", " + hours;
if (res.data[i].from_type == _this.userRole) {
var from = _this.userName +
_this.LastuserName +
" (" +
res.data[i].from_type +
")";
var to = _this.RequestDetail[0].firstname +
" (" +
res.data[i].to_type +
")";
var query = res.data[i].query;
_this.Newarray.push([
dates + "/" + month + "/" + year + ", " + hours,
from,
to,
query
]);
}
else if (res.data[i].to_type == _this.userRole) {
var from = _this.RequestDetail[0].firstname +
" (" +
res.data[i].from_type +
")";
var to = _this.userName +
_this.LastuserName +
" (" +
res.data[i].to_type +
")";
var query = res.data[i].query;
_this.Newarray.push([
dates + "/" + month + "/" + year + ", " + hours,
from,
to,
query
]);
}
}
var columns = ["Date", "From", "To", "Message"];
var rows = _this.Newarray;
var doc = new jsPDF("p", "pt");
doc.setFontSize(20);
doc.text(30, 30, _this.RequestDetail[0].firstname + " " + "Comment");
doc.autoTable(columns, rows, {
columnStyles: {
0: { columnWidth: 150 },
1: { columnWidth: 90, overflow: "linebreak" },
2: { columnWidth: 90, overflow: "linebreak" },
3: { overflow: "linebreak" }
},
margin: { top: 50, left: 20, right: 20, bottom: 0 },
drawHeaderCell: function (cell, data) {
if (cell.raw === "Date") {
//paint.Name header red
cell.styles.fontSize = 15;
cell.styles.textColor = [255, 0, 0];
}
else {
cell.styles.textColor = 255;
cell.styles.fontSize = 10;
}
},
createdCell: function (cell, data) { }
});
doc.save(_this.RequestDetail[0].firstname + ".pdf");
}
else {
}
}
else {
}
}, function (error) {
console.log("Server Internal Error");
});
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])("closeBtn"),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"])
], DealingComponent.prototype, "closeBtn", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(angular_datatables__WEBPACK_IMPORTED_MODULE_4__["DataTableDirective"]),
__metadata("design:type", angular_datatables__WEBPACK_IMPORTED_MODULE_4__["DataTableDirective"])
], DealingComponent.prototype, "dtElement", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])("fundListDocument"),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"])
], DealingComponent.prototype, "fundListDocument", void 0);
DealingComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: "app-dealing",
template: __webpack_require__(/*! ./dealing.component.html */ "./src/app/components/PAShareDealingDashboard/dealing/dealing.component.html"),
styles: [__webpack_require__(/*! ./dealing.component.css */ "./src/app/components/PAShareDealingDashboard/dealing/dealing.component.css")]
}),
__metadata("design:paramtypes", [_angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"],
_angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"],
_services_common_service__WEBPACK_IMPORTED_MODULE_6__["CommonService"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_7__["CognitoUtil"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], ngx_spinner__WEBPACK_IMPORTED_MODULE_11__["NgxSpinnerService"],
ngx_bootstrap_modal__WEBPACK_IMPORTED_MODULE_8__["BsModalService"],
src_app_services_exportservices_service__WEBPACK_IMPORTED_MODULE_12__["ExportservicesService"]])
], DealingComponent);
return DealingComponent;
}());
var Dealing1Component = /** @class */ (function () {
function Dealing1Component(form, router,
//private auth: AuthService,
common, cognito, rootNode) {
this.form = form;
this.router = router;
this.common = common;
this.cognito = cognito;
this.title = "Add Records";
this.tilesName = "Personal Share Dealing Permission Request Record";
this.userRole = localStorage.getItem("custom:user_role");
this.email = localStorage.getItem("custom:first_name");
this.userName = localStorage.getItem("custom:first_name");
this.LastuserName = localStorage.getItem("custom:last_name");
this.UrlLastAtribute = window.location.href.substr(window.location.href.lastIndexOf("/") + 1);
this.currentUerId = this.cognito.getCurrentUser();
this.dtOptions = {};
this.dtTrigger = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
this.bsValue = new Date();
this.validate = function (dateString) {
var day = (new Date(dateString)).getDay();
if (day == 0 || day == 6) {
return false;
}
return true;
};
this.FOLDER = "assets/Pa-share-Upload Document/";
this.UserData = [];
this.FileData = [];
this.arrayFilename = [];
this.minDate = new Date(2000, 0, 1);
this.maxDate = new Date(2020, 0, 1);
if (localStorage.getItem("token") == null ||
localStorage.getItem("token") == "") {
this.router.navigateByUrl("/login");
}
else {
this.detePickerConfig = Object.assign({}, {
showWeekNumbers: false,
dateInputFormat: "DD-MM-YYYY",
minDate: this.bsValue,
// maxDate: this.bsValue,
dayDisabled: "[0,6]"
});
//intended_trade_isin
this.GratificationRequest = form.group({
action: "psdrequestaction",
requestId: "",
CheckingForm: [""],
requestType: "psd_Permission_Request",
Investment_name: ["", _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
intended_trade_isin: [""],
number_of_shares: ["", _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
executed_trade_isin: [""],
Unit_Amount: [""],
amount: ["", _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
intended_trade_dates: ["", _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
executed_trade_date: [""],
manco_userid: this.currentUerId["username"],
permission: ["Under Review"],
Additional_detail: [""],
additional_comments: [""]
});
}
}
Dealing1Component.prototype.Value = function (Checking) {
alert(Checking);
};
Dealing1Component.prototype.ngOnInit = function () {
if (this.userRole == "manco user") {
this.retrunUrl = "/Gratification_Reporting/user/Dealing";
}
else {
this.retrunUrl = "/Gratification_Reporting/Dealing";
}
this.GetFileData();
this.PersonalData();
};
Dealing1Component.prototype.DisableDays = function (evt) {
var day = new Date(evt.target.value).getDay();
if (day == 0 || day == 6) {
this.GratificationRequest.controls['intended_trade_dates'].setValue('');
//toastr.error('invalid date');
}
console.log(day);
// this.checkDisable = setInterval(function () {
// $(
// ".bs-datepicker-body table.days.weeks tbody tr td:first-child"
// ).addClass("disabled");
// $(".bs-datepicker-body table.days.weeks tbody tr td:first-child").css(
// "pointer-events",
// "none"
// );
// $(".bs-datepicker-body table.days.weeks tbody tr td:last-child").addClass(
// "disabled"
// );
// $(".bs-datepicker-body table.days.weeks tbody tr td:last-child").css(
// "pointer-events",
// "none"
// );
// }, 100);
};
Dealing1Component.prototype.submitForm = function (value) {
var _this = this;
var d = new Date(value.intended_trade_dates);
var dt = d.getDate();
var mn = d.getMonth();
var yy = d.getFullYear();
var CurrentDate = new Date();
mn++;
if (this.TITLEData != null && this.TITLEData != "") {
var checkCondition = this.TITLEData.filter(function (UserDatas) {
return UserDatas.month == mn;
});
if (checkCondition != null && checkCondition != "") {
toastr.warning("You not able to submit form");
return;
}
}
sweetalert2__WEBPACK_IMPORTED_MODULE_9___default()({
title: "Would you like to submit permission request for approval?",
text: " I understand and have complied with SAMI’s PA account dealing policy and procedures",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Submit"
}).then(function (result) {
if (result.value) {
sweetalert2__WEBPACK_IMPORTED_MODULE_9___default()("Success!", "Request successfully submitted", "success");
var CurrentDate = new Date();
var CurrentDates = CurrentDate.getDate();
var CurrentMonth = CurrentDate.getMonth();
CurrentMonth++;
var CurrentYear = CurrentDate.getFullYear();
var data = value;
data["intended_trade_date"] = dt + "/" + mn + "/" + yy;
data["director_permission"] = "requested";
data["userRole"] = localStorage.getItem("custom:user_role");
// data["executed_trade_isin"] =
// localStorage.getItem("custom:first_name") +
// " " +
// localStorage.getItem("custom:last_name");
data["executed_trade_date"] = value.Additional_detail;
data["requestDate"] =
CurrentDates + "-" + CurrentMonth + "-" + CurrentYear;
_this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
_this.requestId = res.data["requestId"];
var RowData = {
documentId: "",
tilesName: _this.tilesName,
userid: _this.currentUerId["username"],
// documnentName: this.file['name'],
dataid: _this.requestId,
month: mn,
year: yy,
created_at: new Date(),
action: "savedocument"
};
if (_this.file != null && _this.file != "") {
_this.updateFileData(RowData);
}
else {
setTimeout(function () {
if (_this.userRole == "manco user") {
_this.router.navigate([
"/Gratification_Reporting/user/Dealing"
]);
}
else {
_this.router.navigate(["/Gratification_Reporting/Dealing"]);
}
}, 2000);
}
$("#reset").click();
toastr.success("Request successfully submitted");
if (localStorage.getItem("custom:user_role") == "manco user" ||
localStorage.getItem("custom:user_role") == "director") {
_this.sendMessage("Manco Head");
}
else if (localStorage.getItem("custom:user_role") == "Manco Head") {
_this.sendMessage("director");
}
}
else {
//toastr.error(res.message + '!');
}
});
}
});
};
Dealing1Component.prototype.sendMessage = function (role) {
var _this = this;
var DirectorData = {
action: "getalluser"
};
this.common.saveFundRiskData(DirectorData).subscribe(function (response) {
var resData = JSON.parse(response._body);
var resource = JSON.parse(resData.body);
var RoleData = [];
var Role = [];
if (resource.status == "200") {
for (var i = 0; i < resource.data.length; i++) {
RoleData.push({
firstname: resource.data[i].firstname,
lastname: resource.data[i].lastname,
mail: resource.data[i].mail,
role: resource.data[i].role.split(","),
sanlamuserid: resource.data[i].sanlamuserid
});
Role.push(resource.data[i].role.split(","));
}
var result = [];
$.each(Role, function (index, value) {
var rs = value.indexOf(role);
if (rs == -1) {
}
else {
result.push(RoleData[index]);
}
});
var MailEmail = [];
for (var i = 0; i < result.length; i++) {
if (result[i].status == 'active') {
MailEmail.push(result[i].mail);
}
}
var data = {
action: "commonMailservice",
to: MailEmail,
subject: "Regstone PA Share & Grats Submissions ",
message: "Hi,
\n You have Share Permission Submissions that require your attention.
Please log onto
Sanlam Regstone to review.
Regards
The Sanlam Regstone Team
"
};
_this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
}
else {
//toastr.error('res.message','Error found');
}
}, function (error) {
console.log(error);
});
}
});
};
Dealing1Component.prototype.fileEvent = function (e) {
this.selectFIles = e.target.files[0];
if (this.selectFIles != null) {
if (this.selectFIles["type"] == "application/pdf" ||
this.selectFIles["type"] == "application/vnd.ms-excel") {
if (this.arrayFilename != "" && this.arrayFilename != null) {
if (this.arrayFilename.length >= 0) {
var checkFIleName = this.arrayFilename.filter(function (person) {
return person.File == e.target.files[0].name;
});
}
if (checkFIleName.length >= 0) {
if (confirm("Do you want overwrite exist File")) {
this.file = this.selectFIles;
this.FileName = new Date().getTime() + e.target.files[0].name;
}
else {
(document.getElementById("documentFile")).value = "";
}
}
else {
this.file = this.selectFIles;
this.FileName = e.target.files[0].name;
}
}
else {
this.file = this.selectFIles;
this.FileName = e.target.files[0].name;
}
this.errorMessage = null;
}
else {
this.file = null;
this.errorMessage = "File type not allowed.";
}
}
else {
this.file = null;
}
};
Dealing1Component.prototype.updateFileData = function (RowData) {
var _this = this;
var bucket = new aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_10__({
accessKeyId: _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].accessKeyId,
secretAccessKey: _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].secretAccessKey,
region: _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].S3region
});
var params = {
Bucket: _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].BucketName,
Key: this.FOLDER + this.FileName,
Body: this.file
};
bucket.upload(params, function (err, data) {
if (err) {
// console.log(err);
_this.errorMessage = err;
}
document.getElementById("documentFile").value = "";
_this.imageFile = data["Location"];
var updateData = RowData;
updateData["documnentName"] = _this.imageFile;
_this.common.saveFundRiskData(updateData).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
document.getElementById("uploadBtn").innerHTML = "Submit";
(document.getElementById("uploadBtn")).disabled = false;
if (_this.userRole == "manco user") {
_this.router.navigate(["/Gratification_Reporting/user/Dealing"]);
}
else {
_this.router.navigate(["/Gratification_Reporting/Dealing"]);
}
});
});
};
Dealing1Component.prototype.checkShare = function (event) {
if (event.target["value"] == "Cash Amount") {
$("#Unit_Amount").css("display", " block");
}
else {
$("#Unit_Amount").css("display", " none");
}
};
Dealing1Component.prototype.GetFileData = function () {
var _this = this;
var data = {
action: "getdocumentbyUser",
userid: this.currentUerId["username"],
month: new Date().getMonth() + 1,
year: new Date().getFullYear(),
tilesName: "Personal Share Dealing Permission Request Record"
};
this.common.SubmitData(data).subscribe(function (response) {
var res = JSON.parse(response.body);
if (res.data.length > 0) {
_this.FileData = res.data;
for (var i = 0; i < res.data.length; i++) {
var tmp = res.data[i]["documnentName"];
var arrFilename = tmp.split("/");
_this.FileNames = decodeURIComponent(arrFilename[arrFilename.length - 1]);
_this.arrayFilename.push({
File: _this.FileNames,
Link: res.data[i]["documnentName"],
documentId: res.data[i]["documentId"]
});
}
}
}, function (error) {
_this.GetFileData();
console.log("Server Internal Error");
});
};
Dealing1Component.prototype.PersonalData = function () {
var _this = this;
var data = {
LastUrl: "nothingTosubmit/section/id",
userId: this.currentUerId["username"],
section: "Personal Share Dealing"
};
this.common.PasharingMOdule(data).subscribe(function (res) {
if (res.status == 200) {
if (res.data != "" && res.data != null) {
_this.TITLEData = res.data;
}
}
}, function (error) {
console.log("Server Internal Error");
});
};
Dealing1Component.prototype.Amount_Check_validation = function (data) {
var regex = /^[1-9]{0,2}(,{0,1})(\d{2},)*(\d{3})*(?:\.\d{0,2})$/;
if (regex.test(data)) { }
else
toastr.error("Amount is not valid. Please enter a valid amount");
};
Dealing1Component = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: "dealing1-app",
template: __webpack_require__(/*! ./dealing1.html */ "./src/app/components/PAShareDealingDashboard/dealing/dealing1.html"),
styles: [__webpack_require__(/*! ./dealing.component.css */ "./src/app/components/PAShareDealingDashboard/dealing/dealing.component.css")]
}),
__metadata("design:paramtypes", [_angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"],
_angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"],
_services_common_service__WEBPACK_IMPORTED_MODULE_6__["CommonService"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_7__["CognitoUtil"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]])
], Dealing1Component);
return Dealing1Component;
}());
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/dealing/dealing1.html":
/*!**************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/dealing/dealing1.html ***!
\**************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n Loading...
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n Personal Share Dealing Permission Request \r\n
\r\n
\r\n
\r\n
Personal Share Dealing Permission Request \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n
"
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/gratification-records/addgratification.html":
/*!************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/gratification-records/addgratification.html ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Loading...
\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n Add Gratification \r\n
\r\n
\r\n
\r\n \r\n \r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
"
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/gratification-records/gratification-records.component.css":
/*!**************************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/gratification-records/gratification-records.component.css ***!
\**************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "form{\r\n background-color: #fff;\r\n}\r\n\r\n.fund_inner_block .respo{\r\n padding: 12px 26px;\r\n}"
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/gratification-records/gratification-records.component.html":
/*!***************************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/gratification-records/gratification-records.component.html ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n Loading...
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n Gratification Information Records \r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n Gratification Information Records \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n \r\n Name of Donor \r\n {{AllDetails.donor_recipient_name}} \r\n \r\n \r\n Relationship to recipient \r\n {{AllDetails.donor_recipient_relation}} \r\n \r\n \r\n Gratification \r\n {{AllDetails.gratification}} \r\n \r\n \r\n Status \r\n \r\n {{AllDetails.gratification_status | titlecase}}\r\n \r\n \r\n \r\n Request Status \r\n \r\n \r\n {{AllDetails.manco_ceo | titlecase}}\r\n
\r\n \r\n \r\n {{AllDetails.head_of_compliance | titlecase}}\r\n
\r\n \r\n \r\n \r\n \r\n Date \r\n {{AllDetails.gratification_date}} \r\n \r\n \r\n Approx. value \r\n {{AllDetails.approx_gratification_value}} \r\n \r\n \r\n \r\n Comment \r\n {{AllDetails.additional_comments}} \r\n \r\n \r\n \r\n Created At \r\n {{AllDetails.created_at}} \r\n \r\n
\r\n
\r\n \r\n\r\n\r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
"
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/gratification-records/gratification-records.component.ts":
/*!*************************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/gratification-records/gratification-records.component.ts ***!
\*************************************************************************************************************/
/*! exports provided: GratificationRecordsComponent, AddgratificationRecordsComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GratificationRecordsComponent", function() { return GratificationRecordsComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AddgratificationRecordsComponent", function() { return AddgratificationRecordsComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/http */ "./node_modules/@angular/http/fesm5/http.js");
/* harmony import */ var angular_datatables__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! angular-datatables */ "./node_modules/angular-datatables/index.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2 */ "./node_modules/sweetalert2/dist/sweetalert2.all.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! aws-sdk/clients/s3 */ "./node_modules/aws-sdk/clients/s3.js");
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var ngx_spinner__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ngx-spinner */ "./node_modules/ngx-spinner/fesm5/ngx-spinner.js");
/* harmony import */ var ngx_bootstrap_modal__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ngx-bootstrap/modal */ "./node_modules/ngx-bootstrap/modal/fesm5/ngx-bootstrap-modal.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 __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
// declare let jsPDF;
var jsPDF = __webpack_require__(/*! jspdf */ "./node_modules/jspdf/dist/jspdf.min.js");
__webpack_require__(/*! jspdf-autotable */ "./node_modules/jspdf-autotable/dist/jspdf.plugin.autotable.js");
var dt = __webpack_require__(/*! datatables.net */ "./node_modules/datatables.net/js/jquery.dataTables.js");
var GratificationRecordsComponent = /** @class */ (function () {
function GratificationRecordsComponent(router, fundform, cognitoUtil, common, spinner, http, rootNode, modalService) {
this.router = router;
this.fundform = fundform;
this.cognitoUtil = cognitoUtil;
this.common = common;
this.spinner = spinner;
this.http = http;
this.modalService = modalService;
this.userRole = localStorage.getItem("custom:user_role");
this.data = new FormData();
this.currentUerId = this.cognitoUtil.getCurrentUser();
this.dtOptions = {};
this.dtTrigger = new rxjs__WEBPACK_IMPORTED_MODULE_6__["Subject"]();
this.User = [];
this.months_arr = [
"Jan",
"Feb",
"March",
"April",
"May",
"June",
"July",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
];
// Filter Data Option start
this.FilterByName = '';
this.FilterFromDate = '';
this.FilterEndDate = '';
this.FilterStatus = '';
this.isDtInitialized = false;
this.Alluser_details = [];
this.PdfData = [];
this.userDetails = [];
this.ALl_User = [];
this.userInformation = [];
this.CommentDatad = [];
this.View_Detals = [];
this.arrayFilename = [];
this.FileNames = [];
this.email = localStorage.getItem("custom:first_name");
// function for download export chat in pdf formate
this.Newarray = [];
this.selectFIles = "";
this.tilesName = "Gratification Record";
this.FOLDER = "assets/uploadDocument/GratificationDocument/";
this.rootNode = rootNode;
if (localStorage.getItem("token") == null ||
localStorage.getItem("token") == "") {
this.router.navigateByUrl("/login");
}
else {
}
this.Comment_Record = fundform.group({
queryId: "",
mod_type: "Gratification_Records",
from_type: "",
from_id: "",
to_type: "",
to_id: "",
query: ["", _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required]
});
}
GratificationRecordsComponent.prototype.ngOnInit = function () {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this.dtOptions = {
pagingType: "full_numbers",
// pageLength: 10
pageLength: -1,
lengthMenu: [[-1, 10, 20, 25, 50, 100, 200], ['All', 10, 20, 25, 50, 100, 200]]
};
if (!(localStorage.getItem("token") == null ||
localStorage.getItem("token") == "")) return [3 /*break*/, 1];
this.router.navigateByUrl("/login");
return [3 /*break*/, 4];
case 1:
if (!(this.userRole == "manco user")) return [3 /*break*/, 3];
return [4 /*yield*/, this.GetFileDatabyuser()];
case 2:
_a.sent();
return [3 /*break*/, 4];
case 3:
this.GetUserDetails();
this.GetFileData();
_a.label = 4;
case 4: return [2 /*return*/];
}
});
});
};
GratificationRecordsComponent.prototype.FilerDataBYUser = function (FilterByName, FilterFromDate, FilterEndDate) {
var _this = this;
var startDate = new Date(FilterFromDate);
var endDate = new Date(FilterEndDate);
if (FilterByName == '' && FilterFromDate == '' && FilterEndDate == '') {
this.User = [];
this.User = JSON.parse(sessionStorage.getItem('PA-sharing-Data'));
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (FilterByName != '' && FilterFromDate == '' && FilterEndDate == '') {
this.User = JSON.parse(sessionStorage.getItem('PA-sharing-Data'));
this.User = this.User.filter(function (person) {
return person.firstname + ' ' + person.lastname == FilterByName.trim();
});
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (FilterByName == '' && FilterFromDate != '' && FilterEndDate == '') {
this.User = JSON.parse(sessionStorage.getItem('PA-sharing-Data'));
var FromDate = new Date(FilterFromDate);
this.User = this.User.filter(function (person) {
var ShowDate = person.gratification_date.split("/");
var checkDate = new Date(ShowDate[1] + '/' + ShowDate[0] + '/' + ShowDate[2]);
return checkDate.getDate() >= FromDate.getDate() &&
checkDate.getMonth() >= FromDate.getMonth() &&
checkDate.getUTCFullYear() >= FromDate.getUTCFullYear();
// return checkDate.getTime() >= FromDate.getTime();
});
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (FilterByName == '' && FilterFromDate != '' && FilterEndDate != '') {
this.User = JSON.parse(sessionStorage.getItem('PA-sharing-Data'));
var FromDate = new Date(FilterFromDate);
var EndDate = new Date(FilterEndDate);
this.User = this.User.filter(function (person) {
var ShowDate = person.gratification_date.split("/");
var checkDate = new Date(ShowDate[1] + '/' + ShowDate[0] + '/' + ShowDate[2]);
return checkDate.getDate() >= startDate.getDate() &&
checkDate.getMonth() >= startDate.getMonth() &&
checkDate.getUTCFullYear() >= startDate.getUTCFullYear() &&
checkDate.getDate() <= endDate.getDate() &&
checkDate.getMonth() <= endDate.getMonth() &&
checkDate.getUTCFullYear() <= endDate.getUTCFullYear();
// return checkDate.getTime() >= FromDate.getTime() &&
// checkDate.getTime() <= EndDate.getTime();
});
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (FilterByName != '' && FilterFromDate != '' && FilterEndDate == '') {
this.User = JSON.parse(sessionStorage.getItem('PA-sharing-Data'));
var FromDate = new Date(FilterFromDate);
var EndDate = new Date(FilterEndDate);
this.User = this.User.filter(function (person) {
var ShowDate = person.gratification_date.split("/");
var checkDate = new Date(ShowDate[1] + '/' + ShowDate[0] + '/' + ShowDate[2]);
return checkDate.getDate() >= startDate.getDate() &&
checkDate.getMonth() >= startDate.getMonth() &&
checkDate.getUTCFullYear() >= startDate.getUTCFullYear() &&
person.firstname + ' ' + person.lastname == FilterByName.trim();
// return checkDate.getTime() >= FromDate.getTime() && person.firstname+' '+person.lastname == FilterByName.trim();;
});
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (FilterByName != '' && FilterFromDate == '' && FilterEndDate != '') {
this.User = JSON.parse(sessionStorage.getItem('PA-sharing-Data'));
var FromDate = new Date();
var EndDate = new Date(FilterEndDate);
this.User = this.User.filter(function (person) {
var ShowDate = person.gratification_date.split("/");
var checkDate = new Date(ShowDate[1] + '/' + ShowDate[0] + '/' + ShowDate[2]);
return checkDate.getDate() <= EndDate.getDate() &&
checkDate.getMonth() <= EndDate.getMonth() &&
checkDate.getUTCFullYear() <= EndDate.getUTCFullYear() && person.firstname + ' ' + person.lastname == FilterByName.trim();
// return checkDate.getTime() <= EndDate.getTime() && person.firstname+' '+person.lastname == FilterByName.trim();
});
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (FilterByName != '' && FilterFromDate != '' && FilterEndDate != '') {
this.User = JSON.parse(sessionStorage.getItem('PA-sharing-Data'));
var FromDate = new Date(FilterFromDate);
var EndDate = new Date(FilterEndDate);
this.User = this.User.filter(function (person) {
var ShowDate = person.gratification_date.split("/");
var checkDate = new Date(ShowDate[1] + '/' + ShowDate[0] + '/' + ShowDate[2]);
return checkDate.getDate() >= FromDate.getDate() &&
checkDate.getMonth() >= FromDate.getMonth() &&
checkDate.getUTCFullYear() >= FromDate.getUTCFullYear() &&
checkDate.getDate() <= EndDate.getDate() &&
checkDate.getMonth() <= EndDate.getMonth() &&
checkDate.getUTCFullYear() <= EndDate.getUTCFullYear()
// return checkDate.getTime() >= FromDate.getTime();
&& person.firstname + ' ' + person.lastname == FilterByName.trim();
// return checkDate.getTime() >= FromDate.getTime() &&
// checkDate.getTime() <= EndDate.getTime() && person.firstname+' '+person.lastname == FilterByName.trim();
});
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (FilterByName == '' && FilterFromDate == '' && FilterEndDate != '') {
this.User = JSON.parse(sessionStorage.getItem('PA-sharing-Data'));
var FromDate = new Date();
var EndDate = new Date(FilterEndDate);
this.User = this.User.filter(function (person) {
var ShowDate = person.gratification_date.split("/");
var checkDate = new Date(ShowDate[1] + '/' + ShowDate[0] + '/' + ShowDate[2]);
return checkDate.getDate() <= EndDate.getDate() &&
checkDate.getMonth() <= EndDate.getMonth() &&
checkDate.getUTCFullYear() <= EndDate.getUTCFullYear();
// return checkDate.getTime() <= EndDate.getTime();
});
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
this.PdfData = [];
for (var i = 0; i < this.User.length; i++) {
this.PdfData.push([
this.User[i].firstname + ' ' + this.User[i].lastname,
this.User[i].email,
this.User[i].userRole,
this.User[i].gratification,
this.User[i].gratification_date,
this.User[i].approx_gratification_value,
this.User[i].donor_recipient_name,
this.User[i].donor_recipient_relation,
this.User[i].manco_ceo,
this.User[i].additional_comments,
]);
}
};
// Filter Data Option End
GratificationRecordsComponent.prototype.ngOnDestroy = function () {
sessionStorage.removeItem('PA-sharing-Data');
// Do not forget to unsubscribe the event
this.dtTrigger.unsubscribe();
if (this.gratificationComment) {
clearInterval(this.gratificationComment);
}
};
GratificationRecordsComponent.prototype.extractData = function (res) {
var body = res.json();
return body.data || {};
};
GratificationRecordsComponent.prototype.CheckRequest = function () {
var _this = this;
var data = {
action: "list_gratification_byID",
mancoUserId: this.currentUerId["username"],
userRole: this.userRole
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var Response = JSON.parse(resData.body);
//this.User = Response.data;
setTimeout(function () {
_this.filterDetails(Response.data);
}, 2000);
//this.dtTrigger.next();
}, function (error) {
_this.CheckRequest();
console.log("Server Error");
});
};
GratificationRecordsComponent.prototype.filterDetails = function (value) {
var Details;
var FileData;
var FilesData;
var Information = [];
var _loop_1 = function (i) {
FilesData = this_1.arrayFilename.filter(function (FileData) {
return FileData.dataid == value[i].gratificationID;
});
if (FilesData != null && FilesData != "") {
FileData = FilesData;
}
else {
FileData = [
{
dataid: "",
documentId: "",
Link: "",
File: "",
sanlamuserIdDetails: ""
}
];
}
date = new Date(value[i].created_at * 1000);
year = date.getFullYear();
dates = date.getDate();
day = date.getDay();
month = date.getMonth();
hours = date.toLocaleTimeString();
minutes = date.getMinutes();
time = day + " , " + month + " , " + dates + " " + year + " " + hours;
Information.push({
additional_comments: value[i].additional_comments,
Additional_detail: value[i].Additional_detail,
approx_gratification_value: value[i].approx_gratification_value,
created_at: value[i].requestDate,
donor_recipient_name: value[i].donor_recipient_name,
donor_recipient_relation: value[i].donor_recipient_relation,
email: value[i].email,
gratification: value[i].gratification,
gratificationID: value[i].gratificationID,
gratification_date: value[i].gratification_date,
gratification_month: value[i].gratification_month,
gratification_status: value[i].gratification_status,
gratification_year: value[i].gratification_year,
head_of_compliance: value[i].head_of_compliance,
mancoUserId: value[i].mancoUserId,
manco_ceo: value[i].manco_ceo,
updated_at: value[i].updated_at,
userRole: value[i].userRole,
dataid: FileData[0].dataid,
documentId: FileData[0].documentId,
Link: FileData[0].Link,
File: FileData[0].File,
sanlamuserIdDetails: FileData[0].sanlamuserIdDetails
});
};
var this_1 = this, date, year, dates, day, month, hours, minutes, time;
for (var i = 0; i < value.length; i++) {
_loop_1(i);
}
this.User = Information;
this.dtTrigger.next();
};
GratificationRecordsComponent.prototype.AddNewGrat = function () {
document.getElementById("modelsGret").click();
};
GratificationRecordsComponent.prototype.closeModal = function () {
// this function for close bootstrap model
this.closeBtn.nativeElement.click();
this.GratificationRequest.reset();
};
GratificationRecordsComponent.prototype.filterValue = function (value) {
var Details;
var FileData;
var FilesData;
var Information = [];
var _loop_2 = function (i) {
Details = this_2.userInformation.filter(function (person) {
return person.username == value[i].mancoUserId;
});
if (Details.length == 0) {
Details = [{
lastname: '',
role: '',
sanlamuserid: '',
username: '',
status: '',
firstname: '',
mail: ''
}];
}
// console.log(value[i].mancoUserId)
FilesData = this_2.arrayFilename.filter(function (FileData) {
return FileData.dataid == value[i].gratificationID;
});
if (FilesData != null && FilesData != "") {
FileData = FilesData;
}
else {
FileData = [
{
dataid: "",
documentId: "",
Link: "",
File: "",
sanlamuserIdDetails: ""
}
];
}
date = new Date(value[i].created_at * 1000);
year = date.getFullYear();
dates = date.getDate();
day = date.getDay();
month = date.getMonth();
hours = date.toLocaleTimeString();
minutes = date.getMinutes();
time = dates + "-" + month + "-" + year + " " + hours;
// ["Username","Email","userRole","Gratification", "Date", "Approx Value","Name of Donor","Relationship to recipient","Status"];
this_2.PdfData.push([
Details[0].firstname + ' ' + Details[0].lastname,
value[i].email,
value[i].userRole,
value[i].gratification,
value[i].gratification_date,
value[i].approx_gratification_value,
value[i].donor_recipient_name,
value[i].donor_recipient_relation,
value[i].manco_ceo
]);
All_filter_Details = this_2.ALl_User.filter(function (person) {
return person.username == value[i].mancoUserId;
});
// console.log(All_filter_Details)
if (All_filter_Details.length > 0) {
this_2.ALl_User.push({
lastname: Details[0].lastname,
role: Details[0].role,
sanlamuserid: Details[0].sanlamuserid,
username: Details[0].username,
status: Details[0].status,
firstname: Details[0].firstname,
mail: Details[0].mail
});
}
Information.push({
additional_comments: value[i].additional_comments,
Additional_detail: value[i].Additional_detail,
approx_gratification_value: value[i].approx_gratification_value,
created_at: value[i].requestDate,
donor_recipient_name: value[i].donor_recipient_name,
donor_recipient_relation: value[i].donor_recipient_relation,
email: value[i].email,
gratification: value[i].gratification,
gratificationID: value[i].gratificationID,
gratification_date: value[i].gratification_date,
gratification_month: value[i].gratification_month,
gratification_status: value[i].gratification_status,
gratification_year: value[i].gratification_year,
head_of_compliance: value[i].head_of_compliance,
mancoUserId: value[i].mancoUserId,
manco_ceo: value[i].manco_ceo,
updated_at: value[i].updated_at,
userRole: value[i].userRole,
lastname: Details[0].lastname,
role: Details[0].role,
sanlamuserid: Details[0].sanlamuserid,
status: Details[0].status,
firstname: Details[0].firstname,
mail: Details[0].mail,
dataid: FileData[0].dataid,
documentId: FileData[0].documentId,
Link: FileData[0].Link,
File: FileData[0].File,
sanlamuserIdDetails: FileData[0].sanlamuserIdDetails
});
};
var this_2 = this, date, year, dates, day, month, hours, minutes, time, All_filter_Details;
for (var i = 0; i < value.length; i++) {
_loop_2(i);
}
sessionStorage.setItem('PA-sharing-Data', JSON.stringify(Information));
// console.log(Information);
this.User = Information;
this.Alluser_details = Information;
this.ALl_User = Object.values(Information.reduce(function (acc, cur) {
return Object.assign(acc, (_a = {}, _a[cur.mail] = cur, _a));
var _a;
}, {}));
this.dtTrigger.next();
};
GratificationRecordsComponent.prototype.ExportAllData = function () {
var columns = ["Username", "Email", "Role", "Gratification", "Date", "Approx Value", "Name of Donor", "Relationship to recipient", "Status"];
var rows = this.PdfData;
var doc = new jsPDF();
doc.autoTable({
theme: 'grid',
columnStyles: { 0: { halign: 'left' } },
margin: { top: 10 },
StyleDef: { cellWidth: 'wrap' },
head: [columns],
body: this.PdfData
});
doc.save("table.pdf");
};
GratificationRecordsComponent.prototype.ExportIndivisual = function (e) {
var columns = [e.firstname + " " + e.lastname, "RecordsGratification Information Records"];
var rows = this.PdfData;
var doc = new jsPDF();
doc.autoTable({
theme: 'grid',
columnStyles: { 0: { halign: 'left', fontSize: 14 }, 1: { halign: 'left', fontSize: 14 } },
margin: { top: 10 },
StyleDef: { cellWidth: 'wrap' },
head: [columns],
body: [
["Name", e.firstname.toUpperCase() + " " + e.lastname.toUpperCase()],
["Email", e.email.toUpperCase()],
["Role", e.userRole.toUpperCase()],
["Gratification", e.gratification.toUpperCase()],
["Date", e.gratification_date],
["Approx Value", e.approx_gratification_value],
["Name of Donor", e.donor_recipient_name.toUpperCase()],
["Relationship to recipient", e.donor_recipient_relation.toUpperCase()],
["Status", e.manco_ceo.toUpperCase()]
]
});
doc.save("table.pdf");
};
GratificationRecordsComponent.prototype.getUserGratificationList = function () {
var _this = this;
var data = {
// LastUrl: "https://3z1tfh0og1.execute-api.us-east-2.amazonaws.com/prod/api/GerDatabyTableName",
// table: "gratification_record"
action: "list_gratification_hoc"
};
this.common.saveFundRiskData(data).subscribe(function (all_data) {
var res_user = JSON.parse(all_data._body);
var response = JSON.parse(res_user.body);
if (response.status == "200") {
var data_1 = {
// LastUrl: "https://3z1tfh0og1.execute-api.us-east-2.amazonaws.com/prod/SanlamUserList"
action: 'getalluser'
};
_this.common.saveFundRiskData(data_1).subscribe(function (users) {
var res_user = JSON.parse(users._body);
var userData = JSON.parse(res_user.body);
if (userData.status == "200") {
_this.userInformation = userData.data;
_this.filterValue(response.data);
}
else {
}
}, function (error) { return console.log(error); });
}
else {
}
}, function (error) {
_this.getUserGratificationList();
console.log("Serve Error");
});
};
GratificationRecordsComponent.prototype.GetUserDetails = function () {
var _this = this;
var data = {
// LastUrl: "https://3z1tfh0og1.execute-api.us-east-2.amazonaws.com/prod/SanlamUserList"
action: 'getalluser'
};
this.common.saveFundRiskData(data).subscribe(function (users) {
var res_user = JSON.parse(users._body);
var response = JSON.parse(res_user.body);
if (response.status == "200") {
_this.userInformation = response.data;
}
else {
}
}, function (error) { return console.log(error); });
};
GratificationRecordsComponent.prototype.ChangeStatus = function (value, shape) {
var _this = this;
var MessageArray = {
email: value.email,
userRole: value.userRole,
username: value.firstname + " " + value.lastname,
status: shape.value
};
var updatedata = value;
updatedata["action"] = "gratificationRecordAction";
if (this.userRole == "Manco Head" || this.userRole == "administrator") {
updatedata["manco_ceo"] = shape.value;
updatedata["head_of_compliance"] = shape.value;
}
else if (this.userRole == "director" ||
this.userRole == "administrator") {
updatedata["manco_ceo"] = shape.value;
updatedata["head_of_compliance"] = shape.value;
}
this.common.saveFundRiskData(updatedata).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
if (shape.value == 'Acknowledged & Closed' || shape.value == 'approved') {
_this.sendMessage(MessageArray);
}
else {
_this.send_Cancel_Message(MessageArray);
}
toastr.success("Request has been Processed");
}
else {
//toastr.error(res.message);
}
}, function (error) {
console.log("Serve Error");
});
};
GratificationRecordsComponent.prototype.gratificationCom = function (value) {
var _this = this;
this.getCommentData(this.Comment_Record.value["to_id"]);
this.Comment_Record.controls["from_type"].setValue(this.userRole);
this.Comment_Record.controls["from_id"].setValue(this.currentUerId["username"]);
this.Comment_Record.controls["to_type"].setValue("manco user");
this.Comment_Record.controls["to_id"].setValue(value["mancoUserId"]);
this.gratificationComment = setInterval(function () {
_this.getCommentData(_this.Comment_Record.value["to_id"]);
}, 5000);
//this.getCommentData(this.Comment_Record.value['to_id']);
document.getElementById("modelsComment").click();
};
GratificationRecordsComponent.prototype.SendMessagess = function (value) {
var _this = this;
var data = value;
data["to_from_id"] = value["to_id"] + "|" + this.currentUerId["username"];
data["action"] = "allactionquerypoint";
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
var div = document.getElementById("messages");
div.scrollTop = div.scrollHeight + 101;
_this.Comment_Record.controls["query"].setValue("");
_this.CommentDatad = res.data;
}
else {
//toastr.error(res.message);
}
});
};
GratificationRecordsComponent.prototype.getCommentData = function (value) {
var _this = this;
var data = {
action: "allToactionquerypoint",
mod_type: "Gratification_Records",
to_from_id: value + "|" + this.currentUerId["username"]
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
if (res.data != null || res.data != "") {
_this.CommentDatad = res.data;
setTimeout(function () {
var div = document.getElementById("messages");
div.scrollTop = div.scrollHeight;
}, 1000);
}
else {
}
}
else {
}
});
};
GratificationRecordsComponent.prototype.GetFileData = function () {
var _this = this;
this.common
.saveFundRiskData({
action: "getdocumentByTilename",
tilesName: "Gratification Record"
})
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
_this.getUserGratificationList();
if (res.status == "200") {
for (var i = 0; i < res.data.length; i++) {
var tmp = res.data[i]["documnentName"];
var arrFilename = tmp.split("/");
_this.FileNames = decodeURIComponent(arrFilename[arrFilename.length - 1]);
_this.arrayFilename.push({
sanlamuserIdDetails: res.data[i].userid,
dataid: res.data[i].dataid,
File: decodeURIComponent(arrFilename[arrFilename.length - 1]),
Link: res.data[i]["documnentName"],
documentId: res.data[i]["documentId"]
});
}
}
else {
//console.log(res);
}
}, function (error) {
_this.GetFileData();
console.log("Server Error");
});
};
GratificationRecordsComponent.prototype.GetFileDatabyuser = function () {
var _this = this;
var data = {
action: "getdocumentbyUser",
userid: this.currentUerId["username"],
tilesName: "Gratification Record"
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
_this.CheckRequest();
if (res.data != null && res.data != "") {
for (var i = 0; i < res.data.length; i++) {
var tmp = res.data[i]["documnentName"];
var arrFilename = tmp.split("/");
_this.FileNames = decodeURIComponent(arrFilename[arrFilename.length - 1]);
_this.arrayFilename.push({
sanlamuserIdDetails: res.data[i].userid,
File: decodeURIComponent(arrFilename[arrFilename.length - 1]),
Link: res.data[i]["documnentName"],
documentId: res.data[i]["documentId"],
dataid: res.data[i]["dataid"]
});
}
_this.View_Detals = _this.arrayFilename;
}
}, function (error) {
_this.GetFileDatabyuser();
console.log("Server Error");
});
};
// this function for send email for update user Request updates Status
GratificationRecordsComponent.prototype.sendMessage = function (role) {
var MailEmail = [];
MailEmail.push(role.email);
var data = {
action: "commonMailservice",
to: MailEmail,
subject: " Regstone PA Share & Grats Submissions",
message: "
Hi,
Your Personal Share submission has been reviewed.\n .Please log onto Sanlam Regstone to view.
Regards
The Sanlam Regstone Team
"
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
}
else {
}
});
};
//Send Email for cancel
GratificationRecordsComponent.prototype.send_Cancel_Message = function (role) {
var MailEmail = [];
if (role.status == 'active') {
MailEmail.push(role.email);
}
var data = {
action: "commonMailservice",
to: MailEmail,
subject: " Regstone PA Share & Grats Submissions",
message: "
Hi,
\n
Your Personal Share Submission has not been approved.\n .Please contact the Sanlam Head of Compliance @ william.ferguson@sanlam.ie for further detail.
Regards
\n
The Sanlam Regstone Team
"
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
}
else {
}
});
};
GratificationRecordsComponent.prototype.DownloadChat = function (value) {
var _this = this;
this.Newarray = [];
var data = {
action: "allToactionquerypoint",
mod_type: "Gratification_Records",
to_from_id: value["mancoUserId"] + "|" + this.currentUerId["username"]
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
if (res.data != null || res.data != "") {
_this.CommentDatad = res.data;
var months_arr = [
"Jan",
"Feb",
"March",
"April",
"May",
"June",
"July",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
];
var days_arr = [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
];
for (var i = 0; i < res.data.length; i++) {
var date = new Date(res.data[i]["created_at"] * 1);
var year = date.getFullYear();
var dates = date.getDate();
var day = days_arr[date.getDay()];
var month = date.getMonth() + 1;
var hours = date.toLocaleTimeString();
var minutes = date.getMinutes();
var time = day + "," + dates + "/" + month + "/" + year + ", " + hours;
if (res.data[i].from_type == _this.userRole) {
var from = localStorage.getItem("custom:first_name") +
localStorage.getItem("custom:last_name") +
" (" +
res.data[i].from_type +
")";
var to = _this.userInformation[0].name + " (" + res.data[i].to_type + ")";
var query = res.data[i].query;
_this.Newarray.push([
dates + "/" + month + "/" + year + ", " + hours,
from,
to,
query
]);
}
else if (res.data[i].to_type == _this.userRole) {
var from = _this.userInformation[0].name +
" (" +
res.data[i].from_type +
")";
var to = localStorage.getItem("custom:first_name") +
localStorage.getItem("custom:last_name") +
" (" +
res.data[i].to_type +
")";
var query = res.data[i].query;
_this.Newarray.push([
dates + "/" + month + "/" + year + ", " + hours,
from,
to,
query
]);
}
}
var columns = ["Date", "From", "To", "Message"];
var rows = _this.Newarray;
var doc = new jsPDF("p", "pt");
doc.setFontSize(20);
doc.text(30, 30, _this.userInformation[0].name + " " + "Comment");
doc.autoTable(columns, rows, {
columnStyles: {
0: { columnWidth: 150 },
1: { columnWidth: 90, overflow: "linebreak" },
2: { columnWidth: 90, overflow: "linebreak" },
3: { overflow: "linebreak" }
},
margin: { top: 50, left: 20, right: 20, bottom: 0 },
drawHeaderCell: function (cell, data) {
if (cell.raw === "Date") {
//paint.Name header red
cell.styles.fontSize = 15;
cell.styles.textColor = [255, 0, 0];
}
else {
cell.styles.textColor = 255;
cell.styles.fontSize = 10;
}
},
createdCell: function (cell, data) { }
});
doc.save(_this.userInformation[0].name + ".pdf");
}
else {
}
}
else {
}
});
};
GratificationRecordsComponent.prototype.viewDetails = function (value, template) {
this.AllDetails = value;
this.modalRef = this.modalService.show(template);
// $('#viewDetails').click();
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(angular_datatables__WEBPACK_IMPORTED_MODULE_5__["DataTableDirective"]),
__metadata("design:type", angular_datatables__WEBPACK_IMPORTED_MODULE_5__["DataTableDirective"])
], GratificationRecordsComponent.prototype, "dtElement", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])("closeBtn"),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"])
], GratificationRecordsComponent.prototype, "closeBtn", void 0);
GratificationRecordsComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: "app-gratification-records",
template: __webpack_require__(/*! ./gratification-records.component.html */ "./src/app/components/PAShareDealingDashboard/gratification-records/gratification-records.component.html"),
styles: [__webpack_require__(/*! ./gratification-records.component.css */ "./src/app/components/PAShareDealingDashboard/gratification-records/gratification-records.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"],
_angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_8__["CognitoUtil"],
_services_common_service__WEBPACK_IMPORTED_MODULE_7__["CommonService"],
ngx_spinner__WEBPACK_IMPORTED_MODULE_11__["NgxSpinnerService"],
_angular_http__WEBPACK_IMPORTED_MODULE_4__["Http"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"],
ngx_bootstrap_modal__WEBPACK_IMPORTED_MODULE_12__["BsModalService"]])
], GratificationRecordsComponent);
return GratificationRecordsComponent;
}());
var AddgratificationRecordsComponent = /** @class */ (function () {
function AddgratificationRecordsComponent(router, fundform, cognitoUtil, common, http) {
this.router = router;
this.fundform = fundform;
this.cognitoUtil = cognitoUtil;
this.common = common;
this.http = http;
this.title = "Add Gratification Request";
this.data = new FormData();
this.bsValue = new Date();
this.currentUerId = this.cognitoUtil.getCurrentUser();
this.FileNames = [];
this.arrayFilename = [];
this.selectFIles = "";
this.tilesName = "Gratification Record";
this.FOLDER = "assets/uploadDocument/GratificationDocument/";
this.UserData = [];
this.months = [
{ id: 1, name: "January" },
{ id: 2, name: "February" },
{ id: 3, name: "March" },
{ id: 4, name: "April" },
{ id: 5, name: "May" },
{ id: 6, name: "June" },
{ id: 7, name: "July" },
{ id: 8, name: "August" },
{ id: 9, name: "September" },
{ id: 10, name: "October" },
{ id: 11, name: "November" },
{ id: 12, name: "December" }
];
if (localStorage.getItem("token") == null ||
localStorage.getItem("token") == "") {
this.router.navigateByUrl("/login");
}
else {
this.GratificationRequest = fundform.group({
gratificationID: "",
mancoUserId: this.currentUerId["username"],
gratification: ["", _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
gratification_status: ["", _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
gratification_dates: [null, _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
donor_recipient_name: ["", _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
donor_recipient_relation: [""],
approx_gratification_value: [""],
additional_comments: [""],
CheckingForm: [""],
Additional_detail: [""]
});
}
this.detePickerConfig = Object.assign({}, {
showWeekNumbers: false,
dateInputFormat: "DD-MM-YYYY",
adaptivePosition: true,
minDate: this.bsValue,
});
}
AddgratificationRecordsComponent.prototype.ngOnInit = function () {
// this.GetFileData();
};
AddgratificationRecordsComponent.prototype.DisableDays = function (evt) {
var day = new Date(evt.target.value).getDay();
if (day == 0 || day == 6) {
this.GratificationRequest.controls['gratification_dates'].setValue('');
//toastr.error('invalid date');
}
// console.log(day);
// $("#gratification_date").click();
// setInterval(function() {
// $(
// ".bs-datepicker-body table.days.weeks tbody tr td:first-child"
// ).addClass("disabled");
// $(".bs-datepicker-body table.days.weeks tbody tr td:first-child").css(
// "pointer-events",
// "none"
// );
// $(".bs-datepicker-body table.days.weeks tbody tr td:last-child").addClass(
// "disabled"
// );
// $(".bs-datepicker-body table.days.weeks tbody tr td:last-child").css(
// "pointer-events",
// "none"
// );
// }, 100);
};
AddgratificationRecordsComponent.prototype.setTwoNumberDecimal = function (el) {
if (el.value.indexOf(".") >= 0) {
el.value = parseFloat(el.value).toFixed(2);
}
};
AddgratificationRecordsComponent.prototype.submitForm = function (Data) {
var _this = this;
var d = new Date(Data.gratification_dates);
var dt = d.getDate();
var mn = d.getMonth();
var yy = d.getFullYear();
var CurrentDate = new Date();
mn++;
console.log(this.Gratifications_Offered);
if (this.Gratifications_Offered) {
var checkCondition = this.Gratifications_Offered.filter(function (UserDatas) {
return UserDatas.month == mn && UserDatas.year == yy;
});
if (checkCondition != null && checkCondition != "") {
sweetalert2__WEBPACK_IMPORTED_MODULE_9___default()({
title: 'You have completed submissions for this month.',
text: '',
type: 'warning'
});
return;
}
}
sweetalert2__WEBPACK_IMPORTED_MODULE_9___default()({
title: 'Would you like to submit a gratification?',
input: 'checkbox',
inputPlaceholder: 'I understand and have complied with SAMI’s gratification policy and procedures.'
}).then(function (result) {
if (result.value) {
sessionStorage.setItem('CheckData', 'Success');
// Swal("Success!", "Request successfully submitted", "success");
_this.checkSweet(_this.GratificationRequest.value);
}
else if (result.value === 0) {
sweetalert2__WEBPACK_IMPORTED_MODULE_9___default()({ type: 'error', text: "Please select the dealing policy & procedures" });
}
else {
console.log("modal was dismissed by " + result.dismiss);
}
});
setTimeout(function () {
if (sessionStorage.getItem('CheckData') != '' && sessionStorage.getItem('CheckData') != null) {
// this.checkSweet(this.GratificationRequest.value);
}
}, 1000);
};
AddgratificationRecordsComponent.prototype.checkSweet = function (value) {
var _this = this;
var data = value;
var d = new Date(value.gratification_dates);
var dt = d.getDate();
var mn = d.getMonth();
mn++;
sweetalert2__WEBPACK_IMPORTED_MODULE_9___default()("Success!", "Request successfully submitted", "success");
data["action"] = "gratificationRecordAction";
data["manco_ceo"] = "Under Review";
data["head_of_compliance"] = "Under Review";
data["userRole"] = localStorage.getItem("custom:user_role");
data["email"] = localStorage.getItem("email");
data["username"] =
localStorage.getItem("custom:first_name") +
" " +
localStorage.getItem("custom:last_name");
var yy = d.getFullYear();
var CurrentDate = new Date();
var CurrentDates = CurrentDate.getDate();
var CurrentMonth = CurrentDate.getMonth();
CurrentMonth++;
var CurrentYear = CurrentDate.getFullYear();
data["gratification_date"] = dt + "/" + mn + "/" + yy;
data["gratification_month"] = mn;
data["gratification_year"] = yy;
data["requestDate"] = CurrentDates + "-" + CurrentMonth + "-" + CurrentYear;
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
_this.gratificationID = res.data["gratificationID"];
_this.gratification_month = res.data["gratification_month"];
_this.gratification_year = res.data["gratification_year"];
if (_this.file != "" && _this.file != null) {
_this.FileName = _this.file.name;
$("#SaveGratificationRequest").text("Process");
$("#SaveGratificationRequest").attr("disabled", "disabled");
_this.uploadDocument();
}
else {
setTimeout(function () {
_this.router.navigate([
"/Gratification_Reporting/Gratification_Records"
]);
}, 2000);
}
if (localStorage.getItem("custom:user_role") == "manco user" ||
localStorage.getItem("custom:user_role") == "director") {
_this.sendMessage("Manco Head");
}
else if (localStorage.getItem("custom:user_role") == "Manco Head") {
_this.sendMessage("director");
}
_this.GratificationRequest.reset();
toastr.success("Gratification Added Successfully ");
}
}, function (error) {
console.log(error);
});
};
AddgratificationRecordsComponent.prototype.scrollPostion = function () {
alert($(".tab_content_left").scrollTop() + " px");
};
AddgratificationRecordsComponent.prototype.GetFileData = function () {
var _this = this;
var information;
var data = {
action: "getdocumentbyUser",
userid: this.currentUerId["username"],
month: new Date().getMonth(),
year: new Date().getFullYear(),
tilesName: "Gratification Record"
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.data != null && res.data != "") {
for (var i = 0; i < res.data.length; i++) {
var tmp = res.data[i]["documnentName"];
var arrFilename = tmp.split("/");
_this.FileNames = decodeURIComponent(arrFilename[arrFilename.length - 1]);
_this.arrayFilename.push({
sanlamuserIdDetails: res.data[i].userid,
dataid: res.data[i].dataid,
File: decodeURIComponent(arrFilename[arrFilename.length - 1]),
Link: res.data[i]["documnentName"],
documentId: res.data[i]["documentId"]
});
}
}
}, function (error) {
_this.GetFileData();
console.log("Server Error");
});
};
AddgratificationRecordsComponent.prototype.fileEvent = function (e) {
this.selectFIles = e.target.files[0];
var checkFileDatasdadsa;
this.file = this.selectFIles;
if (this.selectFIles != null) {
if (this.selectFIles["type"] == "application/pdf" ||
this.selectFIles["type"] == "application/vnd.ms-excel" ||
this.selectFIles["type"] ==
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") {
this.errorMessage = null;
if (this.arrayFilename != null && this.arrayFilename == "") {
checkFileDatasdadsa = this.arrayFilename.filter(function (file) {
return file.File == e.target.files[0].name;
});
if (checkFileDatasdadsa != null && checkFileDatasdadsa != "") {
if (confirm("Do you want overwrite exist File")) {
this.file = this.selectFIles;
this.FileName = new Date().getTime() + this.file.name;
}
else {
this.FileName = this.file.name;
this.file = this.selectFIles;
}
}
}
else {
this.file = this.selectFIles;
this.FileName = this.file.name;
}
}
else {
this.file = null;
this.errorMessage = "File type not allowed.";
}
}
else {
this.file = null;
}
};
AddgratificationRecordsComponent.prototype.uploadDocument = function () {
var _this = this;
var bucket = new aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_10__({
accessKeyId: _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].accessKeyId,
secretAccessKey: _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].secretAccessKey,
region: _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].S3region
});
var params = {
Bucket: _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].BucketName,
Key: this.FOLDER +
localStorage.getItem("custom:first_name") +
localStorage.getItem("custom:last_name") +
"/" +
this.FileName,
Body: this.file
};
bucket.upload(params, function (err, data) {
if (err) {
// console.log(err);
_this.errorMessage = err;
}
_this.imageFile = data["Location"];
var d = new Date();
var n = d.getTime();
var DocumentData = {
tilesName: _this.tilesName,
userid: _this.currentUerId["username"],
documnentName: _this.imageFile,
dataid: _this.gratificationID,
documentId: "",
month: new Date().getMonth(),
year: new Date().getFullYear(),
created_at: n,
action: "savedocument"
};
_this.common.saveFundRiskData(DocumentData).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
$("#SaveGratificationRequest").text("Save");
$("#SaveGratificationRequest").removeAttr("disabled");
toastr.success("Successfully Uploaded");
_this.router.navigate([
"/Gratification_Reporting/Gratification_Records"
]);
}, function (error) {
console.log("Server Error");
});
});
};
AddgratificationRecordsComponent.prototype.sendMessage = function (role) {
var _this = this;
var DirectorData = {
action: "getalluser"
};
this.common.saveFundRiskData(DirectorData).subscribe(function (response) {
var resData = JSON.parse(response._body);
var resource = JSON.parse(resData.body);
var RoleData = [];
var Role = [];
if (resource.status == "200") {
for (var i = 0; i < resource.data.length; i++) {
RoleData.push({
firstname: resource.data[i].firstname,
lastname: resource.data[i].lastname,
mail: resource.data[i].mail,
role: resource.data[i].role.split(","),
sanlamuserid: resource.data[i].sanlamuserid,
status: resource.data[i].status
});
Role.push(resource.data[i].role.split(","));
}
var result = [];
$.each(Role, function (index, value) {
var rs = value.indexOf(role);
if (rs == -1) {
}
else {
result.push(RoleData[index]);
}
});
var MailEmail = [];
// if (role === 'director') {
// MailEmail.push(['Richard.Aslett@sanlam.ie']);
// } else {
for (var i = 0; i < result.length; i++) {
if (result[i].status == 'active') {
MailEmail.push(result[i].mail);
}
}
// }
// for (let i = 0; i < result.length; i++) {
// MailEmail.push(result[i].mail);
// }
var data = {
action: "commonMailservice",
to: MailEmail,
subject: "Regstone PA Share & Grats Submissions",
//Note 1 : "Hi, /nYou have Gratification Submissions that require your attention. /n Please log onto Sanlam Regstone to review. /nRegards, /nThe Sanlam Regstone Team"
message: "Hi,
You have Gratification Submissions that require your attention. \n Please log onto Sanlam Regstone to review.
Regards
The Sanlam Regstone Team
"
};
_this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
}
else {
//toastr.error('res.message','Error found');
}
}, function (error) {
console.log(error);
});
}
});
};
AddgratificationRecordsComponent.prototype.DisplayMOnths = function () {
if (this.DisplayMOnth != "" && this.DisplayMOnth != null) {
return "none";
}
};
AddgratificationRecordsComponent.prototype.GetDisableMOnth = function () {
var _this = this;
this.common
.GetData({ LastUrl: "nothingTosubmit/" + this.currentUerId["username"] })
.subscribe(function (res) {
if (res.status == 200) {
if (res.data != null && res.data != "") {
_this.Gratifications_Offered = res.data.filter(function (monthData) {
return monthData.section == "Gratifications Offered";
});
_this.Gratifications_Received = res.data.filter(function (monthData) {
return monthData.section == "Gratifications Received";
});
}
else {
}
}
}, function (error) {
console.log(error);
});
};
AddgratificationRecordsComponent.prototype.PersonalData = function () {
var _this = this;
var TITLE;
var value = this.GratificationRequest.controls["gratification"].value;
if (value == "offered") {
TITLE = "Gratifications Offered";
}
else if (value == "received") {
TITLE = "Gratifications Received";
}
var data = {
LastUrl: "nothingTosubmit/section/id",
action: "nothingTosubmit/section/id",
userId: this.currentUerId["username"],
section: TITLE
};
this.common.saveFundRiskData(data).subscribe(function (resporesnse) {
var resData = JSON.parse(resporesnse._body);
var res = JSON.parse(resData.body);
if (res.status == 200) {
if (res.data != "" && res.data != null) {
_this.Gratifications_Offered = res.data.filter(function (monthData) {
return monthData.section == TITLE;
});
var _loop_3 = function (i) {
b = _this.months.findIndex(function (item) { return item.id == res.data[i].month; });
_this.months[b]["disable"] = "disable";
};
var b;
for (var i = 0; i < res.data.length; i++) {
_loop_3(i);
}
}
}
}, function (error) {
console.log("Server Internal Error");
});
};
AddgratificationRecordsComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: "app-gratification-records",
template: __webpack_require__(/*! ./addgratification.html */ "./src/app/components/PAShareDealingDashboard/gratification-records/addgratification.html"),
styles: [__webpack_require__(/*! ./gratification-records.component.css */ "./src/app/components/PAShareDealingDashboard/gratification-records/gratification-records.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"],
_angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_8__["CognitoUtil"],
_services_common_service__WEBPACK_IMPORTED_MODULE_7__["CommonService"],
_angular_http__WEBPACK_IMPORTED_MODULE_4__["Http"]])
], AddgratificationRecordsComponent);
return AddgratificationRecordsComponent;
}());
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/nothing-shareholing/nothing-shareholing.component.css":
/*!**********************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/nothing-shareholing/nothing-shareholing.component.css ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/nothing-shareholing/nothing-shareholing.component.html":
/*!***********************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/nothing-shareholing/nothing-shareholing.component.html ***!
\***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n Loading...
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Share Holding Statement \r\n \r\n
\r\n
\r\n
\r\n \r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
"
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/nothing-shareholing/nothing-shareholing.component.ts":
/*!*********************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/nothing-shareholing/nothing-shareholing.component.ts ***!
\*********************************************************************************************************/
/*! exports provided: NothingShareholingComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NothingShareholingComponent", function() { return NothingShareholingComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var angular_datatables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! angular-datatables */ "./node_modules/angular-datatables/index.js");
/* harmony import */ var ngx_bootstrap__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ngx-bootstrap */ "./node_modules/ngx-bootstrap/esm5/ngx-bootstrap.js");
/* harmony import */ var ngx_spinner__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ngx-spinner */ "./node_modules/ngx-spinner/fesm5/ngx-spinner.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var src_app_services_cognito_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var src_app_services_common_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var src_environments_environment__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2 */ "./node_modules/sweetalert2/dist/sweetalert2.all.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_9__);
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 NothingShareholingComponent = /** @class */ (function () {
function NothingShareholingComponent(spinner, common, cognito, router, modalService) {
this.spinner = spinner;
this.common = common;
this.cognito = cognito;
this.router = router;
this.modalService = modalService;
this.adminListData = [];
this.year = [];
this.currentUerId = this.cognito.getCurrentUser();
this.dtOptions = {};
this.dtTrigger = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
this.User_share_holding = [];
this.report_data = [];
this.dtOptions = {
pagingType: 'full_numbers',
// pageLength: 10,
pageLength: -1,
lengthMenu: [[-1, 10, 20, 25, 50, 100, 200], ['All', 10, 20, 25, 50, 100, 200]]
};
for (var i = 2018; i <= new Date().getFullYear() + 1; i++) {
this.adminListData.push({ year: i, time_period: 'March - August', checked: false, stamp: 282 + i }, { year: i + 1, time_period: 'September - February', checked: false, stamp: 318 + i });
this.year.push(i);
}
}
NothingShareholingComponent.prototype.ngOnInit = function () {
var _this = this;
this.common.saveFundRiskData({
"action": "getting_nothing_share_holding_by_id", "user_id": this.currentUerId["username"],
"user_role": localStorage.getItem('custom:user_role')
}).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
// console.log(res)
if (res.status == "200") {
_this.User_share_holding = res.data;
res.data.filter(function (database) {
_this.adminListData.filter(function (local) {
if (local.time_period == database.time_period && local.year == database.year) {
local.checked = true;
}
return local.time_period == database.time_period && local.year == database.year;
});
});
_this.dtTrigger.next();
}
else if (res.status == '201') {
toastr.error(res.message.message, "Error!!!");
localStorage.clear();
sessionStorage.clear();
_this.router.navigate(['/']);
}
});
};
NothingShareholingComponent.prototype.request_make = function ($event, row_data) {
var _this = this;
console.log(row_data);
sweetalert2__WEBPACK_IMPORTED_MODULE_9___default()({
title: 'Submission Complete',
input: 'checkbox',
inputPlaceholder: "I understand and have complied with SAMI's personal share dealing policy and procedures"
}).then(function (result) {
if (result.value) {
sweetalert2__WEBPACK_IMPORTED_MODULE_9___default()("Success!", "Request successfully submitted", "success");
var data = {
user_role: localStorage.getItem('custom:user_role'),
year: row_data.year,
time_period: row_data.time_period,
user_ID: _this.currentUerId["username"],
action: 'savenothingShareHoldingdata'
};
_this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
toastr.success(res.message, "Success !!!");
_this.send_notification();
// this.dtElement.dtInstance.then((dtInstance: DataTables.Api) => {
// dtInstance.destroy();
// this.ngOnInit()
// })
}
else if (res.status == '201') {
toastr.error(res.message.message, "Error!!!");
localStorage.clear();
sessionStorage.clear();
_this.router.navigate(['/']);
}
});
}
else if (result.value === 0) {
sweetalert2__WEBPACK_IMPORTED_MODULE_9___default()({ type: 'error', text: "Please select the dealing policy & procedures" });
}
else {
console.log("modal was dismissed by " + result.dismiss);
}
});
};
NothingShareholingComponent.prototype.send_notification = function () {
var MailEmail = ['clare.cashin@gmail.com'];
// MailEmail.push('ravi.joshi@iglobsyn.com');
var data = {
action: "commonMailservice",
to: MailEmail,
subject: " Regstone PA Share & Grats Submissions",
message: "
\n
\n Dear ManCO Head of Compliance,
There are Personal Share Dealing submissions and/or Gratfications that require your attention.\n Please logon to review at Sanlam Regstone .
\n If you have any queries please contact regstone@sanlam.ie.\n
Regards
The Sanlam Regstone Team
"
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
}
else {
}
});
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(angular_datatables__WEBPACK_IMPORTED_MODULE_2__["DataTableDirective"]),
__metadata("design:type", angular_datatables__WEBPACK_IMPORTED_MODULE_2__["DataTableDirective"])
], NothingShareholingComponent.prototype, "dtElement", void 0);
NothingShareholingComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'nothing-shareholing',
template: __webpack_require__(/*! ./nothing-shareholing.component.html */ "./src/app/components/PAShareDealingDashboard/nothing-shareholing/nothing-shareholing.component.html"),
styles: [__webpack_require__(/*! ./nothing-shareholing.component.css */ "./src/app/components/PAShareDealingDashboard/nothing-shareholing/nothing-shareholing.component.css")]
}),
__metadata("design:paramtypes", [ngx_spinner__WEBPACK_IMPORTED_MODULE_4__["NgxSpinnerService"],
src_app_services_common_service__WEBPACK_IMPORTED_MODULE_7__["CommonService"],
src_app_services_cognito_service__WEBPACK_IMPORTED_MODULE_6__["CognitoUtil"],
_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
ngx_bootstrap__WEBPACK_IMPORTED_MODULE_3__["BsModalService"]])
], NothingShareholingComponent);
return NothingShareholingComponent;
}());
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/pashare-navebar/pashare-navebar.component.css":
/*!**************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/pashare-navebar/pashare-navebar.component.css ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/pashare-navebar/pashare-navebar.component.html":
/*!***************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/pashare-navebar/pashare-navebar.component.html ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n
× \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
"
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/pashare-navebar/pashare-navebar.component.ts":
/*!*************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/pashare-navebar/pashare-navebar.component.ts ***!
\*************************************************************************************************/
/*! exports provided: PashareNavebarComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PashareNavebarComponent", function() { return PashareNavebarComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
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 PashareNavebarComponent = /** @class */ (function () {
function PashareNavebarComponent(router) {
this.router = router;
this.userRole = localStorage.getItem('custom:user_role');
this.UrlLastAtribute = window.location.href.substr(window.location.href.lastIndexOf('/') + 1);
}
PashareNavebarComponent.prototype.ngOnInit = function () {
if (this.UrlLastAtribute == 'Gratification_Records') {
document.getElementById("Dealing").className = 'active';
}
if (sessionStorage.getItem('token') == null || sessionStorage.getItem('token') == '') {
this.router.navigateByUrl('/login');
}
};
PashareNavebarComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-pashare-navebar',
template: __webpack_require__(/*! ./pashare-navebar.component.html */ "./src/app/components/PAShareDealingDashboard/pashare-navebar/pashare-navebar.component.html"),
styles: [__webpack_require__(/*! ./pashare-navebar.component.css */ "./src/app/components/PAShareDealingDashboard/pashare-navebar/pashare-navebar.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"]])
], PashareNavebarComponent);
return PashareNavebarComponent;
}());
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/review-nothing-shareholing/review-nothing-shareholing.component.css":
/*!************************************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/review-nothing-shareholing/review-nothing-shareholing.component.css ***!
\************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/review-nothing-shareholing/review-nothing-shareholing.component.html":
/*!*************************************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/review-nothing-shareholing/review-nothing-shareholing.component.html ***!
\*************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n Loading...
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Share Holding Statement \r\n \r\n
\r\n
\r\n
\r\n \r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
"
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/review-nothing-shareholing/review-nothing-shareholing.component.ts":
/*!***********************************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/review-nothing-shareholing/review-nothing-shareholing.component.ts ***!
\***********************************************************************************************************************/
/*! exports provided: ReviewNothingShareholingComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReviewNothingShareholingComponent", function() { return ReviewNothingShareholingComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var angular_datatables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! angular-datatables */ "./node_modules/angular-datatables/index.js");
/* harmony import */ var ngx_bootstrap__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ngx-bootstrap */ "./node_modules/ngx-bootstrap/esm5/ngx-bootstrap.js");
/* harmony import */ var ngx_spinner__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ngx-spinner */ "./node_modules/ngx-spinner/fesm5/ngx-spinner.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var src_app_services_cognito_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var src_app_services_common_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var src_environments_environment__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2 */ "./node_modules/sweetalert2/dist/sweetalert2.all.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_9__);
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 ReviewNothingShareholingComponent = /** @class */ (function () {
function ReviewNothingShareholingComponent(spinner, common, cognito, router, modalService) {
this.spinner = spinner;
this.common = common;
this.cognito = cognito;
this.router = router;
this.modalService = modalService;
this.currentUerId = this.cognito.getCurrentUser();
this.dtOptions = {};
this.dtTrigger = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
this.User_share_holding = [];
}
ReviewNothingShareholingComponent.prototype.ngOnInit = function () {
var _this = this;
this.dtOptions = {
pagingType: 'full_numbers',
// pageLength: 10, getting_nothing_share_holding delete_nothing_share_holding_by_id
pageLength: -1,
lengthMenu: [[-1, 10, 20, 25, 50, 100, 200], ['All', 10, 20, 25, 50, 100, 200]]
};
this.common.saveFundRiskData({
"action": "getting_nothing_share_holding"
}).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
_this.User_share_holding = res.data;
_this.dtTrigger.next();
}
else if (res.status == '201') {
toastr.error(res.message.message, "Error!!!");
localStorage.clear();
sessionStorage.clear();
_this.router.navigate(['/']);
}
});
};
ReviewNothingShareholingComponent.prototype.Delete_requestt = function (id) {
var _this = this;
this.common.saveFundRiskData({
"action": "delete_nothing_share_holding_by_id",
"share_Id": id
}).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
_this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.ngOnInit();
});
}
else if (res.status == '201') {
toastr.error(res.message.message, "Error!!!");
localStorage.clear();
sessionStorage.clear();
_this.router.navigate(['/']);
}
});
};
ReviewNothingShareholingComponent.prototype.request_make = function ($event, row_data) {
var _this = this;
console.log($event.target.checked);
var reivew_status = 'In Review';
if ($event.target.checked) {
reivew_status = 'Approved';
}
sweetalert2__WEBPACK_IMPORTED_MODULE_9___default()({
title: 'Would you like to submit Share Holding Statement?',
input: 'checkbox',
inputPlaceholder: "I understand and have complied with SAMI's personal share dealing policy and procedures"
}).then(function (result) {
if (result.value) {
sweetalert2__WEBPACK_IMPORTED_MODULE_9___default()("Success!", "Request successfully submitted", "success");
var data = row_data;
data['review_user_role'] = localStorage.getItem('custom:user_role');
data['year'] = row_data.year;
data['status'] = reivew_status;
data['user_name '] = row_data.user_name;
data['share_Id'] = row_data.share_Id;
data['time_period'] = row_data.time_period;
data['review_user_id'] = _this.currentUerId["username"];
data['action'] = 'update_nothing_ShareHoldingdata';
_this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
toastr.success(res.message, "Success !!!");
}
else if (res.status == '201') {
toastr.error(res.message.message, "Error!!!");
localStorage.clear();
sessionStorage.clear();
_this.router.navigate(['/']);
}
});
}
else if (result.value === 0) {
sweetalert2__WEBPACK_IMPORTED_MODULE_9___default()({ type: 'error', text: "Please select the dealing policy & procedures" });
}
else {
$event.target.checked = false;
console.log("modal was dismissed by " + result.dismiss);
}
});
};
ReviewNothingShareholingComponent.prototype.send_notification = function () {
var MailEmail = ['clare.cashin@gmail.com'];
// MailEmail.push('ravi.joshi@iglobsyn.com');
var data = {
action: "commonMailservice",
to: MailEmail,
subject: " Regstone PA Share & Grats Submissions",
message: "
\n
\n Dear ManCO Head of Compliance,
There are Personal Share Dealing submissions and/or Gratfications that require your attention.\n .Please logon to review at Sanlam Regstone .
\n If you have any queries please contact regstone@sanlam.ie.\n
Regards
The Sanlam Regstone Team
"
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
}
else {
}
});
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(angular_datatables__WEBPACK_IMPORTED_MODULE_2__["DataTableDirective"]),
__metadata("design:type", angular_datatables__WEBPACK_IMPORTED_MODULE_2__["DataTableDirective"])
], ReviewNothingShareholingComponent.prototype, "dtElement", void 0);
ReviewNothingShareholingComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'review-nothing-shareholing',
template: __webpack_require__(/*! ./review-nothing-shareholing.component.html */ "./src/app/components/PAShareDealingDashboard/review-nothing-shareholing/review-nothing-shareholing.component.html"),
styles: [__webpack_require__(/*! ./review-nothing-shareholing.component.css */ "./src/app/components/PAShareDealingDashboard/review-nothing-shareholing/review-nothing-shareholing.component.css")]
}),
__metadata("design:paramtypes", [ngx_spinner__WEBPACK_IMPORTED_MODULE_4__["NgxSpinnerService"],
src_app_services_common_service__WEBPACK_IMPORTED_MODULE_7__["CommonService"],
src_app_services_cognito_service__WEBPACK_IMPORTED_MODULE_6__["CognitoUtil"],
_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
ngx_bootstrap__WEBPACK_IMPORTED_MODULE_3__["BsModalService"]])
], ReviewNothingShareholingComponent);
return ReviewNothingShareholingComponent;
}());
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/review-share-hloding/review-share-hloding.component.css":
/*!************************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/review-share-hloding/review-share-hloding.component.css ***!
\************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/review-share-hloding/review-share-hloding.component.html":
/*!*************************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/review-share-hloding/review-share-hloding.component.html ***!
\*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n Loading...
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n Share Holding Statement \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n Select User \r\n {{user.user_name}} \r\n \r\n \r\n \r\n \r\n Select Year \r\n {{year}} \r\n \r\n \r\n \r\n \r\n Time Period \r\n As at 31st Augest \r\n As at 28th Februarys \r\n \r\n \r\n \r\n\r\n Add Share Holding Statement \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n User \r\n Year Ending \r\n Time Period \r\n Statement \r\n Updated \r\n Role \r\n status \r\n \r\n \r\n \r\n \r\n \r\n {{share.user_name}} \r\n {{share.year}} \r\n {{share.time_period}} \r\n \r\n {{share.document_name}}\r\n \r\n \r\n {{share.updated_at | date:\"dd/MM/yy\" }} \r\n \r\n {{share.user_role}}\r\n \r\n {{share.status}}\r\n\r\n \r\n\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
"
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/review-share-hloding/review-share-hloding.component.ts":
/*!***********************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/review-share-hloding/review-share-hloding.component.ts ***!
\***********************************************************************************************************/
/*! exports provided: ShareHloding, ReviewShareHlodingComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ShareHloding", function() { return ShareHloding; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReviewShareHlodingComponent", function() { return ReviewShareHlodingComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var angular_datatables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! angular-datatables */ "./node_modules/angular-datatables/index.js");
/* harmony import */ var ngx_spinner__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ngx-spinner */ "./node_modules/ngx-spinner/fesm5/ngx-spinner.js");
/* harmony import */ var src_app_services_common_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var ngx_bootstrap__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ngx-bootstrap */ "./node_modules/ngx-bootstrap/esm5/ngx-bootstrap.js");
/* harmony import */ var src_app_services_cognito_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var src_environments_environment__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! aws-sdk/clients/s3 */ "./node_modules/aws-sdk/clients/s3.js");
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2 */ "./node_modules/sweetalert2/dist/sweetalert2.all.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_10__);
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 dt = __webpack_require__(/*! datatables.net */ "./node_modules/datatables.net/js/jquery.dataTables.js");
var jsPDF = __webpack_require__(/*! jspdf */ "./node_modules/jspdf/dist/jspdf.min.js");
__webpack_require__(/*! jspdf-autotable */ "./node_modules/jspdf-autotable/dist/jspdf.plugin.autotable.js");
var ShareHloding = /** @class */ (function () {
function ShareHloding() {
this.action = 'saveShareHoldingdata';
this.share_Id = '';
this.user_information = {};
this.user_ID = '';
this.user_role = '';
this.document_name = '';
this.document_link = '';
this.file = '';
}
return ShareHloding;
}());
var ReviewShareHlodingComponent = /** @class */ (function () {
function ReviewShareHlodingComponent(spinner, common, cognito, router, modalService) {
var _this = this;
this.spinner = spinner;
this.common = common;
this.cognito = cognito;
this.router = router;
this.modalService = modalService;
this.User_share_holding = [];
this.dtOptions = {};
this.dtTrigger = new rxjs__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
this.currentUerId = this.cognito.getCurrentUser();
this.user_ID = '';
this.years = [];
this.All_users = [];
this.user = '';
this.year = '';
this.time_period = '';
this.model = new ShareHloding();
this.is_edit = false;
this.submitted = false;
this.current_user_role = localStorage.getItem('custom:user_role');
this.FileData = [];
this.arrayFilename = [];
for (var i = 2018; i <= new Date().getFullYear(); i++) {
this.years.push(i);
}
this.user_ID = this.currentUerId["username"];
this.dtOptions = {
pagingType: 'full_numbers',
// pageLength: 10,
pageLength: -1,
lengthMenu: [[-1, 10, 20, 25, 50, 100, 200], ['All', 10, 20, 25, 50, 100, 200]]
};
this.common.saveFundRiskData({ "action": "getting_share_holding" }).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
_this.User_share_holding = res.data;
sessionStorage.setItem('share-holding', JSON.stringify(res.data));
_this.All_users = Object.values(res.data.reduce(function (acc, cur) {
return Object.assign(acc, (_a = {}, _a[cur.user_name] = cur, _a));
var _a;
}, {}));
_this.dtTrigger.next();
}
else {
toastr.error("Server Internal Error", "Error!!!");
}
});
}
ReviewShareHlodingComponent.prototype.check_user = function () {
var _this = this;
this.User_share_holding = JSON.parse(sessionStorage.getItem('share-holding'));
if (this.user != '') {
this.User_share_holding = this.User_share_holding.filter(function (data) {
return data.user_name == _this.user;
});
}
if (this.year != '') {
this.User_share_holding = this.User_share_holding.filter(function (data) {
return data.year == _this.year;
});
}
if (this.time_period != '') {
this.User_share_holding = this.User_share_holding.filter(function (data) {
return data.time_period == _this.time_period;
});
}
};
ReviewShareHlodingComponent.prototype.ngOnInit = function () {
this.model.user_ID = this.currentUerId["username"];
};
ReviewShareHlodingComponent.prototype.update_review = function (share, status) {
var data = share;
data['review_user_id'] = this.user_ID;
data['review_user_role'] = localStorage.getItem('custom:user_role');
data['status'] = status;
data['share_Id'] = share.share_Id;
data['action'] = "update_ShareHoldingdata";
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
console.log(res);
// this.User_share_holding = res.data;
// sessionStorage.setItem('share-holding', JSON.stringify(res.data));
// this.All_users = Object.values(res.data.reduce((acc, cur) => Object.assign(acc, { [cur.user_name]: cur }), {}));
// this.dtTrigger.next();
}
else {
toastr.error("Server Internal Error", "Error!!!");
}
});
};
ReviewShareHlodingComponent.prototype.delete = function (share) {
var _this = this;
var data = share;
data['action'] = "delete_share_holding_by_id";
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
_this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
_this.ngOnInit();
});
}
else {
toastr.error("Server Internal Error", "Error!!!");
}
});
};
ReviewShareHlodingComponent.prototype.ngOnDestroy = function () {
// Do not forget to unsubscribe the event
this.dtTrigger.unsubscribe();
sessionStorage.removeItem('share-holding');
if (this.modalService.getModalsCount() > 0) {
this.modalRef.hide();
}
};
ReviewShareHlodingComponent.prototype.fileEvent = function (e) {
// console.log(e)
// this.spinner.show();
this.selectFIles = e.target.files[0];
this.model.file = e.target.files[0].name;
if (this.selectFIles != null) {
if (this.selectFIles["type"] == "application/pdf" ||
this.selectFIles["type"] == "application/vnd.ms-excel") {
if (this.arrayFilename != "" && this.arrayFilename != null) {
if (this.arrayFilename.length >= 0) {
var checkFIleName = this.arrayFilename.filter(function (person) {
return person.File == new Date().getTime() + '-' + e.target.files[0].name;
});
}
if (checkFIleName.length >= 0) {
if (confirm("Do you want overwrite exist File")) {
this.file = this.selectFIles;
this.FileName = new Date().getTime() + '-' + e.target.files[0].name;
// this.spinner.hide();
}
else {
(document.getElementById("documentFile")).value = "";
}
}
else {
this.file = this.selectFIles;
this.FileName = new Date().getTime() + '-' + e.target.files[0].name;
// this.spinner.hide();
}
}
else {
this.file = this.selectFIles;
this.FileName = new Date().getTime() + '-' + e.target.files[0].name;
// this.spinner.hide();
}
this.errorMessage = null;
}
else {
this.file = null;
sweetalert2__WEBPACK_IMPORTED_MODULE_10___default()({
title: 'File type not allowed.',
text: '',
type: 'warning'
});
this.errorMessage = "File type not allowed.";
// this.spinner.hide();
}
}
else {
this.file = null;
// this.spinner.hide();
}
};
ReviewShareHlodingComponent.prototype.onSubmit = function () {
var _this = this;
var exsitting_data = this.User_share_holding.filter(function (datas) {
return datas.year == _this.model.year && datas.time_period == _this.model.time_period && datas.user_id == _this.model.user_ID;
});
// console.log(exsitting_data)
var is_con = false;
if (this.is_edit == false) {
if (exsitting_data.length > 0) {
is_con = true;
}
}
if (!is_con) {
sweetalert2__WEBPACK_IMPORTED_MODULE_10___default()({
title: 'Would you like to submit Share Holding Statement?',
input: 'checkbox',
inputPlaceholder: "I understand and have complied with SAMI's personal share dealing policy and procedures"
}).then(function (result) {
if (result.value) {
_this.spinner.show();
sweetalert2__WEBPACK_IMPORTED_MODULE_10___default()("Success!", "Request successfully submitted", "success");
var bucket = new aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_9__({
accessKeyId: src_environments_environment__WEBPACK_IMPORTED_MODULE_8__["environment"].accessKeyId,
secretAccessKey: src_environments_environment__WEBPACK_IMPORTED_MODULE_8__["environment"].secretAccessKey,
region: 'us-east-2'
});
var params = {
Bucket: 'sanlamapp-website',
Key: 'assets/' + _this.FileName,
Body: _this.selectFIles
};
bucket.upload(params, function (err, data) {
if (err) {
// console.log(err);
_this.errorMessage = err;
}
_this.model.document_link = data["Location"];
_this.model.document_name = _this.FileName;
_this.submitted = true;
_this.model.user_role = localStorage.getItem('custom:user_role');
_this.model.user_ID = _this.currentUerId["username"];
_this.model.year = Number(_this.model.year);
_this.common.saveFundRiskData(_this.model).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
if (!_this.is_edit) {
_this.send_notification();
}
_this.is_edit = false;
_this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
// this.dtTrigger.next();
_this.spinner.hide();
_this.modalRef.hide();
_this.common.saveFundRiskData({ "action": "getting_share_holding" }).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
_this.User_share_holding = res.data;
sessionStorage.setItem('share-holding', JSON.stringify(res.data));
_this.All_users = Object.values(res.data.reduce(function (acc, cur) {
return Object.assign(acc, (_a = {}, _a[cur.user_name] = cur, _a));
var _a;
}, {}));
_this.dtTrigger.next();
}
else {
toastr.error("Server Internal Error", "Error!!!");
}
});
});
toastr.success('Statement successfully submitted', "success!!!");
}
else if (res.status == '201') {
_this.spinner.hide();
toastr.error(res.message.message, "Error!!!");
localStorage.clear();
sessionStorage.clear();
_this.router.navigate(['/']);
}
});
});
}
else if (result.value === 0) {
// this.spinner.hide();
sweetalert2__WEBPACK_IMPORTED_MODULE_10___default()({ type: 'error', text: "Please select the dealing policy & procedures" });
}
else {
// this.spinner.hide();
console.log("modal was dismissed by " + result.dismiss);
}
});
}
else {
sweetalert2__WEBPACK_IMPORTED_MODULE_10___default()({
title: 'You have completed submissions for same time period.',
text: '',
type: 'warning'
});
// this.spinner.hide();
// toastr.warning("already submitted", "Error!!!");
}
};
ReviewShareHlodingComponent.prototype.Add_request = function (template) {
this.model = new ShareHloding();
this.model.action = 'saveShareHoldingdata';
this.modalRef = this.modalService.show(template);
};
ReviewShareHlodingComponent.prototype.edit = function (template, share) {
this.is_edit = true;
this.model = share;
this.model.action = 'update_ShareHoldingdata';
this.modalRef = this.modalService.show(template);
};
// SendMessagess(value: any): void {
// let data = value;
// data["to_from_id"] = value["to_id"] + "|" + this.currentUerId["username"];
// data["action"] = "allactionquerypoint";
// this.common.saveFundRiskData(data).subscribe(response => {
// let resData = JSON.parse(response._body);
// let res = JSON.parse(resData.body);
// if (res.status == "200") {
// var div = document.getElementById("messages");
// div.scrollTop = div.scrollHeight + 101;
// this.Comment_Record.controls["query"].setValue("");
// this.CommentDatad = res.data;
// } else {
// //toastr.error(res.message);
// }
// });
// }
ReviewShareHlodingComponent.prototype.send_notification = function () {
var MailEmail = ['clare.cashin@gmail.com'];
// MailEmail.push('ravi.joshi@iglobsyn.com');
var data = {
action: "commonMailservice",
to: MailEmail,
subject: " Regstone PA Share & Grats Submissions",
message: "
\n
\n Dear ManCO Head of Compliance,
There are Personal Share Dealing submissions and/or Gratfications that require your attention.\n Please logon to review at Sanlam Regstone .
\n If you have any queries please contact regstone@sanlam.ie.\n
Regards
The Sanlam Regstone Team
"
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
}
else {
}
});
};
ReviewShareHlodingComponent.prototype.sendMessage = function (role) {
var MailEmail = [];
MailEmail.push(role.email);
var data = {
action: "commonMailservice",
to: MailEmail,
subject: " Regstone PA Share & Grats Submissions",
message: "
Hi,
Your Personal Share submission has been reviewed.\n .Please log onto Sanlam Regstone to view.
Regards
The Sanlam Regstone Team
"
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
}
else {
}
});
};
ReviewShareHlodingComponent.prototype.ExportAllData = function () {
var doc = new jsPDF('l', 'mm', 'a4');
var finalY = doc.previousAutoTable.finalY;
doc.text("Share-Holding Statement", 60, 10);
doc.autoTable({ html: '#RequestidTable' });
doc.save("share-holding.pdf");
};
ReviewShareHlodingComponent.prototype.ExportIndivisual = function (e) {
var columns = [e.firstname + " " + e.lastname, "RecordsGratification Information Records"];
var rows = this.User_share_holding;
var doc = new jsPDF();
doc.autoTable({
theme: 'grid',
columnStyles: { 0: { halign: 'left', fontSize: 14 }, 1: { halign: 'left', fontSize: 14 } },
margin: { top: 10 },
StyleDef: { cellWidth: 'wrap' },
head: [columns],
body: [
["Name", e.firstname.toUpperCase() + " " + e.lastname.toUpperCase()],
["Email", e.email.toUpperCase()],
["Role", e.userRole.toUpperCase()],
["Gratification", e.gratification.toUpperCase()],
["Date", e.gratification_date],
["Approx Value", e.approx_gratification_value],
["Name of Donor", e.donor_recipient_name.toUpperCase()],
["Relationship to recipient", e.donor_recipient_relation.toUpperCase()],
["Status", e.manco_ceo.toUpperCase()]
]
});
doc.save("table.pdf");
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(angular_datatables__WEBPACK_IMPORTED_MODULE_2__["DataTableDirective"]),
__metadata("design:type", angular_datatables__WEBPACK_IMPORTED_MODULE_2__["DataTableDirective"])
], ReviewShareHlodingComponent.prototype, "dtElement", void 0);
ReviewShareHlodingComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'review-share-hloding',
template: __webpack_require__(/*! ./review-share-hloding.component.html */ "./src/app/components/PAShareDealingDashboard/review-share-hloding/review-share-hloding.component.html"),
styles: [__webpack_require__(/*! ./review-share-hloding.component.css */ "./src/app/components/PAShareDealingDashboard/review-share-hloding/review-share-hloding.component.css")]
}),
__metadata("design:paramtypes", [ngx_spinner__WEBPACK_IMPORTED_MODULE_3__["NgxSpinnerService"],
src_app_services_common_service__WEBPACK_IMPORTED_MODULE_4__["CommonService"],
src_app_services_cognito_service__WEBPACK_IMPORTED_MODULE_7__["CognitoUtil"],
_angular_router__WEBPACK_IMPORTED_MODULE_5__["Router"],
ngx_bootstrap__WEBPACK_IMPORTED_MODULE_6__["BsModalService"]])
], ReviewShareHlodingComponent);
return ReviewShareHlodingComponent;
}());
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/share-holding/share-holding.component.css":
/*!**********************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/share-holding/share-holding.component.css ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/share-holding/share-holding.component.html":
/*!***********************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/share-holding/share-holding.component.html ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n Loading...
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n Share Dealing Statement \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
"
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/share-holding/share-holding.component.ts":
/*!*********************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/share-holding/share-holding.component.ts ***!
\*********************************************************************************************/
/*! exports provided: ShareHloding, ShareHoldingComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ShareHloding", function() { return ShareHloding; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ShareHoldingComponent", function() { return ShareHoldingComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var angular_datatables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! angular-datatables */ "./node_modules/angular-datatables/index.js");
/* harmony import */ var ngx_spinner__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ngx-spinner */ "./node_modules/ngx-spinner/fesm5/ngx-spinner.js");
/* harmony import */ var src_app_services_common_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var ngx_bootstrap__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ngx-bootstrap */ "./node_modules/ngx-bootstrap/esm5/ngx-bootstrap.js");
/* harmony import */ var src_app_services_cognito_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! sweetalert2 */ "./node_modules/sweetalert2/dist/sweetalert2.all.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! aws-sdk/clients/s3 */ "./node_modules/aws-sdk/clients/s3.js");
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var src_environments_environment__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var dt = __webpack_require__(/*! datatables.net */ "./node_modules/datatables.net/js/jquery.dataTables.js");
var ShareHloding = /** @class */ (function () {
function ShareHloding() {
this.action = 'saveShareHoldingdata';
this.id = '';
this.user_information = {};
this.user_ID = '';
this.user_role = '';
this.document_name = '';
this.document_link = '';
this.file = '';
}
return ShareHloding;
}());
var ShareHoldingComponent = /** @class */ (function () {
function ShareHoldingComponent(spinner, common, cognito, router, modalService) {
this.spinner = spinner;
this.common = common;
this.cognito = cognito;
this.router = router;
this.modalService = modalService;
this.submitted = false;
this.model = new ShareHloding();
this.is_edit = false;
this.User_share_holding = [];
this.dtOptions = {};
this.dtTrigger = new rxjs__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
this.currentUerId = this.cognito.getCurrentUser();
this.years = [];
this.is_show = false;
this.FileData = [];
this.arrayFilename = [];
this.model.user_ID = this.currentUerId["username"];
for (var i = 2018; i <= new Date().getFullYear(); i++) {
this.years.push(i);
}
}
ShareHoldingComponent.prototype.ngOnInit = function () {
var _this = this;
this.send_notification();
this.dtOptions = {
pagingType: 'full_numbers',
// pageLength: 10,
pageLength: -1,
lengthMenu: [[-1, 10, 20, 25, 50, 100, 200], ['All', 10, 20, 25, 50, 100, 200]]
};
this.common.saveFundRiskData({
"action": "getting_share_holding_by_id", "user_id": this.model.user_ID,
"user_role": localStorage.getItem('custom:user_role')
}).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
// console.log(res)
if (res.status == "200") {
_this.User_share_holding = res.data;
// console.log(res.data)
_this.dtTrigger.next();
}
else if (res.status == '201') {
toastr.error(res.message.message, "Error!!!");
localStorage.clear();
sessionStorage.clear();
_this.router.navigate(['/']);
}
});
};
ShareHoldingComponent.prototype.onSubmit = function () {
var _this = this;
this.submitted = true;
this.model.year = Number(this.model.year);
var exsitting_data = this.User_share_holding.filter(function (datas) {
return datas.year == _this.model.year && datas.time_period == _this.model.time_period;
});
// console.log(exsitting_data)
var is_con = false;
if (this.is_edit == false) {
if (exsitting_data.length > 0) {
is_con = true;
}
}
// alert(is_con)
if (!is_con) {
sweetalert2__WEBPACK_IMPORTED_MODULE_8___default()({
title: 'Would you like to submit Share Holding Statement?',
input: 'checkbox',
inputPlaceholder: "I understand and have complied with SAMI's personal share dealing policy and procedures"
}).then(function (result) {
if (result.value) {
_this.spinner.show();
// Swal("Success!", "Request successfully submitted", "success");
var bucket = new aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_9__({
accessKeyId: src_environments_environment__WEBPACK_IMPORTED_MODULE_10__["environment"].accessKeyId,
secretAccessKey: src_environments_environment__WEBPACK_IMPORTED_MODULE_10__["environment"].secretAccessKey,
region: 'us-east-2'
});
var params = {
Bucket: 'sanlamapp-website',
Key: 'assets/' + _this.FileName,
Body: _this.selectFIles
};
bucket.upload(params, function (err, data) {
if (err) {
// console.log(err);
_this.errorMessage = err;
}
_this.model.document_link = data["Location"];
_this.model.document_name = _this.FileName;
_this.submitted = true;
_this.model.year = Number(_this.model.year);
_this.model.user_ID = _this.currentUerId["username"];
_this.model.user_role = localStorage.getItem('custom:user_role');
_this.common.saveFundRiskData(_this.model).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
if (!_this.is_edit) {
_this.send_notification();
}
_this.is_edit = false;
_this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.modalRef.hide();
_this.common.saveFundRiskData({
"action": "getting_share_holding_by_id", "user_id": _this.model.user_ID,
"user_role": localStorage.getItem('custom:user_role')
}).subscribe(function (response) {
_this.spinner.hide();
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
_this.User_share_holding = res.data;
_this.dtTrigger.next();
}
else {
toastr.error("Server Internal Error", "Error!!!");
}
}, function (err) {
_this.spinner.hide();
});
});
toastr.success('Status successfully submitted', "success!!!");
}
else if (res.status == '201') {
toastr.error(res.message.message, "Error!!!");
localStorage.clear();
sessionStorage.clear();
_this.spinner.hide();
_this.router.navigate(['/']);
}
});
});
}
else if (result.value === 0) {
sweetalert2__WEBPACK_IMPORTED_MODULE_8___default()({ type: 'error', text: "Please select the dealing policy & procedures" });
}
else {
console.log("modal was dismissed by " + result.dismiss);
}
});
}
else {
sweetalert2__WEBPACK_IMPORTED_MODULE_8___default()({
title: 'A submission is already completed for this time period',
text: '',
type: 'warning'
});
}
};
ShareHoldingComponent.prototype.ngOnDestroy = function () {
// Do not forget to unsubscribe the event
this.dtTrigger.unsubscribe();
// console.log(this.modalService.getModalsCount())
if (this.modalService.getModalsCount() > 0) {
this.modalRef.hide();
}
};
ShareHoldingComponent.prototype.Add_request = function (template) {
this.model = new ShareHloding();
this.model.action = 'saveShareHoldingdata';
this.modalRef = this.modalService.show(template);
this.is_show = true;
};
ShareHoldingComponent.prototype.edit = function (template, share) {
this.is_edit = true;
this.model = share;
this.model.action = 'update_ShareHoldingdata';
this.modalRef = this.modalService.show(template);
};
ShareHoldingComponent.prototype.fileEvent = function (e) {
this.selectFIles = e.target.files[0];
this.model.file = e.target.files[0].name;
if (this.selectFIles != null) {
if (this.selectFIles["type"] == "application/pdf" ||
this.selectFIles["type"] == "application/vnd.ms-excel") {
if (this.arrayFilename != "" && this.arrayFilename != null) {
if (this.arrayFilename.length >= 0) {
var checkFIleName = this.arrayFilename.filter(function (person) {
return person.File == e.target.files[0].name;
});
}
if (checkFIleName.length >= 0) {
if (confirm("Do you want overwrite exist File")) {
this.file = this.selectFIles;
this.FileName = new Date().getTime() + '-' + e.target.files[0].name;
}
else {
(document.getElementById("documentFile")).value = "";
}
}
else {
this.file = this.selectFIles;
this.FileName = new Date().getTime() + '-' + e.target.files[0].name;
}
}
else {
this.file = this.selectFIles;
this.FileName = new Date().getTime() + '-' + e.target.files[0].name;
}
this.errorMessage = null;
}
else {
this.file = null;
this.errorMessage = "File type not allowed.";
}
}
else {
this.file = null;
}
};
ShareHoldingComponent.prototype.send_notification = function () {
var MailEmail = ['ravi.joshi@iglobsyn.com', 'parth.iglobsyn@gmail.com', 'clare.cashin@gmail.com'];
// MailEmail.push('ravi.joshi@iglobsyn.com');
// try {
// this.common.saveFundRiskData({ action: "getalluser" }).map((res: Response) => res.json())
// .subscribe((res: any) => {
// let resData = JSON.parse(res._body);
// let user_res = JSON.parse(resData.body);
// if(user_res.status == "200"){
// }
// console.log(res)
// })
// } catch (error) {
// }
var data = {
action: "commonMailservice",
to: MailEmail,
subject: "Share Dealing Statement",
message: "\n \n\n\n\n
\n
\n
\n
\n
Sanlam-App \n
\n\n\n\n
\n
\n \n \n \n \n \n \n \n \n
\n \n \n \n \n
Dear ManCO Head of Compliance,
\n
\n There are Personal Share Dealing submissions and/or Gratfications that require your attention. Please logon to review at\n
Sanlam Regstone .\n
\n\n
\n
\n Regards\n
\n
\n The Sanlam Regstone Team\n
\n
\n \n \n
\n \n \n
\n
\n\n\n\n ",
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
}
else {
}
});
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(angular_datatables__WEBPACK_IMPORTED_MODULE_2__["DataTableDirective"]),
__metadata("design:type", angular_datatables__WEBPACK_IMPORTED_MODULE_2__["DataTableDirective"])
], ShareHoldingComponent.prototype, "dtElement", void 0);
ShareHoldingComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'share-holding',
template: __webpack_require__(/*! ./share-holding.component.html */ "./src/app/components/PAShareDealingDashboard/share-holding/share-holding.component.html"),
styles: [__webpack_require__(/*! ./share-holding.component.css */ "./src/app/components/PAShareDealingDashboard/share-holding/share-holding.component.css")]
}),
__metadata("design:paramtypes", [ngx_spinner__WEBPACK_IMPORTED_MODULE_3__["NgxSpinnerService"],
src_app_services_common_service__WEBPACK_IMPORTED_MODULE_4__["CommonService"],
src_app_services_cognito_service__WEBPACK_IMPORTED_MODULE_7__["CognitoUtil"],
_angular_router__WEBPACK_IMPORTED_MODULE_5__["Router"],
ngx_bootstrap__WEBPACK_IMPORTED_MODULE_6__["BsModalService"]])
], ShareHoldingComponent);
return ShareHoldingComponent;
}());
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/tab-menu/tab-menu.component.css":
/*!************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/tab-menu/tab-menu.component.css ***!
\************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".last-login {\r\n float: right !important;\r\n color: #000;\r\n font-weight: bold;\r\n padding: 15px 0px;\r\n}\r\n.table-hover {\r\n border: 1px solid;\r\n background-color: #fff;\r\n display: table;\r\n margin: 0 auto;\r\n padding: 10px;\r\n border-color: #008AD1;\r\n}\r\n.display .display_inner {\r\n border: 1px solid;\r\n border-color: #008AD1;\r\n text-align: center;\r\n padding: 10px 10px;\r\n background-color: #008AD1;\r\n cursor: pointer;\r\n color: #fff;\r\n font-size: 18px;\r\n}\r\n.t_head .display_head {\r\n border: 1px solid;\r\n border-color: #008AD1;\r\n text-align: center;\r\n padding: 10px 10px;\r\n background-color: #fff;\r\n color: #008AD1;\r\n font-weight: 600;\r\n font-size: 20px;\r\n}\r\n.display .display_inner:hover {\r\n background-color: #fff;\r\n color:#008AD1;\r\n box-shadow: 1px 1px 11px 0px #008AD1;\r\n border-color: #008AD1;\r\n}\r\n.display{ padding: 10px; }\r\n*, :after, :before {\r\n box-sizing: unset !important;\r\n}\r\na.routerLink {\r\n color: #fff;\r\n text-decoration: none; \r\n}\r\n.display_inner:hover a {\r\n color: #008AD1;\r\n}\r\n.disable{\r\n pointer-events: none; \r\n cursor: default; \r\n display: none;\r\n}\r\n.display_inner.active {\r\n border: 1px solid !important;\r\n border-color: #008AD1 !important;\r\n background-color: #fff !important;\r\n color: #008AD1 !important;\r\n box-shadow: 1px 1px 11px 0px #008AD1;\r\n pointer-events: none !important;\r\n}\r\n@media only screen and (max-width: 1199px){\r\n}\r\n@media (min-width: 979px) and (max-width: 1199px) {\r\n}\r\n@media only screen and (max-width: 979px){\r\n}\r\n@media (min-width: 768px) and (max-width: 979px) {}\r\n@media only screen and (max-width: 767px){\r\ndiv.table.table-hover {width: 45%;}\r\n}\r\n@media only screen and (max-width: 640px){\r\ndiv.table.table-hover {width: 50%;}\r\n}\r\n@media only screen and (max-width: 480px){ \r\ndiv.table.table-hover {width: 60%;}\r\n}\r\n@media only screen and (max-width: 360px){\r\ndiv.table.table-hover {width: 70%;}\r\n}\r\n@media only screen and (max-width: 320px){\r\ndiv.table.table-hover {width: 80%;}\r\n}\r\n@media only screen and (max-width: 650px){}\r\n"
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/tab-menu/tab-menu.component.html":
/*!*************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/tab-menu/tab-menu.component.html ***!
\*************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Select Permission
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
"
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/tab-menu/tab-menu.component.ts":
/*!***********************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/tab-menu/tab-menu.component.ts ***!
\***********************************************************************************/
/*! exports provided: TabMenuComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TabMenuComponent", function() { return TabMenuComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/http */ "./node_modules/@angular/http/fesm5/http.js");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var ngx_spinner__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ngx-spinner */ "./node_modules/ngx-spinner/fesm5/ngx-spinner.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 dt = __webpack_require__(/*! datatables.net */ "./node_modules/datatables.net/js/jquery.dataTables.js");
var TabMenuComponent = /** @class */ (function () {
function TabMenuComponent(router, fundform, cognitoUtil, common, spinner, http, rootNode) {
this.router = router;
this.fundform = fundform;
this.cognitoUtil = cognitoUtil;
this.common = common;
this.spinner = spinner;
this.http = http;
this.title = "Share Permission";
this.userRole = localStorage.getItem("custom:user_role");
this.myUrl = this.userRole.replace(/\s/g, '-');
this.PersonalShare_Dealing_link = '/Nothing_to_submit/' + this.myUrl + '/Personal_Share_Dealing';
this.Gratifications_Offered_link = '/Nothing_to_submit/' + this.myUrl + '/Gratifications_Offered';
this.Gratifications_Received_link = '/Nothing_to_submit/' + this.myUrl + '/Gratifications_Received';
this.share_holding = "/Gratification_Reporting/share-holding";
this.nothing_share_hloing = "/Nothing_to_submit/share-holding-request";
this.currentUerId = this.cognitoUtil.getCurrentUser();
this.months = [
{ id: 1, name: "January" },
{ id: 2, name: "February" },
{ id: 3, name: "March" },
{ id: 4, name: "April" },
{ id: 5, name: "May" },
{ id: 6, name: "June" },
{ id: 7, name: "July" },
{ id: 8, name: "August" },
{ id: 9, name: "September" },
{ id: 10, name: "October" },
{ id: 11, name: "November" },
{ id: 12, name: "December" }
];
}
TabMenuComponent.prototype.ngOnInit = function () {
if (this.userRole == "manco user") {
// this.CheckRequest();
// this.RetrospectiveRequest();
this.createUrl = "/Gratification_Reporting/user/Dealing";
this.RetrospectiveRequestUrl =
"/Gratification_Reporting/user/DealingRetrospective";
this.share_holding = "/Gratification_Reporting/share-holding";
this.nothing_share_hloing = "/Nothing_to_submit/share-holding-request";
}
else {
this.createUrl = "/Gratification_Reporting/Dealing";
this.RetrospectiveRequestUrl =
"/Gratification_Reporting/DealingRetrospective";
this.share_holding = "/Gratification_Reporting/all-share-holding-request";
this.nothing_share_hloing = "/Nothing_to_submit/All-share-holding-request";
}
// if (this.userRole == "Manco Head" || this.userRole =="director") {
// this.nothing_share_hloing = "/Nothing_to_submit/share-holding-request";
// }
if (localStorage.getItem("token") == null ||
localStorage.getItem("token") == "") {
this.router.navigateByUrl("/login");
}
};
TabMenuComponent.prototype.CheckRequest = function () {
var _this = this;
var data = {
action: "list_psdrequestaction_byID",
manco_userid: this.currentUerId["username"]
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
if (res.data != null && res.data != "") {
_this.createUrl = "/Gratification_Reporting/user/Dealing";
}
else {
_this.createUrl = "/Gratification_Reporting/Dealing";
}
}
else {
_this.createUrl = "/Gratification_Reporting/Dealing";
}
//console.log(res.data);
}, function (error) {
_this.CheckRequest();
console.log("Server Error");
});
};
TabMenuComponent.prototype.RetrospectiveRequest = function () {
var _this = this;
var data = {
action: "list_psdrequestaction_byID",
manco_userid: this.currentUerId["username"]
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
if (res.data != null && res.data != "") {
_this.RetrospectiveRequestUrl =
"/Gratification_Reporting/user/DealingRetrospective";
}
else {
_this.RetrospectiveRequestUrl =
"/Gratification_Reporting/DealingRetrospective";
}
}
else {
_this.RetrospectiveRequestUrl =
"/Gratification_Reporting/DealingRetrospective";
}
});
};
TabMenuComponent.prototype.NothingSubmit = function (month, title) {
var _this = this;
var data = {
year: new Date().getFullYear(),
month: Number(month),
section: title,
LastUrl: "nothingTosubmit",
userId: this.currentUerId["username"]
};
this.common.PasharingMOdule(data).subscribe(function (res) {
if (res.status == "200") {
_this.getData(title);
toastr.success("Successfully submitted data", "Success!!!!");
}
else {
toastr.error("Data is not submitted", "Error!!!!");
}
}, function (error) {
console.log(error);
});
};
TabMenuComponent.prototype.getData = function (userTile) {
var _this = this;
var data = {
LastUrl: "nothingTosubmit/" + this.currentUerId["username"]
};
this.common.GetData(data).subscribe(function (res) {
if (res.status == "200") {
if (res.data != null && res.data != '') {
if (userTile == "Personal Share Dealing") {
_this.PersonalShare_Dealing = res.data.filter(function (FileData) {
return FileData.section == userTile;
});
var _loop_1 = function (i) {
b = _this.months.findIndex(function (item) { return item.id == _this.PersonalShare_Dealing[i].month; });
_this.months[b]['disable'] = 'disable';
};
var b;
for (var i = 0; i < _this.PersonalShare_Dealing.length; i++) {
_loop_1(i);
}
}
else if (userTile == "Gratifications Offered") {
_this.Gratifications_Offered = res.data.filter(function (FileData) {
return FileData.section == userTile;
});
var _loop_2 = function (i) {
b = _this.months.findIndex(function (item) { return item.id == _this.Gratifications_Offered[i].month; });
_this.months[b]['disable'] = 'disable';
};
var b;
for (var i = 0; i < _this.Gratifications_Offered.length; i++) {
_loop_2(i);
}
}
else if (userTile == "Gratifications Received") {
_this.Gratifications_Received = res.data.filter(function (FileData) {
return FileData.section == userTile;
});
var _loop_3 = function (i) {
b = _this.months.findIndex(function (item) { return item.id == _this.Gratifications_Received[i].month; });
_this.months[b]['disable'] = 'disable';
};
var b;
for (var i = 0; i < _this.Gratifications_Received.length; i++) {
_loop_3(i);
}
}
}
}
else {
toastr.error("Data is not submitted", "Error!!!!");
}
});
};
TabMenuComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: "app-tab-menu",
template: __webpack_require__(/*! ./tab-menu.component.html */ "./src/app/components/PAShareDealingDashboard/tab-menu/tab-menu.component.html"),
styles: [__webpack_require__(/*! ./tab-menu.component.css */ "./src/app/components/PAShareDealingDashboard/tab-menu/tab-menu.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_5__["CognitoUtil"],
_services_common_service__WEBPACK_IMPORTED_MODULE_4__["CommonService"],
ngx_spinner__WEBPACK_IMPORTED_MODULE_6__["NgxSpinnerService"],
_angular_http__WEBPACK_IMPORTED_MODULE_3__["Http"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]])
], TabMenuComponent);
return TabMenuComponent;
}());
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/user/report-dealing-retrospective/report-dealing-retrospective.component.css":
/*!*********************************************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/user/report-dealing-retrospective/report-dealing-retrospective.component.css ***!
\*********************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/user/report-dealing-retrospective/report-dealing-retrospective.component.html":
/*!**********************************************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/user/report-dealing-retrospective/report-dealing-retrospective.component.html ***!
\**********************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n Loading...
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n Personal Share Dealing Retrospective Information Records \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n Name of investment \r\n {{UserData.Investment_name | titlecase}} \r\n \r\n \r\n Executed trade ISIN \r\n {{UserData.executed_trade_isin | titlecase}} \r\n \r\n \r\n Number of Share \r\n {{UserData.number_of_shares}} \r\n \r\n \r\n Amount \r\n {{UserData.amount}} \r\n \r\n \r\n Currency \r\n {{UserData.Unit_Amount}} \r\n \r\n \r\n Executed Date \r\n {{ UserData.executed_trade_date }} \r\n \r\n \r\n Status \r\n {{ UserData.permission | titlecase }}\r\n \r\n \r\n Request Date \r\n {{UserData.created_at | date:'fullDate'}} \r\n \r\n \r\n Document \r\n \r\n \r\n \r\n {{UserData.document_name | titlecase}}\r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
"
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/user/report-dealing-retrospective/report-dealing-retrospective.component.ts":
/*!********************************************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/user/report-dealing-retrospective/report-dealing-retrospective.component.ts ***!
\********************************************************************************************************************************/
/*! exports provided: ReportDealingRetrospectiveComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReportDealingRetrospectiveComponent", function() { return ReportDealingRetrospectiveComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/http */ "./node_modules/@angular/http/fesm5/http.js");
/* harmony import */ var ngx_bootstrap_modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ngx-bootstrap/modal */ "./node_modules/ngx-bootstrap/modal/fesm5/ngx-bootstrap-modal.js");
/* harmony import */ var angular_datatables__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! angular-datatables */ "./node_modules/angular-datatables/index.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var dt = __webpack_require__(/*! datatables.net */ "./node_modules/datatables.net/js/jquery.dataTables.js");
var ReportDealingRetrospectiveComponent = /** @class */ (function () {
function ReportDealingRetrospectiveComponent(router, common, cognito, http, rootNode, modalService) {
this.router = router;
this.common = common;
this.cognito = cognito;
this.http = http;
this.modalService = modalService;
this.title = 'Gratification Retrospective';
this.tilesName = 'Personal Share Dealing Retrospective Notification Form';
this.dtOptions = {};
this.dtTrigger = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
this.createUrl = [];
// Personal Share Dealing Retrospective Notification Form Record('s) listing for manco Head of complaint's
this.RequestDetail = [];
this.userDetails = [];
this.arrayFilename = [];
this.currentUerId = this.cognito.getCurrentUser();
this.userRole = localStorage.getItem('custom:user_role');
this.AddRecodFrom = '/Gratification_Reporting/' + this.userRole + '/DealingRetrospective';
;
this.rootNode = rootNode;
}
ReportDealingRetrospectiveComponent.prototype.ngOnInit = function () {
this.dtOptions = {
pagingType: 'full_numbers',
// pageLength: 10,
pageLength: -1,
lengthMenu: [[-1, 10, 20, 25, 50, 100, 200], ['All', 10, 20, 25, 50, 100, 200]]
};
if (sessionStorage.getItem('token') == null || sessionStorage.getItem('token') == '') {
this.router.navigateByUrl('/login');
}
else {
if (this.userRole == 'manco user') {
this.CheckRequest();
}
}
};
ReportDealingRetrospectiveComponent.prototype.ngOnDestroy = function () {
// Do not forget to unsubscribe the event
this.dtTrigger.unsubscribe();
};
ReportDealingRetrospectiveComponent.prototype.extractData = function (res) {
var body = res.json();
return body.data || {};
};
ReportDealingRetrospectiveComponent.prototype.CheckRequest = function () {
var _this = this;
var data = {
'action': 'list_retrospective_byID',
'manco_userid': this.currentUerId['username'],
"userRole": this.userRole
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
// console.log(res)
if (res.data != null && res.data != '') {
for (var i = 0; i < res.data.length; i++) {
res.data[i];
}
// setTimeout(() => {
// this.filterValue(res.data);
// }, 2000);
// this.GetFileData();
_this.createUrl = res.data;
_this.dtTrigger.next();
}
else {
_this.dtTrigger.next();
}
}
//console.log(res);
}, function (error) { _this.CheckRequest(); console.log(error); });
};
ReportDealingRetrospectiveComponent.prototype.GetFileData = function () {
var _this = this;
var data = {
'action': "getdocumentbyUser",
'userid': this.currentUerId['username'],
'month': new Date().getMonth() + 1,
'year': new Date().getFullYear(),
'tilesName': this.tilesName,
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.data.length > 0) {
_this.FileData = res.data;
for (var i = 0; i < res.data.length; i++) {
var tmp = res.data[i]['documnentName'];
var arrFilename = tmp.split("/");
var FileNames = decodeURIComponent(arrFilename[arrFilename.length - 1]);
_this.arrayFilename.push({
'sanlamuserIdDetails': res.data[i].userid,
'dataid': res.data[i].dataid,
'File': decodeURIComponent(arrFilename[arrFilename.length - 1]),
'Link': res.data[i]['documnentName'],
'documentId': res.data[i]['documentId']
});
}
}
}, function (error) { _this.GetFileData(); console.log("Server Error"); });
};
ReportDealingRetrospectiveComponent.prototype.filterValue = function (value) {
var Details;
var FileData;
var FilesData;
var Information = [];
var _loop_1 = function (i) {
if (this_1.arrayFilename != null && this_1.arrayFilename != '') {
FilesData = this_1.arrayFilename.filter(function (FileData) {
return FileData.dataid == value[i].retroID;
});
}
if (FilesData != null && FilesData != '') {
FileData = FilesData;
}
else {
FileData = [{
'dataid': '',
'documentId': '',
'Link': '',
'File': '',
'sanlamuserIdDetails': '',
}];
}
// console.log(value[i].additional_comments);
Information.push({
'Investment_name': value[i].Investment_name,
'Unit_Amount': value[i].Unit_Amount,
'amount': value[i].amount,
'created_at': value[i].created_at,
'director_permission': value[i].director_permission,
'executed_trade_date': value[i].executed_trade_date,
'executed_trade_isin': value[i].executed_trade_isin,
'manco_userid': value[i].manco_userid,
'number_of_shares': value[i].number_of_shares,
'permission': value[i].permission,
'psdrequestId': value[i].psdrequestId,
'requestType': value[i].requestType,
'retroID': value[i].retroID,
'updated_at': value[i].updated_at,
'userRole': value[i].userRole,
'Additional_detail': value[i].Additional_detail,
'additional_comments': value[i].additional_comments,
'dataid': FileData[0].dataid,
'documentId': FileData[0].documentId,
'Link': FileData[0].Link,
'File': FileData[0].File,
'sanlamuserIdDetails': FileData[0].sanlamuserIdDetails,
});
};
var this_1 = this;
for (var i = 0; i < value.length; i++) {
_loop_1(i);
}
this.createUrl = Information;
this.dtTrigger.next();
};
ReportDealingRetrospectiveComponent.prototype.Popup = function (value, template) {
console.log(value);
this.modalRef = this.modalService.show(template);
this.UserData = value;
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(angular_datatables__WEBPACK_IMPORTED_MODULE_4__["DataTableDirective"]),
__metadata("design:type", angular_datatables__WEBPACK_IMPORTED_MODULE_4__["DataTableDirective"])
], ReportDealingRetrospectiveComponent.prototype, "dtElement", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('fundListDocument'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"])
], ReportDealingRetrospectiveComponent.prototype, "fundListDocument", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('closeBtn'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"])
], ReportDealingRetrospectiveComponent.prototype, "closeBtn", void 0);
ReportDealingRetrospectiveComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-report-dealing-retrospective',
template: __webpack_require__(/*! ./report-dealing-retrospective.component.html */ "./src/app/components/PAShareDealingDashboard/user/report-dealing-retrospective/report-dealing-retrospective.component.html"),
styles: [__webpack_require__(/*! ./report-dealing-retrospective.component.css */ "./src/app/components/PAShareDealingDashboard/user/report-dealing-retrospective/report-dealing-retrospective.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_services_common_service__WEBPACK_IMPORTED_MODULE_6__["CommonService"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_7__["CognitoUtil"],
_angular_http__WEBPACK_IMPORTED_MODULE_2__["Http"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"],
ngx_bootstrap_modal__WEBPACK_IMPORTED_MODULE_3__["BsModalService"]])
], ReportDealingRetrospectiveComponent);
return ReportDealingRetrospectiveComponent;
}());
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/user/report-dealing/report-dealing.component.css":
/*!*****************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/user/report-dealing/report-dealing.component.css ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/user/report-dealing/report-dealing.component.html":
/*!******************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/user/report-dealing/report-dealing.component.html ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n
\r\n Loading...
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n Loading...
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n Personal Share Dealing Information Records \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n Name of investment \r\n {{UserData.Investment_name | titlecase}} \r\n \r\n \r\n Intended trade ISIN \r\n {{UserData.intended_trade_isin | titlecase}} \r\n \r\n \r\n Value \r\n {{UserData.number_of_shares}} \r\n \r\n \r\n Amount \r\n {{UserData.amount}} \r\n \r\n \r\n Currency \r\n {{UserData.Unit_Amount}} \r\n \r\n \r\n Intended trade date \r\n {{ UserData.intended_trade_date }} \r\n \r\n \r\n Status \r\n {{ UserData.permission | titlecase }}\r\n \r\n \r\n Request Date \r\n {{UserData.created_at |date:'fullDate'}} \r\n \r\n \r\n Contract Note \r\n \r\n \r\n {{UserData.File | titlecase}}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
"
/***/ }),
/***/ "./src/app/components/PAShareDealingDashboard/user/report-dealing/report-dealing.component.ts":
/*!****************************************************************************************************!*\
!*** ./src/app/components/PAShareDealingDashboard/user/report-dealing/report-dealing.component.ts ***!
\****************************************************************************************************/
/*! exports provided: ReportDealingComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReportDealingComponent", function() { return ReportDealingComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/http */ "./node_modules/@angular/http/fesm5/http.js");
/* harmony import */ var ngx_bootstrap_modal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ngx-bootstrap/modal */ "./node_modules/ngx-bootstrap/modal/fesm5/ngx-bootstrap-modal.js");
/* harmony import */ var angular_datatables__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! angular-datatables */ "./node_modules/angular-datatables/index.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var ngx_spinner__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ngx-spinner */ "./node_modules/ngx-spinner/fesm5/ngx-spinner.js");
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! aws-sdk/clients/s3 */ "./node_modules/aws-sdk/clients/s3.js");
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_10__);
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 dt = __webpack_require__(/*! datatables.net */ "./node_modules/datatables.net/js/jquery.dataTables.js");
var ReportDealingComponent = /** @class */ (function () {
function ReportDealingComponent(router,
//private auth: AuthService,
common, cognitoUtil, http, spinner, rootNode, modalService) {
this.router = router;
this.common = common;
this.cognitoUtil = cognitoUtil;
this.http = http;
this.spinner = spinner;
this.modalService = modalService;
this.userRole = localStorage.getItem('custom:user_role');
this.email = localStorage.getItem('custom:first_name');
this.UrlLastAtribute = window.location.href.substr(window.location.href.lastIndexOf('/') + 1);
this.currentUerId = this.cognitoUtil.getCurrentUser();
this.AddRecordUrl = '/Gratification_Reporting/' + this.userRole + '/AddDealing';
this.dtOptions = {};
this.dtTrigger = new rxjs__WEBPACK_IMPORTED_MODULE_6__["Subject"]();
this.title = 'Personal Share Dealing Request';
this.loading = false;
this.User = [];
this.userName = this.cognitoUtil.getCurrentUser();
this.CurrentUrl = window.location.href;
this.result = this.CurrentUrl.split('/');
this.url = this.result[this.result.length - 1];
this.chaturl = this.result[this.result.length - 2];
this.FOLDER = 'assets/Pa-share-Upload Document/';
this.tilesName = 'Personal Share Dealing Permission Request Record';
this.selectFIles = '';
this.createUrl = [];
this.arrayFilename = [];
this.rootNode = rootNode;
}
ReportDealingComponent.prototype.ngOnInit = function () {
this.dtOptions = {
pagingType: 'full_numbers',
// pageLength: 10,
pageLength: -1,
lengthMenu: [[-1, 10, 20, 25, 50, 100, 200], ['All', 10, 20, 25, 50, 100, 200]]
};
if (sessionStorage.getItem('token') == null || sessionStorage.getItem('token') == '') {
this.router.navigateByUrl('/login');
}
this.GetFileData();
};
ReportDealingComponent.prototype.ngOnDestroy = function () {
// Do not forget to unsubscribe the event
this.dtTrigger.unsubscribe();
};
ReportDealingComponent.prototype.extractData = function (res) {
var body = res.json();
return body.data || {};
};
ReportDealingComponent.prototype.CheckRequest = function () {
var _this = this;
var data = {
'action': 'list_psdrequestaction_byID',
'manco_userid': this.currentUerId['username'],
'userRole': this.userRole
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
if (res.data != null && res.data != '') {
//this.createUrl = res.data;
var Details = void 0;
var FileData = void 0;
var FilesData = void 0;
var Information = [];
var value = res.data;
for (var i = 0; i < value.length; i++) {
// if (this.arrayFilename != null && this.arrayFilename != '') {
// FilesData = this.arrayFilename.filter(function (File) {
// return File.dataid == value[i].requestId;
// });
// }
// if (FilesData != null && FilesData != '') {
// FileData = FilesData;
// } else {
// FileData = [{
// 'dataid': '',
// 'documentId': '',
// 'Link': '',
// 'File': '',
// 'sanlamuserIdDetails': '',
// }];
// }
// if(value[i]["executed_trade_isin"] != '' || value[i]["executed_trade_isin"] != null){
// var tmp = value[i]["executed_trade_isin"];
// var Contract = tmp.split("/");
// }
// console.log(value[i].executed_trade_isin);
var fileNmae;
// console.log(response.data[i]["executed_trade_isin"]);
if (value[i].executed_trade_isin) {
var tmp = value[i].executed_trade_isin;
var Contract = tmp.split("/");
fileNmae = decodeURIComponent(Contract[Contract.length - 1]);
}
else {
fileNmae = '';
}
Information.push({
Additional_detail: value[i].Additional_detail,
Investment_name: value[i].Investment_name,
Unit_Amount: value[i].Unit_Amount,
amount: value[i].amount,
created_at: value[i].created_at,
director_permission: value[i].director_permission,
executed_trade_date: value[i].executed_trade_date,
executed_trade_isin: value[i].executed_trade_isin,
intended_trade_date: value[i].intended_trade_date,
intended_trade_isin: value[i].intended_trade_isin,
manco_userid: value[i].manco_userid,
number_of_shares: value[i].number_of_shares,
permission: value[i].permission,
requestId: value[i].requestId,
requestType: value[i].requestType,
updated_at: value[i].updated_at,
userRole: value[i].userRole,
additional_comments: value[i].additional_comments,
// dataid: FileData[0].dataid,
// documentId: FileData[0].documentId,
// Link: FileData[0].Link,
// File: FileData[0].File,
Link: value[i]["executed_trade_isin"],
// File: decodeURIComponent(Contract[Contract.length - 1]),
File: fileNmae,
});
}
_this.createUrl = Information;
// this.dtTrigger.next();
// setTimeout(() => {
// this.filterValue(res.data);
// }, 1000);
_this.dtTrigger.next();
}
else {
_this.dtTrigger.next();
}
}
else {
}
}, function (error) { _this.CheckRequest(); console.log(error); });
};
ReportDealingComponent.prototype.openFilepopup = function (value, template) {
console.log(value);
this.UserData = value;
this.modalRef = this.modalService.show(template);
};
ReportDealingComponent.prototype.GetNothingDetails = function () {
this.common.GetData({ LastUrl: "nothingTosubmit/" + this.userName['username'] }).subscribe(function (res) {
if (res.status == '200') {
console.log(res);
}
}, function (error) {
console.log();
});
};
ReportDealingComponent.prototype.GetFileData = function () {
var _this = this;
var data = {
'action': 'getdocumentbyUser',
'userid': this.userName['username'],
'month': new Date().getMonth() + 1,
'year': new Date().getFullYear(),
'tilesName': this.tilesName
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
_this.CheckRequest();
if (res.data.length > 0) {
for (var i = 0; i < res.data.length; i++) {
var tmp = res.data[i]['documnentName'];
var arrFilename = tmp.split("/");
var FileNames = decodeURIComponent(arrFilename[arrFilename.length - 1]);
_this.arrayFilename.push({
'sanlamuserIdDetails': res.data[i].userid,
'dataid': res.data[i].dataid,
'File': decodeURIComponent(arrFilename[arrFilename.length - 1]),
'Link': res.data[i]['documnentName'],
'documentId': res.data[i]['documentId']
});
}
}
}, function (error) {
_this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
_this.CheckRequest();
if (res.data.length > 0) {
for (var i = 0; i < res.data.length; i++) {
var tmp = res.data[i]['documnentName'];
var arrFilename = tmp.split("/");
var FileNames = decodeURIComponent(arrFilename[arrFilename.length - 1]);
_this.arrayFilename.push({
'sanlamuserIdDetails': res.data[i].userid,
'dataid': res.data[i].dataid,
'File': decodeURIComponent(arrFilename[arrFilename.length - 1]),
'Link': res.data[i]['documnentName'],
'documentId': res.data[i]['documentId']
});
}
}
});
});
};
ReportDealingComponent.prototype.filterValue = function (value) {
var Details;
var FileData;
var FilesData;
var Information = [];
var _loop_1 = function (i) {
if (this_1.arrayFilename != null && this_1.arrayFilename != '') {
FilesData = this_1.arrayFilename.filter(function (File) {
return File.dataid == value[i].requestId;
});
}
if (FilesData != null && FilesData != '') {
FileData = FilesData;
}
else {
FileData = [{
'dataid': '',
'documentId': '',
'Link': '',
'File': '',
'sanlamuserIdDetails': '',
}];
}
// if(value[i]["executed_trade_isin"] != '' || value[i]["executed_trade_isin"] != null){
// var tmp = value[i]["executed_trade_isin"];
// var Contract = tmp.split("/");
// }
console.log(value[i].executed_trade_isin);
Information.push({
Additional_detail: value[i].Additional_detail,
Investment_name: value[i].Investment_name,
Unit_Amount: value[i].Unit_Amount,
amount: value[i].amount,
created_at: value[i].created_at,
director_permission: value[i].director_permission,
executed_trade_date: value[i].executed_trade_date,
executed_trade_isin: value[i].executed_trade_isin,
intended_trade_date: value[i].intended_trade_date,
intended_trade_isin: value[i].intended_trade_isin,
manco_userid: value[i].manco_userid,
number_of_shares: value[i].number_of_shares,
permission: value[i].permission,
requestId: value[i].requestId,
requestType: value[i].requestType,
updated_at: value[i].updated_at,
userRole: value[i].userRole,
additional_comments: value[i].additional_comments,
dataid: FileData[0].dataid,
documentId: FileData[0].documentId,
// Link: FileData[0].Link,
// File: FileData[0].File,
Link: value[i]["executed_trade_isin"],
// File: decodeURIComponent(Contract[Contract.length - 1]),
sanlamuserIdDetails: FileData[0].sanlamuserIdDetails,
});
};
var this_1 = this;
for (var i = 0; i < value.length; i++) {
_loop_1(i);
}
this.createUrl = Information;
this.dtTrigger.next();
};
ReportDealingComponent.prototype.upload_Contract = function (i) {
(document.getElementById("upload_Contract" + i)).click();
};
// selectFIles:any;
// FOLDER = "assets/Pa-share-Upload Document/";
// imageFile:any;
ReportDealingComponent.prototype.fileEvent = function (RowData, event) {
var _this = this;
this.spinner.show();
this.selectFIles = event.target.files[0];
if (this.selectFIles != null) {
if (this.selectFIles["type"] == "application/pdf" ||
this.selectFIles["type"] == "application/vnd.ms-excel") {
var bucket = new aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_10__({
accessKeyId: _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].accessKeyId,
secretAccessKey: _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].secretAccessKey,
region: _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].S3region
});
var params = {
Bucket: _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].BucketName,
Key: 'assets/Pa-share-Upload Document/' + event.target.files[0].name,
Body: this.selectFIles
};
bucket.upload(params, function (err, data) {
if (err) {
console.log(err);
// this.errorMessage = err;
}
_this.imageFile = data["Location"];
var updateData = RowData;
updateData["executed_trade_isin"] = _this.imageFile;
updateData["permission"] = 'Approved';
updateData['director_permission'] = 'Approved';
updateData['action'] = "psdrequestaction";
// console.log(updateData);
_this.common.saveFundRiskData(updateData).subscribe(function (response) {
toastr.success("uploaded a contract note successfully updaed");
_this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
// this.dtTrigger.next();
});
_this.spinner.hide();
_this.CheckRequest();
}, function (err) { console.log(err); });
});
}
else {
toastr.error("File type not allowed.", "Error !!!");
this.spinner.hide();
}
}
else {
this.spinner.hide();
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(angular_datatables__WEBPACK_IMPORTED_MODULE_5__["DataTableDirective"]),
__metadata("design:type", angular_datatables__WEBPACK_IMPORTED_MODULE_5__["DataTableDirective"])
], ReportDealingComponent.prototype, "dtElement", void 0);
ReportDealingComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-report-dealing',
template: __webpack_require__(/*! ./report-dealing.component.html */ "./src/app/components/PAShareDealingDashboard/user/report-dealing/report-dealing.component.html"),
styles: [__webpack_require__(/*! ./report-dealing.component.css */ "./src/app/components/PAShareDealingDashboard/user/report-dealing/report-dealing.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"],
_services_common_service__WEBPACK_IMPORTED_MODULE_7__["CommonService"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_8__["CognitoUtil"],
_angular_http__WEBPACK_IMPORTED_MODULE_3__["Http"], ngx_spinner__WEBPACK_IMPORTED_MODULE_9__["NgxSpinnerService"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"],
ngx_bootstrap_modal__WEBPACK_IMPORTED_MODULE_4__["BsModalService"]])
], ReportDealingComponent);
return ReportDealingComponent;
}());
/***/ }),
/***/ "./src/app/components/auth/adduser/adduser.component.css":
/*!***************************************************************!*\
!*** ./src/app/components/auth/adduser/adduser.component.css ***!
\***************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".role-checkbox {\r\n position: relative !important;\r\n}\r\n\r\n.header-icon img {\r\n height: 50px;\r\n width: 60px;\r\n /* margin-right: 10px; */\r\n margin-left: 53px;\r\n}\r\n\r\n.header-icon {\r\n width: 100%;\r\n float: left;\r\n color: #929292;\r\n margin: 0 20px;\r\n margin-bottom: 20px;\r\n}\r\n\r\nth {\r\n width: 17%;\r\n}\r\n\r\nbutton#sign_btn {\r\n margin-right: 12px;\r\n}\r\n\r\n@media (min-width: 768px) and (max-width: 991px) {\r\n .header-icon img {\r\n height: 50px;\r\n width: 60px;\r\n margin-left: 0px;\r\n }\r\n .header-icon {\r\n width: 100%;\r\n float: left;\r\n color: #929292;\r\n margin: 0;\r\n margin-bottom: 20px;\r\n }\r\n}\r\n\r\n@media only screen and (max-width: 640px) {\r\n .header-icon {\r\n width: 100%;\r\n float: left;\r\n color: #929292;\r\n margin: 0;\r\n margin-bottom: 20px;\r\n }\r\n .header-icon img {\r\n height: 50px;\r\n width: 60px;\r\n margin-left: 0px;\r\n }\r\n}"
/***/ }),
/***/ "./src/app/components/auth/adduser/adduser.component.html":
/*!****************************************************************!*\
!*** ./src/app/components/auth/adduser/adduser.component.html ***!
\****************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n
\r\n
"
/***/ }),
/***/ "./src/app/components/auth/adduser/adduser.component.ts":
/*!**************************************************************!*\
!*** ./src/app/components/auth/adduser/adduser.component.ts ***!
\**************************************************************/
/*! exports provided: AdduserComponent, EdituserComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AdduserComponent", function() { return AdduserComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EdituserComponent", function() { return EdituserComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/http */ "./node_modules/@angular/http/fesm5/http.js");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_auth_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts");
/* harmony import */ var src_environments_environment__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
// import { AuthorizationService } from "../../../services/awsservices/authorization.service";
var AdduserComponent = /** @class */ (function () {
function AdduserComponent(form, router, auth, common, http) {
this.form = form;
this.router = router;
this.auth = auth;
this.common = common;
this.http = http;
this.dropdownList = [];
this.user_rols = [];
this.selectedItems = [];
this.compnay_list = [];
this.fundLIst = [];
this.fundName = [];
this.company_name = [];
// onSelectAll(items: any) {
// console.log(items)
// this.fundName = [];
// items.forEach(element => {
// this.fundName.push(element.fundName)
// });
// }
// OnItemDeSelect(item: any) {
// console.log(item)
// for (var i = 0; i < this.fundName.length; i++) {
// if (this.fundName[i] === item.fundName) {
// this.fundName.splice(i, 1);
// }
// }
// }
// onCompanySelect(item: any) {
// this.company_name.push(item.CompanyName)
// }
// onCompanySelectAll(items: any) {
// this.company_name = [];
// items.forEach(element => {
// this.company_name.push(element.CompanyName)
// });
// }
// OnItemDeSelectcomp(item: any) {
// console.log(item)
// for (var i = 0; i < this.company_name.length; i++) {
// if (this.company_name[i] === item.CompanyName) {
// this.company_name.splice(i, 1);
// }
// }
// console.log(this.company_name)
// }
this.fundName_check = false;
this.Role = [];
this.checkRole = false;
this.Associated_Investment = false;
this.Associated_Funds = false;
this.RegisterForm = form.group({
'first_name': [null, _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
'last_name': [null, _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
'email': [null, _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].compose([_angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required, _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].email])],
'password': [null, _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
'roles': ['', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
'status': ['', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
'Associated_Investment_Management': [false],
'Associated_Funds_Portfolios': [false],
'Email': [true],
});
}
;
AdduserComponent.prototype.ngOnInit = function () {
if (localStorage.getItem('custom:user_role') == 'manco user') {
this.router.navigateByUrl('admin/dashboard');
}
this.getFundList_Data();
this.dropdownList = [
{ item_id: 1, item_text: 'Mumbai' },
{ item_id: 2, item_text: 'Bangaluru' },
{ item_id: 3, item_text: 'Pune' },
{ item_id: 4, item_text: 'Navsari' },
{ item_id: 5, item_text: 'New Delhi' }
];
this.selectedItems = [
{ role: 'manco user', name: 'Manco User' },
{ role: 'director', name: 'Director' },
{ role: 'OED INED Director', name: 'OED INED Director' },
// { role: 'IM', name: 'IM' },
{ role: 'Manco Head', name: 'Manco Head' },
{ role: 'Manco CEO / Director', name: 'Manco CEO / Director' },
{ role: 'Distributor', name: 'Distributor' },
{ role: 'IM Head Of Compliance', name: 'IM Head Of Compliance' },
{ role: 'IMCO', name: 'Investment Management (IM) Compliance Officer' },
];
this.dropdownSettings = {
singleSelection: false,
idField: 'fundName',
textField: 'fundName',
selectAllText: 'Select All',
unSelectAllText: 'UnSelect All',
itemsShowLimit: 3,
allowSearchFilter: true
};
this.userRole_setting = {
singleSelection: false,
idField: 'role',
textField: 'name',
selectAllText: 'Select All',
unSelectAllText: 'UnSelect All',
itemsShowLimit: 3,
allowSearchFilter: true
};
this.Compnay_dropdownSettings = {
singleSelection: false,
idField: 'CompanyName',
textField: 'CompanyName',
selectAllText: 'Select All',
unSelectAllText: 'UnSelect All',
itemsShowLimit: 3,
allowSearchFilter: true
};
};
AdduserComponent.prototype.getFundList_Data = function () {
var _this = this;
var Funddata = {
'action': 'UserslistFunds',
};
this.common.saveFundRiskData(Funddata)
.subscribe(function (resource) {
var resData = JSON.parse(resource._body);
var Response = JSON.parse(resData.body);
if (Response.status == '200') {
_this.dropdownList = Response.data.sort(function (a, b) {
return (a.created_at < b.created_at) ? -1 : 1;
});
}
else {
toastr.error(Response.message, 'Error !');
}
}, function (error) { });
// let Newdata = {
// LastUrl: "https://3z1tfh0og1.execute-api.us-east-2.amazonaws.com/prod/api/GerDatabyTableName",
// table: "demo_specificfundsList"
// };
// this.common.Post(Newdata).subscribe(
// response => {
// if (response.status == "success") {
// this.dropdownList = response.data;
// }
// })
var data = {
action: 'get-Im-Comapny',
};
this.common.GetUserdataBYheaders(data).subscribe(function (resource) {
var resData = JSON.parse(resource._body);
var res = JSON.parse(resData.body);
if (res.data.length > 0) {
_this.compnay_list = res.data.sort(function (a, b) {
return (a.created_at < b.created_at) ? -1 : 1;
});
}
}, function (error) {
// this.getUserlist();
console.log(error);
});
// let Company_data = {
// LastUrl: "https://3z1tfh0og1.execute-api.us-east-2.amazonaws.com/prod/api/GerDatabyTableName",
// table: "specificIM_company_List"
// };
// this.common.Post(Company_data).subscribe(
// response => {
// if (response.status == "success") {
// this.compnay_list = response.data;
// }
// })
};
AdduserComponent.prototype.onItemSelect = function (item) {
for (var i = 0; i < this.fundName.length; i++) {
if (this.fundName[i] === item) {
this.fundName.splice(i, 1);
i--;
}
}
};
AdduserComponent.prototype.assoc_fund = function (event) {
if (event === true) {
this.fundName_check = false;
}
else {
this.fundName_check = false;
}
};
AdduserComponent.prototype.onRoleSelect = function (item) {
if (item.role == 'IMCO' || item.role == 'IM Head Of Compliance' || item.role == 'Distributor') {
this.Associated_Investment = true;
}
if (item.role == 'IMCO' || item.role == 'IM Head Of Compliance' || item.role == 'manco user') {
this.Associated_Funds = true;
}
else {
// this.Associated_Investment = false; this.Associated_Funds = false;
}
this.Role.push(item.role);
};
AdduserComponent.prototype.onSelectAllRole = function (items) {
var _this = this;
this.Role = [];
items.forEach(function (element) {
if (element.role == 'IMCO' || element.role == 'IM Head Of Compliance') {
_this.Associated_Investment = true;
}
else if (element.role == 'IMCO' || element.role == 'Distributor' || element.role == 'IM Head Of Compliance' || element.role == 'manco user') {
_this.Associated_Funds = true;
}
else {
_this.Associated_Investment = false;
_this.Associated_Funds = false;
}
_this.Role.push(element.role);
});
};
AdduserComponent.prototype.submitForm = function (value) {
var data = value;
data['role'] = this.Role.toString();
data['fundName'] = this.fundName.toString();
data['company_name'] = this.company_name.toString();
this.Associated_Investment_Management = value.Associated_Investment_Management;
this.Associated_Funds_Portfolios = value.Associated_Investment_Management;
this.auth.register(data, this);
};
AdduserComponent.prototype.cognitoCallback = function (messages, result) {
if (messages != null) {
this.errorMessage = messages;
toastr.error(this.errorMessage, 'Error !');
}
else {
var message = this.RegisterForm.value;
message['action'] = 'saveCoginitoUser';
message['username'] = result.userSub;
message['sanlamuserid'] = '';
message['firstname'] = this.RegisterForm.value.first_name;
message['lastname'] = this.RegisterForm.value.last_name;
message['mail'] = this.RegisterForm.value.email;
message['role'] = this.RegisterForm.value.role.toString();
message['status'] = this.RegisterForm.value.status;
message['Associated_Investment_Management'] = this.Associated_Investment_Management;
message['Associated_Funds_Portfolios'] = this.Associated_Funds_Portfolios;
message['fundName'] = this.fundName.toString();
message['company_name'] = this.company_name.toString();
this.common.saveFundRiskData(message).subscribe(function (response) {
var resData = JSON.parse(response._body);
var Response = JSON.parse(resData.body);
if (Response.status == '200') {
}
else {
}
});
this.Sendmail();
toastr.success(result, 'Success !');
this.RegisterForm.reset();
}
};
AdduserComponent.prototype.reset = function () {
this.RegisterForm.reset();
};
AdduserComponent.prototype.Sendmail = function () {
var data = {
'action': 'commonMailservice2',
'to': this.RegisterForm.value.email,
'subject': 'Initial Login',
'message': "Hi your username is " + this.RegisterForm.value.email + " and Password is " + this.RegisterForm.value.password + ". Please click " + src_environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].redirect_url + " here.",
};
this.common.saveFundRiskData(data)
.subscribe(function (res) {
if (res.status == '200') {
}
else {
}
}, function (err) {
console.log(err);
// this.Sendmail()
});
var adminEmail = {
'action': 'commonMailservice2',
'to': 'regstone@sanlam.ie',
'subject': 'New user initial login',
'message': "Hi your username is " + this.RegisterForm.value.email + " and Password is " + this.RegisterForm.value.password + ". Please click " + src_environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].redirect_url + " here.",
};
this.common.saveFundRiskData(adminEmail)
.subscribe(function (res) {
if (res.status == '200') {
}
else {
}
}, function (err) {
console.log(err);
// this.Sendmail()
});
};
AdduserComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-adduser',
template: __webpack_require__(/*! ./adduser.component.html */ "./src/app/components/auth/adduser/adduser.component.html"),
styles: [__webpack_require__(/*! ./adduser.component.css */ "./src/app/components/auth/adduser/adduser.component.css")]
}),
__metadata("design:paramtypes", [_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_services_auth_service__WEBPACK_IMPORTED_MODULE_5__["AuthService"],
_services_common_service__WEBPACK_IMPORTED_MODULE_4__["CommonService"],
_angular_http__WEBPACK_IMPORTED_MODULE_3__["Http"]])
], AdduserComponent);
return AdduserComponent;
}());
var EdituserComponent = /** @class */ (function () {
function EdituserComponent(form, router, auth, common, http) {
this.form = form;
this.router = router;
this.auth = auth;
this.common = common;
this.http = http;
this.title = 'Edit User Profile';
this.Manco_User = false;
this.Director = false;
this.OED_INED_Director = false;
this.IM = false;
this.Manco_Head = false;
this.Manco_CEO = false;
this.Distributor = false;
this.IM_Head_Of_Compliance = false;
this.Investment_Management = false;
this.dropdownList = [];
this.selectedItems = [];
this.fundList = [];
this.company_list = [];
this.fundName = [];
this.company_name = [];
this.selectedFund = [];
this.selectedCompany = [];
this.EditForm = form.group({
'roles': ['', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
'status': ['', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
});
}
EdituserComponent.prototype.ngOnInit = function () {
var _this = this;
if (localStorage.getItem('custom:user_role') == 'manco user') {
this.router.navigateByUrl('admin/dashboard');
}
this.getUserDetails();
this.dropdownSettings = {
singleSelection: false,
idField: 'fundName',
textField: 'fundName',
selectAllText: 'Select All',
unSelectAllText: 'UnSelect All',
itemsShowLimit: 3,
allowSearchFilter: true
};
this.Compnay_dropdownSettings = {
singleSelection: false,
idField: 'CompanyName',
textField: 'CompanyName',
selectAllText: 'Select All',
unSelectAllText: 'UnSelect All',
itemsShowLimit: 3,
allowSearchFilter: true
};
var Funddata = {
'action': 'UserslistFunds',
};
this.common.saveFundRiskData(Funddata)
.subscribe(function (resource) {
var resData = JSON.parse(resource._body);
var Response = JSON.parse(resData.body);
if (Response.status == '200') {
_this.fundList = Response.data.sort(function (a, b) {
return (a.created_at < b.created_at) ? -1 : 1;
});
}
else {
toastr.error(Response.message, 'Error !');
}
}, function (error) { });
var data = {
action: 'get-Im-Comapny',
};
this.common.GetUserdataBYheaders(data).subscribe(function (resource) {
var resData = JSON.parse(resource._body);
var res = JSON.parse(resData.body);
if (res.data.length > 0) {
_this.company_list = res.data.sort(function (a, b) {
return (a.created_at < b.created_at) ? -1 : 1;
});
}
}, function (error) {
// this.getUserlist();
console.log(error);
});
};
EdituserComponent.prototype.ngOnDestroy = function () {
sessionStorage.removeItem("userdetails");
};
EdituserComponent.prototype.submitForm = function (value) {
var data = value;
data['role'] = value.roles.toString();
};
EdituserComponent.prototype.getUserDetails = function () {
var _this = this;
var user = sessionStorage.getItem("userdetails");
var details = JSON.parse(user);
this.firstname = details.firstname;
this.lastname = details.lastname;
this.mail = details.mail;
this.role = details.role;
this.AllRole = this.role.split(",");
this.sanlamuserid = details.sanlamuserid;
this.status = details.status;
if (details.fundName != null && details.fundName != '' && details.fundName != undefined) {
var fundName = details.fundName.split(',');
fundName.forEach(function (element) {
_this.selectedItems.push({ fundName: element });
_this.fundName.push(element);
});
}
else {
this.selectedItems = this.dropdownList;
}
if (details.company_name != null && details.company_name != '' && details.company_name != undefined) {
var company_name = details.company_name.split(',');
company_name.forEach(function (element) {
_this.selectedCompany.push({ CompanyName: element });
_this.company_name.push(element);
});
}
this.username = details.username;
for (var i = 0; i < this.AllRole.length; i++) {
if (this.AllRole[i] == 'manco user') {
this.Manco_User = true;
}
else if (this.AllRole[i] == 'director') {
this.Director = true;
}
else if (this.AllRole[i] == 'OED INED Director') {
this.OED_INED_Director = true;
}
else if (this.AllRole[i] == 'Manco Head') {
this.Manco_Head = true;
}
else if (this.AllRole[i] == "Manco CEO / Director") {
this.Manco_CEO = true;
}
else if (this.AllRole[i] == "Distributor") {
this.Distributor = true;
}
else if (this.AllRole[i] == "IM Head Of Compliance") {
this.IM_Head_Of_Compliance = true;
}
else if (this.AllRole[i] == "IMCO") {
this.Investment_Management = true;
}
}
};
EdituserComponent.prototype.ChnageProfile = function () {
var favorite = [];
$.each($("input[name='Roles']:checked"), function () {
favorite.push($(this).val());
});
var data = {
last_name: this.firstname,
first_name: this.lastname,
email: this.mail,
username: this.username,
user_role: favorite.toString(),
Userid: this.username,
status: this.status
};
this.auth.AdminUserUpdate(data, this);
};
// START Fund Selection
EdituserComponent.prototype.onItemSelect = function (item) {
this.fundName.push(item.fundName);
};
EdituserComponent.prototype.OnItemDeSelect = function (item) {
for (var i = 0; i < this.fundName.length; i++) {
if (this.fundName[i] === item.fundName) {
this.fundName.splice(i, 1);
}
}
};
EdituserComponent.prototype.onSelectAll = function (items) {
var _this = this;
this.fundName = [];
items.forEach(function (element) {
_this.fundName.push(element.fundName);
});
};
EdituserComponent.prototype.onDeSelectAll = function (item) {
this.fundName = [];
};
// END Fund Selection
// START Company selection
EdituserComponent.prototype.onCompanySelect = function (item) {
this.company_name.push(item.CompanyName);
};
;
EdituserComponent.prototype.OnItemDeSelectcomp = function (item) {
for (var i = 0; i < this.company_name.length; i++) {
if (this.company_name[i] === item.CompanyName) {
this.company_name.splice(i, 1);
}
}
};
;
EdituserComponent.prototype.onCompanySelectAll = function (items) {
var _this = this;
this.company_name = [];
items.forEach(function (element) {
_this.company_name.push(element.CompanyName);
});
};
;
EdituserComponent.prototype.OnItemDeSelectcompAll = function (items) {
this.company_name = [];
};
// END Company selection
EdituserComponent.prototype.cognitoCallback = function (message, result) {
var _this = this;
if (message != null) {
// console.log(message);
}
else {
var favorite = [];
var status_1;
$.each($("input[name='Roles']:checked"), function () {
favorite.push($(this).val());
});
// $.each($("input[name='status']:checked"), function () {
// status = $(this).val();
// });
var data = {
'action': 'saveCoginitoUser',
'username': this.username,
'sanlamuserid': this.sanlamuserid,
'firstname': this.firstname,
'lastname': this.lastname,
'mail': this.mail,
'role': favorite.toString(),
'fundName': this.fundName.toString(),
'company_name': this.company_name.toString(),
'status': this.status,
};
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var Response = JSON.parse(resData.body);
if (Response.status == '200') {
toastr.success('User updated successfully');
_this.router.navigate(['/admin/userlist']);
}
else {
}
}, function (error) {
console.log(error);
});
//toastr.success('User Successfully Updated', 'Success !!');
}
};
EdituserComponent.prototype.UpdateUserRoleBYAdmin = function () {
var _this = this;
var favorite = [];
$.each($("input[name='Roles']:checked"), function () {
favorite.push($(this).val());
});
if (favorite.length == 0) {
toastr.error("Please select at least One user Role !");
}
else {
if (this.sanlamuserid != '' && this.sanlamuserid != undefined) {
var data = {
'action': 'saveCoginitoUser',
'username': this.username,
'sanlamuserid': this.sanlamuserid,
'firstname': this.firstname,
'lastname': this.lastname,
'mail': this.mail,
'role': favorite.toString(),
'fundName': this.fundName.toString(),
'company_name': this.company_name.toString(),
'status': this.status,
};
// console.log(data)
this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var Response = JSON.parse(resData.body);
if (Response.status == '200') {
toastr.success('User updated successfully');
_this.router.navigate(['/admin/userlist']);
}
else {
toastr.error('Failed to updated User');
}
});
}
else {
toastr.error("User not found");
}
}
};
EdituserComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-adduser',
template: __webpack_require__(/*! ./edituser.html */ "./src/app/components/auth/adduser/edituser.html"),
styles: [__webpack_require__(/*! ./adduser.component.css */ "./src/app/components/auth/adduser/adduser.component.css")]
}),
__metadata("design:paramtypes", [_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_services_auth_service__WEBPACK_IMPORTED_MODULE_5__["AuthService"],
_services_common_service__WEBPACK_IMPORTED_MODULE_4__["CommonService"],
_angular_http__WEBPACK_IMPORTED_MODULE_3__["Http"]])
], EdituserComponent);
return EdituserComponent;
}());
/***/ }),
/***/ "./src/app/components/auth/adduser/edituser.html":
/*!*******************************************************!*\
!*** ./src/app/components/auth/adduser/edituser.html ***!
\*******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
{{ title }} \r\n
\r\n
\r\n
"
/***/ }),
/***/ "./src/app/components/auth/changepassword/changepassword.component.css":
/*!*****************************************************************************!*\
!*** ./src/app/components/auth/changepassword/changepassword.component.css ***!
\*****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/components/auth/changepassword/changepassword.component.html":
/*!******************************************************************************!*\
!*** ./src/app/components/auth/changepassword/changepassword.component.html ***!
\******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n
\r\n
"
/***/ }),
/***/ "./src/app/components/auth/changepassword/changepassword.component.ts":
/*!****************************************************************************!*\
!*** ./src/app/components/auth/changepassword/changepassword.component.ts ***!
\****************************************************************************/
/*! exports provided: ChangepasswordComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChangepasswordComponent", function() { return ChangepasswordComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/http */ "./node_modules/@angular/http/fesm5/http.js");
/* harmony import */ var _services_auth_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
// import { AuthorizationService } from "../../../services/awsservices/authorization.service";
var ChangepasswordComponent = /** @class */ (function () {
function ChangepasswordComponent(form, router, auth, http) {
this.form = form;
this.router = router;
this.auth = auth;
this.http = http;
this.pwdPattern = "^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).{6,12}$";
this.btn = document.getElementById("change_pass_btn");
this.ChangePasswordForm = form.group({
'oldPassword': [null, _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
'newPassword': [null, _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
'confirm_pass': [null, _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
});
}
ChangepasswordComponent.prototype.ngOnInit = function () {
if (sessionStorage.getItem('token') == null || sessionStorage.getItem('token') == '') {
this.router.navigateByUrl('/login');
}
};
ChangepasswordComponent.prototype.changePasoword = function (value) {
var btn = document.getElementById("change_pass_btn");
btn.innerText = "Processing...";
btn.disabled = true;
this.auth.changePassword(value.oldPassword, value.newPassword, value.confirm_pass, this);
};
ChangepasswordComponent.prototype.cognitoCallback = function (message, result) {
var btn = document.getElementById("change_pass_btn");
if (message != null) {
this.errorMessage = message;
toastr.error(this.errorMessage, 'Error!');
}
else {
//move to the next step
this.ChangePasswordForm.reset();
btn.innerText = "Login";
btn.disabled = false;
toastr.success(result, 'Success!');
this.router.navigate(['/admin/changepassword']);
}
};
ChangepasswordComponent.prototype.reset = function () {
this.ChangePasswordForm.reset();
};
ChangepasswordComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-changepassword',
template: __webpack_require__(/*! ./changepassword.component.html */ "./src/app/components/auth/changepassword/changepassword.component.html"),
styles: [__webpack_require__(/*! ./changepassword.component.css */ "./src/app/components/auth/changepassword/changepassword.component.css")]
}),
__metadata("design:paramtypes", [_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_services_auth_service__WEBPACK_IMPORTED_MODULE_4__["AuthService"],
_angular_http__WEBPACK_IMPORTED_MODULE_3__["Http"]])
], ChangepasswordComponent);
return ChangepasswordComponent;
}());
/***/ }),
/***/ "./src/app/components/auth/confirm-user/confirm-user.component.css":
/*!*************************************************************************!*\
!*** ./src/app/components/auth/confirm-user/confirm-user.component.css ***!
\*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/components/auth/confirm-user/confirm-user.component.html":
/*!**************************************************************************!*\
!*** ./src/app/components/auth/confirm-user/confirm-user.component.html ***!
\**************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n confirm-user works!\r\n
\r\n"
/***/ }),
/***/ "./src/app/components/auth/confirm-user/confirm-user.component.ts":
/*!************************************************************************!*\
!*** ./src/app/components/auth/confirm-user/confirm-user.component.ts ***!
\************************************************************************/
/*! exports provided: ConfirmUserComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConfirmUserComponent", function() { return ConfirmUserComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.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 ConfirmUserComponent = /** @class */ (function () {
function ConfirmUserComponent() {
}
ConfirmUserComponent.prototype.ngOnInit = function () {
};
ConfirmUserComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-confirm-user',
template: __webpack_require__(/*! ./confirm-user.component.html */ "./src/app/components/auth/confirm-user/confirm-user.component.html"),
styles: [__webpack_require__(/*! ./confirm-user.component.css */ "./src/app/components/auth/confirm-user/confirm-user.component.css")]
}),
__metadata("design:paramtypes", [])
], ConfirmUserComponent);
return ConfirmUserComponent;
}());
/***/ }),
/***/ "./src/app/components/auth/confirm/confirm.component.css":
/*!***************************************************************!*\
!*** ./src/app/components/auth/confirm/confirm.component.css ***!
\***************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/components/auth/confirm/confirm.component.html":
/*!****************************************************************!*\
!*** ./src/app/components/auth/confirm/confirm.component.html ***!
\****************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n\r\n"
/***/ }),
/***/ "./src/app/components/auth/confirm/confirm.component.ts":
/*!**************************************************************!*\
!*** ./src/app/components/auth/confirm/confirm.component.ts ***!
\**************************************************************/
/*! exports provided: NewPasswordUser, ConfirmComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NewPasswordUser", function() { return NewPasswordUser; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConfirmComponent", function() { return ConfirmComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _services_auth_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/http */ "./node_modules/@angular/http/fesm5/http.js");
/* harmony import */ var _services_awsservices_authorization_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../services/awsservices/authorization.service */ "./src/app/services/awsservices/authorization.service.ts");
/* harmony import */ var src_app_services_common_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/services/common.service */ "./src/app/services/common.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var NewPasswordUser = /** @class */ (function () {
function NewPasswordUser() {
}
return NewPasswordUser;
}());
var ConfirmComponent = /** @class */ (function () {
function ConfirmComponent(fb, router, auth, common, auther, http) {
this.fb = fb;
this.router = router;
this.auth = auth;
this.common = common;
this.auther = auther;
this.http = http;
this.user = { username: '', existingPassword: '', password: '' };
this.resetpassForm = fb.group({
'username': [null, [_angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required,]],
'existingPassword': [null, [_angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required, _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].minLength(6)]],
'password': [null, [_angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required,]]
});
this.onInit();
}
ConfirmComponent.prototype.onInit = function () {
this.registrationUser = new NewPasswordUser();
this.errorMessage = null;
};
ConfirmComponent.prototype.ngOnInit = function () {
if (localStorage.getItem('confirmation') != '' && localStorage.getItem('confirmation') != null) {
this.Heading = 'Confirm User';
}
else {
this.Heading = 'Set new password';
}
};
ConfirmComponent.prototype.resetpass = function () {
this.errorMessage = null;
this.auth.newPassword(this.resetpassForm.value, this);
};
ConfirmComponent.prototype.resend = function () {
this.errorMessage = null;
var result = this.auth.resend(this.resetpassForm.value.username);
};
ConfirmComponent.prototype.onRegister = function () {
this.errorMessage = null;
this.auth.confirms(this.registrationUser, this);
};
ConfirmComponent.prototype.cognitoCallback = function (message, result) {
if (message != null) {
this.errorMessage = message;
toastr.error(this.errorMessage, 'Error !');
}
else {
// if (result == 'SUCCESS') {
// let data = {
// 'action': 'get_user_byEmail',
// 'email': this.resetpassForm.value.username
// };
// this.common.saveFundRiskData(data)
// .subscribe(response => {
// let resData = JSON.parse(response._body);
// let Response = JSON.parse(resData.body);
// if (Response.status == '200') {
// let thenewdata = {
// 'action': 'updateConfirmUser',
// 'sanlamuserid': Response.data[0].sanlamuserid
// };
// this.common.saveFundRiskData(thenewdata)
// .subscribe(res => {
// console.log(res)
// })
// }
// })
// }
toastr.success(message, 'Success !');
this.router.navigate(['/login']);
}
};
ConfirmComponent.prototype.isLoggedIn = function (message, isLoggedIn) {
if (isLoggedIn)
this.router.navigate(['/admin/dashboard']);
};
ConfirmComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-confirm',
template: __webpack_require__(/*! ./confirm.component.html */ "./src/app/components/auth/confirm/confirm.component.html"),
styles: [__webpack_require__(/*! ./confirm.component.css */ "./src/app/components/auth/confirm/confirm.component.css")]
}),
__metadata("design:paramtypes", [_angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"],
_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_services_auth_service__WEBPACK_IMPORTED_MODULE_2__["AuthService"],
src_app_services_common_service__WEBPACK_IMPORTED_MODULE_6__["CommonService"],
_services_awsservices_authorization_service__WEBPACK_IMPORTED_MODULE_5__["AuthorizationService"],
_angular_http__WEBPACK_IMPORTED_MODULE_4__["Http"]])
], ConfirmComponent);
return ConfirmComponent;
}());
/***/ }),
/***/ "./src/app/components/auth/forgot/forgot.component.css":
/*!*************************************************************!*\
!*** ./src/app/components/auth/forgot/forgot.component.css ***!
\*************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/components/auth/forgot/forgot.component.html":
/*!**************************************************************!*\
!*** ./src/app/components/auth/forgot/forgot.component.html ***!
\**************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n\r\n"
/***/ }),
/***/ "./src/app/components/auth/forgot/forgot.component.ts":
/*!************************************************************!*\
!*** ./src/app/components/auth/forgot/forgot.component.ts ***!
\************************************************************/
/*! exports provided: ForgotComponent, ForgotPasswordStep1Component */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ForgotComponent", function() { return ForgotComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ForgotPasswordStep1Component", function() { return ForgotPasswordStep1Component; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _services_auth_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/http */ "./node_modules/@angular/http/fesm5/http.js");
/* harmony import */ var _services_awsservices_authorization_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../services/awsservices/authorization.service */ "./src/app/services/awsservices/authorization.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var ForgotComponent = /** @class */ (function () {
function ForgotComponent(fb, router, auth, auther, http) {
this.fb = fb;
this.router = router;
this.auth = auth;
this.auther = auther;
this.http = http;
this.title = 'Reset Password';
this.user = { email: '' };
this.forgotForm = fb.group({
'email': ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].compose([_angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required, _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].email])],
});
this.errorMessage = null;
}
ForgotComponent.prototype.ngOnInit = function () {
};
ForgotComponent.prototype.forgotpass = function (value) {
this.errorMessage = null;
var btn = document.getElementById("forgot_btn");
btn.innerText = "Processing...";
btn.disabled = true;
this.auth.forgotPassword(value.email, this);
};
ForgotComponent.prototype.cognitoCallback = function (message, result) {
var btn = document.getElementById("forgot_btn");
btn.innerText = "Submit";
if (message == null && result == null) {
this.router.navigate(['/admin/resetpassword', this.forgotForm.value.email]);
}
else {
this.errorMessage = message;
toastr.error(this.errorMessage, 'Error!');
}
};
ForgotComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-forgot',
template: __webpack_require__(/*! ./forgot.component.html */ "./src/app/components/auth/forgot/forgot.component.html"),
styles: [__webpack_require__(/*! ./forgot.component.css */ "./src/app/components/auth/forgot/forgot.component.css")]
}),
__metadata("design:paramtypes", [_angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"],
_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_services_auth_service__WEBPACK_IMPORTED_MODULE_2__["AuthService"],
_services_awsservices_authorization_service__WEBPACK_IMPORTED_MODULE_5__["AuthorizationService"],
_angular_http__WEBPACK_IMPORTED_MODULE_4__["Http"]])
], ForgotComponent);
return ForgotComponent;
}());
var ForgotPasswordStep1Component = /** @class */ (function () {
function ForgotPasswordStep1Component(fb, router, auth, auther, http, rout) {
this.fb = fb;
this.router = router;
this.auth = auth;
this.auther = auther;
this.http = http;
this.rout = rout;
this.resetPasswordForm = fb.group({
'verificationCode': ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
'password': ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
'confirm_password': ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required]
});
this.errorMessage = null;
}
ForgotPasswordStep1Component.prototype.ngOnInit = function () {
var _this = this;
this.sub = this.rout.params.subscribe(function (params) {
_this.email = params['email'];
});
this.errorMessage = null;
};
ForgotPasswordStep1Component.prototype.onNext = function (value) {
this.errorMessage = null;
this.auth.confirmNewPassword(this.email, value.verificationCode, value.password, this);
};
ForgotPasswordStep1Component.prototype.cognitoCallback = function (message) {
if (message != null) {
this.errorMessage = message;
toastr.error(this.errorMessage, 'Error!');
}
else {
toastr.success('Success !', 'Success');
this.router.navigate(['/login']);
}
};
ForgotPasswordStep1Component = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'awscognito-angular2-app',
template: __webpack_require__(/*! ./forgotPasswordStep2.html */ "./src/app/components/auth/forgot/forgotPasswordStep2.html")
}),
__metadata("design:paramtypes", [_angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"],
_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_services_auth_service__WEBPACK_IMPORTED_MODULE_2__["AuthService"],
_services_awsservices_authorization_service__WEBPACK_IMPORTED_MODULE_5__["AuthorizationService"],
_angular_http__WEBPACK_IMPORTED_MODULE_4__["Http"],
_angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"]])
], ForgotPasswordStep1Component);
return ForgotPasswordStep1Component;
}());
/***/ }),
/***/ "./src/app/components/auth/forgot/forgotPasswordStep2.html":
/*!*****************************************************************!*\
!*** ./src/app/components/auth/forgot/forgotPasswordStep2.html ***!
\*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n \r\n "
/***/ }),
/***/ "./src/app/components/auth/register/register.component.css":
/*!*****************************************************************!*\
!*** ./src/app/components/auth/register/register.component.css ***!
\*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/components/auth/register/register.component.html":
/*!******************************************************************!*\
!*** ./src/app/components/auth/register/register.component.html ***!
\******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/components/auth/register/register.component.ts":
/*!****************************************************************!*\
!*** ./src/app/components/auth/register/register.component.ts ***!
\****************************************************************/
/*! exports provided: RegisterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RegisterComponent", function() { return RegisterComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/http */ "./node_modules/@angular/http/fesm5/http.js");
/* harmony import */ var _services_awsservices_authorization_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/awsservices/authorization.service */ "./src/app/services/awsservices/authorization.service.ts");
/* harmony import */ var amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! amazon-cognito-identity-js */ "./node_modules/amazon-cognito-identity-js/es/index.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 PoolData = {
UserPoolId: 'us-east-2_eNfZzktKO',
ClientId: '367a1k5qlrr6vbvf2g3326ls4g' // Your client id here
};
var userPool = new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_5__["CognitoUserPool"](PoolData);
var RegisterComponent = /** @class */ (function () {
//user = { name:'' , email: '', password: '' , role: '' , status :'' };
function RegisterComponent(form, router, auth, http) {
this.form = form;
this.router = router;
this.auth = auth;
this.http = http;
// this.RegisterForm = form.group({
// 'name' : [null, Validators.required],
// 'email' : [null, Validators.required],
// 'password': [null, Validators.required],
// 'role': ['', Validators.required],
// 'status': ['', Validators.required],
// })
}
RegisterComponent.prototype.ngOnInit = function () {
if (this.router.url === '/admin/register') {
this.router.navigate(['/admin/initial']);
}
};
RegisterComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-register',
template: __webpack_require__(/*! ./register.component.html */ "./src/app/components/auth/register/register.component.html"),
styles: [__webpack_require__(/*! ./register.component.css */ "./src/app/components/auth/register/register.component.css")]
}),
__metadata("design:paramtypes", [_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_services_awsservices_authorization_service__WEBPACK_IMPORTED_MODULE_4__["AuthorizationService"],
_angular_http__WEBPACK_IMPORTED_MODULE_3__["Http"]])
], RegisterComponent);
return RegisterComponent;
}());
/***/ }),
/***/ "./src/app/components/chatbox/chatbox/chatbox.component.css":
/*!******************************************************************!*\
!*** ./src/app/components/chatbox/chatbox/chatbox.component.css ***!
\******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".back_btn {\r\n float: right;\r\n padding: 12px 0px;\r\n font-size: 20px;\r\n position: absolute;\r\n right: 0;\r\n top: 92px;\r\n margin-right: 9%;\r\n color: black;\r\n font-family: Roboto, 'Segoe UI', Tahoma, sans-serif;\r\n}\r\n#frame {\r\n width: 100%;\r\n padding: 5%;\r\n min-width: 360px;\r\n max-width: 1000px;\r\n height: 92vh;\r\n min-height: 300px;\r\n max-height: 720px;\r\n background: #E6EAEA;\r\n }\r\n@media screen and (max-width: 360px) {\r\n #frame {\r\n width: 100%;\r\n height: 100vh;\r\n }\r\n }\r\n#frame #sidepanel {\r\n float: left;\r\n min-width: 280px;\r\n max-width: 340px;\r\n width: 40%;\r\n height: 100%;\r\n background: #2c3e50;\r\n color: #f5f5f5;\r\n overflow: hidden;\r\n position: relative;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel {\r\n width: 58px;\r\n min-width: 58px;\r\n }\r\n }\r\n#frame #sidepanel #profile {\r\n width: 80%;\r\n margin: 25px auto;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile {\r\n width: 100%;\r\n margin: 0 auto;\r\n padding: 5px 0 0 0;\r\n background: #32465a;\r\n }\r\n }\r\n#frame #sidepanel #profile.expanded .wrap {\r\n height: 210px;\r\n line-height: initial;\r\n }\r\n#frame #sidepanel #profile.expanded .wrap p {\r\n margin-top: 20px;\r\n }\r\n#frame #sidepanel #profile.expanded .wrap i.expand-button {\r\n -webkit-transform: scaleY(-1);\r\n transform: scaleY(-1);\r\n -webkit-filter: FlipH;\r\n filter: FlipH;\r\n -ms-filter: \"FlipH\";\r\n }\r\n#frame #sidepanel #profile .wrap {\r\n height: 60px;\r\n line-height: 60px;\r\n overflow: hidden;\r\n transition: 0.3s height ease;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap {\r\n height: 55px;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap img {\r\n width: 60px;\r\n border-radius: 50%;\r\n padding: 3px;\r\n border: 2px solid #e74c3c;\r\n height: auto;\r\n float: left;\r\n cursor: pointer;\r\n transition: 0.3s border ease;\r\n height: 50px;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap img {\r\n width: 40px;\r\n margin-left: 4px;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap img.online {\r\n border: 2px solid #2ecc71;\r\n }\r\n#frame #sidepanel #profile .wrap img.away {\r\n border: 2px solid #f1c40f;\r\n }\r\n#frame #sidepanel #profile .wrap img.busy {\r\n border: 2px solid #e74c3c;\r\n }\r\n#frame #sidepanel #profile .wrap img.offline {\r\n border: 2px solid #95a5a6;\r\n }\r\n#frame #sidepanel #profile .wrap p {\r\n float: left;\r\n margin-left: 15px;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap p {\r\n display: none;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap i.expand-button {\r\n float: right;\r\n margin-top: 23px;\r\n font-size: 0.8em;\r\n cursor: pointer;\r\n color: #435f7a;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap i.expand-button {\r\n display: none;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap #status-options {\r\n position: absolute;\r\n opacity: 0;\r\n visibility: hidden;\r\n width: 150px;\r\n margin: 70px 0 0 0;\r\n border-radius: 6px;\r\n z-index: 99;\r\n line-height: initial;\r\n background: #435f7a;\r\n transition: 0.3s all ease;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options {\r\n width: 58px;\r\n margin-top: 57px;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap #status-options.active {\r\n opacity: 1;\r\n visibility: visible;\r\n margin: 75px 0 0 0;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options.active {\r\n margin-top: 62px;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap #status-options:before {\r\n content: '';\r\n position: absolute;\r\n width: 0;\r\n height: 0;\r\n border-left: 6px solid transparent;\r\n border-right: 6px solid transparent;\r\n border-bottom: 8px solid #435f7a;\r\n margin: -8px 0 0 24px;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options:before {\r\n margin-left: 23px;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul {\r\n overflow: hidden;\r\n border-radius: 6px;\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li {\r\n padding: 15px 0 30px 18px;\r\n display: block;\r\n cursor: pointer;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options ul li {\r\n padding: 15px 0 35px 22px;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li:hover {\r\n background: #496886;\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li span.status-circle {\r\n position: absolute;\r\n width: 10px;\r\n height: 10px;\r\n border-radius: 50%;\r\n margin: 5px 0 0 0;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options ul li span.status-circle {\r\n width: 14px;\r\n height: 14px;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li span.status-circle:before {\r\n content: '';\r\n position: absolute;\r\n width: 14px;\r\n height: 14px;\r\n margin: -3px 0 0 -3px;\r\n background: transparent;\r\n border-radius: 50%;\r\n z-index: 0;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options ul li span.status-circle:before {\r\n height: 18px;\r\n width: 18px;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li p {\r\n padding-left: 12px;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options ul li p {\r\n display: none;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li#status-online span.status-circle {\r\n background: #2ecc71;\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li#status-online.active span.status-circle:before {\r\n border: 1px solid #2ecc71;\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li#status-away span.status-circle {\r\n background: #f1c40f;\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li#status-away.active span.status-circle:before {\r\n border: 1px solid #f1c40f;\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li#status-busy span.status-circle {\r\n background: #e74c3c;\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li#status-busy.active span.status-circle:before {\r\n border: 1px solid #e74c3c;\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li#status-offline span.status-circle {\r\n background: #95a5a6;\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li#status-offline.active span.status-circle:before {\r\n border: 1px solid #95a5a6;\r\n }\r\n#frame #sidepanel #profile .wrap #expanded {\r\n padding: 100px 0 0 0;\r\n display: block;\r\n line-height: initial !important;\r\n }\r\n#frame #sidepanel #profile .wrap #expanded label {\r\n float: left;\r\n clear: both;\r\n margin: 0 8px 5px 0;\r\n padding: 5px 0;\r\n }\r\n#frame #sidepanel #profile .wrap #expanded input {\r\n border: none;\r\n margin-bottom: 6px;\r\n background: #32465a;\r\n border-radius: 3px;\r\n color: #f5f5f5;\r\n padding: 7px;\r\n width: calc(100% - 43px);\r\n }\r\n#frame #sidepanel #profile .wrap #expanded input:focus {\r\n outline: none;\r\n background: #435f7a;\r\n }\r\n#frame #sidepanel #search {\r\n border-top: 1px solid #32465a;\r\n border-bottom: 1px solid #32465a;\r\n font-weight: 300;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #search {\r\n display: none;\r\n }\r\n }\r\n#frame #sidepanel #search label {\r\n position: absolute;\r\n margin: 10px 0 0 20px;\r\n }\r\n#frame #sidepanel #search input {\r\n font-family: \"proxima-nova\", \"Source Sans Pro\", sans-serif;\r\n padding: 10px 0 10px 46px;\r\n width: calc(100% - 25px);\r\n border: none;\r\n background: #32465a;\r\n color: #f5f5f5;\r\n }\r\n#frame #sidepanel #search input:focus {\r\n outline: none;\r\n background: #435f7a;\r\n }\r\n#frame #sidepanel #search input::-webkit-input-placeholder {\r\n color: #f5f5f5;\r\n }\r\n#frame #sidepanel #search input::-moz-placeholder {\r\n color: #f5f5f5;\r\n }\r\n#frame #sidepanel #search input:-ms-input-placeholder {\r\n color: #f5f5f5;\r\n }\r\n#frame #sidepanel #search input:-moz-placeholder {\r\n color: #f5f5f5;\r\n }\r\n#frame #sidepanel #contacts {\r\n height: calc(100% - 177px);\r\n overflow-y: scroll;\r\n overflow-x: hidden;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #contacts {\r\n height: calc(100% - 149px);\r\n overflow-y: scroll;\r\n overflow-x: hidden;\r\n }\r\n #frame #sidepanel #contacts::-webkit-scrollbar {\r\n display: none;\r\n }\r\n }\r\n#frame #sidepanel #contacts.expanded {\r\n height: calc(100% - 334px);\r\n }\r\n#frame #sidepanel #contacts::-webkit-scrollbar {\r\n width: 8px;\r\n background: #2c3e50;\r\n }\r\n#frame #sidepanel #contacts::-webkit-scrollbar-thumb {\r\n background-color: #243140;\r\n }\r\n#frame #sidepanel #contacts ul li.contact {\r\n position: relative;\r\n padding: 10px 0 15px 0;\r\n font-size: 0.9em;\r\n cursor: pointer;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #contacts ul li.contact {\r\n padding: 6px 0 46px 8px;\r\n }\r\n }\r\n#frame #sidepanel #contacts ul li.contact:hover {\r\n background: #32465a;\r\n }\r\n#frame #sidepanel #contacts ul li.contact.active {\r\n background: #32465a;\r\n border-right: 5px solid #435f7a;\r\n }\r\n#frame #sidepanel #contacts ul li.contact.active span.contact-status {\r\n border: 2px solid #32465a !important;\r\n }\r\n#frame #sidepanel #contacts ul li.contact .wrap {\r\n width: 88%;\r\n margin: 0 auto;\r\n position: relative;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #contacts ul li.contact .wrap {\r\n width: 100%;\r\n }\r\n }\r\n#frame #sidepanel #contacts ul li.contact .wrap span {\r\n position: absolute;\r\n left: 0;\r\n margin: -2px 0 0 -2px;\r\n width: 10px;\r\n height: 10px;\r\n border-radius: 50%;\r\n border: 2px solid #2c3e50;\r\n background: #95a5a6;\r\n }\r\n#frame #sidepanel #contacts ul li.contact .wrap span.online {\r\n background: #2ecc71;\r\n }\r\n#frame #sidepanel #contacts ul li.contact .wrap span.away {\r\n background: #f1c40f;\r\n }\r\n#frame #sidepanel #contacts ul li.contact .wrap span.busy {\r\n background: #e74c3c;\r\n }\r\n#frame #sidepanel #contacts ul li.contact .wrap img {\r\n width: 40px;\r\n border-radius: 50%;\r\n float: left;\r\n margin-right: 10px;\r\n height: 40px;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #contacts ul li.contact .wrap img {\r\n margin-right: 0px;\r\n }\r\n }\r\n#frame #sidepanel #contacts ul li.contact .wrap .meta {\r\n padding: 5px 0 0 0;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #contacts ul li.contact .wrap .meta {\r\n display: none;\r\n }\r\n }\r\n#frame #sidepanel #contacts ul li.contact .wrap .meta .name {\r\n font-weight: 600;\r\n }\r\n#frame #sidepanel #contacts ul li.contact .wrap .meta .preview {\r\n margin: 5px 0 0 0;\r\n padding: 0 0 1px;\r\n font-weight: 400;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n transition: 1s all ease;\r\n }\r\n#frame #sidepanel #contacts ul li.contact .wrap .meta .preview span {\r\n position: initial;\r\n border-radius: initial;\r\n background: none;\r\n border: none;\r\n padding: 0 2px 0 0;\r\n margin: 0 0 0 1px;\r\n opacity: .5;\r\n }\r\n#frame #sidepanel #bottom-bar {\r\n position: absolute;\r\n width: 100%;\r\n bottom: 0;\r\n }\r\n#frame #sidepanel #bottom-bar button {\r\n float: left;\r\n border: none;\r\n width: 50%;\r\n padding: 10px 0;\r\n background: #32465a;\r\n color: #f5f5f5;\r\n cursor: pointer;\r\n font-size: 0.85em;\r\n font-family: \"proxima-nova\", \"Source Sans Pro\", sans-serif;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #bottom-bar button {\r\n float: none;\r\n width: 100%;\r\n padding: 15px 0;\r\n }\r\n }\r\n#frame #sidepanel #bottom-bar button:focus {\r\n outline: none;\r\n }\r\n#frame #sidepanel #bottom-bar button:nth-child(1) {\r\n border-right: 1px solid #2c3e50;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #bottom-bar button:nth-child(1) {\r\n border-right: none;\r\n border-bottom: 1px solid #2c3e50;\r\n }\r\n }\r\n#frame #sidepanel #bottom-bar button:hover {\r\n background: #435f7a;\r\n }\r\n#frame #sidepanel #bottom-bar button i {\r\n margin-right: 3px;\r\n font-size: 1em;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #bottom-bar button i {\r\n font-size: 1.3em;\r\n }\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #bottom-bar button span {\r\n display: none;\r\n }\r\n }\r\n#frame .content {\r\n float: right;\r\n width: 60%;\r\n height: 100%;\r\n overflow: hidden;\r\n position: relative;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame .content {\r\n width: calc(100% - 58px);\r\n /* min-width: 300px !important;*/\r\n }\r\n }\r\n@media screen and (min-width: 900px) {\r\n #frame .content {\r\n width: calc(100% - 340px);\r\n }\r\n }\r\n#frame .content .contact-profile {\r\n width: 100%;\r\n height: 60px;\r\n line-height: 60px;\r\n background: #f5f5f5;\r\n }\r\n#frame .content .contact-profile img {\r\n width: 40px;\r\n height: 40px;\r\n border-radius: 50%;\r\n float: left;\r\n margin: 9px 12px 0 9px;\r\n }\r\n#frame .content .contact-profile p {\r\n float: left;\r\n }\r\n#frame .content .contact-profile .social-media {\r\n float: right;\r\n }\r\n#frame .content .contact-profile .social-media i {\r\n margin-left: 14px;\r\n cursor: pointer;\r\n }\r\n#frame .content .contact-profile .social-media i:nth-last-child(1) {\r\n margin-right: 20px;\r\n }\r\n#frame .content .contact-profile .social-media i:hover {\r\n color: #435f7a;\r\n }\r\n#frame .content .messages {\r\n height: auto;\r\n min-height: calc(100% - 93px);\r\n max-height: calc(100% - 93px);\r\n overflow-y: scroll;\r\n overflow-x: hidden;\r\n width: 100%;\r\n float: left;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame .content .messages {\r\n max-height: calc(100% - 105px);\r\n }\r\n }\r\n#frame .content .messages::-webkit-scrollbar {\r\n width: 8px;\r\n background: transparent;\r\n }\r\n#frame .content .messages::-webkit-scrollbar-thumb {\r\n background-color: rgba(0, 0, 0, 0.3);\r\n }\r\n#frame .content .messages ul li {\r\n display: inline-block;\r\n clear: both;\r\n float: left;\r\n margin: 15px 15px 5px 15px;\r\n width: calc(100% - 25px);\r\n font-size: 0.9em;\r\n }\r\n#frame .content .messages ul li:nth-last-child(1) {\r\n margin-bottom: 20px;\r\n }\r\n#frame .content .messages ul li.sent img {\r\n margin: 6px 8px 0 0;\r\n }\r\n#frame .content .messages ul li.sent p {\r\n background: #435f7a;\r\n color: #f5f5f5;\r\n }\r\n#frame .content .messages ul li.replies img {\r\n float: right;\r\n margin: 6px 0 0 8px;\r\n }\r\n#frame .content .messages ul li.replies p {\r\n background: #f5f5f5;\r\n float: right;\r\n }\r\n#frame .content .messages ul li img {\r\n width: 28px;\r\n border-radius: 50%;\r\n height: 28px;\r\n float: left;\r\n }\r\n#frame .content .messages ul li p {\r\n display: inline-block;\r\n padding: 10px 15px;\r\n border-radius: 20px;\r\n max-width: 205px;\r\n line-height: 130%;\r\n }\r\n@media screen and (min-width: 735px) {\r\n #frame .content .messages ul li p {\r\n max-width: 300px;\r\n }\r\n }\r\n#frame .content .message-input {\r\n position: absolute;\r\n bottom: 0;\r\n width: 100%;\r\n z-index: 99;\r\n }\r\n#frame .content .message-input .wrap {\r\n position: relative;\r\n }\r\n#frame .content .message-input .wrap input {\r\n font-family: \"proxima-nova\", \"Source Sans Pro\", sans-serif;\r\n float: left;\r\n border: none;\r\n width: calc(100% - 90px);\r\n padding: 11px 32px 10px 8px;\r\n font-size: 0.8em;\r\n color: #32465a;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame .content .message-input .wrap input {\r\n padding: 15px 32px 16px 8px;\r\n }\r\n }\r\n#frame .content .message-input .wrap input:focus {\r\n outline: none;\r\n }\r\n#frame .content .message-input .wrap .attachment {\r\n position: absolute;\r\n right: 60px;\r\n z-index: 4;\r\n margin-top: 10px;\r\n font-size: 1.1em;\r\n color: #435f7a;\r\n opacity: .5;\r\n cursor: pointer;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame .content .message-input .wrap .attachment {\r\n margin-top: 17px;\r\n right: 65px;\r\n }\r\n }\r\n#frame .content .message-input .wrap .attachment:hover {\r\n opacity: 1;\r\n }\r\n#frame .content .message-input .wrap button {\r\n float: right;\r\n border: none;\r\n width: 50px;\r\n padding: 12px 0;\r\n cursor: pointer;\r\n background: #32465a;\r\n color: #f5f5f5;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame .content .message-input .wrap button {\r\n padding: 16px 0;\r\n }\r\n }\r\n#frame .content .message-input .wrap button:hover {\r\n background: #435f7a;\r\n }\r\n#frame .content .message-input .wrap button:focus {\r\n outline: none;\r\n }"
/***/ }),
/***/ "./src/app/components/chatbox/chatbox/chatbox.component.html":
/*!*******************************************************************!*\
!*** ./src/app/components/chatbox/chatbox/chatbox.component.html ***!
\*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Organisational Effectiveness Scorecard \r\n
\r\n
\r\n
\r\n \r\n Further Action Required \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
{{userName}} {{LastuserName}}
\r\n
\r\n
\r\n
\r\n \r\n \r\n Online
\r\n \r\n \r\n \r\n Away
\r\n \r\n \r\n \r\n Busy
\r\n \r\n \r\n \r\n Offline
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
"
/***/ }),
/***/ "./src/app/components/chatbox/chatbox/chatbox.component.ts":
/*!*****************************************************************!*\
!*** ./src/app/components/chatbox/chatbox/chatbox.component.ts ***!
\*****************************************************************/
/*! exports provided: ChatboxComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChatboxComponent", function() { return ChatboxComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! aws-sdk/clients/s3 */ "./node_modules/aws-sdk/clients/s3.js");
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_6__);
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 ChatboxComponent = /** @class */ (function () {
function ChatboxComponent(router, message, cognitoUtil, common) {
this.router = router;
this.message = message;
this.cognitoUtil = cognitoUtil;
this.common = common;
this.title = 'Support';
this.url = window.location.href;
this.result = this.url.split('/');
this.lastAttribute = this.result[this.result.length - 1];
this.Param = this.result[this.result.length - 2];
this.month = this.result[this.result.length - 3];
this.Nagtive = this.result[this.result.length - 4];
this.userRole = localStorage.getItem('custom:user_role');
this.userName = localStorage.getItem('custom:first_name');
this.LastuserName = localStorage.getItem('custom:last_name');
this.profile = localStorage.getItem('profile');
this.user = this.cognitoUtil.getCurrentUser();
this.userList = [];
this.FOLDER = 'assets/MessageReport';
this.currentTime = new Date();
this.fullTime = this.currentTime.getTime();
this.ResultData = [];
this.days_arr = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
this.fullyear = this.currentTime.getFullYear();
this.getMonth = this.currentTime.getMonth();
this.getDate = this.currentTime.getDate();
this.getHours = this.currentTime.getHours();
this.getMinutes = this.currentTime.getMinutes();
this.getDay = this.days_arr[this.currentTime.getDay()];
this.Newarray = [];
this.PdfDocument = [];
this.AdminChatForm = message.group({
'directorid': this.user['username'],
'queryToID': '',
'query': ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
});
}
ChatboxComponent.prototype.ngOnInit = function () {
if (sessionStorage.getItem('token')) {
this.getTilesName();
this.GetUser();
if (this.lastAttribute == 'chat') {
if (this.userId != null || this.userId != '') {
// this.timer = setInterval(() => {
// this.getMessageData();
// }, 5000);
// this.getMessageData();
}
else {
}
//this.getMessageData();
}
}
else {
this.router.navigateByUrl('/login');
}
};
ChatboxComponent.prototype.ngOnDestroy = function () {
if (this.timer) {
clearInterval(this.timer);
}
};
ChatboxComponent.prototype.gotoback = function () {
this.router.navigate(['/admin/' + this.Nagtive + '/' + this.month + '/' + this.Param]);
};
// function for get manco user by id
ChatboxComponent.prototype.GetUser = function () {
var _this = this;
var data = {
action: 'manoco_user_detail_hodside',
role: 'manco user'
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var ResData = JSON.parse(response._body);
var res = JSON.parse(ResData.body);
if (res.status == '200') {
_this.userList = res.data;
}
else {
}
});
};
// function for user message
ChatboxComponent.prototype.UserMessages = function (value) {
var _this = this;
$('.contact').removeClass('active');
$('#' + value['sanlamuserid']).addClass('active');
this.username = value['firstname'] + ' ' + value['lastname'];
if (value['profile'] != null && value['profile'] != '') {
this.userProfile = value['profile'];
}
else {
this.userProfile = 'assets/images/3x.png';
}
this.userId = value['username'];
this.UserRole = value['role'];
this.AdminChatForm.controls['queryToID'].setValue(value['username']);
this.getMessageData();
clearInterval(this.timer);
this.timer = setInterval(function () {
_this.getMessageData();
}, 10000);
var div = document.getElementById('messages');
div.scrollTop = div.scrollHeight;
};
ChatboxComponent.prototype.fileEvent = function (event) {
var _this = this;
this.selectFIles = event.target.files[0];
var bucket = new aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_6__({
accessKeyId: _environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].accessKeyId,
secretAccessKey: _environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].secretAccessKey,
region: _environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].S3region
});
var params = {
Bucket: 'sanlamapp-website',
Key: this.FOLDER + new Date().getTime() + '_' + this.selectFIles.name,
Body: this.selectFIles
};
bucket.upload(params, function (err, data) {
if (err) {
_this.errorMessage = err;
}
_this.imageFile = data['Location'];
var d = new Date();
var n = d.getTime();
var DocumentData = {
action: 'actionPointQuery',
queryId: '',
queryFrom: _this.userRole,
queryFromID: _this.user['username'],
queryTo: _this.UserRole,
//queryToID: this.SanlamUsername,
query: '',
tile_name: _this.titleName,
month: _this.month,
year: _this.Param,
'to_from_id': _this.userId + '|' + _this.user['username'],
userid: _this.user['username'],
document_name: _this.selectFIles.name,
document_link: _this.imageFile
};
_this.common.saveFundRiskData(DocumentData)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(response.body);
});
});
};
ChatboxComponent.prototype.SendMessage = function (value) {
var _this = this;
var data = value;
data['action'] = 'actionPointQuery'; // Action for message
data['queryId'] = ''; // Message Id
data['queryFrom'] = this.userRole; // Send role
data['queryFromID'] = this.user['username']; // send id
data['queryTo'] = this.UserRole; // Recevied message form user role and name
//data['queryToID'] = '06ec41f2-5d16-4d35-9c7f-c9f0638d897c'; //// Recevied message form user id
data['tile_name'] = this.titleName; // current tiles name
data['month'] = this.month; // title month
data['year'] = this.Param; // title year
data['created_at'] = this.fullTime; // current time
data['updated_at'] = this.fullTime; // current time
data['userid'] = this.user['username']; // director id
data['to_from_id'] = this.userId + '|' + this.user['username'];
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var ResData = JSON.parse(response._body);
var res = JSON.parse(ResData.body);
if (res.status == '200') {
var div = document.getElementById('messages');
var newHeight = div.scrollHeight + 81;
div.scrollTop = newHeight;
_this.AdminChatForm.controls['query'].setValue('');
_this.ResultData = res.data;
}
else {
toastr.error(res.message);
}
}, function (error) { console.log(error); });
};
ChatboxComponent.prototype.getTilesName = function () {
if (this.Nagtive == 'RegulatoryMonths') {
this.titleName = 'Regulatory Compliance';
}
else if (this.Nagtive == 'FundRiskMonths') {
this.titleName = 'Fund-Risk';
}
else if (this.Nagtive == 'OperationalRiskMonths') {
this.titleName = 'Operational Risk';
}
else if (this.Nagtive == 'CapitalFinancialMonths') {
this.titleName = 'Capital and Financial';
}
else if (this.Nagtive == 'InternalAuditMonths') {
this.titleName = 'Internal Audit';
}
else if (this.Nagtive == 'InvestmentmanagementMonths') {
this.titleName = 'Investment Management';
}
else if (this.Nagtive == 'ResourcingMonths') {
this.titleName = 'Resourcing';
}
else if (this.Nagtive == 'OrganisationMonths') {
this.titleName = 'Organisational Effectiveness';
}
else if (this.Nagtive == 'DistributionMonths') {
this.titleName = 'Distribution';
}
};
ChatboxComponent.prototype.getMessageData = function () {
var _this = this;
var data = {
'action': 'getDirectorActionQuery',
'tile_name': this.titleName,
'month': this.month,
'year': this.Param,
'directorid': this.user['username'],
'userid': this.user['username'],
'to_from_id': this.userId + '|' + this.user['username']
};
this.common.GetUserdataBYheaders(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
var count = res.data.length;
_this.ResultData = res.data;
}
else {
}
});
};
ChatboxComponent.prototype.DownloadChat = function () {
var _this = this;
this.Newarray = [];
var data = {
'action': 'getDirectorActionQuery',
'tile_name': this.titleName,
'month': this.month,
'year': this.Param,
'directorid': this.user['username'],
'userid': this.user['username'],
'to_from_id': this.userId + '|' + this.user['username']
};
this.common.GetUserdataBYheaders(data)
.subscribe(function (response) {
var resData = JSON.parse(response.body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
var count = res.data.length;
_this.ResultData = res.data;
var months_arr = ['Jan', 'Feb', 'March', 'April', 'May', 'June', 'July', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var days_arr = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
for (var i = 0; i < res.data.length; i++) {
var date = new Date(res.data[i]['created_at'] * 1);
var year = date.getFullYear();
var dates = date.getDate();
var day = days_arr[date.getDay()];
var month = months_arr[date.getMonth()];
var hours = date.toLocaleTimeString();
var minutes = date.getMinutes();
var time = day + ',' + dates + '/' + month + '/' + year + ', ' + hours;
if (res.data[i].queryFrom == _this.userRole) {
var from = _this.userName + _this.LastuserName + ' (' + res.data[i].queryFrom + ')';
var to = _this.username + ' (' + res.data[i].queryTo + ')';
var query = res.data[i].query;
_this.Newarray.push([
dates + '/' + month + '/' + year + ', ' + hours, from, to, query
]);
}
else if (res.data[i].queryTo == _this.userRole) {
var from = _this.username + ' (' + res.data[i].queryFrom + ')';
var to = _this.userName + _this.LastuserName + ' (' + res.data[i].queryTo + ')';
var query = res.data[i].query;
_this.Newarray.push([
dates + '/' + month + '/' + year + ', ' + hours, from, to, query
]);
}
}
var columns = ['Date', 'From', 'To', 'Message'];
var rows = _this.Newarray;
var doc = new jsPDF('p', 'pt');
doc.setFontSize(20);
doc.text(30, 30, _this.username + ' ' + _this.titleName + ' ' + _this.month + ' ' + _this.Param);
doc.autoTable(columns, rows, {
columnStyles: {
0: { columnWidth: 150 },
1: { columnWidth: 90, overflow: 'linebreak' },
2: { columnWidth: 90, overflow: 'linebreak' },
3: { overflow: 'linebreak' },
},
margin: { top: 50, left: 20, right: 20, bottom: 0 },
drawHeaderCell: function (cell, data) {
if (cell.raw === 'Date') {
cell.styles.fontSize = 15;
cell.styles.textColor = [255, 0, 0];
}
else {
cell.styles.textColor = 255;
cell.styles.fontSize = 10;
}
},
createdCell: function (cell, data) {
}
});
doc.save(_this.username + '.pdf');
}
else if (res.status == '200') {
}
});
};
ChatboxComponent.prototype.SendShareImage = function (event) {
document.getElementById('my_file').click();
};
ChatboxComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-chatbox',
template: __webpack_require__(/*! ./chatbox.component.html */ "./src/app/components/chatbox/chatbox/chatbox.component.html"),
styles: [__webpack_require__(/*! ./chatbox.component.css */ "./src/app/components/chatbox/chatbox/chatbox.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_4__["CognitoUtil"],
_services_common_service__WEBPACK_IMPORTED_MODULE_2__["CommonService"]])
], ChatboxComponent);
return ChatboxComponent;
}());
/***/ }),
/***/ "./src/app/components/dashboard/dashboard.component.css":
/*!**************************************************************!*\
!*** ./src/app/components/dashboard/dashboard.component.css ***!
\**************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "/* .tab_inner ul {\r\n width: max-content !important; \r\n}\r\n\r\n.tab_inner {\r\n overflow-x: scroll !important;\r\n} */\r\n.month_box{\r\n cursor:pointer;\r\n}\r\n.color_discription {\r\n float: left;\r\n width: 100%;\r\n background-color: #ffffff;\r\n padding: 20px;\r\n}"
/***/ }),
/***/ "./src/app/components/dashboard/dashboard.component.html":
/*!***************************************************************!*\
!*** ./src/app/components/dashboard/dashboard.component.html ***!
\***************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n Status Panel\r\n \r\n
\r\n
\r\n
\r\n \r\n
{{blueColorCount.length}} Month(s) being prepared for review.
\r\n
\r\n
\r\n
{{orangeColorCount.length}} Months(s) available for review
\r\n
\r\n
\r\n \r\n
{{PurpleColorCount.length + blueColorCount.length + orangeColorCount.length }}\r\n Month in progress.
\r\n
\r\n
\r\n
\r\n
\r\n Comments\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{Data.queryFromUser}}\r\n \r\n
{{Data.time | date:'fullDate'}} {{Data.time | date:'h:mm a'}} \r\n
Tiles : {{Data.tile_name}}\r\n Month :{{Data.month}}\r\n Year : {{Data.year}} \r\n
{{Data.query}}
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
No Comment's found
\r\n
\r\n
\r\n \r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
{{ monthsss.name }} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n Grey Colour \r\n Inactive Months \r\n \r\n \r\n Blue Colour \r\n Currently being updated by Manco User \r\n \r\n \r\n Purple Colour \r\n Needs to be reviewed by director \r\n \r\n \r\n Orange Colour \r\n Needs to be reviewed by all directors or follow up from Manco\r\n User. \r\n \r\n \r\n \r\n Green Colour\r\n \r\n Reviewed and closed \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
"
/***/ }),
/***/ "./src/app/components/dashboard/dashboard.component.ts":
/*!*************************************************************!*\
!*** ./src/app/components/dashboard/dashboard.component.ts ***!
\*************************************************************/
/*! exports provided: DashboardComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DashboardComponent", function() { return DashboardComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _model_mothdetails__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../model/mothdetails */ "./src/app/model/mothdetails.ts");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js");
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var ngx_spinner__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ngx-spinner */ "./node_modules/ngx-spinner/fesm5/ngx-spinner.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 __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var DashboardComponent = /** @class */ (function () {
function DashboardComponent(router, common, spinner) {
this.router = router;
this.common = common;
this.spinner = spinner;
this.heroes = _model_mothdetails__WEBPACK_IMPORTED_MODULE_2__["Monthdetails"];
this.title = 'Dashboard';
this.MonthList = [];
this.Monthdetails = new _model_mothdetails__WEBPACK_IMPORTED_MODULE_2__["Monthdetails"]();
this.yearsData = [];
this.years = new Date();
this.currentyears = this.years.getFullYear();
this.currentMonth = new Date().getMonth();
this.userdeatails = [];
this.bool = true;
this.orangeColorCount = [];
this.blueColorCount = [];
this.PurpleColorCount = [];
this.monthNames = [
{ 'id': '1', 'name': 'January' },
{ 'id': '2', 'name': 'February' },
{ 'id': '3', 'name': 'March' },
{ 'id': '4', 'name': 'April' },
{ 'id': '5', 'name': 'May' },
{ 'id': '6', 'name': 'June' },
{ 'id': '7', 'name': 'July' },
{ 'id': '8', 'name': 'August' },
{ 'id': '9', 'name': 'September' },
{ 'id': '10', 'name': 'October' },
{ 'id': '11', 'name': 'November' },
{ 'id': '12', 'name': 'December' }
];
this.timestamp = 1495777991000;
this.commentData = [];
if (sessionStorage.getItem('token') != null || sessionStorage.getItem('token') != '') {
this.year();
}
else {
this.router.navigateByUrl('/login');
}
}
DashboardComponent.prototype.ngOnInit = function () {
this.GetAllData(this.currentyears);
// setTimeout(function () {
// $('#years2020').attr('disabled', 'disabled');
// $('#year2020').css('pointerEvents', 'none');
// }, 2000);
if (this.currentyears == 2018) {
setTimeout(function () {
document.getElementById('month_box1').style.pointerEvents = 'none';
document.getElementById('month_box2').style.pointerEvents = 'none';
document.getElementById('month_box3').style.pointerEvents = 'none';
document.getElementById('month_box4').style.pointerEvents = 'none';
document.getElementById('month_box5').style.pointerEvents = 'none';
document.getElementById('month_box6').style.pointerEvents = 'none';
}, 2000);
}
};
DashboardComponent.prototype.year = function () {
for (var i = 2018; i <= new Date().getFullYear(); i++) {
this.yearsData.push(i);
}
};
DashboardComponent.prototype.getDetailsBYmonth = function (value) {
if (this.currentyears == this.yearS) {
if (localStorage.getItem('custom:user_role') == 'manco user') {
if (document.getElementById('month_box' + value).className != 'month_box green_month_box') {
this.Monthdetails.month = value;
this.router.navigate(['/admin/RegulatoryMonths/' + value + '/' + this.yearS]);
}
}
else {
this.Monthdetails.month = value;
this.router.navigate(['/admin/RegulatoryMonths/' + value + '/' + this.yearS]);
}
}
else {
if (document.getElementById('month_box' + value).style.pointerEvents != 'none') {
if (localStorage.getItem('custom:user_role') == 'manco user') {
if (document.getElementById('month_box' + value).className != 'month_box green_month_box') {
this.Monthdetails.month = value;
this.router.navigate(['/admin/RegulatoryMonths/' + value + '/' + this.yearS]);
}
}
else {
this.Monthdetails.month = value;
this.router.navigate(['/admin/RegulatoryMonths/' + value + '/' + this.yearS]);
}
}
}
};
DashboardComponent.prototype.GetAllData = function (YearValue) {
return __awaiter(this, void 0, void 0, function () {
var _this = this;
var thisMonth, data;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
// this.spinner.show();
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').removeClass('orange_month_box');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').removeClass('purple_month_box');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').removeClass('green_month_box');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').removeClass('blue_month_box');
jquery__WEBPACK_IMPORTED_MODULE_4__('.left_icon').html('');
jquery__WEBPACK_IMPORTED_MODULE_4__('.rigth_icon').html('');
thisMonth = new Date().getMonth() + 1;
this.orangeColorCount = [];
this.blueColorCount = [];
this.commentData = [];
this.PurpleColorCount = [];
this.yearS = YearValue;
this.Monthdetails.year = YearValue;
data = [
{ 'action': 'getTilesStatus', 'year': YearValue },
{ 'action': 'getalluser' },
{ 'action': 'getLatestComment' }
];
return [4 /*yield*/, this.common.requestDataFromMultipleSources(data).subscribe(function (response) {
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').removeClass('orange_month_box');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').removeClass('purple_month_box');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').removeClass('green_month_box');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').removeClass('blue_month_box');
jquery__WEBPACK_IMPORTED_MODULE_4__('.left_icon').html('');
jquery__WEBPACK_IMPORTED_MODULE_4__('.rigth_icon').html('');
var Response1 = JSON.parse(response[0]._body);
var Response2 = JSON.parse(response[1]._body);
var Response3 = JSON.parse(response[2]._body);
var Calanderdata = JSON.parse(Response1.body);
// console.log(Calanderdata)
var UserListData = JSON.parse(Response2.body);
var QueryData = JSON.parse(Response3.body);
var userInfo;
_this.orangeColorCount = [];
_this.blueColorCount = [];
_this.commentData = [];
_this.PurpleColorCount = [];
var _loop_1 = function (i) {
userInfo = UserListData.data.filter(function (user) {
return user.username == QueryData.data[i].queryFromID;
});
if (userInfo.length > 0) {
_this.commentData.push({
'time': QueryData.data[i]['created_at'],
'queryFromUser': userInfo[0]['firstname'] + ' ' + userInfo[0]['lastname'],
'queryFrom': QueryData.data[i].queryFrom,
'query': QueryData.data[i].query,
'tile_name': QueryData.data[i].tile_name,
'month': QueryData.data[i].month,
'year': QueryData.data[i].year,
});
}
};
for (var i = 0; i < QueryData.data.length; i++) {
_loop_1(i);
}
// console.log(Calanderdata)
if (Calanderdata.data.length > 0) {
console.log("Data here");
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').css('pointerEvents', 'auto');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').css('cursor', 'pointer');
for (var i = 0; i < Calanderdata.data.length; i++) {
var id = Calanderdata.data[i].month;
var strID = '#month_box' + id;
if (Calanderdata.data[i].user_review == "true" && Calanderdata.data[i].director_review == "true" && Calanderdata.data[i].ined_director_review == "true") {
jquery__WEBPACK_IMPORTED_MODULE_4__(strID).addClass('green_month_box');
_this.PurpleColorCount.push(Calanderdata.data[i]);
jquery__WEBPACK_IMPORTED_MODULE_4__(strID + ' .rigth_icon').html('
');
_this.color = "green";
}
else if (Calanderdata.data[i].user_review == "false" && Calanderdata.data[i].director_review == "false" && Calanderdata.data[i].ined_director_review == "false") {
jquery__WEBPACK_IMPORTED_MODULE_4__(strID).addClass('blue_month_box');
_this.blueColorCount.push(Calanderdata.data[i]);
jquery__WEBPACK_IMPORTED_MODULE_4__(strID + ' .rigth_icon').html('
');
_this.color = "blue";
}
else if (Calanderdata.data[i].user_review == "true" && Calanderdata.data[i].director_review == "false" && Calanderdata.data[i].ined_director_review == "false") {
_this.orangeColorCount.push(Calanderdata.data[i]);
jquery__WEBPACK_IMPORTED_MODULE_4__(strID).addClass('purple_month_box');
jquery__WEBPACK_IMPORTED_MODULE_4__(strID + ' .rigth_icon').html('
');
_this.color = "purple";
}
else if (Calanderdata.data[i].user_review == "true" && Calanderdata.data[i].director_review == "true" && Calanderdata.data[i].ined_director_review == "false") {
jquery__WEBPACK_IMPORTED_MODULE_4__(strID).addClass('orange_month_box');
_this.orangeColorCount.push(Calanderdata.data[i]);
jquery__WEBPACK_IMPORTED_MODULE_4__(strID + ' .rigth_icon').html('
');
jquery__WEBPACK_IMPORTED_MODULE_4__(strID + ' .left_icon').html('
');
_this.color = "orange";
}
else if (Calanderdata.data[i].user_review == "true" && Calanderdata.data[i].director_review == "false" && Calanderdata.data[i].ined_director_review == "true") {
jquery__WEBPACK_IMPORTED_MODULE_4__(strID).addClass('orange_month_box');
_this.orangeColorCount.push(Calanderdata.data[i]);
jquery__WEBPACK_IMPORTED_MODULE_4__(strID + ' .rigth_icon').html('
');
jquery__WEBPACK_IMPORTED_MODULE_4__(strID + ' .left_icon').html('
');
_this.color = "orange";
}
else if (Calanderdata.data[i].user_review == "false" && Calanderdata.data[i].director_review == "true" && Calanderdata.data[i].ined_director_review == "true") {
jquery__WEBPACK_IMPORTED_MODULE_4__(strID).addClass('orange_month_box');
_this.orangeColorCount.push(Calanderdata.data[i]);
jquery__WEBPACK_IMPORTED_MODULE_4__(strID + ' .rigth_icon').html('
');
jquery__WEBPACK_IMPORTED_MODULE_4__(strID + ' .left_icon').html('
');
_this.color = "orange";
}
else if (Calanderdata.data[i].user_review == "false" && Calanderdata.data[i].director_review == "true" && Calanderdata.data[i].ined_director_review == "false") {
jquery__WEBPACK_IMPORTED_MODULE_4__(strID).addClass('orange_month_box');
_this.orangeColorCount.push(Calanderdata.data[i]);
jquery__WEBPACK_IMPORTED_MODULE_4__(strID + ' .rigth_icon').html('
');
jquery__WEBPACK_IMPORTED_MODULE_4__(strID + ' .left_icon').html('
');
}
else if (Calanderdata.data[i].user_review == "false" && Calanderdata.data[i].director_review == "false" && Calanderdata.data[i].ined_director_review == "true") {
jquery__WEBPACK_IMPORTED_MODULE_4__(strID).addClass('orange_month_box');
_this.orangeColorCount.push(Calanderdata.data[i]);
jquery__WEBPACK_IMPORTED_MODULE_4__(strID + ' .rigth_icon').html('
');
jquery__WEBPACK_IMPORTED_MODULE_4__(strID + ' .left_icon').html('
');
}
else {
jquery__WEBPACK_IMPORTED_MODULE_4__('#month_box').css('border', '2px solid blue');
}
if (YearValue == '2018') {
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').css('border', '2px solid #9d9d9d');
for (var month = 0; month <= _this.monthNames.length; month++) {
if (month >= 7) {
jquery__WEBPACK_IMPORTED_MODULE_4__('#month_box' + month).css('border', '2px solid blue');
jquery__WEBPACK_IMPORTED_MODULE_4__('#month_box' + month).css('pointerEvents', 'auto');
jquery__WEBPACK_IMPORTED_MODULE_4__('#month_box' + month).css('cursor', 'pointer');
}
else {
jquery__WEBPACK_IMPORTED_MODULE_4__('#month_box' + month).css('border', '2px solid #9d9d9d');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').css('pointerEvents', 'none');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').css('cursor', 'none');
}
}
}
else {
// $('.month_box').css('border', '2px solid #9d9d9d');
// $('.month_box').css('pointerEvents', 'none');
// $('.month_box').css('cursor', 'none');
for (var month = 1; month <= thisMonth; month++) {
jquery__WEBPACK_IMPORTED_MODULE_4__('#month_box' + month).css('border', '2px solid blue');
jquery__WEBPACK_IMPORTED_MODULE_4__('#month_box' + month).css('pointerEvents', 'auto');
jquery__WEBPACK_IMPORTED_MODULE_4__('#month_box' + month).css('cursor', 'pointer');
}
}
}
}
else {
console.log("no data");
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').removeClass('orange_month_box');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').removeClass('purple_month_box');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').removeClass('green_month_box');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').removeClass('blue_month_box');
jquery__WEBPACK_IMPORTED_MODULE_4__('.left_icon').html('');
jquery__WEBPACK_IMPORTED_MODULE_4__('.rigth_icon').html('');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').css('pointerEvents', 'none');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').css('cursor', 'none');
if (YearValue == new Date().getFullYear()) {
// $('.month_box').css('border', '2px solid #9d9d9d');
for (var month = 1; month <= thisMonth; month++) {
// alert("'it's working");
jquery__WEBPACK_IMPORTED_MODULE_4__('#month_box' + month).css('border', '2px solid blue');
jquery__WEBPACK_IMPORTED_MODULE_4__('#month_box' + month).css('pointerEvents', 'auto');
jquery__WEBPACK_IMPORTED_MODULE_4__('#month_box' + month).css('cursor', 'pointer');
}
}
else if (YearValue == '2018') {
for (var month = 0; month <= _this.monthNames.length; month++) {
if (month >= 7) {
jquery__WEBPACK_IMPORTED_MODULE_4__('#month_box' + month).css('border', '2px solid blue');
jquery__WEBPACK_IMPORTED_MODULE_4__('#month_box' + month).css('pointerEvents', 'auto');
jquery__WEBPACK_IMPORTED_MODULE_4__('#month_box' + month).css('cursor', 'pointer');
}
else {
jquery__WEBPACK_IMPORTED_MODULE_4__('#month_box' + month).css('border', '2px solid #9d9d9d');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').css('pointerEvents', 'none');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').css('cursor', 'none');
}
}
}
else if (YearValue == '2019' || YearValue == '2020') {
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').css('border', '2px solid blue');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').css('pointerEvents', 'auto');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').css('cursor', 'pointer');
}
else {
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').css('border', '2px solid #9d9d9d');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').css('border', '2px solid #9d9d9d');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').css('pointerEvents', 'none');
jquery__WEBPACK_IMPORTED_MODULE_4__('.month_box').css('cursor', 'none');
}
}
}, function (error) {
_this.GetAllData(_this.yearS);
})];
case 1:
_a.sent();
return [2 /*return*/];
}
});
});
};
DashboardComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-dashboard',
template: __webpack_require__(/*! ./dashboard.component.html */ "./src/app/components/dashboard/dashboard.component.html"),
styles: [__webpack_require__(/*! ./dashboard.component.css */ "./src/app/components/dashboard/dashboard.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_services_common_service__WEBPACK_IMPORTED_MODULE_3__["CommonService"],
ngx_spinner__WEBPACK_IMPORTED_MODULE_5__["NgxSpinnerService"]])
], DashboardComponent);
return DashboardComponent;
}());
/***/ }),
/***/ "./src/app/components/dashboard/initial/initial.component.css":
/*!********************************************************************!*\
!*** ./src/app/components/dashboard/initial/initial.component.css ***!
\********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".last-login {\r\n float: right !important;\r\n color: #000;\r\n font-weight: bold;\r\n padding: 15px 0px;\r\n}\r\n.table-hover {\r\n border: 1px solid;\r\n background-color: #fff;\r\n display: table;\r\n margin: 0 auto;\r\n padding: 10px;\r\n border-color: #008AD1;\r\n}\r\n.display .display_inner {\r\n border: 1px solid;\r\n border-color: #008AD1;\r\n text-align: center;\r\n padding: 10px 10px;\r\n background-color: #008AD1;\r\n cursor: pointer;\r\n color: #fff;\r\n font-size: 18px;\r\n}\r\n.t_head .display_head {\r\n border: 1px solid;\r\n border-color: #008AD1;\r\n text-align: center;\r\n padding: 10px 10px;\r\n background-color: #fff;\r\n color: #008AD1;\r\n font-weight: 600;\r\n font-size: 20px;\r\n}\r\n.display .display_inner:hover {\r\n background-color: #fff;\r\n color:#008AD1;\r\n box-shadow: 1px 1px 11px 0px #008AD1;\r\n border-color: #008AD1;\r\n}\r\n.display{ padding: 10px; }\r\n*, :after, :before {\r\n box-sizing: unset !important;\r\n}\r\na.routerLink {\r\n color: #fff;\r\n text-decoration: none; \r\n}\r\n.display_inner:hover a {\r\n color: #008AD1;\r\n}\r\n@media only screen and (max-width: 1199px){\r\n}\r\n@media (min-width: 979px) and (max-width: 1199px) {\r\n}\r\n@media only screen and (max-width: 979px){\r\n}\r\n@media (min-width: 768px) and (max-width: 979px) {}\r\n@media only screen and (max-width: 767px){\r\ndiv.table.table-hover {width: 45%;}\r\n}\r\n@media only screen and (max-width: 640px){\r\ndiv.table.table-hover {width: 50%;}\r\n}\r\n@media only screen and (max-width: 480px){ \r\ndiv.table.table-hover {width: 60%;}\r\n}\r\n@media only screen and (max-width: 360px){\r\ndiv.table.table-hover {width: 70%;}\r\n}\r\n@media only screen and (max-width: 320px){\r\ndiv.table.table-hover {width: 80%;}\r\n}\r\n@media only screen and (max-width: 650px){}\r\n"
/***/ }),
/***/ "./src/app/components/dashboard/initial/initial.component.html":
/*!*********************************************************************!*\
!*** ./src/app/components/dashboard/initial/initial.component.html ***!
\*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Last Login : {{seconds | date:'fullDate'}} {{seconds | date:'h:mm a'}}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
What would like to do?
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n View Org. Effectiveness\r\n Reporting\r\n
\r\n
\r\n \r\n \r\n
\r\n
Log a breach or error
\r\n
\r\n
\r\n
\r\n \r\n
PA Share dealing and\r\n Gratification reporting\r\n
\r\n
\r\n \r\n \r\n\r\n
\r\n \r\n
\r\n \r\n Monitoring Investment Managers\r\n
\r\n \r\n
\r\n
\r\n
Due Diligence Tracker
\r\n
\r\n
\r\n
Conflicts of Interest\r\n Register\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
Factsheet Management
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
Distribution Report Management
\r\n
\r\n \r\n
\r\n
\r\n \r\n
Monthly Compliance\r\n Statement\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
Document Management\r\n Process Register\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
"
/***/ }),
/***/ "./src/app/components/dashboard/initial/initial.component.ts":
/*!*******************************************************************!*\
!*** ./src/app/components/dashboard/initial/initial.component.ts ***!
\*******************************************************************/
/*! exports provided: InitialComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InitialComponent", function() { return InitialComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/http */ "./node_modules/@angular/http/fesm5/http.js");
/* harmony import */ var _services_user_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../services/user.service */ "./src/app/services/user.service.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_auth_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var TIme = localStorage.getItem('LastLogin');
var InitialComponent = /** @class */ (function () {
function InitialComponent(router, http, users, cognitoUtil, auth, common) {
this.router = router;
this.http = http;
this.users = users;
this.cognitoUtil = cognitoUtil;
this.auth = auth;
this.common = common;
this.title = 'Initial Screen';
this.userRole = localStorage.getItem('custom:user_role');
if (this.userRole == 'administrator' || this.userRole == 'Manco Head' || this.userRole == 'manco user' || this.userRole == 'IM Head Of Compliance') {
this.MonthlyLink = '/Monthly_Compliance/admin/List_Compliance';
this.MonthlycomplianceLink = '/Load-compliance-statement/list';
}
else if (this.userRole == 'IMCO') {
this.MonthlycomplianceLink = '/Load-compliance-statement';
this.MonthlyLink = '/Monthly_Compliance/user/View_Compliance';
}
}
InitialComponent.prototype.ngOnInit = function () {
this.seconds = Number(localStorage.getItem('LastLogin')) * 1000;
if (sessionStorage.getItem('token') == null || sessionStorage.getItem('token') == '') {
this.router.navigateByUrl('/login');
}
if (this.userRole == 'Distributor') {
this.DistributionLink = '/Distribution_Report/Distribution/Reports';
}
else if (this.userRole == 'manco user' || this.userRole == 'Manco Head' || this.userRole == 'administrator' || this.userRole == 'director' || this.userRole == 'IM Head Of Compliance' || this.userRole == 'IMCO') {
this.DistributionLink = '/Distribution_Report/Distribution/DistributionReport';
}
this.getUpdateUser();
};
InitialComponent.prototype.NotAuth = function () {
toastr.error('You are not authorized');
[{ "Name": "sub", "Value": "cfc1958e-7980-4be4-ae41-863e5df03aa8" }, { "Name": "custom:last_name", "Value": "Verma" }, { "Name": "email_verified", "Value": "true" }, { "Name": "custom:first_name", "Value": "Neeraj" }, { "Name": "custom:user_role", "Value": "manco user,director,OED INED Director,IM,Manco Head,Manco CEO / Director,Distributor,IM Head Of Compliance,IMCO" }, { "Name": "custom:user_status", "Value": "active" }, { "Name": "email", "Value": "neeraj.verma@iglobsyn.com" }];
};
InitialComponent.prototype.GetTileAccess = function (value) {
var _this = this;
var data = {
"Action": "Tile-Name",
"LastUrl": "https://3z1tfh0og1.execute-api.us-east-2.amazonaws.com/prod/tilesAccess/list",
"TileName": value
};
this.common.Post(data).subscribe(function (res) {
if (res.status == '200') {
if (res.data.length > 0) {
var readUser = res.data[0].ReadUser;
var WriteUser = res.data[0].WriteUser;
var Read_WriteUser = res.data[0].Read_WriteUser;
if (WriteUser.search(_this.userRole) > 0) {
_this.router.navigate(['/IMCO/UploadDocument']);
}
else if (readUser.search(_this.userRole) > 0) {
_this.router.navigate(['/admin/FundList']);
}
else if (Read_WriteUser.search(_this.userRole) > 0) {
_this.router.navigate(['/admin/FundList']);
}
else {
toastr.error('You are not authorized');
}
}
}
}, function (error) { console.log(error); });
};
InitialComponent.prototype.getUpdateUser = function () {
var _this = this;
var data = {
action: 'getUserDataById',
cid: localStorage.getItem('sub')
};
this.common.GetUserdataBYheaders(data).subscribe(function (resource) {
var resData = JSON.parse(resource._body);
var res = JSON.parse(resData.body);
if (resData.statusCode == '200') {
var CognitoRole = JSON.parse(sessionStorage.getItem('total_details'));
var userData = CognitoRole.filter(function (UserRes) {
return UserRes.Name.match('custom:user_role');
});
if (userData[0]['Value'] != res.data[0]['role']) {
var data_1 = {
first_name: res.data[0]['firstname'],
last_name: res.data[0]['lastname'],
email: res.data[0]['mail'],
userprofile: res.data[0]['firstname'],
user_role: res.data[0]['role']
};
if (res.data[0]['profile'] != '' && res.data[0]['profile'] != null) {
data_1['profile_picture'] = res.data[0]['profile'];
}
_this.auth.update(data_1, _this);
}
}
});
};
InitialComponent.prototype.cognitoCallback = function (message, result) {
if (message != null) {
}
else {
this.auth.getParameters();
}
};
InitialComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-initial',
template: __webpack_require__(/*! ./initial.component.html */ "./src/app/components/dashboard/initial/initial.component.html"),
styles: [__webpack_require__(/*! ./initial.component.css */ "./src/app/components/dashboard/initial/initial.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_angular_http__WEBPACK_IMPORTED_MODULE_2__["Http"],
_services_user_service__WEBPACK_IMPORTED_MODULE_3__["UserService"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_4__["CognitoUtil"],
_services_auth_service__WEBPACK_IMPORTED_MODULE_6__["AuthService"],
_services_common_service__WEBPACK_IMPORTED_MODULE_5__["CommonService"]])
], InitialComponent);
return InitialComponent;
}());
/***/ }),
/***/ "./src/app/components/im-company/add-cpmpany/add-cpmpany.component.css":
/*!*****************************************************************************!*\
!*** ./src/app/components/im-company/add-cpmpany/add-cpmpany.component.css ***!
\*****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/components/im-company/add-cpmpany/add-cpmpany.component.html":
/*!******************************************************************************!*\
!*** ./src/app/components/im-company/add-cpmpany/add-cpmpany.component.html ***!
\******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n Loading...
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n Add IM Company \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
"
/***/ }),
/***/ "./src/app/components/im-company/add-cpmpany/add-cpmpany.component.ts":
/*!****************************************************************************!*\
!*** ./src/app/components/im-company/add-cpmpany/add-cpmpany.component.ts ***!
\****************************************************************************/
/*! exports provided: AddCpmpanyComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AddCpmpanyComponent", function() { return AddCpmpanyComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! sweetalert2 */ "./node_modules/sweetalert2/dist/sweetalert2.all.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var ngx_spinner__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ngx-spinner */ "./node_modules/ngx-spinner/fesm5/ngx-spinner.js");
/* harmony import */ var src_app_services_cognito_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var src_app_services_common_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/services/common.service */ "./src/app/services/common.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
// import { CommonService } from '../../../../services/common.service';
// import { CognitoCallback, CognitoUtil, LoggedInCallback } from '../../../../services/cognito.service';
// import { environment } from '../../../../../environments/environment';
var AddCpmpanyComponent = /** @class */ (function () {
function AddCpmpanyComponent(router, fundform, cognitoUtil, common, spinner) {
this.router = router;
this.fundform = fundform;
this.cognitoUtil = cognitoUtil;
this.common = common;
this.spinner = spinner;
this.data = new FormData();
this.currentUerId = this.cognitoUtil.getCurrentUser();
this.user_column = true;
this.AddFundForm = fundform.group({
'company_Id': '',
'adminstratorId': this.currentUerId['username'],
"CompanyName": ['', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
'status': ['', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
});
}
AddCpmpanyComponent.prototype.ngOnInit = function () {
};
AddCpmpanyComponent.prototype.submitForm = function (value) {
var _this = this;
sweetalert2__WEBPACK_IMPORTED_MODULE_3___default()({
title: 'Would you like to Confirm?',
text: "",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes'
}).then(function (result) {
if (result.value) {
var data = value;
data['action'] = "add-Im-Comapny";
_this.common.saveFundRiskData(data)
.subscribe(function (resource) {
var resData = JSON.parse(resource._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
if (res.data != null && res.data != '') {
toastr.success(res.message);
_this.router.navigateByUrl('/admin/list-company');
}
}
else {
toastr.error(res.message);
}
});
sweetalert2__WEBPACK_IMPORTED_MODULE_3___default()('Success!', '', 'success');
}
});
};
AddCpmpanyComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'add-cpmpany',
template: __webpack_require__(/*! ./add-cpmpany.component.html */ "./src/app/components/im-company/add-cpmpany/add-cpmpany.component.html"),
styles: [__webpack_require__(/*! ./add-cpmpany.component.css */ "./src/app/components/im-company/add-cpmpany/add-cpmpany.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
src_app_services_cognito_service__WEBPACK_IMPORTED_MODULE_5__["CognitoUtil"],
src_app_services_common_service__WEBPACK_IMPORTED_MODULE_6__["CommonService"],
ngx_spinner__WEBPACK_IMPORTED_MODULE_4__["NgxSpinnerService"]])
], AddCpmpanyComponent);
return AddCpmpanyComponent;
}());
/***/ }),
/***/ "./src/app/components/im-company/list/list.component.css":
/*!***************************************************************!*\
!*** ./src/app/components/im-company/list/list.component.css ***!
\***************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/components/im-company/list/list.component.html":
/*!****************************************************************!*\
!*** ./src/app/components/im-company/list/list.component.html ***!
\****************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n\r\n
\r\n Loading...
\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n All Company List \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Associated User \r\n \r\n -- Select\r\n Associated User -- \r\n {{ImUser.firstname +' '+ ImUser.lastname}} \r\n \r\n \r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n
"
/***/ }),
/***/ "./src/app/components/im-company/list/list.component.ts":
/*!**************************************************************!*\
!*** ./src/app/components/im-company/list/list.component.ts ***!
\**************************************************************/
/*! exports provided: ListComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ListComponent", function() { return ListComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/http */ "./node_modules/@angular/http/fesm5/http.js");
/* harmony import */ var angular_datatables__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! angular-datatables */ "./node_modules/angular-datatables/index.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var src_app_services_auth_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/services/auth.service */ "./src/app/services/auth.service.ts");
/* harmony import */ var src_app_services_common_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var src_app_services_cognito_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/services/cognito.service */ "./src/app/services/cognito.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var dt = __webpack_require__(/*! datatables.net */ "./node_modules/datatables.net/js/jquery.dataTables.js");
var ListComponent = /** @class */ (function () {
function ListComponent(form, router, auth, fundform, common, cognito, http, rootNode) {
this.form = form;
this.router = router;
this.auth = auth;
this.fundform = fundform;
this.common = common;
this.cognito = cognito;
this.http = http;
this.dtOptions = {};
this.dtTrigger = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
this.User = [];
this.data = new FormData();
this.userRole = localStorage.getItem('custom:user_role');
this.currentUerId = this.cognito.getCurrentUser();
this.user_column = true;
this.UserId = this.cognito.getCurrentUser();
this.arrayFilename = [];
this.rootNode = rootNode;
if (sessionStorage.getItem('token') != null && sessionStorage.getItem('token') != '') {
this.AddFundForm = fundform.group({
'fundId': '',
'adminstratorId': this.currentUerId['username'],
"fundName": ['', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
'status': ['', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
'Assoc_fund': [false, _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
'Assoc_fund_user': ['']
});
}
else {
this.router.navigateByUrl('/login');
}
}
ListComponent.prototype.ngOnInit = function () {
this.dtOptions = {
pagingType: 'full_numbers',
pageLength: -1,
lengthMenu: [[-1, 10, 20, 25, 50, 100, 200], ['All', 10, 20, 25, 50, 100, 200]]
};
if (sessionStorage.getItem('token') != null && sessionStorage.getItem('token') != '') {
this.getUserlist();
// this.get_user();
}
};
ListComponent.prototype.Accos_user = function () {
if (this.AddFundForm.value.Assoc_fund == true) {
this.user_column = true;
}
else {
this.user_column = false;
}
};
ListComponent.prototype.ngOnDestroy = function () {
// Do not forget to unsubscribe the event
this.dtTrigger.unsubscribe();
};
ListComponent.prototype.extractData = function (res) {
var body = res.json();
return body.data || {};
};
ListComponent.prototype.AddUser = function (value) {
this.AddFundForm.controls['fundId'].setValue(value['fundId']);
this.AddFundForm.controls['adminstratorId'].setValue(value['adminstratorId']);
this.AddFundForm.controls['fundName'].setValue(value['fundName']);
this.AddFundForm.controls['status'].setValue(value['status']);
this.AddFundForm.controls['Assoc_fund_user'].setValue(value['Assoc_fund_user']);
this.AddFundForm.controls['Assoc_fund'].setValue(Boolean(value['Assoc_fund']));
if (value.Assoc_fund == "true" && value.Assoc_fund != undefined && value.Assoc_fund != '' && value.Assoc_fund != null) {
this.user_column = false;
}
else {
this.user_column = true;
}
document.getElementById('models').click();
};
ListComponent.prototype.get_user_details = function (obj) {
var user_name = this.All_users.filter(function (person) {
if (person.username === obj) {
return person.firstname;
}
});
var user;
if (user_name.length > 0) {
user = user_name[0].firstname + ' ' + user_name[0].lastname;
}
return user;
// return user_name[0].firstname;
// Email(obj) {
// return obj.email;
};
ListComponent.prototype.getUserlist = function () {
var _this = this;
var data = {
action: 'get-Im-Comapny',
};
this.common.GetUserdataBYheaders(data).subscribe(function (resource) {
var resData = JSON.parse(resource._body);
var res = JSON.parse(resData.body);
if (res.data.length > 0) {
_this.User = res.data.sort(function (a, b) {
return (a.created_at < b.created_at) ? -1 : 1;
});
}
_this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}, function (error) {
// this.getUserlist();
console.log(error);
});
// let Newdata = {
// LastUrl: "https://3z1tfh0og1.execute-api.us-east-2.amazonaws.com/prod/api/GerDatabyTableName",
// table: "specificIM_company_List"
// };
// this.common.Post(Newdata).subscribe(
// response => {
// if (response.status == "success") {
// this.User = response.data.sort(function (a, b) {
// return (a.created_at < b.created_at) ? -1 : 1;
// })
// // this.dropdownList = response.data;
// }
// }, error => { this.getUserlist(); })
};
ListComponent.prototype.EditFund = function (id) {
// console.log(id);
};
ListComponent.prototype.DeleteFund = function (id) {
// console.log(id);
};
ListComponent.prototype.closeModal = function () {
this.closeBtn.nativeElement.click();
this.AddFundForm.reset();
};
ListComponent.prototype.submitForm = function (value) {
var _this = this;
var data = value;
data['action'] = "addFunds";
this.common.saveFundRiskData(data)
.subscribe(function (resource) {
var resData = JSON.parse(resource._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
if (res.data != null && res.data != '') {
toastr.success(res.message);
_this.closeModal();
_this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.ngOnInit();
});
}
}
else {
toastr.error(res.message);
}
});
};
ListComponent.prototype.updateStatus = function (value) {
var _this = this;
if (value.status == 'active') {
this.changeStatus = 'InActive';
}
else if (value.status == 'InActive') {
this.changeStatus = 'active';
}
var data = {
'action': 'add-Im-Comapny',
'company_Id': value.company_Id,
'adminstratorId': value.adminstratorId,
'CompanyName': value.CompanyName,
'status': this.changeStatus,
'created_at': value.created_at,
'updated_at': '',
};
this.common.saveFundRiskData(data)
.subscribe(function (resource) {
var resData = JSON.parse(resource._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
if (res.data != null && res.data != '') {
toastr.success(res.message);
_this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.ngOnInit();
});
}
}
else {
toastr.error(res.message);
}
});
};
ListComponent.prototype.get_user = function () {
var _this = this;
var Userdata = {
LastUrl: "https://3z1tfh0og1.execute-api.us-east-2.amazonaws.com/prod/SanlamUserList"
};
this.common.Get(Userdata).subscribe(function (res) {
_this.All_users = res.data.filter(function (UserRes) {
return UserRes.role.match('IM');
});
}, function (error) {
console.log(error);
});
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(angular_datatables__WEBPACK_IMPORTED_MODULE_4__["DataTableDirective"]),
__metadata("design:type", angular_datatables__WEBPACK_IMPORTED_MODULE_4__["DataTableDirective"])
], ListComponent.prototype, "dtElement", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('closeBtn'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"])
], ListComponent.prototype, "closeBtn", void 0);
ListComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-list',
template: __webpack_require__(/*! ./list.component.html */ "./src/app/components/im-company/list/list.component.html"),
styles: [__webpack_require__(/*! ./list.component.css */ "./src/app/components/im-company/list/list.component.css")]
}),
__metadata("design:paramtypes", [_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
src_app_services_auth_service__WEBPACK_IMPORTED_MODULE_6__["AuthService"],
_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
src_app_services_common_service__WEBPACK_IMPORTED_MODULE_7__["CommonService"],
src_app_services_cognito_service__WEBPACK_IMPORTED_MODULE_8__["CognitoUtil"],
_angular_http__WEBPACK_IMPORTED_MODULE_3__["Http"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]])
], ListComponent);
return ListComponent;
}());
/***/ }),
/***/ "./src/app/components/login/login.component.css":
/*!******************************************************!*\
!*** ./src/app/components/login/login.component.css ***!
\******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/components/login/login.component.html":
/*!*******************************************************!*\
!*** ./src/app/components/login/login.component.html ***!
\*******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\r\n
\r\n\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n "
/***/ }),
/***/ "./src/app/components/login/login.component.ts":
/*!*****************************************************!*\
!*** ./src/app/components/login/login.component.ts ***!
\*****************************************************/
/*! exports provided: LoginComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoginComponent", function() { return LoginComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _services_auth_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../services/auth.service */ "./src/app/services/auth.service.ts");
/* harmony import */ var ngx_bootstrap_modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ngx-bootstrap/modal */ "./node_modules/ngx-bootstrap/modal/fesm5/ngx-bootstrap-modal.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! sweetalert2 */ "./node_modules/sweetalert2/dist/sweetalert2.all.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js");
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_8__);
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 LoginComponent = /** @class */ (function () {
function LoginComponent(fb, router, auth, cognitoUtil, common, modalService) {
this.fb = fb;
this.router = router;
this.auth = auth;
this.cognitoUtil = cognitoUtil;
this.common = common;
this.modalService = modalService;
this.config = {
keyboard: false,
ignoreBackdropClick: true,
backdrop: false,
};
this.title = 'Login | Sanlam';
this.userid = this.cognitoUtil.getCurrentUser();
this.mfaStep = false;
this.mfaData = {
destination: '',
callback: null
};
this.data = new FormData();
this.logindata = {};
this.user_ip = jquery__WEBPACK_IMPORTED_MODULE_8__["getJSON"]('https://ipapi.co/json/', function (data) {
return data;
});
this.user = { email: '', password: '' };
this.loginForm = fb.group({
'email': ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].compose([_angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required, _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].email])],
'password': [null, _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required],
});
this.RoleForm = fb.group({
role: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required]
});
}
LoginComponent.prototype.ngOnInit = function () {
var token = sessionStorage.getItem('token');
var SessionValue = localStorage.getItem('session');
if (sessionStorage.getItem('token') != null && sessionStorage.getItem('token') != '') {
this.router.navigateByUrl('admin/initial');
document.getElementById('body').className = 'gray_bg';
}
else {
document.getElementById('body').className = 'login_page';
this.router.navigateByUrl('/login');
}
if (SessionValue != null && SessionValue != '') {
toastr.warning('Session Timeout');
}
};
LoginComponent.prototype.submitForm = function (value) {
if (value.email != '' && value.password != '') {
var btn = document.getElementById("login_btn");
btn.innerText = "Processing...";
btn.disabled = true;
// var $this = this;
// let data = {
// 'action': 'get_user_byEmail',
// 'email': value.email,
// }
// this.common.saveFundRiskData(data)
// .subscribe(response => {
// let reData = JSON.parse(response._body);
// let responseData = JSON.parse(reData.body);
// if(responseData.data.length > 0){
// this.auth.signinUser(value.email, value.password, $this);
// }else{
// toastr.error('This entered user not found');
// let btn =
document.getElementById("login_btn");
// btn.innerText = "Login";
// btn.disabled = false;
// }
// });
this.auth.signinUser(value.email, value.password, this);
}
else {
sweetalert2__WEBPACK_IMPORTED_MODULE_7___default()('Username and Password must be add');
}
};
LoginComponent.prototype.selectRole = function (value) {
if (value != '' && value != null) {
localStorage.setItem('custom:user_role', value.role);
jquery__WEBPACK_IMPORTED_MODULE_8__('#RolecloseForm').click();
this.router.navigate(['/admin/initial']);
}
else {
alert('Please select your role');
}
};
LoginComponent.prototype.cognitoCallback = function (message, result) {
var _this = this;
if (message != null) {
var btn = document.getElementById("login_btn");
btn.innerText = "Login";
btn.disabled = false;
this.errorMessage = message;
toastr.error(this.errorMessage, 'Error', { timeout: 100 });
if (this.errorMessage === 'User is not confirmed.') {
localStorage.setItem('confirmation', 'confirmed');
this.router.navigate(['/admin/confirm']);
}
else if (this.errorMessage === 'User needs to set password.') {
this.router.navigate(['/admin/confirm']);
}
}
else {
var userData = JSON.stringify(result.getIdToken());
var userss = JSON.parse(userData);
this.auth.getParameters();
var token = result.getAccessToken().getJwtToken();
var Auth = sessionStorage.setItem('Authorization', result.getIdToken().getJwtToken());
localStorage.setItem('token', token);
sessionStorage.setItem('token', token);
var AuthDetails = JSON.stringify(result.getAccessToken());
//let Show = JSON.stringify(AuthDetails);
var Show = JSON.parse(AuthDetails);
var loginDetails = {
username: Show['payload']['username'],
email: this.loginForm.value.email,
device_key: Show['payload']['device_key'],
logtime: String(Show['payload']['auth_time']),
user_ip: this.user_ip['responseJSON']['ip'],
browser_details: navigator.appVersion,
action: "updateuserLog",
Userid: '123456',
month: new Date().getMonth() + 1,
year: new Date(),
};
this.common.GetUserdataBYheaders(loginDetails)
.subscribe(function (response) {
var reData = JSON.parse(response._body);
var responseData = JSON.parse(reData.body);
if (reData.statusCode == 200) {
_this.getUpdateUser();
localStorage.setItem('LastLogin', responseData.data.logtime);
var LastloginTime = responseData.data.logtime;
// user = localStorage.getItem('custom:first_name');
// toastr.success('Login Successfully!', 'Success!', { timeout: 100 });
// this.AllRole = localStorage.getItem('custom:user_role');
// this.checkRole = this.AllRole.split(',');
// if (this.checkRole.length > 1) {
// $('#showrole').click();
// } else {
// this.router.navigate(['/admin/initial']);
// }
// this.AllRole = localStorage.getItem('custom:user_role');
// this.checkRole = this.AllRole.split(',');
// if(this.checkRole.length>1){
// $('#showrole').click();
// }else{
// this.router.navigate(['/admin/initial']);
// }
}
else {
}
}, function (err) {
var btn = document.getElementById("login_btn");
btn.innerText = "Login";
btn.disabled = false;
});
}
};
LoginComponent.prototype.openModal = function (template) {
this.modalRef = this.modalService.show(template, this.config);
};
LoginComponent.prototype.getUpdateUser = function () {
var _this = this;
var data = {
action: 'getUserDataById',
cid: localStorage.getItem('sub')
};
this.common.GetUserdataBYheaders(data).subscribe(function (resource) {
var resData = JSON.parse(resource._body);
var res = JSON.parse(resData.body);
if (resData.statusCode == '200') {
localStorage.setItem('custom:user_role', res.data[0].role);
localStorage.setItem('CheckIdentity', res.data[0].role);
_this.AllRole = localStorage.getItem('custom:user_role');
_this.checkRole = _this.AllRole.split(',');
if (_this.checkRole.length > 1) {
jquery__WEBPACK_IMPORTED_MODULE_8__('#showrole').click();
}
else {
_this.router.navigate(['/admin/initial']);
}
}
});
};
LoginComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-login',
template: __webpack_require__(/*! ./login.component.html */ "./src/app/components/login/login.component.html"),
styles: [__webpack_require__(/*! ./login.component.css */ "./src/app/components/login/login.component.css")]
}),
__metadata("design:paramtypes", [_angular_forms__WEBPACK_IMPORTED_MODULE_4__["FormBuilder"],
_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_services_auth_service__WEBPACK_IMPORTED_MODULE_2__["AuthService"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_6__["CognitoUtil"],
_services_common_service__WEBPACK_IMPORTED_MODULE_5__["CommonService"],
ngx_bootstrap_modal__WEBPACK_IMPORTED_MODULE_3__["BsModalService"]])
], LoginComponent);
return LoginComponent;
}());
/***/ }),
/***/ "./src/app/components/milestone/capital-financial/capital-financial.component.css":
/*!****************************************************************************************!*\
!*** ./src/app/components/milestone/capital-financial/capital-financial.component.css ***!
\****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".fund_inner_block .fund_form_detail label.capital_adequacy {\r\n width: 72px;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 7px 1px;\r\n text-align: center;\r\n float: left;\r\n}\r\n.fund_inner_block .fund_form_detail label.capital_budget {\r\n width: 72px !important;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 7px 0px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n}\r\n.fund_inner_block .fund_form_detail input.capital_budget {\r\n width: 72px !important;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 7px 0px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n}\r\n.fund_inner_block .fund_form_detail label.capital_hadware {\r\n width: 50px;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 8px 0px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n}\r\n.fund_inner_block .fund_form_detail label.capital_cyber {\r\n width: 50px;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 8px 0px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n}\r\n.fund_inner_block .fund_form_detail label.capital_current {\r\n width: 100%;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 12px 0px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n font-size: 16px;\r\n border-radius: 20px;\r\n}\r\nselect#capitalCurrent{\r\n width: 100%;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 14px 11px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n border-radius: 22px;\r\n outline: none;\r\n font-size: 16px;\r\n}\r\n.fund_inner_block .fund_form_detail select#capital_adequacy {\r\n width: 72px;\r\n font-size: 16px;\r\n background-color: green;\r\n color: #fff;\r\n border: none;\r\n padding: 8px 0px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n outline: none;\r\n}\r\n.fund_inner_block .fund_form_detail select#capital_hadware {\r\n width: 72px;\r\n font-size: 16px;\r\n background-color: green;\r\n color: #fff;\r\n border: none;\r\n padding: 8px 0px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n outline: none;\r\n}\r\n.fund_inner_block .fund_form_detail select#capital_cyber {\r\n width: 72px;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 8px 0px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n outline: none;\r\n font-size: 16px;\r\n}\r\n.fund_inner_block .fund_form_detail #capital_cyber select::-ms-expand{\r\n display: none;\r\n }\r\n.fund_inner_block .fund_form_detail #capital_current select::-ms-expand{\r\n display: none;\r\n}\r\n.fund_inner_block .fund_form_detail select#capital_current{\r\n width: 72px;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 8px 0px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n outline: none;\r\n font-size: 16px;\r\n }\r\n.tab_content_left .tab-content {\r\n overflow-y: scroll;\r\n}\r\nselect#capital_current {\r\n width: 100%;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 14px 11px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n border-radius: 22px;\r\n outline: none;\r\n font-size: 16px;\r\n}\r\n/* .fund_inner_block .fund_form_detail select#capital_adequacy {\r\n width: 50%;\r\n font-size: 16px;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 8px 0px;\r\n text-align-last:center;\r\n display: table;\r\n float: left;\r\n outline: none;\r\n margin: 0px 12px;\r\n border-radius: 20px;\r\n} */\r\n.fund_inner_block .fund_form_detail label#capital_hadware {\r\n width: 50%;\r\n font-size: 16px;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 8px 0px;\r\n text-align-last:center;\r\n display: table;\r\n float: left;\r\n outline: none;\r\n margin: 0px 12px;\r\n border-radius: 20px;\r\n}\r\n.fund_inner_block .fund_form_detail label#capital_cyber {\r\n width: 50%;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 8px 0px;\r\n text-align-last:center;\r\n display: table;\r\n float: left;\r\n outline: none;\r\n font-size: 16px;\r\n margin: 0px 12px;\r\n border-radius: 20px;\r\n}\r\n.fund_inner_block .fund_form_detail select#capital_hadware {\r\n width: 50%;\r\n font-size: 16px;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 8px 0px;\r\n text-align-last:center;\r\n display: table;\r\n float: left;\r\n outline: none;\r\n margin: 0px 12px;\r\n border-radius: 20px;\r\n}\r\n.fund_inner_block .fund_form_detail select#capital_cyber {\r\n width: 50%;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 8px 0px;\r\n text-align-last:center;\r\n display: table;\r\n float: left;\r\n outline: none;\r\n font-size: 16px;\r\n margin: 0px 12px;\r\n border-radius: 20px;\r\n}\r\n.fund_inner_block .fund_form_detail #capital_cyber select::-ms-expand{\r\n display: none;\r\n }\r\n/*-------------------------Responsive Css--------------------------*/\r\n@media only screen and (max-width: 640px){\r\n\r\n .fund_inner_block .fund_form_detail select#capital_adequacy {\r\n width: 85%;\r\n \r\n }\r\n .fund_inner_block .fund_form_detail select#capital_hadware {\r\n width: 85%;\r\n \r\n }\r\n .fund_inner_block .fund_form_detail select#capital_cyber {\r\n width: 85%;\r\n \r\n }\r\n}\r\n@media only screen and (max-width: 480px){ \r\n\r\n} "
/***/ }),
/***/ "./src/app/components/milestone/capital-financial/capital-financial.component.html":
/*!*****************************************************************************************!*\
!*** ./src/app/components/milestone/capital-financial/capital-financial.component.html ***!
\*****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = " \r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n Loading...
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Organisational Effectiveness Dashboard \r\n
\r\n
\r\n
\r\n \r\n Capital and Financial \r\n
\r\n
\r\n
\r\n
Finance \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n\r\n
\r\n
\r\n
\r\n
\r\n
IT / Cyber Security \r\n \r\n
\r\n
\r\n
\r\n Hardware / Software failure \r\n \r\n Yes, see\r\n additional\r\n details \r\n None \r\n \r\n
\r\n
\r\n Cyber Attacks Encountered \r\n \r\n \r\n Yes, see additional details \r\n None \r\n \r\n
\r\n
\r\n \r\n \r\n Management Co. satisfied with IT Provider performance\r\n \r\n \r\n Management Co. dissatisfied with IT service provider\r\n \r\n \r\n
\r\n
\r\n Submit \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Management Co. satisfied with IT Provider performance\r\n \r\n \r\n Management Co. dissatisfied with IT service provider\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n "
/***/ }),
/***/ "./src/app/components/milestone/capital-financial/capital-financial.component.ts":
/*!***************************************************************************************!*\
!*** ./src/app/components/milestone/capital-financial/capital-financial.component.ts ***!
\***************************************************************************************/
/*! exports provided: CapitalFinancialComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CapitalFinancialComponent", function() { return CapitalFinancialComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! sweetalert2 */ "./node_modules/sweetalert2/dist/sweetalert2.all.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var ngx_spinner__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-spinner */ "./node_modules/ngx-spinner/fesm5/ngx-spinner.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 CapitalFinancialComponent = /** @class */ (function () {
function CapitalFinancialComponent(router, fundform, cognitoUtil, common, spinner) {
this.router = router;
this.fundform = fundform;
this.cognitoUtil = cognitoUtil;
this.common = common;
this.spinner = spinner;
this.year = window.location.href.substr(window.location.href.lastIndexOf('/') + 1);
this.userRole = localStorage.getItem('custom:user_role');
this.user = this.cognitoUtil.getCurrentUser();
this.monthNames = [
{},
{ 'id': '1', 'name': 'January' },
{ 'id': '2', 'name': 'February' },
{ 'id': '3', 'name': 'March' },
{ 'id': '4', 'name': 'April' },
{ 'id': '5', 'name': 'May' },
{ 'id': '6', 'name': 'June' },
{ 'id': '7', 'name': 'July' },
{ 'id': '8', 'name': 'August' },
{ 'id': '9', 'name': 'September' },
{ 'id': '10', 'name': 'October' },
{ 'id': '11', 'name': 'November' },
{ 'id': '12', 'name': 'December' }
];
this.CurrentUrl = window.location.href;
this.result = this.CurrentUrl.split('/');
this.url = this.result[this.result.length - 3];
this.Param = this.result[this.result.length - 2];
// monthYear = this.Param;
this.monthYear = this.monthNames[this.Param];
this.CapitalFinanceForm = fundform.group({
'capitalFinanceId': '',
'capital_adequacy': 'Yes',
'budget_acheived': 0,
'hardwaresoftware_failure': 'None',
'cyber_attacks_encounter': 'None',
'management_satisfied': 'Management Co. satisfied with IT Provider performance',
});
}
CapitalFinancialComponent.prototype.ngOnInit = function () {
if (sessionStorage.getItem('token') != null && sessionStorage.getItem('token') != '') {
this.spinner.show();
this.getFundRisk();
// this.GetFileData();
this.capital_adequacy = 'Yes';
this.budget_acheived = 0;
this.hardwaresoftware_failure = 'None';
this.cyber_attacks_encounter = 'None';
this.management_satisfied = '0';
}
else {
this.router.navigateByUrl('/login');
}
};
// color changr or Capital Adequacy Obligation Met
CapitalFinancialComponent.prototype.Obligation = function (value) {
if (value == "Yes") {
document.getElementById('capital_adequacy').style.backgroundColor = "green";
}
else if (value == "NO") {
document.getElementById('capital_adequacy').style.backgroundColor = "orange";
}
};
CapitalFinancialComponent.prototype.Hardware = function (value) {
if (value == "None") {
document.getElementById('capital_hadware').style.backgroundColor = "green";
}
else if (value == "Yes, see additional details") {
document.getElementById('capital_hadware').style.backgroundColor = "orange";
}
};
CapitalFinancialComponent.prototype.Cyber = function (value) {
// console.log(value);
if (value == "None") {
document.getElementById('capital_cyber').style.backgroundColor = "green";
//this.CapitalRiskApi();
//this.submitForm(this.CapitalFinanceForm.value);
}
else if (value == "Yes, see additional details") {
document.getElementById('capital_cyber').style.backgroundColor = "orange";
//this.CapitalRiskApi();
//this.submitForm(this.CapitalFinanceForm.value);
}
};
CapitalFinancialComponent.prototype.capital = function (value) {
if (value == "Management Co. satisfied with IT Provider performance") {
document.getElementById('capitalCurrent').style.backgroundColor = "green";
}
else if (value == "Management Co. dissatisfied, remedial action in progress") {
document.getElementById('capitalCurrent').style.backgroundColor = "orange";
}
};
CapitalFinancialComponent.prototype.popup = function () {
var element = document.getElementById("qnimate");
element.classList.add("popup-box-on");
//document.getElementById("qnimate").className = "popup-box-on";
};
CapitalFinancialComponent.prototype.openFilepopup = function () {
document.getElementById("myDropdown").classList.toggle("show");
};
CapitalFinancialComponent.prototype.openpopup = function () {
document.getElementById("AdminmyDropdown").classList.toggle("show");
};
//function for call api for Review
CapitalFinancialComponent.prototype.CallReviw = function () {
this.submitForm(this.CapitalFinanceForm.value);
};
CapitalFinancialComponent.prototype.getFundRisk = function () {
var _this = this;
this.userDataId = _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser;
var data = {
'action': 'getCapitalFinanceData',
'userid': this.userDataId,
'month': Number(this.Param),
'year': Number(this.year)
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
//console.log(res);
if (res.status == '200') {
if (res.data != null && res.data != '') {
if ((localStorage.getItem('custom:user_role') == 'manco user') || (localStorage.getItem('custom:user_role') == 'Manco Head')) {
_this.CapitalFinanceForm.controls['capitalFinanceId'].setValue(res.data[0]['capitalFinanceId']);
if (res.data[0]['capital_adequacy'] == 'Yes') {
document.getElementById('capital_adequacy').style.backgroundColor = "green";
document.getElementById('capital_adequacy').value = res.data[0]['capital_adequacy'];
}
else if (res.data[0]['capital_adequacy'] == 'NO') {
document.getElementById('capital_adequacy').style.backgroundColor = "orange";
document.getElementById('capital_adequacy').value = res.data[0]['capital_adequacy'];
}
_this.CapitalFinanceForm.controls['budget_acheived'].setValue(res.data[0]['budget_acheived']);
if (res.data[0]['hardwaresoftware_failure'] == "None") {
document.getElementById('capital_hadware').style.backgroundColor = "green";
}
else if (res.data[0]['hardwaresoftware_failure'] == "Yes, see additional details") {
document.getElementById('capital_hadware').style.backgroundColor = "orange";
}
if (res.data[0]['cyber_attacks_encounter'] == "None") {
document.getElementById('capital_cyber').style.backgroundColor = "green";
}
else if (res.data[0]['cyber_attacks_encounter'] == "Yes, see additional details") {
document.getElementById('capital_cyber').style.backgroundColor = "orange";
}
document.getElementById('capital_hadware').value = res.data[0]['hardwaresoftware_failure'];
document.getElementById('capital_cyber').value = res.data[0]['hardwaresoftware_failure'];
_this.CapitalFinanceForm.controls['cyber_attacks_encounter'].setValue(res.data[0]['cyber_attacks_encounter']);
if (res.data[0]['management_satisfied'] == 'Management Co. satisfied with IT Provider performance') {
document.getElementById('capitalCurrent').style.backgroundColor = "green";
document.getElementById('capitalCurrent').value = res.data[0]['management_satisfied'];
}
else if (res.data[0]['management_satisfied'] == 'Management Co. dissatisfied, remedial action in progress') {
document.getElementById('capitalCurrent').style.backgroundColor = "orange";
_this.CapitalFinanceForm.controls['management_satisfied'].setValue(res.data[0]['management_satisfied']);
}
}
else {
_this.capitalFinanceId = res.data[0]['capitalFinanceId'];
_this.capital_adequacy = res.data[0]['capital_adequacy'];
_this.budget_acheived = res.data[0]['budget_acheived'];
_this.hardwaresoftware_failure = res.data[0]['hardwaresoftware_failure'];
_this.cyber_attacks_encounter = res.data[0]['cyber_attacks_encounter'];
_this.management_satisfied = res.data[0]['management_satisfied'];
_this.director_review = res.data[0]['director_review'];
_this.ined_director_review = res.data[0]['ined_director_review'];
_this.available_for_review = res.data[0]['available_for_review'];
if (res.data[0]['management_satisfied'] == 'Management Co. satisfied with IT Provider performance') {
document.getElementById('capitalCurrent').style.backgroundColor = "green";
document.getElementById('capitalCurrent').value = res.data[0]['management_satisfied'];
}
else if (res.data[0]['management_satisfied'] == 'Management Co. dissatisfied, remedial action in progress') {
document.getElementById('capitalCurrent').style.backgroundColor = "orange";
_this.CapitalFinanceForm.controls['management_satisfied'].setValue(res.data[0]['management_satisfied']);
}
$('.fund_form_detail select').attr('disabled', 'true');
}
}
else {
//toastr.error(res.message);
}
}
else {
_this.capitalFinanceId = res.data[0]['fundriskId'];
_this.capital_adequacy = 'Yes';
_this.budget_acheived = 0;
_this.hardwaresoftware_failure = 'Yes, see additional details';
_this.cyber_attacks_encounter = 'None';
_this.management_satisfied = 'Management Co. satisfied with IT Provider performance';
// if (this.userRole != 'manco user') {
// (document.getElementById('fund_review')).checked = true;
// }
//toastr.error(res.message);
}
_this.spinner.hide();
}, function (error) {
_this.getFundRisk();
_this.spinner.hide();
});
};
CapitalFinancialComponent.prototype.getcheckbox = function () {
if ((localStorage.getItem('custom:user_role') == 'manco user') || localStorage.getItem('custom:user_role') == 'Manco Head') {
if (document.getElementById('mark_MancoReview').checked == true) {
document.getElementById('capital_budget').readOnly = true;
}
}
};
// function for first blur
CapitalFinancialComponent.prototype.fundRiskApi = function () {
var _this = this;
// if (this.CapitalFinanceForm.value.budget_acheived != '0') {
//if ((document.getElementById('mark_MancoReview')).checked == false) {
sweetalert2__WEBPACK_IMPORTED_MODULE_5___default()({
title: 'Save the changes.',
text: " ",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes'
}).then(function (result) {
if (result.value) {
sweetalert2__WEBPACK_IMPORTED_MODULE_5___default()('Successfully', 'Status changed to review.', 'success');
_this.submitForm(_this.CapitalFinanceForm.value);
}
});
//}
// } else {
// Swal('Update remaining field(s) data.');
// }
};
CapitalFinancialComponent.prototype.CapitalRiskApi = function () {
var _this = this;
// if (this.CapitalFinanceForm.value.budget_acheived != '0') {
if (document.getElementById('mark_MancoReview').checked == false) {
sweetalert2__WEBPACK_IMPORTED_MODULE_5___default()({
title: 'Please change status from open to review.',
text: " ",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes'
}).then(function (result) {
if (result.value) {
sweetalert2__WEBPACK_IMPORTED_MODULE_5___default()('Successfully', 'Status changed to review.', 'success');
_this.submitForm(_this.CapitalFinanceForm.value);
}
});
}
// } else {
// Swal('Update remaining field(s) data.');
// }
};
// submit data api
CapitalFinancialComponent.prototype.submitForm = function (value) {
var _this = this;
if (document.getElementById('mark_MancoReview').checked == false) {
var data = value;
var btn;
if ((localStorage.getItem('custom:user_role') == 'manco user') || localStorage.getItem('custom:user_role') == 'Manco Head') {
//this.userDataId = this.user['username'];
btn = document.getElementById("submitData");
btn.innerText = "Processing...";
btn.disabled = true;
}
else {
this.userDataId = _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser;
}
this.userDataId = _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser;
data['action'] = 'saveCapitalFinanceData';
data['userid'] = this.userDataId;
data['month'] = Number(this.Param);
data['year'] = Number(this.year);
data['available_for_review'] = false;
data['director_review'] = false;
data['ined_director_review'] = false;
data['created_at'] = new Date().getTime();
data['updated_at'] = new Date().getTime();
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
//console.log(res);
if (res.status == '200') {
if (res.message != null) {
if (_this.userRole == 'manco user' || localStorage.getItem('custom:user_role') == 'Manco Head') {
_this.CapitalFinanceForm.controls['capitalFinanceId'].setValue(res.data['capitalFinanceId']);
_this.CapitalFinanceForm.controls['capital_adequacy'].setValue(res.data['capital_adequacy']);
_this.CapitalFinanceForm.controls['budget_acheived'].setValue(res.data['budget_acheived']);
_this.CapitalFinanceForm.controls['hardwaresoftware_failure'].setValue(res.data['hardwaresoftware_failure']);
}
else {
_this.capitalFinanceId = res.data['capitalFinanceId'];
_this.capital_adequacy = res.data['capital_adequacy'];
_this.budget_acheived = res.data['budget_acheived'];
_this.hardwaresoftware_failure = res.data['hardwaresoftware_failure'];
}
toastr.success('Changes Saved', 'Success');
}
else {
toastr.error(res.data);
}
}
else {
toastr.error('Server Internal Error');
}
btn.innerText = "Submit";
btn.disabled = false;
});
}
};
CapitalFinancialComponent.prototype.AdminApi = function () {
// Swal({
// title: 'Please change status from open to review.',
// text: " ",
// type: 'warning',
// showCancelButton: true,
// confirmButtonColor: '#3085d6',
// cancelButtonColor: '#d33',
// confirmButtonText: 'Yes'
// }).then((result) => {
// if (result.value) {
// Swal(
// 'Successfully',
// 'Status changed to review.',
// 'success'
// )
var data = {
'capitalFinanceId': this.capitalFinanceId,
'capital_adequacy': this.capital_adequacy,
'budget_acheived': this.budget_acheived,
'hardwaresoftware_failure': this.hardwaresoftware_failure,
'cyber_attacks_encounter': this.cyber_attacks_encounter,
'management_satisfied': document.getElementById("capitalCurrent").value,
'userid': this.userDataId,
'month': Number(this.Param),
'year': Number(this.year),
'action': 'saveCapitalFinanceData',
'available_for_review': this.director_review,
'director_review': this.ined_director_review,
'ined_director_review': this.available_for_review
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var res = JSON.parse(response.body);
if (res.message != null && res.message != '') {
toastr.success('Updated Successfully');
}
else {
toastr.error('Internal Error');
}
});
// }
// })
};
CapitalFinancialComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-capital-financial',
template: __webpack_require__(/*! ./capital-financial.component.html */ "./src/app/components/milestone/capital-financial/capital-financial.component.html"),
styles: [__webpack_require__(/*! ./capital-financial.component.css */ "./src/app/components/milestone/capital-financial/capital-financial.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_4__["CognitoUtil"],
_services_common_service__WEBPACK_IMPORTED_MODULE_3__["CommonService"],
ngx_spinner__WEBPACK_IMPORTED_MODULE_7__["NgxSpinnerService"]])
], CapitalFinancialComponent);
return CapitalFinancialComponent;
}());
/***/ }),
/***/ "./src/app/components/milestone/distribution/distribution.component.css":
/*!******************************************************************************!*\
!*** ./src/app/components/milestone/distribution/distribution.component.css ***!
\******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".fund_inner_block .fund_form_detail label.capital_adequacy {\r\n width: 45px;\r\n float: left;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 7px 1px;\r\n text-align: center;\r\n}\r\n.fund_inner_block .fund_form_detail label.capital_budget {\r\n width: 45px;\r\n float: left;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 7px 0px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n}\r\n.switch {\r\nposition: relative;\r\ndisplay: inline-block;\r\nwidth: 45px;\r\nheight: 28px;\r\nmargin-left: 8px;\r\ntop: 13px;\r\n}\r\n.switch input {display:none;}\r\n.slider {\r\nposition: absolute;\r\ncursor: pointer;\r\ntop: 0;\r\nleft: 0;\r\nright: 0;\r\nbottom: 0;\r\nbackground-color: #e56e0d;\r\ntransition: .4s;\r\n}\r\n.slider:before {\r\nposition: absolute;\r\ncontent: \"\";\r\nheight: 18px;\r\nwidth: 15px;\r\nleft: 1px;\r\nbottom: 4px;\r\nbackground-color: white;\r\ntransition: .4s;\r\n}\r\ninput:checked + .slider {\r\nbackground-color: #00b160;\r\n}\r\ninput:focus + .slider {\r\nbox-shadow: 0 0 1px #00b160;\r\n}\r\ninput:checked + .slider:before {\r\n-webkit-transform: translateX(26px);\r\ntransform: translateX(26px);\r\n}\r\n/* / Rounded sliders / */\r\n.slider.round {\r\nborder-radius: 34px;\r\n}\r\n.slider.round:before {\r\nborder-radius: 50%;\r\n}\r\n"
/***/ }),
/***/ "./src/app/components/milestone/distribution/distribution.component.html":
/*!*******************************************************************************!*\
!*** ./src/app/components/milestone/distribution/distribution.component.html ***!
\*******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\r\n \r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n Loading...
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Organisational Effectiveness Dashboard \r\n
\r\n
\r\n
\r\n \r\n Distribution \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n {{netmonthly}}\r\n \r\n \r\n 0 \r\n \r\n Net Monthly inflows / outflows (m USD) \r\n
\r\n \r\n \r\n {{netytd}} \r\n \r\n \r\n 0 \r\n \r\n Net YTD inflows / outflows (m / USD) \r\n
\r\n \r\n {{ytdvsbudget}} \r\n \r\n 0 \r\n \r\n YTD vs Budget \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n "
/***/ }),
/***/ "./src/app/components/milestone/distribution/distribution.component.ts":
/*!*****************************************************************************!*\
!*** ./src/app/components/milestone/distribution/distribution.component.ts ***!
\*****************************************************************************/
/*! exports provided: DistributionComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistributionComponent", function() { return DistributionComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! sweetalert2 */ "./node_modules/sweetalert2/dist/sweetalert2.all.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var ngx_spinner__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-spinner */ "./node_modules/ngx-spinner/fesm5/ngx-spinner.js");
/* harmony import */ var _model_organisationalEffectiveness__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../model/organisationalEffectiveness */ "./src/app/model/organisationalEffectiveness.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var DistributionComponent = /** @class */ (function () {
function DistributionComponent(router, fundform, cognitoUtil, common, spinner) {
this.router = router;
this.fundform = fundform;
this.cognitoUtil = cognitoUtil;
this.common = common;
this.spinner = spinner;
this.commons = _model_organisationalEffectiveness__WEBPACK_IMPORTED_MODULE_8__["OrganisationalEffectiveness"];
this.CommonVari = new _model_organisationalEffectiveness__WEBPACK_IMPORTED_MODULE_8__["OrganisationalEffectiveness"]();
this.year = window.location.href.substr(window.location.href.lastIndexOf('/') + 1);
this.title = 'Distribution';
this.userRole = localStorage.getItem('custom:user_role');
this.monthNames = [
{},
{ 'id': '1', 'name': 'January' },
{ 'id': '2', 'name': 'February' },
{ 'id': '3', 'name': 'March' },
{ 'id': '4', 'name': 'April' },
{ 'id': '5', 'name': 'May' },
{ 'id': '6', 'name': 'June' },
{ 'id': '7', 'name': 'July' },
{ 'id': '8', 'name': 'August' },
{ 'id': '9', 'name': 'September' },
{ 'id': '10', 'name': 'October' },
{ 'id': '11', 'name': 'November' },
{ 'id': '12', 'name': 'December' }
];
this.CurrentUrl = window.location.href;
this.result = this.CurrentUrl.split('/');
this.url = this.result[this.result.length - 3];
this.Param = this.result[this.result.length - 2];
this.monthYear = this.monthNames[this.Param];
this.data = new FormData();
this.userName = this.cognitoUtil.getCurrentUser();
this.DistributionForm = fundform.group({
'distributionId': '',
"netmonthly": [0],
"netytd": [0],
"ytdvsbudget": [0],
});
}
;
DistributionComponent.prototype.ngOnInit = function () {
if (sessionStorage.getItem('token') != null && sessionStorage.getItem('token') != '') {
this.spinner.show();
this.getDistributionData();
}
else {
this.router.navigateByUrl('/login');
}
};
DistributionComponent.prototype.getcheckbox = function () {
if (localStorage.getItem('custom:user_role') == 'manco user') {
if (document.getElementById('mark_MancoReview').checked == true) {
document.getElementById('Net_Monthly_inflows').readOnly = true;
document.getElementById('Net_YTD').readOnly = true;
document.getElementById('Budget').readOnly = true;
}
}
};
DistributionComponent.prototype.getDistributionData = function () {
var _this = this;
this.congnitoUserid = _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser;
var data = {
'action': 'getdistributionData',
'userid': this.congnitoUserid,
'month': Number(this.Param),
'year': Number(this.year),
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
if (res.data != null && res.data != '') {
if (_this.userRole == 'manco user') {
_this.DistributionForm.controls['distributionId'].setValue(res.data[0]['distributionId']);
_this.DistributionForm.controls['netmonthly'].setValue(res.data[0]['netmonthly']);
_this.DistributionForm.controls['netytd'].setValue(res.data[0]['netytd']);
_this.DistributionForm.controls['ytdvsbudget'].setValue(res.data[0]['ytdvsbudget']);
_this.netmonthly = res.data[0]['netmonthly'];
_this.netytd = res.data[0]['netytd'];
_this.ytdvsbudget = res.data[0]['ytdvsbudget'];
_this.CommonVari.distributionId = res.data[0]['distributionId'];
_this.CommonVari.netmonthly = res.data[0]['netmonthly'];
_this.CommonVari.netytd = res.data[0]['netytd'];
_this.CommonVari.ytdvsbudget = res.data[0]['ytdvsbudget'];
_this.netmonthly = res.data[0]['netmonthly'];
_this.netytd = res.data[0]['netytd'];
_this.ytdvsbudget = res.data[0]['ytdvsbudget'];
}
else {
_this.userid = res.data[0]['userid'];
_this.distributionId = res.data[0]['distributionId'];
_this.netmonthly = res.data[0]['netmonthly'];
_this.netytd = res.data[0]['netytd'];
_this.ytdvsbudget = res.data[0]['ytdvsbudget'];
_this.available_for_review = res.data[0]['available_for_review'];
_this.ined_director_review = res.data[0]['ined_director_review'];
_this.director_review = res.data[0]['director_review'];
}
}
else {
_this.distributionId = 0;
_this.netmonthly = 0;
_this.netytd = 0;
_this.ytdvsbudget = 0;
}
}
_this.spinner.hide();
}, function (error) { _this.getDistributionData(); _this.spinner.hide(); });
};
//function for call api for Review
DistributionComponent.prototype.CallReviw = function () {
this.submitData(this.DistributionForm.value);
};
DistributionComponent.prototype.submitData = function (value) {
var _this = this;
if (document.getElementById("mark_MancoReview").checked == false) {
var btn_1 = document.getElementById("submitData");
btn_1.innerText = "Processing...";
btn_1.disabled = true;
var data = this.DistributionForm.value;
data['available_for_review'] = false;
data['userid'] = _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser;
data['month'] = Number(this.Param);
data['year'] = Number(this.year);
data['director_review'] = false;
data['ined_director_review'] = false;
data['created_at'] = new Date().getTime();
data['updated_at'] = new Date().getTime();
data['action'] = 'savedistributionData';
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
toastr.success('Changes Saved', 'Success');
if (_this.userRole == 'manco user') {
_this.DistributionForm.controls['distributionId'].setValue(res.data['distributionId']);
_this.DistributionForm.controls['netmonthly'].setValue(res.data['netmonthly']);
_this.DistributionForm.controls['netytd'].setValue(res.data['netytd']);
_this.DistributionForm.controls['ytdvsbudget'].setValue(res.data['ytdvsbudget']);
}
else {
_this.userid = res.data[0]['userid'];
_this.distributionId = res.data[0]['distributionId'];
_this.netmonthly = res.data[0]['netmonthly'];
_this.netytd = res.data[0]['netytd'];
_this.ytdvsbudget = res.data[0]['ytdvsbudget'];
_this.available_for_review = res.data[0]['available_for_review'];
_this.ined_director_review = res.data[0]['ined_director_review'];
_this.director_review = res.data[0]['director_review'];
}
}
else {
_this.DistributionForm.controls['distributionId'].setValue(0);
_this.DistributionForm.controls['netmonthly'].setValue(0);
_this.DistributionForm.controls['netytd'].setValue(0);
_this.DistributionForm.controls['ytdvsbudget'].setValue(0);
}
btn_1.innerText = "Submit";
btn_1.disabled = false;
});
}
};
DistributionComponent.prototype.ReviewApi = function () {
var _this = this;
if (document.getElementById('Budget').readOnly == true) {
}
else {
// if (this.DistributionForm.value.netmonthly != '0' &&
// this.DistributionForm.value.netytd != '0' &&
// this.DistributionForm.value.ytdvsbudget != '0') {
sweetalert2__WEBPACK_IMPORTED_MODULE_5___default()({
title: 'Please change status from open to review.',
text: " ",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes'
}).then(function (result) {
if (result.value) {
sweetalert2__WEBPACK_IMPORTED_MODULE_5___default()('Successfully', 'Status changed to review.', 'success');
_this.submitData(_this.DistributionForm.value);
}
});
// } else {
// Swal('Update remaining field(s) data.');
// }
}
};
DistributionComponent.prototype.setColor = function () {
if (localStorage.getItem('custom:user_role') == 'manco user') {
if (document.getElementById('mark_MancoReview').checked != true) {
// if (
// (document.getElementById('Net_Monthly_inflows')).value != this.netmonthly ||
// (document.getElementById('Net_YTD')).value != this.netytd ||
// (document.getElementById('Budget')).value != this.ytdvsbudget
// ) {
// Swal({
// title: 'Are you sure?',
// text: "You won't be able to revert this!",
// type: 'warning',
// showCancelButton: true,
// confirmButtonColor: '#3085d6',
// cancelButtonColor: '#d33',
// confirmButtonText: 'Yes, delete it!'
// }).then((result) => {
// if (result.value) {
// Swal(
// 'Deleted!',
// 'Your file has been deleted.',
// 'success'
// )
// }
// })
// }
}
}
};
DistributionComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-distribution',
template: __webpack_require__(/*! ./distribution.component.html */ "./src/app/components/milestone/distribution/distribution.component.html"),
styles: [__webpack_require__(/*! ./distribution.component.css */ "./src/app/components/milestone/distribution/distribution.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_4__["CognitoUtil"],
_services_common_service__WEBPACK_IMPORTED_MODULE_3__["CommonService"],
ngx_spinner__WEBPACK_IMPORTED_MODULE_7__["NgxSpinnerService"]])
], DistributionComponent);
return DistributionComponent;
}());
/***/ }),
/***/ "./src/app/components/milestone/fund-risk/fund-risk.component.css":
/*!************************************************************************!*\
!*** ./src/app/components/milestone/fund-risk/fund-risk.component.css ***!
\************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "label.funds-breaching{\r\n width: 30px;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 3px 1px;\r\n text-align: center;\r\n}\r\nlabel.funds-liquidity ,label.funds-tracking{\r\n width: 30px;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 3px 1px;\r\n text-align: center;\r\n}\r\np {\r\n margin: 0 0 3px;\r\n}\r\n.tab_content_left {\r\n overflow-y: scroll;\r\n}"
/***/ }),
/***/ "./src/app/components/milestone/fund-risk/fund-risk.component.html":
/*!*************************************************************************!*\
!*** ./src/app/components/milestone/fund-risk/fund-risk.component.html ***!
\*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\r\n \r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n Loading...
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Organisational Effectiveness Dashboard \r\n
\r\n
\r\n
\r\n \r\n Fund Risk \r\n
\r\n\r\n
\r\n
\r\n
Fund Risk Oversight \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Save Changes \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n "
/***/ }),
/***/ "./src/app/components/milestone/fund-risk/fund-risk.component.ts":
/*!***********************************************************************!*\
!*** ./src/app/components/milestone/fund-risk/fund-risk.component.ts ***!
\***********************************************************************/
/*! exports provided: FundRiskComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FundRiskComponent", function() { return FundRiskComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _model_mothdetails__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../model/mothdetails */ "./src/app/model/mothdetails.ts");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var ngx_spinner__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-spinner */ "./node_modules/ngx-spinner/fesm5/ngx-spinner.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 FundRiskComponent = /** @class */ (function () {
function FundRiskComponent(router, fundform, cognitoUtil, common, spinner) {
this.router = router;
this.fundform = fundform;
this.cognitoUtil = cognitoUtil;
this.common = common;
this.spinner = spinner;
this.Monthdetails = new _model_mothdetails__WEBPACK_IMPORTED_MODULE_2__["Monthdetails"]();
this.year = window.location.href.substr(window.location.href.lastIndexOf('/') + 1);
this.title = 'Fund-Risk';
this.userRole = localStorage.getItem('custom:user_role');
this.monthNames = [
{},
{ 'id': '1', 'name': 'January' },
{ 'id': '2', 'name': 'February' },
{ 'id': '3', 'name': 'March' },
{ 'id': '4', 'name': 'April' },
{ 'id': '5', 'name': 'May' },
{ 'id': '6', 'name': 'June' },
{ 'id': '7', 'name': 'July' },
{ 'id': '8', 'name': 'August' },
{ 'id': '9', 'name': 'September' },
{ 'id': '10', 'name': 'October' },
{ 'id': '11', 'name': 'November' },
{ 'id': '12', 'name': 'December' }
];
this.data = new FormData();
this.userrole = localStorage.getItem('custom:user_role');
this.CurrentUrl = window.location.href;
this.result = this.CurrentUrl.split('/');
this.url = this.result[this.result.length - 3];
this.Param = this.result[this.result.length - 2];
// monthYear = this.Param;
this.monthYear = this.monthNames[this.Param];
this.user = this.cognitoUtil.getCurrentUser();
// this function for form declaration
this.FundRiskForm = fundform.group({
'fundriskId': '',
"fund_breaching_global_exposureLimits": 0,
'funds_with_liquidity_constraints': 0,
'fund_tracking_outside_error': 0,
});
}
FundRiskComponent.prototype.ngOnInit = function () {
if (sessionStorage.getItem('token') != null && sessionStorage.getItem('token') != null) {
this.spinner.show(); // loader show
//this.GetFileData(); // get file data
this.getFundRisk(); // get data
}
else {
this.router.navigateByUrl('/login');
}
};
FundRiskComponent.prototype.getFundRisk = function () {
var _this = this;
var data = {
'action': 'getsavefundriskData',
'userid': _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser,
'month': this.Param,
'year': this.year
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
//console.log(res);
if (res.status == '200') {
if (res.data != null && res.data != '') {
if ((localStorage.getItem('custom:user_role') == 'manco user') || (localStorage.getItem('custom:user_role') == 'Manco Head')) {
_this.FundRiskForm.controls['fundriskId'].setValue(res.data[0]['fundriskId']);
_this.FundRiskForm.controls['fund_breaching_global_exposureLimits'].setValue(res.data[0]['fund_breaching_global_exposureLimits']);
_this.FundRiskForm.controls['funds_with_liquidity_constraints'].setValue(res.data[0]['funds_with_liquidity_constraints']);
_this.FundRiskForm.controls['fund_tracking_outside_error'].setValue(res.data[0]['fund_tracking_outside_error']);
if (res.data[0].funds_breaching_Color == '#00b160') {
document.getElementById('funds-breaching').style.backgroundColor = res.data[0].funds_breaching_Color;
document.getElementById('funds-breaching_Color').checked = true;
}
else if (res.data[0].funds_breaching_Color == '#e56e0d') {
document.getElementById('funds-breaching').style.backgroundColor = res.data[0].funds_breaching_Color;
document.getElementById('funds-breaching_Color').checked = false;
}
console.log(res.data[0].funds_liquidity_color);
if (res.data[0].funds_liquidity_color == '#00b160') {
document.getElementById('funds-liquidity').style.backgroundColor = res.data[0].funds_liquidity_color;
document.getElementById('funds-liquidity_color').checked = true;
}
else if (res.data[0].funds_liquidity_color == '#e56e0d') {
document.getElementById('funds-liquidity').style.backgroundColor = res.data[0].funds_liquidity_color;
document.getElementById('funds-liquidity_color').checked = false;
}
if (res.data[0].funds_tracking_color == '#00b160') {
document.getElementById('funds-tracking').style.backgroundColor = res.data[0].funds_tracking_color;
document.getElementById('funds-tracking_color').checked = true;
}
else if (res.data[0].funds_tracking_color == '#e56e0d') {
document.getElementById('funds-tracking').style.backgroundColor = res.data[0].funds_tracking_color;
document.getElementById('funds-tracking_color').checked = false;
}
}
else {
_this.funds_RiskID = res.data[0]['fundriskId'];
_this.funds_breaching = res.data[0]['fund_breaching_global_exposureLimits'];
_this.funds_liquidity = res.data[0]['funds_with_liquidity_constraints'];
_this.funds_tracking = res.data[0]['fund_tracking_outside_error'];
_this.director_review = res.data[0]['director_review'];
_this.available_for_review = res.data[0]['available_for_review'];
_this.ined_director_review = res.data[0]['ined_director_review'];
_this.userIDs = res.data[0]['userid'];
if (res.data[0].funds_breaching_Color == '#00b160') {
document.getElementById('funds-breaching').style.backgroundColor = res.data[0].funds_breaching_Color;
}
else if (res.data[0].funds_breaching_Color == '#e56e0d') {
document.getElementById('funds-breaching').style.backgroundColor = res.data[0].funds_breaching_Color;
}
if (res.data[0].funds_liquidity_color == '#00b160') {
document.getElementById('funds-liquidity').style.backgroundColor = res.data[0].funds_liquidity_color;
}
else if (res.data[0].funds_liquidity_color == '#e56e0d') {
document.getElementById('funds-liquidity').style.backgroundColor = res.data[0].funds_liquidity_color;
}
if (res.data[0].funds_tracking_color == '#00b160') {
document.getElementById('funds-tracking').style.backgroundColor = res.data[0].funds_tracking_color;
}
else if (res.data[0].funds_tracking_color == '#e56e0d') {
document.getElementById('funds-tracking').style.backgroundColor = res.data[0].funds_tracking_color;
}
}
}
else {
}
}
else {
_this.funds_RiskID = 0;
_this.funds_breaching = 0;
_this.funds_liquidity = 0;
_this.funds_tracking = 0;
_this.ined_director_review = false;
_this.available_for_review = false;
_this.director_review = false;
toastr.error('Internal Server Error ');
}
_this.spinner.hide();
}, function (error) {
_this.getFundRisk();
_this.spinner.hide();
});
};
FundRiskComponent.prototype.getcheckbox = function () {
if ((localStorage.getItem('custom:user_role') == 'manco user') || (localStorage.getItem('custom:user_role') == 'Manco Head')) {
if (document.getElementById('mark_MancoReview').checked == true) {
document.getElementById('funds-breaching').readOnly = true;
document.getElementById('funds-liquidity').readOnly = true;
document.getElementById('funds-tracking').readOnly = true;
document.getElementById('fundriskId').readOnly = true;
var elem = document.getElementById("funds-tracking");
var elemEventHandler = function () { this.fundRiskApi(); };
elem.removeEventListener("blur", elemEventHandler, false);
}
}
};
// sweet alert for submit data
FundRiskComponent.prototype.fundRiskApi = function () {
if (document.getElementById('funds-tracking').readOnly == true) {
}
else {
// if (
// this.FundRiskForm.value.fund_breaching_global_exposureLimits != '0' &&
// this.FundRiskForm.value.funds_with_liquidity_constraints != '0' &&
// this.FundRiskForm.value.fund_tracking_outside_error != '0'
// ) {
// Swal({
// title: 'Please change status from open to review.',
// text: " ",
// type: 'warning',
// showCancelButton: true,
// confirmButtonColor: '#3085d6',
// cancelButtonColor: '#d33',
// confirmButtonText: 'Yes'
// }).then((result) => {
// if (result.value) {
// Swal(
// 'Successfully',
// 'Status changed to review.',
// 'success'
// )
this.submitForm(this.FundRiskForm.value);
//}
//})
// } else {
// Swal('Update remaining field(s) data.');
// }
}
};
FundRiskComponent.prototype.submitForm = function (value) {
var _this = this;
if (document.getElementById('funds-tracking').readOnly != true) {
var data = value;
if ((localStorage.getItem('custom:user_role') == 'manco user') || (localStorage.getItem('custom:user_role') == 'Manco Head')) {
this.userDataId = this.user['username'];
}
else {
this.userDataId = _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser;
}
if (document.getElementById('funds-breaching_Color').checked == true) {
this.funds_breaching_Color = '#00b160';
}
else if (document.getElementById('funds-breaching_Color').checked == false) {
this.funds_breaching_Color = '#e56e0d';
}
if (document.getElementById('funds-liquidity_color').checked == true) {
this.funds_liquidity_color = '#00b160';
}
else if (document.getElementById('funds-liquidity_color').checked == false) {
this.funds_liquidity_color = '#e56e0d';
}
if (document.getElementById('funds-tracking_color').checked == true) {
this.funds_tracking_color = '#00b160';
}
else if (document.getElementById('funds-tracking_color').checked == false) {
this.funds_tracking_color = '#e56e0d';
}
data['action'] = 'savefundrisk';
data['userid'] = _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser;
data['month'] = this.Param;
data['year'] = this.year;
data['funds_breaching_Color'] = this.funds_breaching_Color;
data['funds_liquidity_color'] = this.funds_breaching_Color;
data['funds_tracking_color'] = this.funds_tracking_color;
data['available_for_review'] = false,
data['director_review'] = false,
data['ined_director_review'] = false,
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
//console.log(res);
if (res.status == '200') {
if (res.message != null) {
if (_this.userRole == 'manco user') {
_this.FundRiskForm.controls['fundriskId'].setValue(res.data['fundriskId']);
_this.FundRiskForm.controls['fund_breaching_global_exposureLimits'].setValue(res.data['fund_breaching_global_exposureLimits']);
_this.FundRiskForm.controls['funds_with_liquidity_constraints'].setValue(res.data['funds_with_liquidity_constraints']);
_this.FundRiskForm.controls['fund_tracking_outside_error'].setValue(res.data['fund_tracking_outside_error']);
}
else {
_this.funds_RiskID = res.data['fundriskId'];
_this.funds_breaching = res.data['fund_breaching_global_exposureLimits'];
_this.funds_liquidity = res.data['funds_with_liquidity_constraints'];
_this.funds_tracking = res.data['fund_tracking_outside_error'];
_this.userIDs = res.data['userid'];
}
toastr.success('Changes Saved', 'Success');
}
else {
toastr.error('Internal Server Error ');
}
}
else {
toastr.error('Internal Server Error ');
}
});
}
};
FundRiskComponent.prototype.changeCOlor = function () {
if (document.getElementById('funds-breaching_Color').checked == true) {
document.getElementById('funds-breaching').style.backgroundColor = '#00b160';
}
else {
document.getElementById('funds-breaching').style.backgroundColor = '#e56e0d';
}
};
FundRiskComponent.prototype.changeCOlor2 = function () {
if (document.getElementById('funds-liquidity_color').checked == true) {
document.getElementById('funds-liquidity').style.backgroundColor = '#00b160';
}
else {
document.getElementById('funds-liquidity').style.backgroundColor = '#e56e0d';
}
};
FundRiskComponent.prototype.changeCOlor3 = function () {
if (document.getElementById('funds-tracking_color').checked == true) {
document.getElementById('funds-tracking').style.backgroundColor = '#00b160';
}
else {
document.getElementById('funds-tracking').style.backgroundColor = '#e56e0d';
}
};
FundRiskComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-fund-risk',
template: __webpack_require__(/*! ./fund-risk.component.html */ "./src/app/components/milestone/fund-risk/fund-risk.component.html"),
styles: [__webpack_require__(/*! ./fund-risk.component.css */ "./src/app/components/milestone/fund-risk/fund-risk.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_5__["CognitoUtil"],
_services_common_service__WEBPACK_IMPORTED_MODULE_4__["CommonService"],
ngx_spinner__WEBPACK_IMPORTED_MODULE_7__["NgxSpinnerService"]])
], FundRiskComponent);
return FundRiskComponent;
}());
/***/ }),
/***/ "./src/app/components/milestone/internal-audit/internal-audit.component.css":
/*!**********************************************************************************!*\
!*** ./src/app/components/milestone/internal-audit/internal-audit.component.css ***!
\**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".fund_inner_block .fund_form_detail label.capital_adequacy {\r\n width: 45px;\r\n float: left;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 7px 1px;\r\n text-align: center;\r\n}\r\n.fund_inner_block .fund_form_detail label.capital_budget {\r\n width: 45px;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 7px 0px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n}"
/***/ }),
/***/ "./src/app/components/milestone/internal-audit/internal-audit.component.html":
/*!***********************************************************************************!*\
!*** ./src/app/components/milestone/internal-audit/internal-audit.component.html ***!
\***********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = " \r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n Loading...
\r\n \r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Organisational Effectiveness Dashboard \r\n
\r\n
\r\n
\r\n \r\n Internal Audit \r\n
\r\n
\r\n
\r\n
Internal Audit \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n "
/***/ }),
/***/ "./src/app/components/milestone/internal-audit/internal-audit.component.ts":
/*!*********************************************************************************!*\
!*** ./src/app/components/milestone/internal-audit/internal-audit.component.ts ***!
\*********************************************************************************/
/*! exports provided: InternalAuditComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InternalAuditComponent", function() { return InternalAuditComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! sweetalert2 */ "./node_modules/sweetalert2/dist/sweetalert2.all.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var ngx_spinner__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-spinner */ "./node_modules/ngx-spinner/fesm5/ngx-spinner.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 InternalAuditComponent = /** @class */ (function () {
function InternalAuditComponent(router, fundform, cognitoUtil, common, spinner) {
this.router = router;
this.fundform = fundform;
this.cognitoUtil = cognitoUtil;
this.common = common;
this.spinner = spinner;
this.year = window.location.href.substr(window.location.href.lastIndexOf('/') + 1);
this.title = 'Internal Audit';
this.userRole = localStorage.getItem('custom:user_role');
this.monthNames = [
{},
{ 'id': '1', 'name': 'January' },
{ 'id': '2', 'name': 'February' },
{ 'id': '3', 'name': 'March' },
{ 'id': '4', 'name': 'April' },
{ 'id': '5', 'name': 'May' },
{ 'id': '6', 'name': 'June' },
{ 'id': '7', 'name': 'July' },
{ 'id': '8', 'name': 'August' },
{ 'id': '9', 'name': 'September' },
{ 'id': '10', 'name': 'October' },
{ 'id': '11', 'name': 'November' },
{ 'id': '12', 'name': 'December' }
];
this.CurrentUrl = window.location.href;
this.result = this.CurrentUrl.split('/');
this.url = this.result[this.result.length - 3];
this.Param = this.result[this.result.length - 2];
// monthYear = this.Param;
this.monthYear = this.monthNames[this.Param];
this.data = new FormData();
this.user = this.cognitoUtil.getCurrentUser();
this.arrayFilename = [];
this.InternalAuditForm = fundform.group({
'internalAuditId': '',
"priority_one_items": [0],
'priority_two_items': [0],
});
}
InternalAuditComponent.prototype.ngOnInit = function () {
if (sessionStorage.getItem('token') != null && sessionStorage.getItem('token') != '') {
this.spinner.show();
this.getFundRisk();
//this.GetFileData();
}
else {
this.router.navigateByUrl('/login');
}
this.internalAuditId = '';
this.priority_one_items = 0;
this.priority_two_items = 0;
};
InternalAuditComponent.prototype.popup = function () {
var element = document.getElementById("qnimate");
element.classList.add("popup-box-on");
//document.getElementById("qnimate").className = "popup-box-on";
};
InternalAuditComponent.prototype.openFilepopup = function () {
document.getElementById("myDropdown").classList.toggle("show");
};
InternalAuditComponent.prototype.openpopup = function () {
document.getElementById("AdminmyDropdown").classList.toggle("show");
};
//function for call api for Review
InternalAuditComponent.prototype.CallReviw = function () {
this.submitForm(this.InternalAuditForm.value);
};
InternalAuditComponent.prototype.getFundRisk = function () {
var _this = this;
if ((localStorage.getItem('custom:user_role') == 'Manco Head') || (localStorage.getItem('custom:user_role') == 'Manco Head')) {
this.userDataId = this.user['username'];
}
else {
this.userDataId = _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser;
}
var data = {
'action': 'getInternalAuditData',
'userid': _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser,
'month': Number(this.Param),
'year': Number(this.year)
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
if (res.data != null && res.data != '') {
if ((localStorage.getItem('custom:user_role') == 'manco user') || (localStorage.getItem('custom:user_role') == 'Manco Head')) {
_this.InternalAuditForm.controls['internalAuditId'].setValue(res.data[0]['internalAuditId']);
_this.InternalAuditForm.controls['priority_one_items'].setValue(res.data[0]['priority_one_items']);
_this.InternalAuditForm.controls['priority_two_items'].setValue(res.data[0]['priority_two_items']);
}
else {
_this.mancoUserid = res.data[0]['userid'];
_this.internalAuditId = res.data[0]['internalAuditId'];
_this.priority_one_items = res.data[0]['priority_one_items'];
_this.priority_two_items = res.data[0]['priority_two_items'];
_this.available_for_review = res.data[0]['available_for_review'];
_this.director_review = res.data[0]['director_review'];
_this.ined_director_review = res.data[0]['ined_director_review'];
}
}
else {
if (_this.userRole == 'manco user') {
_this.InternalAuditForm.controls['internalAuditId'].setValue('');
_this.InternalAuditForm.controls['priority_one_items'].setValue('0');
_this.InternalAuditForm.controls['priority_two_items'].setValue('0');
}
else {
_this.internalAuditId = '';
_this.priority_one_items = 0;
_this.priority_two_items = 0;
// (document.getElementById("fund_review")).disabled = true;
}
}
}
else {
if (_this.userRole == 'manco user') {
_this.InternalAuditForm.controls['internalAuditId'].setValue('');
_this.InternalAuditForm.controls['priority_one_items'].setValue(0);
_this.InternalAuditForm.controls['priority_two_items'].setValue(0);
}
else {
}
}
_this.spinner.hide();
}, function (error) {
_this.getFundRisk();
_this.spinner.hide();
});
};
InternalAuditComponent.prototype.fundRiskApi = function () {
var _this = this;
if (document.getElementById('internal_priority2').readOnly == true) {
}
else {
//if (this.InternalAuditForm.value.priority_one_items != '0' && this.InternalAuditForm.value.priority_two_items != '0') {
sweetalert2__WEBPACK_IMPORTED_MODULE_5___default()({
title: 'Please change status from open to review.',
text: " ",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes'
}).then(function (result) {
if (result.value) {
sweetalert2__WEBPACK_IMPORTED_MODULE_5___default()('Successfully', 'Status changed to review.', 'success');
_this.submitForm(_this.InternalAuditForm.value);
}
});
// } else {
// Swal('Update remaining field(s) data.');
// }
}
};
InternalAuditComponent.prototype.submitForm = function (value) {
var _this = this;
if (document.getElementById('mark_MancoReview').checked == false) {
var data = value;
if (localStorage.getItem('custom:user_role') == 'administrator') {
this.userDataId = _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser;
}
else if ((localStorage.getItem('custom:user_role') == 'manco user') || (localStorage.getItem('custom:user_role') == 'Manco Head')) {
this.userDataId = this.user['username'];
}
var btn_1 = document.getElementById("submitData");
btn_1.innerText = "Processing...";
btn_1.disabled = true;
data['action'] = 'saveInternalAuditData';
data['userid'] = _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser;
data['month'] = Number(this.Param);
data['year'] = Number(this.year);
data['created_at'] = new Date().getTime();
data['updated_at'] = new Date().getTime();
data['available_for_review'] = false;
data['director_review'] = false;
data['ined_director_review'] = false;
console.log(data);
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
if (res.message != null) {
if (_this.userRole == 'administrator') {
_this.internalAuditId = res.data['internalAuditId'];
_this.priority_one_items = res.data['priority_one_items'];
_this.priority_two_items = res.data['priority_two_items'];
}
else if (_this.userRole == 'manco user') {
_this.InternalAuditForm.controls['internalAuditId'].setValue(res.data['internalAuditId']);
_this.InternalAuditForm.controls['priority_one_items'].setValue(res.data['priority_one_items']);
_this.InternalAuditForm.controls['priority_two_items'].setValue(res.data['priority_two_items']);
}
toastr.success('Changes Saved', 'Success');
}
else {
//toastr.error(res.data);
}
}
else {
if (_this.userRole == 'administrator') {
_this.internalAuditId = '0';
_this.priority_one_items = '0';
_this.priority_two_items = '0';
}
else if (_this.userRole == 'manco user') {
_this.InternalAuditForm.controls['internalAuditId'].setValue('0');
_this.InternalAuditForm.controls['priority_one_items'].setValue('0');
_this.InternalAuditForm.controls['priority_two_items'].setValue('0');
}
// toastr.error(res.data);
}
btn_1.innerText = "Submit";
btn_1.disabled = false;
});
}
};
InternalAuditComponent.prototype.Review = function () {
var _this = this;
if (this.userRole == 'administrator') {
}
else {
if (this.userRole == 'director') {
if (document.getElementById('fund_review').checked == true) {
this.AdminReviews = true;
}
else {
this.AdminReviews = false;
}
}
else {
this.AdminReviews = this.director_review;
}
if (this.userRole == 'OED INED Director') {
if (document.getElementById('fund_review').checked == true) {
this.inedDirectorDreview = true;
}
else {
//this.inedDirectorDreview = false;
this.inedDirectorDreview = this.ined_director_review;
}
}
else {
this.inedDirectorDreview = this.ined_director_review;
}
if ((this.director_review == 'true' && this.inedDirectorDreview == 'true') || (this.ined_director_review == 'true' && this.AdminReviews == 'true')) {
this.available_for_review = true;
}
var data = {
'internalAuditId': this.internalAuditId,
'priority_one_items': this.priority_one_items,
'priority_two_items': this.priority_two_items,
'available_for_review': this.available_for_review,
'director_review': this.AdminReviews,
'ined_director_review': this.inedDirectorDreview,
'userid': _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser,
'month': Number(this.Param),
'year': Number(this.year),
'action': 'saveInternalAuditData'
};
//console.log(data);
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var res = JSON.parse(response.body);
if (res.message != null && res.message != '') {
if (_this.userRole == 'administrator') {
if (res.data['director_review'] == 'true') {
document.getElementById('fund_review').checked = true;
}
}
else if (_this.userRole == 'oed inded director') {
if (res.data['ined_director_review'] == 'true') {
document.getElementById('fund_review').checked = true;
}
}
toastr.success('Successfully Updated ');
}
else {
toastr.error('Internal Error ');
}
});
}
};
InternalAuditComponent.prototype.MancoReview = function () {
if (this.InternalAuditForm.value.priority_one_items != '0' && this.InternalAuditForm.value.priority_two_items != '0') {
if (document.getElementById('mark_MancoReview').checked == true) {
this.mancoUserReview = true;
}
else {
this.mancoUserReview = false;
}
var data = this.InternalAuditForm.value;
data['userid'] = _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser;
data['month'] = Number(this.Param);
data['year'] = Number(this.year);
data['available_for_review'] = this.mancoUserReview;
data['director_review'] = false;
data['ined_director_review'] = false;
data['created_at'] = new Date().getTime();
data['updated_at'] = new Date().getTime();
data['action'] = 'saveInternalAuditData';
//console.log(data);
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var res = JSON.parse(response.body);
if (res.status == '200') {
if (res.data['available_for_review'] == true) {
document.getElementById('mark_MancoReview').checked = true;
document.getElementById('internal_priority').readOnly = true;
document.getElementById('internal_priority2').readOnly = true;
}
else {
document.getElementById('internal_priority').readOnly = false;
document.getElementById('internal_priority2').readOnly = false;
}
toastr.success('successfully Updated');
}
else {
toastr.error('Internal Server Error');
}
});
}
else {
sweetalert2__WEBPACK_IMPORTED_MODULE_5___default()('Update remaining field(s) data.');
}
};
InternalAuditComponent.prototype.getcheckbox = function () {
if ((localStorage.getItem('custom:user_role') == 'manco user') || (localStorage.getItem('custom:user_role') == 'Manco Head')) {
if (document.getElementById('mark_MancoReview').checked == true) {
//(document.getElementById('internalAuditId')).readOnly = true;
document.getElementById('internal_priority').readOnly = true;
document.getElementById('internal_priority2').readOnly = true;
}
}
};
InternalAuditComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-internal-audit',
template: __webpack_require__(/*! ./internal-audit.component.html */ "./src/app/components/milestone/internal-audit/internal-audit.component.html"),
styles: [__webpack_require__(/*! ./internal-audit.component.css */ "./src/app/components/milestone/internal-audit/internal-audit.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_4__["CognitoUtil"],
_services_common_service__WEBPACK_IMPORTED_MODULE_3__["CommonService"],
ngx_spinner__WEBPACK_IMPORTED_MODULE_7__["NgxSpinnerService"]])
], InternalAuditComponent);
return InternalAuditComponent;
}());
/***/ }),
/***/ "./src/app/components/milestone/investmentmanagement/investmentmanagement.component.css":
/*!**********************************************************************************************!*\
!*** ./src/app/components/milestone/investmentmanagement/investmentmanagement.component.css ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\r\nselect#investment7{\r\n width: 100%;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 14px 11px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n /* border-radius: 22px; */\r\n outline: none;\r\n font-size: 16px;\r\n}\r\nlabel.capital_adequacy {\r\n width: 45px;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 7px 0px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n}\r\n.tab_content_left .tab-content {\r\n float: left;\r\n width: 100%;\r\n height: 100%;\r\n overflow-y: scroll !important;\r\n}"
/***/ }),
/***/ "./src/app/components/milestone/investmentmanagement/investmentmanagement.component.html":
/*!***********************************************************************************************!*\
!*** ./src/app/components/milestone/investmentmanagement/investmentmanagement.component.html ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = " \r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n Loading...
\r\n \r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Organisational Effectiveness Dashboard \r\n
\r\n
\r\n
\r\n \r\n Investment Management \r\n
\r\n
\r\n
\r\n
Under Performers \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n {{three_month_underperformers}} \r\n \r\n 0 \r\n \r\n IM with 3 month under performers \r\n
\r\n
\r\n \r\n {{one_year_underperformers}} \r\n \r\n 0 \r\n \r\n IM with 1 year under performers \r\n
\r\n
\r\n \r\n {{three_year_underperformers}} \r\n \r\n 0 \r\n \r\n IM with 3 year under performers \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
Out Performers \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n {{three_month_outperformers}} \r\n \r\n 0 \r\n \r\n IM with 3 month out performers \r\n
\r\n
\r\n \r\n {{one_year_outperformers}} \r\n \r\n 0 \r\n \r\n IM with 1 year out performers \r\n
\r\n
\r\n \r\n {{three_year_outperformers}} \r\n \r\n 0 \r\n \r\n IM with 3 year out performers \r\n
\r\n
\r\n \r\n
\r\n\r\n \r\n
\r\n
\r\n
Due Diligence \r\n \r\n
\r\n
\r\n \r\n Due\r\n Diligence Tracker:Progress Satisfactory \r\n Due\r\n Diligence outstanding, remedial action in progress \r\n \r\n
\r\n
\r\n Submit \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n Due\r\n Diligence Tracker:Progress Satisfactory \r\n Due\r\n Diligence outstanding, remedial action in progress \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n "
/***/ }),
/***/ "./src/app/components/milestone/investmentmanagement/investmentmanagement.component.ts":
/*!*********************************************************************************************!*\
!*** ./src/app/components/milestone/investmentmanagement/investmentmanagement.component.ts ***!
\*********************************************************************************************/
/*! exports provided: InvestmentmanagementComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InvestmentmanagementComponent", function() { return InvestmentmanagementComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! sweetalert2 */ "./node_modules/sweetalert2/dist/sweetalert2.all.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var ngx_spinner__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-spinner */ "./node_modules/ngx-spinner/fesm5/ngx-spinner.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 InvestmentmanagementComponent = /** @class */ (function () {
function InvestmentmanagementComponent(router, InvestmentFormform, cognitoUtil, common, spinner) {
this.router = router;
this.InvestmentFormform = InvestmentFormform;
this.cognitoUtil = cognitoUtil;
this.common = common;
this.spinner = spinner;
this.year = window.location.href.substr(window.location.href.lastIndexOf('/') + 1);
this.title = 'Investment Mangement';
this.userRole = localStorage.getItem('custom:user_role');
this.monthNames = [
{},
{ 'id': '1', 'name': 'January' },
{ 'id': '2', 'name': 'February' },
{ 'id': '3', 'name': 'March' },
{ 'id': '4', 'name': 'April' },
{ 'id': '5', 'name': 'May' },
{ 'id': '6', 'name': 'June' },
{ 'id': '7', 'name': 'July' },
{ 'id': '8', 'name': 'August' },
{ 'id': '9', 'name': 'September' },
{ 'id': '10', 'name': 'October' },
{ 'id': '11', 'name': 'November' },
{ 'id': '12', 'name': 'December' }
];
this.CurrentUrl = window.location.href;
this.result = this.CurrentUrl.split('/');
this.url = this.result[this.result.length - 3];
this.Param = this.result[this.result.length - 2];
// monthYear = this.Param;
this.monthYear = this.monthNames[this.Param];
this.userIds = this.cognitoUtil.getCurrentUser();
this.data = new FormData();
this.arrayFilename = [];
this.InvestmentForm = InvestmentFormform.group({
'investmentId': '',
'three_month_underperformers': 0,
'one_year_underperformers': 0,
'three_year_underperformers': 0,
'three_month_outperformers': 0,
'one_year_outperformers': 0,
'three_year_outperformers': 0,
'due_delligence': 'Due Diligence Progress Satisfactory'
});
}
InvestmentmanagementComponent.prototype.ngOnInit = function () {
if (sessionStorage.getItem('token') != null && sessionStorage.getItem('token') != '') {
this.spinner.show();
this.getData();
}
else {
this.router.navigateByUrl('/login');
}
};
InvestmentmanagementComponent.prototype.investment = function (value) {
if (value == "Due Diligence Progress Satisfactory") {
document.getElementById('investment7').style.backgroundColor = "green";
}
else if (value == "Due Diligence outstanding") {
document.getElementById('investment7').style.backgroundColor = "orange";
}
};
// Review Alert by manco user 1 Please change status from open to review.
InvestmentmanagementComponent.prototype.ReviewApi = function () {
var _this = this;
if (document.getElementById('mark_MancoReview').checked != true) {
// if (
// this.InvestmentForm.value.three_month_underperformers != '0' &&
// this.InvestmentForm.value.one_year_underperformers != '0' &&
// this.InvestmentForm.value.three_year_underperformers != '0' &&
// this.InvestmentForm.value.three_month_outperformers != '0' &&
// this.InvestmentForm.value.one_year_outperformers != '0' &&
// this.InvestmentForm.value.three_year_outperformers != '0'
// ) {
sweetalert2__WEBPACK_IMPORTED_MODULE_5___default()({
title: 'Save the changes.',
text: " ",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes'
}).then(function (result) {
if (result.value) {
sweetalert2__WEBPACK_IMPORTED_MODULE_5___default()('Successfully', 'Status changed to review.', 'success');
_this.submitForm(_this.InvestmentForm.value);
}
});
// } else {
// Swal('Update remaining field(s) data.');
// }
}
};
InvestmentmanagementComponent.prototype.ReviewApi1 = function () {
var _this = this;
if (document.getElementById('mark_MancoReview').checked != true) {
// if (
// this.InvestmentForm.value.three_month_underperformers != '0' &&
// this.InvestmentForm.value.one_year_underperformers != '0' &&
// this.InvestmentForm.value.three_year_underperformers != '0' &&
// this.InvestmentForm.value.three_month_outperformers != '0' &&
// this.InvestmentForm.value.one_year_outperformers != '0' &&
// this.InvestmentForm.value.three_year_outperformers != '0'
// ) {
sweetalert2__WEBPACK_IMPORTED_MODULE_5___default()({
title: 'Please change status from open to review.',
text: " ",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes'
}).then(function (result) {
if (result.value) {
sweetalert2__WEBPACK_IMPORTED_MODULE_5___default()('Successfully', 'Status changed to review.', 'success');
_this.submitForm(_this.InvestmentForm.value);
}
});
// } else {
// Swal('Update remaining field(s) data.');
// }
}
};
InvestmentmanagementComponent.prototype.submitForm = function (value) {
var _this = this;
if (document.getElementById('mark_MancoReview').checked != true) {
var btn_1 = document.getElementById("submitData");
btn_1.innerText = "Processing...";
btn_1.disabled = true;
var data = value;
data['available_for_review'] = false;
data['director_review'] = false;
data['ined_director_review'] = false;
data['userid'] = _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser;
data['month'] = Number(this.Param);
data['year'] = Number(this.year);
data['created_at'] = new Date().getTime();
data['updated_at'] = new Date().getTime();
data['action'] = 'saveInvetmentmanagementData';
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
_this.InvestmentForm.controls['investmentId'].setValue(res.data['investmentId']);
_this.InvestmentForm.controls['three_month_underperformers'].setValue(res.data['three_month_underperformers']);
_this.InvestmentForm.controls['one_year_underperformers'].setValue(res.data['one_year_underperformers']);
_this.InvestmentForm.controls['three_year_underperformers'].setValue(res.data['three_year_underperformers']);
_this.InvestmentForm.controls['three_month_outperformers'].setValue(res.data['three_month_outperformers']);
_this.InvestmentForm.controls['one_year_outperformers'].setValue(res.data['one_year_outperformers']);
_this.InvestmentForm.controls['three_year_outperformers'].setValue(res.data['three_year_outperformers']);
_this.InvestmentForm.controls['due_delligence'].setValue(res.data['due_delligence']);
if (res.data['due_delligence'] == "Due Diligence Progress Satisfactory") {
document.getElementById('investment7').style.backgroundColor = "#00b160";
}
else if (res.data['due_delligence'] == "Due Diligence outstanding") {
document.getElementById('investment7').style.backgroundColor = "orange";
}
toastr.success('Changes Saved', 'Success');
}
btn_1.innerText = "Submit";
btn_1.disabled = false;
});
}
};
/************** function for Get data **************** */
InvestmentmanagementComponent.prototype.getData = function () {
var _this = this;
if ((localStorage.getItem('custom:user_role') == 'manco user') || localStorage.getItem('custom:user_role') == 'Manco Head') {
this.UserId = this.userIds['username'];
}
else {
this.UserId = _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser;
}
var data = {
'userid': _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser,
'month': Number(this.Param),
'year': Number(this.year),
'action': 'getInvestmentMangData'
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
if (res.data != null && res.data != '') {
if ((_this.userRole == 'manco user') || _this.userRole == 'Manco Head') {
_this.InvestmentForm.controls['investmentId'].setValue(res.data[0]['investmentId']);
_this.UserId = res.data[0]['userid'];
_this.InvestmentForm.controls['three_month_underperformers'].setValue(res.data[0]['three_month_underperformers']);
_this.InvestmentForm.controls['one_year_underperformers'].setValue(res.data[0]['one_year_underperformers']);
_this.InvestmentForm.controls['three_year_underperformers'].setValue(res.data[0]['three_year_underperformers']);
_this.InvestmentForm.controls['three_month_outperformers'].setValue(res.data[0]['three_month_outperformers']);
_this.InvestmentForm.controls['one_year_outperformers'].setValue(res.data[0]['one_year_outperformers']);
_this.InvestmentForm.controls['three_year_outperformers'].setValue(res.data[0]['three_year_outperformers']);
_this.InvestmentForm.controls['due_delligence'].setValue(res.data[0]['due_delligence']);
if (res.data[0]['due_delligence'] == "Due Diligence Progress Satisfactory") {
document.getElementById('investment7').style.backgroundColor = "#00b160";
}
else if (res.data[0]['due_delligence'] == "Due Diligence outstanding") {
document.getElementById('investment7').style.backgroundColor = "orange";
}
}
else {
_this.investmentId = res.data[0]['investmentId'];
_this.UserId = res.data[0]['userid'];
_this.three_month_underperformers = res.data[0]['three_month_underperformers'];
_this.one_year_underperformers = res.data[0]['one_year_underperformers'];
_this.three_year_underperformers = res.data[0]['three_year_underperformers'];
_this.three_month_outperformers = res.data[0]['three_month_outperformers'];
_this.one_year_outperformers = res.data[0]['one_year_outperformers'];
_this.three_year_outperformers = res.data[0]['three_year_outperformers'];
_this.director_review = res.data[0]['director_review'];
_this.available_for_review = res.data[0]['available_for_review'];
_this.ined_director_review = res.data[0]['ined_director_review'];
_this.due_delligence = res.data[0]['due_delligence'];
_this.InvestmentForm.controls['due_delligence'].setValue(res.data[0]['due_delligence']);
if (res.data[0]['due_delligence'] == "Due Diligence Progress Satisfactory") {
document.getElementById('investment7').style.backgroundColor = "#00b160";
}
else if (res.data[0]['due_delligence'] == "Due Diligence outstanding") {
document.getElementById('investment7').style.backgroundColor = "orange";
}
$('.fund_form_detail select').attr('disabled', 'true');
}
}
else {
}
}
else {
}
_this.spinner.hide();
}, function (error) { _this.getData(); _this.spinner.hide(); });
// console.log('read')
};
InvestmentmanagementComponent.prototype.CallReviw = function () {
this.submitForm(this.InvestmentForm.value);
};
InvestmentmanagementComponent.prototype.popup = function () {
var element = document.getElementById("qnimate");
element.classList.add("popup-box-on");
//document.getElementById("qnimate").className = "popup-box-on";
};
InvestmentmanagementComponent.prototype.openFilepopup = function () {
document.getElementById("myDropdown").classList.toggle("show");
};
InvestmentmanagementComponent.prototype.openpopup = function () {
document.getElementById("AdminmyDropdown").classList.toggle("show");
};
InvestmentmanagementComponent.prototype.AdminAPi = function () {
var data = {
'action': 'saveInvetmentmanagementData',
'investmentId': this.investmentId,
'userid': _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser,
'three_month_underperformers': this.three_month_underperformers,
'one_year_underperformers': this.one_year_underperformers,
'three_year_underperformers': this.three_year_underperformers,
'three_month_outperformers': this.three_month_outperformers,
'one_year_outperformers': this.one_year_outperformers,
'three_year_outperformers': this.three_year_outperformers,
'director_review': this.director_review,
'available_for_review': this.available_for_review,
'ined_director_review': this.ined_director_review,
'due_delligence': this.due_delligence,
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var res = JSON.parse(response.body);
if (res.status == '200') {
}
else {
}
});
};
InvestmentmanagementComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-investmentmanagement',
template: __webpack_require__(/*! ./investmentmanagement.component.html */ "./src/app/components/milestone/investmentmanagement/investmentmanagement.component.html"),
styles: [__webpack_require__(/*! ./investmentmanagement.component.css */ "./src/app/components/milestone/investmentmanagement/investmentmanagement.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_4__["CognitoUtil"],
_services_common_service__WEBPACK_IMPORTED_MODULE_3__["CommonService"],
ngx_spinner__WEBPACK_IMPORTED_MODULE_7__["NgxSpinnerService"]])
], InvestmentmanagementComponent);
return InvestmentmanagementComponent;
}());
/***/ }),
/***/ "./src/app/components/milestone/navbar/comments-box/comments-box.component.css":
/*!*************************************************************************************!*\
!*** ./src/app/components/milestone/navbar/comments-box/comments-box.component.css ***!
\*************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "textarea#additionalComment {\r\n width: 100%;\r\n float: left;\r\n margin-bottom: 15px;\r\n}\r\n.fund_form_detail textarea{\r\n width: 100%;\r\n float: left;\r\n margin-bottom: 15px;\r\n}\r\ndiv#commentboxData {\r\n float: left;\r\n width: 100%;\r\n border: 1px solid black;\r\n padding: 16px;\r\n height: 180px;\r\n overflow-y: scroll;\r\n}\r\n"
/***/ }),
/***/ "./src/app/components/milestone/navbar/comments-box/comments-box.component.html":
/*!**************************************************************************************!*\
!*** ./src/app/components/milestone/navbar/comments-box/comments-box.component.html ***!
\**************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\r\n
\r\n
\r\n
Additional Detail \r\n \r\n
\r\n
\r\n
"
/***/ }),
/***/ "./src/app/components/milestone/navbar/comments-box/comments-box.component.ts":
/*!************************************************************************************!*\
!*** ./src/app/components/milestone/navbar/comments-box/comments-box.component.ts ***!
\************************************************************************************/
/*! exports provided: CommentsBoxComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommentsBoxComponent", function() { return CommentsBoxComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var CommentsBoxComponent = /** @class */ (function () {
function CommentsBoxComponent(router, fundform, cognitoUtil, common) {
this.router = router;
this.fundform = fundform;
this.cognitoUtil = cognitoUtil;
this.common = common;
this.user = this.cognitoUtil.getCurrentUser();
this.data = new FormData();
this.year = window.location.href.substr(window.location.href.lastIndexOf('/') + 1);
this.title = 'Capital and Financial';
this.userRole = localStorage.getItem('custom:user_role');
//commentBox: any;
this.monthNames = [
{},
{ 'id': '1', 'name': 'January' },
{ 'id': '2', 'name': 'February' },
{ 'id': '3', 'name': 'March' },
{ 'id': '4', 'name': 'April' },
{ 'id': '5', 'name': 'May' },
{ 'id': '6', 'name': 'June' },
{ 'id': '7', 'name': 'July' },
{ 'id': '8', 'name': 'August' },
{ 'id': '9', 'name': 'September' },
{ 'id': '10', 'name': 'October' },
{ 'id': '11', 'name': 'November' },
{ 'id': '12', 'name': 'December' }
];
this.CurrentUrl = window.location.href;
this.result = this.CurrentUrl.split('/');
this.url = this.result[this.result.length - 3];
this.Param = this.result[this.result.length - 2];
//this.CommentData = new EventEmitter();
this.CommentForm = fundform.group({
'tiles_id': '',
"comment": [null, _angular_forms__WEBPACK_IMPORTED_MODULE_1__["Validators"].required],
});
}
CommentsBoxComponent.prototype.ngOnInit = function () {
this.getTilesName();
this.getCommentData();
};
CommentsBoxComponent.prototype.NewCommentData = function (message) {
console.log(message);
};
CommentsBoxComponent.prototype.getTilesName = function () {
if (this.url == 'RegulatoryMonths') {
this.tilesName = 'Regulatory Compliance';
}
else if (this.url == 'FundRiskMonths') {
this.tilesName = 'Fund Risk';
}
else if (this.url == 'OperationalRiskMonths') {
this.tilesName = 'Operational Risk';
}
else if (this.url == 'CapitalFinancialMonths') {
this.tilesName = 'Capital and Financial';
}
else if (this.url == 'InternalAuditMonths') {
this.tilesName = 'Internal Audit';
}
else if (this.url == 'InvestmentmanagementMonths') {
this.tilesName = 'Investment Management';
}
else if (this.url == 'ResourcingMonths') {
this.tilesName = 'Resourcing';
}
else if (this.url == 'OrganisationMonths') {
this.tilesName = 'Organisational Effectiveness';
}
else if (this.url == 'DistributionMonths') {
this.tilesName = 'Distribution';
}
};
CommentsBoxComponent.prototype.submitForm = function (value) {
var _this = this;
this.getTilesName();
var data = value;
data['action'] = 'saveTilesComment';
data['userid'] = this.user['username'];
data['tiles_name'] = this.tilesName;
data['month'] = this.Param;
data['year'] = this.year;
data['created_at'] = new Date().getTime();
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var ResData = JSON.parse(response._body);
var Response = JSON.parse(ResData.body);
if (Response.status == '200') {
_this.CommentData = Response.data;
_this.CommentForm.controls['tiles_id'].setValue(_this.CommentData['tiles_id']);
toastr.success('Additional Detail Successfully Submitted');
}
else {
//console.log(Response.message);
}
});
};
CommentsBoxComponent.prototype.getCommentData = function () {
var _this = this;
var data = {
'tiles_name': this.tilesName,
'month': this.Param,
'year': this.year,
'action': 'getTilesComment'
};
this.common.GetUserdataBYheaders(data)
.subscribe(function (response) {
var resdata = JSON.parse(response._body);
var res = JSON.parse(resdata.body);
if (res.status == '200') {
_this.commentBox = res.data;
_this.CommentData = res.data[0];
if (res.data != null && res.data != '') {
if (_this.userRole == 'manco user' || _this.userRole == 'Manco Head') {
_this.CommentForm.controls['tiles_id'].setValue(_this.CommentData['tiles_id']);
_this.CommentForm.controls['comment'].setValue(_this.CommentData['comment']);
}
}
}
else {
//console.log(res);
}
}, function (error) {
//console.clear();
_this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resdata = JSON.parse(response._body);
var res = JSON.parse(resdata.body);
if (res.status == '200') {
_this.commentBox = res.data;
_this.CommentData = res.data[0];
if (res.data != null && res.data != '') {
if (_this.userRole == 'manco user') {
_this.CommentForm.controls['tiles_id'].setValue(_this.CommentData['tiles_id']);
_this.CommentForm.controls['comment'].setValue(_this.CommentData['comment']);
}
}
}
else {
//console.log(res);
}
});
});
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CommentsBoxComponent.prototype, "CommentData", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CommentsBoxComponent.prototype, "tiles_id", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Object)
], CommentsBoxComponent.prototype, "commentBox", void 0);
CommentsBoxComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-comments-box',
template: __webpack_require__(/*! ./comments-box.component.html */ "./src/app/components/milestone/navbar/comments-box/comments-box.component.html"),
styles: [__webpack_require__(/*! ./comments-box.component.css */ "./src/app/components/milestone/navbar/comments-box/comments-box.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"],
_angular_forms__WEBPACK_IMPORTED_MODULE_1__["FormBuilder"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_4__["CognitoUtil"],
_services_common_service__WEBPACK_IMPORTED_MODULE_3__["CommonService"]])
], CommentsBoxComponent);
return CommentsBoxComponent;
}());
/***/ }),
/***/ "./src/app/components/milestone/navbar/message-report/message-report.component.css":
/*!*****************************************************************************************!*\
!*** ./src/app/components/milestone/navbar/message-report/message-report.component.css ***!
\*****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".page-title {\r\n float: left;\r\n width: 100%;\r\n text-align: center;\r\n font-size: 45px;\r\n line-height: 55px;\r\n font-weight: 200;\r\n padding: 40px 0;\r\n text-transform: uppercase;\r\n border-top: 1px solid #008ad1;\r\n border-bottom: 1px solid #008ad1;\r\n color:#008ad1;\r\n}\r\n#inner-wrapper {\r\n float: left;\r\n width: 100%;\r\n padding: 28px 0;\r\n}\r\n#inner-wrapper #orderdetailpage {\r\n float: left;\r\n width: 100%;\r\n}\r\n.page-content {\r\n float: left;\r\n width: 100%;\r\n}\r\n.chatFixedHeightContainer {\r\n float: none;\r\n display: table;\r\n margin: 20px auto;\r\n height: 250px;\r\n width: 100%;\r\n padding: 3px;\r\n background: #008ad1;\r\n color: #fff;\r\n}\r\n.chatFixedHeightContainer h2 {\r\n font-size: 20px;\r\n padding: 0 20px;\r\n margin: 20px 0px;\r\n}\r\n/************ css for alert message ***********************/\r\n.msg_req {\r\n float: left;\r\n width: 100%;\r\n}\r\n.msg_req .alert.alert-danger {\r\n float: left;\r\n width: 50%;\r\n margin-top: 9px;\r\n}\r\nbutton#mssgchatformsubmit{\r\n background-color: #008ad1;\r\n color: #fff;\r\n font-size: 15px;\r\n float: left;\r\n height: 40px;\r\n font-weight: 300;\r\n padding: 0px 70px;\r\n margin: 10px 0;\r\n border: none;\r\n cursor: pointer;\r\n transition-delay: 0s;\r\n transition-duration: 0.8s;\r\n transition-timing-function: ease-in-out;\r\n border: 1px solid transparent;\r\n}\r\n/**************************/\r\n.chatContent {\r\n height: 224px;\r\n overflow: auto;\r\n background: #fff;\r\n}\r\n.chatContent {\r\n padding: 0px 20px;\r\n}\r\n#orderdetailpage .chat-history {\r\n height: 252px;\r\n padding: 8px 24px;\r\n /* overflow-y: scroll; */\r\n}\r\n#orderdetailpage .chat-message {\r\n margin: 16px 0;\r\n}\r\n#orderdetailpage .chat-message img {\r\n border-radius: 50%;\r\n float: left;\r\n}\r\nimg {\r\n max-width: 100%;\r\n}\r\n#orderdetailpage .chat-message-content {\r\n margin-left: 56px;\r\n color: #000;\r\n}\r\n#orderdetailpage .chat-time {\r\n float: right;\r\n font-size: 10px;\r\n}\r\n#inner-wrapper label {\r\n float: left;\r\n width: 100%;\r\n font-size: 15px;\r\n line-height: 15px;\r\n font-weight: 300;\r\n margin-top: 10px;\r\n}\r\n#inner-wrapper textarea {\r\n border: 1px solid #008ad1;\r\n float: left;\r\n width: 50%;\r\n margin: 5px 0;\r\n padding: 10px;\r\n font-size: 15px;\r\n line-height: 15px;\r\n}\r\ntextarea {\r\n font-family: 'Tw Cen MT';\r\n}\r\n#inner-wrapper input[type=\"submit\"] {\r\n background-color: #008ad1;\r\n color: #fff;\r\n font-size: 15px;\r\n float: left;\r\n height: 40px;\r\n font-weight: 300;\r\n padding: 0px 70px;\r\n margin: 10px 0;\r\n border: none;\r\n cursor: pointer;\r\n transition-delay: 0s;\r\n transition-duration: 0.8s;\r\n transition-timing-function: ease-in-out;\r\n border: 1px solid transparent;\r\n}\r\n#inner-wrapper input[type=\"submit\"]:hover {\r\n background-color: #fff;\r\n color: #008ad1;\r\n border: 1px solid #008ad1;\r\n transition-delay: 0s;\r\n transition-duration: 0.8s;\r\n transition-timing-function: ease-in-out;\r\n}\r\n.send-msg {\r\n float: left;\r\n width: 100%;\r\n}\r\n/****Message box new design css */\r\n.back_btn {\r\n float: right;\r\n padding: 12px 0px;\r\n font-size: 20px;\r\n position: absolute;\r\n right: 0;\r\n top: 92px;\r\n margin-right: 9%;\r\n color: black;\r\n font-family: Roboto, 'Segoe UI', Tahoma, sans-serif;\r\n}\r\n#frame {\r\n width: 100%;\r\n padding: 5%;\r\n min-width: 360px;\r\n max-width: 1000px;\r\n height: 92vh;\r\n min-height: 300px;\r\n max-height: 720px;\r\n background: #E6EAEA;\r\n }\r\n@media screen and (max-width: 360px) {\r\n #frame {\r\n width: 100%;\r\n height: 100vh;\r\n }\r\n }\r\n#frame #sidepanel {\r\n float: left;\r\n min-width: 280px;\r\n max-width: 340px;\r\n width: 40%;\r\n height: 100%;\r\n background: #2c3e50;\r\n color: #f5f5f5;\r\n overflow: hidden;\r\n position: relative;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel {\r\n width: 58px;\r\n min-width: 58px;\r\n }\r\n }\r\n#frame #sidepanel #profile {\r\n width: 80%;\r\n margin: 25px auto;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile {\r\n width: 100%;\r\n margin: 0 auto;\r\n padding: 5px 0 0 0;\r\n background: #32465a;\r\n }\r\n }\r\n#frame #sidepanel #profile.expanded .wrap {\r\n height: 210px;\r\n line-height: initial;\r\n }\r\n#frame #sidepanel #profile.expanded .wrap p {\r\n margin-top: 20px;\r\n }\r\n#frame #sidepanel #profile.expanded .wrap i.expand-button {\r\n -webkit-transform: scaleY(-1);\r\n transform: scaleY(-1);\r\n -webkit-filter: FlipH;\r\n filter: FlipH;\r\n -ms-filter: \"FlipH\";\r\n }\r\n#frame #sidepanel #profile .wrap {\r\n height: 60px;\r\n line-height: 60px;\r\n overflow: hidden;\r\n transition: 0.3s height ease;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap {\r\n height: 55px;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap img {\r\n width: 60px;\r\n border-radius: 50%;\r\n padding: 3px;\r\n border: 2px solid #e74c3c;\r\n height: auto;\r\n float: left;\r\n cursor: pointer;\r\n transition: 0.3s border ease;\r\n height: 50px;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap img {\r\n width: 40px;\r\n margin-left: 4px;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap img.online {\r\n border: 2px solid #2ecc71;\r\n }\r\n#frame #sidepanel #profile .wrap img.away {\r\n border: 2px solid #f1c40f;\r\n }\r\n#frame #sidepanel #profile .wrap img.busy {\r\n border: 2px solid #e74c3c;\r\n }\r\n#frame #sidepanel #profile .wrap img.offline {\r\n border: 2px solid #95a5a6;\r\n }\r\n#frame #sidepanel #profile .wrap p {\r\n float: left;\r\n margin-left: 15px;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap p {\r\n display: none;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap i.expand-button {\r\n float: right;\r\n margin-top: 23px;\r\n font-size: 0.8em;\r\n cursor: pointer;\r\n color: #435f7a;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap i.expand-button {\r\n display: none;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap #status-options {\r\n position: absolute;\r\n opacity: 0;\r\n visibility: hidden;\r\n width: 150px;\r\n margin: 70px 0 0 0;\r\n border-radius: 6px;\r\n z-index: 99;\r\n line-height: initial;\r\n background: #435f7a;\r\n transition: 0.3s all ease;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options {\r\n width: 58px;\r\n margin-top: 57px;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap #status-options.active {\r\n opacity: 1;\r\n visibility: visible;\r\n margin: 75px 0 0 0;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options.active {\r\n margin-top: 62px;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap #status-options:before {\r\n content: '';\r\n position: absolute;\r\n width: 0;\r\n height: 0;\r\n border-left: 6px solid transparent;\r\n border-right: 6px solid transparent;\r\n border-bottom: 8px solid #435f7a;\r\n margin: -8px 0 0 24px;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options:before {\r\n margin-left: 23px;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul {\r\n overflow: hidden;\r\n border-radius: 6px;\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li {\r\n padding: 15px 0 30px 18px;\r\n display: block;\r\n cursor: pointer;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options ul li {\r\n padding: 15px 0 35px 22px;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li:hover {\r\n background: #496886;\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li span.status-circle {\r\n position: absolute;\r\n width: 10px;\r\n height: 10px;\r\n border-radius: 50%;\r\n margin: 5px 0 0 0;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options ul li span.status-circle {\r\n width: 14px;\r\n height: 14px;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li span.status-circle:before {\r\n content: '';\r\n position: absolute;\r\n width: 14px;\r\n height: 14px;\r\n margin: -3px 0 0 -3px;\r\n background: transparent;\r\n border-radius: 50%;\r\n z-index: 0;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options ul li span.status-circle:before {\r\n height: 18px;\r\n width: 18px;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li p {\r\n padding-left: 12px;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options ul li p {\r\n display: none;\r\n }\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li#status-online span.status-circle {\r\n background: #2ecc71;\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li#status-online.active span.status-circle:before {\r\n border: 1px solid #2ecc71;\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li#status-away span.status-circle {\r\n background: #f1c40f;\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li#status-away.active span.status-circle:before {\r\n border: 1px solid #f1c40f;\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li#status-busy span.status-circle {\r\n background: #e74c3c;\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li#status-busy.active span.status-circle:before {\r\n border: 1px solid #e74c3c;\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li#status-offline span.status-circle {\r\n background: #95a5a6;\r\n }\r\n#frame #sidepanel #profile .wrap #status-options ul li#status-offline.active span.status-circle:before {\r\n border: 1px solid #95a5a6;\r\n }\r\n#frame #sidepanel #profile .wrap #expanded {\r\n padding: 100px 0 0 0;\r\n display: block;\r\n line-height: initial !important;\r\n }\r\n#frame #sidepanel #profile .wrap #expanded label {\r\n float: left;\r\n clear: both;\r\n margin: 0 8px 5px 0;\r\n padding: 5px 0;\r\n }\r\n#frame #sidepanel #profile .wrap #expanded input {\r\n border: none;\r\n margin-bottom: 6px;\r\n background: #32465a;\r\n border-radius: 3px;\r\n color: #f5f5f5;\r\n padding: 7px;\r\n width: calc(100% - 43px);\r\n }\r\n#frame #sidepanel #profile .wrap #expanded input:focus {\r\n outline: none;\r\n background: #435f7a;\r\n }\r\n#frame #sidepanel #search {\r\n border-top: 1px solid #32465a;\r\n border-bottom: 1px solid #32465a;\r\n font-weight: 300;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #search {\r\n display: none;\r\n }\r\n }\r\n#frame #sidepanel #search label {\r\n position: absolute;\r\n margin: 10px 0 0 20px;\r\n }\r\n#frame #sidepanel #search input {\r\n font-family: \"proxima-nova\", \"Source Sans Pro\", sans-serif;\r\n padding: 10px 0 10px 46px;\r\n width: calc(100% - 25px);\r\n border: none;\r\n background: #32465a;\r\n color: #f5f5f5;\r\n }\r\n#frame #sidepanel #search input:focus {\r\n outline: none;\r\n background: #435f7a;\r\n }\r\n#frame #sidepanel #search input::-webkit-input-placeholder {\r\n color: #f5f5f5;\r\n }\r\n#frame #sidepanel #search input::-moz-placeholder {\r\n color: #f5f5f5;\r\n }\r\n#frame #sidepanel #search input:-ms-input-placeholder {\r\n color: #f5f5f5;\r\n }\r\n#frame #sidepanel #search input:-moz-placeholder {\r\n color: #f5f5f5;\r\n }\r\n#frame #sidepanel #contacts {\r\n height: calc(100% - 177px);\r\n overflow-y: scroll;\r\n overflow-x: hidden;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #contacts {\r\n height: calc(100% - 149px);\r\n overflow-y: scroll;\r\n overflow-x: hidden;\r\n }\r\n #frame #sidepanel #contacts::-webkit-scrollbar {\r\n display: none;\r\n }\r\n }\r\n#frame #sidepanel #contacts.expanded {\r\n height: calc(100% - 334px);\r\n }\r\n#frame #sidepanel #contacts::-webkit-scrollbar {\r\n width: 8px;\r\n background: #2c3e50;\r\n }\r\n#frame #sidepanel #contacts::-webkit-scrollbar-thumb {\r\n background-color: #243140;\r\n }\r\n#frame #sidepanel #contacts ul li.contact {\r\n position: relative;\r\n padding: 10px 0 15px 0;\r\n font-size: 0.9em;\r\n cursor: pointer;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #contacts ul li.contact {\r\n padding: 6px 0 46px 8px;\r\n }\r\n }\r\n#frame #sidepanel #contacts ul li.contact:hover {\r\n background: #32465a;\r\n }\r\n#frame #sidepanel #contacts ul li.contact.active {\r\n background: #32465a;\r\n border-right: 5px solid #435f7a;\r\n }\r\n#frame #sidepanel #contacts ul li.contact.active span.contact-status {\r\n border: 2px solid #32465a !important;\r\n }\r\n#frame #sidepanel #contacts ul li.contact .wrap {\r\n width: 88%;\r\n margin: 0 auto;\r\n position: relative;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #contacts ul li.contact .wrap {\r\n width: 100%;\r\n }\r\n }\r\n#frame #sidepanel #contacts ul li.contact .wrap span {\r\n position: absolute;\r\n left: 0;\r\n margin: -2px 0 0 -2px;\r\n width: 10px;\r\n height: 10px;\r\n border-radius: 50%;\r\n border: 2px solid #2c3e50;\r\n background: #95a5a6;\r\n }\r\n#frame #sidepanel #contacts ul li.contact .wrap span.online {\r\n background: #2ecc71;\r\n }\r\n#frame #sidepanel #contacts ul li.contact .wrap span.away {\r\n background: #f1c40f;\r\n }\r\n#frame #sidepanel #contacts ul li.contact .wrap span.busy {\r\n background: #e74c3c;\r\n }\r\n#frame #sidepanel #contacts ul li.contact .wrap img {\r\n width: 40px;\r\n border-radius: 50%;\r\n float: left;\r\n margin-right: 10px;\r\n height: 40px;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #contacts ul li.contact .wrap img {\r\n margin-right: 0px;\r\n }\r\n }\r\n#frame #sidepanel #contacts ul li.contact .wrap .meta {\r\n padding: 5px 0 0 0;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #contacts ul li.contact .wrap .meta {\r\n display: none;\r\n }\r\n }\r\n#frame #sidepanel #contacts ul li.contact .wrap .meta .name {\r\n font-weight: 600;\r\n }\r\n#frame #sidepanel #contacts ul li.contact .wrap .meta .preview {\r\n margin: 5px 0 0 0;\r\n padding: 0 0 1px;\r\n font-weight: 400;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n transition: 1s all ease;\r\n }\r\n#frame #sidepanel #contacts ul li.contact .wrap .meta .preview span {\r\n position: initial;\r\n border-radius: initial;\r\n background: none;\r\n border: none;\r\n padding: 0 2px 0 0;\r\n margin: 0 0 0 1px;\r\n opacity: .5;\r\n }\r\n#frame #sidepanel #bottom-bar {\r\n position: absolute;\r\n width: 100%;\r\n bottom: 0;\r\n }\r\n#frame #sidepanel #bottom-bar button {\r\n float: left;\r\n border: none;\r\n width: 50%;\r\n padding: 10px 0;\r\n background: #32465a;\r\n color: #f5f5f5;\r\n cursor: pointer;\r\n font-size: 0.85em;\r\n font-family: \"proxima-nova\", \"Source Sans Pro\", sans-serif;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #bottom-bar button {\r\n float: none;\r\n width: 100%;\r\n padding: 15px 0;\r\n }\r\n }\r\n#frame #sidepanel #bottom-bar button:focus {\r\n outline: none;\r\n }\r\n#frame #sidepanel #bottom-bar button:nth-child(1) {\r\n border-right: 1px solid #2c3e50;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #bottom-bar button:nth-child(1) {\r\n border-right: none;\r\n border-bottom: 1px solid #2c3e50;\r\n }\r\n }\r\n#frame #sidepanel #bottom-bar button:hover {\r\n background: #435f7a;\r\n }\r\n#frame #sidepanel #bottom-bar button i {\r\n margin-right: 3px;\r\n font-size: 1em;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #bottom-bar button i {\r\n font-size: 1.3em;\r\n }\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame #sidepanel #bottom-bar button span {\r\n display: none;\r\n }\r\n }\r\n#frame .content {\r\n float: right;\r\n width: 60%;\r\n height: 100%;\r\n overflow: hidden;\r\n position: relative;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame .content {\r\n width: calc(100% - 58px);\r\n /* min-width: 300px !important;*/\r\n }\r\n }\r\n@media screen and (min-width: 900px) {\r\n #frame .content {\r\n width: calc(100% - 340px);\r\n }\r\n }\r\n#frame .content .contact-profile {\r\n width: 100%;\r\n height: 60px;\r\n line-height: 60px;\r\n background: #f5f5f5;\r\n }\r\n#frame .content .contact-profile img {\r\n width: 40px;\r\n height: 40px;\r\n border-radius: 50%;\r\n float: left;\r\n margin: 9px 12px 0 9px;\r\n }\r\n#frame .content .contact-profile p {\r\n float: left;\r\n }\r\n#frame .content .contact-profile .social-media {\r\n float: right;\r\n }\r\n#frame .content .contact-profile .social-media i {\r\n margin-left: 14px;\r\n cursor: pointer;\r\n }\r\n#frame .content .contact-profile .social-media i:nth-last-child(1) {\r\n margin-right: 20px;\r\n }\r\n#frame .content .contact-profile .social-media i:hover {\r\n color: #435f7a;\r\n }\r\n#frame .content .messages {\r\n height: auto;\r\n min-height: calc(100% - 93px);\r\n max-height: calc(100% - 93px);\r\n overflow-y: scroll;\r\n overflow-x: hidden;\r\n width: 100%;\r\n float: left;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame .content .messages {\r\n max-height: calc(100% - 105px);\r\n }\r\n }\r\n#frame .content .messages::-webkit-scrollbar {\r\n width: 8px;\r\n background: transparent;\r\n }\r\n#frame .content .messages::-webkit-scrollbar-thumb {\r\n background-color: rgba(0, 0, 0, 0.3);\r\n }\r\n#frame .content .messages ul li {\r\n display: inline-block;\r\n clear: both;\r\n float: left;\r\n margin: 15px 15px 5px 15px;\r\n width: calc(100% - 25px);\r\n font-size: 0.9em;\r\n }\r\n#frame .content .messages ul li:nth-last-child(1) {\r\n margin-bottom: 20px;\r\n }\r\n#frame .content .messages ul li.sent img {\r\n margin: 5px 8px 0 0;\r\n }\r\n#frame .content .messages ul li.sent p {\r\n background: #435f7a;\r\n color: #f5f5f5;\r\n }\r\n#frame .content .messages ul li.replies img {\r\n float: right;\r\n margin: 5px 0 0 8px;\r\n }\r\n#frame .content .messages ul li.replies p {\r\n background: #f5f5f5;\r\n float: right;\r\n }\r\n#frame .content .messages ul li img {\r\n width: 30px;\r\n border-radius: 50%;\r\n float: left;\r\n height: 28PX;\r\n }\r\n#frame .content .messages ul li p {\r\n display: inline-block;\r\n padding: 10px 15px;\r\n border-radius: 20px;\r\n max-width: 205px;\r\n line-height: 130%;\r\n }\r\n@media screen and (min-width: 735px) {\r\n #frame .content .messages ul li p {\r\n max-width: 300px;\r\n }\r\n }\r\n#frame .content .message-input {\r\n position: absolute;\r\n bottom: 0;\r\n width: 100%;\r\n z-index: 99;\r\n }\r\n#frame .content .message-input .wrap {\r\n position: relative;\r\n }\r\n#frame .content .message-input .wrap input {\r\n font-family: \"proxima-nova\", \"Source Sans Pro\", sans-serif;\r\n float: left;\r\n border: none;\r\n width: calc(100% - 90px);\r\n padding: 11px 32px 10px 8px;\r\n font-size: 0.8em;\r\n color: #32465a;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame .content .message-input .wrap input {\r\n padding: 15px 32px 16px 8px;\r\n }\r\n }\r\n#frame .content .message-input .wrap input:focus {\r\n outline: none;\r\n }\r\n#frame .content .message-input .wrap .attachment {\r\n position: absolute;\r\n right: 60px;\r\n z-index: 4;\r\n margin-top: 10px;\r\n font-size: 1.1em;\r\n color: #435f7a;\r\n opacity: .5;\r\n cursor: pointer;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame .content .message-input .wrap .attachment {\r\n margin-top: 17px;\r\n right: 65px;\r\n }\r\n }\r\n#frame .content .message-input .wrap .attachment:hover {\r\n opacity: 1;\r\n }\r\n#frame .content .message-input .wrap button {\r\n float: right;\r\n border: none;\r\n width: 50px;\r\n padding: 12px 0;\r\n cursor: pointer;\r\n background: #32465a;\r\n color: #f5f5f5;\r\n }\r\n@media screen and (max-width: 735px) {\r\n #frame .content .message-input .wrap button {\r\n padding: 16px 0;\r\n }\r\n }\r\n#frame .content .message-input .wrap button:hover {\r\n background: #435f7a;\r\n }\r\n#frame .content .message-input .wrap button:focus {\r\n outline: none;\r\n }"
/***/ }),
/***/ "./src/app/components/milestone/navbar/message-report/message-report.component.html":
/*!******************************************************************************************!*\
!*** ./src/app/components/milestone/navbar/message-report/message-report.component.html ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = " \r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Organisational Effectiveness Scorecard \r\n
\r\n
\r\n
\r\n \r\n Admin Chatbox \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
{{userName}} {{LastuserName}}
\r\n
\r\n
\r\n
\r\n \r\n \r\n Online
\r\n \r\n \r\n \r\n Away
\r\n \r\n \r\n \r\n Busy
\r\n \r\n \r\n \r\n Offline
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n "
/***/ }),
/***/ "./src/app/components/milestone/navbar/message-report/message-report.component.ts":
/*!****************************************************************************************!*\
!*** ./src/app/components/milestone/navbar/message-report/message-report.component.ts ***!
\****************************************************************************************/
/*! exports provided: MessageReportComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MessageReportComponent", function() { return MessageReportComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! aws-sdk/clients/s3 */ "./node_modules/aws-sdk/clients/s3.js");
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../../environments/environment */ "./src/environments/environment.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var MessageReportComponent = /** @class */ (function () {
function MessageReportComponent(router, message, cognitoUtil, common) {
this.router = router;
this.message = message;
this.cognitoUtil = cognitoUtil;
this.common = common;
this.title = 'Message Report';
this.year = window.location.href.substr(window.location.href.lastIndexOf('/') + 1);
this.userRole = localStorage.getItem('custom:user_role');
this.monthNames = [
{},
{ 'id': '1', 'name': 'January' },
{ 'id': '2', 'name': 'February' },
{ 'id': '3', 'name': 'March' },
{ 'id': '4', 'name': 'April' },
{ 'id': '5', 'name': 'May' },
{ 'id': '6', 'name': 'June' },
{ 'id': '7', 'name': 'July' },
{ 'id': '8', 'name': 'August' },
{ 'id': '9', 'name': 'September' },
{ 'id': '10', 'name': 'October' },
{ 'id': '11', 'name': 'November' },
{ 'id': '12', 'name': 'December' }
];
this.userrole = localStorage.getItem('custom:user_role');
this.userName = localStorage.getItem('custom:first_name');
this.LastuserName = localStorage.getItem('custom:last_name');
this.url = window.location.href;
this.result = this.url.split('/');
this.user = this.cognitoUtil.getCurrentUser();
this.days_arr = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
this.currentTime = new Date();
this.fullTime = this.currentTime.getTime();
this.fullyear = this.currentTime.getFullYear();
this.getMonth = this.currentTime.getMonth();
this.getDate = this.currentTime.getDate();
this.getHours = this.currentTime.getHours();
this.getMinutes = this.currentTime.getMinutes();
this.getDay = this.days_arr[this.currentTime.getDay()];
this.ResultData = [];
this.Newurl = window.location.href;
this.Newresult = this.url.split('/');
this.NewlastAttribute = this.result[this.result.length - 1];
this.NEwParam = this.result[this.result.length - 2];
this.Newmonth = this.result[this.result.length - 3];
this.NEwNagtive = this.result[this.result.length - 4];
this.Director = [];
this.OEDINEDDirector = [];
this.Administrator = [];
this.FOLDER = 'assets/MessageReport';
this.userreplymchatform = message.group({
'userid': this.user['username'],
'query': ['', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
});
}
MessageReportComponent.prototype.ngOnInit = function () {
if (localStorage.getItem('profile') != '' && localStorage.getItem('profile') != null) {
this.profile = localStorage.getItem('profile');
}
else {
this.profile = 'assets/images/3x.png';
}
this.years = this.result[this.result.length - 2];
this.monthYear = this.monthNames[this.result[this.result.length - 3]];
this.Params = this.result[this.result.length - 4];
this.LastAttribute = this.result[this.result.length - 1];
this.getTilesName();
this.GetDirectorList();
// if (this.ResultData != null || this.ResultData != '') {
// this.timer = setInterval(() => {
// this.getMessageData();
// }, 5000);
// }
// this.getMessageData();
};
MessageReportComponent.prototype.ngOnDestroy = function () {
clearInterval(this.timer);
};
MessageReportComponent.prototype.getTilesName = function () {
if (this.Params == 'RegulatoryMonths') {
this.Param = 'Regulatory Compliance';
}
else if (this.Params == 'FundRiskMonths') {
this.Param = 'Fund-Risk';
}
else if (this.Params == 'OperationalRiskMonths') {
this.Param = 'Operational Risk';
}
else if (this.Params == 'CapitalFinancialMonths') {
this.Param = 'Capital and Financial';
}
else if (this.Params == 'InternalAuditMonths') {
this.Param = 'Internal Audit';
}
else if (this.Params == 'InvestmentmanagementMonths') {
this.Param = 'Investment Management';
}
else if (this.Params == 'ResourcingMonths') {
this.Param = 'Resourcing';
}
else if (this.Params == 'OrganisationMonths') {
this.Param = 'Organisational Effectiveness';
}
else if (this.Params == 'DistributionMonths') {
this.Param = 'Distribution';
}
};
MessageReportComponent.prototype.SendMessage = function (value) {
var _this = this;
var data = value;
data['action'] = 'actionPointQuery'; // Action for message
data['queryId'] = ''; // Message Id
data['queryFrom'] = this.userrole; //
data['queryFromID'] = this.user['username']; //
data['queryTo'] = this.SanlamUserRole; // Recevied message form user role and name
data['queryToID'] = this.SanlamUsername; //// Recevied message form user id
data['tile_name'] = this.Param; // current tiles name
data['month'] = this.monthYear.id; // title month
data['year'] = this.years; // title year
data['created_at'] = this.fullTime; // current time
data['updated_at'] = this.fullTime; // current time
data['directorid'] = this.SanlamUsername; // director id
data['to_from_id'] = this.user['username'] + '|' + this.SanlamUsername;
this.common.saveFundRiskData(data)
.subscribe(function (Response) {
var ResData = JSON.parse(Response._body);
var res = JSON.parse(ResData.body);
if (res.status == '200') {
var count = res.data.length;
_this.userreplymchatform.controls['query'].setValue('');
var arrayObj = [];
_this.ResultData = res.data;
}
else {
toastr.error(res.message);
}
});
};
MessageReportComponent.prototype.gotoback = function () {
this.router.navigate(['/admin/' + this.NEwNagtive + '/' + this.Newmonth + '/' + this.NEwParam]);
};
MessageReportComponent.prototype.getMessageData = function () {
var _this = this;
var data = {
'action': 'getUserallActionQuery',
'tile_name': this.Param,
'month': this.monthYear.id,
'year': this.years,
'userid': this.SanlamUsername,
'to_from_id': this.user['username'] + '|' + this.SanlamUsername,
};
this.common.saveFundRiskData(data)
.subscribe(function (Response) {
var ResData = JSON.parse(Response._body);
var res = JSON.parse(ResData.body);
var count = res.data.length;
_this.ResultData = res.data;
}, function (err) {
_this.common.saveFundRiskData(data)
.subscribe(function (Response) {
var ResData = JSON.parse(Response._body);
var res = JSON.parse(ResData.body);
var count = res.data.length;
_this.ResultData = res.data;
});
});
};
MessageReportComponent.prototype.getTIme = function (time) {
var _this = this;
time = localStorage.getItem('LastLogin');
var months_arr = ['Jan', 'Feb', 'March', 'April', 'May', 'June', 'July', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var days_arr = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
var date = new Date(this.time * 1000);
var year = date.getFullYear();
var dates = date.getDate();
var day = days_arr[date.getDay()];
var month = months_arr[date.getMonth()];
var hours = date.toLocaleTimeString();
var minutes = date.getMinutes();
this.time = day + ' , ' + month + ' , ' + dates + ' ' + year + ' ' + hours;
this.timer = setInterval(function () {
_this.getMessageData();
}, 10000);
var div = document.getElementById('messages');
div.scrollTop = div.scrollHeight;
};
MessageReportComponent.prototype.GetDirectorList = function () {
var _this = this;
var data = {
action: 'manoco_user_detail_hodside',
role: 'director'
};
this.common.saveFundRiskData(data)
.subscribe(function (Response) {
var ResData = JSON.parse(Response._body);
var UserDetails = JSON.parse(ResData.body);
if (UserDetails.status == '200') {
_this.Director = UserDetails.data;
_this.GetOEDINEDDirectorList();
}
else {
toastr.error(UserDetails.message);
}
});
};
MessageReportComponent.prototype.GetOEDINEDDirectorList = function () {
var _this = this;
var data = {
action: 'manoco_user_detail_hodside',
role: 'OED INED Director'
};
this.common.saveFundRiskData(data)
.subscribe(function (Response) {
var ResData = JSON.parse(Response._body);
var UserDetails = JSON.parse(ResData.body);
if (UserDetails.status == '200') {
_this.OEDINEDDirector = UserDetails.data;
_this.GetAdministratorList();
}
else {
toastr.error(UserDetails.message);
}
});
};
MessageReportComponent.prototype.GetAdministratorList = function () {
var _this = this;
var data = {
action: 'manoco_user_detail_hodside',
role: 'administrator'
};
this.common.saveFundRiskData(data)
.subscribe(function (Response) {
var ResData = JSON.parse(Response._body);
var UserDetails = JSON.parse(ResData.body);
if (UserDetails.status == '200') {
_this.Administrator = UserDetails.data;
}
else {
toastr.error(UserDetails.message);
}
});
};
MessageReportComponent.prototype.UserMessages = function (value) {
var _this = this;
$('.contact').removeClass('active');
$("#" + value['sanlamuserid']).addClass('active');
if (value['profile'] != '' && value['profile'] != null) {
this.userProfile = value['profile'];
}
else {
this.userProfile = 'assets/images/3x.png';
}
this.username = value['firstname'] + ' ' + value['lastname'];
this.SanlamUsername = value['username'];
this.SanlamUserRole = value['role'];
clearInterval(this.timer);
this.timer = setInterval(function () {
_this.getMessageData();
}, 10000);
this.getMessageData();
};
MessageReportComponent.prototype.fileEvent = function (event) {
var _this = this;
this.selectFIles = event.target.files[0];
var bucket = new aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_5__({
accessKeyId: _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].accessKeyId,
secretAccessKey: _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].secretAccessKey,
region: _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].S3region
});
var params = {
Bucket: 'sanlamapp-website',
Key: this.FOLDER + new Date().getTime() + '_' + this.selectFIles.name,
Body: this.selectFIles
};
bucket.upload(params, function (err, data) {
if (err) {
// console.log(err);
_this.errorMessage = err;
}
_this.imageFile = data['Location'];
var d = new Date();
var n = d.getTime();
var DocumentData = {
action: 'actionPointQuery',
queryId: '',
queryFrom: _this.userrole,
queryFromID: _this.user['username'],
queryTo: _this.SanlamUserRole,
queryToID: _this.SanlamUsername,
query: '',
tile_name: _this.Param,
month: _this.monthYear.id,
year: _this.years,
directorid: _this.SanlamUsername,
'to_from_id': _this.user['username'] + '|' + _this.SanlamUsername,
userid: _this.user['username'],
document_name: _this.selectFIles.name,
document_link: _this.imageFile
};
_this.common.saveFundRiskData(DocumentData)
.subscribe(function (res) {
// console.log(res);
});
});
};
MessageReportComponent.prototype.SendShareImage = function (event) {
document.getElementById('my_file').click();
};
MessageReportComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-message-report',
template: __webpack_require__(/*! ./message-report.component.html */ "./src/app/components/milestone/navbar/message-report/message-report.component.html"),
styles: [__webpack_require__(/*! ./message-report.component.css */ "./src/app/components/milestone/navbar/message-report/message-report.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_4__["CognitoUtil"],
_services_common_service__WEBPACK_IMPORTED_MODULE_3__["CommonService"]])
], MessageReportComponent);
return MessageReportComponent;
}());
/***/ }),
/***/ "./src/app/components/milestone/navbar/navbar/navbar.component.css":
/*!*************************************************************************!*\
!*** ./src/app/components/milestone/navbar/navbar/navbar.component.css ***!
\*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/components/milestone/navbar/navbar/navbar.component.html":
/*!**************************************************************************!*\
!*** ./src/app/components/milestone/navbar/navbar/navbar.component.html ***!
\**************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/components/milestone/navbar/navbar/navbar.component.ts":
/*!************************************************************************!*\
!*** ./src/app/components/milestone/navbar/navbar/navbar.component.ts ***!
\************************************************************************/
/*! exports provided: NavbarComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavbarComponent", function() { return NavbarComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _model_organisationalEffectiveness__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../model/organisationalEffectiveness */ "./src/app/model/organisationalEffectiveness.ts");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var NavbarComponent = /** @class */ (function () {
function NavbarComponent(router, common, cognito) {
this.router = router;
this.common = common;
this.cognito = cognito;
this.commons = _model_organisationalEffectiveness__WEBPACK_IMPORTED_MODULE_2__["OrganisationalEffectiveness"];
this.CommonsVari = new _model_organisationalEffectiveness__WEBPACK_IMPORTED_MODULE_2__["OrganisationalEffectiveness"]();
this.monthNames = [
{},
{ 'id': '1', 'name': 'January' },
{ 'id': '2', 'name': 'February' },
{ 'id': '3', 'name': 'March' },
{ 'id': '4', 'name': 'April' },
{ 'id': '5', 'name': 'May' },
{ 'id': '6', 'name': 'June' },
{ 'id': '7', 'name': 'July' },
{ 'id': '8', 'name': 'August' },
{ 'id': '9', 'name': 'September' },
{ 'id': '10', 'name': 'October' },
{ 'id': '11', 'name': 'November' },
{ 'id': '12', 'name': 'December' }
];
this.UrlLastAtribute = window.location.href.substr(window.location.href.lastIndexOf('/') + 1);
this.url = window.location.href;
this.result = this.url.split('/');
this.user = this.cognito.getCurrentUser();
this.checkValue = "Hello";
this.checkValues = [];
}
NavbarComponent.prototype.ngOnInit = function () {
if (window.location.href.substr(window.location.href.lastIndexOf('/') + 1) == 'chat') {
this.year = this.result[this.result.length - 2];
this.monthYear = this.result[this.result.length - 3];
this.Param = this.result[this.result.length - 4];
document.getElementById(this.Param).className = 'active';
}
else {
this.year = window.location.href.substr(window.location.href.lastIndexOf('/') + 1);
this.monthYear = this.result[this.result.length - 2];
this.Param = this.result[this.result.length - 3];
}
if (this.router.url == '/admin/' + this.Param + '/' + this.monthYear + '/' + this.year) {
document.getElementById(this.Param).className = 'active';
}
if (this.UrlLastAtribute == 'userchat') {
this.year = this.result[this.result.length - 2];
this.monthYear = this.result[this.result.length - 3];
this.Param = this.result[this.result.length - 4];
document.getElementById(this.Param).className = 'active';
}
if (this.UrlLastAtribute == 'MessageReport') {
this.year = this.result[this.result.length - 2];
this.monthYear = this.result[this.result.length - 3];
this.Param = this.result[this.result.length - 4];
document.getElementById(this.Param).className = 'active';
}
setTimeout(function () {
// console.log(localStorage.getItem('custom:user_role'));
$('.checking').attr('onkeypress', 'return(document.getElementById("url_value").value = "true")');
$('.fund_form_detail select').attr('onchange', 'return(document.getElementById("url_value").value = "true")');
if ((localStorage.getItem('custom:user_role') == 'manco user') || (localStorage.getItem('custom:user_role') == 'Manco Head')) {
// console.log('this Role is manco');
$('.fund_form_detail select').removeAttr('disabled');
}
else {
// console.log("this role is not manco");
$(".fund_form_detail select").attr('disabled', 'disabled');
}
}, 3000);
};
NavbarComponent.prototype.ngOnDestroy = function () {
clearInterval(this.checkking);
};
NavbarComponent.prototype.Hello = function (value) {
// if (localStorage.getItem('custom:user_role') == 'manco user') {
// this.getTileAccessList(value);
// }else{
this.router.navigate([value + this.monthYear + '/' + this.year]);
// }
};
NavbarComponent.prototype.CheckAner = function () {
var data = [];
if (document.getElementById('mark_MancoReview').checked == false) {
$(".checking ").change(function () {
data.push(true);
});
this.checkValues.push(data);
}
};
NavbarComponent.prototype.CheckUrl = function (value) {
if (localStorage.getItem('custom:user_role') == 'manco user') {
if ($('#url_value').val() == 'true') {
if (confirm('You have unsaved changes. Do you want to save changes? ')) {
$('#submitData').click();
}
}
this.Hello(value);
}
else {
this.Hello(value);
}
};
NavbarComponent.prototype.getTileAccessList = function (value) {
var _this = this;
var checkData;
var InsertRow;
var data = {
action: 'tileScanAccess',
year: this.year,
month: this.monthYear,
tileName: value,
};
this.common.AccessDenied(data).subscribe(function (response) {
if (response.status == "201") {
if (response.data != null && response.data != '') {
for (var i = 0; i < response.data.length; i++) {
if (response.data[i].status == '1') {
checkData = 1;
}
else {
InsertRow = 3;
}
}
if (checkData != null && checkData != '') {
toastr.error('Access denied ! ', 'Error!!');
}
else {
if (localStorage.getItem('AccessId') != null && localStorage.getItem('AccessId') != '') {
_this.UpdateTile({ tileName: value, id: localStorage.getItem('AccessId') });
}
else {
_this.AddTiles(value);
}
}
}
else {
if (localStorage.getItem('AccessId') != null && localStorage.getItem('AccessId') != '') {
_this.UpdateTile({ tileName: value, id: localStorage.getItem('AccessId') });
}
else {
_this.AddTiles(value);
}
_this.router.navigate([value + _this.monthYear + '/' + _this.year]);
}
}
});
};
NavbarComponent.prototype.AddTiles = function (value) {
var data = {
action: 'tileInsertAccess',
year: this.year,
month: this.monthYear,
tileName: value,
Id: "",
mancoUser: this.user['username'],
status: 1
};
this.common.AccessDenied(data).subscribe(function (checkTileAccessData) {
return localStorage.setItem('AccessId', checkTileAccessData.data.Id);
}, function (error) { return console.log('oops found', error); });
};
NavbarComponent.prototype.UpdateTile = function (value) {
var data = {
action: 'tileUpdateAccess',
year: this.year,
month: this.monthYear,
tileName: value.tileName,
Id: value.id,
mancoUser: this.user['username'],
status: 1
};
this.common.AccessDenied(data).subscribe(function (checkTileAccessData) { return console.log('success Upodated'); }, function (error) { return console.log('oops found', error); });
};
NavbarComponent.prototype.DeleteTilesAccess = function (id) {
var data = {
action: 'tileDeleteAccess',
Id: id
};
this.common.AccessDenied(data).subscribe(function (checkTileAccessData) { return console.log('success Released'); }, function (error) { return console.log('oops found', error); });
};
NavbarComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-navbar',
template: __webpack_require__(/*! ./navbar.component.html */ "./src/app/components/milestone/navbar/navbar/navbar.component.html"),
styles: [__webpack_require__(/*! ./navbar.component.css */ "./src/app/components/milestone/navbar/navbar/navbar.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"], _services_common_service__WEBPACK_IMPORTED_MODULE_3__["CommonService"], _services_cognito_service__WEBPACK_IMPORTED_MODULE_4__["CognitoUtil"]])
], NavbarComponent);
return NavbarComponent;
}());
/***/ }),
/***/ "./src/app/components/milestone/navbar/right-side-bar/right-side-bar.component.css":
/*!*****************************************************************************************!*\
!*** ./src/app/components/milestone/navbar/right-side-bar/right-side-bar.component.css ***!
\*****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "/* span.Filecount{\r\n background: #008ad1;\r\n color: #fff;\r\n padding: 0px 6px;\r\n height: 34px;\r\n float: left;\r\n border-radius: 50%;\r\n position: absolute;\r\n top: 38%;\r\n right: 37px;\r\n margin-right: 0;\r\n font-size: 24px;\r\n text-align: center;\r\n width: 28px;\r\n} */\r\n\r\n/*changing upload document in admin side*/\r\n\r\n/* input[type=checkbox], input[type=radio] {\r\n margin:0 !important;\r\n} */\r\n\r\n.hideClss {\r\n pointer-events: none ;\r\n display: none ;\r\n}\r\n\r\nspan.Filecount {\r\n background: #008ad1;\r\n color: #fff;\r\n padding: 0px 0px;\r\n height: 27px;\r\n float: right;\r\n border-radius: 50%;\r\n position: relative;\r\n top: 42%; \r\n /* right: 37px; */\r\n margin-right: 2px;\r\n font-size: 19px;\r\n text-align: center;\r\n width: 28px;\r\n}\r\n\r\n@media only screen and (max-width: 991px){\r\n span.Filecount {\r\n background: #008ad1;\r\n color: #fff;\r\n padding: 0px 5px;\r\n height: 30px;\r\n float: right;\r\n border-radius: 50%;\r\n position: relative;\r\n top: 33%;\r\n right: auto;\r\n margin-right: 5px;\r\n font-size: 21px;\r\n text-align: center;\r\n width: 29px;\r\n }\r\n}\r\n\r\n@media only screen and (max-width: 402px){\r\n span.Filecount {\r\n background: #008ad1;\r\n color: #fff;\r\n padding: 1px 6px;\r\n height: 20px;\r\n float: right;\r\n border-radius: 50%;\r\n position: relative;\r\n top: 29%;\r\n right: 14px;\r\n margin-top: 6px;\r\n font-size: 14px;\r\n text-align: center;\r\n width: 20px;\r\n }\r\n}\r\n"
/***/ }),
/***/ "./src/app/components/milestone/navbar/right-side-bar/right-side-bar.component.html":
/*!******************************************************************************************!*\
!*** ./src/app/components/milestone/navbar/right-side-bar/right-side-bar.component.html ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\r\n\r\n\r\n\r\n \r\n \r\n \r\n {{arrayFilename.length}} \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n Review Complete \r\n
\r\n \r\n \r\n \r\n Export Data \r\n
\r\n\r\n\r\n \r\n\r\n"
/***/ }),
/***/ "./src/app/components/milestone/navbar/right-side-bar/right-side-bar.component.ts":
/*!****************************************************************************************!*\
!*** ./src/app/components/milestone/navbar/right-side-bar/right-side-bar.component.ts ***!
\****************************************************************************************/
/*! exports provided: RightSideBarComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RightSideBarComponent", function() { return RightSideBarComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_user_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../services/user.service */ "./src/app/services/user.service.ts");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! aws-sdk/clients/s3 */ "./node_modules/aws-sdk/clients/s3.js");
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_7__);
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 jsPDF = __webpack_require__(/*! jspdf */ "./node_modules/jspdf/dist/jspdf.min.js");
__webpack_require__(/*! jspdf-autotable */ "./node_modules/jspdf-autotable/dist/jspdf.plugin.autotable.js");
var RightSideBarComponent = /** @class */ (function () {
function RightSideBarComponent(cognitoUtil, common, UserService, router, location) {
this.cognitoUtil = cognitoUtil;
this.common = common;
this.UserService = UserService;
this.router = router;
this.location = location;
this.year = window.location.href.substr(window.location.href.lastIndexOf('/') + 1);
this.title = 'Capital and Financial';
this.userRole = localStorage.getItem('custom:user_role');
this.monthNames = [
{},
{ 'id': '1', 'name': 'January' },
{ 'id': '2', 'name': 'February' },
{ 'id': '3', 'name': 'March' },
{ 'id': '4', 'name': 'April' },
{ 'id': '5', 'name': 'May' },
{ 'id': '6', 'name': 'June' },
{ 'id': '7', 'name': 'July' },
{ 'id': '8', 'name': 'August' },
{ 'id': '9', 'name': 'September' },
{ 'id': '10', 'name': 'October' },
{ 'id': '11', 'name': 'November' },
{ 'id': '12', 'name': 'December' }
];
this.CurrentUrl = window.location.href;
this.result = this.CurrentUrl.split('/');
this.url = this.result[this.result.length - 3];
this.Param = this.result[this.result.length - 2];
this.user = this.cognitoUtil.getCurrentUser();
this.monthYear = this.monthNames[this.Param];
this.selectFIles = '';
this.TileUrlName = ["CapitalFinancialMonths",
"DistributionMonths",
"FundRiskMonths",
"InternalAuditMonths",
"InvestmentmanagementMonths",
"OperationalRiskMonths",
"OrganisationMonths",
"RegulatoryMonths",
"ResourcingMonths"];
this.arrayFilename = [];
this.regulatoryCompliance = false;
this.fundrisk = false;
this.opRisk = false;
this.capitalFinanceModel = false;
this.internalAudit = false;
this.investmentManagement = false;
this.resourcing = false;
this.organisational_effectiveness = false;
this.distribution = false;
this.resourceId = '';
this.tileARRay = {
'RegulatoryMonths': false,
'FundRiskMonths': false,
'OperationalRiskMonths': false,
'CapitalFinancialMonths': false,
'InternalAuditMonths': false,
'InvestmentmanagementMonths': false,
'ResourcingMonths': false,
'OrganisationMonths': false,
'DistributionMonths': false
};
this.UsertileARRay = {
'regulatoryCompliance': false,
'FundRiskMonths': false,
'OperationalRiskMonths': false,
'CapitalFinancialMonths': false,
'InternalAuditMonths': false,
'InvestmentmanagementMonths': false,
'ResourcingMonths': false,
'OrganisationMonths': false,
'DistributionMonths': false
};
this.ReRegulatory_Datas = [];
this.Fund_Risk_Datas = [];
this.Op_Risk_Datas = [];
this.Capital_and_Financial_Datas = [];
this.Internal_Audit_Datas = [];
this.Investment_Datas = [];
this.Resourcing_Datas = [];
this.Organisational_Datas = [];
this.Distribution_Datas = [];
this.ReRegulatory_Comment_Datas = [];
this.Fund_Risk_Comment_Datas = [];
this.Op_Risk_Comment_Datas = [];
this.Capital_and_Financial_Comment_Datas = [];
this.Internal_Audit_Comment_Datas = [];
this.Investment_Comment_Datas = [];
this.Resourcing_Comment_Datas = [];
this.Organisational_Comment_Datas = [];
this.Distribution_Comment_Datas = [];
this.dataquestions = [];
this.ReRegulatory_Chat = [];
this.ReFund_Chat = [];
this.Reop_Chat = [];
this.ReCF_Chat = [];
this.IA_Chat = [];
this.IM_Chat = [];
this.Resourcing_Chat = [];
this.OE_Chat = [];
this.Distribution_Chat = [];
this.userName = localStorage.getItem('custom:first_name');
this.LastuserName = localStorage.getItem('custom:last_name');
this.profile = localStorage.getItem('profile');
this.PdfDocument = [];
if (this.userRole != 'manco user') {
// setTimeout(function(){
// $('#getUploadDataForFile').click();
// },5000);
// this.RegulatoryReport();
}
}
RightSideBarComponent.prototype.ngOnInit = function () {
var _this = this;
this.getTilesName();
setTimeout(function () {
_this.GetFileData();
}, 1000);
this.getMarkReviewDatA();
};
RightSideBarComponent.prototype.CheckUrl = function (value) {
if (localStorage.getItem('custom:user_role') == 'manco user' || localStorage.getItem('custom:user_role') == 'Manco Head') {
if (document.getElementById('mark_MancoReview').checked == false) {
if ($('#url_value').val() == 'true') {
// $('#submitData').click();
if (confirm('You have unsaved changes. Do you want to save changes? ')) {
$('#submitData').click();
this.Hello(value);
}
else {
this.Hello(value);
}
}
else {
this.Hello(value);
}
}
else {
this.Hello(value);
}
}
else {
this.Hello(value);
}
};
RightSideBarComponent.prototype.Hello = function (value) {
this.router.navigate([value]);
};
RightSideBarComponent.prototype.popup = function () {
var element = document.getElementById("qnimate");
element.classList.add("popup-box-on");
};
RightSideBarComponent.prototype.openFilepopup = function () {
document.getElementById("myDropdown").classList.toggle("show");
};
RightSideBarComponent.prototype.openpopup = function () {
document.getElementById("AdminmyDropdown").classList.toggle("show");
};
RightSideBarComponent.prototype.getTilesName = function () {
if (this.url == 'RegulatoryMonths') {
this.action = 'getRegulatoryReportData';
this.FOLDER = 'assets/uploadDocument/';
this.tilesName = 'Regulatory Compliance';
this.DataColoumn = ['Advertent Breaches', 'Inadvertent Breaches',
'Compliance Statements Past Due', 'No of NIGO Accounts at month end', 'No. of PEPs', 'Investor Complaints Received', 'Kyc'];
this.tilesNameReview = 'RegulatoryMonths';
}
else if (this.url == 'FundRiskMonths') {
this.action = "getsavefundriskData";
this.tilesName = 'Fund-Risk';
this.FOLDER = 'assets/uploadDocument/Fund Risk/';
this.tilesNameReview = 'FundRiskMonths';
}
else if (this.url == 'OperationalRiskMonths') {
this.action = 'getOperationalRisk';
this.FOLDER = 'assets/uploadDocument/OperationalRisk/';
this.tilesName = 'Operational Risk';
this.tilesNameReview = 'OperationalRiskMonths';
}
else if (this.url == 'CapitalFinancialMonths') {
this.action = 'getCapitalFinanceData';
this.FOLDER = 'assets/uploadDocument/CapitalFinancialDocument/';
this.tilesName = 'Capital and Financial';
this.tilesNameReview = 'CapitalFinancialMonths';
}
else if (this.url == 'InternalAuditMonths') {
this.action = 'getInternalAuditData';
this.tilesName = 'Internal Audit';
this.FOLDER = 'assets/uploadDocument/Internal-Audit-Document/';
this.tilesNameReview = 'InternalAuditMonths';
}
else if (this.url == 'InvestmentmanagementMonths') {
this.action = 'getInvestmentMangData';
this.FOLDER = 'assets/uploadDocument/InvestmentManagementDocument/';
this.tilesName = 'Investment Management';
this.tilesNameReview = 'InvestmentmanagementMonths';
}
else if (this.url == 'ResourcingMonths') {
this.action = 'getResourceData';
this.FOLDER = 'assets/uploadDocument/ResourcingDocument/';
this.tilesName = 'Resourcing';
this.tilesNameReview = 'ResourcingMonths';
}
else if (this.url == 'OrganisationMonths') {
this.action = 'getorgEffctData';
this.FOLDER = 'assets/uploadDocument/OrganisationDocument/';
this.tilesName = 'Organisational Effectiveness';
this.tilesNameReview = 'OrganisationMonths';
}
else if (this.url == 'DistributionMonths') {
this.action = "getdistributionData";
this.FOLDER = 'assets/uploadDocument/DistributionDocument/';
this.tilesName = 'Distribution';
this.tilesNameReview = 'DistributionMonths';
}
};
RightSideBarComponent.prototype.fileEvent = function (e) {
this.selectFIles = e.target.files[0];
if (this.selectFIles != null) {
if (this.selectFIles['type'] == 'application/pdf') {
this.file = this.selectFIles;
var FileFound = this.arrayFilename.filter(function (person) { return person.File == e.target.files[0].name; });
if (FileFound != null && FileFound != '') {
if (confirm('Do you want overwrite exist File')) {
this.file = this.selectFIles;
this.ExistFile = new Date().getTime() + e.target.files[0].name;
}
else {
document.getElementById('userfile').value = '';
document.getElementById("myDropdown").classList.remove("show");
}
}
else {
this.ExistFile = e.target.files[0].name;
this.file = this.selectFIles;
}
this.errorMessage = null;
}
else {
this.file = null;
this.errorMessage = "File type not allowed.";
}
}
};
RightSideBarComponent.prototype.uploadFile = function () {
var _this = this;
var bucket = new aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_7__({
accessKeyId: _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].accessKeyId,
secretAccessKey: _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].secretAccessKey,
region: _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].S3region
});
var params = {
Bucket: _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].BucketName,
Key: this.FOLDER + this.ExistFile,
Body: this.file
};
bucket.upload(params, function (err, data) {
if (err) {
_this.errorMessage = err;
}
document.getElementById('userfile').value = '';
_this.imageFile = data['Location'];
var d = new Date();
var n = d.getTime();
var DocumentData = {
'tilesName': _this.tilesName,
'userid': _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].mancoUser,
'documnentName': _this.imageFile,
'month': _this.Param,
'year': _this.year,
'created_at': n,
'action': 'savedocument'
};
_this.common.GetUserdataBYheaders(DocumentData)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
_this.file = null;
toastr.success('Successfully updated');
_this.GetFileData();
document.getElementById("myDropdown").classList.remove("show");
});
});
};
RightSideBarComponent.prototype.GetFileData = function () {
var _this = this;
this.arrayFilename = [];
var data = {
'action': 'getdocument',
'userid': _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].mancoUser,
'month': this.Param,
'year': this.year,
'tilesName': this.tilesName
};
this.common.GetUserdataBYheaders(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.data.length > 0) {
for (var i = 0; i < res.data.length; i++) {
var tmp = res.data[i]['documnentName'];
var arrFilename = tmp.split("/");
_this.FileNames = decodeURIComponent(arrFilename[arrFilename.length - 1]);
_this.arrayFilename.push({
'File': decodeURIComponent(arrFilename[arrFilename.length - 1]), 'Link': res.data[i]['documnentName'], 'documentId': res.data[i]['documentId']
});
}
_this.View_Detals = _this.arrayFilename;
}
}, function (error) {
_this.GetFileData();
});
};
RightSideBarComponent.prototype.getS3Bucket = function () {
var bucket = new aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_7__({
accessKeyId: _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].accessKeyId,
secretAccessKey: _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].secretAccessKey,
region: _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].region
});
return bucket;
};
RightSideBarComponent.prototype.DeleteFile = function (id) {
var _this = this;
var params = {
Bucket: _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].BucketName,
Key: this.FOLDER + id.File
};
this.getS3Bucket().deleteObject(params, function (err, data) {
if (err) {
console.log('There was an error deleting your file: ', err.message);
return;
}
// console.log('Successfully deleted file.');
});
var data = {
'action': 'deletedocument',
'id': id.documentId,
};
this.common.GetUserdataBYheaders(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
_this.GetFileData();
toastr.success('File successfully deleted');
}
else {
}
});
};
RightSideBarComponent.prototype.Download = function (value, id) {
var _this = this;
var data = {
'action': 'updatedocument',
'documentId': id,
'tilesName': this.tilesName,
'userid': _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].mancoUser,
'documnentName': value,
'month': this.Param,
'year': this.year,
'is_downloaded': 1,
'created_at': new Date().getTime()
};
this.common.GetUserdataBYheaders(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
for (var i = 0; i < res.data.length; i++) {
var tmp = res.data[i]['documnentName'];
var arrFilename = tmp.split("/");
_this.FileNames = decodeURIComponent(arrFilename[arrFilename.length - 1]);
if (res.data[i]['is_downloaded'] == '0') {
_this.arrayFilename.push({
'File': decodeURIComponent(arrFilename[arrFilename.length - 1]), 'Link': res.data[i]['documnentName'], 'documentId': res.data[i]['documentId']
});
}
else {
_this.arrayFilename.pop();
}
}
_this.View_Detals = _this.arrayFilename;
document.getElementById("AdminmyDropdown").classList.remove("show");
}
});
};
RightSideBarComponent.prototype.saveFormData = function () {
$('#submitData').click();
};
RightSideBarComponent.prototype.getMarkReviewDatA = function () {
var _this = this;
var data = {
action: 'get_org_month_review',
month: Number(this.Param),
year: Number(this.year),
userid: _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].mancoUser
};
console.log(data);
this.common.GetUserdataBYheaders(data)
.subscribe(function (res) {
var resData = JSON.parse(res._body);
var response = JSON.parse(resData.body);
// console.log(response);
if (response.status == '200') {
if (response.data != null && response.data != '') {
_this.updated_at = response.data[0]["updated_at"];
_this.user_review = response.data[0]["user_review"];
_this.created_at = response.data[0]["created_at"];
_this.userid = response.data[0]["userid"];
_this.month = response.data[0]["month"];
_this.Getyear = response.data[0]["year"];
_this.month_reviewId = response.data[0]["month_reviewId"];
_this.director_review = response.data[0]["director_review"];
_this.ined_director_review = response.data[0]["ined_director_review"];
_this.regulatoryCompliance = response.data[0].regulatoryCompliance;
_this.fundrisk = response.data[0].fundrisk;
_this.opRisk = response.data[0].opRisk;
_this.capitalFinanceModel = response.data[0].capitalFinanceModel;
_this.internalAudit = response.data[0].internalAudit;
_this.investmentManagement = response.data[0].investmentManagement;
_this.resourcing = response.data[0].resourcing;
_this.organisational_effectiveness = response.data[0].organisational_effectiveness;
_this.distribution = response.data[0].distribution;
if (response.data[0].check_director_review == null || response.data[0].check_director_review == '' || response.data[0].check_director_review == undefined) {
response.data[0].check_director_review = JSON.stringify(_this.tileARRay);
}
if (response.data[0].check_ined_director_review == null || response.data[0].check_ined_director_review == '' || response.data[0].check_ined_director_review == undefined) {
response.data[0].check_ined_director_review = JSON.stringify(_this.tileARRay);
}
_this.DirectorTileReivew = JSON.parse(response.data[0].check_director_review);
_this.inedDirectorTileReview = JSON.parse(response.data[0].check_ined_director_review);
if (_this.user_review == 'true') {
$('#ExportData').css('display', 'block');
}
if ((_this.userRole == 'manco user') || _this.userRole == 'Manco Head') {
if (_this.url == 'RegulatoryMonths') {
if (response.data[0].regulatoryCompliance == 'true') {
document.getElementById('mark_MancoReview').checked = true;
$('.checking').attr('readonly', 'ture');
$('#satisfaction').attr('disabled', 'ture');
}
else if (response.data[0].regulatoryCompliance == 'false') {
document.getElementById('mark_MancoReview').checked = false;
$('.checking').removeAttr('readonly');
$('.fileupload').removeClass('hideClss');
$('.fund_form_detail button').removeClass('hideClss');
$('#satisfaction').removeAttr('disabled');
}
}
else if (_this.url == 'FundRiskMonths') {
if (response.data[0].fundrisk == "true") {
document.getElementById('mark_MancoReview').checked = true;
$('.checking').attr('readonly', 'ture');
$('#satisfaction').attr('disabled', 'ture');
}
else if (response.data[0].fundrisk == 'false') {
document.getElementById('mark_MancoReview').checked = false;
$('.checking').removeAttr('readonly');
$('.fund_form_detail select').removeAttr('disabled');
}
}
else if (_this.url == 'OperationalRiskMonths') {
if (response.data[0].opRisk == 'true') {
document.getElementById('mark_MancoReview').checked = true;
$('.checking').attr('readonly', 'ture');
$('.fund_form_detail select').attr('disabled', 'true');
}
else if (response.data[0].opRisk == 'false') {
document.getElementById('mark_MancoReview').checked = false;
$('.checking').removeAttr('readonly');
$('.fund_form_detail select').removeAttr('disabled');
}
}
else if (_this.url == 'CapitalFinancialMonths') {
if (response.data[0].capitalFinanceModel == 'true') {
document.getElementById('mark_MancoReview').checked = true;
$('.checking').attr('readonly', 'ture');
$('.fund_form_detail select').attr('disabled', 'true');
}
else if (response.data[0].capitalFinanceModel == 'false') {
document.getElementById('mark_MancoReview').checked = false;
$('.checking').removeAttr('readonly');
$('.fund_form_detail select').removeAttr('disabled');
}
}
else if (_this.url == 'InternalAuditMonths') {
if (response.data[0].internalAudit == 'true') {
document.getElementById('mark_MancoReview').checked = true;
$('.checking').attr('readonly', 'ture');
}
else if (response.data[0].internalAudit == 'false') {
document.getElementById('mark_MancoReview').checked = false;
$('.checking').removeAttr('readonly');
}
}
else if (_this.url == 'InvestmentmanagementMonths') {
if (response.data[0].investmentManagement == 'true') {
document.getElementById('mark_MancoReview').checked = true;
$('.checking').attr('readonly', 'ture');
$('.fund_form_detail select').attr('disabled', 'true');
}
else if (response.data[0].investmentManagement == 'false') {
document.getElementById('mark_MancoReview').checked = false;
$('.checking').removeAttr('readonly');
$('.fund_form_detail select').removeAttr('disabled');
}
}
else if (_this.url == 'ResourcingMonths') {
if (response.data[0].resourcing == 'true') {
document.getElementById('mark_MancoReview').checked = true;
$('.checking').attr('readonly', 'ture');
$('.fund_form_detail select').attr('disabled', 'true');
}
else if (response.data[0].resourcing == 'false') {
document.getElementById('mark_MancoReview').checked = false;
$('.checking').removeAttr('readonly');
$('.fund_form_detail select').removeAttr('disabled');
}
}
else if (_this.url == 'OrganisationMonths') {
if (response.data[0].organisational_effectiveness == 'true') {
document.getElementById('mark_MancoReview').checked = true;
$('.checking').attr('readonly', 'ture');
}
else if (response.data[0].organisational_effectiveness == 'false') {
document.getElementById('mark_MancoReview').checked = false;
$('.checking').removeAttr('readonly');
}
}
else if (_this.url == 'DistributionMonths') {
if (response.data[0].distribution == 'true') {
document.getElementById('mark_MancoReview').checked = true;
$('.checking').attr('readonly', 'ture');
}
else if (response.data[0].distribution == 'false') {
document.getElementById('mark_MancoReview').checked = false;
$('.checking').removeAttr('readonly');
}
}
for (var i = 0; i < _this.TileUrlName.length; i++) {
if (_this.DirectorTileReivew[_this.TileUrlName[i]] == true || _this.inedDirectorTileReview[_this.TileUrlName[i]] == true) {
$('.checking').attr('readonly', 'ture');
$('.fileupload').addClass('hideClss');
$('.switch input').attr('disabled', 'disabled');
$('#mark_MancoReview').attr('disabled', 'disabled');
$('#submitData').attr('disabled', 'disabled');
$('.fund_form_detail button').css('display', 'none');
// $("#Save_supporting_detais").css('display', 'none');
$('.fund_form_detail button').css('pointer-events', 'none');
}
}
// if (this.DirectorTileReivew[this.url] != true && this.inedDirectorTileReview[this.url] != true) {
// if ((document.getElementById('mark_MancoReview')).checked == true) {
// (document.getElementById('submitData')).disabled = true;
// $('.fileupload').addClass('hideClss');
// $('.switch input').attr('disabled', 'disabled');
// $('.fund_form_detail button').css('display', 'none');
// // $("#Save_supporting_detais").css('display', 'none');
// $('.fund_form_detail button').css('pointer-events', 'none');
// } else if ((document.getElementById('mark_MancoReview')).checked == false) {
// (document.getElementById('submitData')).disabled = false;
// $('.fileupload').removeClass('hideClss');
// $('.switch input').removeAttr('disabled');
// $('.fund_form_detail button').css('display', 'block');
// //$('#Save_supporting_detais').css('display', 'block');
// $('.fund_form_detail button').css('pointer-events', 'auto');
// }
// } else {
// $('.fileupload').addClass('hideClss');
// $('.switch input').attr('disabled', 'disabled');
// $('.fund_form_detail button').css('display', 'none');
// $('.fund_form_detail button').css('pointer-events', 'none');
// $('#mark_MancoReview').attr('disabled', 'disabled');
// //$('#Save_supporting_detais').css('display', 'none');
// }
}
else if (_this.userRole == 'OED INED Director') {
if (_this.user_review != 'true') {
$('#fund_review').attr('disabled', 'true');
}
else {
$('#fund_review').removeAttr('disabled');
}
_this.checkedbox = response.data[0].inedDirectorTileReview;
_this.inedDirectorTileReview = JSON.parse(response.data[0].check_ined_director_review);
document.getElementById('fund_review').checked = _this.inedDirectorTileReview[_this.url];
}
else if (_this.userRole == 'director' || _this.userRole == 'administrator') {
if (_this.user_review != 'true') {
$('#fund_review').attr('disabled', 'true');
}
else {
$('#fund_review').removeAttr('disabled');
}
_this.DirectorTileReivew = JSON.parse(response.data[0].check_director_review);
document.getElementById('fund_review').checked = _this.DirectorTileReivew[_this.url];
}
if (_this.userRole == 'director' || _this.userRole == 'administrator' || _this.userRole == 'OED INED Director') {
$('.form_selector select').attr('disabled', 'true');
}
}
else {
_this.updated_at = '';
_this.user_review = '';
_this.created_at = '';
_this.userid = '';
_this.month = '';
_this.Getyear = '';
_this.month_reviewId = '';
_this.director_review = false;
_this.ined_director_review = false;
_this.checkedbox = _this.tileARRay;
_this.DirectorTileReivew = _this.tileARRay;
_this.inedDirectorTileReview = _this.tileARRay;
if (_this.userRole == 'director' || _this.userRole == 'administrator' || _this.userRole == 'OED INED Director') {
document.getElementById('fund_review').disabled = true;
$('.form_selector select').attr('disabled', 'true');
}
}
}
else {
_this.updated_at = '';
_this.user_review = '';
_this.created_at = '';
_this.userid = '';
_this.month = '';
_this.Getyear = '';
_this.month_reviewId = '';
_this.director_review = false;
_this.ined_director_review = false;
_this.DirectorTileReivew = _this.tileARRay;
_this.inedDirectorTileReview = _this.tileARRay;
if (_this.userRole == 'director' || _this.userRole == 'administrator' || _this.userRole == 'OED INED Director') {
document.getElementById('fund_review').disabled = true;
$('.form_selector select').attr('disabled', 'true');
$('#ExportData').css('display', 'none');
}
}
}, function (error) {
_this.getMarkReviewDatA();
});
};
RightSideBarComponent.prototype.AddMarkReview = function () {
var _this = this;
if (this.userRole == 'manco user' || this.userRole == 'Manco Head') {
if (this.url == 'RegulatoryMonths') {
if (document.getElementById('mark_MancoReview').checked == true) {
this.regulatoryCompliance = 'true';
this.toasterMessage = 'Ready for Review';
}
else if (document.getElementById('mark_MancoReview').checked == false) {
this.regulatoryCompliance = 'false';
this.user_review = false;
this.toasterMessage = 'Ready for Edit';
}
}
else if (this.url == 'FundRiskMonths') {
if (document.getElementById('mark_MancoReview').checked == true) {
this.fundrisk = 'true';
// this.toasterMessage ='Ready for Edit';
this.toasterMessage = 'Ready for Review';
}
else if (document.getElementById('mark_MancoReview').checked == false) {
this.fundrisk = 'false';
this.toasterMessage = 'Ready for Edit';
this.user_review = false;
}
}
else if (this.url == 'OperationalRiskMonths') {
if (document.getElementById('mark_MancoReview').checked == true) {
this.opRisk = 'true';
this.toasterMessage = 'Ready for Review';
}
else if (document.getElementById('mark_MancoReview').checked == false) {
this.opRisk = 'false';
this.user_review = false;
this.toasterMessage = 'Ready for Edit';
}
}
else if (this.url == 'CapitalFinancialMonths') {
if (document.getElementById('mark_MancoReview').checked == true) {
this.capitalFinanceModel = 'true';
this.toasterMessage = 'Ready for Review';
}
else if (document.getElementById('mark_MancoReview').checked == false) {
this.capitalFinanceModel = 'false';
this.user_review = false;
this.toasterMessage = 'Ready for Edit';
}
}
else if (this.url == 'InternalAuditMonths') {
if (document.getElementById('mark_MancoReview').checked == true) {
this.internalAudit = 'true';
this.toasterMessage = 'Ready for Review';
}
else if (document.getElementById('mark_MancoReview').checked == false) {
this.toasterMessage = 'Ready for Edit';
this.internalAudit = 'false';
this.user_review = false;
}
}
else if (this.url == 'InvestmentmanagementMonths') {
if (document.getElementById('mark_MancoReview').checked == true) {
this.investmentManagement = 'true';
this.toasterMessage = 'Ready for Review';
}
else if (document.getElementById('mark_MancoReview').checked == false) {
this.investmentManagement = 'false';
this.user_review = false;
this.toasterMessage = 'Ready for Edit';
}
}
else if (this.url == 'ResourcingMonths') {
if (document.getElementById('mark_MancoReview').checked == true) {
this.toasterMessage = 'Ready for Review';
this.resourcing = 'true';
}
else if (document.getElementById('mark_MancoReview').checked == false) {
this.resourcing = 'false';
this.user_review = false;
this.toasterMessage = 'Ready for Edit';
}
}
else if (this.url == 'OrganisationMonths') {
if (document.getElementById('mark_MancoReview').checked == true) {
this.organisational_effectiveness = 'true';
this.toasterMessage = 'Ready for Review';
}
else if (document.getElementById('mark_MancoReview').checked == false) {
this.organisational_effectiveness = 'false';
this.user_review = false;
this.toasterMessage = 'Ready for Edit';
}
}
else if (this.url == 'DistributionMonths') {
if (document.getElementById('mark_MancoReview').checked == true) {
this.distribution = 'true';
this.toasterMessage = 'Ready for Review';
}
else if (document.getElementById('mark_MancoReview').checked == false) {
this.distribution = 'false';
this.user_review = false;
this.toasterMessage = 'Ready for Edit';
}
}
}
if (this.userRole == 'director' || this.userRole == 'administrator') {
if ($('#fund_review').is(":checked")) {
this.DirectorTileReivew[this.url] = true;
this.toasterMessage = 'Review Complete';
}
else {
this.DirectorTileReivew[this.url] = false;
this.toasterMessage = 'Under Review';
}
if (Boolean(this.DirectorTileReivew['RegulatoryMonths']) == true &&
Boolean(this.DirectorTileReivew['FundRiskMonths']) == true &&
Boolean(this.DirectorTileReivew['CapitalFinancialMonths']) == true &&
Boolean(this.DirectorTileReivew['OperationalRiskMonths']) == true &&
Boolean(this.DirectorTileReivew['InternalAuditMonths']) == true &&
Boolean(this.DirectorTileReivew['InvestmentmanagementMonths']) == true &&
Boolean(this.DirectorTileReivew['ResourcingMonths']) == true &&
Boolean(this.DirectorTileReivew['OrganisationMonths']) == true &&
Boolean(this.DirectorTileReivew['DistributionMonths']) == true) {
this.director_review = true;
}
else {
this.director_review = false;
}
}
if (this.userRole == 'OED INED Director' || this.userRole == 'administrator') {
if ($('#fund_review').is(":checked")) {
this.inedDirectorTileReview[this.url] = true;
this.toasterMessage = 'Review Complete';
}
else {
this.inedDirectorTileReview[this.url] = false;
this.toasterMessage = 'Under Review';
}
if (Boolean(this.inedDirectorTileReview['RegulatoryMonths']) == true &&
Boolean(this.inedDirectorTileReview['FundRiskMonths']) == true &&
Boolean(this.inedDirectorTileReview['CapitalFinancialMonths']) == true &&
Boolean(this.inedDirectorTileReview['OperationalRiskMonths']) == true &&
Boolean(this.inedDirectorTileReview['InternalAuditMonths']) == true &&
Boolean(this.inedDirectorTileReview['InvestmentmanagementMonths']) == true &&
Boolean(this.inedDirectorTileReview['ResourcingMonths']) == true &&
Boolean(this.inedDirectorTileReview['OrganisationMonths']) == true &&
Boolean(this.inedDirectorTileReview['DistributionMonths']) == true) {
this.ined_director_review = true;
}
else {
this.ined_director_review = false;
}
}
if (this.regulatoryCompliance == 'true' &&
this.fundrisk == 'true' &&
this.opRisk == 'true' &&
this.capitalFinanceModel == 'true' &&
this.internalAudit == 'true' &&
this.investmentManagement == 'true' &&
this.resourcing == 'true' &&
this.organisational_effectiveness == 'true' &&
this.distribution == 'true') {
this.user_review = true;
}
else {
this.user_review = false;
}
var data = {
action: 'org_month_review',
month_reviewId: this.month_reviewId,
month: Number(this.Param),
year: Number(this.year),
userid: _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].mancoUser,
user_review: this.user_review,
director_review: this.director_review,
ined_director_review: this.ined_director_review,
regulatoryCompliance: this.regulatoryCompliance,
fundrisk: this.fundrisk,
opRisk: this.opRisk,
capitalFinanceModel: this.capitalFinanceModel,
internalAudit: this.internalAudit,
investmentManagement: this.investmentManagement,
resourcing: this.resourcing,
organisational_effectiveness: this.organisational_effectiveness,
distribution: this.distribution,
check_director_review: JSON.stringify(this.DirectorTileReivew),
check_ined_director_review: JSON.stringify(this.inedDirectorTileReview),
created_at: new Date().getTime(),
updated_at: new Date().getTime(),
};
// console.log(data);
this.common.GetUserdataBYheaders(data)
.subscribe(function (res) {
var resData = JSON.parse(res._body);
var response = JSON.parse(resData.body);
// console.log(response);
if (response.status == '200') {
_this.getMarkReviewDatA();
toastr.success(_this.toasterMessage);
}
else {
toastr.error('Server Internal Error');
}
});
};
RightSideBarComponent.prototype.APiCalling = function (data) {
this.common.GetUserdataBYheaders(data).subscribe(function (res) {
});
};
RightSideBarComponent.prototype.DownloadDocument = function () {
var doc = new jsPDF('p', 'pt');
doc.setFontSize(16);
doc.text(30, 30, ' Organisational Effectiveness Dashboard ' + this.monthYear['name'] + ' ' + this.year);
var dataquestions = [
{
question: "Regulatory Compliance",
choices: this.ReRegulatory_Datas,
chatsDataq: this.ReRegulatory_Chat,
}, {
question: "Fund Risk",
choices: this.Fund_Risk_Datas,
chatsDataq: this.ReFund_Chat,
}, {
question: "Operational Risk",
choices: this.Op_Risk_Datas,
chatsDataq: this.Reop_Chat,
}, {
question: "Capital and Financial",
choices: this.Capital_and_Financial_Datas,
chatsDataq: this.ReCF_Chat,
}, {
question: "Internal Audit",
choices: this.Internal_Audit_Datas,
chatsDataq: this.IA_Chat,
}, {
question: "Investment Management",
choices: this.Investment_Datas,
chatsDataq: this.IM_Chat,
}, {
question: "Resourcing",
choices: this.Resourcing_Datas,
chatsDataq: this.Resourcing_Chat,
}, {
question: "Organisational Effectiveness",
choices: this.Organisational_Datas,
chatsDataq: this.OE_Chat,
}, {
question: "Distribution",
choices: this.Distribution_Datas,
chatsDataq: this.Distribution_Chat,
}
];
var startY;
var columns = ['Date', 'From', 'To', 'Message'];
for (var i = 0; i < dataquestions.length; i++) {
if (dataquestions[i].choices != null && dataquestions[i].choices != '') {
if (i == 0) {
startY = 50;
}
else {
startY = doc.autoTable.previous.finalY + 30;
}
doc.autoTable({
head: [[dataquestions[i].question, '']],
body: dataquestions[i].choices,
columnStyles: {
0: { cellWidth: 350, overflow: 'linebreak' },
1: { cellWidth: 190, overflow: 'linebreak' },
},
startY: startY,
margin: { top: 50, left: 20, right: 20, bottom: 10 },
headStyle: {
fontSize: 20,
textColor: [255, 255, 255],
textAlign: 'Center'
}
});
}
if (dataquestions[i].chatsDataq != null && dataquestions[i].chatsDataq != '') {
doc.autoTable({
head: [[columns]],
body: dataquestions[i].chatsDataq,
columnStyles: {
0: { cellWidth: 150 },
1: { cellWidth: 90, overflow: 'linebreak' },
2: { cellWidth: 90, overflow: 'linebreak' },
3: { cellWidth: 220, overflow: 'linebreak' },
},
startY: doc.autoTable.previous.finalY + 40,
margin: { horizontal: 20 },
styles: { overflow: 'hidden', cellWidth: 'wrap' },
});
}
}
doc.save('Management Sanlam.pdf');
};
RightSideBarComponent.prototype.RegulatoryReport = function () {
var _this = this;
var mlro_sattisfactionData;
this.ReRegulatory_Datas = [];
this.Fund_Risk_Datas = [];
this.Op_Risk_Datas = [];
this.Capital_and_Financial_Datas = [];
this.Internal_Audit_Datas = [];
this.Investment_Datas = [];
this.Resourcing_Datas = [];
this.Organisational_Datas = [];
this.Distribution_Datas = [];
var data = {
'action': 'getRegulatoryReportData',
'userid': _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].mancoUser,
'month': this.Param,
'year': this.year
};
this.common.GetUserdataBYheaders(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
var mlro_sattisfactionData;
_this.DownloadChat('Regulatory Compliance', _this.ReRegulatory_Chat);
_this.GetCommentData('Regulatory Compliance', _this.ReRegulatory_Datas);
_this.fundRiskData();
if (res.status == '200') {
if (res.data != null && res.data != '') {
if (res.data[0].mlro_sattisfaction_with_aml_kyc_delegates == 'mlro_statisfied') {
mlro_sattisfactionData = 'MLRO satisfaction with AML and KYC delegate';
}
else {
mlro_sattisfactionData = 'MLRO dissatisfied, remedial action in progress';
}
_this.ReRegulatory_Datas.push(['Advertent Breaches', res.data[0].advertent_breach], ['Inadvertent Breaches', res.data[0].inadvertent_breach], ['Compliance Statements Past Due', res.data[0].complaince_statement_past_due], ['No of NIGO Accounts at month end', res.data[0].number_of_NIGO_accounts_at_monthend], ['No. of PEPs', res.data[0].number_of_peps], ['Investor Complaints Received', res.data[0].complaince_statement_past_due], ['Investor Complaints Received', res.data[0].complaince_statement_past_due], ['', mlro_sattisfactionData]);
}
else {
_this.ReRegulatory_Datas.push(['Advertent Breaches', 0], ['Inadvertent Breaches', 0], ['Compliance Statements Past Due', 0], ['No of NIGO Accounts at month end', 0], ['No. of PEPs', 0], ['Investor Complaints Received', 0], ['Investor Complaints Received', 0], ['', 'MLRO satisfaction with AML and KYC delegate']);
}
_this.dataquestions.push({
question: "Regulatory Compliance",
choices: _this.ReRegulatory_Chat,
});
}
});
};
RightSideBarComponent.prototype.fundRiskData = function () {
var _this = this;
var data = {
'action': "getsavefundriskData",
'userid': _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].mancoUser,
'month': this.Param,
'year': this.year
};
this.common.GetUserdataBYheaders(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
_this.DownloadChat('Fund-Risk', _this.ReFund_Chat);
_this.GetCommentData('Fund Risk', _this.Fund_Risk_Datas);
_this.opRiskData();
if (res.status == '200') {
if (res.data != null && res.data != '') {
_this.Fund_Risk_Datas.push(['Funds Breaching Global Exposure Limits', res.data[0].fund_breaching_global_exposureLimits], ['Funds With Liquidity Constraints', res.data[0].funds_with_liquidity_constraints], ['Funds with tracking error outside of accepted boundaries', res.data[0].fund_tracking_outside_error]);
}
else {
_this.Fund_Risk_Datas.push(['Funds Breaching Global Exposure Limits', 0], ['Funds With Liquidity Constraints', 0], ['Funds with tracking error outside of accepted boundaries', 0]);
}
_this.dataquestions.push({
question: "Fund Risk",
choices: _this.ReFund_Chat,
});
}
});
};
RightSideBarComponent.prototype.opRiskData = function () {
var _this = this;
var data = {
'action': 'getOperationalRisk',
'userid': _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].mancoUser,
'month': this.Param,
'year': this.year
};
this.common.GetUserdataBYheaders(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
_this.CapitalData();
if (res.status == '200') {
_this.GetCommentData('Operational Risk', _this.Op_Risk_Datas);
_this.DownloadChat('Operational Risk', _this.Reop_Chat);
if (res.data != null && res.data != '') {
var Current_Transfer = void 0;
var Current_Custodian = void 0;
var Current_Depositary = void 0;
if (res.data[0].current_transfer_agency == 'management_satisfied_ta') {
Current_Transfer = 'Management Co. satisfied with TA performance';
}
else {
Current_Transfer = ' Management Co. dissatisfied, remedial action in progress';
}
if (res.data[0].current_custodian == 'management_satisfied_ta') {
Current_Custodian = 'Management co. satisfied with Custodian Performance ';
}
else {
Current_Custodian = ' Management Co. dissatisfied, remedial action in progress ';
}
if (res.data[0].current_depositary == 'management_satisfied_ta') {
Current_Depositary = ' Management co. satisified with Depositary Performance ';
}
else {
Current_Depositary = ' Management Co. dissatisfied, remedial action in progress ';
}
_this.Op_Risk_Datas.push(['Material NAV Errors', res.data[0].material_nav_error], ['Immaterial NAV Errors', res.data[0].immaterial_nav_error], ['NAV Timeliness', res.data[0].nav_timeliness], ['Current Transfer Agency RAG rating', Current_Transfer], ['IM with fail rate >5%', res.data[0].im_with_failrate], ['IM Passed market deadline insx.', res.data[0].im_past_deadlines], ['TA Dealing Errors', res.data[0].dealing_errors], ['IM with RAG rating other than green', res.data[0].im_rag_rating], ['Current Custodian RAG rating', Current_Custodian], ['Current Depositary RAG rating', Current_Depositary]);
}
else {
_this.Op_Risk_Datas.push(['Material NAV Errors', 0], ['Immaterial NAV Errors', 0], ['NAV Timeliness', 0], ['Current Transfer Agency RAG rating', 'Management Co. satisfied with TA performance'], ['IM with fail rate >5%', 0], ['IM Passed market deadline insx.', 0], ['TA Dealing Errors', 0], ['IM with RAG rating other than green', 0], ['Current Custodian RAG rating', 'Management co. satisfied with Custodian Performance '], ['Current Depositary RAG rating', ' Management co. satisified with Depositary Performance ']);
}
}
});
};
RightSideBarComponent.prototype.CapitalData = function () {
var _this = this;
var data = {
'action': 'getCapitalFinanceData',
'userid': _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].mancoUser,
'month': this.Param,
'year': this.year
};
this.common.GetUserdataBYheaders(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
_this.InternalData();
if (res.status == '200') {
_this.GetCommentData('Capital and Financial', _this.Capital_and_Financial_Datas);
_this.DownloadChat('Capital and Financial', _this.ReCF_Chat);
if (res.data != null && res.data != '') {
_this.Capital_and_Financial_Datas.push(['Capital Adequacy Obligations Met', res.data[0].capital_adequacy], ['% of budget achieved YTD (net profit before tax)', res.data[0].budget_acheived], ['Hardware / Software failure', res.data[0].hardwaresoftware_failure], ['Cyber Attacks Encountered', res.data[0].cyber_attacks_encounter], ['', res.data[0].management_satisfied]);
}
else {
_this.Capital_and_Financial_Datas.push(['Capital Adequacy Obligations Met', 'Yes'], ['% of budget achieved YTD (net profit before tax)', 0], ['Hardware / Software failure', 'None'], ['Cyber Attacks Encountered', 'None'], ['', 'Management Co. satisfied with IT Provider performance']);
}
_this.dataquestions.push({
question: "Capital and Financial",
choices: _this.ReCF_Chat,
});
}
});
};
RightSideBarComponent.prototype.InternalData = function () {
var _this = this;
var data = {
'action': 'getInternalAuditData',
'userid': _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].mancoUser,
'month': this.Param,
'year': this.year
};
this.common.GetUserdataBYheaders(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
_this.InvestmentData();
if (res.status == '200') {
_this.GetCommentData('Internal Audit', _this.Internal_Audit_Datas);
_this.DownloadChat('Internal Audit', _this.IA_Chat);
if (res.data != null && res.data != '') {
_this.Internal_Audit_Datas.push(['Priority 1 Items Outstanding', res.data[0].priority_one_items], ['Priority 2 Items Outstanding', res.data[0].priority_two_items]);
}
else {
_this.Internal_Audit_Datas.push(['Priority 1 Items Outstanding', 0], ['Priority 2 Items Outstanding', 0]);
}
_this.dataquestions.push({
question: "Internal Audit",
choices: _this.IA_Chat,
});
}
});
};
RightSideBarComponent.prototype.InvestmentData = function () {
var _this = this;
var data = {
'action': 'getInvestmentMangData',
'userid': _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].mancoUser,
'month': this.Param,
'year': this.year
};
this.common.GetUserdataBYheaders(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
_this.ResourcingData();
if (res.status == '200') {
_this.GetCommentData('Investment Management', _this.Investment_Datas);
_this.DownloadChat('Investment Management', _this.IM_Chat);
if (res.data != null && res.data != '') {
_this.Investment_Datas.push(['IM with 3 month under performers', res.data[0].three_month_underperformers], ['IM with 1 year under performers', res.data[0].one_year_underperformers], ['IM with 3 year under performers', res.data[0].three_year_underperformers], ['IM with 3 month out performers', res.data[0].three_month_outperformers], ['IM with 1 year out performers', res.data[0].one_year_outperformers], ['IM with 3 year out performers', res.data[0].three_year_outperformers], ['Due Diligence', res.data[0].due_delligence]);
}
else {
_this.Investment_Datas.push(['IM with 3 month under performers', 0], ['IM with 1 year under performers', 0], ['IM with 3 year under performers', 0], ['IM with 3 month out performers', 0], ['IM with 1 year out performers', 0], ['IM with 3 year out performers', 0], ['Due Diligence', 'Due Diligence Tracker:Progress Satisfactory']);
}
_this.dataquestions.push({
question: "Investment Management",
choices: _this.IM_Chat,
});
}
});
};
RightSideBarComponent.prototype.ResourcingData = function () {
var _this = this;
var data = {
'action': 'getResourceData',
'userid': _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].mancoUser,
'month': this.Param,
'year': this.year
};
this.common.GetUserdataBYheaders(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
_this.OrganisationalData();
if (res.status == '200') {
// this.GetCommentData('Resourcing', this.Resourcing_Comment_Datas);
_this.DownloadChat('Resourcing', _this.Resourcing_Chat);
if (res.data != null && res.data != '') {
_this.Resourcing_Datas.push(['Finance', res.data[0].finance], ['Finance Comment', res.data[0].Finance_comment], ['Legal', res.data[0].legal], ['Legal Comment', res.data[0].Legal_comment], ['Compliance', res.data[0].compliance], ['Compliance Comment', res.data[0].Compliance_comment], ['Fund Accounting', res.data[0].fund_accounting], ['Fund Accounting Comment', res.data[0].FundAccounting_comment], ['Operations', res.data[0].operations], ['Operations Comment', res.data[0].Operations_comment], ['Risk', res.data[0].risk], ['Risk Comment', res.data[0].Risk_comment], ['CEO', res.data[0].ceo], ['CEO Comment', res.data[0].CEO_comment]);
}
else {
_this.Resourcing_Datas.push(['Finance', 'Green'], ['Finance Comment', ''], ['Legal', 'Green'], ['Legal Comment', ''], ['Compliance', 'Green'], ['Compliance Comment', ''], ['Fund Accounting', 'Green'], ['Fund Accounting Comment', ''], ['Operations', 'Green'], ['Operations Comment', ''], ['Risk', 'Green'], ['Risk Comment', ''], ['CEO', 'Green'], ['CEO Comment', '']);
}
_this.dataquestions.push({
question: "Resourcing",
choices: _this.Resourcing_Chat,
});
}
});
};
RightSideBarComponent.prototype.OrganisationalData = function () {
var _this = this;
var data = {
'action': 'getorgEffctData',
'userid': _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].mancoUser,
'month': this.Param,
'year': this.year
};
this.common.GetUserdataBYheaders(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
_this.DistributionData();
if (res.status == '200') {
_this.GetCommentData('Organisational Effectiveness', _this.Organisational_Datas);
_this.DownloadChat('Organisational Effectiveness', _this.OE_Chat);
if (res.data != null && res.data != '') {
_this.Organisational_Datas.push(['Updates during the month', res.data[0].monthupdates], ['Returns Outstanding at the end of the month', res.data[0].monthreturns]);
}
else {
_this.Organisational_Datas.push(['Updates during the month', 0], ['Returns Outstanding at the end of the month', 0]);
}
_this.dataquestions.push({
question: "Organisational Effectiveness",
choices: _this.OE_Chat,
});
}
});
};
RightSideBarComponent.prototype.DistributionData = function () {
var _this = this;
var data = {
'action': 'getdistributionData',
'userid': _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].mancoUser,
'month': this.Param,
'year': this.year
};
this.common.GetUserdataBYheaders(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
_this.GetCommentData('Distribution', _this.Distribution_Datas);
_this.DownloadChat('Distribution', _this.Distribution_Chat);
if (res.data != null && res.data != '') {
_this.Distribution_Datas.push(['Net Monthly inflows / outflows (m USD)', res.data[0].netmonthly], ['Net YTD inflows / outflows (m / USD)', res.data[0].netytd], ['YTD vs Budget', res.data[0].ytdvsbudget]);
}
else {
_this.Distribution_Datas.push(['Net Monthly inflows / outflows (m USD)', 0], ['Net YTD inflows / outflows (m / USD)', 0], ['YTD vs Budget', 0]);
}
_this.dataquestions.push({
question: "Distribution",
choices: _this.Distribution_Chat,
});
setTimeout(function () {
_this.DownloadDocument();
}, 1000);
}
});
};
RightSideBarComponent.prototype.DownloadChat = function (tile, variable) {
var _this = this;
this.Newarray = [];
var data = {
'action': 'getDirectorActionQuery',
'tile_name': tile,
'month': this.Param,
'year': this.year,
'directorid': this.user['username'],
'userid': _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].mancoUser,
'to_from_id': _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].mancoUser + '|' + this.user['username']
};
this.common.GetUserdataBYheaders(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
if (res.data != null && res.data != '') {
var months_arr = ['Jan', 'Feb', 'March', 'April', 'May', 'June', 'July', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var days_arr = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
for (var i = 0; i < res.data.length; i++) {
var date = new Date(res.data[i]['created_at'] * 1);
var year = date.getFullYear();
var dates = date.getDate();
var day = days_arr[date.getDay()];
var month = months_arr[date.getMonth()];
var hours = date.toLocaleTimeString();
var minutes = date.getMinutes();
var time = day + ',' + dates + '/' + month + '/' + year + ', ' + hours;
if (res.data[i].queryFrom == _this.userRole) {
var from = _this.userName + ' ' + _this.LastuserName + ' (' + res.data[i].queryFrom + ')';
var to = 'Management Sanlam' + ' (' + res.data[i].queryTo + ')';
var query = res.data[i].query;
variable.push([
dates + '/' + month + '/' + year + ', ' + hours, from, to, query
]);
}
else if (res.data[i].queryTo == _this.userRole) {
var from = 'Management Sanlam' + ' (' + res.data[i].queryFrom + ')';
var to = _this.userName + ' ' + _this.LastuserName + ' (' + res.data[i].queryTo + ')';
var query = res.data[i].query;
variable.push([
dates + '/' + month + '/' + year + ', ' + hours, from, to, query
]);
}
}
}
}
else {
}
});
};
RightSideBarComponent.prototype.GetCommentData = function (tile, variable) {
var data = {
'action': "getTilesComment",
'tiles_name': tile,
'month': this.Param,
'year': this.year,
};
this.common.GetUserdataBYheaders(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
if (res.data != null && res.data != '') {
variable.push([
'Additional Detail', res.data[0].comment
]);
// this.dataquestions.push({
// question: 'Additional Detail',
// choices: this.ReRegulatory_Comment_Datas,
// });
}
}
else {
}
});
};
RightSideBarComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-right-side-bar',
template: __webpack_require__(/*! ./right-side-bar.component.html */ "./src/app/components/milestone/navbar/right-side-bar/right-side-bar.component.html"),
styles: [__webpack_require__(/*! ./right-side-bar.component.css */ "./src/app/components/milestone/navbar/right-side-bar/right-side-bar.component.css")],
}),
__metadata("design:paramtypes", [_services_cognito_service__WEBPACK_IMPORTED_MODULE_6__["CognitoUtil"],
_services_common_service__WEBPACK_IMPORTED_MODULE_3__["CommonService"],
_services_user_service__WEBPACK_IMPORTED_MODULE_4__["UserService"],
_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_angular_common__WEBPACK_IMPORTED_MODULE_5__["Location"]])
], RightSideBarComponent);
return RightSideBarComponent;
}());
/***/ }),
/***/ "./src/app/components/milestone/navbar/userchat/userchat.component.css":
/*!*****************************************************************************!*\
!*** ./src/app/components/milestone/navbar/userchat/userchat.component.css ***!
\*****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "#inner-wrapper label {\r\n float: left;\r\n width: 100%;\r\n font-size: 15px;\r\n line-height: 15px;\r\n font-weight: 300;\r\n margin-top: 10px;\r\n}\r\n/* table.dataTable {\r\n clear: both;\r\n margin-top: 6px !important;\r\n margin-bottom: 6px !important;\r\n max-width: none !important;\r\n} */\r\ntable tr {\r\n border: 1px solid #d6d6d6;\r\n text-align: center;\r\n}\r\n.tab_content_left .tab-content {\r\n float: left;\r\n width: 100%;\r\n height: 0;\r\n margin-bottom: 50px;\r\n}\r\ntd.sorting1 a {\r\n color: #000;\r\n text-decoration: none;\r\n}\r\n.dataTables_wrapper {\r\n position: relative;\r\n clear: both;\r\n zoom: 1;\r\n padding: 38px 0px;\r\n}\r\n.table-responsive {\r\n overflow-x: auto;\r\n min-height: .01%;\r\n padding: 30px 0px;\r\n}"
/***/ }),
/***/ "./src/app/components/milestone/navbar/userchat/userchat.component.html":
/*!******************************************************************************!*\
!*** ./src/app/components/milestone/navbar/userchat/userchat.component.html ***!
\******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "{{title}} \r\n \r\n \r\n\r\n "
/***/ }),
/***/ "./src/app/components/milestone/navbar/userchat/userchat.component.ts":
/*!****************************************************************************!*\
!*** ./src/app/components/milestone/navbar/userchat/userchat.component.ts ***!
\****************************************************************************/
/*! exports provided: UserchatComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UserchatComponent", function() { return UserchatComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
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 UserchatComponent = /** @class */ (function () {
function UserchatComponent(router) {
this.router = router;
this.CurrentUrl = window.location.href;
this.result = this.CurrentUrl.split('/');
this.url = this.result[this.result.length - 4];
this.Param = this.result[this.result.length - 2];
this.monthYear = this.result[this.result.length - 3];
this.title = "User Chat";
}
UserchatComponent.prototype.ngOnInit = function () {
};
UserchatComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-userchat',
template: __webpack_require__(/*! ./userchat.component.html */ "./src/app/components/milestone/navbar/userchat/userchat.component.html"),
styles: [__webpack_require__(/*! ./userchat.component.css */ "./src/app/components/milestone/navbar/userchat/userchat.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"]])
], UserchatComponent);
return UserchatComponent;
}());
/***/ }),
/***/ "./src/app/components/milestone/operational-risk/operational-risk.component.css":
/*!**************************************************************************************!*\
!*** ./src/app/components/milestone/operational-risk/operational-risk.component.css ***!
\**************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".tab_content_left .tab-content {\r\n overflow-y: scroll;\r\n}\r\n.fund_inner_block .fund_form_detail label.funds-breaching, .funds-liquidity {\r\n width: 30px;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 3px 1px;\r\n text-align: center;\r\n}\r\n.fund_inner_block .fund_form_detail label.funds-tracking, .im_rate{\r\n width: 30px;\r\n background-color: #e56e0d;\r\n color: #fff;\r\n border: none;\r\n padding: 3px 1px;\r\n text-align: center;\r\n}\r\n.fund_inner_block .fund_form_detail label.fund_back {\r\n float: left;\r\n width: 100%;\r\n border: 1px solid;\r\n padding: 10px 15px;\r\n border-radius: 33px;\r\n background-color: #00b160;\r\n color: #fff;\r\n font-size: 15px;\r\n text-align: center;\r\n}\r\n.tab_content_left .tab-content {\r\n overflow-y: scroll;\r\n}\r\nselect#operationalfund {\r\n width: 100%;\r\n background-color: green;\r\n color: #fff;\r\n border: none;\r\n padding: 14px 11px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n border-radius: 22px;\r\n outline: none;\r\n font-size: 16px;\r\n}\r\nselect#operationalfund1 {\r\n width: 100%;\r\n background-color: green;\r\n color: #fff;\r\n border: none;\r\n padding: 14px 11px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n border-radius: 22px;\r\n outline: none;\r\n font-size: 16px;\r\n}\r\nselect#operationalfund2 {\r\n width: 100%;\r\n background-color: green;\r\n color: #fff;\r\n border: none;\r\n padding: 14px 11px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n border-radius: 22px;\r\n outline: none;\r\n font-size: 16px;\r\n}\r\nlabel.fund_form_span {\r\n float: left;\r\n width: 100%;\r\n font-size: 16px;\r\n color: #555;\r\n padding-bottom: 12px;\r\n padding-left: 10px;\r\n}\r\n.dropdown-content {\r\n width: 94% !important;\r\n display: none;\r\n position: absolute;\r\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\r\n z-index: 1;\r\n top: 52%;\r\n border: 2px solid #008ad1;\r\n border-radius: 10px;\r\n background-color: #EBEFF2;\r\n}\r\np {\r\n margin: 0 0 0px;\r\n}"
/***/ }),
/***/ "./src/app/components/milestone/operational-risk/operational-risk.component.html":
/*!***************************************************************************************!*\
!*** ./src/app/components/milestone/operational-risk/operational-risk.component.html ***!
\***************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = " \r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n Loading...
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Organisational Effectiveness Dashboard \r\n
\r\n
\r\n
\r\n \r\n Operational Risk \r\n
\r\n
\r\n
\r\n
Fund Accounting \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
IM Operational Risk Indicators \r\n \r\n
\r\n
\r\n Current Transfer Agency RAG rating \r\n \r\n \r\n Management Co. satisfied with TA performance\r\n \r\n \r\n Management Co. dissatisfied, remedial action in progress \r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n
\r\n
\r\n
IM Operational Risk Indicators \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n\r\n \r\n Current Custodian RAG rating \r\n \r\n \r\n Management co. satisfied with Custodian Performance\r\n \r\n \r\n Management Co. dissatisfied, remedial action in progress\r\n \r\n \r\n
\r\n \r\n Current Depositary RAG rating \r\n \r\n \r\n \r\n Management co. satisified with Depositary Performance\r\n \r\n \r\n Management Co. dissatisfied, remedial action in progress \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n "
/***/ }),
/***/ "./src/app/components/milestone/operational-risk/operational-risk.component.ts":
/*!*************************************************************************************!*\
!*** ./src/app/components/milestone/operational-risk/operational-risk.component.ts ***!
\*************************************************************************************/
/*! exports provided: OperationalRiskComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OperationalRiskComponent", function() { return OperationalRiskComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! sweetalert2 */ "./node_modules/sweetalert2/dist/sweetalert2.all.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var ngx_spinner__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-spinner */ "./node_modules/ngx-spinner/fesm5/ngx-spinner.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 OperationalRiskComponent = /** @class */ (function () {
function OperationalRiskComponent(router, common, fundform, cognitoUtil, spinner) {
this.router = router;
this.common = common;
this.fundform = fundform;
this.cognitoUtil = cognitoUtil;
this.spinner = spinner;
this.title = 'Operational Risk';
this.year = window.location.href.substr(window.location.href.lastIndexOf('/') + 1);
this.userRole = localStorage.getItem('custom:user_role');
this.monthNames = [
{},
{ 'id': '1', 'name': 'January' },
{ 'id': '2', 'name': 'February' },
{ 'id': '3', 'name': 'March' },
{ 'id': '4', 'name': 'April' },
{ 'id': '5', 'name': 'May' },
{ 'id': '6', 'name': 'June' },
{ 'id': '7', 'name': 'July' },
{ 'id': '8', 'name': 'August' },
{ 'id': '9', 'name': 'September' },
{ 'id': '10', 'name': 'October' },
{ 'id': '11', 'name': 'November' },
{ 'id': '12', 'name': 'December' }
];
this.CurrentUrl = window.location.href;
this.result = this.CurrentUrl.split('/');
this.url = this.result[this.result.length - 3];
this.Param = Number(this.result[this.result.length - 2]);
// monthYear = this.Param;
this.monthYear = Number(this.monthNames[this.Param]);
this.data = new FormData();
this.user = this.cognitoUtil.getCurrentUser();
this.FOLDER = 'assets/uploadDocument/OperationalRisk/';
this.arrayFilename = [];
this.OperationalRiskForm = fundform.group({
'operationalId': '',
"material_nav_error": [0],
'immaterial_nav_error': [0],
'nav_timeliness': [0],
"im_with_failrate": [0],
'im_past_deadlines': [0],
'im_rag_rating': [0],
"dealing_errors": [0],
'current_transfer_agency': 'management_satisfied_ta',
'current_custodian': 'management_satisfied_ta',
"current_depositary": 'management_satisfied_ta',
});
}
OperationalRiskComponent.prototype.ngOnInit = function () {
if (localStorage.getItem('token') != null && localStorage.getItem('token') != '') {
this.spinner.show();
this.getOprationalRisk();
// this.GetFileData();
}
else {
this.router.navigateByUrl('/login');
}
};
OperationalRiskComponent.prototype.popup = function () {
var element = document.getElementById("qnimate");
element.classList.add("popup-box-on");
//document.getElementById("qnimate").className = "popup-box-on";
};
OperationalRiskComponent.prototype.openFilepopup = function () {
document.getElementById("myDropdown").classList.toggle("show");
};
OperationalRiskComponent.prototype.operationalfundOnclick = function (value) {
if (value == 'management_satisfied_ta') {
document.getElementById('operationalfund').style.backgroundColor = "green";
}
else if (value == 'management_disatisfied') {
document.getElementById('operationalfund').style.backgroundColor = "orange";
}
};
OperationalRiskComponent.prototype.CustodianRating = function (value) {
if (value == 'management_satisfied_ta') {
document.getElementById('operationalfund1').style.backgroundColor = "green";
}
else if (value == 'management_disatisfied') {
document.getElementById('operationalfund1').style.backgroundColor = "orange";
}
};
OperationalRiskComponent.prototype.operationalDepositaryclick = function (value) {
if (value == 'management_satisfied_ta') {
document.getElementById('operationalfund2').style.backgroundColor = "green";
}
else if (value == 'management_disatisfied') {
document.getElementById('operationalfund2').style.backgroundColor = "orange";
}
};
OperationalRiskComponent.prototype.getOprationalRisk = function () {
var _this = this;
this.userDataId = _environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].mancoUser;
var data = {
'action': 'getOperationalRisk',
'userid': this.userDataId,
'month': this.Param,
'year': Number(this.year)
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
// console.log(res);
if (res.status == '200') {
if (res.data != null && res.data != '') {
if ((localStorage.getItem('custom:user_role') == 'manco user') || (localStorage.getItem('custom:user_role') == 'Manco Head')) {
// console.log("this is from IN for manco condition");
_this.OperationalRiskForm.controls['operationalId'].setValue(res.data[0]['operationalId']);
_this.OperationalRiskForm.controls['nav_timeliness'].setValue(res.data[0]['nav_timeliness']);
_this.OperationalRiskForm.controls['material_nav_error'].setValue(res.data[0]['material_nav_error']);
_this.OperationalRiskForm.controls['immaterial_nav_error'].setValue(res.data[0]['immaterial_nav_error']);
_this.OperationalRiskForm.controls['im_with_failrate'].setValue(res.data[0]['im_with_failrate']);
_this.OperationalRiskForm.controls['im_rag_rating'].setValue(res.data[0]['im_rag_rating']);
_this.OperationalRiskForm.controls['im_past_deadlines'].setValue(res.data[0]['im_past_deadlines']);
_this.OperationalRiskForm.controls['dealing_errors'].setValue(res.data[0]['dealing_errors']);
if (res.data[0].material_color == '#00b160') {
document.getElementById('material_color').checked = true;
document.getElementById('material').style.backgroundColor = res.data[0]['material_color'];
}
else if (res.data[0].material_color == '#e56e0d') {
document.getElementById('material_color').checked = false;
document.getElementById('material').style.backgroundColor = res.data[0]['material_color'];
}
if (res.data[0].immaterial_color == '#00b160') {
document.getElementById('immaterial_color').checked = true;
document.getElementById('immaterial').style.backgroundColor = res.data[0].immaterial_color;
}
else if (res.data[0].immaterial_color == '#e56e0d') {
document.getElementById('immaterial_color').checked = false;
document.getElementById('immaterial').style.backgroundColor = res.data[0].immaterial_color;
}
if (res.data[0].timeliness_Color == '#00b160') {
document.getElementById('timeliness_color').checked = true;
document.getElementById('timeliness').style.backgroundColor = res.data[0].timeliness_Color;
}
else if (res.data[0].timeliness_color == '#e56e0d') {
document.getElementById('timeliness_color').checked = false;
document.getElementById('timeliness').style.backgroundColor = res.data[0].timeliness_Color;
}
if (res.data[0].im_rate_color == '#00b160') {
document.getElementById('im_rate_color').checked = true;
document.getElementById('im_rate').style.backgroundColor = res.data[0].im_rate_color;
}
else if (res.data[0].im_rate_color == '#e56e0d') {
document.getElementById('im_rate_color').checked = false;
document.getElementById('im_rate').style.backgroundColor = res.data[0].im_rate_color;
}
if (res.data[0].im_market_color == '#00b160') {
document.getElementById('im_market_color').checked = true;
document.getElementById('im_market').style.backgroundColor = res.data[0].im_market_color;
}
else if (res.data[0].im_market_color == '#e56e0d') {
document.getElementById('im_market_color').checked = false;
document.getElementById('im_market').style.backgroundColor = res.data[0].im_market_color;
}
if (res.data[0].ta_dealing_color == '#00b160') {
document.getElementById('ta_dealing_color').checked = true;
document.getElementById('ta_dealing').style.backgroundColor = res.data[0].ta_dealing_color;
}
else if (res.data[0].ta_dealing_color == '#e56e0d') {
document.getElementById('ta_dealing_color').checked = false;
document.getElementById('ta_dealing').style.backgroundColor = res.data[0].ta_dealing_color;
}
if (res.data[0].im_dealing_color == '#00b160') {
document.getElementById('im_dealing_color').checked = true;
document.getElementById('im_dealing').style.backgroundColor = res.data[0].im_dealing_color;
}
else if (res.data[0].im_dealing_color == '#e56e0d') {
document.getElementById('im_dealing_color').checked = false;
document.getElementById('im_dealing').style.backgroundColor = res.data[0].im_dealing_color;
}
if (res.data[0]['current_transfer_agency'] == 'management_satisfied_ta') {
document.getElementById('operationalfund').style.backgroundColor = "green";
_this.OperationalRiskForm.controls['current_transfer_agency'].setValue(res.data[0]['current_transfer_agency']);
}
else if (res.data[0]['current_transfer_agency'] == 'management_disatisfied') {
document.getElementById('operationalfund').style.backgroundColor = "orange";
_this.OperationalRiskForm.controls['current_transfer_agency'].setValue(res.data[0]['current_transfer_agency']);
}
if (res.data[0]['current_custodian'] == 'management_satisfied_ta') {
document.getElementById('operationalfund1').style.backgroundColor = "green";
_this.OperationalRiskForm.controls['current_custodian'].setValue(res.data[0]['current_custodian']);
}
else if (res.data[0]['current_custodian'] == 'management_disatisfied') {
document.getElementById('operationalfund1').style.backgroundColor = "orange";
_this.OperationalRiskForm.controls['current_custodian'].setValue(res.data[0]['current_custodian']);
}
if (res.data[0]['current_depositary'] == 'management_satisfied_ta') {
document.getElementById('operationalfund2').style.backgroundColor = "green";
_this.OperationalRiskForm.controls['current_depositary'].setValue(res.data[0]['current_depositary']);
}
else if (res.data[0]['current_depositary'] == 'management_disatisfied') {
document.getElementById('operationalfund2').style.backgroundColor = "orange";
_this.OperationalRiskForm.controls['current_depositary'].setValue(res.data[0]['current_depositary']);
}
// this.getcheckbox();
}
else {
console.log("this is from out for manco condition");
_this.operationalId = res.data[0]['operationalId'];
_this.nav_timeliness = res.data[0]['nav_timeliness'];
_this.material_nav_error = res.data[0]['material_nav_error'];
_this.immaterial_nav_error = res.data[0]['immaterial_nav_error'];
_this.im_with_failrate = res.data[0]['im_with_failrate'];
_this.im_rag_rating = res.data[0]['im_rag_rating'];
_this.im_past_deadlines = res.data[0]['im_past_deadlines'];
_this.dealing_errors = res.data[0]['dealing_errors'];
_this.current_transfer_agency = res.data[0]['current_transfer_agency'];
_this.current_custodian = res.data[0]['current_custodian'];
_this.current_depositary = res.data[0]['current_depositary'];
if (res.data[0]['current_transfer_agency'] == 'management_satisfied_ta') {
document.getElementById('operationalfund').style.backgroundColor = "green";
_this.OperationalRiskForm.controls['current_transfer_agency'].setValue(res.data[0]['current_transfer_agency']);
}
else if (res.data[0]['current_transfer_agency'] == 'management_disatisfied') {
document.getElementById('operationalfund').style.backgroundColor = "orange";
_this.OperationalRiskForm.controls['current_transfer_agency'].setValue(res.data[0]['current_transfer_agency']);
}
if (res.data[0]['current_custodian'] == 'management_satisfied_ta') {
document.getElementById('operationalfund1').style.backgroundColor = "green";
_this.OperationalRiskForm.controls['current_custodian'].setValue(res.data[0]['current_custodian']);
}
else if (res.data[0]['current_custodian'] == 'management_disatisfied') {
document.getElementById('operationalfund1').style.backgroundColor = "orange";
_this.OperationalRiskForm.controls['current_custodian'].setValue(res.data[0]['current_custodian']);
}
if (res.data[0]['current_depositary'] == 'management_satisfied_ta') {
document.getElementById('operationalfund2').style.backgroundColor = "green";
_this.OperationalRiskForm.controls['current_depositary'].setValue(res.data[0]['current_depositary']);
}
else if (res.data[0]['current_depositary'] == 'management_disatisfied') {
document.getElementById('operationalfund2').style.backgroundColor = "orange";
_this.OperationalRiskForm.controls['current_depositary'].setValue(res.data[0]['current_depositary']);
}
_this.available_for_review = res.data['0']['available_for_review'];
_this.ined_director_review = res.data['0']['ined_director_review'];
_this.director_review = res.data['0']['director_review'];
}
if (res.data[0].material_color == '#00b160') {
document.getElementById('material').style.backgroundColor = res.data[0]['material_color'];
}
else if (res.data[0].material_color == '#e56e0d') {
document.getElementById('material').style.backgroundColor = res.data[0]['material_color'];
}
if (res.data[0].immaterial_color == '#00b160') {
document.getElementById('immaterial').style.backgroundColor = res.data[0].immaterial_color;
}
else if (res.data[0].immaterial_color == '#e56e0d') {
document.getElementById('immaterial').style.backgroundColor = res.data[0].immaterial_color;
}
if (res.data[0].timeliness_Color == '#00b160') {
document.getElementById('timeliness').style.backgroundColor = res.data[0].timeliness_Color;
}
else if (res.data[0].timeliness_color == '#e56e0d') {
document.getElementById('timeliness').style.backgroundColor = res.data[0].timeliness_Color;
}
if (res.data[0].im_rate_color == '#00b160') {
document.getElementById('im_rate').style.backgroundColor = res.data[0].im_rate_color;
}
else if (res.data[0].im_rate_color == '#e56e0d') {
document.getElementById('im_rate').style.backgroundColor = res.data[0].im_rate_color;
}
if (res.data[0].im_market_color == '#00b160') {
document.getElementById('im_market').style.backgroundColor = res.data[0].im_market_color;
}
else if (res.data[0].im_market_color == '#e56e0d') {
document.getElementById('im_market').style.backgroundColor = res.data[0].im_market_color;
}
if (res.data[0].ta_dealing_color == '#00b160') {
document.getElementById('ta_dealing').style.backgroundColor = res.data[0].ta_dealing_color;
}
else if (res.data[0].ta_dealing_color == '#e56e0d') {
document.getElementById('ta_dealing').style.backgroundColor = res.data[0].ta_dealing_color;
}
if (res.data[0].im_dealing_color == '#00b160') {
document.getElementById('im_dealing').style.backgroundColor = res.data[0].im_dealing_color;
}
else if (res.data[0].im_dealing_color == '#e56e0d') {
document.getElementById('im_dealing').style.backgroundColor = res.data[0].im_dealing_color;
}
if (res.data[0]['current_transfer_agency'] == 'management_satisfied_ta') {
document.getElementById('operationalfund').style.backgroundColor = "green";
_this.OperationalRiskForm.controls['current_transfer_agency'].setValue(res.data[0]['current_transfer_agency']);
}
else if (res.data[0]['current_transfer_agency'] == 'management_disatisfied') {
document.getElementById('operationalfund').style.backgroundColor = "orange";
_this.OperationalRiskForm.controls['current_transfer_agency'].setValue(res.data[0]['current_transfer_agency']);
}
if (res.data[0]['current_custodian'] == 'management_satisfied_ta') {
document.getElementById('operationalfund1').style.backgroundColor = "green";
_this.OperationalRiskForm.controls['current_custodian'].setValue(res.data[0]['current_custodian']);
}
else if (res.data[0]['current_custodian'] == 'management_disatisfied') {
document.getElementById('operationalfund1').style.backgroundColor = "orange";
_this.OperationalRiskForm.controls['current_custodian'].setValue(res.data[0]['current_custodian']);
}
if (res.data[0]['current_depositary'] == 'management_satisfied_ta') {
document.getElementById('operationalfund2').style.backgroundColor = "green";
_this.OperationalRiskForm.controls['current_depositary'].setValue(res.data[0]['current_depositary']);
}
else if (res.data[0]['current_depositary'] == 'management_disatisfied') {
document.getElementById('operationalfund2').style.backgroundColor = "orange";
_this.OperationalRiskForm.controls['current_depositary'].setValue(res.data[0]['current_depositary']);
}
}
else {
_this.operationalId = '';
_this.nav_timeliness = '0';
_this.material_nav_error = '0';
_this.immaterial_nav_error = '0';
_this.im_with_failrate = '0';
_this.im_rag_rating = '0';
_this.im_past_deadlines = '0';
_this.dealing_errors = '0';
_this.current_transfer_agency = 'management_satisfied_ta';
_this.current_custodian = 'management_satisfied_ta';
_this.current_depositary = 'management_satisfied_ta';
//toastr.error(res.message);
}
}
_this.spinner.hide();
}, function (error) {
_this.getOprationalRisk();
_this.spinner.hide();
});
};
OperationalRiskComponent.prototype.getcheckbox = function () {
if ((localStorage.getItem('custom:user_role') == 'manco user') || (localStorage.getItem('custom:user_role') == 'Manco Head')) {
if (document.getElementById('mark_MancoReview').checked == true) {
document.getElementById('material').readOnly = true;
document.getElementById('immaterial').readOnly = true;
document.getElementById('timeliness').readOnly = true;
document.getElementById('operationalId').readOnly = true;
document.getElementById('im_rate').readOnly = true;
document.getElementById('im_market').readOnly = true;
document.getElementById('ta_dealing').readOnly = true;
document.getElementById('im_dealing').readOnly = true;
}
}
};
OperationalRiskComponent.prototype.OperationalRiskApi = function () {
var _this = this;
if (document.getElementById('timeliness').readOnly == true) {
}
else {
// if (
// this.OperationalRiskForm.value.material_nav_error != '0' &&
// this.OperationalRiskForm.value.immaterial_nav_error != '0' &&
// this.OperationalRiskForm.value.nav_timeliness != '0'
// ) {
sweetalert2__WEBPACK_IMPORTED_MODULE_3___default()({
title: 'save the changes.',
text: " ",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes'
}).then(function (result) {
if (result.value) {
sweetalert2__WEBPACK_IMPORTED_MODULE_3___default()('Successfully', 'Status changed to review.', 'success');
_this.submitForm(_this.OperationalRiskForm.value);
}
});
// } else {
// Swal('Update remaining field(s) data.');
// }
}
};
OperationalRiskComponent.prototype.OperationalRiskApi2 = function () {
var _this = this;
if (document.getElementById('im_dealing').readOnly == true) {
}
else {
// if (
// this.OperationalRiskForm.value.material_nav_error != '0' &&
// this.OperationalRiskForm.value.immaterial_nav_error != '0' &&
// this.OperationalRiskForm.value.nav_timeliness != '0' &&
// this.OperationalRiskForm.value.im_with_failrate != '0' &&
// this.OperationalRiskForm.value.im_past_deadlines != '0' &&
// this.OperationalRiskForm.value.dealing_errors != '0' &&
// this.OperationalRiskForm.value.im_rag_rating != '0'
// ) {
sweetalert2__WEBPACK_IMPORTED_MODULE_3___default()({
title: 'Please change status from open to review.',
text: " ",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes'
}).then(function (result) {
if (result.value) {
sweetalert2__WEBPACK_IMPORTED_MODULE_3___default()('Successfully', 'Status changed to review.', 'success');
_this.submitForm(_this.OperationalRiskForm.value);
}
});
// } else {
// Swal('Update remaining field(s) data.');
// }
}
};
OperationalRiskComponent.prototype.submitForm = function (value) {
var _this = this;
var data = value;
var btn;
if ((localStorage.getItem('custom:user_role') == 'manco user') || (localStorage.getItem('custom:user_role') == 'Manco Head')) {
//this.userDataId = this.user['username']
btn = document.getElementById("submitData");
btn.innerText = "Processing...";
btn.disabled = true;
}
else {
this.userDataId = _environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].mancoUser;
}
this.userDataId = _environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].mancoUser;
if (document.getElementById('material_color').checked == true) {
this.material_color = '#00b160';
}
else {
this.material_color = '#e56e0d';
}
if (document.getElementById('immaterial_color').checked == true) {
this.immaterial_color = '#00b160';
}
else {
this.immaterial_color = '#e56e0d';
}
if (document.getElementById('timeliness_color').checked == true) {
this.timeliness_Color = '#00b160';
}
else {
this.timeliness_Color = '#e56e0d';
}
if (document.getElementById('im_rate_color').checked == true) {
this.im_rate_color = '#00b160';
}
else {
this.im_rate_color = '#e56e0d';
}
if (document.getElementById('im_market_color').checked == true) {
this.im_market_color = '#00b160';
}
else {
this.im_market_color = '#e56e0d';
}
if (document.getElementById('ta_dealing_color').checked == true) {
this.ta_dealing_color = '#00b160';
}
else {
this.ta_dealing_color = '#e56e0d';
}
if (document.getElementById('im_dealing_color').checked == true) {
this.im_dealing_color = '#00b160';
}
else {
this.im_dealing_color = '#e56e0d';
}
data['action'] = 'saveOperationalRisk';
data['userid'] = this.userDataId;
data['month'] = this.Param;
data['year'] = Number(this.year);
data['material_color'] = this.material_color;
data['immaterial_color'] = this.immaterial_color;
data['timeliness_Color'] = this.timeliness_Color;
data['im_rate_color'] = this.im_rate_color;
data['im_market_color'] = this.im_market_color;
data['ta_dealing_color'] = this.ta_dealing_color;
data['im_dealing_color'] = this.im_dealing_color;
data['available_for_review'] = false;
data['ined_director_review'] = false;
data['director_review'] = false;
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
if (_this.userRole == 'manco user') {
_this.OperationalRiskForm.controls['operationalId'].setValue(res.data['operationalId']);
_this.OperationalRiskForm.controls['nav_timeliness'].setValue(res.data['nav_timeliness']);
_this.OperationalRiskForm.controls['material_nav_error'].setValue(res.data['material_nav_error']);
_this.OperationalRiskForm.controls['immaterial_nav_error'].setValue(res.data['immaterial_nav_error']);
_this.OperationalRiskForm.controls['im_with_failrate'].setValue(res.data['im_with_failrate']);
_this.OperationalRiskForm.controls['im_rag_rating'].setValue(res.data['im_rag_rating']);
_this.OperationalRiskForm.controls['im_past_deadlines'].setValue(res.data['im_past_deadlines']);
_this.OperationalRiskForm.controls['dealing_errors'].setValue(res.data['dealing_errors']);
_this.OperationalRiskForm.controls['current_transfer_agency'].setValue(res.data['current_transfer_agency']);
_this.OperationalRiskForm.controls['current_custodian'].setValue(res.data['current_custodian']);
_this.OperationalRiskForm.controls['current_depositary'].setValue(res.data['current_depositary']);
}
toastr.success('Changes Saved', 'Success');
}
else {
toastr.error(res.message);
}
btn.innerText = "Submit";
btn.disabled = false;
});
};
OperationalRiskComponent.prototype.changeCOlor = function () {
if (document.getElementById('material_color').checked == true) {
document.getElementById('material').style.backgroundColor = '#00b160';
}
else {
document.getElementById('material').style.backgroundColor = '#e56e0d';
}
};
OperationalRiskComponent.prototype.changeCOlor2 = function () {
if (document.getElementById('immaterial_color').checked == true) {
document.getElementById('immaterial').style.backgroundColor = '#00b160';
}
else {
document.getElementById('immaterial').style.backgroundColor = '#e56e0d';
}
};
OperationalRiskComponent.prototype.changeCOlor3 = function () {
if (document.getElementById('timeliness_color').checked == true) {
document.getElementById('timeliness').style.backgroundColor = '#00b160';
}
else {
document.getElementById('timeliness').style.backgroundColor = '#e56e0d';
}
};
OperationalRiskComponent.prototype.changeCOlor4 = function () {
if (document.getElementById('im_rate_color').checked == true) {
document.getElementById('im_rate').style.backgroundColor = '#00b160';
}
else {
document.getElementById('im_rate').style.backgroundColor = '#e56e0d';
}
};
OperationalRiskComponent.prototype.changeCOlor5 = function () {
if (document.getElementById('im_market_color').checked == true) {
document.getElementById('im_market').style.backgroundColor = '#00b160';
}
else {
document.getElementById('im_market').style.backgroundColor = '#e56e0d';
}
};
OperationalRiskComponent.prototype.changeCOlor6 = function () {
if (document.getElementById('ta_dealing_color').checked == true) {
document.getElementById('ta_dealing').style.backgroundColor = '#00b160';
}
else {
document.getElementById('ta_dealing').style.backgroundColor = '#e56e0d';
}
};
OperationalRiskComponent.prototype.changeCOlor7 = function () {
if (document.getElementById('im_dealing_color').checked == true) {
document.getElementById('im_dealing').style.backgroundColor = '#00b160';
}
else {
document.getElementById('im_dealing').style.backgroundColor = '#e56e0d';
}
};
OperationalRiskComponent.prototype.openpopup = function () {
document.getElementById("AdminmyDropdown").classList.toggle("show");
};
OperationalRiskComponent.prototype.CallReviw = function () {
var _this = this;
// if (
// this.OperationalRiskForm.value.material_nav_error != '0' &&
// this.OperationalRiskForm.value.immaterial_nav_error != '0' &&
// this.OperationalRiskForm.value.nav_timeliness != '0' &&
// this.OperationalRiskForm.value.im_with_failrate != '0' &&
// this.OperationalRiskForm.value.im_past_deadlines != '0' &&
// this.OperationalRiskForm.value.dealing_errors != '0' &&
// this.OperationalRiskForm.value.im_rag_rating != '0'
// ) {
if (document.getElementById('mark_MancoReview').checked != true) {
sweetalert2__WEBPACK_IMPORTED_MODULE_3___default()({
title: 'Please change status from open to review.',
text: " ",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes'
}).then(function (result) {
if (result.value) {
sweetalert2__WEBPACK_IMPORTED_MODULE_3___default()('Successfully', 'Your data has been updated.', 'success');
_this.submitForm(_this.OperationalRiskForm.value);
}
});
}
// }else{
// Swal('Update remaining field(s) data.');
// }
};
/******** Get File Data *************/
OperationalRiskComponent.prototype.AdminChanges = function () {
var _this = this;
sweetalert2__WEBPACK_IMPORTED_MODULE_3___default()({
title: 'Please change status from open to review.',
text: " ",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes'
}).then(function (result) {
if (result.value) {
sweetalert2__WEBPACK_IMPORTED_MODULE_3___default()('Successfully', 'Your data has been updated.', 'success');
var data = {
'operationalId': _this.operationalId,
'nav_timeliness': _this.nav_timeliness,
'material_nav_error': _this.material_nav_error,
'immaterial_nav_error': _this.immaterial_nav_error,
'im_with_failrate': _this.im_with_failrate,
'im_rag_rating': _this.im_rag_rating,
'im_past_deadlines': _this.im_past_deadlines,
'dealing_errors': _this.dealing_errors,
'current_transfer_agency': document.getElementById('operationalfund').value,
'current_custodian': document.getElementById('operationalfund1').value,
'current_depositary': document.getElementById('operationalfund2').value,
'available_for_review': _this.available_for_review,
'ined_director_review': _this.ined_director_review,
'director_review': _this.director_review,
'action': 'saveOperationalRisk'
};
_this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
if (res.data != null && res.data != '') {
toastr.success('Successfully Updated');
}
}
else {
toastr.error('Internal Server Error');
}
});
}
});
};
OperationalRiskComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-operational-risk',
template: __webpack_require__(/*! ./operational-risk.component.html */ "./src/app/components/milestone/operational-risk/operational-risk.component.html"),
styles: [__webpack_require__(/*! ./operational-risk.component.css */ "./src/app/components/milestone/operational-risk/operational-risk.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_services_common_service__WEBPACK_IMPORTED_MODULE_2__["CommonService"],
_angular_forms__WEBPACK_IMPORTED_MODULE_6__["FormBuilder"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_5__["CognitoUtil"],
ngx_spinner__WEBPACK_IMPORTED_MODULE_7__["NgxSpinnerService"]])
], OperationalRiskComponent);
return OperationalRiskComponent;
}());
/***/ }),
/***/ "./src/app/components/milestone/organisation/organisation.component.css":
/*!******************************************************************************!*\
!*** ./src/app/components/milestone/organisation/organisation.component.css ***!
\******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".fund_inner_block .fund_form_detail label.capital_adequacy {\r\n width: 45px;\r\n float: left;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 7px 1px;\r\n text-align: center;\r\n}\r\n.fund_inner_block .fund_form_detail label.capital_budget {\r\n width: 45px;\r\n float: left;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 7px 0px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n}\r\n.tab_content_left .tab-content {\r\n overflow-y: scroll;\r\n}"
/***/ }),
/***/ "./src/app/components/milestone/organisation/organisation.component.html":
/*!*******************************************************************************!*\
!*** ./src/app/components/milestone/organisation/organisation.component.html ***!
\*******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = " \r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n Loading...
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Organisational Effectiveness Dashboard \r\n
\r\n
\r\n
\r\n \r\n Organisational Effectiveness \r\n
\r\n
\r\n
\r\n
Conflicts of Interest \r\n \r\n
\r\n
\r\n
\r\n
\r\n = 48 && event.charCode <= 57\">\r\n Updates during the month \r\n
\r\n
\r\n
\r\n \r\n \r\n {{monthupdates}}\r\n \r\n \r\n 0 \r\n \r\n Updates during the month \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
Personal Account Dealing and Gratifications \r\n \r\n
\r\n
\r\n
\r\n
\r\n = 48 && event.charCode <= 57\">\r\n Returns Outstanding at the end of the month \r\n
\r\n
\r\n Submit \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n {{monthreturns}}\r\n \r\n \r\n 0 \r\n \r\n Returns Outstanding at the end of the month \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n "
/***/ }),
/***/ "./src/app/components/milestone/organisation/organisation.component.ts":
/*!*****************************************************************************!*\
!*** ./src/app/components/milestone/organisation/organisation.component.ts ***!
\*****************************************************************************/
/*! exports provided: OrganisationComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OrganisationComponent", function() { return OrganisationComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! sweetalert2 */ "./node_modules/sweetalert2/dist/sweetalert2.all.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var ngx_spinner__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-spinner */ "./node_modules/ngx-spinner/fesm5/ngx-spinner.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 OrganisationComponent = /** @class */ (function () {
function OrganisationComponent(router, fundform, cognitoUtil, common, spinner) {
this.router = router;
this.fundform = fundform;
this.cognitoUtil = cognitoUtil;
this.common = common;
this.spinner = spinner;
this.year = window.location.href.substr(window.location.href.lastIndexOf('/') + 1);
this.title = 'Organisation';
this.userRole = localStorage.getItem('custom:user_role');
this.monthNames = [
{},
{ 'id': '1', 'name': 'January' },
{ 'id': '2', 'name': 'February' },
{ 'id': '3', 'name': 'March' },
{ 'id': '4', 'name': 'April' },
{ 'id': '5', 'name': 'May' },
{ 'id': '6', 'name': 'June' },
{ 'id': '7', 'name': 'July' },
{ 'id': '8', 'name': 'August' },
{ 'id': '9', 'name': 'September' },
{ 'id': '10', 'name': 'October' },
{ 'id': '11', 'name': 'November' },
{ 'id': '12', 'name': 'December' }
];
this.CurrentUrl = window.location.href;
this.result = this.CurrentUrl.split('/');
this.url = this.result[this.result.length - 3];
this.Param = this.result[this.result.length - 2];
// monthYear = this.Param;
this.monthYear = this.monthNames[this.Param];
this.data = new FormData();
this.user = this.cognitoUtil.getCurrentUser();
this.arrayFilename = [];
this.OrganisationalForm = fundform.group({
'orgeffectivenessId': '',
"monthupdates": [0],
'monthreturns': [0],
});
}
OrganisationComponent.prototype.ngOnInit = function () {
if (sessionStorage.getItem('token') != null && sessionStorage.getItem('token') != '') {
this.spinner.show();
this.getOrganisational();
}
else {
this.router.navigateByUrl('/login');
}
};
OrganisationComponent.prototype.getOrganisational = function () {
var _this = this;
this.userDataId = _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser;
var data = {
'action': 'getorgEffctData',
'userid': this.userDataId,
'month': Number(this.Param),
'year': Number(this.year)
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
if (res.data != null && res.data != '') {
if (localStorage.getItem('custom:user_role') == 'manco user') {
_this.OrganisationalForm.controls['orgeffectivenessId'].setValue(res.data[0]['orgeffectivenessId']);
_this.OrganisationalForm.controls['monthupdates'].setValue(res.data[0]['monthupdates']);
_this.OrganisationalForm.controls['monthreturns'].setValue(res.data[0]['monthreturns']);
// if (res.data[0]['available_for_review'] == "true") {
// (document.getElementById('mark_MancoReview')).checked = res.data[0]['available_for_review'];
// this.getcheckbox();
// } else {
// (document.getElementById('mark_MancoReview')).checked = false;
// }
}
else {
_this.orgeffectivenessId = res.data[0]['orgeffectivenessId'];
_this.monthupdates = res.data[0]['monthupdates'];
_this.monthreturns = res.data[0]['monthreturns'];
_this.userIDs = res.data[0]['userid'];
_this.available_for_review = res.data[0]['available_for_review'];
_this.director_review = res.data[0]['director_review'];
_this.ined_director_review = res.data[0]['ined_director_review'];
}
}
else {
//toastr.error('Data not found' , 'Error !');
}
}
else {
_this.orgeffectivenessId = 0;
_this.monthupdates = 0;
_this.monthreturns = 0;
_this.userIDs = 0;
_this.ined_director_review = false;
_this.available_for_review = false;
_this.director_review = false;
toastr.error('Internal Server Error ');
}
_this.spinner.hide();
}, function (error) {
_this.getOrganisational();
_this.spinner.hide();
});
};
OrganisationComponent.prototype.getcheckbox = function () {
if (localStorage.getItem('custom:user_role') == 'manco user') {
if (document.getElementById('mark_MancoReview').checked == true) {
document.getElementById('interest_during').readOnly = true;
document.getElementById('monthreturns').readOnly = true;
}
}
};
OrganisationComponent.prototype.fundRiskApi = function () {
var _this = this;
if (document.getElementById('monthreturns').readOnly == true &&
document.getElementById('interest_during').readOnly == true) {
}
else {
// if (this.OrganisationalForm.value.monthupdates != '0' && this.OrganisationalForm.value.monthreturns != '0') {
sweetalert2__WEBPACK_IMPORTED_MODULE_5___default()({
title: 'Please change status from open to review.',
text: " ",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes'
}).then(function (result) {
if (result.value) {
sweetalert2__WEBPACK_IMPORTED_MODULE_5___default()('Successfully', 'Status changed to review.', 'success');
_this.submitForm(_this.OrganisationalForm.value);
}
});
// } else {
// Swal('Update remaining field(s) data.');
// }
}
};
OrganisationComponent.prototype.submitForm = function (value) {
var _this = this;
if (document.getElementById('mark_MancoReview').checked == false) {
var btn_1 = document.getElementById("submitData");
btn_1.innerHTML = 'Processing...';
btn_1.disabled = true;
var data = value;
this.userDataId = _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser;
data['action'] = 'saveOrgEffectData';
data['userid'] = this.userDataId;
data['month'] = Number(this.Param);
data['year'] = Number(this.year);
data['created_at'] = new Date().getTime();
data['updated_at'] = new Date().getTime();
data['available_for_review'] = false;
data['director_review'] = false;
data['ined_director_review'] = false;
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
if (res.message != null) {
if (_this.userRole == 'manco user') {
_this.OrganisationalForm.controls['orgeffectivenessId'].setValue(res.data['orgeffectivenessId']);
_this.OrganisationalForm.controls['monthupdates'].setValue(res.data['monthupdates']);
_this.OrganisationalForm.controls['monthreturns'].setValue(res.data['monthreturns']);
}
else {
_this.orgeffectivenessId = res.data['orgeffectivenessId'];
_this.monthupdates = res.data['monthupdates'];
_this.monthreturns = res.data['monthreturns'];
_this.userIDs = res.data['userid'];
}
toastr.success('Changes Saved', 'Success');
}
else {
toastr.error('Internal Server Error ');
}
}
else {
toastr.error('Internal Server Error ');
}
btn_1.innerHTML = 'Submit';
btn_1.disabled = false;
});
}
};
OrganisationComponent.prototype.CallReviw = function () {
this.submitForm(this.OrganisationalForm.value);
};
OrganisationComponent.prototype.popup = function () {
var element = document.getElementById("qnimate");
element.classList.add("popup-box-on");
//document.getElementById("qnimate").className = "popup-box-on";
};
OrganisationComponent.prototype.openFilepopup = function () {
document.getElementById("myDropdown").classList.toggle("show");
};
OrganisationComponent.prototype.openpopup = function () {
document.getElementById("AdminmyDropdown").classList.toggle("show");
};
OrganisationComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-organisation',
template: __webpack_require__(/*! ./organisation.component.html */ "./src/app/components/milestone/organisation/organisation.component.html"),
styles: [__webpack_require__(/*! ./organisation.component.css */ "./src/app/components/milestone/organisation/organisation.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_4__["CognitoUtil"],
_services_common_service__WEBPACK_IMPORTED_MODULE_3__["CommonService"],
ngx_spinner__WEBPACK_IMPORTED_MODULE_7__["NgxSpinnerService"]])
], OrganisationComponent);
return OrganisationComponent;
}());
/***/ }),
/***/ "./src/app/components/milestone/regulatorycompliance/regulatorycompliance.component.css":
/*!**********************************************************************************************!*\
!*** ./src/app/components/milestone/regulatorycompliance/regulatorycompliance.component.css ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".green {\r\n background-color: #00b160;\r\n}\r\n.orange{\r\n background-color: #e56e0d;\r\n}\r\n.form_selector {\r\n border-radius: 25px;\r\n /* background-color: #00b160; */\r\n width: 90%;\r\n font-size: 16px;\r\n padding: 10px 13px;\r\n outline: none;\r\n color: #fff;\r\n border: none;\r\n float: left;\r\n margin: 11px 25px;\r\n}\r\np {\r\n margin: 0 0 3px;\r\n}\r\ntextarea.textarea {\r\n width: 100%;\r\n color: #000;\r\n float: left;\r\n padding-left: 18px;\r\n}\r\n.tab_content_left .tab-content {\r\n float: left;\r\n width: 100%;\r\n height: 100%;\r\n overflow-y: scroll;\r\n}\r\n.coment_area {\r\n float: left;\r\n width: 100%;\r\n padding: 0px 37px;\r\n display: none;\r\n}\r\n.loader {\r\n border: 16px solid #f3f3f3;\r\n border-radius: 50%;\r\n border-top: 16px solid #3498db;\r\n width: 120px;\r\n height: 120px;\r\n -webkit-animation: spin 2s linear infinite; /* Safari */\r\n animation: spin 2s linear infinite;\r\n }\r\n/* Safari */\r\n@-webkit-keyframes spin {\r\n 0% { -webkit-transform: rotate(0deg); }\r\n 100% { -webkit-transform: rotate(360deg); }\r\n }\r\n@keyframes spin {\r\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\r\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\r\n }\r\n/* label.advertent {\r\n width: 30px;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 3px 1px;\r\n text-align: center;\r\n}\r\nlabel.inadvertent {\r\n width: 30px;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 3px 1px;\r\n text-align: center;\r\n}\r\n\r\nlabel.comadvertent{\r\n width: 30px;\r\n background-color: #e56e0d;\r\n color: #fff;\r\n border: none;\r\n padding: 3px 1px;\r\n text-align: center;\r\n}\r\n\r\nlabel.nigoacount {\r\n width: 30px;\r\n background-color: #e56e0d;\r\n color: #fff;\r\n border: none;\r\n padding: 3px 1px;\r\n text-align: center;\r\n}\r\nlabel.peps {\r\n width: 30px;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 3px 1px;\r\n text-align: center;\r\n}\r\nlabel.investorcom{\r\n width: 30px;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 3px 1px;\r\n text-align: center;\r\n} */\r\n/******chat box design*************/\r\n/* .dropbtn {\r\n background-color: #3498DB;\r\n color: white;\r\n padding: 16px;\r\n font-size: 16px;\r\n border: none;\r\n cursor: pointer;\r\n} */\r\n/* Dropdown button on hover & focus */\r\n/* .dropbtn:hover, .dropbtn:focus {\r\n background-color: #2980B9;\r\n} */\r\n/* The container - needed to position the dropdown content */\r\n/* .dropdown {\r\n position: relative;\r\n display: inline-block;\r\n} */\r\n/* Dropdown Content (Hidden by Default) */\r\n/* .dropdown-content{ \r\n width: 86%;\r\n display: none;\r\n position: absolute;\r\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\r\n z-index: 1; \r\n top: 52%;\r\n border: 2px solid #008ad1;\r\n border-radius: 10px;\r\n background-color: #EBEFF2;\r\n} */\r\n/* Links inside the dropdown */\r\n/* .dropdown-content a {\r\n color: black;\r\n padding: 12px 16px;\r\n text-decoration: none;\r\n display: block;\r\n}\r\nlabel#fileupload {\r\n float: left;\r\n width: 100%;\r\n}\r\nlabel#fileupload input#wedd {\r\n float: right;\r\n width: 100%;\r\n font-size: 13px;\r\n}\r\n.dropdown_form {\r\n float: left;\r\n width: 100%;\r\n padding: 14px 7px;\r\n}\r\n.dropdown_form .fileupload {\r\n float: left;\r\n width: 70%;\r\n overflow: hidden;\r\n}\r\n.dropdown_form .file_sub {\r\n float: left;\r\n width: 30%;\r\n text-align: center;\r\n}\r\ninput[type=\"submit\"] { \r\n background: transparent;\r\n border: none;\r\n color: #008ad1;\r\n font-size: 15px;\r\n font-family: -webkit-body;\r\n} */\r\n/*-------------------------Responsive Css--------------------------*/\r\n/* @media only screen and (max-width: 1199px){\r\n .dropdown-content[_ngcontent-c1] {\r\n width: 84%;\r\n display: none;\r\n top: 52%;\r\n }\r\n}\r\n@media (min-width: 979px) and (max-width: 1199px) {\r\n} \r\n@media only screen and (max-width: 991px){\r\n .dropdown-content[_ngcontent-c1] {\r\n width: 52%;\r\n display: none;\r\n top: 38%;\r\n }\r\n}\r\n@media (min-width: 768px) and (max-width: 979px) {}\r\n@media only screen and (max-width: 767px){\r\n .dropdown-content[_ngcontent-c1][_ngcontent-c1] {\r\n width: 50%;\r\n display: none;\r\n top: 38%;\r\n }\r\n}\r\n\r\n@media only screen and (max-width: 640px){\r\n}\r\n@media only screen and (max-width: 480px){ \r\n .dropdown-content[_ngcontent-c1][_ngcontent-c1] {\r\n width: 87%;\r\n display: none;\r\n top: 38%;\r\n }\r\n\r\n} \r\n\r\n@media only screen and (max-width: 360px){\r\n .dropdown-content[_ngcontent-c1][_ngcontent-c1][_ngcontent-c1] {\r\n width: 85%;\r\n display: none;\r\n top: 38%;\r\n }\r\n}\r\n\r\n@media only screen and (max-width: 320px){\r\n .dropdown-content[_ngcontent-c1][_ngcontent-c1][_ngcontent-c1][_ngcontent-c1] {\r\n width: 83%;\r\n display: none;\r\n top: 38%;\r\n }\r\n} */"
/***/ }),
/***/ "./src/app/components/milestone/regulatorycompliance/regulatorycompliance.component.html":
/*!***********************************************************************************************!*\
!*** ./src/app/components/milestone/regulatorycompliance/regulatorycompliance.component.html ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n Loading...
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
"
/***/ }),
/***/ "./src/app/components/milestone/regulatorycompliance/regulatorycompliance.component.ts":
/*!*********************************************************************************************!*\
!*** ./src/app/components/milestone/regulatorycompliance/regulatorycompliance.component.ts ***!
\*********************************************************************************************/
/*! exports provided: RegulatorycomplianceComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RegulatorycomplianceComponent", function() { return RegulatorycomplianceComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _model_mothdetails__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../model/mothdetails */ "./src/app/model/mothdetails.ts");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var _services_auth_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! sweetalert2 */ "./node_modules/sweetalert2/dist/sweetalert2.all.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var ngx_spinner__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ngx-spinner */ "./node_modules/ngx-spinner/fesm5/ngx-spinner.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 RegulatorycomplianceComponent = /** @class */ (function () {
function RegulatorycomplianceComponent(router, Rgform, cognitoUtil, common, auth, spinner) {
this.router = router;
this.Rgform = Rgform;
this.cognitoUtil = cognitoUtil;
this.common = common;
this.auth = auth;
this.spinner = spinner;
this.monthNames = [
{},
{ 'id': '1', 'name': 'January' },
{ 'id': '2', 'name': 'February' },
{ 'id': '3', 'name': 'March' },
{ 'id': '4', 'name': 'April' },
{ 'id': '5', 'name': 'May' },
{ 'id': '6', 'name': 'June' },
{ 'id': '7', 'name': 'July' },
{ 'id': '8', 'name': 'August' },
{ 'id': '9', 'name': 'September' },
{ 'id': '10', 'name': 'October' },
{ 'id': '11', 'name': 'November' },
{ 'id': '12', 'name': 'December' }
];
this.Monthdetails = new _model_mothdetails__WEBPACK_IMPORTED_MODULE_2__["Monthdetails"]();
this.userId = localStorage.getItem('userId');
this.userrole = localStorage.getItem('custom:user_role');
this.year = window.location.href.substr(window.location.href.lastIndexOf('/') + 1);
this.CurrentUrl = window.location.href;
this.result = this.CurrentUrl.split('/');
this.url = this.result[this.result.length - 3];
this.Param = this.result[this.result.length - 2];
this.monthYear = this.Param;
this.monthName = this.monthNames[this.Param];
this.title = 'Regulatory Compliance';
this.data = new FormData();
this.getRegdata = new FormData();
this.advertent_breach = '0';
this.inadvertent_breach = '0';
this.complaince_statement_past_due = '0';
this.number_of_NIGO_accounts_at_monthend = '0';
this.number_of_peps = '0';
this.investor_complaints_recieved = '0';
this.mlro_sattisfaction_with_aml_kyc_delegates = '0';
this.available_for_review = '0';
this.director_review = '0';
this.ined_director_review = '0';
this.comment = '0';
this.color = '0';
this.month_reviewId = '0';
this.user_review = '0';
this.user = this.cognitoUtil.getCurrentUser();
/*************Enter function for change color ******** */
this.arrayFilename = [];
this.getDatasR = [];
this.RegulatoryComplianceForm = Rgform.group({
'regulatoryId': '',
'comment': '',
"advertent_breach": [0],
"inadvertent_breach": [0],
'complaince_statement_past_due': [0],
'number_of_NIGO_accounts_at_monthend': [0],
'number_of_peps': [0],
'investor_complaints_recieved': [0],
'mlro_sattisfaction_with_aml_kyc_delegates': 'mlro_statisfied',
'file': ''
});
}
RegulatorycomplianceComponent.prototype.popup = function () {
var element = document.getElementById("qnimate");
element.classList.add("popup-box-on");
//document.getElementById("qnimate").className = "popup-box-on";
};
RegulatorycomplianceComponent.prototype.ngOnInit = function () {
if (localStorage.getItem('token') == null || localStorage.getItem('token') == '') {
this.router.navigateByUrl('/login');
}
else {
this.spinner.show();
this.getdata();
}
};
// funtion for set readonly property
RegulatorycomplianceComponent.prototype.getcheckbox = function () {
if ((localStorage.getItem('custom:user_role') == 'manco user') || (localStorage.getItem('custom:user_role') == 'Manco Head')) {
if (document.getElementById('mark_MancoReview').checked == true) {
document.getElementById('advertent').readOnly = true;
document.getElementById('inadvertent').readOnly = true;
document.getElementById('comadvertent').readOnly = true;
document.getElementById('nigoacount').readOnly = true;
document.getElementById('peps').readOnly = true;
document.getElementById('investorcom').readOnly = true;
}
}
};
// function for first blur
RegulatorycomplianceComponent.prototype.onBlurMethod = function () {
var _this = this;
// if (
// this.RegulatoryComplianceForm.value.advertent_breach != '0' &&
// this.RegulatoryComplianceForm.value.inadvertent_breach != '0' &&
// this.RegulatoryComplianceForm.value.complaince_statement_past_due != '0'
// ) {
if (document.getElementById('mark_MancoReview').checked == true) {
}
else {
sweetalert2__WEBPACK_IMPORTED_MODULE_7___default()({
title: 'Save the changes',
//text: "You won't be able to revert this!",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes'
}).then(function (result) {
if (result.value) {
sweetalert2__WEBPACK_IMPORTED_MODULE_7___default()(' ', 'Status changed to review.', 'success');
_this.submitForm(_this.RegulatoryComplianceForm.value);
}
});
}
// } else {
// Swal('Update remaining field(s) data.');
// }
};
/******function for file uploading********/
/*****************submit / Update Api************* */
RegulatorycomplianceComponent.prototype.submitForm = function (value) {
var _this = this;
if (document.getElementById('mark_MancoReview').checked == false) {
if (document.getElementById('advertent_breach_color').checked == true) {
this.advertent_breach_color = '#00b160';
}
else if (document.getElementById('advertent_breach_color').checked == false) {
this.advertent_breach_color = '#e56e0d';
}
if (document.getElementById('inadvertent_breach_color').checked == true) {
this.inadvertent_breach_color = '#00b160';
}
else if (document.getElementById('inadvertent_breach_color').checked == false) {
this.inadvertent_breach_color = '#e56e0d';
}
if (document.getElementById('complaince_statement_past_due_color').checked == true) {
this.complaince_statement_past_due_color = '#00b160';
}
else if (document.getElementById('complaince_statement_past_due_color').checked == false) {
this.complaince_statement_past_due_color = '#e56e0d';
}
if (document.getElementById('number_of_NIGO_accounts_at_monthend_color').checked == true) {
this.number_of_NIGO_accounts_at_monthend_color = '#00b160';
}
else if (document.getElementById('number_of_NIGO_accounts_at_monthend_color').checked == false) {
this.number_of_NIGO_accounts_at_monthend_color = '#e56e0d';
}
if (document.getElementById('number_of_peps_color').checked == true) {
this.number_of_peps_color = '#00b160';
}
else if (document.getElementById('number_of_peps_color').checked == false) {
this.number_of_peps_color = '#e56e0d';
}
if (document.getElementById('investor_complaints_recieved_color').checked == true) {
this.investor_complaints_recieved_color = '#00b160';
}
else if (document.getElementById('investor_complaints_recieved_color').checked == false) {
this.investor_complaints_recieved_color = '#e56e0d';
}
var data = value;
data['action'] = 'saveRegulatoryReportData';
//data['userid'] = this.user['username'];environment.mancoUser
data['userid'] = _environments_environment__WEBPACK_IMPORTED_MODULE_8__["environment"].mancoUser;
data['month'] = this.monthName.id;
data['year'] = this.year;
data['available_for_review'] = false;
data['director_review'] = false;
data['ined_director_review'] = false;
data['color'] = '';
data['advertent_breach_color'] = this.advertent_breach_color;
data['inadvertent_breach_color'] = this.inadvertent_breach_color;
data['complaince_statement_past_due_color'] = this.complaince_statement_past_due_color;
data['number_of_NIGO_accounts_at_monthend_color'] = this.number_of_NIGO_accounts_at_monthend_color;
data['number_of_peps_color'] = this.number_of_peps_color;
data['investor_complaints_recieved_color'] = this.investor_complaints_recieved_color;
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
toastr.success('Changes Saved', 'Success');
}
else {
//toastr.error(res.message, 'Error');
}
_this.getdata();
});
}
};
/************* Start this function for change color ******** */
RegulatorycomplianceComponent.prototype.changeCOlor = function () {
if (document.getElementById('advertent_breach_color').checked == true) {
document.getElementById('advertent').style.backgroundColor = "#00b160";
}
else {
document.getElementById('advertent').style.backgroundColor = "#e56e0d";
}
};
RegulatorycomplianceComponent.prototype.changeCOlor2 = function () {
if (document.getElementById('inadvertent_breach_color').checked == true) {
document.getElementById('inadvertent').style.backgroundColor = "#00b160";
}
else {
document.getElementById('inadvertent').style.backgroundColor = "#e56e0d";
}
};
RegulatorycomplianceComponent.prototype.changeCOlor3 = function () {
if (document.getElementById('complaince_statement_past_due_color').checked == true) {
document.getElementById('comadvertent').style.backgroundColor = "#00b160";
}
else {
document.getElementById('comadvertent').style.backgroundColor = "#e56e0d";
}
};
RegulatorycomplianceComponent.prototype.changeCOlor4 = function () {
if (document.getElementById('number_of_NIGO_accounts_at_monthend_color').checked == true) {
document.getElementById('nigoacount').style.backgroundColor = "#00b160";
}
else {
document.getElementById('nigoacount').style.backgroundColor = "#e56e0d";
}
};
RegulatorycomplianceComponent.prototype.changeCOlor5 = function () {
if (document.getElementById('number_of_peps_color').checked == true) {
document.getElementById('peps').style.backgroundColor = "#00b160";
}
else {
document.getElementById('peps').style.backgroundColor = "#e56e0d";
}
};
RegulatorycomplianceComponent.prototype.changeCOlor6 = function () {
if (document.getElementById('investor_complaints_recieved_color').checked == true) {
document.getElementById('investorcom').style.backgroundColor = "#00b160";
}
else {
document.getElementById('investorcom').style.backgroundColor = "#e56e0d";
}
};
RegulatorycomplianceComponent.prototype.openFilepopup = function () {
document.getElementById("myDropdown").classList.toggle("show");
};
// function for admin open Dowunload supporting Details
RegulatorycomplianceComponent.prototype.openpopup = function () {
document.getElementById("AdminmyDropdown").classList.toggle("show");
};
//function for review calling
RegulatorycomplianceComponent.prototype.CallReviw = function () {
return this.submitForm(this.RegulatoryComplianceForm.value);
};
RegulatorycomplianceComponent.prototype.closePopup = function () {
document.getElementById("myDropdown").classList.toggle("hide");
};
/********************** */
RegulatorycomplianceComponent.prototype.onslectFunction = function (value) {
if (value == 'mlro_statisfied') {
document.getElementById('satisfaction').style.backgroundColor = "green";
}
if (value == 'mlro_disatisfied') {
document.getElementById('satisfaction').style.backgroundColor = "orange";
}
};
RegulatorycomplianceComponent.prototype.OnslectEDFunction = function (value) {
if (value == 'mlro_statisfied') {
document.getElementById('satisfaction').style.backgroundColor = "green";
if (this.mlro_sattisfaction_with_aml_kyc_delegates == 'mlro_disatisfied') {
document.getElementById("textareaComment").classList.remove("show");
}
}
if (value == 'mlro_disatisfied') {
if (this.mlro_sattisfaction_with_aml_kyc_delegates == 'mlro_disatisfied') {
document.getElementById("textareaComment").classList.toggle("show");
}
document.getElementById('satisfaction').style.backgroundColor = "orange";
}
};
RegulatorycomplianceComponent.prototype.getdata = function () {
var _this = this;
this.userDataId = _environments_environment__WEBPACK_IMPORTED_MODULE_8__["environment"].mancoUser;
var data = {
'action': 'getRegulatoryReportData',
'userid': this.userDataId,
'month': this.monthName.id,
'year': this.year
};
this.common.GetUserdataBYheaders(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.data != null && res.data != '') {
if ((localStorage.getItem('custom:user_role') == 'manco user') || localStorage.getItem('custom:user_role') == 'Manco Head') {
_this.RegulatoryComplianceForm.controls['regulatoryId'].setValue(res.data[0]['regulatoryId']);
_this.RegulatoryComplianceForm.controls['comment'].setValue(res.data[0]['comment']);
_this.RegulatoryComplianceForm.controls['advertent_breach'].setValue(res.data[0]['advertent_breach']);
_this.RegulatoryComplianceForm.controls['inadvertent_breach'].setValue(res.data[0]['inadvertent_breach']);
_this.RegulatoryComplianceForm.controls['complaince_statement_past_due'].setValue(res.data[0]['complaince_statement_past_due']);
_this.RegulatoryComplianceForm.controls['number_of_NIGO_accounts_at_monthend'].setValue(res.data[0]['number_of_NIGO_accounts_at_monthend']);
_this.RegulatoryComplianceForm.controls['number_of_peps'].setValue(res.data[0]['number_of_peps']);
_this.RegulatoryComplianceForm.controls['investor_complaints_recieved'].setValue(res.data[0]['investor_complaints_recieved']);
_this.RegulatoryComplianceForm.controls['mlro_sattisfaction_with_aml_kyc_delegates'].setValue(res.data[0]['mlro_sattisfaction_with_aml_kyc_delegates']);
if (res.data[0]['mlro_sattisfaction_with_aml_kyc_delegates'] == 'mlro_statisfied') {
// this.RegulatoryComplianceForm.controls['mlro_sattisfaction_with_aml_kyc_delegates'].setValue(res.data[0]['mlro_sattisfaction_with_aml_kyc_delegates']);
// (
document.getElementById('satisfaction')).value = res.data[0]['mlro_sattisfaction_with_aml_kyc_delegates'];
$('#satisfaction').css('background-color', "green");
}
else if (res.data[0]['mlro_sattisfaction_with_aml_kyc_delegates'] == 'mlro_disatisfied') {
// this.RegulatoryComplianceForm.controls['mlro_sattisfaction_with_aml_kyc_delegates'].setValue(res.data[0]['mlro_sattisfaction_with_aml_kyc_delegates']);
$('#satisfaction').css('background-color', "orange");
}
if (res.data[0].advertent_breach_color == '#00b160') {
document.getElementById('advertent').style.backgroundColor = res.data[0].advertent_breach_color;
document.getElementById('advertent_breach_color').checked = true;
}
else if (res.data[0].advertent_breach_color == '#e56e0d') {
document.getElementById('advertent').style.backgroundColor = res.data[0].advertent_breach_color;
document.getElementById('advertent_breach_color').checked = false;
}
if (res.data[0].inadvertent_breach_color == '#00b160') {
document.getElementById('inadvertent').style.backgroundColor = res.data[0].inadvertent_breach_color;
document.getElementById('inadvertent_breach_color').checked = true;
}
else if (res.data[0].inadvertent_breach_color == '#e56e0d') {
document.getElementById('inadvertent').style.backgroundColor = res.data[0].inadvertent_breach_color;
document.getElementById('inadvertent_breach_color').checked = false;
}
if (res.data[0].complaince_statement_past_due_color == '#00b160') {
document.getElementById('comadvertent').style.backgroundColor = res.data[0].complaince_statement_past_due_color;
document.getElementById('complaince_statement_past_due_color').checked = true;
}
else if (res.data[0].complaince_statement_past_due_color == '#e56e0d') {
document.getElementById('comadvertent').style.backgroundColor = res.data[0].complaince_statement_past_due_color;
document.getElementById('complaince_statement_past_due_color').checked = false;
}
if (res.data[0].number_of_NIGO_accounts_at_monthend_color == '#00b160') {
document.getElementById('nigoacount').style.backgroundColor = res.data[0].number_of_NIGO_accounts_at_monthend_color;
document.getElementById('number_of_NIGO_accounts_at_monthend_color').checked = true;
}
else if (res.data[0].number_of_NIGO_accounts_at_monthend_color == '#e56e0d') {
document.getElementById('nigoacount').style.backgroundColor = res.data[0].number_of_NIGO_accounts_at_monthend_color;
document.getElementById('number_of_NIGO_accounts_at_monthend_color').checked = false;
}
if (res.data[0].number_of_peps_color == '#00b160') {
document.getElementById('peps').style.backgroundColor = res.data[0].number_of_peps_color;
document.getElementById('number_of_peps_color').checked = true;
}
else if (res.data[0].number_of_peps_color == '#e56e0d') {
document.getElementById('peps').style.backgroundColor = res.data[0].number_of_peps_color;
document.getElementById('number_of_peps_color').checked = false;
}
if (res.data[0].investor_complaints_recieved_color == '#00b160') {
document.getElementById('investorcom').style.backgroundColor = res.data[0].investor_complaints_recieved_color;
document.getElementById('investor_complaints_recieved_color').checked = true;
}
else if (res.data[0].investor_complaints_recieved_color == '#e56e0d') {
document.getElementById('investorcom').style.backgroundColor = res.data[0].investor_complaints_recieved_color;
document.getElementById('investor_complaints_recieved_color').checked = false;
}
}
else {
_this.regulatoryId = res.data[0]['regulatoryId'];
_this.comment = res.data[0]['comment'];
_this.userDataId = res.data[0]['userid'];
_this.advertent_breach = res.data[0]['advertent_breach'];
_this.inadvertent_breach = res.data[0]['inadvertent_breach'];
_this.complaince_statement_past_due = res.data[0]['complaince_statement_past_due'];
_this.number_of_NIGO_accounts_at_monthend = res.data[0]['number_of_NIGO_accounts_at_monthend'];
_this.number_of_peps = res.data[0]['number_of_peps'];
_this.investor_complaints_recieved = res.data[0]['investor_complaints_recieved'];
_this.mlro_sattisfaction_with_aml_kyc_delegates = res.data[0]['mlro_sattisfaction_with_aml_kyc_delegates'];
_this.available_for_review = res.data[0]['available_for_review'];
_this.director_review = res.data[0]['director_review'];
_this.ined_director_review = res.data[0]['ined_director_review'];
if (res.data[0]['mlro_sattisfaction_with_aml_kyc_delegates'] == 'mlro_statisfied') {
document.getElementById('satisfaction').style.backgroundColor = "#00b160";
document.getElementById('satisfaction').value = res.data[0]['mlro_sattisfaction_with_aml_kyc_delegates'];
}
else if (res.data[0]['mlro_sattisfaction_with_aml_kyc_delegates'] == 'mlro_disatisfied') {
document.getElementById('satisfaction').style.backgroundColor = "#e56e0d";
document.getElementById('satisfaction').value = res.data[0]['mlro_sattisfaction_with_aml_kyc_delegates'];
}
document.getElementById('satisfaction').disabled = true;
if (res.data[0].advertent_breach_color == '#00b160') {
document.getElementById('advertent').style.backgroundColor = res.data[0].advertent_breach_color;
}
else if (res.data[0].advertent_breach_color == '#e56e0d') {
document.getElementById('advertent').style.backgroundColor = res.data[0].advertent_breach_color;
}
if (res.data[0].inadvertent_breach_color == '#00b160') {
document.getElementById('inadvertent').style.backgroundColor = res.data[0].inadvertent_breach_color;
}
else if (res.data[0].inadvertent_breach_color == '#e56e0d') {
document.getElementById('inadvertent').style.backgroundColor = res.data[0].inadvertent_breach_color;
}
if (res.data[0].complaince_statement_past_due_color == '#00b160') {
document.getElementById('comadvertent').style.backgroundColor = res.data[0].complaince_statement_past_due_color;
}
else if (res.data[0].complaince_statement_past_due_color == '#e56e0d') {
document.getElementById('comadvertent').style.backgroundColor = res.data[0].complaince_statement_past_due_color;
}
if (res.data[0].number_of_NIGO_accounts_at_monthend_color == '#00b160') {
document.getElementById('nigoacount').style.backgroundColor = res.data[0].number_of_NIGO_accounts_at_monthend_color;
}
else if (res.data[0].number_of_NIGO_accounts_at_monthend_color == '#e56e0d') {
document.getElementById('nigoacount').style.backgroundColor = res.data[0].number_of_NIGO_accounts_at_monthend_color;
}
if (res.data[0].number_of_peps_color == '#00b160') {
document.getElementById('peps').style.backgroundColor = res.data[0].number_of_peps_color;
}
else if (res.data[0].number_of_peps_color == '#e56e0d') {
document.getElementById('peps').style.backgroundColor = res.data[0].number_of_peps_color;
}
if (res.data[0].investor_complaints_recieved_color == '#00b160') {
document.getElementById('investorcom').style.backgroundColor = res.data[0].investor_complaints_recieved_color;
}
else if (res.data[0].investor_complaints_recieved_color == '#e56e0d') {
document.getElementById('investorcom').style.backgroundColor = res.data[0].investor_complaints_recieved_color;
}
}
}
else {
_this.advertent_breach = '0';
_this.inadvertent_breach = '0';
_this.complaince_statement_past_due = '0';
_this.number_of_NIGO_accounts_at_monthend = '0';
_this.number_of_peps = '0';
_this.investor_complaints_recieved = '0';
_this.mlro_sattisfaction_with_aml_kyc_delegates = 'mlro_statisfied';
// if (this.userrole == 'administrator' || this.userrole == 'OED INED Director' || this.userrole == 'director') {
// (document.getElementById("fund_review")).disabled = true;
// }
}
_this.spinner.hide();
}, function (error) {
_this.getdata();
_this.spinner.hide();
});
};
RegulatorycomplianceComponent.prototype.sweetAlert = function () {
var _this = this;
// if (
// this.RegulatoryComplianceForm.value.advertent_breach != '0' &&
// this.RegulatoryComplianceForm.value.inadvertent_breach != '0' &&
// this.RegulatoryComplianceForm.value.complaince_statement_past_due != '0' &&
// this.RegulatoryComplianceForm.value.number_of_NIGO_accounts_at_monthend != '0' &&
// this.RegulatoryComplianceForm.value.number_of_peps != '0' &&
// this.RegulatoryComplianceForm.value.investor_complaints_recieved != '0'
// ) {
if (document.getElementById('satisfaction').value == 'mlro_disatisfied') {
// Swal({
// title: 'Please record supporting comment explains your rating.',
// input: 'text',
// inputAttributes: {
// autocapitalize: 'off'
// },
// showCancelButton: true,
// confirmButtonText: 'Comment',
// showLoaderOnConfirm: true,
// preConfirm: (login) => {
// let data = this.RegulatoryComplianceForm.value;
// data['action'] = 'saveRegulatoryReportData';
// data['userid'] = this.user['username'];
// data['month'] = this.monthName.id;
// data['year'] = this.year;
// data['available_for_review'] = this.mancoUserReview;
// data['director_review'] = false;
// data['ined_director_review'] = false;
// data['comment'] = login
// this.common.saveFundRiskData(data)
// .subscribe(Response => {
// if (Response.status == '200') {
// this.getdata();
// }
// })
// },
// allowOutsideClick: () => !Swal.isLoading()
// }).then((result) => {
// if (result.value) {
// Swal(
// ' ',
// 'Status changed to review.',
// 'success'
// )
// this.submitForm(this.RegulatoryComplianceForm.value);
// }
// })
}
else {
sweetalert2__WEBPACK_IMPORTED_MODULE_7___default()({
title: 'Please change status from open to review',
//text: "You won't be able to revert this!",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes'
}).then(function (result) {
if (result.value) {
sweetalert2__WEBPACK_IMPORTED_MODULE_7___default()(' ', 'Status changed to review.', 'success');
_this.submitForm(_this.RegulatoryComplianceForm.value);
_this.getdata();
}
});
}
};
RegulatorycomplianceComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-regulatorycompliance',
template: __webpack_require__(/*! ./regulatorycompliance.component.html */ "./src/app/components/milestone/regulatorycompliance/regulatorycompliance.component.html"),
styles: [__webpack_require__(/*! ./regulatorycompliance.component.css */ "./src/app/components/milestone/regulatorycompliance/regulatorycompliance.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_5__["CognitoUtil"],
_services_common_service__WEBPACK_IMPORTED_MODULE_4__["CommonService"],
_services_auth_service__WEBPACK_IMPORTED_MODULE_6__["AuthService"],
ngx_spinner__WEBPACK_IMPORTED_MODULE_9__["NgxSpinnerService"]])
], RegulatorycomplianceComponent);
return RegulatorycomplianceComponent;
}());
/***/ }),
/***/ "./src/app/components/milestone/resourcing/resourcing.component.css":
/*!**************************************************************************!*\
!*** ./src/app/components/milestone/resourcing/resourcing.component.css ***!
\**************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".tab-content {\r\n overflow-y: scroll;\r\n}\r\nselect#resourcing_select {\r\n width: 50px;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 7px 0px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n outline: none;\r\n}\r\nselect#core_legal{\r\n width: 50px;\r\n background-color: #00b160;\r\n color: #fff;\r\n border: none;\r\n padding: 7px 0px;\r\n text-align: center;\r\n display: table;\r\n float: left;\r\n outline: none;\r\n}\r\n.radio_buttons {\r\n float: left;\r\n width: auto;\r\n position: relative;\r\n}\r\n.radio_buttons input.selecterRole {\r\n opacity: 0.01;\r\n z-index: 100;\r\n position: absolute;\r\n display: block;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n}\r\nlabel.register-radio {\r\n float: left;\r\n width: 80px;\r\n font-size: 15px;\r\n font-weight: 300;\r\n line-height: 40px;\r\n background-color: #fff;\r\n text-align: center;\r\n /* padding: 0px 14px; */\r\n margin: 0px 15px;\r\n border: 1px solid #008ad1;\r\n color: #008ad1;\r\n border-radius: 10px;\r\n font-weight: 600;\r\n}\r\n.resource_des {\r\n float: left;\r\n width: 55%; \r\n}\r\n.resource_des select {\r\n background-color: green;\r\n color: #fff;\r\n padding: 6px;\r\n font-size: 16px;\r\n outline: none;\r\n width:100%;\r\n}\r\nlabel.register-radio:hover {background-color: #00b160;color: #fff; border: transparent;border: 1px solid #008ad1;}\r\nlabel.register-orange {\r\n float: left;\r\n width: 80px;\r\n font-size: 15px;\r\n font-weight: 300;\r\n line-height: 40px; \r\n background-color: #fff;\r\n text-align: center;\r\n /* padding: 0px 14px; */\r\n margin: 0px 15px;\r\n border: 1px solid #008ad1;\r\n color: #008ad1;\r\n border-radius: 10px;\r\n font-weight: 600;\r\n}\r\nlabel.register-orange:hover {background-color: #e56e0d;color: #fff;border: transparent;border: 1px solid #008ad1; }\r\n.fund_form_inner {\r\n float: left;\r\n width: 45%;\r\n}\r\ninput.Newdesign {\r\n float: left;\r\n width: 229px;\r\n color: #000;\r\n padding: 6px 5px;\r\n margin: 10px 10px 0 205px;\r\n}\r\ninput.Newdesigns{\r\n float: right ;\r\n width: 55%;\r\n color: #000;\r\n padding: 6px 5px;\r\n margin: 10px 0px 0 0;\r\n}\r\n.fund_inner_block .fund_form_detail span { \r\n font-size: 19.07px;\r\n padding: 0px 10px; \r\n display: table;\r\n float: unset;\r\n width: unset;\r\n\r\n}\r\n@media only screen and (max-width: 640px) {\r\n .resource_des select{width: 100% !important;}\r\n .capital_fund_new_data{width:60% !important;\r\n float: left !important;\r\n \r\n }\r\n \r\n label.register-radio {\r\n float: left;\r\n width: 50px;\r\n font-size: 13px;\r\n font-weight: 300;\r\n color: #008ad1;\r\n line-height: 40px;\r\n background-color: #fff;\r\n text-align: center;\r\n /* padding: 0px 14px; */\r\n margin: 0px 3px;\r\n border: 1px solid #008ad1;\r\n color: #008ad1;\r\n border-radius: 10px;\r\n font-weight: 600;\r\n }\r\n label.register-orange {\r\n\t\tfloat: left;\r\n\t\twidth: 50px; \r\n\t\tfont-size: 13px;\r\n\t\tfont-weight: 300;\r\n\t\tcolor: #fff;\r\n\t\tline-height: 40px;\r\n\t\tbackground-color: #000;\r\n\t\ttext-align: center;\r\n\t\t/* padding: 0px 3px; */\r\n }\r\n input.Newdesign{\r\n float: right; \r\n margin-top: 10px;\r\n }\r\n .capital_adequacy{\r\n width: 35px !important;\r\n }\r\n .capital_budget{\r\n width: 35px !important;\r\n }\r\n .investment_budget {\r\n width: 35px !important;\r\n }\r\n}\r\n@media only screen and (max-width: 768px) {\r\n .fund_form_inner {\r\n float: left;\r\n width: 45%; \r\n }\r\n\r\n .fund_inner_block .resource_des{float: left;width: 55%;}\r\n /*input.Newdesign {\r\n float: right;\r\n width: 134px;\r\n margin: 10 0 0 10px;\r\n color: #000;\r\n padding: 7px 5px;\r\n }*/\r\n}\r\n@media only screen and (max-width: 480px) {\r\n label.register-radio {\r\n\t\tfloat: left;\r\n\t\twidth: 70px;\r\n\t\tfont-size: 13px;\r\n\t\tfont-weight: 300;\r\n\t\tcolor: #008ad1;\r\n\t\tline-height: 40px;\r\n\t\tbackground-color: #fff;\r\n\t\ttext-align: center;\r\n\t\t/* padding: 0px 3px; */\r\n margin: 0px 3px;\r\n border: 1px solid #008ad1;\r\n color: #008ad1;\r\n border-radius: 10px;\r\n font-weight: 600;\r\n\t}\r\n\tlabel.register-orange {\r\n\t\tfloat: left;\r\n\t\twidth: 70px;\r\n\t\tfont-size: 13px;\r\n\t\tfont-weight: 300;\r\n\t\tcolor: #fff;\r\n\t\tline-height: 40px;\r\n\t\tbackground-color: #000;\r\n\t\ttext-align: center;\r\n /* padding: 0px 3px; */\r\n }\r\n input.Newdesign{\r\n float: right;\r\n /* margin-right: 14%; */\r\n margin-right: 0;\r\n margin-top: 10px;\r\n }\r\n\r\n .fund_inner_block .fund_form_detail span {\r\n font-size: 12px;\r\n padding: 0px 10px;\r\n display: table;\r\n float: unset;\r\n width: unset;\r\n }\r\n \r\n}\r\n@media only screen and (max-width: 360px) {\r\n .fund_form_inner {\r\n\t\tfloat: left;\r\n\t\twidth: 4resource_des5%;\r\n\t}\r\n\tlabel.register-radio {\r\n\t\tfloat: left;\r\n\t\twidth: 50px;\r\n\t\tfont-size: 13px;\r\n\t\tfont-weight: 300;\r\n\t\tcolor: #fff;\r\n\t\tline-height: 40px;\r\n\t\tbackground-color: #000;\r\n\t\ttext-align: center;\r\n\t\t/* padding: 0px 3px; */\r\n\t\tmargin: 0px 0px;\r\n\t}\r\n\tlabel.register-orange {\r\n\t\tfloat: left;\r\n\t\twidth: 50px;\r\n\t\tfont-size: 13px;\r\n\t\tfont-weight: 300;\r\n\t\tcolor: #fff;\r\n\t\tline-height: 40px;\r\n\t\tbackground-color: #000;\r\n\t\ttext-align: center;\r\n\t\t/* padding: 0px 3px; */\r\n }\r\n input.Newdesign{\r\n float: right;\r\n margin-right: 0;\r\n margin-top: 10px;\r\n }\r\n}"
/***/ }),
/***/ "./src/app/components/milestone/resourcing/resourcing.component.html":
/*!***************************************************************************!*\
!*** ./src/app/components/milestone/resourcing/resourcing.component.html ***!
\***************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = " \r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n Loading...
\r\n \r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Organisational Effectiveness Dashboard \r\n
\r\n
\r\n
\r\n \r\n Resourcing \r\n
\r\n\r\n
\r\n
\r\n
Core Functions \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Submit \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n "
/***/ }),
/***/ "./src/app/components/milestone/resourcing/resourcing.component.ts":
/*!*************************************************************************!*\
!*** ./src/app/components/milestone/resourcing/resourcing.component.ts ***!
\*************************************************************************/
/*! exports provided: ResourcingComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResourcingComponent", function() { return ResourcingComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! sweetalert2 */ "./node_modules/sweetalert2/dist/sweetalert2.all.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var ngx_spinner__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-spinner */ "./node_modules/ngx-spinner/fesm5/ngx-spinner.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 ResourcingComponent = /** @class */ (function () {
function ResourcingComponent(router, form, cognitoUtil, common, spinner) {
this.router = router;
this.form = form;
this.cognitoUtil = cognitoUtil;
this.common = common;
this.spinner = spinner;
this.year = window.location.href.substr(window.location.href.lastIndexOf('/') + 1);
this.title = 'Resourcing';
this.userRole = localStorage.getItem('custom:user_role');
this.monthNames = [
{},
{ 'id': '1', 'name': 'January' },
{ 'id': '2', 'name': 'February' },
{ 'id': '3', 'name': 'March' },
{ 'id': '4', 'name': 'April' },
{ 'id': '5', 'name': 'May' },
{ 'id': '6', 'name': 'June' },
{ 'id': '7', 'name': 'July' },
{ 'id': '8', 'name': 'August' },
{ 'id': '9', 'name': 'September' },
{ 'id': '10', 'name': 'October' },
{ 'id': '11', 'name': 'November' },
{ 'id': '12', 'name': 'December' }
];
this.CurrentUrl = window.location.href;
this.result = this.CurrentUrl.split('/');
this.url = this.result[this.result.length - 3];
this.Param = this.result[this.result.length - 2];
// monthYear = this.Param;
this.monthYear = this.monthNames[this.Param];
this.userName = this.cognitoUtil.getCurrentUser();
this.data = new FormData();
this.resourceId = '';
this.RecourcingForm = form.group({
'resourceId': '',
'finance': 'green',
'legal': 'green',
'compliance': 'green',
'fund_accounting': 'green',
'operations': 'green',
'risk': 'green',
'ceo': 'green',
'Finance_comment': '',
'Legal_comment': '',
'Compliance_comment': '',
'FundAccounting_comment': '',
'Operations_comment': '',
'Risk_comment': '',
'CEO_comment': ''
});
setTimeout(function () {
// $('.fund_form_detail input').attr('disabled', 'true');
if ((this.userRole != 'manco user') || this.userRole != 'Manco Head') {
$('.Newdesign').addClass('Newdesigns');
$('.Newdesign').addClass('Newdesign');
$('.Newdesign').attr('disabled', 'disabled');
}
}, 2000);
}
ResourcingComponent.prototype.ngOnInit = function () {
if (sessionStorage.getItem('token') != null && sessionStorage.getItem('token') != '') {
this.spinner.show();
this.getData();
}
else {
this.router.navigateByUrl('/login');
}
};
ResourcingComponent.prototype.FinanceColor = function (value) {
$('#core_finance').css("background-color", value.target.value);
$('#Finance').css("background-color", value.target.value);
if (value.target.value == 'green') {
$('#Finance_comment').val('');
$('#Finance_comment').attr('disabled', 'true');
}
else if (value.target.value == 'orange') {
$('#Finance_comment').removeAttr('disabled');
}
};
ResourcingComponent.prototype.LegalColor = function (value) {
$('#core_legal').css("background-color", value.target.value);
$('#Legal').css("background-color", value.target.value);
if (value.target.value == 'green') {
$('#Legal_comment').val('');
$('#Legal_comment').attr('disabled', 'true');
}
else if (value.target.value == 'orange') {
$('#Legal_comment').removeAttr('disabled');
}
};
ResourcingComponent.prototype.ComplianceColor = function (value) {
$('#core_compliance').css("background-color", value.target.value);
$('#Compliance').css("background-color", value.target.value);
if (value.target.value == 'green') {
$('#Compliance_comment').val('');
$('#Compliance_comment').attr('disabled', 'true');
}
else if (value.target.value == 'orange') {
$('#Compliance_comment').removeAttr('disabled');
}
};
ResourcingComponent.prototype.Fund_AccountingColor = function (value) {
$('#core_accounting').css("background-color", value.target.value);
$('#Fund_Accounting').css("background-color", value.target.value);
if (value.target.value == 'green') {
$('#FundAccounting_comment').val('');
$('#FundAccounting_comment').attr('disabled', 'true');
}
else if (value.target.value == 'orange') {
$('#FundAccounting_comment').removeAttr('disabled');
}
};
ResourcingComponent.prototype.OperationsColor = function (value) {
$('#Operations').css("background-color", value.target.value);
$('#core_operations').css("background-color", value.target.value);
if (value.target.value == 'green') {
$('#Operations_comment').val('');
$('#Operations_comment').attr('disabled', 'true');
}
else if (value.target.value == 'orange') {
$('#Operations_comment').removeAttr('disabled');
}
};
ResourcingComponent.prototype.RiskColor = function (value) {
$('#Risk').css("background-color", value.target.value);
$('#core_risk').css("background-color", value.target.value);
if (value.target.value == 'green') {
$('#Risk_comment').val('');
$('#Risk_comment').attr('disabled', 'true');
}
else if (value.target.value == 'orange') {
$('#Risk_comment').removeAttr('disabled');
}
};
ResourcingComponent.prototype.CEOColor = function (value) {
$('#CEO').css("background-color", value.target.value);
$('#core_ceo').css("background-color", value.target.value);
if (value.target.value == 'green') {
$('#CEO_comment').val('');
$('#CEO_comment').attr('disabled', 'true');
}
else if (value.target.value == 'orange') {
$('#CEO_comment').removeAttr('disabled');
}
};
ResourcingComponent.prototype.submitForm = function () {
var data = this.RecourcingForm.value;
data['action'] = 'saveResourceData';
//data['userid'] = this.userName['username'];
data['userid'] = _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser;
data['additional_details'] = '';
data['month'] = this.Param;
data['year'] = this.year;
data['available_for_review'] = false;
data['director_review'] = false;
data['ined_director_review'] = false;
data['created_at'] = new Date().getTime(),
data['updated_at'] = new Date().getTime();
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
toastr.success('Changes Saved', 'Success ');
}
else {
//toastr.error('Server Internal Error');
}
});
};
ResourcingComponent.prototype.changeCOlor13 = function () {
if (document.getElementById('core_finance').style.backgroundColor == 'green') {
this.finance = 'green';
}
else {
this.finance = 'orange';
}
if (document.getElementById('core_legal').style.backgroundColor == 'green') {
this.legal = 'green';
}
else {
this.legal = 'orange';
}
if (document.getElementById('core_compliance').style.backgroundColor == 'green') {
this.compliance = 'green';
}
else {
this.compliance = 'orange';
}
if (document.getElementById('core_accounting').style.backgroundColor == 'green') {
this.fund_accounting = 'green';
}
else {
this.fund_accounting = 'orange';
}
if (document.getElementById('core_operations').style.backgroundColor == 'green') {
this.operations = 'green';
}
else {
this.operations = 'orange';
}
if (document.getElementById('core_risk').style.backgroundColor == 'green') {
this.risk = 'green';
}
else {
this.risk = 'orange';
}
if (document.getElementById('core_ceo').style.backgroundColor == 'green') {
this.ceo = 'green';
}
else {
this.ceo = 'orange';
}
if (document.getElementById('mark_MancoReview').checked != true) {
if (this.finance == 'green' &&
this.legal == 'green' &&
this.compliance == 'green' &&
this.fund_accounting == 'green' &&
this.operations == 'green' &&
this.risk == 'green' &&
this.ceo == 'green') {
this.AllGreenApi();
}
else if (this.finance == 'orange' &&
this.legal == 'orange' &&
this.compliance == 'orange' &&
this.fund_accounting == 'orange' &&
this.operations == 'orange' &&
this.risk == 'orange' &&
this.ceo == 'orange') {
this.AllGreenApi();
}
else {
this.OrangeColor();
}
}
};
ResourcingComponent.prototype.AllGreenApi = function () {
// Swal({
// title: 'Please change status from open to review.',
// text: " ",
// type: 'warning',
// showCancelButton: true,
// confirmButtonColor: '#3085d6',
// cancelButtonColor: '#d33',
// confirmButtonText: 'Yes'
// }).then((result) => {
// if (result.value) {
// Swal(
// 'Successfully',
// 'Status changed to review.',
// 'success'
// )
this.submitForm();
// }
// })
};
ResourcingComponent.prototype.OrangeColor = function () {
var _this = this;
sweetalert2__WEBPACK_IMPORTED_MODULE_5___default()({
title: 'Additional Details',
input: 'text',
inputAttributes: {
autocapitalize: 'off'
},
showCancelButton: true,
confirmButtonText: 'Ok',
showLoaderOnConfirm: true,
preConfirm: function (login) {
var btn = document.getElementById("submitData");
btn.innerText = "Processing...";
btn.disabled = true;
_this.submitForm();
// let data = {
// 'action': 'saveResourceData',
// 'userid': this.userName['username'],
// 'month': this.Param,
// 'year': this.year,
// 'available_for_review': false,
// 'director_review': false,
// 'ined_director_review': false,
// 'resourceId': this.resourceId,
// 'finance': this.finance,
// 'legal': this.legal,
// 'compliance': this.compliance,
// 'fund_accounting': this.fund_accounting,
// 'operations': this.operations,
// 'risk': this.risk,
// 'ceo': this.ceo,
// 'additional_details': login,
// 'created_at': new Date().getTime(),
// 'updated_at': new Date().getTime()
// };
// this.common.saveFundRiskData(data)
// .subscribe(res => {
// if (res.status == '201') {
// if (res.data != '' || res.data != null) {
// toastr.success('Successfully Updated');
// }
// }
// btn.innerText = "Submit";
// btn.disabled = false;
// })
},
allowOutsideClick: function () { return !sweetalert2__WEBPACK_IMPORTED_MODULE_5___default.a.isLoading(); }
});
};
ResourcingComponent.prototype.getData = function () {
var _this = this;
this.userId = _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].mancoUser;
var data = {
'userid': this.userId,
'month': this.Param,
'year': this.year,
'action': 'getResourceData'
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
if (res.data != null && res.data != '') {
if (_this.userRole == 'manco user' || _this.userRole == "Manco Head") {
_this.resourceId = res.data[0]['resourceId'];
document.getElementById('core_ceo').style.backgroundColor = res.data[0]['ceo'];
document.getElementById('core_finance').style.backgroundColor = res.data[0]['finance'];
document.getElementById('core_legal').style.backgroundColor = res.data[0]['legal'];
document.getElementById('core_compliance').style.backgroundColor = res.data[0]['compliance'];
document.getElementById('core_accounting').style.backgroundColor = res.data[0]['fund_accounting'];
document.getElementById('core_operations').style.backgroundColor = res.data[0]['operations'];
document.getElementById('core_risk').style.backgroundColor = res.data[0]['risk'];
_this.RecourcingForm.controls['resourceId'].setValue(res.data[0]['resourceId']);
_this.RecourcingForm.controls['finance'].setValue(res.data[0]['finance']);
_this.RecourcingForm.controls['legal'].setValue(res.data[0]['legal']);
_this.RecourcingForm.controls['compliance'].setValue(res.data[0]['compliance']);
_this.RecourcingForm.controls['fund_accounting'].setValue(res.data[0]['fund_accounting']);
_this.RecourcingForm.controls['operations'].setValue(res.data[0]['operations']);
_this.RecourcingForm.controls['risk'].setValue(res.data[0]['risk']);
_this.RecourcingForm.controls['ceo'].setValue(res.data[0]['ceo']);
$('#Finance').css('background-color', res.data[0]['finance']);
$('#CEO').css('background-color', res.data[0]['ceo']);
$('#Legal').css('background-color', res.data[0]['legal']);
$('#Compliance').css('background-color', res.data[0]['compliance']);
$('#Fund_Accounting').css('background-color', res.data[0]['fund_accounting']);
$('#Operations').css('background-color', res.data[0]['operations']);
$('#Risk').css('background-color', res.data[0]['risk']);
setTimeout(function () {
if (res.data[0]['finance'] == 'green') {
$('#Finance_comment').attr('disabled', 'true');
}
else {
$('#Finance_comment').removeAttr('disabled');
}
if (res.data[0]['ceo'] == 'green') {
$('#CEO_comment').attr('disabled', 'true');
}
else if (res.data[0]['ceo'] == 'orange') {
$('#CEO_comment').removeAttr('disabled');
}
if (res.data[0]['legal'] == 'green') {
$('#Legal_comment').attr('disabled', 'true');
}
else if (res.data[0]['legal'] == 'orange') {
$('#Legal_comment').removeAttr('disabled');
}
if (res.data[0]['compliance'] == 'green') {
$('#Compliance_comment').attr('disabled', 'true');
}
else if (res.data[0]['compliance'] == 'orange') {
$('#Compliance_comment').removeAttr('disabled');
}
if (res.data[0]['fund_accounting'] == 'green') {
$('#FundAccounting_comment').attr('disabled', 'true');
}
else if (res.data[0]['fund_accounting'] == 'orange') {
$('#FundAccounting_comment').removeAttr('disabled');
}
if (res.data[0]['operations'] == 'green') {
$('#Operations_comment').attr('disabled', 'true');
}
else if (res.data[0]['operations'] == 'orange') {
$('#Operations_comment').removeAttr('disabled');
}
if (res.data[0]['risk'] == 'green') {
$('#Risk_comment').attr('disabled', 'true');
}
else if (res.data[0]['risk'] == 'orange') {
$('#Risk_comment').removeAttr('disabled');
}
}, 1000);
}
else {
_this.resourceId = res.data[0]['resourceId'];
document.getElementById('core_ceo').style.backgroundColor = res.data[0]['ceo'];
document.getElementById('core_finance').style.backgroundColor = res.data[0]['finance'];
document.getElementById('core_legal').style.backgroundColor = res.data[0]['legal'];
document.getElementById('core_compliance').style.backgroundColor = res.data[0]['compliance'];
document.getElementById('core_accounting').style.backgroundColor = res.data[0]['fund_accounting'];
document.getElementById('core_operations').style.backgroundColor = res.data[0]['operations'];
document.getElementById('core_risk').style.backgroundColor = res.data[0]['risk'];
_this.finance = res.data[0]['finance'];
_this.legal = res.data[0]['legal'];
_this.compliance = res.data[0]['compliance'];
_this.fund_accounting = res.data[0]['fund_accounting'];
_this.operations = res.data[0]['operations'];
_this.risk = res.data[0]['risk'];
_this.ceo = res.data[0]['ceo'];
_this.available_for_review = res.data[0]['available_for_review'];
_this.director_review = res.data[0]['director_review'];
_this.inedDirectorDreview = res.data[0]['inedDirectorDreview'];
_this.additional_details = res.data[0]['additional_details'];
}
_this.RecourcingForm.controls['Finance_comment'].setValue(res.data[0]['Finance_comment']);
_this.RecourcingForm.controls['Legal_comment'].setValue(res.data[0]['Legal_comment']);
_this.RecourcingForm.controls['Compliance_comment'].setValue(res.data[0]['Compliance_comment']);
_this.RecourcingForm.controls['FundAccounting_comment'].setValue(res.data[0]['FundAccounting_comment']);
_this.RecourcingForm.controls['Operations_comment'].setValue(res.data[0]['Operations_comment']);
_this.RecourcingForm.controls['Risk_comment'].setValue(res.data[0]['Risk_comment']);
_this.RecourcingForm.controls['CEO_comment'].setValue(res.data[0]['CEO_comment']);
// $('.fund_form_detail input').attr('disabled','disabled');
}
else {
document.getElementById('core_ceo').style.backgroundColor = 'green';
document.getElementById('core_finance').style.backgroundColor = 'green';
document.getElementById('core_legal').style.backgroundColor = 'green';
document.getElementById('core_compliance').style.backgroundColor = 'green';
document.getElementById('core_accounting').style.backgroundColor = 'green';
document.getElementById('core_operations').style.backgroundColor = 'green';
document.getElementById('core_risk').style.backgroundColor = 'green';
_this.resourceId = '';
_this.finance = 'green';
_this.legal = 'green';
_this.compliance = 'green';
_this.fund_accounting = 'green';
_this.operations = 'green';
_this.risk = 'green';
_this.ceo = 'green';
_this.available_for_review = 'green';
_this.director_review = 'green';
_this.inedDirectorDreview = 'green';
}
}
_this.spinner.hide();
}, function (error) {
_this.getData();
_this.spinner.hide();
});
};
ResourcingComponent.prototype.CallReviw = function () {
// this.submitForm(this.RecourcingForm.value);
};
ResourcingComponent.prototype.popup = function () {
var element = document.getElementById("qnimate");
element.classList.add("popup-box-on");
};
ResourcingComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-resourcing',
template: __webpack_require__(/*! ./resourcing.component.html */ "./src/app/components/milestone/resourcing/resourcing.component.html"),
styles: [__webpack_require__(/*! ./resourcing.component.css */ "./src/app/components/milestone/resourcing/resourcing.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_3__["CognitoUtil"],
_services_common_service__WEBPACK_IMPORTED_MODULE_4__["CommonService"],
ngx_spinner__WEBPACK_IMPORTED_MODULE_7__["NgxSpinnerService"]])
], ResourcingComponent);
return ResourcingComponent;
}());
/***/ }),
/***/ "./src/app/components/pages/common-chat/common-chat.component.css":
/*!************************************************************************!*\
!*** ./src/app/components/pages/common-chat/common-chat.component.css ***!
\************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".back_btn {\r\n float: right;\r\n padding: 12px 0px;\r\n font-size: 20px;\r\n position: absolute;\r\n right: 0;\r\n top: 92px;\r\n margin-right: 9%;\r\n color: black;\r\n font-family: Roboto, 'Segoe UI', Tahoma, sans-serif;\r\n }\r\n #frame {\r\n width: 100%;\r\n padding: 5%;\r\n min-width: 360px;\r\n max-width: 1000px;\r\n height: 92vh;\r\n min-height: 300px;\r\n max-height: 720px;\r\n background: #E6EAEA;\r\n }\r\n @media screen and (max-width: 360px) {\r\n #frame {\r\n width: 100%;\r\n height: 100vh;\r\n }\r\n }\r\n #frame #sidepanel {\r\n float: left;\r\n min-width: 280px;\r\n max-width: 340px;\r\n width: 40%;\r\n height: 100%;\r\n background: #2c3e50;\r\n color: #f5f5f5;\r\n overflow: hidden;\r\n position: relative;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel {\r\n width: 58px;\r\n min-width: 58px;\r\n }\r\n }\r\n #frame #sidepanel #profile {\r\n width: 80%;\r\n margin: 25px auto;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile {\r\n width: 100%;\r\n margin: 0 auto;\r\n padding: 5px 0 0 0;\r\n background: #32465a;\r\n }\r\n }\r\n #frame #sidepanel #profile.expanded .wrap {\r\n height: 210px;\r\n line-height: initial;\r\n }\r\n #frame #sidepanel #profile.expanded .wrap p {\r\n margin-top: 20px;\r\n }\r\n #frame #sidepanel #profile.expanded .wrap i.expand-button {\r\n -webkit-transform: scaleY(-1);\r\n transform: scaleY(-1);\r\n -webkit-filter: FlipH;\r\n filter: FlipH;\r\n -ms-filter: \"FlipH\";\r\n }\r\n #frame #sidepanel #profile .wrap {\r\n height: 60px;\r\n line-height: 60px;\r\n overflow: hidden;\r\n transition: 0.3s height ease;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap {\r\n height: 55px;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap img {\r\n width: 60px;\r\n border-radius: 50%;\r\n padding: 3px;\r\n border: 2px solid #e74c3c;\r\n height: auto;\r\n float: left;\r\n cursor: pointer;\r\n transition: 0.3s border ease;\r\n height: 50px;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap img {\r\n width: 40px;\r\n margin-left: 4px;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap img.online {\r\n border: 2px solid #2ecc71;\r\n }\r\n #frame #sidepanel #profile .wrap img.away {\r\n border: 2px solid #f1c40f;\r\n }\r\n #frame #sidepanel #profile .wrap img.busy {\r\n border: 2px solid #e74c3c;\r\n }\r\n #frame #sidepanel #profile .wrap img.offline {\r\n border: 2px solid #95a5a6;\r\n }\r\n #frame #sidepanel #profile .wrap p {\r\n float: left;\r\n margin-left: 15px;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap p {\r\n display: none;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap i.expand-button {\r\n float: right;\r\n margin-top: 23px;\r\n font-size: 0.8em;\r\n cursor: pointer;\r\n color: #435f7a;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap i.expand-button {\r\n display: none;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap #status-options {\r\n position: absolute;\r\n opacity: 0;\r\n visibility: hidden;\r\n width: 150px;\r\n margin: 70px 0 0 0;\r\n border-radius: 6px;\r\n z-index: 99;\r\n line-height: initial;\r\n background: #435f7a;\r\n transition: 0.3s all ease;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options {\r\n width: 58px;\r\n margin-top: 57px;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap #status-options.active {\r\n opacity: 1;\r\n visibility: visible;\r\n margin: 75px 0 0 0;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options.active {\r\n margin-top: 62px;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap #status-options:before {\r\n content: '';\r\n position: absolute;\r\n width: 0;\r\n height: 0;\r\n border-left: 6px solid transparent;\r\n border-right: 6px solid transparent;\r\n border-bottom: 8px solid #435f7a;\r\n margin: -8px 0 0 24px;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options:before {\r\n margin-left: 23px;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul {\r\n overflow: hidden;\r\n border-radius: 6px;\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li {\r\n padding: 15px 0 30px 18px;\r\n display: block;\r\n cursor: pointer;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options ul li {\r\n padding: 15px 0 35px 22px;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li:hover {\r\n background: #496886;\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li span.status-circle {\r\n position: absolute;\r\n width: 10px;\r\n height: 10px;\r\n border-radius: 50%;\r\n margin: 5px 0 0 0;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options ul li span.status-circle {\r\n width: 14px;\r\n height: 14px;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li span.status-circle:before {\r\n content: '';\r\n position: absolute;\r\n width: 14px;\r\n height: 14px;\r\n margin: -3px 0 0 -3px;\r\n background: transparent;\r\n border-radius: 50%;\r\n z-index: 0;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options ul li span.status-circle:before {\r\n height: 18px;\r\n width: 18px;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li p {\r\n padding-left: 12px;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options ul li p {\r\n display: none;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li#status-online span.status-circle {\r\n background: #2ecc71;\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li#status-online.active span.status-circle:before {\r\n border: 1px solid #2ecc71;\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li#status-away span.status-circle {\r\n background: #f1c40f;\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li#status-away.active span.status-circle:before {\r\n border: 1px solid #f1c40f;\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li#status-busy span.status-circle {\r\n background: #e74c3c;\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li#status-busy.active span.status-circle:before {\r\n border: 1px solid #e74c3c;\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li#status-offline span.status-circle {\r\n background: #95a5a6;\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li#status-offline.active span.status-circle:before {\r\n border: 1px solid #95a5a6;\r\n }\r\n #frame #sidepanel #profile .wrap #expanded {\r\n padding: 100px 0 0 0;\r\n display: block;\r\n line-height: initial !important;\r\n }\r\n #frame #sidepanel #profile .wrap #expanded label {\r\n float: left;\r\n clear: both;\r\n margin: 0 8px 5px 0;\r\n padding: 5px 0;\r\n }\r\n #frame #sidepanel #profile .wrap #expanded input {\r\n border: none;\r\n margin-bottom: 6px;\r\n background: #32465a;\r\n border-radius: 3px;\r\n color: #f5f5f5;\r\n padding: 7px;\r\n width: calc(100% - 43px);\r\n }\r\n #frame #sidepanel #profile .wrap #expanded input:focus {\r\n outline: none;\r\n background: #435f7a;\r\n }\r\n #frame #sidepanel #search {\r\n border-top: 1px solid #32465a;\r\n border-bottom: 1px solid #32465a;\r\n font-weight: 300;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #search {\r\n display: none;\r\n }\r\n }\r\n #frame #sidepanel #search label {\r\n position: absolute;\r\n margin: 10px 0 0 20px;\r\n }\r\n #frame #sidepanel #search input {\r\n font-family: \"proxima-nova\", \"Source Sans Pro\", sans-serif;\r\n padding: 10px 0 10px 46px;\r\n width: calc(100% - 25px);\r\n border: none;\r\n background: #32465a;\r\n color: #f5f5f5;\r\n }\r\n #frame #sidepanel #search input:focus {\r\n outline: none;\r\n background: #435f7a;\r\n }\r\n #frame #sidepanel #search input::-webkit-input-placeholder {\r\n color: #f5f5f5;\r\n }\r\n #frame #sidepanel #search input::-moz-placeholder {\r\n color: #f5f5f5;\r\n }\r\n #frame #sidepanel #search input:-ms-input-placeholder {\r\n color: #f5f5f5;\r\n }\r\n #frame #sidepanel #search input:-moz-placeholder {\r\n color: #f5f5f5;\r\n }\r\n #frame #sidepanel #contacts {\r\n height: calc(100% - 177px);\r\n overflow-y: scroll;\r\n overflow-x: hidden;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #contacts {\r\n height: calc(100% - 149px);\r\n overflow-y: scroll;\r\n overflow-x: hidden;\r\n }\r\n #frame #sidepanel #contacts::-webkit-scrollbar {\r\n display: none;\r\n }\r\n }\r\n #frame #sidepanel #contacts.expanded {\r\n height: calc(100% - 334px);\r\n }\r\n #frame #sidepanel #contacts::-webkit-scrollbar {\r\n width: 8px;\r\n background: #2c3e50;\r\n }\r\n #frame #sidepanel #contacts::-webkit-scrollbar-thumb {\r\n background-color: #243140;\r\n }\r\n #frame #sidepanel #contacts ul li.contact {\r\n position: relative;\r\n padding: 10px 0 15px 0;\r\n font-size: 0.9em;\r\n cursor: pointer;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #contacts ul li.contact {\r\n padding: 6px 0 46px 8px;\r\n }\r\n }\r\n #frame #sidepanel #contacts ul li.contact:hover {\r\n background: #32465a;\r\n }\r\n #frame #sidepanel #contacts ul li.contact.active {\r\n background: #32465a;\r\n border-right: 5px solid #435f7a;\r\n }\r\n #frame #sidepanel #contacts ul li.contact.active span.contact-status {\r\n border: 2px solid #32465a !important;\r\n }\r\n #frame #sidepanel #contacts ul li.contact .wrap {\r\n width: 88%;\r\n margin: 0 auto;\r\n position: relative;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #contacts ul li.contact .wrap {\r\n width: 100%;\r\n }\r\n }\r\n #frame #sidepanel #contacts ul li.contact .wrap span {\r\n position: absolute;\r\n left: 0;\r\n margin: -2px 0 0 -2px;\r\n width: 10px;\r\n height: 10px;\r\n border-radius: 50%;\r\n border: 2px solid #2c3e50;\r\n background: #95a5a6;\r\n }\r\n #frame #sidepanel #contacts ul li.contact .wrap span.online {\r\n background: #2ecc71;\r\n }\r\n #frame #sidepanel #contacts ul li.contact .wrap span.away {\r\n background: #f1c40f;\r\n }\r\n #frame #sidepanel #contacts ul li.contact .wrap span.busy {\r\n background: #e74c3c;\r\n }\r\n #frame #sidepanel #contacts ul li.contact .wrap img {\r\n width: 40px;\r\n border-radius: 50%;\r\n float: left;\r\n margin-right: 10px;\r\n height: 40px;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #contacts ul li.contact .wrap img {\r\n margin-right: 0px;\r\n }\r\n }\r\n #frame #sidepanel #contacts ul li.contact .wrap .meta {\r\n padding: 5px 0 0 0;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #contacts ul li.contact .wrap .meta {\r\n display: none;\r\n }\r\n }\r\n #frame #sidepanel #contacts ul li.contact .wrap .meta .name {\r\n font-weight: 600;\r\n }\r\n #frame #sidepanel #contacts ul li.contact .wrap .meta .preview {\r\n margin: 5px 0 0 0;\r\n padding: 0 0 1px;\r\n font-weight: 400;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n transition: 1s all ease;\r\n }\r\n #frame #sidepanel #contacts ul li.contact .wrap .meta .preview span {\r\n position: initial;\r\n border-radius: initial;\r\n background: none;\r\n border: none;\r\n padding: 0 2px 0 0;\r\n margin: 0 0 0 1px;\r\n opacity: .5;\r\n }\r\n #frame #sidepanel #bottom-bar {\r\n position: absolute;\r\n width: 100%;\r\n bottom: 0;\r\n }\r\n #frame #sidepanel #bottom-bar button {\r\n float: left;\r\n border: none;\r\n width: 50%;\r\n padding: 10px 0;\r\n background: #32465a;\r\n color: #f5f5f5;\r\n cursor: pointer;\r\n font-size: 0.85em;\r\n font-family: \"proxima-nova\", \"Source Sans Pro\", sans-serif;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #bottom-bar button {\r\n float: none;\r\n width: 100%;\r\n padding: 15px 0;\r\n }\r\n }\r\n #frame #sidepanel #bottom-bar button:focus {\r\n outline: none;\r\n }\r\n #frame #sidepanel #bottom-bar button:nth-child(1) {\r\n border-right: 1px solid #2c3e50;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #bottom-bar button:nth-child(1) {\r\n border-right: none;\r\n border-bottom: 1px solid #2c3e50;\r\n }\r\n }\r\n #frame #sidepanel #bottom-bar button:hover {\r\n background: #435f7a;\r\n }\r\n #frame #sidepanel #bottom-bar button i {\r\n margin-right: 3px;\r\n font-size: 1em;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #bottom-bar button i {\r\n font-size: 1.3em;\r\n }\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #bottom-bar button span {\r\n display: none;\r\n }\r\n }\r\n #frame .content {\r\n float: right;\r\n width: 60%;\r\n height: 100%;\r\n overflow: hidden;\r\n position: relative;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame .content {\r\n width: calc(100% - 58px);\r\n /* min-width: 300px !important;*/\r\n }\r\n }\r\n @media screen and (min-width: 900px) {\r\n #frame .content {\r\n width: calc(100% - 340px);\r\n }\r\n }\r\n #frame .content .contact-profile {\r\n width: 100%;\r\n height: 60px;\r\n line-height: 60px;\r\n background: #f5f5f5;\r\n }\r\n #frame .content .contact-profile img {\r\n width: 40px;\r\n height: 40px;\r\n border-radius: 50%;\r\n float: left;\r\n margin: 9px 12px 0 9px;\r\n }\r\n #frame .content .contact-profile p {\r\n float: left;\r\n }\r\n #frame .content .contact-profile .social-media {\r\n float: right;\r\n }\r\n #frame .content .contact-profile .social-media i {\r\n margin-left: 14px;\r\n cursor: pointer;\r\n }\r\n #frame .content .contact-profile .social-media i:nth-last-child(1) {\r\n margin-right: 20px;\r\n }\r\n #frame .content .contact-profile .social-media i:hover {\r\n color: #435f7a;\r\n }\r\n #frame .content .messages {\r\n height: auto;\r\n min-height: calc(100% - 93px);\r\n max-height: calc(100% - 93px);\r\n overflow-y: scroll;\r\n overflow-x: hidden;\r\n width: 100%;\r\n float: left;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame .content .messages {\r\n max-height: calc(100% - 105px);\r\n }\r\n }\r\n #frame .content .messages::-webkit-scrollbar {\r\n width: 8px;\r\n background: transparent;\r\n }\r\n #frame .content .messages::-webkit-scrollbar-thumb {\r\n background-color: rgba(0, 0, 0, 0.3);\r\n }\r\n #frame .content .messages ul li {\r\n display: inline-block;\r\n clear: both;\r\n float: left;\r\n margin: 15px 15px 5px 15px;\r\n width: calc(100% - 25px);\r\n font-size: 0.9em;\r\n }\r\n #frame .content .messages ul li:nth-last-child(1) {\r\n margin-bottom: 20px;\r\n }\r\n #frame .content .messages ul li.sent img {\r\n margin: 6px 8px 0 0;\r\n }\r\n #frame .content .messages ul li.sent p {\r\n background: #435f7a;\r\n color: #f5f5f5;\r\n }\r\n #frame .content .messages ul li.replies img {\r\n float: right;\r\n margin: 6px 0 0 8px;\r\n }\r\n #frame .content .messages ul li.replies p {\r\n background: #f5f5f5;\r\n float: right;\r\n }\r\n #frame .content .messages ul li img {\r\n width: 28px;\r\n border-radius: 50%;\r\n float: left;\r\n height: 28px;\r\n\r\n }\r\n #frame .content .messages ul li p {\r\n display: inline-block;\r\n padding: 10px 15px;\r\n border-radius: 20px;\r\n max-width: 205px;\r\n line-height: 130%;\r\n }\r\n @media screen and (min-width: 735px) {\r\n #frame .content .messages ul li p {\r\n max-width: 300px;\r\n }\r\n }\r\n #frame .content .message-input {\r\n position: absolute;\r\n bottom: 0;\r\n width: 100%;\r\n z-index: 99;\r\n }\r\n #frame .content .message-input .wrap {\r\n position: relative;\r\n }\r\n #frame .content .message-input .wrap input {\r\n font-family: \"proxima-nova\", \"Source Sans Pro\", sans-serif;\r\n float: left;\r\n border: none;\r\n width: calc(100% - 90px);\r\n padding: 11px 32px 10px 8px;\r\n font-size: 0.8em;\r\n color: #32465a;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame .content .message-input .wrap input {\r\n padding: 15px 32px 16px 8px;\r\n }\r\n }\r\n #frame .content .message-input .wrap input:focus {\r\n outline: none;\r\n }\r\n #frame .content .message-input .wrap .attachment {\r\n position: absolute;\r\n right: 60px;\r\n z-index: 4;\r\n margin-top: 10px;\r\n font-size: 1.1em;\r\n color: #435f7a;\r\n opacity: .5;\r\n cursor: pointer;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame .content .message-input .wrap .attachment {\r\n margin-top: 17px;\r\n right: 65px;\r\n }\r\n }\r\n #frame .content .message-input .wrap .attachment:hover {\r\n opacity: 1;\r\n }\r\n #frame .content .message-input .wrap button {\r\n float: right;\r\n border: none;\r\n width: 50px;\r\n padding: 12px 0;\r\n cursor: pointer;\r\n background: #32465a;\r\n color: #f5f5f5;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame .content .message-input .wrap button {\r\n padding: 16px 0;\r\n }\r\n }\r\n #frame .content .message-input .wrap button:hover {\r\n background: #435f7a;\r\n }\r\n #frame .content .message-input .wrap button:focus {\r\n outline: none;\r\n }"
/***/ }),
/***/ "./src/app/components/pages/common-chat/common-chat.component.html":
/*!*************************************************************************!*\
!*** ./src/app/components/pages/common-chat/common-chat.component.html ***!
\*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\r\n \r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Organisational Effectiveness Scorecard \r\n
\r\n
\r\n
\r\n \r\n Addtional comment('s') \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
{{ username }}
\r\n
\r\n
\r\n
\r\n \r\n \r\n Online
\r\n \r\n \r\n \r\n Away
\r\n \r\n \r\n \r\n Busy
\r\n \r\n \r\n \r\n Offline
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n asdsdsad\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n "
/***/ }),
/***/ "./src/app/components/pages/common-chat/common-chat.component.ts":
/*!***********************************************************************!*\
!*** ./src/app/components/pages/common-chat/common-chat.component.ts ***!
\***********************************************************************/
/*! exports provided: CommonChatComponent, CommonChat1Component */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommonChatComponent", function() { return CommonChatComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommonChat1Component", function() { return CommonChat1Component; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_user_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/user.service */ "./src/app/services/user.service.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var CommonChatComponent = /** @class */ (function () {
function CommonChatComponent(cognitoUntil, router, message, common, userServices) {
this.cognitoUntil = cognitoUntil;
this.router = router;
this.message = message;
this.common = common;
this.userServices = userServices;
this.userRole = localStorage.getItem('custom:user_role');
this.username = localStorage.getItem('custom:first_name') + ' ' + localStorage.getItem('custom:last_name');
this.title = "Monthly Compliance Query";
this.userId = this.cognitoUntil.getCurrentUser();
this.url = window.location.href;
this.result = this.url.split('/');
this.lastAttribute = this.result[this.result.length - 1];
this.Param = this.result[this.result.length - 2];
this.month = this.result[this.result.length - 3];
this.Nagtive = this.result[this.result.length - 4];
this.CommentData = [];
this.Director = [];
this.MancoHead = [];
this.IMCOList = [];
if (sessionStorage.getItem('token') == null || sessionStorage.getItem('token') == '') {
this.router.navigateByUrl('/login');
}
else {
// this.getActionDetails();
}
this.ActionQueryform = message.group({
'queryId': [''],
'query': ['', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
});
if (localStorage.getItem('profile') != null && localStorage.getItem('profile') != '') {
this.userprofile = localStorage.getItem('profile');
}
else {
this.userprofile = 'assets/images/3x.png';
}
}
CommonChatComponent.prototype.ngOnInit = function () {
if (this.Param == 'Monthly_Compliance') {
this.Add_comment = 'Monthly_Compliance';
if (this.userRole == 'Manco Head') {
this.GetDirectorList('IMCO');
this.GetIMCOList('IM Head Of Compliance');
}
else if (this.userRole == 'administrator') {
this.GetDirectorList('IMCO');
this.GetMancoHeadList();
this.GetIMCOList('IM Head Of Compliance');
}
else if (this.userRole == 'IM Head Of Compliance') {
this.GetDirectorList('IMCO');
this.GetMancoHeadList();
}
else {
this.GetMancoHeadList();
this.GetDirectorList('IM Head Of Compliance');
}
}
// this.CommentS = setInterval(() => {
// if (this.CommentData != null && this.CommentData != '') {
// this.getMessgaeLIst(this.id);
// }
// }, 3000)
};
CommonChatComponent.prototype.ngOnDestroy = function () {
if (this.CommentS) {
clearInterval(this.CommentS);
}
};
CommonChatComponent.prototype.UserMessages = function (id) {
var _this = this;
document.querySelector(".contact ").classList.remove("active");
// document.getElementById(id).classList.toggle("active");
var data = {
'action': 'getUserDataById',
'cid': id,
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
document.getElementById(id).classList.toggle("active");
_this.getMessgaeLIst(id);
_this.username = res.data[0]['firstname'] + ' ' + res.data[0]['lastname'];
if (res.data[0]['profile'] != null && res.data[0]['profile'] != '') {
_this.role = res.data[0]['profile'];
}
else {
_this.role = 'assets/images/3x.png';
}
_this.userSId = res.data[0]['username'];
_this.UserRole = res.data[0]['role'];
_this.GetUserRole = res.data[0]['role'];
}
else {
_this.username = '';
_this.role = '';
_this.userSId = '';
_this.UserRole = '';
}
});
//this.getMessageData();
};
CommonChatComponent.prototype.SendMessage = function (value) {
var _this = this;
var data = value;
data['action'] = 'allactionquerypoint';
data['mod_type'] = this.Add_comment;
data['from_type'] = this.userRole;
data['from_id'] = this.userId['username'];
data['to_id'] = this.userSId;
data['to_type'] = this.GetUserRole;
data['to_from_id'] = this.userId['username'] + '|' + this.userSId;
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
var div = document.getElementById('userMessage');
var newHeight = div.scrollHeight + 81;
div.scrollTop = newHeight;
_this.ActionQueryform.controls['query'].setValue('');
_this.CommentData = res.data;
}
else {
toastr.error(res.message);
}
});
};
//username: any;
CommonChatComponent.prototype.getMessgaeLIst = function (id) {
var _this = this;
var data = {
action: 'allToactionquerypoint',
mod_type: this.Add_comment,
to_from_id: this.userId['username'] + '|' + id
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
_this.CommentData = res.data;
setTimeout(function () {
var div = document.getElementById('userMessage');
div.scrollTop = div.scrollHeight;
}, 2000);
}
else {
}
});
};
CommonChatComponent.prototype.gotoback = function () {
if (this.Param == 'Monthly_Compliance') {
if (this.userRole == 'Manco Head' || this.userRole == 'administrator') {
this.router.navigate([this.Param + '/admin/List_Compliance']);
}
else {
this.router.navigate([this.Param + '/user/View_Compliance']);
}
}
else {
this.router.navigate([this.month + '/' + this.Param]);
}
};
CommonChatComponent.prototype.GetDirectorList = function (Role) {
var _this = this;
var data = {
action: 'manoco_user_detail_hodside',
role: Role //'director'
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var UserDetails = JSON.parse(resData.body);
if (UserDetails.status == '200') {
_this.Director = UserDetails.data;
}
else {
toastr.error(UserDetails.message);
}
});
};
CommonChatComponent.prototype.GetMancoHeadList = function () {
var _this = this;
var data = {
action: 'manoco_user_detail_hodside',
role: 'Manco Head'
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var UserDetails = JSON.parse(resData.body);
if (UserDetails.status == '200') {
_this.MancoHead = UserDetails.data;
}
else {
toastr.error(UserDetails.message);
}
});
};
CommonChatComponent.prototype.GetIMCOList = function (Role) {
var _this = this;
var data = {
action: 'manoco_user_detail_hodside',
role: Role //'director'
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var UserDetails = JSON.parse(resData.body);
if (UserDetails.status == '200') {
_this.IMCOList = UserDetails.data;
}
else {
toastr.error(UserDetails.message);
}
});
};
CommonChatComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-common-chat',
template: __webpack_require__(/*! ./common-chat.component.html */ "./src/app/components/pages/common-chat/common-chat.component.html"),
styles: [__webpack_require__(/*! ./common-chat.component.css */ "./src/app/components/pages/common-chat/common-chat.component.css")]
}),
__metadata("design:paramtypes", [_services_cognito_service__WEBPACK_IMPORTED_MODULE_5__["CognitoUtil"],
_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
_services_common_service__WEBPACK_IMPORTED_MODULE_3__["CommonService"],
_services_user_service__WEBPACK_IMPORTED_MODULE_4__["UserService"]])
], CommonChatComponent);
return CommonChatComponent;
}());
var CommonChat1Component = /** @class */ (function () {
function CommonChat1Component(cognitoUntil, router, message, common, userService) {
this.cognitoUntil = cognitoUntil;
this.router = router;
this.message = message;
this.common = common;
this.userService = userService;
this.userRole = localStorage.getItem('custom:user_role');
this.username = localStorage.getItem('custom:first_name') + ' ' + localStorage.getItem('custom:last_name');
this.title = "Monthly Compliance Query";
this.userId = this.cognitoUntil.getCurrentUser();
this.url = window.location.href;
this.result = this.url.split('/');
this.lastAttribute = this.result[this.result.length - 1];
this.Param = this.result[this.result.length - 2];
this.month = this.result[this.result.length - 3];
this.Nagtive = this.result[this.result.length - 4];
this.Director = this.userService.Director;
this.MancoHead = this.userService.MancoHead;
this.IMCOList = this.userService.IMCOList;
if (sessionStorage.getItem('token') == null || sessionStorage.getItem('token') == '') {
this.router.navigateByUrl('/login');
}
else {
// this.getActionDetails();
}
this.ActionQueryform = message.group({
'queryId': [''],
'query': ['', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
});
if (localStorage.getItem('profile') != null && localStorage.getItem('profile') != '') {
this.userprofile = localStorage.getItem('profile');
}
else {
this.userprofile = 'assets/images/3x.png';
}
}
CommonChat1Component.prototype.ngOnInit = function () {
if (this.month == 'Monthly_Compliance') {
this.Add_comment = 'Monthly_Compliance';
}
this.GetMancoHeadList('Manco Head');
this.GetDirectorList('IM Head Of Compliance');
this.GetIMCOList('IMCO');
};
CommonChat1Component.prototype.getMessgaeLIst = function (id) {
var _this = this;
this.id = id;
var data = {
action: 'allToactionquerypoint',
mod_type: this.Add_comment,
to_from_id: id + '|' + this.userId['username']
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
_this.CommentData = res.data;
setTimeout(function () {
var div = document.getElementById('userMessage');
div.scrollTop = div.scrollHeight;
}, 2000);
}
else {
}
});
};
CommonChat1Component.prototype.gotoback = function () {
if (this.Param == 'Monthly_Compliance') {
if (this.userRole == 'Manco Head' || this.userRole == 'administrator') {
this.router.navigate([this.Param + '/admin/List_Compliance']);
}
else {
this.router.navigate([this.Param + '/user/View_Compliance']);
}
}
else {
this.router.navigate([this.month + '/' + this.Param]);
}
};
CommonChat1Component.prototype.SendMessage = function (value) {
var _this = this;
var data = value;
data['action'] = 'allactionquerypoint';
data['mod_type'] = this.Add_comment;
data['from_type'] = this.userRole;
data['from_id'] = this.userId['username'];
data['to_id'] = this.userSId;
data['to_type'] = this.GetUserRole;
data['to_from_id'] = this.userSId + '|' + this.userId['username'];
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
var div = document.getElementById('userMessage');
var newHeight = div.scrollHeight + 81;
div.scrollTop = newHeight;
_this.ActionQueryform.controls['query'].setValue('');
_this.CommentData = res.data;
}
else {
toastr.error(res.message);
}
});
};
CommonChat1Component.prototype.UserMessages = function (id) {
var _this = this;
document.querySelector(".contact ").classList.remove("active");
// document.getElementById(id).classList.toggle("active");
var data = {
'action': 'getUserDataById',
'cid': id,
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
document.getElementById(id).classList.toggle("active");
_this.getMessgaeLIst(id);
_this.username = res.data[0]['firstname'] + ' ' + res.data[0]['lastname'];
if (res.data[0]['profile'] != null && res.data[0]['profile'] != '') {
_this.role = res.data[0]['profile'];
}
else {
_this.role = 'assets/images/3x.png';
}
_this.userSId = res.data[0]['username'];
_this.UserRole = res.data[0]['role'];
_this.GetUserRole = res.data[0]['role'];
}
else {
_this.username = '';
_this.role = '';
_this.userSId = '';
_this.UserRole = '';
}
});
//this.getMessageData();
};
CommonChat1Component.prototype.GetDirectorList = function (Role) {
var _this = this;
var data = {
action: 'manoco_user_detail_hodside',
role: Role //'director'
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var UserDetails = JSON.parse(resData.body);
if (UserDetails.status == '200') {
_this.Director = UserDetails.data;
}
else {
toastr.error(UserDetails.message);
}
});
};
CommonChat1Component.prototype.GetMancoHeadList = function (Role) {
var _this = this;
var data = {
action: 'manoco_user_detail_hodside',
role: Role
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var UserDetails = JSON.parse(resData.body);
if (UserDetails.status == '200') {
_this.MancoHead = UserDetails.data;
}
else {
toastr.error(UserDetails.message);
}
});
};
CommonChat1Component.prototype.GetIMCOList = function (Role) {
var _this = this;
var data = {
action: 'manoco_user_detail_hodside',
role: Role //'director'
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var UserDetails = JSON.parse(resData.body);
if (UserDetails.status == '200') {
_this.IMCOList = UserDetails.data;
}
else {
toastr.error(UserDetails.message);
}
});
};
CommonChat1Component = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-common-chat',
template: __webpack_require__(/*! ./common-chat2.html */ "./src/app/components/pages/common-chat/common-chat2.html"),
styles: [__webpack_require__(/*! ./common-chat.component.css */ "./src/app/components/pages/common-chat/common-chat.component.css")]
}),
__metadata("design:paramtypes", [_services_cognito_service__WEBPACK_IMPORTED_MODULE_5__["CognitoUtil"],
_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
_services_common_service__WEBPACK_IMPORTED_MODULE_3__["CommonService"],
_services_user_service__WEBPACK_IMPORTED_MODULE_4__["UserService"]])
], CommonChat1Component);
return CommonChat1Component;
}());
/***/ }),
/***/ "./src/app/components/pages/common-chat/common-chat2.html":
/*!****************************************************************!*\
!*** ./src/app/components/pages/common-chat/common-chat2.html ***!
\****************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\r\n \r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Organisational Effectiveness Scorecard \r\n
\r\n
\r\n
\r\n \r\n Addtional comment('s') \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
{{ username }}
\r\n
\r\n
\r\n
\r\n \r\n \r\n Online
\r\n \r\n \r\n \r\n Away
\r\n \r\n \r\n \r\n Busy
\r\n \r\n \r\n \r\n Offline
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n asdsdsad\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n "
/***/ }),
/***/ "./src/app/components/pages/factsheet-chat/factsheet-chat.component.css":
/*!******************************************************************************!*\
!*** ./src/app/components/pages/factsheet-chat/factsheet-chat.component.css ***!
\******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".back_btn {\r\n float: right;\r\n padding: 12px 0px;\r\n font-size: 20px;\r\n position: absolute;\r\n right: 0;\r\n top: 92px;\r\n margin-right: 9%;\r\n color: black;\r\n font-family: Roboto, 'Segoe UI', Tahoma, sans-serif;\r\n }\r\n #frame {\r\n width: 100%;\r\n padding: 5%;\r\n min-width: 360px;\r\n max-width: 1000px;\r\n height: 92vh;\r\n min-height: 300px;\r\n max-height: 720px;\r\n background: #E6EAEA;\r\n }\r\n @media screen and (max-width: 360px) {\r\n #frame {\r\n width: 100%;\r\n height: 100vh;\r\n }\r\n }\r\n #frame #sidepanel {\r\n float: left;\r\n min-width: 280px;\r\n max-width: 340px;\r\n width: 40%;\r\n height: 100%;\r\n background: #2c3e50;\r\n color: #f5f5f5;\r\n overflow: hidden;\r\n position: relative;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel {\r\n width: 58px;\r\n min-width: 58px;\r\n }\r\n }\r\n #frame #sidepanel #profile {\r\n width: 80%;\r\n margin: 25px auto;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile {\r\n width: 100%;\r\n margin: 0 auto;\r\n padding: 5px 0 0 0;\r\n background: #32465a;\r\n }\r\n }\r\n #frame #sidepanel #profile.expanded .wrap {\r\n height: 210px;\r\n line-height: initial;\r\n }\r\n #frame #sidepanel #profile.expanded .wrap p {\r\n margin-top: 20px;\r\n }\r\n #frame #sidepanel #profile.expanded .wrap i.expand-button {\r\n -webkit-transform: scaleY(-1);\r\n transform: scaleY(-1);\r\n -webkit-filter: FlipH;\r\n filter: FlipH;\r\n -ms-filter: \"FlipH\";\r\n }\r\n #frame #sidepanel #profile .wrap {\r\n height: 60px;\r\n line-height: 60px;\r\n overflow: hidden;\r\n transition: 0.3s height ease;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap {\r\n height: 55px;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap img {\r\n width: 60px;\r\n border-radius: 50%;\r\n padding: 3px;\r\n border: 2px solid #e74c3c;\r\n height: auto;\r\n float: left;\r\n cursor: pointer;\r\n transition: 0.3s border ease;\r\n height: 50px;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap img {\r\n width: 40px;\r\n margin-left: 4px;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap img.online {\r\n border: 2px solid #2ecc71;\r\n }\r\n #frame #sidepanel #profile .wrap img.away {\r\n border: 2px solid #f1c40f;\r\n }\r\n #frame #sidepanel #profile .wrap img.busy {\r\n border: 2px solid #e74c3c;\r\n }\r\n #frame #sidepanel #profile .wrap img.offline {\r\n border: 2px solid #95a5a6;\r\n }\r\n #frame #sidepanel #profile .wrap p {\r\n float: left;\r\n margin-left: 15px;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap p {\r\n display: none;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap i.expand-button {\r\n float: right;\r\n margin-top: 23px;\r\n font-size: 0.8em;\r\n cursor: pointer;\r\n color: #435f7a;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap i.expand-button {\r\n display: none;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap #status-options {\r\n position: absolute;\r\n opacity: 0;\r\n visibility: hidden;\r\n width: 150px;\r\n margin: 70px 0 0 0;\r\n border-radius: 6px;\r\n z-index: 99;\r\n line-height: initial;\r\n background: #435f7a;\r\n transition: 0.3s all ease;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options {\r\n width: 58px;\r\n margin-top: 57px;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap #status-options.active {\r\n opacity: 1;\r\n visibility: visible;\r\n margin: 75px 0 0 0;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options.active {\r\n margin-top: 62px;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap #status-options:before {\r\n content: '';\r\n position: absolute;\r\n width: 0;\r\n height: 0;\r\n border-left: 6px solid transparent;\r\n border-right: 6px solid transparent;\r\n border-bottom: 8px solid #435f7a;\r\n margin: -8px 0 0 24px;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options:before {\r\n margin-left: 23px;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul {\r\n overflow: hidden;\r\n border-radius: 6px;\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li {\r\n padding: 15px 0 30px 18px;\r\n display: block;\r\n cursor: pointer;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options ul li {\r\n padding: 15px 0 35px 22px;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li:hover {\r\n background: #496886;\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li span.status-circle {\r\n position: absolute;\r\n width: 10px;\r\n height: 10px;\r\n border-radius: 50%;\r\n margin: 5px 0 0 0;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options ul li span.status-circle {\r\n width: 14px;\r\n height: 14px;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li span.status-circle:before {\r\n content: '';\r\n position: absolute;\r\n width: 14px;\r\n height: 14px;\r\n margin: -3px 0 0 -3px;\r\n background: transparent;\r\n border-radius: 50%;\r\n z-index: 0;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options ul li span.status-circle:before {\r\n height: 18px;\r\n width: 18px;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li p {\r\n padding-left: 12px;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #profile .wrap #status-options ul li p {\r\n display: none;\r\n }\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li#status-online span.status-circle {\r\n background: #2ecc71;\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li#status-online.active span.status-circle:before {\r\n border: 1px solid #2ecc71;\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li#status-away span.status-circle {\r\n background: #f1c40f;\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li#status-away.active span.status-circle:before {\r\n border: 1px solid #f1c40f;\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li#status-busy span.status-circle {\r\n background: #e74c3c;\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li#status-busy.active span.status-circle:before {\r\n border: 1px solid #e74c3c;\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li#status-offline span.status-circle {\r\n background: #95a5a6;\r\n }\r\n #frame #sidepanel #profile .wrap #status-options ul li#status-offline.active span.status-circle:before {\r\n border: 1px solid #95a5a6;\r\n }\r\n #frame #sidepanel #profile .wrap #expanded {\r\n padding: 100px 0 0 0;\r\n display: block;\r\n line-height: initial !important;\r\n }\r\n #frame #sidepanel #profile .wrap #expanded label {\r\n float: left;\r\n clear: both;\r\n margin: 0 8px 5px 0;\r\n padding: 5px 0;\r\n }\r\n #frame #sidepanel #profile .wrap #expanded input {\r\n border: none;\r\n margin-bottom: 6px;\r\n background: #32465a;\r\n border-radius: 3px;\r\n color: #f5f5f5;\r\n padding: 7px;\r\n width: calc(100% - 43px);\r\n }\r\n #frame #sidepanel #profile .wrap #expanded input:focus {\r\n outline: none;\r\n background: #435f7a;\r\n }\r\n #frame #sidepanel #search {\r\n border-top: 1px solid #32465a;\r\n border-bottom: 1px solid #32465a;\r\n font-weight: 300;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #search {\r\n display: none;\r\n }\r\n }\r\n #frame #sidepanel #search label {\r\n position: absolute;\r\n margin: 10px 0 0 20px;\r\n }\r\n #frame #sidepanel #search input {\r\n font-family: \"proxima-nova\", \"Source Sans Pro\", sans-serif;\r\n padding: 10px 0 10px 46px;\r\n width: calc(100% - 25px);\r\n border: none;\r\n background: #32465a;\r\n color: #f5f5f5;\r\n }\r\n #frame #sidepanel #search input:focus {\r\n outline: none;\r\n background: #435f7a;\r\n }\r\n #frame #sidepanel #search input::-webkit-input-placeholder {\r\n color: #f5f5f5;\r\n }\r\n #frame #sidepanel #search input::-moz-placeholder {\r\n color: #f5f5f5;\r\n }\r\n #frame #sidepanel #search input:-ms-input-placeholder {\r\n color: #f5f5f5;\r\n }\r\n #frame #sidepanel #search input:-moz-placeholder {\r\n color: #f5f5f5;\r\n }\r\n #frame #sidepanel #contacts {\r\n height: calc(100% - 177px);\r\n overflow-y: scroll;\r\n overflow-x: hidden;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #contacts {\r\n height: calc(100% - 149px);\r\n overflow-y: scroll;\r\n overflow-x: hidden;\r\n }\r\n #frame #sidepanel #contacts::-webkit-scrollbar {\r\n display: none;\r\n }\r\n }\r\n #frame #sidepanel #contacts.expanded {\r\n height: calc(100% - 334px);\r\n }\r\n #frame #sidepanel #contacts::-webkit-scrollbar {\r\n width: 8px;\r\n background: #2c3e50;\r\n }\r\n #frame #sidepanel #contacts::-webkit-scrollbar-thumb {\r\n background-color: #243140;\r\n }\r\n #frame #sidepanel #contacts ul li.contact {\r\n position: relative;\r\n padding: 10px 0 15px 0;\r\n font-size: 0.9em;\r\n cursor: pointer;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #contacts ul li.contact {\r\n padding: 6px 0 46px 8px;\r\n }\r\n }\r\n #frame #sidepanel #contacts ul li.contact:hover {\r\n background: #32465a;\r\n }\r\n #frame #sidepanel #contacts ul li.contact.active {\r\n background: #32465a;\r\n border-right: 5px solid #435f7a;\r\n }\r\n #frame #sidepanel #contacts ul li.contact.active span.contact-status {\r\n border: 2px solid #32465a !important;\r\n }\r\n #frame #sidepanel #contacts ul li.contact .wrap {\r\n width: 88%;\r\n margin: 0 auto;\r\n position: relative;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #contacts ul li.contact .wrap {\r\n width: 100%;\r\n }\r\n }\r\n #frame #sidepanel #contacts ul li.contact .wrap span {\r\n position: absolute;\r\n left: 0;\r\n margin: -2px 0 0 -2px;\r\n width: 10px;\r\n height: 10px;\r\n border-radius: 50%;\r\n border: 2px solid #2c3e50;\r\n background: #95a5a6;\r\n }\r\n #frame #sidepanel #contacts ul li.contact .wrap span.online {\r\n background: #2ecc71;\r\n }\r\n #frame #sidepanel #contacts ul li.contact .wrap span.away {\r\n background: #f1c40f;\r\n }\r\n #frame #sidepanel #contacts ul li.contact .wrap span.busy {\r\n background: #e74c3c;\r\n }\r\n #frame #sidepanel #contacts ul li.contact .wrap img {\r\n width: 40px;\r\n border-radius: 50%;\r\n float: left;\r\n margin-right: 10px;\r\n height: 40px;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #contacts ul li.contact .wrap img {\r\n margin-right: 0px;\r\n }\r\n }\r\n #frame #sidepanel #contacts ul li.contact .wrap .meta {\r\n padding: 5px 0 0 0;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #contacts ul li.contact .wrap .meta {\r\n display: none;\r\n }\r\n }\r\n #frame #sidepanel #contacts ul li.contact .wrap .meta .name {\r\n font-weight: 600;\r\n }\r\n #frame #sidepanel #contacts ul li.contact .wrap .meta .preview {\r\n margin: 5px 0 0 0;\r\n padding: 0 0 1px;\r\n font-weight: 400;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n transition: 1s all ease;\r\n }\r\n #frame #sidepanel #contacts ul li.contact .wrap .meta .preview span {\r\n position: initial;\r\n border-radius: initial;\r\n background: none;\r\n border: none;\r\n padding: 0 2px 0 0;\r\n margin: 0 0 0 1px;\r\n opacity: .5;\r\n }\r\n #frame #sidepanel #bottom-bar {\r\n position: absolute;\r\n width: 100%;\r\n bottom: 0;\r\n }\r\n #frame #sidepanel #bottom-bar button {\r\n float: left;\r\n border: none;\r\n width: 50%;\r\n padding: 10px 0;\r\n background: #32465a;\r\n color: #f5f5f5;\r\n cursor: pointer;\r\n font-size: 0.85em;\r\n font-family: \"proxima-nova\", \"Source Sans Pro\", sans-serif;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #bottom-bar button {\r\n float: none;\r\n width: 100%;\r\n padding: 15px 0;\r\n }\r\n }\r\n #frame #sidepanel #bottom-bar button:focus {\r\n outline: none;\r\n }\r\n #frame #sidepanel #bottom-bar button:nth-child(1) {\r\n border-right: 1px solid #2c3e50;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #bottom-bar button:nth-child(1) {\r\n border-right: none;\r\n border-bottom: 1px solid #2c3e50;\r\n }\r\n }\r\n #frame #sidepanel #bottom-bar button:hover {\r\n background: #435f7a;\r\n }\r\n #frame #sidepanel #bottom-bar button i {\r\n margin-right: 3px;\r\n font-size: 1em;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #bottom-bar button i {\r\n font-size: 1.3em;\r\n }\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame #sidepanel #bottom-bar button span {\r\n display: none;\r\n }\r\n }\r\n #frame .content {\r\n float: right;\r\n width: 60%;\r\n height: 100%;\r\n overflow: hidden;\r\n position: relative;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame .content {\r\n width: calc(100% - 58px);\r\n /* min-width: 300px !important;*/\r\n }\r\n }\r\n @media screen and (min-width: 900px) {\r\n #frame .content {\r\n width: calc(100% - 340px);\r\n }\r\n }\r\n #frame .content .contact-profile {\r\n width: 100%;\r\n height: 60px;\r\n line-height: 60px;\r\n background: #f5f5f5;\r\n }\r\n #frame .content .contact-profile img {\r\n width: 40px;\r\n height: 40px;\r\n border-radius: 50%;\r\n float: left;\r\n margin: 9px 12px 0 9px;\r\n }\r\n #frame .content .contact-profile p {\r\n float: left;\r\n }\r\n #frame .content .contact-profile .social-media {\r\n float: right;\r\n }\r\n #frame .content .contact-profile .social-media i {\r\n margin-left: 14px;\r\n cursor: pointer;\r\n }\r\n #frame .content .contact-profile .social-media i:nth-last-child(1) {\r\n margin-right: 20px;\r\n }\r\n #frame .content .contact-profile .social-media i:hover {\r\n color: #435f7a;\r\n }\r\n #frame .content .messages {\r\n height: auto;\r\n min-height: calc(100% - 93px);\r\n max-height: calc(100% - 93px);\r\n overflow-y: scroll;\r\n overflow-x: hidden;\r\n width: 100%;\r\n float: left;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame .content .messages {\r\n max-height: calc(100% - 105px);\r\n }\r\n }\r\n #frame .content .messages::-webkit-scrollbar {\r\n width: 8px;\r\n background: transparent;\r\n }\r\n #frame .content .messages::-webkit-scrollbar-thumb {\r\n background-color: rgba(0, 0, 0, 0.3);\r\n }\r\n #frame .content .messages ul li {\r\n display: inline-block;\r\n clear: both;\r\n float: left;\r\n margin: 15px 15px 5px 15px;\r\n width: calc(100% - 25px);\r\n font-size: 0.9em;\r\n }\r\n #frame .content .messages ul li:nth-last-child(1) {\r\n margin-bottom: 20px;\r\n }\r\n #frame .content .messages ul li.sent img {\r\n margin: 6px 8px 0 0;\r\n }\r\n #frame .content .messages ul li.sent p {\r\n background: #435f7a;\r\n color: #f5f5f5;\r\n }\r\n #frame .content .messages ul li.replies img {\r\n float: right;\r\n margin: 6px 0 0 8px;\r\n }\r\n #frame .content .messages ul li.replies p {\r\n background: #f5f5f5;\r\n float: right;\r\n }\r\n #frame .content .messages ul li img {\r\n width: 28px;\r\n border-radius: 50%;\r\n float: left;\r\n height: 28px;\r\n\r\n }\r\n #frame .content .messages ul li p {\r\n display: inline-block;\r\n padding: 10px 15px;\r\n border-radius: 20px;\r\n max-width: 205px;\r\n line-height: 130%;\r\n }\r\n @media screen and (min-width: 735px) {\r\n #frame .content .messages ul li p {\r\n max-width: 300px;\r\n }\r\n }\r\n #frame .content .message-input {\r\n position: absolute;\r\n bottom: 0;\r\n width: 100%;\r\n z-index: 99;\r\n }\r\n #frame .content .message-input .wrap {\r\n position: relative;\r\n }\r\n #frame .content .message-input .wrap input {\r\n font-family: \"proxima-nova\", \"Source Sans Pro\", sans-serif;\r\n float: left;\r\n border: none;\r\n width: calc(100% - 90px);\r\n padding: 11px 32px 10px 8px;\r\n font-size: 0.8em;\r\n color: #32465a;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame .content .message-input .wrap input {\r\n padding: 15px 32px 16px 8px;\r\n }\r\n }\r\n #frame .content .message-input .wrap input:focus {\r\n outline: none;\r\n }\r\n #frame .content .message-input .wrap .attachment {\r\n position: absolute;\r\n right: 60px;\r\n z-index: 4;\r\n margin-top: 10px;\r\n font-size: 1.1em;\r\n color: #435f7a;\r\n opacity: .5;\r\n cursor: pointer;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame .content .message-input .wrap .attachment {\r\n margin-top: 17px;\r\n right: 65px;\r\n }\r\n }\r\n #frame .content .message-input .wrap .attachment:hover {\r\n opacity: 1;\r\n }\r\n #frame .content .message-input .wrap button {\r\n float: right;\r\n border: none;\r\n width: 50px;\r\n padding: 12px 0;\r\n cursor: pointer;\r\n background: #32465a;\r\n color: #f5f5f5;\r\n }\r\n @media screen and (max-width: 735px) {\r\n #frame .content .message-input .wrap button {\r\n padding: 16px 0;\r\n }\r\n }\r\n #frame .content .message-input .wrap button:hover {\r\n background: #435f7a;\r\n }\r\n #frame .content .message-input .wrap button:focus {\r\n outline: none;\r\n }"
/***/ }),
/***/ "./src/app/components/pages/factsheet-chat/factsheet-chat.component.html":
/*!*******************************************************************************!*\
!*** ./src/app/components/pages/factsheet-chat/factsheet-chat.component.html ***!
\*******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\r\n \r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Organisational Effectiveness Scorecard \r\n
\r\n
\r\n
\r\n \r\n Addtional comment('s') \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
{{ username }}
\r\n
\r\n
\r\n
\r\n \r\n \r\n Online
\r\n \r\n \r\n \r\n Away
\r\n \r\n \r\n \r\n Busy
\r\n \r\n \r\n \r\n Offline
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n asdsdsad\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n "
/***/ }),
/***/ "./src/app/components/pages/factsheet-chat/factsheet-chat.component.ts":
/*!*****************************************************************************!*\
!*** ./src/app/components/pages/factsheet-chat/factsheet-chat.component.ts ***!
\*****************************************************************************/
/*! exports provided: FactsheetChatComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FactsheetChatComponent", function() { return FactsheetChatComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_user_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/user.service */ "./src/app/services/user.service.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var FactsheetChatComponent = /** @class */ (function () {
function FactsheetChatComponent(cognitoUntil, router, message, common, userServices) {
this.cognitoUntil = cognitoUntil;
this.router = router;
this.message = message;
this.common = common;
this.userServices = userServices;
this.userRole = localStorage.getItem('custom:user_role');
this.username = localStorage.getItem('custom:first_name') + ' ' + localStorage.getItem('custom:last_name');
this.title = "Monthly Compliance Query";
this.userId = this.cognitoUntil.getCurrentUser();
this.url = window.location.href;
this.result = this.url.split('/');
this.lastAttribute = this.result[this.result.length - 1];
this.Param = this.result[this.result.length - 2];
this.month = this.result[this.result.length - 3];
this.Nagtive = this.result[this.result.length - 4];
if (sessionStorage.getItem('token') == null || sessionStorage.getItem('token') == '') {
this.router.navigateByUrl('/login');
}
else {
// this.getActionDetails();
}
this.ActionQueryform = message.group({
'queryId': [''],
'query': ['', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
});
if (localStorage.getItem('profile') != null && localStorage.getItem('profile') != '') {
this.userprofile = localStorage.getItem('profile');
}
else {
this.userprofile = 'assets/images/3x.png';
}
}
FactsheetChatComponent.prototype.ngOnInit = function () {
var _this = this;
this.Add_comment = 'Monthly_Compliance';
var data = {
LastUrl: "https://3z1tfh0og1.execute-api.us-east-2.amazonaws.com/prod/SanlamUserList"
};
this.common.Get(data).subscribe(function (userData) {
if (userData.status == "success") {
// var user = userData.data.search("Manco Head")
if (_this.userRole === 'IM') {
_this.userInformation = userData.data.filter(function (UserRes) {
return UserRes.role.match('Manco Head');
});
}
else {
_this.userInformation = userData.data.filter(function (UserRes) {
return UserRes.role.match('IM');
});
}
// this.director_list = userData.data.filter(function (UserRes) {
// return UserRes.role.match('director');
// });
// this.OED_INED_Director = userData.data.filter(function (UserRes) {
// return UserRes.role.match('OED INED Director');
// });
// this.userInformation = userData.data;
}
else {
}
}, function (error) { return console.log(error); });
};
FactsheetChatComponent.prototype.UserMessages = function (id) {
var _this = this;
document.querySelector(".contact ").classList.remove("active");
// document.getElementById(id).classList.toggle("active");
var data = {
'action': 'getUserDataById',
'cid': id,
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
document.getElementById(id).classList.toggle("active");
_this.getMessgaeLIst(id);
_this.username = res.data[0]['firstname'] + ' ' + res.data[0]['lastname'];
if (res.data[0]['profile'] != null && res.data[0]['profile'] != '') {
_this.role = res.data[0]['profile'];
}
else {
_this.role = 'assets/images/3x.png';
}
_this.userSId = res.data[0]['username'];
_this.UserRole = res.data[0]['role'];
_this.GetUserRole = res.data[0]['role'];
}
else {
_this.username = '';
_this.role = '';
_this.userSId = '';
_this.UserRole = '';
}
});
//this.getMessageData();
};
//username: any;
FactsheetChatComponent.prototype.getMessgaeLIst = function (id) {
var _this = this;
this.user_id = id + '|' + this.userId['username'];
var data = {
action: 'allToactionquerypoint',
mod_type: this.Add_comment,
to_from_id: this.user_id
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
_this.CommentData = res.data;
setTimeout(function () {
var div = document.getElementById('userMessage');
div.scrollTop = div.scrollHeight;
}, 2000);
}
else {
}
});
};
FactsheetChatComponent.prototype.SendMessage = function (value) {
var _this = this;
var data = value;
data['action'] = 'allactionquerypoint';
data['mod_type'] = this.Add_comment;
data['from_type'] = this.userRole;
data['from_id'] = this.userId['username'];
data['to_id'] = this.userSId;
data['to_type'] = this.GetUserRole;
data['to_from_id'] = this.userSId + '|' + this.userId['username'];
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
var div = document.getElementById('userMessage');
var newHeight = div.scrollHeight + 81;
div.scrollTop = newHeight;
_this.ActionQueryform.controls['query'].setValue('');
_this.CommentData = res.data;
}
else {
toastr.error(res.message);
}
});
};
FactsheetChatComponent.prototype.gotoback = function () {
this.router.navigate(['/Im/ListDocument']);
};
FactsheetChatComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'factsheet-chat',
template: __webpack_require__(/*! ./factsheet-chat.component.html */ "./src/app/components/pages/factsheet-chat/factsheet-chat.component.html"),
styles: [__webpack_require__(/*! ./factsheet-chat.component.css */ "./src/app/components/pages/factsheet-chat/factsheet-chat.component.css")]
}),
__metadata("design:paramtypes", [_services_cognito_service__WEBPACK_IMPORTED_MODULE_5__["CognitoUtil"],
_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
_services_common_service__WEBPACK_IMPORTED_MODULE_3__["CommonService"],
_services_user_service__WEBPACK_IMPORTED_MODULE_4__["UserService"]])
], FactsheetChatComponent);
return FactsheetChatComponent;
}());
/***/ }),
/***/ "./src/app/components/pages/pagenotfound/pagenotfound.component.css":
/*!**************************************************************************!*\
!*** ./src/app/components/pages/pagenotfound/pagenotfound.component.css ***!
\**************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "*, *:after, *:before {\r\n -ms-box-sizing: border-box;\r\n box-sizing: border-box; }\r\n \r\n html {\r\n background: #ccc;\r\n font: bold 14px/20px \"Trajan Pro\", \"Times New Roman\", Times, serif;\r\n color: #430400;\r\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.15); }\r\n \r\n .error-page-wrap {\r\n width: 310px;\r\n height: 310px;\r\n margin: 155px auto; }\r\n \r\n .error-page-wrap:before {\r\n box-shadow: 0 0 200px 150px #fff;\r\n width: 310px;\r\n height: 310px;\r\n border-radius: 50%;\r\n position: relative;\r\n z-index: -1;\r\n content: '';\r\n display: block; }\r\n \r\n .error-page {\r\n width: 310px;\r\n height: 310px;\r\n border-radius: 50%;\r\n top: -310px;\r\n position: relative;\r\n text-align: center;\r\n background: #d36242;\r\n background: linear-gradient(to bottom, #d36242 0%, darkred 100%);\r\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='$firstColor', endColorstr='$secondColor',GradientType=0 ); }\r\n \r\n .error-page:before {\r\n width: 63px;\r\n height: 63px;\r\n border-radius: 50%;\r\n box-shadow: 3px 25px 0 5px #C95439;\r\n content: '';\r\n z-index: -1;\r\n display: block;\r\n position: relative;\r\n top: -19px;\r\n left: 44px; }\r\n \r\n .error-page:after {\r\n width: 310px;\r\n height: 17px;\r\n margin: 0 auto;\r\n top: 25px;\r\n content: '';\r\n z-index: -1;\r\n display: block;\r\n position: relative;\r\n background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.65) 0%, rgba(35, 26, 26, 0) 59%, rgba(60, 44, 44, 0) 100%);\r\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#a6000000', endColorstr='#003c2c2c',GradientType=1 ); }\r\n \r\n .error-page h1 {\r\n color: rgba(255, 255, 255, 0.94);\r\n font-size: 100px;\r\n margin: 65px auto 0 auto;\r\n text-shadow: 0px 0 7px rgba(0, 0, 0, 0.5); }\r\n \r\n .error-page h1:before {\r\n width: 260px;\r\n height: 1px;\r\n position: relative;\r\n margin: 0 auto;\r\n top: 70px;\r\n content: '';\r\n display: block;\r\n background: radial-gradient(ellipse at center, rgba(111, 25, 25, 0.65) 0%, rgba(75, 38, 38, 0) 70%, rgba(60, 44, 44, 0) 100%);\r\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#a66f1919', endColorstr='#003c2c2c',GradientType=1 ); }\r\n \r\n .error-page h1:after {\r\n width: 260px;\r\n height: 1px;\r\n content: '';\r\n display: block;\r\n opacity: 0.2;\r\n margin: 0 auto;\r\n top: 50px;\r\n position: relative;\r\n background: radial-gradient(ellipse at center, rgba(247, 173, 148, 0.65) 0%, rgba(255, 255, 255, 0.01) 99%, rgba(255, 255, 255, 0) 100%);\r\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#a6f7ad94', endColorstr='#00ffffff',GradientType=1 ); }\r\n \r\n .error-page h2 {\r\n margin: 0 0 30px 0;\r\n font-size: 17px; }\r\n \r\n .error-page h2:before {\r\n width: 130px;\r\n height: 1px;\r\n position: relative;\r\n margin: 0 auto;\r\n top: 31px;\r\n content: '';\r\n display: block;\r\n background: radial-gradient(ellipse at center, rgba(111, 25, 25, 0.65) 0%, rgba(75, 38, 38, 0) 70%, rgba(60, 44, 44, 0) 100%);\r\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#a66f1919', endColorstr='#003c2c2c',GradientType=1 ); }\r\n \r\n .error-page h2:after {\r\n width: 130px;\r\n height: 1px;\r\n content: '';\r\n display: block;\r\n opacity: 0.2;\r\n margin: 0 auto;\r\n top: 11px;\r\n position: relative;\r\n background: radial-gradient(ellipse at center, rgba(247, 173, 148, 0.65) 0%, rgba(255, 255, 255, 0.01) 99%, rgba(255, 255, 255, 0) 100%);\r\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#a6f7ad94', endColorstr='#00ffffff',GradientType=1 ); }\r\n \r\n .error-back {\r\n text-decoration: none;\r\n color: #430400;\r\n font-size: 15px; }\r\n \r\n .error-back:hover {\r\n color: #EB957D;\r\n text-shadow: 0 0 3px black; }\r\n "
/***/ }),
/***/ "./src/app/components/pages/pagenotfound/pagenotfound.component.html":
/*!***************************************************************************!*\
!*** ./src/app/components/pages/pagenotfound/pagenotfound.component.html ***!
\***************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = " \r\n\r\n
\r\n \r\n 404 \r\n oops! page not found \r\n \r\n \r\n \r\n
\r\n \r\n "
/***/ }),
/***/ "./src/app/components/pages/pagenotfound/pagenotfound.component.ts":
/*!*************************************************************************!*\
!*** ./src/app/components/pages/pagenotfound/pagenotfound.component.ts ***!
\*************************************************************************/
/*! exports provided: PagenotfoundComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PagenotfoundComponent", function() { return PagenotfoundComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.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 PagenotfoundComponent = /** @class */ (function () {
function PagenotfoundComponent() {
this.title = "Page not found";
}
PagenotfoundComponent.prototype.ngOnInit = function () {
};
PagenotfoundComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-pagenotfound',
template: __webpack_require__(/*! ./pagenotfound.component.html */ "./src/app/components/pages/pagenotfound/pagenotfound.component.html"),
styles: [__webpack_require__(/*! ./pagenotfound.component.css */ "./src/app/components/pages/pagenotfound/pagenotfound.component.css")]
}),
__metadata("design:paramtypes", [])
], PagenotfoundComponent);
return PagenotfoundComponent;
}());
/***/ }),
/***/ "./src/app/components/pages/profile/profile.component.css":
/*!****************************************************************!*\
!*** ./src/app/components/pages/profile/profile.component.css ***!
\****************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".header-icon img {\r\n height: 50px;\r\n width: 60px;\r\n /* margin-right: 10px; */\r\n margin-left: 53px;\r\n}\r\n.header-icon{\r\n width: 100%;\r\n float: left;\r\n color: #929292;\r\n margin: 0;\r\n margin-bottom: 20px;\r\n}\r\nbutton#sign_btn {\r\n margin-right: 12px;\r\n}\r\n.header-icon img {\r\n height: 50px;\r\n width: 60px;\r\n /* margin-right: 10px; */\r\n margin-left: 53px;\r\n}\r\n.header-icon{\r\n width: 100%;\r\n float: left;\r\n color: #929292;\r\n margin: 0 20px;\r\n margin-bottom: 20px;\r\n}\r\nbutton#sign_btn {\r\n margin-right: 12px;\r\n}\r\n@media (min-width: 768px) and (max-width: 991px) {\r\n .header-icon img {\r\n height: 50px;\r\n width: 60px;\r\n margin-left: 0px;\r\n }\r\n .header-icon {\r\n width: 100%;\r\n float: left;\r\n color: #929292;\r\n margin: 0 ;\r\n margin-bottom: 20px;\r\n }\r\n}\r\n@media only screen and (max-width: 640px){\r\n .header-icon {\r\n width: 100%;\r\n float: left;\r\n color: #929292;\r\n margin: 0;\r\n margin-bottom: 20px;\r\n }\r\n .header-icon img {\r\n height: 50px;\r\n width: 60px;\r\n margin-left: 0px;\r\n }\r\n}"
/***/ }),
/***/ "./src/app/components/pages/profile/profile.component.html":
/*!*****************************************************************!*\
!*** ./src/app/components/pages/profile/profile.component.html ***!
\*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = " \r\n\r\n "
/***/ }),
/***/ "./src/app/components/pages/profile/profile.component.ts":
/*!***************************************************************!*\
!*** ./src/app/components/pages/profile/profile.component.ts ***!
\***************************************************************/
/*! exports provided: ProfileComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProfileComponent", function() { return ProfileComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/http */ "./node_modules/@angular/http/fesm5/http.js");
/* harmony import */ var _services_auth_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! aws-sdk/clients/s3 */ "./node_modules/aws-sdk/clients/s3.js");
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../services/cognito.service */ "./src/app/services/cognito.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var ProfileComponent = /** @class */ (function () {
function ProfileComponent(form, router, auth, common, http, cognitoUtil) {
this.form = form;
this.router = router;
this.auth = auth;
this.common = common;
this.http = http;
this.cognitoUtil = cognitoUtil;
this.user = this.cognitoUtil.getCurrentUser();
this.datas = new FormData();
this.title = 'Profile';
this.selectedFile = '';
this.fund_list = [];
this.company_list = [];
this.FOLDER = 'userprofile/';
this.editForm = form.group({
'first_name': [null, _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
'last_name': [null, _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
'email': [null, _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
'userprofile': [''],
});
}
ProfileComponent.prototype.ngOnInit = function () {
var _this = this;
if (sessionStorage.getItem('token') == null && sessionStorage.getItem('token') == '') {
this.router.navigateByUrl('/login');
}
else {
var data = {
action: 'getUserDataById',
cid: this.user['username']
};
this.common.GetUserdataBYheaders(data).subscribe(function (resource) {
var resData = JSON.parse(resource._body);
var res = JSON.parse(resData.body);
if (resData.statusCode == '200') {
_this.sanlamUserID = res.data[0].sanlamuserid;
_this.editForm.controls['first_name'].setValue(res.data[0]['firstname']);
_this.editForm.controls['last_name'].setValue(res.data[0]['lastname']);
_this.editForm.controls['email'].setValue(res.data[0]['mail']);
_this.role = res.data[0]['role'];
_this.email = res.data[0]['mail'];
if (res.data[0]['fundName'] != '' && res.data[0]['fundName'] != null && res.data[0]['fundName'] != undefined) {
_this.fund_list = res.data[0]['fundName'].split(',');
}
if (res.data[0]['company_name'] != '' && res.data[0]['company_name'] != null && res.data[0]['company_name'] != undefined) {
_this.company_list = res.data[0]['company_name'].split(',');
}
}
});
}
};
ProfileComponent.prototype.fileEvent = function (e) {
var _this = this;
this.imageFile = e.target.files[0];
var btn = document.getElementById("sign_btn");
btn.innerText = "Processing...";
btn.disabled = true;
var bucket = new aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_6__({
accessKeyId: _environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].accessKeyId,
secretAccessKey: _environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].secretAccessKey,
region: _environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].S3region
});
var params = {
Bucket: _environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].BucketName,
Key: this.FOLDER + new Date().getTime() + '_' + this.imageFile.name,
Body: this.imageFile
};
bucket.upload(params, function (err, data) {
if (err) {
toastr.error(err);
}
_this.selectedFile = data['Location'];
var btn = document.getElementById("sign_btn");
btn.innerText = "Save";
btn.disabled = false;
});
};
ProfileComponent.prototype.submitForm = function (value) {
var data = this.editForm.value;
data['user_role'] = this.role;
data['profile_picture'] = this.selectedFile;
this.auth.update(data, this);
};
ProfileComponent.prototype.cognitoCallback = function (message, result) {
var _this = this;
var $this = this;
if (message != null) {
this.errorMessage = message;
}
else {
var UpdateUserData = {
'username': this.user['username'],
'firstname': this.editForm.value.first_name,
'lastname': this.editForm.value.last_name,
'mail': this.email,
'role': this.role,
'status': 'active',
'action': 'saveCoginitoUser',
'sanlamuserid': this.sanlamUserID,
'profile': localStorage.getItem('profile'),
'fundName': this.fund_list.toString(),
'company_name': this.company_list.toString()
};
}
;
this.common.saveFundRiskData(UpdateUserData)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == '200') {
document.getElementById('userprofile').value = '';
_this.selectedFile = '';
if (res.data['profile'] != null && res.data['profile'] != '') {
document.getElementById("LoginProfile").src = res.data['profile'];
}
_this.router.navigateByUrl('/admin/profile');
toastr.success("Profile Successfully Updated !", 'Success');
}
else if (res.status == '200') {
toastr.error(res);
}
});
};
ProfileComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-profile',
template: __webpack_require__(/*! ./profile.component.html */ "./src/app/components/pages/profile/profile.component.html"),
styles: [__webpack_require__(/*! ./profile.component.css */ "./src/app/components/pages/profile/profile.component.css")]
}),
__metadata("design:paramtypes", [_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_services_auth_service__WEBPACK_IMPORTED_MODULE_4__["AuthService"],
_services_common_service__WEBPACK_IMPORTED_MODULE_7__["CommonService"],
_angular_http__WEBPACK_IMPORTED_MODULE_3__["Http"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_8__["CognitoUtil"]])
], ProfileComponent);
return ProfileComponent;
}());
/***/ }),
/***/ "./src/app/components/pages/userlist/userlist.component.css":
/*!******************************************************************!*\
!*** ./src/app/components/pages/userlist/userlist.component.css ***!
\******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".header-icon img {\r\n height: 50px;\r\n width: 60px;\r\n /* margin-right: 10px; */\r\n margin-left: -22px !important;\r\n}\r\n.table-responsive {\r\n overflow-x: auto;\r\n min-height: .01%;\r\n margin-top: 15px;\r\n}\r\nth {\r\n padding: 20px 10px;\r\n text-align: center;\r\n}\r\ntd {\r\n text-align: center;\r\n}\r\n.header-icon {\r\n width: 100%;\r\n float: left;\r\n color: #929292;\r\n margin: 0;\r\n}\r\n.tab {\r\n width: 100%;\r\n float: left;\r\n margin-bottom: 6px;\r\n}"
/***/ }),
/***/ "./src/app/components/pages/userlist/userlist.component.html":
/*!*******************************************************************!*\
!*** ./src/app/components/pages/userlist/userlist.component.html ***!
\*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = " \r\n\r\n \r\n\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n # \r\n Fund Name \r\n \r\n \r\n \r\n \r\n \r\n {{i+1}} \r\n \r\n {{fund_detail}}\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n\r\n\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n # \r\n Company Name \r\n \r\n \r\n \r\n \r\n \r\n {{i+1}} \r\n \r\n {{company_name_detail}}\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n "
/***/ }),
/***/ "./src/app/components/pages/userlist/userlist.component.ts":
/*!*****************************************************************!*\
!*** ./src/app/components/pages/userlist/userlist.component.ts ***!
\*****************************************************************/
/*! exports provided: UserlistComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UserlistComponent", function() { return UserlistComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/http */ "./node_modules/@angular/http/fesm5/http.js");
/* harmony import */ var _services_auth_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var angular_datatables__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! angular-datatables */ "./node_modules/angular-datatables/index.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var ngx_bootstrap_modal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-bootstrap/modal */ "./node_modules/ngx-bootstrap/modal/fesm5/ngx-bootstrap-modal.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 dt = __webpack_require__(/*! datatables.net */ "./node_modules/datatables.net/js/jquery.dataTables.js");
var UserlistComponent = /** @class */ (function () {
function UserlistComponent(form, router, auth, common, http, modalService, rootNode) {
this.form = form;
this.router = router;
this.auth = auth;
this.common = common;
this.http = http;
this.modalService = modalService;
this.dtOptions = {};
this.dtTrigger = new rxjs__WEBPACK_IMPORTED_MODULE_7__["Subject"]();
this.title = 'User List';
this.User = [];
this.userRole = localStorage.getItem('custom:user_role');
this.config = {
keyboard: false,
ignoreBackdropClick: true,
backdrop: false,
};
this.fund = [];
this.company_name = [];
this.rootNode = rootNode;
}
UserlistComponent.prototype.openModal = function (template, data) {
this.modalRef = this.modalService.show(template, this.config);
this.fund = data.fundName.split(',');
// this.company_name = data.company_name.split(',');
};
UserlistComponent.prototype.openCOmpanyModal = function (template, data) {
this.modalRef = this.modalService.show(template, this.config);
// this.fund = data.company_name.split(',');
this.company_name = data.company_name.split(',');
};
UserlistComponent.prototype.ngOnInit = function () {
if (sessionStorage.getItem('token') == null && sessionStorage.getItem('token') == '') {
this.router.navigateByUrl('/login');
}
// if(this.userRole != 'administrator') {
// this.router.navigateByUrl('/admin/dashboard');
// }
this.dtOptions = {
pagingType: 'full_numbers',
pageLength: 10
};
this.getUserlist();
// $('#user_table').DataTables();
};
UserlistComponent.prototype.clicl = function (id) {
localStorage.setItem('userId', id);
this.router.navigateByUrl('/admin/dashboard');
//alert(document.querySelector('.routerLink').getAttribute('rel'));
};
UserlistComponent.prototype.ngOnDestroy = function () {
// Do not forget to unsubscribe the event
this.dtTrigger.unsubscribe();
};
UserlistComponent.prototype.extractData = function (res) {
var body = res.json();
return body.data || {};
};
UserlistComponent.prototype.getUserlist = function () {
var _this = this;
var data = {
'action': 'getalluser'
};
this.common.saveFundRiskData(data)
.subscribe(function (response) {
var resData = JSON.parse(response._body);
var Response = JSON.parse(resData.body);
if (Response.status == '200') {
_this.User = Response.data;
_this.dtTrigger.next();
}
else {
toastr.error(Response.message, 'Error !');
}
});
};
UserlistComponent.prototype.editUser = function (value) {
sessionStorage.setItem('userdetails', JSON.stringify(value));
this.router.navigate(['/admin/edituser']);
};
UserlistComponent.prototype.DeleteUser = function (value) {
var data = {
Userid: value.username
};
this.auth.AdminUserDeleteUser(data, this);
};
UserlistComponent.prototype.cognitoCallback = function (message, result) {
if (message != null) {
// console.log(message);
}
else {
toastr.success('User Successfully Deleted', 'Success !!');
}
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(angular_datatables__WEBPACK_IMPORTED_MODULE_6__["DataTableDirective"]),
__metadata("design:type", angular_datatables__WEBPACK_IMPORTED_MODULE_6__["DataTableDirective"])
], UserlistComponent.prototype, "dtElement", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])('closeBtn'),
__metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"])
], UserlistComponent.prototype, "closeBtn", void 0);
UserlistComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-userlist',
template: __webpack_require__(/*! ./userlist.component.html */ "./src/app/components/pages/userlist/userlist.component.html"),
styles: [__webpack_require__(/*! ./userlist.component.css */ "./src/app/components/pages/userlist/userlist.component.css")]
}),
__metadata("design:paramtypes", [_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_services_auth_service__WEBPACK_IMPORTED_MODULE_4__["AuthService"],
_services_common_service__WEBPACK_IMPORTED_MODULE_5__["CommonService"],
_angular_http__WEBPACK_IMPORTED_MODULE_3__["Http"], ngx_bootstrap_modal__WEBPACK_IMPORTED_MODULE_8__["BsModalService"],
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]])
], UserlistComponent);
return UserlistComponent;
}());
/***/ }),
/***/ "./src/app/layout/footer/footer.component.css":
/*!****************************************************!*\
!*** ./src/app/layout/footer/footer.component.css ***!
\****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/layout/footer/footer.component.html":
/*!*****************************************************!*\
!*** ./src/app/layout/footer/footer.component.html ***!
\*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/layout/footer/footer.component.ts":
/*!***************************************************!*\
!*** ./src/app/layout/footer/footer.component.ts ***!
\***************************************************/
/*! exports provided: FooterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FooterComponent", function() { return FooterComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.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 FooterComponent = /** @class */ (function () {
function FooterComponent() {
}
FooterComponent.prototype.ngOnInit = function () {
};
FooterComponent.prototype.closePopup = function () {
document.getElementById("qnimate").classList.remove("popup-box-on");
};
FooterComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-footer',
template: __webpack_require__(/*! ./footer.component.html */ "./src/app/layout/footer/footer.component.html"),
styles: [__webpack_require__(/*! ./footer.component.css */ "./src/app/layout/footer/footer.component.css")]
}),
__metadata("design:paramtypes", [])
], FooterComponent);
return FooterComponent;
}());
/***/ }),
/***/ "./src/app/layout/header/header.component.css":
/*!****************************************************!*\
!*** ./src/app/layout/header/header.component.css ***!
\****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "nav.navbar.navbar-default {\r\n margin-bottom: unset !important;\r\n}"
/***/ }),
/***/ "./src/app/layout/header/header.component.html":
/*!*****************************************************!*\
!*** ./src/app/layout/header/header.component.html ***!
\*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\r\n\r\n \r\n {{ChangeUrl}}\r\n\r\n \r\n \r\n\r\n \r\n
\r\n\r\n \r\n
\r\n \r\n\r\n
\r\n \r\n\r\n\r\n \r\n\r\n\r\n
\r\n
\r\n\r\n \r\n \r\n\r\n \r\n
\r\n Do you want more time\r\n
\r\n\r\n \r\n \r\n\r\n
\r\n
\r\n
"
/***/ }),
/***/ "./src/app/layout/header/header.component.ts":
/*!***************************************************!*\
!*** ./src/app/layout/header/header.component.ts ***!
\***************************************************/
/*! exports provided: HeaderComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderComponent", function() { return HeaderComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var _services_auth_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../services/auth.service */ "./src/app/services/auth.service.ts");
/* harmony import */ var _services_awsservices_authorization_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../services/awsservices/authorization.service */ "./src/app/services/awsservices/authorization.service.ts");
/* harmony import */ var _app_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../app.component */ "./src/app/app.component.ts");
/* harmony import */ var _services_user_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../services/user.service */ "./src/app/services/user.service.ts");
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! sweetalert2 */ "./node_modules/sweetalert2/dist/sweetalert2.all.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var rxjs_add_observable_fromEvent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rxjs/add/observable/fromEvent */ "./node_modules/rxjs-compat/_esm5/add/observable/fromEvent.js");
/* harmony import */ var rxjs_Observable__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rxjs/Observable */ "./node_modules/rxjs-compat/_esm5/Observable.js");
/* harmony import */ var angular_user_idle__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! angular-user-idle */ "./node_modules/angular-user-idle/fesm5/angular-user-idle.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);
};
// Extra
// End Extra work
var user = localStorage.getItem('custom:first_name');
var user_role = localStorage.getItem('custom:user_role');
var clicks$ = rxjs_Observable__WEBPACK_IMPORTED_MODULE_10__["Observable"].fromEvent(document, 'click');
var scroll$ = rxjs_Observable__WEBPACK_IMPORTED_MODULE_10__["Observable"].fromEvent(document, 'scroll');
var keyPress$ = rxjs_Observable__WEBPACK_IMPORTED_MODULE_10__["Observable"].fromEvent(document, 'keypress');
var Blur$ = rxjs_Observable__WEBPACK_IMPORTED_MODULE_10__["Observable"].fromEvent(window, 'blur');
var swalWithBootstrapButtons = sweetalert2__WEBPACK_IMPORTED_MODULE_8___default.a.mixin({
confirmButtonClass: 'btn btn-success',
cancelButtonClass: 'btn btn-danger',
buttonsStyling: false,
});
var HeaderComponent = /** @class */ (function () {
function HeaderComponent(router, cognitoUtil, authantication, auth, role, userService, common, userIdle) {
// scroll$.subscribe(x => this.resetTimer());
// keyPress$.subscribe(x => this.resetTimer());
// clicks$.subscribe(x => this.resetTimer());
// Blur$.subscribe(x => this.resetTimer());
this.router = router;
this.cognitoUtil = cognitoUtil;
this.authantication = authantication;
this.auth = auth;
this.role = role;
this.userService = userService;
this.common = common;
this.userIdle = userIdle;
this.max = 200;
this.dynamic = 100;
this.user = this.authantication.getAuthenticatedUser();
this.isLoggedIn = false;
//myData = { name: '' };
this.email = localStorage.getItem('email');
this.name = localStorage.getItem('custom:first_name');
this.count = 0;
}
HeaderComponent.prototype.timerHandler = function () {
this.count++;
};
// Start timer
HeaderComponent.prototype.startTimer = function () {
this.myInterval = window.setInterval(this.timerHandler, 1000);
};
// Stop timer
HeaderComponent.prototype.stopTimer = function () {
window.clearInterval(this.myInterval);
window.clearTimeout(this.checkidentity);
};
HeaderComponent.prototype.resetTimer = function () {
this.userIdle.resetTimer();
window.clearInterval(this.myInterval);
window.clearTimeout(this.checkidentity);
};
HeaderComponent.prototype.move = function () {
this.checkidentity = setTimeout(function () {
$('#CloseModel').click();
}, 100);
};
HeaderComponent.prototype.ngOnInit = function () {
var _this = this;
//Start watching for user inactivity.
this.userIdle.startWatching();
// Start watching when user idle is starting.
this.userIdle.onTimerStart().subscribe(function (count) {
if (count == 1) {
$('#myModal').show();
}
});
// Start watch when time is up.
this.userIdle.onTimeout().subscribe(function () {
_this.logout();
});
var token = sessionStorage.getItem('token');
// let token = localStorage.getItem('token');
localStorage.removeItem('session');
if (token != null && token != '') {
this.isLoggedIn = true;
//this.name = user;
this.userRole = localStorage.getItem('custom:user_role');
if (localStorage.getItem('profile') != null && localStorage.getItem('profile') != '') {
this.userProfile = localStorage.getItem('profile');
}
else {
this.userProfile = 'assets/images/3x.png';
}
document.getElementById('body').className = 'gray_bg';
}
else {
this.logout();
// this.router.navigate(['/login']);
}
};
HeaderComponent.prototype.logout = function () {
// toastr.success('Successfully Logout!', 'Success!', { timeout: 100 });
sessionStorage.removeItem('token');
this.router.navigateByUrl('/login');
this.checkUrl = setTimeout(function () {
if ($('#url_value').val() == 'true') {
this.ChangeUrl = '';
}
else {
this.ChangeUrl = 'true';
}
}, 3000);
};
HeaderComponent.prototype.ngOnDestroy = function () {
//window.clearTimeout(this.checkidentity);
clearInterval(this.ChangeUrl);
};
HeaderComponent.prototype.CheckUrl = function (value) {
if (localStorage.getItem('custom:user_role') == 'manco user') {
if ($('#url_value').val() == 'true') {
if (confirm('You have unsaved changes. Do you want to save changes? ')) {
$('#submitData').click();
this.Hello(value);
}
else {
this.Hello(value);
}
}
else {
this.Hello(value);
}
}
else {
this.Hello(value);
}
};
HeaderComponent.prototype.Hello = function (value) {
this.router.navigate([value]);
};
HeaderComponent.prototype.CheckActivity = function () {
//localStorage.clear();
sessionStorage.removeItem('token');
this.router.navigateByUrl('/login');
toastr.success('Successfully Logout!', 'Success!');
};
HeaderComponent.prototype.stop = function () {
this.userIdle.stopTimer();
};
HeaderComponent.prototype.stopWatching = function () {
this.userIdle.stopWatching();
};
HeaderComponent.prototype.startWatching = function () {
this.userIdle.startWatching();
};
HeaderComponent.prototype.restart = function () {
window.clearTimeout(this.checkidentity);
$('#myModal').hide();
this.userIdle.resetTimer();
};
HeaderComponent.prototype.cognitoCallback = function (messages, result) {
if (messages != null) {
console.log("result: " + messages);
}
else {
//move to the next step
console.log(result);
}
};
HeaderComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-header',
template: __webpack_require__(/*! ./header.component.html */ "./src/app/layout/header/header.component.html"),
styles: [__webpack_require__(/*! ./header.component.css */ "./src/app/layout/header/header.component.css")]
}),
__metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_2__["CognitoUtil"],
_services_awsservices_authorization_service__WEBPACK_IMPORTED_MODULE_4__["AuthorizationService"],
_services_auth_service__WEBPACK_IMPORTED_MODULE_3__["AuthService"],
_app_component__WEBPACK_IMPORTED_MODULE_5__["AppComponent"],
_services_user_service__WEBPACK_IMPORTED_MODULE_6__["UserService"],
_services_common_service__WEBPACK_IMPORTED_MODULE_7__["CommonService"],
angular_user_idle__WEBPACK_IMPORTED_MODULE_11__["UserIdleService"]])
], HeaderComponent);
return HeaderComponent;
}());
/***/ }),
/***/ "./src/app/layout/menu/menu.component.css":
/*!************************************************!*\
!*** ./src/app/layout/menu/menu.component.css ***!
\************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/layout/menu/menu.component.html":
/*!*************************************************!*\
!*** ./src/app/layout/menu/menu.component.html ***!
\*************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\r\n
\r\n
\r\n
\r\n \r\n Status Panel\r\n \r\n
\r\n
\r\n
\r\n
Eg. Manco User \r\n
3 action points requiring attention
\r\n
\r\n
\r\n
Eg. Manco User \r\n
3 action points requiring attention
\r\n
\r\n
\r\n
\r\n
\r\n \r\n Comments\r\n \r\n
\r\n
\r\n
\r\n
Director \r\n
3/2/2018 \r\n
Sed ut perspiciatis unde omnis iste natus error sit
\r\n
\r\n
\r\n
Director \r\n
3/2/2018 \r\n
Sed ut perspiciatis unde omnis iste natus error sit
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
"
/***/ }),
/***/ "./src/app/layout/menu/menu.component.ts":
/*!***********************************************!*\
!*** ./src/app/layout/menu/menu.component.ts ***!
\***********************************************/
/*! exports provided: MenuComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MenuComponent", function() { return MenuComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.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 MenuComponent = /** @class */ (function () {
function MenuComponent() {
}
MenuComponent.prototype.ngOnInit = function () {
};
MenuComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-menu',
template: __webpack_require__(/*! ./menu.component.html */ "./src/app/layout/menu/menu.component.html"),
styles: [__webpack_require__(/*! ./menu.component.css */ "./src/app/layout/menu/menu.component.css")]
}),
__metadata("design:paramtypes", [])
], MenuComponent);
return MenuComponent;
}());
/***/ }),
/***/ "./src/app/loadAndcompliance/add-load-compliance/add-load-compliance.component.css":
/*!*****************************************************************************************!*\
!*** ./src/app/loadAndcompliance/add-load-compliance/add-load-compliance.component.css ***!
\*****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".ngx-dropdown-container .ngx-dropdown-list-container ul.selected-items li {\r\n background-color: inherit !important;\r\n}"
/***/ }),
/***/ "./src/app/loadAndcompliance/add-load-compliance/add-load-compliance.component.html":
/*!******************************************************************************************!*\
!*** ./src/app/loadAndcompliance/add-load-compliance/add-load-compliance.component.html ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = " \r\n\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n {{LoadComplaince_title.Add_form_title}} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n "
/***/ }),
/***/ "./src/app/loadAndcompliance/add-load-compliance/add-load-compliance.component.ts":
/*!****************************************************************************************!*\
!*** ./src/app/loadAndcompliance/add-load-compliance/add-load-compliance.component.ts ***!
\****************************************************************************************/
/*! exports provided: loadcompliance, AddLoadComplianceComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadcompliance", function() { return loadcompliance; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AddLoadComplianceComponent", function() { return AddLoadComplianceComponent; });
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../services/cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var src_app_services_common_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var ngx_progressbar__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ngx-progressbar */ "./node_modules/ngx-progressbar/modules/ngx-progressbar.es5.js");
/* harmony import */ var src_environments_environment__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! aws-sdk/clients/s3 */ "./node_modules/aws-sdk/clients/s3.js");
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! sweetalert2 */ "./node_modules/sweetalert2/dist/sweetalert2.all.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var _model_newuser__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../model/newuser */ "./src/app/model/newuser.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var loadcompliance = /** @class */ (function () {
function loadcompliance() {
this.question4a = [];
this.question5a = [];
}
return loadcompliance;
}());
var AddLoadComplianceComponent = /** @class */ (function () {
function AddLoadComplianceComponent(_fb, router, common, cognitoUtil, ngProgress, differs) {
this._fb = _fb;
this.router = router;
this.common = common;
this.cognitoUtil = cognitoUtil;
this.ngProgress = ngProgress;
this.loadcompliance_form = new loadcompliance();
this.userName = this.cognitoUtil.getCurrentUser();
this.year = [];
this.select_month = [
{ id: 1, month: 'January' },
{ id: 2, month: 'February' },
{ id: 3, month: 'March' },
{ id: 4, month: 'April' },
{ id: 5, month: 'May' },
{ id: 6, month: 'June' },
{ id: 7, month: 'July' },
{ id: 8, month: 'Augest' },
{ id: 9, month: 'September' },
{ id: 10, month: 'October' },
{ id: 11, month: 'November' },
{ id: 12, month: 'December' }
];
this.config = {
displayKey: "company_name",
search: false,
limitTo: 3
};
this.companyName = '';
this.UserData = [];
for (var i = 2018; i <= new Date().getFullYear(); i++) {
this.year.push(i);
}
this.LoadComplaince_title = _model_newuser__WEBPACK_IMPORTED_MODULE_9__["LoadComplaince"];
this.differ = differs.find([]).create(null);
}
AddLoadComplianceComponent.prototype.changeValue = function ($event) {
console.log();
this.options = this.optionsData.filter(function (resData) {
return resData.fund_name == $event.target.value;
});
};
AddLoadComplianceComponent.prototype.ngOnInit = function () {
var _this = this;
this.ComplianceForm = this._fb.group({
monthly_complianceId: [''],
month: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
year: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
question1: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
question2: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
question3: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
question3a: [''],
question4: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
question4a: this._fb.array([
this.initlanguage(),
]),
question5: ['',],
question5a: this._fb.array([
this.point5(),
]),
question6: ['',],
question6a: ['',],
question7: ['',],
question7a: ['',],
question8: ['',],
question8a: ['',],
question9: ['',],
question9a: ['',],
question9b: ['',],
question10: ['',],
question10a: ['',],
question10ai: ['',],
question10b: ['',],
question10bi: ['',],
question10c: ['',],
question10ci: ['',],
question11: ['',],
question11a: ['',],
question12: ['',],
question12a: ['',],
question13: ['',],
question13a: ['',],
submmitted_by: ['',],
});
this.ngProgress.start();
setTimeout(function () {
_this.ngProgress.done();
}, 2000);
this.getUserInformation();
};
AddLoadComplianceComponent.prototype.changeEvernt = function (event, id) {
if (event.target.value === 'No') {
document.getElementById("question4ai" + id).style.display = "block";
}
else {
document.getElementById("question4ai" + id).style.display = "none";
}
};
AddLoadComplianceComponent.prototype.changepoint5Evernt = function (event, id) {
if (event.target.value === 'No') {
document.getElementById("question5ai" + id).style.display = "block";
}
else {
document.getElementById("question5ai" + id).style.display = "none";
}
};
// point 4a start
AddLoadComplianceComponent.prototype.initlanguage = function () {
return this._fb.group({
question4a: [''],
question4ai: [''],
question4b: [''],
question4c: [''],
question4d: [''],
question4e: [''],
question4f: ['']
});
};
AddLoadComplianceComponent.prototype.addLanguage = function () {
var control = this.ComplianceForm.controls['question4a'];
control.push(this.initlanguage());
};
AddLoadComplianceComponent.prototype.removeLanguage = function (index) {
var control = this.ComplianceForm.controls['question4a'];
control.removeAt(index);
};
Object.defineProperty(AddLoadComplianceComponent.prototype, "formData", {
get: function () {
return this.ComplianceForm.get('question4a');
// return this.ComplianceForm.get('question5a');
},
enumerable: true,
configurable: true
});
Object.defineProperty(AddLoadComplianceComponent.prototype, "formData2", {
get: function () {
return this.ComplianceForm.get('question5a');
},
enumerable: true,
configurable: true
});
// point 4a End
// point 5a start
AddLoadComplianceComponent.prototype.point5 = function () {
return this._fb.group({
question5a: [''],
question5ai: [''],
question5b: [''],
question5c: [''],
question5d: [''],
question5e: [''],
question5f: [''],
question5g: ['']
});
};
AddLoadComplianceComponent.prototype.add_point5a = function () {
var control = this.ComplianceForm.controls['question5a'];
control.push(this.point5());
};
AddLoadComplianceComponent.prototype.remove_point5a = function (index) {
var control = this.ComplianceForm.controls['question5a'];
control.removeAt(index);
};
AddLoadComplianceComponent.prototype.getUserInformation = function () {
var _this = this;
var data = {
action: 'getUserDataById',
cid: localStorage.getItem('sub')
};
this.common.GetUserdataBYheaders(data).subscribe(function (resource) {
var resData = JSON.parse(resource._body);
var res = JSON.parse(resData.body);
console.log(res);
if (res.status == '200') {
_this.UserInformation = res.data[0];
}
else {
// console.log(Userres);
}
if (res.data.length > 0) {
if (res.data[0].fundName != '' && res.data[0].fundName != null && res.data[0].fundName != undefined) {
_this.Fund_list = res.data[0].fundName.split(',');
}
if (res.data[0].company_name != '' && res.data[0].company_name != null && res.data[0].company_name != undefined) {
_this.company_list = res.data[0].company_name.split(',');
}
}
}, function (error) {
console.log("Server Internal Error");
});
};
AddLoadComplianceComponent.prototype.updateFundValue = function (value) {
this.fundName = value;
console.log(value);
this.companyName = value['company_name'];
};
AddLoadComplianceComponent.prototype.fileEvent = function (e) {
var _this = this;
this.selectFIles = e.target.files[0];
if (this.selectFIles != null) {
if (this.selectFIles["type"] == "application/pdf" ||
this.selectFIles["type"] == "application/vnd.ms-excel") {
this.file = this.selectFIles;
this.FileName = e.target.files[0].name;
var FOLDER = "assets/load-Compliance/" + this.UserInformation['firstname'] + "_" + this.UserInformation['lastname'] + "/";
var bucket = new aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_7__({
accessKeyId: src_environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].accessKeyId,
secretAccessKey: src_environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].secretAccessKey,
region: src_environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].S3region
});
var params = {
Bucket: src_environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].BucketName,
Key: FOLDER + new Date().getTime() + '_' + this.FileName,
Body: this.file
};
bucket.upload(params, function (err, data) {
if (err) {
console.log(err);
toastr.error("Server Internal Error", "Error !!!");
console.log(err);
}
_this.imageFile = data["Location"];
});
}
else {
this.file = null;
toastr.error("File type not allowed.", "File not support !!!");
}
}
else {
this.file = null;
}
};
AddLoadComplianceComponent.prototype.submitForms = function (RowData) {
var $this = this;
var data = RowData;
sweetalert2__WEBPACK_IMPORTED_MODULE_8___default()({
title: 'Would you like to submit this request?',
input: 'checkbox',
inputPlaceholder: 'I confirm that I am the authorised Compliance Officer.'
}).then(function (result) {
if (result.value) {
sessionStorage.setItem('CheckData', 'Success');
sweetalert2__WEBPACK_IMPORTED_MODULE_8___default()("Success!", "Request successfully submitted", "success");
data['question4a'] = JSON.stringify(RowData.question4a);
data['question5a'] = JSON.stringify(RowData.question5a);
if ($this.imageFile != null) {
// data['withdrawals_occurred_during_month'] = $this.loadcompliance_form.question8a;
data['withdrawals_corrective_steps'] = 'null';
data["question9b"] = $this.imageFile;
}
data["userId"] = $this.userName["username"];
data["userRole"] = localStorage.getItem("custom:user_role");
data["requestDate"] = new Date();
// data["month"] = new Date().getMonth() + 1;
// data["year"] = new Date().getFullYear();
data["IMHoC_review"] = 'In Progress';
data["IMCO_review"] = 'In Progress';
data["ManCO_Hoc_review"] = 'In Progress';
data["ManCO_User_review"] = 'In Progress';
data["company_Name"] = $this.companyName;
data["UserInformation"] = JSON.stringify($this.UserInformation);
data["LastUrl"] = src_environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].loadComplianceModule + "/loadcompliance";
data['action'] = 'saveLoadComplianceStatement';
data['loadcomplianceId'] = '';
$this.common.GetUserdataBYheaders(data).subscribe(function (res) {
// console.log(res);
toastr.success("Submitted for Review", "success!!!");
$this.sendMessage('Hoc');
$this.router.navigate(['/Load-compliance-statement']);
}, function (error) {
toastr.error("Server Internal Error", "Error!!!");
});
}
else if (result.value === 0) {
sweetalert2__WEBPACK_IMPORTED_MODULE_8___default()({ type: 'error', text: "Please select the dealing policy & procedures" });
}
else {
console.log("modal was dismissed by " + result.dismiss);
}
});
};
AddLoadComplianceComponent.prototype.repeartEvent = function (event, key) {
console.log(event);
var array = [];
var $this = this;
if (event.target.value == 'Yes') {
this.addLanguage();
}
else {
this.removeLanguage(key + 1);
}
};
AddLoadComplianceComponent.prototype.repeartEvent5 = function (event, key) {
var $this = this;
if (event.target.value == 'Yes') {
this.add_point5a();
}
else {
this.remove_point5a(key + 1);
}
};
AddLoadComplianceComponent.prototype.sendMessage = function (role) {
var _this = this;
var DirectorData = {
action: "getalluser"
};
this.common.saveFundRiskData(DirectorData).subscribe(function (response) {
var resData = JSON.parse(response._body);
var resource = JSON.parse(resData.body);
var RoleData = [];
var Role = [];
if (resource.status == "200") {
for (var i = 0; i < resource.data.length; i++) {
RoleData.push({
firstname: resource.data[i].firstname,
lastname: resource.data[i].lastname,
mail: resource.data[i].mail,
role: resource.data[i].role.split(","),
sanlamuserid: resource.data[i].sanlamuserid,
status: resource.data[i].status
});
Role.push(resource.data[i].role.split(","));
}
var result = [];
$.each(Role, function (index, value) {
var rs = value.indexOf(role);
if (rs == -1) {
}
else {
result.push(RoleData[index]);
}
});
var MailEmail = [];
// if (role === 'director') {
// MailEmail.push(['Richard.Aslett@sanlam.ie']);
// } else {
for (var i = 0; i < result.length; i++) {
if (result[i].status == 'active') {
MailEmail.push(result[i].mail);
}
}
// }
var data = {
action: "commonMailservice",
to: MailEmail,
subject: "Regstone PA Share & Gratifications Request ",
message: "Hi, \n There are Compliance Statements that require your attention. Please log onto Sanlam Regstone to process.Regards
The Sanlam Regstone Team
"
};
_this.common.saveFundRiskData(data).subscribe(function (response) {
var resData = JSON.parse(response._body);
var res = JSON.parse(resData.body);
if (res.status == "200") {
}
else {
//toastr.error('res.message','Error found');
}
}, function (error) {
console.log(error);
});
}
});
};
AddLoadComplianceComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
selector: "app-add-load-compliance",
template: __webpack_require__(/*! ./add-load-compliance.component.html */ "./src/app/loadAndcompliance/add-load-compliance/add-load-compliance.component.html"),
styles: [__webpack_require__(/*! ./add-load-compliance.component.css */ "./src/app/loadAndcompliance/add-load-compliance/add-load-compliance.component.css")]
}),
__metadata("design:paramtypes", [_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
_angular_router__WEBPACK_IMPORTED_MODULE_3__["Router"],
src_app_services_common_service__WEBPACK_IMPORTED_MODULE_4__["CommonService"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_0__["CognitoUtil"],
ngx_progressbar__WEBPACK_IMPORTED_MODULE_5__["NgProgress"],
_angular_core__WEBPACK_IMPORTED_MODULE_1__["IterableDiffers"]])
], AddLoadComplianceComponent);
return AddLoadComplianceComponent;
}());
/***/ }),
/***/ "./src/app/loadAndcompliance/addfunds/addfunds.component.css":
/*!*******************************************************************!*\
!*** ./src/app/loadAndcompliance/addfunds/addfunds.component.css ***!
\*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/loadAndcompliance/addfunds/addfunds.component.html":
/*!********************************************************************!*\
!*** ./src/app/loadAndcompliance/addfunds/addfunds.component.html ***!
\********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = " \r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Load a Compliance Statement Dashboard \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n Fund / Portfolio \r\n
\r\n
\r\n
\r\n
Fund / Portfolio \r\n Add\r\n Record \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n \r\n\r\n \r\n\r\n \r\n "
/***/ }),
/***/ "./src/app/loadAndcompliance/addfunds/addfunds.component.ts":
/*!******************************************************************!*\
!*** ./src/app/loadAndcompliance/addfunds/addfunds.component.ts ***!
\******************************************************************/
/*! exports provided: AddfundsComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AddfundsComponent", function() { return AddfundsComponent; });
/* harmony import */ var src_app_services_common_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var ngx_bootstrap_modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ngx-bootstrap/modal */ "./node_modules/ngx-bootstrap/modal/fesm5/ngx-bootstrap-modal.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var ngx_spinner__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ngx-spinner */ "./node_modules/ngx-spinner/fesm5/ngx-spinner.js");
/* harmony import */ var ngx_progressbar__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ngx-progressbar */ "./node_modules/ngx-progressbar/modules/ngx-progressbar.es5.js");
/* harmony import */ var src_environments_environment__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var angular_datatables__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! angular-datatables */ "./node_modules/angular-datatables/index.js");
/* harmony import */ var _services_cognito_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../services/cognito.service */ "./src/app/services/cognito.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
//var dt = require("datatables.net");
var AddfundsComponent = /** @class */ (function () {
function AddfundsComponent(fb, cognitoUtil, modalService, ngProgress, spinner, common) {
this.fb = fb;
this.cognitoUtil = cognitoUtil;
this.modalService = modalService;
this.ngProgress = ngProgress;
this.spinner = spinner;
this.common = common;
this.userName = this.cognitoUtil.getCurrentUser();
// modalRef2: BsModalRef;
this.dtOptions = {};
this.dtTrigger = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
this.Fundata$ = [];
this.AddFund = fb.group({
LoadFundid: [],
user_id: [this.userName["username"]],
fund_name: ["", _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
company_name: ["", _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
fund_details: ["", _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required],
fund_apporved: ["true"]
});
}
AddfundsComponent.prototype.ngOnInit = function () {
this.dtOptions = {
pagingType: "full_numbers",
pageLength: 10
};
this.ngProgress.start();
this.GetFundData();
};
AddfundsComponent.prototype.ngOnDestroy = function () {
this.dtTrigger.unsubscribe();
};
AddfundsComponent.prototype.openModal = function (template, data) {
if (data.length == 'data') {
this.AddFund.reset();
}
else {
this.EditFund(data);
}
this.modalRef = this.modalService.show(template);
};
AddfundsComponent.prototype.closeModel = function () {
this.AddFund.reset();
if (!this.modalRef) {
return;
}
this.modalRef.hide();
this.modalRef = null;
};
AddfundsComponent.prototype.submitForm = function (value) {
var _this = this;
this.ngProgress.start();
var data = value;
data["LastUrl"] = src_environments_environment__WEBPACK_IMPORTED_MODULE_7__["environment"].loadComplianceModule + "/AdminFund";
data["month"] = new Date().getMonth() + 1;
data["year"] = new Date().getFullYear();
data["fund_apporved"] = "true";
data["user_id"] = this.userName["username"];
this.common.Post(data).subscribe(function (res) {
var Getdata = {
LastUrl: src_environments_environment__WEBPACK_IMPORTED_MODULE_7__["environment"].loadComplianceModule + "/AdminFund"
};
_this.common.Get(Getdata).subscribe(function (Retrivedata) {
if (data['LoadFundid'] == '') {
toastr.success('Record Successfully Submitted', 'Success');
}
else {
toastr.success('Record Successfully Updated', 'Success');
}
_this.Fundata$ = Retrivedata.data;
_this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
_this.modalRef.hide();
//this.dtTrigger.next();
_this.ngProgress.done();
}, function (error) {
_this.ngProgress.done();
});
}, function (error) {
console.log(error);
});
};
AddfundsComponent.prototype.EditFund = function (details) {
this.AddFund.controls["LoadFundid"].setValue(details.LoadFundid);
this.AddFund.controls["user_id"].setValue(details.user_id);
this.AddFund.controls["fund_name"].setValue(details.fund_name);
this.AddFund.controls["company_name"].setValue(details.company_name);
this.AddFund.controls["fund_details"].setValue(details.fund_details);
this.AddFund.controls["fund_apporved"].setValue(details.fund_apporved);
};
AddfundsComponent.prototype.GetFundData = function () {
var _this = this;
var data = {
LastUrl: src_environments_environment__WEBPACK_IMPORTED_MODULE_7__["environment"].loadComplianceModule + "/AdminFund"
};
this.common.Get(data).subscribe(function (res) {
_this.Fundata$ = res.data;
_this.dtTrigger.next();
_this.ngProgress.done();
}, function (error) {
_this.ngProgress.done();
console.log(error);
});
};
AddfundsComponent.prototype.DeleteFund = function (data) {
var _this = this;
var Deletedata = {
LastUrl: src_environments_environment__WEBPACK_IMPORTED_MODULE_7__["environment"].loadComplianceModule + "/AdminFund/" + data['LoadFundid']
};
this.common.Get(Deletedata).subscribe(function (res) {
var Getdata = {
LastUrl: src_environments_environment__WEBPACK_IMPORTED_MODULE_7__["environment"].loadComplianceModule + "/AdminFund"
};
_this.common.Get(Getdata).subscribe(function (Retrivedata) {
toastr.success('Record Successfully Deleted', 'Success');
_this.Fundata$ = Retrivedata.data;
_this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
});
});
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])(angular_datatables__WEBPACK_IMPORTED_MODULE_8__["DataTableDirective"]),
__metadata("design:type", angular_datatables__WEBPACK_IMPORTED_MODULE_8__["DataTableDirective"])
], AddfundsComponent.prototype, "dtElement", void 0);
AddfundsComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
selector: "app-addfunds",
template: __webpack_require__(/*! ./addfunds.component.html */ "./src/app/loadAndcompliance/addfunds/addfunds.component.html"),
styles: [__webpack_require__(/*! ./addfunds.component.css */ "./src/app/loadAndcompliance/addfunds/addfunds.component.css")]
}),
__metadata("design:paramtypes", [_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"],
_services_cognito_service__WEBPACK_IMPORTED_MODULE_9__["CognitoUtil"],
ngx_bootstrap_modal__WEBPACK_IMPORTED_MODULE_3__["BsModalService"],
ngx_progressbar__WEBPACK_IMPORTED_MODULE_6__["NgProgress"],
ngx_spinner__WEBPACK_IMPORTED_MODULE_5__["NgxSpinnerService"],
src_app_services_common_service__WEBPACK_IMPORTED_MODULE_0__["CommonService"]])
], AddfundsComponent);
return AddfundsComponent;
}());
/***/ }),
/***/ "./src/app/loadAndcompliance/list-load-compliance/list-load-compliance.component.css":
/*!*******************************************************************************************!*\
!*** ./src/app/loadAndcompliance/list-load-compliance/list-load-compliance.component.css ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/loadAndcompliance/list-load-compliance/list-load-compliance.component.html":
/*!********************************************************************************************!*\
!*** ./src/app/loadAndcompliance/list-load-compliance/list-load-compliance.component.html ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = " \r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n {{LoadComplaince_title.list_title}} \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n "
/***/ }),
/***/ "./src/app/loadAndcompliance/list-load-compliance/list-load-compliance.component.ts":
/*!******************************************************************************************!*\
!*** ./src/app/loadAndcompliance/list-load-compliance/list-load-compliance.component.ts ***!
\******************************************************************************************/
/*! exports provided: ListLoadComplianceComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ListLoadComplianceComponent", function() { return ListLoadComplianceComponent; });
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var ngx_bootstrap_modal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ngx-bootstrap/modal */ "./node_modules/ngx-bootstrap/modal/fesm5/ngx-bootstrap-modal.js");
/* harmony import */ var ngx_progressbar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ngx-progressbar */ "./node_modules/ngx-progressbar/modules/ngx-progressbar.es5.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var src_app_model_newuser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/model/newuser */ "./src/app/model/newuser.ts");
/* harmony import */ var angular_datatables__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! angular-datatables */ "./node_modules/angular-datatables/index.js");
/* harmony import */ var src_app_services_cognito_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/services/cognito.service */ "./src/app/services/cognito.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var jsPDF = __webpack_require__(/*! jspdf */ "./node_modules/jspdf/dist/jspdf.min.js");
__webpack_require__(/*! jspdf-autotable */ "./node_modules/jspdf-autotable/dist/jspdf.plugin.autotable.js");
var ListLoadComplianceComponent = /** @class */ (function () {
function ListLoadComplianceComponent(modalService, NgProgress, common, cognitoUtil) {
this.modalService = modalService;
this.NgProgress = NgProgress;
this.common = common;
this.cognitoUtil = cognitoUtil;
this.bsValue = new Date(2020, 4);
this.minMode = 'month';
this.currentRole = localStorage.getItem("custom:user_role");
this.UserData = [];
this.userid = this.cognitoUtil.getCurrentUser();
this.select_year = [];
this.select_month = [
'',
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'Augest',
'September',
'October',
'November',
'December'
];
this.select_months = [
{ id: 1, month: 'January' },
{ id: 2, month: 'February' },
{ id: 3, month: 'March' },
{ id: 4, month: 'April' },
{ id: 5, month: 'May' },
{ id: 6, month: 'June' },
{ id: 7, month: 'July' },
{ id: 8, month: 'Augest' },
{ id: 9, month: 'September' },
{ id: 10, month: 'October' },
{ id: 11, month: 'November' },
{ id: 12, month: 'December' }
];
this.Filter_status = '';
this.Filter_user = '';
this.Filter_year = '';
this.select_Filter_year = '';
this.Filter_month = '';
this.Fund_list = [];
this.company_list = [];
this.users$ = [];
this.dtOptions = {};
this.dtTrigger = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
this.RoleData = [];
this.dropdownList = [];
this.compnay_list = [];
this.dtOptions = {
lengthMenu: [[-1, 10, 25, 50, 100], ["All", 10, 25, 50, 100]]
// pageLength: 10
};
this.bsConfig = Object.assign({}, {
minMode: this.minMode
});
for (var i = 2019; i <= new Date().getFullYear(); i++) {
this.select_year.push(i);
}
this.getFundList_Data();
}
ListLoadComplianceComponent.prototype.ngOnInit = function () {
// this.dtOptions = {
// pagingType: "full_numbers",
// pageLength: 10,
// processing: true
// };
this.NgProgress.start();
this.LoadComplaince_title = src_app_model_newuser__WEBPACK_IMPORTED_MODULE_6__["LoadComplaince"];
this.dropdownSettings = {
singleSelection: false,
idField: 'fundName',
textField: 'fundName',
selectAllText: 'Select All',
unSelectAllText: 'UnSelect All',
itemsShowLimit: 3,
allowSearchFilter: true
};
this.Compnay_dropdownSettings = {
singleSelection: false,
idField: 'CompanyName',
textField: 'CompanyName',
selectAllText: 'Select All',
unSelectAllText: 'UnSelect All',
itemsShowLimit: 3,
allowSearchFilter: true
};
this.GetList();
//this.GetUserInformation();
};
ListLoadComplianceComponent.prototype.openModal = function (template) {
this.UserDetails = template;
console.log(this.UserDetails);
this.fund = this.UserDetails.fund;
this.fundName = this.UserDetails.fundName;
this.subsequent_amendments = JSON.parse(this.UserDetails.question4a);
this.market_movements = JSON.parse(this.UserDetails.question5a);
this.userInformation = JSON.parse(this.UserDetails.UserInformation);
};
ListLoadComplianceComponent.prototype.GetList = function () {
var _this = this;
var data = {
action: 'get-all-load-data',
};
this.common.GetUserdataBYheaders(data).subscribe(function (resource) {
var resData = JSON.parse(resource._body);
var res = JSON.parse(resData.body);
if (res.data.length > 0) {
_this.ListData = res.data.sort(function (a, b) {
if (a.createdAt < b.createdAt) {
return -1;
}
else if (a.createdAt > b.createdAt) {
return 1;
}
else {
return 0;
}
});
_this.userdata = _this.ListData;
sessionStorage.setItem('loadcomplain', JSON.stringify(_this.ListData));
}
_this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
_this.NgProgress.done();
// }
}, function (error) {
_this.NgProgress.done();
console.log(error);
_this.GetList();
});
};
ListLoadComplianceComponent.prototype.GetUserInformation = function () {
var _this = this;
var DirectorData = {
LastUrl: _environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].loadComplianceModule + "/SanlamUserList"
};
this.common.Get(DirectorData).subscribe(function (response) {
var Role = [];
if (response.status == "success") {
for (var i = 0; i < response.data.length; i++) {
_this.RoleData.push({
firstname: response.data[i].firstname,
lastname: response.data[i].lastname,
mail: response.data[i].mail,
role: response.data[i].role.split(","),
sanlamuserid: response.data[i].sanlamuserid,
username: response.data[i].username
});
Role.push(response.data[i].role.split(","));
}
_this.combineData();
}
});
};
ListLoadComplianceComponent.prototype.combineData = function () {
var Details;
var FileData;
var FilesData;
var value = this.ListData;
var _loop_1 = function (i) {
Details = this_1.RoleData.filter(function (personDetails) {
return personDetails.username == value[i].userId;
});
this_1.UserData.push({
lastname: Details[0].lastname,
role: Details[0].role,
sanlamuserid: Details[0].sanlamuserid,
status: Details[0].status,
firstname: Details[0].firstname,
mail: Details[0].mail,
loadComplianceId: value[i].loadComplianceId,
userId: value[i].userId,
userRole: value[i].userRole,
fund: value[i].fund,
company_Name: value[i].company_Name,
fundName: value[i].fundName,
web_form: value[i].web_form,
subsequent_amendments: value[i].subsequent_amendments,
market_movements: value[i].market_movements,
occurred_during_month: value[i].occurred_during_month,
Reasons_breach: value[i].Reasons_breach,
corrective_steps: value[i].corrective_steps,
recovery_timeframe: value[i].recovery_timeframe,
withdrawals_from: value[i].withdrawals_from,
withdrawals_occurred_during_month: value[i].withdrawals_occurred_during_month,
withdrawals_Reasons_breach: value[i].withdrawals_Reasons_breach,
withdrawals_corrective_steps: value[i].withdrawals_corrective_steps,
withdrawals_recovery_timeframe: value[i].withdrawals_recovery_timeframe,
withdrawals_exception: value[i].withdrawals_exception,
withdrawals_another_breach: value[i].withdrawals_another,
Investment_Governance: value[i].Investment_Governance,
Investment_describe_details: value[i].describe_details,
reported_above: value[i].reported_above,
reported_above_details: value[i].reported_above_details,
reasonable_expectations: value[i].reasonable_expectations,
motivated_valuation: value[i].motivated_valuation,
copies_document: value[i].copies_document,
collective_investment: value[i].collective_investment,
Financial_Derivatives: value[i].Financial_Derivatives,
FDI_compliant: value[i].FDI_compliant,
Fund_leveraged: value[i].Fund_leveraged,
Best_Execution: value[i].Best_Execution,
jurisdictions: value[i].jurisdictions,
SAMI_Compliance: value[i].SAMI_Compliance,
BN92: value[i].BN92,
IMCO_review: value[i].IMCO_review,
IMHoC_review: value[i].IMHoC_review,
ManCO_Hoc_review: value[i].ManCO_Hoc_review,
ManCO_User_review: value[i].ManCO_User_review,
IMCO_review_userId: value[i].IMCO_review_userId,
IMHoC_review_userId: value[i].IMHoC_review_userId,
ManCO_Hoc_review_userId: value[i].ManCO_Hoc_review_userId,
ManCO_User_review_userId: value[i].ManCO_User_review_userId,
IMCO_review_date: value[i].IMCO_review_date,
IMHoC_review_date: value[i].IMHoC_review_date,
ManCO_Hoc_review_date: value[i].ManCO_Hoc_review_date,
ManCO_User_review_date: value[i].ManCO_User_review_date,
month: value[i].month,
year: value[i].year,
requestDate: value[i].requestDate,
createdAt: value[i].createdAt,
updatedAt: value[i].updatedAt
});
};
var this_1 = this;
for (var i = 0; i < value.length; i++) {
_loop_1(i);
}
this.dtTrigger.next();
};
ListLoadComplianceComponent.prototype.ngAfterViewInit = function () {
this.dtTrigger.next();
};
ListLoadComplianceComponent.prototype.ngOnDestroy = function () {
this.dtTrigger.unsubscribe();
};
ListLoadComplianceComponent.prototype.SamiModals = function (template) {
this.Samicomments = this.modalService.show(template);
};
ListLoadComplianceComponent.prototype.save_comment = function (value) {
var _this = this;
if (value == 'comments') {
var $this = this;
var data = this.comment_data;
this.Samicomments.hide();
data['action'] = 'saveLoadComplianceStatement';
data['comments'] = this.reported_above_details;
this.common.GetUserdataBYheaders(data).subscribe(function (res) {
_this.GetList();
toastr.success('Status successfully updated', "success!!!");
}, function (error) {
toastr.error("Server Internal Error", "Error!!!");
});
}
else {
this.comment_data = value;
}
};
ListLoadComplianceComponent.prototype.ChangeReview = function ($event, value) {
var data = value;
console.log();
var message;
if (this.currentRole == 'Manco Head' || this.currentRole == 'manco user') {
data['ManCO_Hoc_review'] = $event.target.value;
data['IMHoC_review'] = $event.target.value;
data['IMCO_review'] = $event.target.value;
// message = 'Under Management Company Review';
}
else if (this.currentRole == 'IM Head Of Compliance') {
data['ManCO_Hoc_review'] = $event.target.value;
data['IMHoC_review'] = $event.target.value;
data['IMCO_review'] = $event.target.value;
// message = 'In Progress';
}
else if (this.currentRole == 'administrator') {
data['IMHoC_review'] = $event.target.value;
data['ManCO_Hoc_review'] = $event.target.value;
data['IMCO_review'] = $event.target.value;
// message = 'Review Closed';
}
if ($event.target.value == 'Under IM Review' || $event.target.value == 'Under ManCO Review') {
data['IMCO_review'] = 'Under Review';
}
data['action'] = 'saveLoadComplianceStatement';
this.common.GetUserdataBYheaders(data).subscribe(function (res) {
// this.GetList();
toastr.success('Status successfully updated', "success!!!");
}, function (error) {
toastr.error("Server Internal Error", "Error!!!");
});
};
ListLoadComplianceComponent.prototype.FilerDataBYUser = function (Filter_year, Filter_month, Filter_status, FilterByName) {
var _this = this;
var month = new Date(Filter_year).getMonth() + 1;
var year = new Date(Filter_year).getFullYear();
this.ListData = JSON.parse(sessionStorage.getItem('loadcomplain'));
if (Filter_year == '' && Filter_month == '' && Filter_status == '' && FilterByName == '') {
// this.ListData = [];
this.ListData = this.ListData;
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (Filter_year != '' && Filter_month == '' && Filter_status == '' && FilterByName == '') {
this.ListData = [];
this.ListData = JSON.parse(sessionStorage.getItem('loadcomplain'));
console.log(this.ListData);
this.ListData = this.ListData.filter(function (person) {
console.log(person.year + '' + Filter_year);
return person.year == year;
});
// this.Distributor_List = this.ListData;
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (Filter_year != '' && Filter_month != '' && Filter_status == '' && FilterByName == '') {
this.ListData = [];
this.ListData = JSON.parse(sessionStorage.getItem('loadcomplain'));
this.ListData = this.ListData.filter(function (person) {
console.log(person.year + '' + Filter_year);
return person.year == year && person.month == Filter_month;
});
// this.Distributor_List = this.ListData;
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (Filter_year != '' && Filter_month != '' && Filter_status != '' && FilterByName == '') {
this.ListData = [];
this.ListData = JSON.parse(sessionStorage.getItem('loadcomplain'));
this.ListData = this.ListData.filter(function (person) {
return person.year == year && person.month == Filter_month && person.question1 == Filter_status;
});
// this.Distributor_List = this.ListData;
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (Filter_year != '' && Filter_month != '' && Filter_status != '' && FilterByName != '') {
// this.ListData = [];
this.ListData = JSON.parse(sessionStorage.getItem('loadcomplain'));
this.ListData = this.ListData.filter(function (person) {
return person.year == year && person.month == Filter_month && person.IMCO_review == Filter_status && person.question1 == FilterByName;
});
// this.this.ListData = this.ListData;
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (Filter_year != '' && Filter_month == '' && Filter_status == '' && FilterByName != '') {
// this.ListData = [];
this.ListData = JSON.parse(sessionStorage.getItem('loadcomplain'));
this.ListData = this.ListData.filter(function (person) {
return person.year == year && person.question1 == FilterByName;
});
// this.this.ListData = this.ListData;
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (Filter_year == '' && Filter_month == '' && Filter_status != '' && FilterByName == '') {
// this.ListData = [];
this.ListData = JSON.parse(sessionStorage.getItem('loadcomplain'));
var ListData = this.ListData.filter(function (person) {
return person.IMCO_review == Filter_status;
});
console.log(ListData);
this.ListData = ListData;
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (Filter_year == '' && Filter_month == '' && Filter_status != '' && FilterByName != '') {
// this.ListData = [];
this.ListData = JSON.parse(sessionStorage.getItem('loadcomplain'));
this.ListData = this.ListData.filter(function (person) {
return person.IMCO_review == Filter_status && person.question1 == FilterByName;
});
// this.this.ListData = this.ListData;
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (Filter_year == '' && Filter_month == '' && Filter_status == '' && FilterByName != '') {
// this.ListData = [];
this.ListData = JSON.parse(sessionStorage.getItem('loadcomplain'));
this.ListData = this.ListData.filter(function (person) {
return person.question1 == FilterByName;
});
// console.log('User name')
// this.this.ListData = this.ListData;
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (Filter_year == '' && Filter_month != '' && Filter_status == '' && FilterByName == '') {
// this.ListData = [];
this.ListData = JSON.parse(sessionStorage.getItem('loadcomplain'));
this.ListData = this.ListData.filter(function (person) {
return person.month == Filter_month;
});
// this.this.ListData = this.ListData;
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (Filter_year == '' && Filter_month != '' && Filter_status != '' && FilterByName == '') {
// this.ListData = [];
this.ListData = JSON.parse(sessionStorage.getItem('loadcomplain'));
this.ListData = this.ListData.filter(function (person) {
return person.month == Filter_month && person.IMCO_review == Filter_status;
});
// this.this.ListData = this.ListData;
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (Filter_year == '' && Filter_month != '' && Filter_status == '' && FilterByName != '') {
// this.ListData = [];
this.ListData = JSON.parse(sessionStorage.getItem('loadcomplain'));
this.ListData = this.ListData.filter(function (person) {
return person.month == Filter_month && person.question1 == FilterByName;
});
// this.this.ListData = this.ListData;
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
else if (Filter_year != '' && Filter_month == '' && Filter_status != '' && FilterByName == '') {
this.ListData = [];
this.ListData = JSON.parse(sessionStorage.getItem('loadcomplain'));
this.ListData = this.ListData.filter(function (person) {
return person.year == year && person.IMCO_review == Filter_status;
});
// this.Distributor_List = this.ListData;
this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
}
};
ListLoadComplianceComponent.prototype.getFundList_Data = function () {
var _this = this;
var data = {
action: 'getUserDataById',
cid: localStorage.getItem('sub')
};
this.common.GetUserdataBYheaders(data).subscribe(function (resource) {
var resData = JSON.parse(resource._body);
var res = JSON.parse(resData.body);
// console.log(res)
if (res.status == '200') {
_this.UserInformation = res.data[0];
}
else {
// console.log(Userres);
}
if (res.data.length > 0) {
// if (res.data[0].fundName != '' && res.data[0].fundName != null && res.data[0].fundName != undefined) {
// this.Fund_list = res.data[0].fundName.split(',');
// }
if (res.data[0].company_name != '' && res.data[0].company_name != null && res.data[0].company_name != undefined) {
_this.compnay_list = res.data[0].company_name.split(',');
console.log(_this.compnay_list);
}
}
}, function (error) {
_this.getFundList_Data();
});
};
ListLoadComplianceComponent.prototype.IndivalData = function (e) {
var UserInformation = JSON.parse(e.UserInformation);
// var rows = this.PdfData;
var columns = [{ content: "Monthly Compliance SIP UK Statement(s) ", colSpan: 2, rowSpan: 1, styles: { halign: 'center' } }];
var doc = new jsPDF();
var pdfData = [
["User", UserInformation.firstname + ' ' + UserInformation.lastname],
["UserDetails", UserInformation.mail],
["Month", this.select_month[e.month]],
["Year", e.year],
[this.LoadComplaince_title.question1, e.question1],
[this.LoadComplaince_title.question2, e.question2],
[this.LoadComplaince_title.question3, e.question3],
[this.LoadComplaince_title.question3a, e.question3a],
[this.LoadComplaince_title.question4, e.question4],
];
if (e.question4 != 'No') {
var subsequent_amendments = JSON.parse(e.question4a);
for (var i = 0; i < subsequent_amendments.length; i++) {
pdfData.push(['', ''], [{ content: "Breach no.(1) " + (i + 1) + " ", colSpan: 2, rowSpan: 1, styles: { halign: 'center' } }],
// [`Fund ${i + 1} `, ''],
[this.LoadComplaince_title.question4a, subsequent_amendments[i].question4a], [this.LoadComplaince_title.question4ai, subsequent_amendments[i].question4ai], [this.LoadComplaince_title.question4b, subsequent_amendments[i].question4b], [this.LoadComplaince_title.question4c, subsequent_amendments[i].question4c], [this.LoadComplaince_title.question4d, subsequent_amendments[i].question4d], [this.LoadComplaince_title.question4e, subsequent_amendments[i].question4e], [this.LoadComplaince_title.question4f, subsequent_amendments[i].question4f], ['', '']);
}
}
pdfData.push([this.LoadComplaince_title.question5, e.question5]);
if (e.question5 != 'No') {
var market_movements = JSON.parse(e.question5a);
for (var i = 0; i < market_movements.length; i++) {
pdfData.push(['', ''], [{ content: "Breach no.(1) " + (i + 1) + " ", colSpan: 2, rowSpan: 1, styles: { halign: 'center' } }],
// [`Fund ${i + 1} `, ''],
[this.LoadComplaince_title.question5a, market_movements[i].question5a], [this.LoadComplaince_title.question5ai, market_movements[i].question5ai], [this.LoadComplaince_title.question5b, market_movements[i].question5b], [this.LoadComplaince_title.question5c, market_movements[i].question5c], [this.LoadComplaince_title.question5d, market_movements[i].question5d], [this.LoadComplaince_title.question5e, market_movements[i].question5e], [this.LoadComplaince_title.question5f, market_movements[i].question5f], [this.LoadComplaince_title.question5g, market_movements[i].question5g], ['', '']);
}
}
pdfData.push([this.LoadComplaince_title.question6, e.question6], [this.LoadComplaince_title.question6a, e.question6a], [this.LoadComplaince_title.question7, e.question7], [this.LoadComplaince_title.question7a, e.question7a], [this.LoadComplaince_title.question8, e.question8], [this.LoadComplaince_title.question8a, e.question8a], [this.LoadComplaince_title.question9, e.question9], [this.LoadComplaince_title.question9a, e.question9a], [this.LoadComplaince_title.question9b, e.question9b], [this.LoadComplaince_title.question10, e.question10], [this.LoadComplaince_title.question10a, e.question10a], [this.LoadComplaince_title.question10ai, e.question10ai], [this.LoadComplaince_title.question10b, e.question10b], [this.LoadComplaince_title.question10bi, e.question10bi], [this.LoadComplaince_title.question10c, e.question10c], [this.LoadComplaince_title.question10ci, e.question10ci], [this.LoadComplaince_title.question11, e.question11], [this.LoadComplaince_title.question11a, e.question11a], [this.LoadComplaince_title.question12, e.question12], [this.LoadComplaince_title.question12a, e.question12a], [this.LoadComplaince_title.question13, e.question13], [this.LoadComplaince_title.question13a, e.question13a], [this.LoadComplaince_title.submmitted_by, e.submmitted_by], ['Status', e.IMCO_review]);
doc.autoTable({
theme: 'grid',
columnStyles: { 0: { halign: 'left', cellWidth: 50 }, 1: { halign: 'left', cellWidth: 50 } },
margin: { top: 10 },
StyleDef: { cellWidth: 'wrap', minCellWidth: 50 },
head: [columns],
body: pdfData
});
doc.save(UserInformation.firstname + ' ' + UserInformation.lastname + "Monthly Compliance Statements SIP.pdf");
};
ListLoadComplianceComponent.prototype.ExportAll = function () {
var data;
var status;
var pdfData = [];
var doc = new jsPDF();
var sno = 1;
for (var i = 0; i < this.ListData.length; i++) {
var UserInformation = JSON.parse(this.ListData[i].UserInformation);
var columns = [{ content: "No. " + sno + " " + UserInformation.firstname + " " + UserInformation.lastname + " Monthly Complaince SIP UK Statement(s) ", colSpan: 2, rowSpan: 1, styles: { halign: 'center' } }];
pdfData[i] = [
["User", UserInformation.firstname + ' ' + UserInformation.lastname],
["UserDetails", UserInformation.mail],
["Month", this.select_month[this.ListData[i].month]],
["Year", this.ListData[i].year],
[this.LoadComplaince_title.question1, this.ListData[i].question1],
[this.LoadComplaince_title.question2, this.ListData[i].question2],
[this.LoadComplaince_title.question3, this.ListData[i].question3],
[this.LoadComplaince_title.question3a, this.ListData[i].question3a],
[this.LoadComplaince_title.question4, this.ListData[i].question4],
];
if (this.ListData[i].question4 != 'No') {
var subsequent_amendments = JSON.parse(this.ListData[i].question4a);
for (var j = 0; j < subsequent_amendments.length; j++) {
pdfData[i].push(['', ''], [{ content: "Breach no.(1) " + (j + 1) + " ", colSpan: 2, rowSpan: 1, styles: { halign: 'center' } }], [this.LoadComplaince_title.question4a, subsequent_amendments[j].question4a], [this.LoadComplaince_title.question4ai, subsequent_amendments[j].question4ai], [this.LoadComplaince_title.question4b, subsequent_amendments[j].question4b], [this.LoadComplaince_title.question4c, subsequent_amendments[j].question4c], [this.LoadComplaince_title.question4d, subsequent_amendments[j].question4d], [this.LoadComplaince_title.question4e, subsequent_amendments[j].question4e], [this.LoadComplaince_title.question4f, subsequent_amendments[j].question4f], ['', '']);
}
}
pdfData[i].push([this.LoadComplaince_title.question5, this.ListData[i].question5]);
if (this.ListData[i].question5 != 'No') {
var market_movements = JSON.parse(this.ListData[i].question5a);
for (var k = 0; k < market_movements.length; k++) {
pdfData[i].push(['', ''], [{ content: "Breach no.(1) " + (k + 1) + " ", colSpan: 2, rowSpan: 1, styles: { halign: 'center' } }], [this.LoadComplaince_title.question5a, market_movements[k].question5a], [this.LoadComplaince_title.question5ai, market_movements[k].question5ai], [this.LoadComplaince_title.question5b, market_movements[k].question5b], [this.LoadComplaince_title.question5c, market_movements[k].question5c], [this.LoadComplaince_title.question5d, market_movements[k].question5d], [this.LoadComplaince_title.question5e, market_movements[k].question5e], [this.LoadComplaince_title.question5f, market_movements[k].question5f], [this.LoadComplaince_title.question5g, market_movements[k].question5g], ['', '']);
}
}
pdfData[i].push([this.LoadComplaince_title.question6, this.ListData[i].question6], [this.LoadComplaince_title.question6a, this.ListData[i].question6a], [this.LoadComplaince_title.question7, this.ListData[i].question7], [this.LoadComplaince_title.question7a, this.ListData[i].question7a], [this.LoadComplaince_title.question8, this.ListData[i].question8], [this.LoadComplaince_title.question8a, this.ListData[i].question8a], [this.LoadComplaince_title.question9, this.ListData[i].question9], [this.LoadComplaince_title.question9a, this.ListData[i].question9a], [this.LoadComplaince_title.question9b, this.ListData[i].question9b], [this.LoadComplaince_title.question10, this.ListData[i].question10], [this.LoadComplaince_title.question10a, this.ListData[i].question10a], [this.LoadComplaince_title.question10ai, this.ListData[i].question10ai], [this.LoadComplaince_title.question10b, this.ListData[i].question10b], [this.LoadComplaince_title.question10bi, this.ListData[i].question10bi], [this.LoadComplaince_title.question10c, this.ListData[i].question10c], [this.LoadComplaince_title.question10ci, this.ListData[i].question10ci], [this.LoadComplaince_title.question11, this.ListData[i].question11], [this.LoadComplaince_title.question11a, this.ListData[i].question11a], [this.LoadComplaince_title.question12, this.ListData[i].question12], [this.LoadComplaince_title.question12a, this.ListData[i].question12a], [this.LoadComplaince_title.question13, this.ListData[i].question13], [this.LoadComplaince_title.question13a, this.ListData[i].question13a], [this.LoadComplaince_title.submmitted_by, this.ListData[i].submmitted_by], ['Status', this.ListData[i].IMCO_review]);
doc.autoTable({
theme: 'grid',
columnStyles: { 0: { halign: 'left', cellWidth: 50 }, 1: { halign: 'left', cellWidth: 50 } },
margin: { top: 10 },
StyleDef: { cellWidth: 'wrap', minCellWidth: 50 },
head: [columns],
body: pdfData[i]
});
sno++;
}
doc.save('Monthly Compliance Statements SIP.pdf');
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])(angular_datatables__WEBPACK_IMPORTED_MODULE_7__["DataTableDirective"]),
__metadata("design:type", angular_datatables__WEBPACK_IMPORTED_MODULE_7__["DataTableDirective"])
], ListLoadComplianceComponent.prototype, "dtElement", void 0);
ListLoadComplianceComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
selector: "app-list-load-compliance",
template: __webpack_require__(/*! ./list-load-compliance.component.html */ "./src/app/loadAndcompliance/list-load-compliance/list-load-compliance.component.html"),
styles: [__webpack_require__(/*! ./list-load-compliance.component.css */ "./src/app/loadAndcompliance/list-load-compliance/list-load-compliance.component.css")]
}),
__metadata("design:paramtypes", [ngx_bootstrap_modal__WEBPACK_IMPORTED_MODULE_2__["BsModalService"],
ngx_progressbar__WEBPACK_IMPORTED_MODULE_3__["NgProgress"],
_services_common_service__WEBPACK_IMPORTED_MODULE_0__["CommonService"], src_app_services_cognito_service__WEBPACK_IMPORTED_MODULE_8__["CognitoUtil"]])
], ListLoadComplianceComponent);
return ListLoadComplianceComponent;
}());
/***/ }),
/***/ "./src/app/loadAndcompliance/load-com-na/load-com-na.component.css":
/*!*************************************************************************!*\
!*** ./src/app/loadAndcompliance/load-com-na/load-com-na.component.css ***!
\*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/loadAndcompliance/load-com-na/load-com-na.component.html":
/*!**************************************************************************!*\
!*** ./src/app/loadAndcompliance/load-com-na/load-com-na.component.html ***!
\**************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = " \r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n {{LoadComplaince_title.list_title}} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n "
/***/ }),
/***/ "./src/app/loadAndcompliance/load-com-na/load-com-na.component.ts":
/*!************************************************************************!*\
!*** ./src/app/loadAndcompliance/load-com-na/load-com-na.component.ts ***!
\************************************************************************/
/*! exports provided: LoadComNaComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoadComNaComponent", function() { return LoadComNaComponent; });
/* harmony import */ var _services_common_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../services/common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var ngx_bootstrap_modal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ngx-bootstrap/modal */ "./node_modules/ngx-bootstrap/modal/fesm5/ngx-bootstrap-modal.js");
/* harmony import */ var ngx_progressbar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ngx-progressbar */ "./node_modules/ngx-progressbar/modules/ngx-progressbar.es5.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var src_app_model_newuser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/model/newuser */ "./src/app/model/newuser.ts");
/* harmony import */ var angular_datatables__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! angular-datatables */ "./node_modules/angular-datatables/index.js");
/* harmony import */ var src_app_services_cognito_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/services/cognito.service */ "./src/app/services/cognito.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var LoadComNaComponent = /** @class */ (function () {
function LoadComNaComponent(modalService, NgProgress, common, cognitoUtil) {
this.modalService = modalService;
this.NgProgress = NgProgress;
this.common = common;
this.cognitoUtil = cognitoUtil;
this.bsValue = new Date(2020, 4);
this.minMode = 'month';
this.currentRole = localStorage.getItem("custom:user_role");
this.userid = this.cognitoUtil.getCurrentUser();
this.dtOptions = {};
this.dtTrigger = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
this.select_month = [
'',
'january',
'February',
'March',
'April',
'May',
'June',
'July',
'Augest',
'September',
'October',
'November',
'December'
];
this.dtOptions = {
lengthMenu: [[-1, 10, 25, 50, 100], ["All", 10, 25, 50, 100]]
// pageLength: 10
};
this.bsConfig = Object.assign({}, {
minMode: this.minMode
});
}
LoadComNaComponent.prototype.ngOnInit = function () {
// this.dtOptions = {
// pagingType: "full_numbers",
// pageLength: 10,
// processing: true
// };
this.NgProgress.start();
this.LoadComplaince_title = src_app_model_newuser__WEBPACK_IMPORTED_MODULE_5__["LoadComplaince"];
this.GetList();
//this.GetUserInformation();
};
LoadComNaComponent.prototype.ngAfterViewInit = function () {
this.dtTrigger.next();
};
LoadComNaComponent.prototype.ngOnDestroy = function () {
this.dtTrigger.unsubscribe();
};
LoadComNaComponent.prototype.openModal = function (template) {
this.UserDetails = template;
this.subsequent_amendments = JSON.parse(this.UserDetails.question4a);
this.market_movements = JSON.parse(this.UserDetails.question5a);
this.userInformation = JSON.parse(this.UserDetails.UserInformation);
};
LoadComNaComponent.prototype.GetList = function () {
var _this = this;
var data = {
action: 'get-all-load-data',
};
this.common.GetUserdataBYheaders(data).subscribe(function (resource) {
var resData = JSON.parse(resource._body);
var res = JSON.parse(resData.body);
if (res.data.length > 0) {
_this.ListData = res.data.sort(function (a, b) {
if (a.createdAt < b.createdAt) {
return -1;
}
else if (a.createdAt > b.createdAt) {
return 1;
}
else {
return 0;
}
});
_this.ListData = _this.ListData;
sessionStorage.setItem('loadcomplain', JSON.stringify(_this.ListData));
}
_this.dtElement.dtInstance.then(function (dtInstance) {
dtInstance.destroy();
_this.dtTrigger.next();
});
_this.NgProgress.done();
// }
}, function (error) {
_this.NgProgress.done();
console.log(error);
_this.GetList();
});
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])(angular_datatables__WEBPACK_IMPORTED_MODULE_6__["DataTableDirective"]),
__metadata("design:type", angular_datatables__WEBPACK_IMPORTED_MODULE_6__["DataTableDirective"])
], LoadComNaComponent.prototype, "dtElement", void 0);
LoadComNaComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
selector: 'app-load-com-na',
template: __webpack_require__(/*! ./load-com-na.component.html */ "./src/app/loadAndcompliance/load-com-na/load-com-na.component.html"),
styles: [__webpack_require__(/*! ./load-com-na.component.css */ "./src/app/loadAndcompliance/load-com-na/load-com-na.component.css")]
}),
__metadata("design:paramtypes", [ngx_bootstrap_modal__WEBPACK_IMPORTED_MODULE_2__["BsModalService"],
ngx_progressbar__WEBPACK_IMPORTED_MODULE_3__["NgProgress"],
_services_common_service__WEBPACK_IMPORTED_MODULE_0__["CommonService"], src_app_services_cognito_service__WEBPACK_IMPORTED_MODULE_7__["CognitoUtil"]])
], LoadComNaComponent);
return LoadComNaComponent;
}());
/***/ }),
/***/ "./src/app/loadAndcompliance/load-com-navbar/load-com-navbar.component.css":
/*!*********************************************************************************!*\
!*** ./src/app/loadAndcompliance/load-com-navbar/load-com-navbar.component.css ***!
\*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/loadAndcompliance/load-com-navbar/load-com-navbar.component.html":
/*!**********************************************************************************!*\
!*** ./src/app/loadAndcompliance/load-com-navbar/load-com-navbar.component.html ***!
\**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\r\n
× \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n\r\n
\r\n
"
/***/ }),
/***/ "./src/app/loadAndcompliance/load-com-navbar/load-com-navbar.component.ts":
/*!********************************************************************************!*\
!*** ./src/app/loadAndcompliance/load-com-navbar/load-com-navbar.component.ts ***!
\********************************************************************************/
/*! exports provided: LoadComNavbarComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoadComNavbarComponent", function() { return LoadComNavbarComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _model_newuser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../model/newuser */ "./src/app/model/newuser.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var LoadComNavbarComponent = /** @class */ (function () {
function LoadComNavbarComponent() {
this.Information = _model_newuser__WEBPACK_IMPORTED_MODULE_1__["userInformation"];
this.userRole = localStorage.getItem('custom:user_role');
this.loadcomplaince = _model_newuser__WEBPACK_IMPORTED_MODULE_1__["LoadComplaince"];
}
LoadComNavbarComponent.prototype.ngOnInit = function () {
if (this.userRole == 'administrator' || this.userRole == 'Manco Head' || this.userRole == 'manco user' || this.userRole == 'IM Head Of Compliance') {
this.MonthlycomplianceLink = '/Load-compliance-statement/list';
}
else if (this.userRole == 'IMCO') {
this.MonthlycomplianceLink = '/Load-compliance-statement';
}
};
LoadComNavbarComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'loadnavbar',
template: __webpack_require__(/*! ./load-com-navbar.component.html */ "./src/app/loadAndcompliance/load-com-navbar/load-com-navbar.component.html"),
styles: [__webpack_require__(/*! ./load-com-navbar.component.css */ "./src/app/loadAndcompliance/load-com-navbar/load-com-navbar.component.css")]
}),
__metadata("design:paramtypes", [])
], LoadComNavbarComponent);
return LoadComNavbarComponent;
}());
/***/ }),
/***/ "./src/app/model/mothdetails.ts":
/*!**************************************!*\
!*** ./src/app/model/mothdetails.ts ***!
\**************************************/
/*! exports provided: Monthdetails */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Monthdetails", function() { return Monthdetails; });
var Monthdetails = /** @class */ (function () {
function Monthdetails() {
this.year = [];
this.monthNames = [
{ 'id': '1', 'name': 'January' },
{ 'id': '2', 'name': 'February' },
{ 'id': '3', 'name': 'March' },
{ 'id': '4', 'name': 'April' },
{ 'id': '5', 'name': 'May' },
{ 'id': '6', 'name': 'June' },
{ 'id': '7', 'name': 'July' },
{ 'id': '8', 'name': 'August' },
{ 'id': '9', 'name': 'September' },
{ 'id': '10', 'name': 'October' },
{ 'id': '11', 'name': 'November' },
{ 'id': '12', 'name': 'December' }
];
this.months_arr = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
this.date = new Date();
this.login_Date = this.date.getDate() + ' ' + this.months_arr[this.date.getMonth()] + ' ' + new Date().getFullYear();
}
return Monthdetails;
}());
/***/ }),
/***/ "./src/app/model/newuser.ts":
/*!**********************************!*\
!*** ./src/app/model/newuser.ts ***!
\**********************************/
/*! exports provided: NewUser, Distributor_personal_data, select_month, userInformation, Document_Management, Distributor_model_text, APIURL, LoadComplaince, MOnthlyComplaince */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NewUser", function() { return NewUser; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Distributor_personal_data", function() { return Distributor_personal_data; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "select_month", function() { return select_month; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "userInformation", function() { return userInformation; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Document_Management", function() { return Document_Management; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Distributor_model_text", function() { return Distributor_model_text; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APIURL", function() { return APIURL; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoadComplaince", function() { return LoadComplaince; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MOnthlyComplaince", function() { return MOnthlyComplaince; });
var NewUser = /** @class */ (function () {
function NewUser(name, email, password, role, status) {
}
NewUser.prototype.deserialize = function (input) {
console.log(input);
Object.assign(this, input);
return this;
};
return NewUser;
}());
var Distributor_personal_data;
var select_month = [
'',
'january',
'February',
'March',
'April',
'May',
'June',
'July',
'Augest',
'September',
'October',
'November',
'December'
];
var userInformation = {
userRole: localStorage.getItem('custom:user_role'),
first_name: localStorage.getItem('custom:first_name'),
last_name: localStorage.getItem('custom:last_name'),
email: localStorage.getItem('custom:email'),
profile: localStorage.getItem('custom:profile'),
userId: localStorage.getItem('sub')
};
var Document_Management = {
heading_title: "Document Management Process Register Dashboard",
title: "Document Management Process Register Record",
list_page_title: "List Document Management Process Register",
Reference_number: "Reference number",
Log_Date: "Log Date",
Department: "Department",
Responsible_Person: "Responsible Person",
Document: "Type of Document",
Third_Party: "Third Party",
Fund: "Fund Name (where applicable)",
Document_status: "Document Status",
Date_signed: "Date Original Document signed by CEO",
Effective_Date: "Effective Date of the Document",
Date_Executed_Document: "Date of Execution",
Executed_Document_Filed: "Original hard copy of Executed Document Filed",
Process_Status: "Process Status",
Document_Link: "Upload Document ",
Document_NAME: "Document Name .pdf/xls ",
updatelog: "Update Log",
Success_message: "Document Management Data submitted successfully",
Updated_message: "Document Management Data submitted successfully",
Info_message: "Data not found"
};
var Distributor_model_text = {
have_already_data: 'Report already submitted for this quarter',
};
var APIURL = {
Factsheet: "https://3z1tfh0og1.execute-api.us-east-2.amazonaws.com/prod"
};
var LoadComplaince = {
title: 'Monthly Compliance Statement SIP UK Portfolios Dashboard',
list_title: 'List of Monthly Compliance Statements SIP UK',
nav_bar: 'Compliance Statements SIP UK',
btn_for: 'Add SIP UK Compliance Statement',
Add_form_title: 'Add a Compliance Statement for SIP UK Portfolios',
question1: 'Q1. Investment Mangement Company Name',
question2: 'Q2. Fund / Portfolio Name',
question3: 'Q3. Has the Fund / Portfolio been managed in line with the guidelines attached to the IMA and any subsequent amendments, at all times during the month?',
question3a: 'A. Please Explain',
question4: 'Q4. Has there been a breach of any part of the guidelines that is not due to market movements or withdrawals from the Fund / Portfolio?',
question4a: 'A. Have SAMI been advised within 3 business days of the breach that occurred?',
question4ai: 'A(i). Please Explain',
question4b: 'B. Describe the breach type that occurred during the month',
question4c: 'C. Reason for breach ',
question4d: 'D. The corrective steps taken or to be taken',
question4e: 'E. The recovery timeframe for breach',
question4f: 'F. Add another breach?',
question5: 'Q5. Has there been a breach of any part of the guidelines that is due to market movements or withdrawals from the Fund / Portfolio, and if so have SAMI been advised within 3 business days?',
question5a: 'A. Have SAMI been advised within 3 business days of the breach that occurred?',
question5ai: 'A(i). Please Explain',
question5b: 'B. Describe the type of breach that occurred during the month',
question5c: 'C. Reason for breach',
question5d: 'D. The corrective steps taken or to be taken',
question5e: 'E. The recovery timeframe for breach',
question5f: 'F. The size of the exception',
question5g: 'G. Add another breach?',
question6: 'Q6. Are there any Investment / Governance issues relating to the Fund / Portfolio that SAMI should be aware of?',
question6a: 'A. Please Explain',
question7: 'Q7. Have there been any errors, trading or other, that have not been reported for this Fund / Portfolio? ',
question7a: 'A. Please Explain',
question8: "Q8. Does the Fund / Portfolio contain any securities that will take more than 60 days to sell based on the Investment Manger's reasonable expectations of average daily trading volume?",
question8a: 'A. Please provide a motivated valuation of such security?',
question9: 'Q9. Have you completed the required annual Due Diligence for holdings in collective investment scheme',
question9a: 'A. Please Explain',
question9b: 'B. Please attach copies of Due Diligence conducted for any CIS invested into during the month by the Fund / Portfolio” acceptable format in .pdf only',
question10: 'Q10. Were there Financial Derivatives Instruments (FDI) traded in the Fund / Portfolio during the month?',
question10a: 'A. Are the FDI compliant with the Prospectus, the Guidelines, the RMP (where RMP is the Risk Management Process for FDI), and the Regulations?',
question10ai: 'A(i). Please Explain',
question10b: 'B. Has the Fund / Portfolio been leveraged as a result of the use of the FDI?',
question10bi: 'B(i). Please Explain',
question10c: 'C. Has best execution been considered at all times?',
question10ci: 'c(i). Please Explain',
question11: 'Q11. Has there been any conflict of interest identified that should be brought to the attention of SAMI?',
question11a: 'A. Please Explain',
question12: 'Q12. Have there been any changes in personnel in the Fund / Portfolio management team during the month?',
question12a: 'A. Please provide details of the changes including a summary of experience of the new team member(s)',
question13: 'Q13. If the Fund is S65 approved in South Africa has BN92 been complied with for any marketing material produced?',
question13a: 'A. Please Explain',
submmitted_by: 'This report has been submitted by:',
button: 'Submit',
};
var MOnthlyComplaince = {
title: 'MONTHLY COMPLIANCE STATEMENT',
Add_form_title: 'Add a Compliance Statement for Sanlam Funds',
question1: 'Q1. Investment Mangement Company Name',
question2: 'Q2. Fund / Portfolio Name',
question3: 'Q3. Has the Fund / Portfolio been managed in line with the UCITS and AIF Rules, the Prospectus, and if applicable, the guidelines attached to the IMA and any subsequent amendments, at all times during the month?',
question3a: 'A. Please Explain',
question4: 'Q4. Has there been a breach of any part of the guidelines that is not due to market movements or withdrawals from the Fund / Portfolio?',
question4a: 'A. Have SAMI been advised within 3 business days of the breach that occurred?',
question4ai: 'A(i). Please Explain',
question4b: 'B. Describe the breach type that occurred during the month',
question4c: 'C. Reason for breach ',
question4d: 'D. The corrective steps taken or to be taken',
question4e: 'E. The recovery timeframe for breach',
question4f: 'F. Add another breach?',
question5: 'Q5. Has there been a breach of any part of the guidelines that is due to market movements or withdrawals from the Fund / Portfolio?',
question5a: 'A. Have SAMI been advised within 3 business days of the breach that occurred?',
question5ai: 'A(i). Please Explain',
question5b: 'B. Describe the type of breach that occurred during the month',
question5c: 'C. Reason for breach',
question5d: 'D. The corrective steps taken or to be taken',
question5e: 'E. The recovery timeframe for breach',
question5f: 'F. The size of the exception',
question5g: 'G. Add another breach?',
question6: 'Q6. Are there any Investment / Governance issues relating to the Fund / Portfolio that SAMI should be aware of?',
question6a: 'A. Please Explain',
question7: 'Q7. Have there been any errors, trading or other, that have not been reported for this Fund / Portfolio?',
question7a: 'A. Please Explain',
question8: "Q8. Does the Fund / Portfolio contain any securities that will take more than 60 days to sell based on the Investment Manger's reasonable expectations of average daily trading volume?",
question8a: 'A. Please provide a motivated valuation of such security?',
question9: 'Q9. Have you completed the required annual Due Diligence for holdings in collective investment scheme',
question9a: 'A. Please Explain',
question9b: 'B. Please attach copies of Due Diligence conducted for any CIS invested into during the month by the Fund / Portfolio, acceptable file format in .pdf only',
question10: 'Q10. Were there Financial Derivatives Instruments (FDI) traded in the Fund / Portfolio during the month?',
question10a: 'A. Are the FDI compliant with the Prospectus, the Guidelines, the RMP (where RMP is the Risk Management Process for FDI), and the Regulations?',
question10ai: 'A(i). Please Explain',
question10b: 'B. Has the Fund / Portfolio been leveraged as a result of the use of the FDI?',
question10bi: 'B(i). Please Explain',
question10c: 'C. Has best execution been considered at all times?',
question10ci: 'c(i). Please Explain',
question11: 'Q11. Has there been any conflict of interest identified that should be brought to the attention of SAMI?',
question11a: 'A. Please Explain',
question12: 'Q12. Have there been any changes in personnel in the Fund / Portfolio management team during the month?',
question12a: 'A. Please provide details of the changes including a summary of experience of the new team member(s)',
question13: 'Q13. If the Fund is S65 approved in South Africa has BN92 been complied with for any marketing material produced?',
question13a: 'A. Please Explain',
question14: 'Q14. Have there been any changes in personnel in the Fund / Portfolio management team during the month?',
question14a: 'A. Please provide details of the changes including a summary of experience of the new team member(s)',
question15: 'Q15. If the Fund is S65 approved in South Africa has BN92 been complied with for any marketing material produced?',
question15a: 'A. Please Explain',
submmitted_by: 'This report has been submitted by:',
button: 'Submit',
};
/***/ }),
/***/ "./src/app/model/organisationalEffectiveness.ts":
/*!******************************************************!*\
!*** ./src/app/model/organisationalEffectiveness.ts ***!
\******************************************************/
/*! exports provided: OrganisationalEffectiveness */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OrganisationalEffectiveness", function() { return OrganisationalEffectiveness; });
var OrganisationalEffectiveness = /** @class */ (function () {
function OrganisationalEffectiveness() {
//Resourcing
this.resourceId = '';
}
return OrganisationalEffectiveness;
}());
/***/ }),
/***/ "./src/app/model/simple.ts":
/*!*********************************!*\
!*** ./src/app/model/simple.ts ***!
\*********************************/
/*! exports provided: Simple */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Simple", function() { return Simple; });
var Simple = /** @class */ (function () {
function Simple() {
this.region = 'US_EAST_2';
this.identityPoolId = 'us-east-2=a57c29f0-c5ca-4349-943f-bbf36928d8b0';
this.userPoolId = 'us-east-2_njA3aMgll';
this.clientId = '17jlbkvn69jnpcp5h54rpnc0lk';
this.BucketName = 'sanlamapp-website';
this.accessKeyId = 'AKIAIFII2GHQJOFKJ3EA';
this.secretAccessKey = "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";
this.rekognitionBucket = 'rekognition-pics';
this.albumName = "usercontent";
this.bucketRegion = 'US_EAST_2 ';
this.companyBucket = 'sanlam-website';
this.companyaccessKeyId = 'AKIAJ4Q33Y3VXWYWEITQ';
this.companysecretAccessKey = '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';
this.S3region = 'us-east-2';
this.mancoUser = 'c557b299-bb38-4450-9ff5-211b31d8a689';
//mancoUser:'e41ba14d-3124-4376-81fd-6891a426dbfa',
this.cognito_idp_endpoint = '';
this.cognito_identity_endpoint = '';
this.sts_endpoint = '';
this.s3_endpoint = '';
//title
this.dealing = 'Gratification(s) Request';
}
return Simple;
}());
/***/ }),
/***/ "./src/app/services/auth.service.ts":
/*!******************************************!*\
!*** ./src/app/services/auth.service.ts ***!
\******************************************/
/*! exports provided: AuthService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AuthService", function() { return AuthService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/http */ "./node_modules/@angular/http/fesm5/http.js");
/* harmony import */ var rxjs_add_operator_toPromise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/add/operator/toPromise */ "./node_modules/rxjs-compat/_esm5/add/operator/toPromise.js");
/* harmony import */ var rxjs_add_operator_toPromise__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(rxjs_add_operator_toPromise__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _auth0_angular_jwt__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @auth0/angular-jwt */ "./node_modules/@auth0/angular-jwt/index.js");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _common_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./common.service */ "./src/app/services/common.service.ts");
/* harmony import */ var amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! amazon-cognito-identity-js */ "./node_modules/amazon-cognito-identity-js/es/index.js");
/* harmony import */ var _cognito_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var aws_sdk__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! aws-sdk */ "./node_modules/aws-sdk/lib/browser.js");
/* harmony import */ var aws_sdk__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(aws_sdk__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var aws_sdk_clients_sts__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! aws-sdk/clients/sts */ "./node_modules/aws-sdk/clients/sts.js");
/* harmony import */ var aws_sdk_clients_sts__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(aws_sdk_clients_sts__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var _user_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./user.service */ "./src/app/services/user.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
// const PoolData = {
// UserPoolId: 'eu-west-1_jD9yy0WTX', // Your user pool id here
// ClientId: '70nl5fnpdtgte73t6tqqiv5av4' // Your client id here
// };
var PoolData = {
UserPoolId: _environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].userPoolId,
ClientId: _environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].clientId // Your client id here
};
var userPool = new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__["CognitoUserPool"](PoolData);
var helper = new _auth0_angular_jwt__WEBPACK_IMPORTED_MODULE_3__["JwtHelperService"]();
var AuthService = /** @class */ (function () {
function AuthService(cognitoUtil, common, userService) {
var _this = this;
this.cognitoUtil = cognitoUtil;
this.common = common;
this.userService = userService;
this.headers = new _angular_http__WEBPACK_IMPORTED_MODULE_1__["Headers"]({ 'Content-Type': 'application/json' });
this.onLoginSuccess = function (callback, session) {
// console.log("In authenticateUser onSuccess callback");
aws_sdk__WEBPACK_IMPORTED_MODULE_8__["config"].credentials = _this.cognitoUtil.buildCognitoCreds(session.getIdToken().getJwtToken());
var clientParams = {};
if (_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].sts_endpoint) {
clientParams.endpoint = _environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].sts_endpoint;
}
var sts = new aws_sdk_clients_sts__WEBPACK_IMPORTED_MODULE_9__(clientParams);
sts.getCallerIdentity(function (err, data) {
//console.log("UserLoginService: Successfully set the AWS credentials");
callback.cognitoCallback(null, session);
});
};
this.onLoginError = function (callback, err) {
callback.cognitoCallback(err.message, null);
};
}
// login Api
AuthService.prototype.signinUser = function (username, password, callback) {
var _this = this;
var authenticationData = {
Username: username,
Password: password,
};
var authenticationDetails = new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__["AuthenticationDetails"](authenticationData);
var userData = {
Username: username,
Pool: this.cognitoUtil.getUserPool()
};
var cognitoUser = new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__["CognitoUser"](userData);
cognitoUser.authenticateUser(authenticationDetails, {
newPasswordRequired: function (userAttributes, requiredAttributes) { return callback.cognitoCallback("User needs to set password.", null); },
onSuccess: function (result) {
_this.onLoginSuccess(callback, result);
},
onFailure: function (err) { return _this.onLoginError(callback, err); },
mfaRequired: function (challengeName, challengeParameters) {
callback.handleMFAStep(challengeName, challengeParameters, function (confirmationCode) {
cognitoUser.sendMFACode(confirmationCode, {
onSuccess: function (result) { return _this.onLoginSuccess(callback, result); },
onFailure: function (err) { return _this.onLoginError(callback, err); }
});
});
}
});
};
// resend Password
AuthService.prototype.resend = function (email) {
var userData = {
Username: email,
Pool: this.cognitoUtil.getUserPool()
};
var cognitoUser = new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__["CognitoUser"](userData);
cognitoUser.resendConfirmationCode(function (err, result) {
if (err) {
toastr.error(err.message);
//callback.cognitoCallback(err.message, null);
}
else {
toastr.success("New verification code send successfully", "Success !!!");
//callback.cognitoCallback(null, result);
}
});
};
//confirm User
AuthService.prototype.confirmNewPassword = function (email, verificationCode, password, callback) {
var userData = {
Username: email,
Pool: this.cognitoUtil.getUserPool()
};
var cognitoUser = new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__["CognitoUser"](userData);
cognitoUser.confirmPassword(verificationCode, password, {
onSuccess: function () {
callback.cognitoCallback(null, null);
},
onFailure: function (err) {
callback.cognitoCallback(err.message, null);
}
});
};
// logout Api
AuthService.prototype.logout = function (email) {
this.cognitoUtil.getCurrentUser().signOut();
localStorage.clear();
};
// Authenticated Api
AuthService.prototype.isAuthenticated = function (callback) {
if (callback == null)
throw ("UserLoginService: Callback in isAuthenticated() cannot be null");
var cognitoUser = this.cognitoUtil.getCurrentUser();
if (cognitoUser != null) {
cognitoUser.getSession(function (err, session) {
if (err) {
// console.log("UserLoginService: Couldn't get the session: " + err, err.stack);
callback.isLoggedIn(err, false);
}
else {
//console.log("UserLoginService: Session is " + session.isValid());
callback.isLoggedIn(err, session.isValid());
}
});
}
else {
// console.log("UserLoginService: can't retrieve the current user");
callback.isLoggedIn("Can't retrieve the CurrentUser", false);
}
};
// set New Password api
AuthService.prototype.newPassword = function (newPasswordUser, callback) {
var authenticationData = {
Username: newPasswordUser.username,
Password: newPasswordUser.existingPassword,
};
var authenticationDetails = new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__["AuthenticationDetails"](authenticationData);
var userData = {
Username: newPasswordUser.username,
Pool: this.cognitoUtil.getUserPool()
};
//console.log("UserLoginService: Params set...Authenticating the user");
var cognitoUser = new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__["CognitoUser"](userData);
cognitoUser.authenticateUser(authenticationDetails, {
onSuccess: function (result) {
//console.log('access token + ' + result.getAccessToken().getJwtToken());
callback.cognitoCallback(null, result);
},
onFailure: function (err) {
callback.cognitoCallback(err.message, null);
//alert(err);// User authentication was not successful
},
newPasswordRequired: function (userAttributes, requiredAttributes) {
// userAttributes: authenticationData;
var newPassword = newPasswordUser.password;
// attributesData: object with key as attribute name and value that the user has given.
cognitoUser.completeNewPasswordChallenge(newPassword, requiredAttributes, this);
}
});
};
// Forgot password Api
AuthService.prototype.forgotPassword = function (username, callback) {
var userData = {
Username: username,
Pool: this.cognitoUtil.getUserPool()
};
var cognitoUser = new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__["CognitoUser"](userData);
cognitoUser.forgotPassword({
onSuccess: function () {
},
onFailure: function (err) {
callback.cognitoCallback(err.message, null);
},
inputVerificationCode: function () {
callback.cognitoCallback(null, null);
}
});
};
// Register new user APi
AuthService.prototype.register = function (user, callback) {
var attributeList = [];
var dataEmail = {
Name: 'email',
Value: user.email
};
var dataNickname = {
Name: 'custom:first_name',
Value: user.first_name
};
var datalastname = {
Name: 'custom:last_name',
Value: user.last_name
};
// attributeList.push(new CognitoUserAttribute(dataEmail));
attributeList.push(new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__["CognitoUserAttribute"](dataNickname));
attributeList.push(new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__["CognitoUserAttribute"](datalastname));
attributeList.push(new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__["CognitoUserAttribute"]({
Name: 'custom:user_status',
Value: user.status
}));
attributeList.push(new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__["CognitoUserAttribute"]({
Name: 'custom:user_role',
Value: user.role
}));
this.cognitoUtil.getUserPool().signUp(user.email, user.password, attributeList, null, function (err, result) {
if (err) {
callback.cognitoCallback(err.message, null);
}
else {
//console.log("UserRegistrationService: registered user is " + result);
callback.cognitoCallback(null, result);
}
});
};
AuthService.prototype.confirms = function (user, callback) {
var userData = {
Username: user.username,
Pool: userPool
};
var cognitoUser = new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__["CognitoUser"](userData);
cognitoUser.confirmRegistration(user.existingPassword, true, function (err, result) {
if (err) {
callback.cognitoCallback(err.message, null);
}
else {
callback.cognitoCallback(null, result);
}
});
};
// Get Attribute for localStorage
AuthService.prototype.getParameters = function () {
var cognitoUser = this.cognitoUtil.getCurrentUser();
if (cognitoUser != null) {
cognitoUser.getSession(function (err, session) {
if (err) {
//console.log(err);
}
else {
cognitoUser.getUserAttributes(function (err, result) {
if (err) {
//console.log("UserParametersService: in getParameters: " + err);
}
else {
//console.log(result);
sessionStorage.setItem('total_details', JSON.stringify(result));
for (var i = 0; i < result.length; i++) {
localStorage.setItem(result[i].getName(), result[i].getValue());
}
// this.userService.getUserData(result);
// this.userService.user = localStorage.getItem('custom:first_name');
//callback.callbackWithParam(result);
}
return true;
});
}
});
}
else {
//callback.callbackWithParam(null);
}
return true;
};
// Get Attribute
AuthService.prototype.getUserParameters = function (callback) {
var cognitoUser = this.cognitoUtil.getCurrentUser();
if (cognitoUser != null) {
cognitoUser.getSession(function (err, session) {
if (err) {
//console.log(err);
}
else {
cognitoUser.getUserAttributes(function (err, result) {
if (err) {
//console.log("UserParametersService: in getParameters: " + err);
}
else {
callback.cognitoCallback(null, result);
}
return true;
});
}
});
}
else {
//callback.callbackWithParam(null);
}
return true;
};
/*********************Get current attribute *****************************/
AuthService.prototype.getCurrentUserData = function () {
var UserData = [];
var cognitoUser = this.cognitoUtil.getCurrentUser();
if (cognitoUser != null) {
cognitoUser.getSession(function (err, session) {
if (err) {
//console.log(err);
}
else {
cognitoUser.getUserAttributes(function (err, result) {
if (err) {
// console.log(err);
}
else {
return result;
}
});
}
});
}
else {
//callback.callbackWithParam(null);
}
};
/**********************Update Profile By User ******************************/
AuthService.prototype.update = function (user, callback) {
var attributeList = [];
var dataNickname = {
Name: 'custom:first_name',
Value: user.first_name
};
var datalastname = {
Name: 'custom:last_name',
Value: user.last_name
};
var userRole = {
Name: 'custom:user_role',
Value: user.user_role
};
attributeList.push(new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__["CognitoUserAttribute"](userRole));
//attributeList.push(new CognitoUserAttribute(dataEmail));
attributeList.push(new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__["CognitoUserAttribute"](dataNickname));
attributeList.push(new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__["CognitoUserAttribute"](datalastname));
if (user.profile_picture != '') {
var dataProfile = {
Name: 'profile',
Value: user.profile_picture
};
attributeList.push(new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__["CognitoUserAttribute"](dataProfile));
}
var cognitoUser = this.cognitoUtil.getCurrentUser();
if (cognitoUser != null) {
cognitoUser.getSession(function (err, session) {
if (err) {
callback.cognitoCallback(err.message, null);
// console.log("UserParametersService: Couldn't retrieve the user");
}
else {
cognitoUser.updateAttributes(attributeList, function (err, result) {
if (err) {
callback.cognitoCallback(err.message, null);
}
localStorage.setItem("custom:first_name", user.first_name);
localStorage.setItem("custom:last_name", user.last_name);
if (user.profile_picture != null && user.profile_picture != '') {
localStorage.setItem("profile", user.profile_picture);
}
callback.cognitoCallback(null, result);
});
}
});
}
else {
//callback.callbackWithParam(null);
}
};
AuthService.prototype.changePassword = function (oldPassword, newPassword, confirm_pass, callback) {
var cognitoUser = this.cognitoUtil.getCurrentUser();
if (cognitoUser != null) {
cognitoUser.getSession(function (err, session) {
if (err) {
callback.cognitoCallback(err.message, null);
}
else {
cognitoUser.changePassword(oldPassword, newPassword, function (err, result) {
if (err) {
callback.cognitoCallback(err.message, null);
}
else {
callback.cognitoCallback(null, result);
}
});
}
});
}
};
AuthService.prototype.newRegister = function (user, callback) {
aws_sdk__WEBPACK_IMPORTED_MODULE_8__["config"].region = 'eu-west-1';
aws_sdk__WEBPACK_IMPORTED_MODULE_8__["config"].credentials = new aws_sdk__WEBPACK_IMPORTED_MODULE_8__["CognitoIdentityCredentials"]({
IdentityPoolId: 'eu-west-1:8066c156-57e3-4f14-ace0-65ba8a3dd846'
});
var params = {
UserPoolId: 'eu-west-1_jD9yy0WTX',
Username: user.email,
DesiredDeliveryMediums: [
'EMAIL',
],
ForceAliasCreation: false,
MessageAction: 'SUPPRESS',
TemporaryPassword: user.password,
UserAttributes: [
{
Name: 'email',
Value: user.email
},
{
Name: 'custom:user_status',
Value: user.status
},
{
Name: 'custom:last_name',
Value: user.last_name
},
{
Name: 'custom:user_status',
Value: user.status
},
{
Name: 'custom:user_role',
Value: user.role
},
],
ValidationData: [
{
Name: 'email',
Value: user.email
},
]
};
var cognitoidentityserviceprovider = new aws_sdk__WEBPACK_IMPORTED_MODULE_8__["CognitoIdentityServiceProvider"]({ apiVersion: '2016-04-18' });
cognitoidentityserviceprovider.adminCreateUser(params, function (err, data) {
if (err)
console.log(err, err.stack); // an error occurred
else
console.log(data); // successful response
});
};
AuthService.prototype.getCognitoUserlist = function () {
aws_sdk__WEBPACK_IMPORTED_MODULE_8__["config"].update({
region: "eu-west-1"
});
// const cognitoIdentityService = new AWS.CognitoIdentityServiceProvider(
// { apiVersion: '2016-04-19', region: 'eu-west-1' }
// );
//let cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider({ apiVersion: '2016-04-18' });
var UserPoolId = "eu-west-1_jD9yy0WTX";
// var params = {
// "AttributeToGet":['email','custom:first_name','custom:last_name','custom:user_role','profile'],
// "Filter" : '',
// "Limit": 10,
// "PaginationToken": " ",
// "UserPoolId": UserPoolId
// }
// cognitoidentityserviceprovider.listUsers(params, (err, data) => {
// if (!err) {
// console.log('Successfull...');
// console.log(JSON.stringify(data));
// } else {
// console.log('Error...');
// console.log(JSON.stringify(err));
// }
// });
aws_sdk__WEBPACK_IMPORTED_MODULE_8__["config"].region = 'eu-west-1';
aws_sdk__WEBPACK_IMPORTED_MODULE_8__["config"].credentials = new aws_sdk__WEBPACK_IMPORTED_MODULE_8__["CognitoIdentityCredentials"]({
IdentityPoolId: _environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].identityPoolId
});
var params = {
UserPoolId: _environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].userPoolId,
AttributesToGet: ['email', 'custom:first_name', 'custom:last_name', 'custom:user_role', 'profile'],
Filter: "",
Limit: 10
};
var cognito = new aws_sdk__WEBPACK_IMPORTED_MODULE_8__["CognitoIdentityServiceProvider"]({ apiVersion: '2016-04-18' });
cognito.listUsers(params, function (err, data) {
if (err)
console.log(err, err.stack); // an error occurred
else
return data; // successful response
});
};
//**** Admin change adminUpdateUserAttributes */
AuthService.prototype.AdminChageAttr = function (user, callback) {
var params = {
UserAttributes: [
{
Name: 'email',
Value: user.mail
},
{
Name: 'custom:user_status',
Value: user.status
},
{
Name: 'custom:last_name',
Value: user.lastname
},
{
Name: 'custom:custom:first_name',
Value: user.firstname
},
{
Name: 'custom:user_status',
Value: user.status
},
{
Name: 'custom:user_role',
Value: user.role
},
],
UserPoolId: 'eu-west-1_jD9yy0WTX',
Username: user.mail /* required */
};
var cognito = new aws_sdk__WEBPACK_IMPORTED_MODULE_8__["CognitoIdentityServiceProvider"]({ apiVersion: '2016-04-18' });
cognito.adminUpdateUserAttributes(params, function (err, data) {
if (err)
console.log(err, err.stack);
else
console.log(data);
callback.cognitoCallback(null, data);
});
};
AuthService.prototype.updateAtrbyADmin = function (user, callback) {
var attributeList = [];
var dataNickname = {
Name: 'custom:first_name',
Value: user.first_name
};
var datalastname = {
Name: 'custom:last_name',
Value: user.last_name
};
var userRole = {
Name: 'custom:user_role',
Value: user.user_role
};
attributeList.push(new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__["CognitoUserAttribute"](userRole));
// attributeList.push(new CognitoUserAttribute(dataEmail));
attributeList.push(new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__["CognitoUserAttribute"](dataNickname));
attributeList.push(new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_6__["CognitoUserAttribute"](datalastname));
// if (user.profile_picture != '') {
// let dataProfile = {
// Name: 'profile',
// Value: user.profile_picture
// }
// attributeList.push(new CognitoUserAttribute(dataProfile));
// }
var cognitoUser = this.cognitoUtil.getCurrentUser();
if (cognitoUser != null) {
cognitoUser.getSession(function (err, session) {
if (err) {
callback.cognitoCallback(err.message, null);
// console.log("UserParametersService: Couldn't retrieve the user");
}
else {
cognitoUser.updateAttributes(attributeList, function (err, result) {
if (err) {
callback.cognitoCallback(err.message, null);
}
localStorage.setItem("custom:first_name", user.first_name);
localStorage.setItem("custom:last_name", user.last_name);
if (user.profile_picture != null && user.profile_picture != '') {
localStorage.setItem("profile", user.profile_picture);
}
callback.cognitoCallback(null, result);
});
}
});
}
else {
//callback.callbackWithParam(null);
}
};
AuthService.prototype.AdminUserDeleteUser = function (user, callback) {
aws_sdk__WEBPACK_IMPORTED_MODULE_8__["config"].accessKeyId = _environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].accessKeyId;
aws_sdk__WEBPACK_IMPORTED_MODULE_8__["config"].secretAccessKey = _environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].secretAccessKey;
aws_sdk__WEBPACK_IMPORTED_MODULE_8__["config"].region = 'eu-west-1';
var params = {
UserPoolId: _environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].userPoolId,
Username: user.Userid,
};
var cognitoidentityserviceprovider = new aws_sdk__WEBPACK_IMPORTED_MODULE_8__["CognitoIdentityServiceProvider"]();
cognitoidentityserviceprovider.adminDeleteUser(params, function (err, data) {
if (err) {
callback.cognitoCallback(err.message, null);
}
else {
callback.cognitoCallback(null, data);
}
});
};
AuthService.prototype.AdminUserUpdate = function (userDetails, callback) {
// AWS.config.accessKeyId = environment.accessKeyId;
// AWS.config.secretAccessKey = environment.secretAccessKey;
// AWS.config.region = 'eu-west-1';
var params = {
UserAttributes: [
{
Name: 'custom:user_role',
Value: userDetails.user_role
},
{
Name: 'custom:last_name',
Value: userDetails.last_name
},
{
Name: 'custom:first_name',
Value: userDetails.first_name
},
{
Name: 'email',
Value: userDetails.email
}, {
Name: 'custom:user_status',
Value: userDetails.status
}
/* more items */
],
UserPoolId: _environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].userPoolId,
Username: userDetails.Userid,
};
// console.log(params)
aws_sdk__WEBPACK_IMPORTED_MODULE_8__["config"].accessKeyId = _environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].accessKeyId;
aws_sdk__WEBPACK_IMPORTED_MODULE_8__["config"].secretAccessKey = _environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].secretAccessKey;
aws_sdk__WEBPACK_IMPORTED_MODULE_8__["config"].region = 'eu-west-1';
var cognitoidentityserviceprovider = new aws_sdk__WEBPACK_IMPORTED_MODULE_8__["CognitoIdentityServiceProvider"]({ apiVersion: '2016-04-18' });
console.log(cognitoidentityserviceprovider);
cognitoidentityserviceprovider.adminUpdateUserAttributes(params, function (err, data) {
if (err) {
console.log(err);
callback.cognitoCallback(err.message, null);
}
else {
callback.cognitoCallback(null, data);
}
});
};
AuthService = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
providedIn: 'root'
}),
__metadata("design:paramtypes", [_cognito_service__WEBPACK_IMPORTED_MODULE_7__["CognitoUtil"],
_common_service__WEBPACK_IMPORTED_MODULE_5__["CommonService"],
_user_service__WEBPACK_IMPORTED_MODULE_10__["UserService"]])
], AuthService);
return AuthService;
}());
/***/ }),
/***/ "./src/app/services/awsservices/authorization.service.ts":
/*!***************************************************************!*\
!*** ./src/app/services/awsservices/authorization.service.ts ***!
\***************************************************************/
/*! exports provided: AuthorizationService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AuthorizationService", function() { return AuthorizationService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! amazon-cognito-identity-js */ "./node_modules/amazon-cognito-identity-js/es/index.js");
/* harmony import */ var rxjs_Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/Observable */ "./node_modules/rxjs-compat/_esm5/Observable.js");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../environments/environment */ "./src/environments/environment.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var poolData = {
UserPoolId: _environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].userPoolId,
ClientId: _environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].clientId // Your client id here
};
var userPool = new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_1__["CognitoUserPool"](poolData);
var AuthorizationService = /** @class */ (function () {
function AuthorizationService() {
}
AuthorizationService.prototype.register = function (user, email, password) {
var _this = this;
var attributeList = [];
return rxjs_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"].create(function (observer) {
userPool.signUp(email, password, attributeList, null, function (err, result) {
if (err) {
console.log("signUp error", err);
observer.error(err);
}
_this.cognitoUser = result.user;
console.log("signUp success", result);
observer.next(result);
observer.complete();
});
});
};
AuthorizationService.prototype.confirmAuthCode = function (code) {
var user = {
Username: this.cognitoUser.username,
Pool: userPool
};
return rxjs_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"].create(function (observer) {
var cognitoUser = new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_1__["CognitoUser"](user);
cognitoUser.confirmRegistration(code, true, function (err, result) {
if (err) {
console.log(err);
observer.error(err);
}
console.log("confirmAuthCode() success", result);
observer.next(result);
observer.complete();
});
});
};
AuthorizationService.prototype.signIn = function (email, password) {
var authenticationData = {
Username: email,
Password: password,
};
var authenticationDetails = new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_1__["AuthenticationDetails"](authenticationData);
var userData = {
Username: email,
Pool: userPool
};
var cognitoUser = new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_1__["CognitoUser"](userData);
return rxjs_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"].create(function (observer) {
cognitoUser.authenticateUser(authenticationDetails, {
onSuccess: function (result) {
//console.log(result);
observer.next(result);
observer.complete();
},
onFailure: function (err) {
console.log(err);
observer.error(err);
},
});
});
};
AuthorizationService.prototype.isLoggedIn = function () {
return userPool.getCurrentUser() != null;
};
AuthorizationService.prototype.getAuthenticatedUser = function () {
// gets the current user from the local storage
return userPool.getCurrentUser();
};
AuthorizationService.prototype.logOut = function () {
this.getAuthenticatedUser().signOut();
this.cognitoUser = null;
};
AuthorizationService = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
providedIn: 'root'
}),
__metadata("design:paramtypes", [])
], AuthorizationService);
return AuthorizationService;
}());
/***/ }),
/***/ "./src/app/services/cognito.service.ts":
/*!*********************************************!*\
!*** ./src/app/services/cognito.service.ts ***!
\*********************************************/
/*! exports provided: CognitoUtil, CognitoService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CognitoUtil", function() { return CognitoUtil; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CognitoService", function() { return CognitoService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! amazon-cognito-identity-js */ "./node_modules/amazon-cognito-identity-js/es/index.js");
/* harmony import */ var aws_sdk_global__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! aws-sdk/global */ "./node_modules/aws-sdk/browser.js");
/* harmony import */ var aws_sdk_global__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(aws_sdk_global__WEBPACK_IMPORTED_MODULE_3__);
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 CognitoUtil = /** @class */ (function () {
function CognitoUtil() {
}
CognitoUtil_1 = CognitoUtil;
CognitoUtil.prototype.getCurrentUser = function () {
return this.getUserPool().getCurrentUser();
};
CognitoUtil.prototype.getUserPool = function () {
if (_environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].cognito_idp_endpoint) {
CognitoUtil_1._POOL_DATA.endpoint = _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].cognito_idp_endpoint;
}
return new amazon_cognito_identity_js__WEBPACK_IMPORTED_MODULE_2__["CognitoUserPool"](CognitoUtil_1._POOL_DATA);
};
CognitoUtil.prototype.setCognitoCreds = function (creds) {
this.cognitoCreds = creds;
};
CognitoUtil.prototype.getCognitoCreds = function () {
return this.cognitoCreds;
};
CognitoUtil.prototype.buildCognitoCreds = function (idTokenJwt) {
var url = 'cognito-idp.' + CognitoUtil_1._REGION.toLowerCase() + '.amazonaws.com/' + CognitoUtil_1._USER_POOL_ID;
if (_environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].cognito_idp_endpoint) {
url = _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].cognito_idp_endpoint + '/' + CognitoUtil_1._USER_POOL_ID;
}
var logins = {};
logins[url] = idTokenJwt;
var params = {
IdentityPoolId: CognitoUtil_1._IDENTITY_POOL_ID,
Logins: logins
};
var serviceConfigs = {};
if (_environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].cognito_identity_endpoint) {
serviceConfigs.endpoint = _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].cognito_identity_endpoint;
}
var creds = new aws_sdk_global__WEBPACK_IMPORTED_MODULE_3__["CognitoIdentityCredentials"](params, serviceConfigs);
this.setCognitoCreds(creds);
return creds;
};
CognitoUtil.prototype.getCognitoIdentity = function () {
return this.cognitoCreds.identityId;
};
CognitoUtil.prototype.getAccessToken = function (callback) {
if (callback == null) {
throw ("CognitoUtil: callback in getAccessToken is null...returning");
}
if (this.getCurrentUser() != null) {
this.getCurrentUser().getSession(function (err, session) {
if (err) {
console.log("CognitoUtil: Can't set the credentials:" + err);
callback.callbackWithParam(null);
}
else {
if (session.isValid()) {
callback.callbackWithParam(session.getAccessToken().getJwtToken());
}
}
});
}
else {
callback.callbackWithParam(null);
}
};
CognitoUtil.prototype.getIdToken = function (callback) {
if (callback == null) {
throw ("CognitoUtil: callback in getIdToken is null...returning");
}
if (this.getCurrentUser() != null)
this.getCurrentUser().getSession(function (err, session) {
if (err) {
console.log("CognitoUtil: Can't set the credentials:" + err);
callback.callbackWithParam(null);
}
else {
if (session.isValid()) {
callback.callbackWithParam(session.getIdToken().getJwtToken());
}
else {
console.log("CognitoUtil: Got the id token, but the session isn't valid");
}
}
});
else
callback.callbackWithParam(null);
};
CognitoUtil.prototype.getRefreshToken = function (callback) {
if (callback == null) {
throw ("CognitoUtil: callback in getRefreshToken is null...returning");
}
if (this.getCurrentUser() != null)
this.getCurrentUser().getSession(function (err, session) {
if (err) {
console.log("CognitoUtil: Can't set the credentials:" + err);
callback.callbackWithParam(null);
}
else {
if (session.isValid()) {
callback.callbackWithParam(session.getRefreshToken());
}
}
});
else
callback.callbackWithParam(null);
};
CognitoUtil.prototype.refresh = function () {
this.getCurrentUser().getSession(function (err, session) {
if (err) {
console.log("CognitoUtil: Can't set the credentials:" + err);
}
else {
if (session.isValid()) {
console.log("CognitoUtil: refreshed successfully");
}
else {
console.log("CognitoUtil: refreshed but session is still not valid");
}
}
});
};
CognitoUtil._REGION = _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].region;
CognitoUtil._IDENTITY_POOL_ID = _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].identityPoolId;
CognitoUtil._USER_POOL_ID = _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].userPoolId;
CognitoUtil._CLIENT_ID = _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].clientId;
CognitoUtil._POOL_DATA = {
UserPoolId: CognitoUtil_1._USER_POOL_ID,
ClientId: CognitoUtil_1._CLIENT_ID
};
CognitoUtil = CognitoUtil_1 = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])()
], CognitoUtil);
return CognitoUtil;
var CognitoUtil_1;
}());
var CognitoService = /** @class */ (function () {
function CognitoService() {
}
return CognitoService;
}());
/***/ }),
/***/ "./src/app/services/common.service.ts":
/*!********************************************!*\
!*** ./src/app/services/common.service.ts ***!
\********************************************/
/*! exports provided: CommonService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommonService", function() { return CommonService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/http */ "./node_modules/@angular/http/fesm5/http.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var rxjs_add_operator_map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs/add/operator/map */ "./node_modules/rxjs-compat/_esm5/add/operator/map.js");
/* harmony import */ var rxjs_add_operator_catch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs/add/operator/catch */ "./node_modules/rxjs-compat/_esm5/add/operator/catch.js");
/* harmony import */ var rxjs_add_observable_forkJoin__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs/add/observable/forkJoin */ "./node_modules/rxjs-compat/_esm5/add/observable/forkJoin.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.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);
};
// RxJS 6 syntax
var httpOptions = {
headers: new _angular_common_http__WEBPACK_IMPORTED_MODULE_3__["HttpHeaders"]({
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET,POST,OPTIONS,DELETE,PUT'
})
};
var CommonService = /** @class */ (function () {
function CommonService(http, httpmodle) {
this.http = http;
this.httpmodle = httpmodle;
this.data = {};
this.auth = sessionStorage.getItem('token');
this.headers = new _angular_http__WEBPACK_IMPORTED_MODULE_2__["Headers"]({ 'Content-Type': 'application/json' });
this.CompanyFundRiskApiUrl = _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].APIUrl;
this.FundRiskApiUrl = _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].APIUrl;
}
CommonService.prototype.__header = function () {
var headers = new _angular_common_http__WEBPACK_IMPORTED_MODULE_3__["HttpHeaders"]().set('Content-Type', 'application/json');
headers.set('Access-Control-Allow-Origin', '*');
//headers.set('Access-Control-Request-Headers','https://ubxedyp7t8.execute-api.us-east-2.amazonaws.com');
// headers.set('Access-Control-Request-Method','https://sazkza0nue.execute-api.us-east-2.amazonaws.com')
headers.set('Access-Control-Allow-Headers', 'Content-Type');
headers.set('Access-Control-Allow-Methods', 'GET,POST,OPTIONS,DELETE,PUT');
headers.set('accesstoken', this.auth);
return headers;
};
/************Fund Risk Api***********/
CommonService.prototype.saveFundRiskData = function (message) {
var headers = new _angular_http__WEBPACK_IMPORTED_MODULE_2__["Headers"]();
// headers.append( "Content-Type", "application/json" );
headers.append("Access-Control-Allow-Origin", "*");
// headers.append("Access-Control-Allow-Headers", "Content-Type");
headers.append("Access-Control-Allow-Methods", "GET,POST,OPTIONS,DELETE,PUT");
headers.append("accesstoken", localStorage.getItem("token")); // Access token
headers.append("Auth", sessionStorage.getItem("Authorization")); // AUTHORIZATION
var url = this.FundRiskApiUrl + "/savefundrisk";
return this.httpmodle.post(url, message, { headers: headers }).catch(this.handleErrorPromise);
};
CommonService.prototype.AccessDenied = function (message) {
var url = "https://wxnrr120t0.execute-api.us-east-2.amazonaws.com/Prod/savefundrisk";
return this.http.post(url, message, { headers: this.__header() }).catch(this.handleErrorPromise);
};
CommonService.prototype.getUserDataByloop = function (message) {
var url = this.FundRiskApiUrl + "/savefundrisk";
return this.http.post(url, message, { observe: 'response' }).catch(this.handleErrorPromise);
};
CommonService.prototype.GetUserdataBYheaders = function (message) {
var headers = new _angular_http__WEBPACK_IMPORTED_MODULE_2__["Headers"]();
// headers.append( "Content-Type", "application/json" );
headers.append("Access-Control-Allow-Origin", "*");
// headers.append("Access-Control-Allow-Headers", "Content-Type");
headers.append("Access-Control-Allow-Methods", "GET,POST,OPTIONS,DELETE,PUT");
headers.append("accesstoken", localStorage.getItem("token")); // Access token
headers.append("Auth", sessionStorage.getItem("Authorization")); // AUTHORIZATION
var url = this.FundRiskApiUrl + "/savefundrisk";
return this.httpmodle.post(url, message, { headers: headers }).catch(this.handleErrorPromise);
};
CommonService.prototype.handleErrorPromise = function (error) {
console.error(error.message || error);
// toastr.error('Internal Server Error','Error!!');
// console.clear();
return Promise.reject(error.message || error);
};
CommonService.prototype.requestDataFromMultipleSources = function (data) {
var headers = new _angular_http__WEBPACK_IMPORTED_MODULE_2__["Headers"]();
// headers.append( "Content-Type", "application/json" );
headers.append("Access-Control-Allow-Origin", "*");
// headers.append("Access-Control-Allow-Headers", "Content-Type");
headers.append("Access-Control-Allow-Methods", "GET,POST,OPTIONS,DELETE,PUT");
headers.append("accesstoken", localStorage.getItem("token")); // Access token
headers.append("Auth", sessionStorage.getItem("Authorization")); // AUTHORIZATION
var url = this.FundRiskApiUrl + "/savefundrisk";
// var FirstAPI = {
// 'action': data['action'],
// 'year': data['year'],
// };
// var Second = {
// action: data["actionAllUser"],
// };;
// var third = {
// action: data['actionForComment'],
// };
var FirstAPI = data[0];
var Second = data[1];
var third = data[2];
var moduleData = this.httpmodle.post(url, FirstAPI, { headers: headers }).catch(this.handleErrorPromise);
var CommentData = this.httpmodle.post(url, Second, { headers: headers }).catch(this.handleErrorPromise);
var FileData = this.httpmodle.post(url, third, { headers: headers }).catch(this.handleErrorPromise);
// Observable.forkJoin (RxJS 5) changes to just forkJoin() in RxJS 6
return Object(rxjs__WEBPACK_IMPORTED_MODULE_7__["forkJoin"])([moduleData, CommentData, FileData]);
};
CommonService.prototype.GetMultipleResult = function (data) {
var headers = new _angular_http__WEBPACK_IMPORTED_MODULE_2__["Headers"]();
// headers.append( "Content-Type", "application/json" );
headers.append("Access-Control-Allow-Origin", "*");
// headers.append("Access-Control-Allow-Headers", "Content-Type");
headers.append("Access-Control-Allow-Methods", "GET,POST,OPTIONS,DELETE,PUT");
headers.append("accesstoken", localStorage.getItem("token")); // Access token
headers.append("Auth", sessionStorage.getItem("Authorization")); // AUTHORIZATION
var url = this.FundRiskApiUrl + "/savefundrisk";
var moduleData = this.httpmodle.post(url, data[0], { headers: headers }).map(this.extractData).catch(this.handleErrorPromise);
var CommentData = this.httpmodle.post(url, data[1], { headers: headers }).map(this.extractData).catch(this.handleErrorPromise);
var FileData = this.httpmodle.post(url, data[2], { headers: headers }).map(this.extractData).catch(this.handleErrorPromise);
var ReviewData = this.httpmodle.post(url, data[3], { headers: headers }).map(this.extractData).catch(this.handleErrorPromise);
return Object(rxjs__WEBPACK_IMPORTED_MODULE_7__["forkJoin"])([moduleData, CommentData, FileData, ReviewData]);
};
CommonService.prototype.GettripleResult = function (data) {
var headers = new _angular_http__WEBPACK_IMPORTED_MODULE_2__["Headers"]();
// headers.append( "Content-Type", "application/json" );
headers.append("Access-Control-Allow-Origin", "*");
// headers.append("Access-Control-Allow-Headers", "Content-Type");
headers.append("Access-Control-Allow-Methods", "GET,POST,OPTIONS,DELETE,PUT");
headers.append("accesstoken", localStorage.getItem("token")); // Access token
headers.append("Auth", sessionStorage.getItem("Authorization")); // AUTHORIZATION
var url = this.FundRiskApiUrl + "/savefundrisk";
var moduleData = this.httpmodle.post(url, data[0], { headers: headers }).map(this.extractData).catch(this.handleErrorPromise);
var CommentData = this.httpmodle.post(url, data[1], { headers: headers }).map(this.extractData).catch(this.handleErrorPromise);
var FileData = this.httpmodle.post(url, data[2], { headers: headers }).map(this.extractData).catch(this.handleErrorPromise);
return Object(rxjs__WEBPACK_IMPORTED_MODULE_7__["forkJoin"])([moduleData, CommentData, FileData,]);
};
CommonService.prototype.GetTwoAPiResult = function (data) {
var headers = new _angular_http__WEBPACK_IMPORTED_MODULE_2__["Headers"]();
// headers.append( "Content-Type", "application/json" );
headers.append("Access-Control-Allow-Origin", "*");
// headers.append("Access-Control-Allow-Headers", "Content-Type");
headers.append("Access-Control-Allow-Methods", "GET,POST,OPTIONS,DELETE,PUT");
headers.append("accesstoken", localStorage.getItem("token")); // Access token
headers.append("Auth", sessionStorage.getItem("Authorization")); // AUTHORIZATION
var url = this.FundRiskApiUrl + "/savefundrisk";
var moduleData = this.httpmodle.post(url, data[0], { headers: headers }).map(this.extractData).catch(this.handleErrorPromise);
var CommentData = this.httpmodle.post(url, data[1], { headers: headers }).map(this.extractData).catch(this.handleErrorPromise);
return Object(rxjs__WEBPACK_IMPORTED_MODULE_7__["forkJoin"])([moduleData, CommentData]);
};
//For single Data
CommonService.prototype.SubmitData = function (data) {
var headers = new _angular_http__WEBPACK_IMPORTED_MODULE_2__["Headers"]();
// headers.append( "Content-Type", "application/json" );
headers.append("Access-Control-Allow-Origin", "*");
// headers.append("Access-Control-Allow-Headers", "Content-Type");
headers.append("Access-Control-Allow-Methods", "GET,POST,OPTIONS,DELETE,PUT");
headers.append("accesstoken", localStorage.getItem("token")); // Access token
headers.append("Auth", sessionStorage.getItem("Authorization")); // AUTHORIZATION
var url = this.FundRiskApiUrl + "/savefundrisk";
var returnData = this.httpmodle.post(url, data, { headers: headers }).map(this.extractData).catch(this.handleErrorPromise);
return returnData;
};
CommonService.prototype.extractData = function (res) {
var body = res.json();
return body || {};
};
CommonService.prototype.PasharingMOdule = function (data) {
//let headers = new Headers();
// headers.append("Access-Control-Allow-Origin", "*");
// headers.append("Access-Control-Allow-Methods", "GET,POST,OPTIONS,DELETE,PUT");
// headers.append("accesstoken", localStorage.getItem("token"));// Access token
// headers.append("Auth", sessionStorage.getItem("Authorization"));// AUTHORIZATION
// headers.append('Content-Type', 'application/json');
var url = _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].newAPIURL + data['LastUrl'];
return this.http.post(url, JSON.stringify(data), httpOptions);
};
CommonService.prototype.GetData = function (data) {
//let headers = new Headers();
// headers.append("Access-Control-Allow-Origin", "*");
// headers.append("Access-Control-Allow-Methods", "GET,POST,OPTIONS,DELETE,PUT");
// headers.append("accesstoken", localStorage.getItem("token"));// Access token
// headers.append("Auth", sessionStorage.getItem("Authorization"));// AUTHORIZATION
// headers.append('Content-Type', 'application/json');
var url = _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].newAPIURL + data['LastUrl'];
return this.http.get(url, httpOptions);
};
CommonService.prototype.Get = function (data) {
var headerss = new _angular_http__WEBPACK_IMPORTED_MODULE_2__["Headers"]();
headerss.append("Access-Control-Allow-Origin", "*");
headerss.append("Access-Control-Allow-Headers", "Content-Type");
headerss.append("Access-Control-Allow-Methods", "GET,POST,OPTIONS,DELETE,PUT");
headerss.append("accesstoken", localStorage.getItem("token")); // Access token
headerss.append("Auth", sessionStorage.getItem("Authorization")); // AUTHORIZATION
headerss.append("Content-Type", "application/json");
var url = data["LastUrl"];
return this.http.get(url, httpOptions);
};
CommonService.prototype.Post = function (data) {
var headerss = new _angular_http__WEBPACK_IMPORTED_MODULE_2__["Headers"]();
headerss.append("Access-Control-Allow-Origin", "*");
headerss.append("Access-Control-Allow-Methods", "GET,POST,OPTIONS,DELETE,PUT");
headerss.append("accesstoken", localStorage.getItem("token")); // Access token
headerss.append("Auth", sessionStorage.getItem("Authorization")); // AUTHORIZATION
headerss.append("Content-Type", "application/json");
var url = data["LastUrl"];
// console.log("Send data ");
// console.log(data);
// console.log("Send data with json formate");
// console.log(JSON.stringify(data));
return this.http.post(url, JSON.stringify(data), httpOptions);
};
CommonService = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
providedIn: 'root'
}),
__metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_3__["HttpClient"], _angular_http__WEBPACK_IMPORTED_MODULE_2__["Http"]])
], CommonService);
return CommonService;
}());
/***/ }),
/***/ "./src/app/services/exportservices.service.ts":
/*!****************************************************!*\
!*** ./src/app/services/exportservices.service.ts ***!
\****************************************************/
/*! exports provided: ExportservicesService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExportservicesService", function() { return ExportservicesService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.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 jsPDF = __webpack_require__(/*! jspdf */ "./node_modules/jspdf/dist/jspdf.min.js");
__webpack_require__(/*! jspdf-autotable */ "./node_modules/jspdf-autotable/dist/jspdf.plugin.autotable.js");
var ExportservicesService = /** @class */ (function () {
function ExportservicesService() {
}
// function for download data for pdf formate
ExportservicesService.prototype.DownloadChat = function (value) {
var columns = value['column'];
var rows = value['data'];
var doc = new jsPDF("p", "pt");
doc.setFontSize(20);
doc.text(30, 30, 'Pa sharing data');
console.log(columns);
console.log(rows);
doc.autoTable(columns, rows, {
columnStyles: {
0: { columnWidth: 150 },
1: { columnWidth: 90, overflow: "linebreak" },
2: { columnWidth: 90, overflow: "linebreak" },
3: { overflow: "linebreak" }
},
margin: { top: 50, left: 20, right: 20, bottom: 0 },
drawHeaderCell: function (cell, data) {
if (cell.raw === "Name") {
//paint.Name header red
cell.styles.fontSize = 15;
cell.styles.textColor = [255, 0, 0];
}
else {
cell.styles.textColor = 255;
cell.styles.fontSize = 10;
}
},
createdCell: function (cell, data) { }
});
doc.save('asdasd' + ".pdf");
};
ExportservicesService = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
providedIn: 'root'
}),
__metadata("design:paramtypes", [])
], ExportservicesService);
return ExportservicesService;
}());
/***/ }),
/***/ "./src/app/services/user.service.ts":
/*!******************************************!*\
!*** ./src/app/services/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 _cognito_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cognito.service */ "./src/app/services/cognito.service.ts");
/* harmony import */ var _common_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./common.service */ "./src/app/services/common.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var UserService = /** @class */ (function () {
function UserService(cognitoUtil, common
// private Regulatory : RegulatorycomplianceComponent,
// private fund : FundRiskComponent,
// private Internal : InternalAuditComponent,
// private dist : DistributionComponent,
// private invest : InvestmentmanagementComponent,
// private capital : CapitalFinancialComponent,
// private opera :OperationalRiskComponent,
// private org : OrganisationComponent,
// private resourcing:ResourcingComponent,
) {
this.cognitoUtil = cognitoUtil;
this.common = common;
this.user = [];
this.time = [];
this.IMCOList = [];
this.MancoHead = [];
this.Director = [];
}
UserService.prototype.getData = function (result) {
for (var i = 0; i < result.length; i++) {
// this.user.push(result[i].getName(), result[i].getValue());
this.user.push(result[i].getName(), result[i].getValue());
}
return true;
};
UserService.prototype.CallReviw = function () {
alert('hello');
;
//return this.Regulatory.CallReviw();
};
UserService.prototype.GetIMCOList = function (Role) {
var _this = this;
var data = {
action: 'manoco_user_detail_hodside',
role: Role //'director'
};
this.common.saveFundRiskData(data)
.subscribe(function (Response) {
var resData = JSON.parse(Response._body);
var UserDetails = JSON.parse(resData.body);
if (UserDetails.status == '200') {
console.log(UserDetails);
_this.IMCOList = UserDetails.data;
}
else {
}
});
};
UserService.prototype.GetMancoHeadList = function (Role) {
var _this = this;
var DataRol;
var data = {
action: 'manoco_user_detail_hodside',
role: Role
};
this.common.saveFundRiskData(data)
.subscribe(function (Response) {
var resData = JSON.parse(Response._body);
var UserDetails = JSON.parse(resData.body);
if (UserDetails.status == '200') {
_this.MancoHead = UserDetails.data;
}
else {
// toastr.error(UserDetails.message);
}
});
};
UserService.prototype.GetDirectorList = function (Role) {
var _this = this;
var data = {
action: 'manoco_user_detail_hodside',
role: Role //'director'
};
this.common.saveFundRiskData(data)
.subscribe(function (Response) {
var resData = JSON.parse(Response._body);
var UserDetails = JSON.parse(resData.body);
if (UserDetails.status == '200') {
_this.Director = UserDetails.data;
}
else {
//toastr.error(UserDetails.message);
}
});
};
UserService = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
providedIn: 'root'
}),
__metadata("design:paramtypes", [_cognito_service__WEBPACK_IMPORTED_MODULE_1__["CognitoUtil"],
_common_service__WEBPACK_IMPORTED_MODULE_2__["CommonService"]
// private Regulatory : RegulatorycomplianceComponent,
// private fund : FundRiskComponent,
// private Internal : InternalAuditComponent,
// private dist : DistributionComponent,
// private invest : InvestmentmanagementComponent,
// private capital : CapitalFinancialComponent,
// private opera :OperationalRiskComponent,
// private org : OrganisationComponent,
// private resourcing:ResourcingComponent,
])
], UserService);
return UserService;
}());
/***/ }),
/***/ "./src/environments/environment.ts":
/*!*****************************************!*\
!*** ./src/environments/environment.ts ***!
\*****************************************/
/*! exports provided: environment */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "environment", function() { return environment; });
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
/*
* In development mode, to ignore zone related error stack frames such as
* `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can
* import the following file, but please comment it out in production mode
* because it will have performance impact when throw error
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
var environment = {
production: false,
region: 'EU-WEST-1',
//Live Ireland Cognito UserId
identityPoolId: 'eu-west-1:8066c156-57e3-4f14-ace0-65ba8a3dd846',
userPoolId: 'eu-west-1_jD9yy0WTX',
clientId: '70nl5fnpdtgte73t6tqqiv5av4',
APIUrl: 'https://2jjzow3ebj.execute-api.eu-west-1.amazonaws.com/Prod',
BucketName: 'live-ireland-registone',
// LIVE ohio sanlam
// identityPoolId: 'us-east-2:a57c29f0-c5ca-4349-943f-bbf36928d8b0',
// userPoolId:'us-east-2_njA3aMgll',
// clientId: '17jlbkvn69jnpcp5h54rpnc0lk',
// BucketName:'sanlamapp-website',
// APIUrl : 'https://kwxo1fuqt5.execute-api.us-east-2.amazonaws.com/Prod',
mancoUser: '3895a3b9-394c-4b98-822d-49a8f26f8e15',
newAPIURL: "https://5ipvmln4jc.execute-api.eu-west-1.amazonaws.com/prod/",
loadComplianceModule: "https://dmu24rusrl.execute-api.eu-west-1.amazonaws.com/prod",
redirect_url: 'https://sanlam.regstonecloud.com/',
//for Demo
// BucketName: 'sanlamapp-demo-website',
// userPoolId: 'us-east-2_S1HZrpvb0',
// clientId: '50cilvn3l2cle50its4ahkmr4a',
// APIUrl: 'https://hzh545s5h2.execute-api.eu-west-1.amazonaws.com/Prod',
// identityPoolId: 'eu-west-1:8066c156-57e3-4f14-ace0-65ba8a3dd846',
// userPoolId: 'eu-west-1_OxMg4NNiC',
// clientId: '6rolb1a6p7f9afhgdrihi5e7mv',
// redirect_url: 'http://demo-sanlamapp.s3-website-eu-west-1.amazonaws.com/',
// mancoUser:'a746669c-c441-491a-ba23-e045e27a91b0',
accessKeyId: 'AKIA3Z7A35LVGX7FCNO5',
secretAccessKey: "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",
rekognitionBucket: 'rekognition-pics',
albumName: "usercontent",
bucketRegion: 'EU_WEST_1',
companyBucket: 'sanlamapp-website',
// companyBucket: 'demo-sanlamapp',
companyaccessKeyId: 'AKIAJ4Q33Y3VXWYWEITQ',
companysecretAccessKey: '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',
S3region: 'eu-west-1',
cognito_idp_endpoint: '',
cognito_identity_endpoint: '',
sts_endpoint: '',
s3_endpoint: '',
//title
dealing: 'Gratification(s) Request',
};
/***/ }),
/***/ "./src/main.ts":
/*!*********************!*\
!*** ./src/main.ts ***!
\*********************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/platform-browser-dynamic */ "./node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js");
/* harmony import */ var _app_app_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./app/app.module */ "./src/app/app.module.ts");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./environments/environment */ "./src/environments/environment.ts");
if (_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].production) {
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["enableProdMode"])();
}
Object(_angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_1__["platformBrowserDynamic"])().bootstrapModule(_app_app_module__WEBPACK_IMPORTED_MODULE_2__["AppModule"])
.catch(function (err) { return console.log(err); });
/***/ }),
/***/ 0:
/*!***************************!*\
!*** multi ./src/main.ts ***!
\***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(/*! E:\vatsal2\wetransfer_live_sanlam_backend-zip_2023-10-02_0953\sanlam_live_front\src\main.ts */"./src/main.ts");
/***/ }),
/***/ 1:
/*!********************!*\
!*** fs (ignored) ***!
\********************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ })
},[[0,"runtime","vendor"]]]);
//# sourceMappingURL=main.js.map