{
"version": 3,
"sources": ["../../../Scripts/default/AccountInformation.ts"],
"sourcesContent": ["\uFEFFnamespace WebPortal.Dialog.Modal {\n export class AccountInformation {\n constructor() { this.init(); }\n\n private init(): void {\n $(\"#navigation_lbt_account_information\").off().on(\"click\", () => {\n let requestParam: string = $(\"#hdf_se_request_param\").val();\n if (!!requestParam) {\n console.log(\"doLoadAccountinformation\");\n WebPortalHubObj.server.doLoadAccountInformation(requestParam);\n } else {\n console.error(\"Error, no Request String found!\");\n }\n return false;\n });\n\n $(\"#bt_account_information_change_password\").off().on(\"click\", () => {\n $(\"#pn_modal_account_information\").modal(\"hide\");\n ChangePasswordModal.show();\n return false;\n });\n\n WebPortalHubObj.client.ShowAccountinformation = (_AccountinformationData: any) => {\n $(\"#pn_progress_account_information\").addClass(\"hidden\");\n $(\"#pn_account_information_Cause\").addClass(\"hidden\");\n $(\"#bt_account_information_settings_save\").removeAttr(\"disabled\");\n\n // account\n $(\"#pn_account_information_account_name\")\n .html(_AccountinformationData.Account.Firstname + \" \" + _AccountinformationData.Account.Familyname);\n $(\"#pn_account_information_account_useremail\")\n .html(_AccountinformationData.Account.UserEMail);\n $(\"#pn_account_information_account_username\")\n .html(_AccountinformationData.Account.Username);\n $(\"#pn_account_information_account_divsion\")\n .html(_AccountinformationData.Account.Division);\n if (_AccountinformationData.Account.Phone) {\n $(\"#pn_account_information_account_phone\").html(\"+\" + _AccountinformationData.Account.Phone);\n }\n if (_AccountinformationData.Account.Mobile) {\n $(\"#pn_account_information_account_mobile\").html(\"+\" + _AccountinformationData.Account.Mobile);\n }\n $(\"#pn_account_information_account_mail\").html(_AccountinformationData.Account.Mail);\n let HasPrivateDrive: boolean = false;\n if (!!_AccountinformationData.Account.HasPrivateDrive && _AccountinformationData.Account.HasPrivateDrive) { HasPrivateDrive = true; }\n $(\"#pn_account_information_account_hasprivatedrive\").html(String(HasPrivateDrive));\n let HasSwisscomDrive: boolean = false;\n if (!!_AccountinformationData.Account.HasSwisscomDrive && _AccountinformationData.Account.HasSwisscomDrive) { HasSwisscomDrive = true; }\n $(\"#pn_account_information_account_hasswisscomdrive\").html(String(HasSwisscomDrive));\n $(\"#pn_account_information_account_validfrom\").html(_AccountinformationData.Account.ValidFrom);\n $(\"#pn_account_information_account_validto\").html(_AccountinformationData.Account.ValidTo);\n // maxSessionCount\n $(\"#pn_account_information_account_maxsessioncount\").html(_AccountinformationData.Settings.MaxSessionCount);\n\n // assigned Access Groups\n $(\"#pn_account_information_assigned_access_groups\").html(\"\");\n let AssignedAccessGroups: any = _AccountinformationData.AssignedAccessGroups;\n for (let key in AssignedAccessGroups) {\n if (AssignedAccessGroups.hasOwnProperty(key)) {\n let phone: string = \"\";\n if (AssignedAccessGroups[key].Phone) { phone = \"Phone: +\" + AssignedAccessGroups[key].Phone + \"
\"; }\n let mobile: string = \"\";\n if (AssignedAccessGroups[key].Mobile) { mobile = \"Mobile: +\" + AssignedAccessGroups[key].Mobile; }\n\n $(\"#pn_account_information_assigned_access_groups\").append(\n this.getTitelDiv(AssignedAccessGroups[key].AccessGroup + \" - \" + AssignedAccessGroups[key].AccessGroupRole\n ));\n\n $(\"#pn_account_information_assigned_access_groups\").append(\n this.getBodyDiv(\n AssignedAccessGroups[key].Firstname + \" \" + AssignedAccessGroups[key].Familyname + \"
\" +\n AssignedAccessGroups[key].Mail + \"
\" +\n phone + mobile\n ));\n\n $(\"#pn_account_information_assigned_access_groups\").append(\n this.getFooterDiv(AssignedAccessGroups[key].NotesInMySettings\n ));\n }\n }\n\n // pending Access Request\n $(\"#pn_account_information_pending_access_requests\").html(\"\");\n let PendingAccessRequests: any = _AccountinformationData.PendingAccessRequests;\n for (let key in PendingAccessRequests) {\n if (PendingAccessRequests.hasOwnProperty(key)) {\n $(\"#pn_account_information_pending_access_requests\").append(\n this.getTitelDiv(PendingAccessRequests[key].AccessGroup\n ));\n $(\"#pn_account_information_pending_access_requests\").append(\n this.getBodyDiv(\n PendingAccessRequests[key].Name + \" (\" + PendingAccessRequests[key].Username + \")
\" +\n \"
ValidFrom: | \" + PendingAccessRequests[key].ValidFrom + \" |
ValidTo: | \" + PendingAccessRequests[key].ValidTo + \" |