@posiwise/user-module 0.0.170 → 0.0.172

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"posiwise-user-module.mjs","sources":["../../../../libs/user-module/src/lib/account/account.component.ts","../../../../libs/user-module/src/lib/account/account.component.html","../../../../libs/user-module/src/lib/account/account-details/account-details.component.ts","../../../../libs/user-module/src/lib/account/account-details/account-details.component.html","../../../../libs/user-module/src/lib/account/subscriptions/add-subscription/add-subscription.component.ts","../../../../libs/user-module/src/lib/account/subscriptions/add-subscription/add-subscription.component.html","../../../../libs/user-module/src/lib/account/subscriptions/saved-card-details/saved-card-details.component.ts","../../../../libs/user-module/src/lib/account/subscriptions/saved-card-details/saved-card-details.component.html","../../../../libs/user-module/src/lib/account/subscriptions/subscription-credential/clear-masked-on-focus.directive.ts","../../../../libs/user-module/src/lib/account/subscriptions/subscription-credential/humanize-credential-name.pipe.ts","../../../../libs/user-module/src/lib/account/subscriptions/subscription-credential/subscription-credential.component.ts","../../../../libs/user-module/src/lib/account/subscriptions/subscription-credential/subscription-credential.component.html","../../../../libs/user-module/src/lib/account/subscriptions/update-payment-details/braintree-dropin.helper.ts","../../../../libs/user-module/src/lib/account/subscriptions/update-payment-details/update-payment-details.component.ts","../../../../libs/user-module/src/lib/account/subscriptions/update-payment-details/update-payment-details.component.html","../../../../libs/user-module/src/lib/account/subscriptions/upgrade-subscription/upgrade-subscription.component.ts","../../../../libs/user-module/src/lib/account/subscriptions/upgrade-subscription/upgrade-subscription.component.html","../../../../libs/user-module/src/lib/account/subscriptions/user-subscription-details/user-subscription-details.component.ts","../../../../libs/user-module/src/lib/account/subscriptions/user-subscription-details/user-subscription-details.component.html","../../../../libs/user-module/src/lib/account/subscriptions/user-subscriptions-list/user-subscriptions-list.component.ts","../../../../libs/user-module/src/lib/account/subscriptions/user-subscriptions-list/user-subscriptions-list.component.html","../../../../libs/user-module/src/lib/account/user-invoice/user-invoice.component.ts","../../../../libs/user-module/src/lib/account/user-invoice/user-invoice.component.html","../../../../libs/user-module/src/lib/settings-tabs/communication-tab/communication-tab.component.ts","../../../../libs/user-module/src/lib/settings-tabs/communication-tab/communication-tab.component.html","../../../../libs/user-module/src/lib/settings-tabs/others-tab/others-tab.component.ts","../../../../libs/user-module/src/lib/settings-tabs/others-tab/others-tab.component.html","../../../../libs/user-module/src/lib/settings-tabs/security-tab/security-tab.component.ts","../../../../libs/user-module/src/lib/settings-tabs/security-tab/security-tab.component.html","../../../../libs/user-module/src/lib/settings-tabs/settings-tabs.component.ts","../../../../libs/user-module/src/lib/settings-tabs/settings-tabs.component.html","../../../../libs/user-module/src/lib/support/support.component.ts","../../../../libs/user-module/src/lib/support/support.component.html","../../../../libs/user-module/src/lib/support/support-details/support-details.component.ts","../../../../libs/user-module/src/lib/support/support-details/support-details.component.html","../../../../libs/user-module/src/lib/user-profile/edit-portfolios/edit-portfolios.component.ts","../../../../libs/user-module/src/lib/user-profile/edit-portfolios/edit-portfolios.component.html","../../../../libs/user-module/src/lib/user-profile/edit-project-modal/edit-project-modal.component.ts","../../../../libs/user-module/src/lib/user-profile/edit-project-modal/edit-project-modal.component.html","../../../../libs/user-module/src/lib/user-profile/edit-qualifications-modal/edit-qualifications-modal.component.ts","../../../../libs/user-module/src/lib/user-profile/edit-qualifications-modal/edit-qualifications-modal.component.html","../../../../libs/user-module/src/lib/user-profile/edit-recommendation-modal/edit-recommendation-modal.component.ts","../../../../libs/user-module/src/lib/user-profile/edit-recommendation-modal/edit-recommendation-modal.component.html","../../../../libs/user-module/src/lib/user-profile/edit-skills-modal/edit-skills-modal.component.ts","../../../../libs/user-module/src/lib/user-profile/edit-skills-modal/edit-skills-modal.component.html","../../../../libs/user-module/src/lib/user-profile/edit-social-links/edit-social-links.component.ts","../../../../libs/user-module/src/lib/user-profile/edit-social-links/edit-social-links.component.html","../../../../libs/user-module/src/lib/user-profile/edit-user-profile-modal/edit-user-profile-modal.component.ts","../../../../libs/user-module/src/lib/user-profile/edit-user-profile-modal/edit-user-profile-modal.component.html","../../../../libs/user-module/src/lib/user-profile/user-about/user-about.component.ts","../../../../libs/user-module/src/lib/user-profile/user-about/user-about.component.html","../../../../libs/user-module/src/lib/user-profile/user-portfolios/user-portfolios.component.ts","../../../../libs/user-module/src/lib/user-profile/user-portfolios/user-portfolios.component.html","../../../../libs/user-module/src/lib/user-profile/user-projects/user-projects.component.ts","../../../../libs/user-module/src/lib/user-profile/user-projects/user-projects.component.html","../../../../libs/user-module/src/lib/user-profile/user-profile-page.component.ts","../../../../libs/user-module/src/lib/user-profile/user-profile-page.component.html","../../../../libs/user-module/src/lib/user-module.module.ts","../../../../libs/user-module/src/posiwise-user-module.ts"],"sourcesContent":["import { Component, ViewChild } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { MenuItem } from 'primeng/api';\n\n@Component({\n selector: 'pw-user-account',\n templateUrl: './account.component.html',\n\n standalone: false\n})\nexport class AccountComponent {\n @ViewChild('menuItems', { static: true }) menu: MenuItem[];\n\n items: MenuItem[];\n\n activeItem: MenuItem;\n\n path: string;\n\n constructor(private readonly router: Router) {\n this.items = [\n {\n id: 'account',\n label: 'Account',\n icon: 'fa fa-fw fa-list',\n routerLink: ['/account/details']\n },\n {\n id: 'subscription',\n label: 'Subscriptions',\n icon: 'fa fa-fw fa-file-invoice',\n routerLink: ['/account/subscriptions']\n },\n {\n id: 'invoice',\n label: 'Invoices',\n icon: 'fa fa-fw fa-tag',\n routerLink: ['/account/invoice']\n }\n ];\n this.activeItem =\n this.items[\n this.items.findIndex(\n record => record.routerLink[0] === this.router.url.split('?')[0]\n )\n ];\n }\n\n activateMenu() {\n this.activeItem = this.menu['activeItem'];\n }\n}\n","<pw-tabs [items]=\"items\"></pw-tabs>\n","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n Injector,\n OnInit,\n ViewChild\n} from '@angular/core';\nimport { AbstractControl, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\nimport { NgxGpAutocompleteDirective } from '@angular-magic/ngx-gp-autocomplete';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AuthService, GeoService, ProfileService } from '@posiwise/common-services';\nimport { AppUser, Country, User } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\nimport { ConfirmDialogService } from '@posiwise/shared-components';\nimport { ValidateForm } from '@posiwise/utils';\n\nimport { StatusCodes } from 'http-status-codes';\nimport { map, Observable } from 'rxjs';\nimport { getDomain } from 'tldts';\n\nimport { NgbDateStruct, NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\n/** Environment segments that may already sit in front of the company domain. */\nconst MCP_ENV_SEGMENTS = ['dev', 'uat', 'staging', 'go'];\n\n/** Segment assumed when the host carries none — PROD is served from the apex too. */\nconst MCP_PROD_SEGMENT = 'go';\n\n@Component({\n selector: 'pw-account-details',\n templateUrl: './account-details.component.html',\n styleUrls: ['./account-details.component.scss'],\n\n standalone: false\n})\nexport class AccountDetailsComponent extends AppBaseComponent implements OnInit {\n @ViewChild('ngxPlaces') placesRef: NgxGpAutocompleteDirective;\n @ViewChild('password', { static: false }) passwordRef: ElementRef;\n\n emailForm: UntypedFormGroup;\n passwordForm: UntypedFormGroup;\n profileForm: UntypedFormGroup;\n\n image = 'assets/img/icons/male.png';\n\n countries$: Observable<Country[]>;\n\n states: Country[] = [];\n\n validatedEmail: string;\n\n toggleEmail: boolean;\n togglePassword: boolean;\n toggleNickName: boolean;\n\n passwordVerified = false;\n isCurrentPasswordValid = true;\n\n selectedState;\n\n user: User;\n\n slug: string;\n\n isLoaded = false;\n passwordBusyButton = false;\n slugBusyButton = false;\n emailBusyButton = false;\n validatePasswordBusyButton = false;\n profileBusyButton = false;\n\n showApiToken = false;\n showApiClientId = false;\n refreshingTokens = false;\n updatingScope = false;\n\n connections: {\n id: number;\n client_name: string;\n created_at: string;\n expires_at: string;\n last_used_at: string | null;\n }[] = [];\n loadingConnections = false;\n\n constructor(\n private readonly fb: UntypedFormBuilder,\n private readonly modalService: NgbModal,\n private readonly authService: AuthService,\n private readonly geoService: GeoService,\n private readonly profileService: ProfileService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef,\n private readonly confirmDialog: ConfirmDialogService\n ) {\n super(injector);\n this.getForms();\n }\n\n ngOnInit() {\n console.log('AccountDetailsComponent.ngOnInit()');\n this.getUserProfile();\n this.loadConnections();\n this.geoService.getCountries().subscribe(() => {\n this.countries$ = this.geoService\n .getCountries()\n .pipe(\n map((countries: []) => [{ name: 'Select Country', code: null }, ...countries])\n );\n this.cdr.markForCheck();\n });\n }\n\n handleAddressChange(_event) {\n this.profileForm.patchValue({\n latitude: _event.geometry.location.lat(),\n longitude: _event.geometry.location.lng(),\n location: _event.formatted_address\n });\n }\n\n private getUserProfile() {\n this.userService\n .getUserInfo()\n .subscribe(user => {\n if (user) {\n this.user = user;\n this.slug = user.slug;\n if (user?.user_avatar?.length) {\n this.image = user?.user_avatar[2]?.url;\n }\n let dobObject: NgbDateStruct;\n if (user.dob) {\n dobObject = {\n day: Number(user.dob.substring(8, 10)),\n month: Number(user.dob.substring(5, 7)),\n year: Number(user.dob.substring(0, 4))\n };\n }\n\n this.getRegion(user.country);\n\n // Map api_keys if present\n if (user && user.api_keys) {\n if (user.api_keys.api_user_token && !user.api_user_token) {\n this.user.api_user_token = user.api_keys.api_user_token;\n }\n if (user.api_keys.api_user_id && !user.api_user_id) {\n this.user.api_user_id = user.api_keys.api_user_id;\n }\n if (user.api_keys.api_hits !== undefined && user.api_hits === undefined) {\n this.user.api_hits = user.api_keys.api_hits;\n }\n if (\n user.api_keys.api_hits_max !== undefined &&\n user.api_hits_max === undefined\n ) {\n this.user.api_hits_max = user.api_keys.api_hits_max;\n }\n }\n\n this.profileForm.patchValue(this.user);\n this.profileForm.patchValue({ dob: dobObject });\n this.validatedEmail = this.user.email;\n }\n this.cdr.markForCheck();\n })\n .add(() => {\n this.isLoaded = true;\n this.cdr.markForCheck();\n });\n }\n\n /**\n * Updates Email Address\n * this needs to be separate and requires the email to be validated from email before it's actually changed\n */\n onEmailFormSubmit() {\n this.emailBusyButton = true;\n const data = this.emailForm.value;\n data.confirmation_path = 'confirm-email';\n\n if (data && this.passwordVerified) {\n this.userService\n .updateEmail(data)\n .subscribe(() => {\n this.emailForm.reset();\n this.passwordVerified = false;\n this.toast.success(`A verification email has been sent to ${data.email}`, '', {\n positionClass: 'toast-top-center',\n timeOut: 100000\n });\n this.cdr.markForCheck();\n })\n .add(() => {\n this.emailBusyButton = false;\n this.cdr.markForCheck();\n });\n }\n }\n\n validatePassword() {\n this.validatePasswordBusyButton = true;\n const password = this.passwordRef.nativeElement.value;\n if (password) {\n this.userService\n .checkPassword({ password })\n .subscribe(data => {\n if (data?.status === StatusCodes.OK) {\n this.passwordVerified = true;\n } else {\n this.toast.error(data.error.message);\n this.passwordRef.nativeElement.value = '';\n }\n this.cdr.markForCheck();\n })\n .add(() => {\n this.validatePasswordBusyButton = false;\n this.cdr.markForCheck();\n });\n }\n }\n\n handleImageError(event: Event, fallbackPath): void {\n HelperService.handleImageFallbackPath(event, fallbackPath);\n }\n\n checkValidity() {\n const password = this.passwordRef.nativeElement.value;\n if (password.length > 5) {\n this.isCurrentPasswordValid = false;\n } else {\n this.isCurrentPasswordValid = true;\n }\n }\n\n onPasswordFormSubmit() {\n if (this.passwordForm.valid) {\n this.passwordBusyButton = true;\n const data = {\n password: this.passwordForm.value['newPassword'],\n password_confirmation: this.passwordForm.value['confirmPassword'],\n old_password: this.passwordForm.value['currentPassword']\n };\n this.userService\n .updatePassword(data)\n .subscribe(response => {\n if (response.status_code === 200) {\n this.toast.success(response.message, '', {\n positionClass: 'toast-top-center'\n });\n this.onTogglePassword();\n } else {\n this.toast.error(response.error.message);\n }\n this.passwordForm.reset();\n this.cdr.markForCheck();\n })\n .add(() => {\n this.passwordBusyButton = false;\n this.cdr.markForCheck();\n });\n }\n }\n\n @ValidateForm('profileForm')\n onProfileFormSubmit() {\n this.profileBusyButton = true;\n const data = { ...this.profileForm.value };\n data.dob = HelperService.dateFormat(this.profileForm.get('dob')?.value);\n if (data.location === '') {\n data.location = null;\n }\n Object.entries(data).forEach(([key, val]) => {\n if (val === '' || val === null) {\n delete data[key];\n }\n });\n this.profileService\n .updateUserProfile(data)\n .subscribe(() => {\n this.toast.success(this.translation.translate('User.Profile.ProfileUpdated'));\n this.cdr.markForCheck();\n })\n .add(() => {\n this.profileBusyButton = false;\n this.cdr.markForCheck();\n });\n }\n\n onAvatarSave() {\n const data = {\n avatar: this.profileForm.get('avatar')?.value\n };\n this.profileService.updateUserProfile(data).subscribe(() => {\n this.toast.success(this.translation.translate('User.Profile.ProfileUpdated'));\n this.cdr.markForCheck();\n });\n }\n\n openModal(content) {\n this.modalService.open(content, { centered: true, windowClass: 'modal-holder' });\n }\n\n onUpdateSlug() {\n this.slugBusyButton = true;\n this.userService\n .updateSlug(this.slug)\n .subscribe(response => {\n this.toggleNickName = false;\n if (response?.status === StatusCodes.OK) {\n this.getUserProfile();\n } else {\n this.toast.error('User.Account.UserNameError');\n }\n this.cdr.markForCheck();\n })\n .add(() => {\n this.slugBusyButton = false;\n this.cdr.markForCheck();\n });\n }\n\n onImageSelection(event) {\n const blob = this.dataURLtoBlob(event);\n const filename = `${`${this.slug.toLocaleLowerCase()}_${Date.parse(\n new Date().toString()\n )}`}.png`;\n const file: File = new File([blob], filename);\n this.userService.addAvatar(file).subscribe(res => {\n this.image = res?.user_avatar[2]?.url;\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n });\n }\n\n sendMailToResetPassword() {\n this.authService.forgotPassword(this.user.email, 'reset-password').subscribe(() => {\n this.toast.success(this.translation.translate('User.Account.Message.CheckEmail'));\n this.cdr.markForCheck();\n });\n }\n\n getRegion(countryId: number | string) {\n if (countryId) {\n this.geoService.getRegions(countryId).subscribe(response => {\n this.states = [{ code: 0, name: 'Select State' }, ...response];\n this.cdr.markForCheck();\n });\n }\n }\n\n loadConnections() {\n this.loadingConnections = true;\n this.userService\n .getMcpConnections()\n .subscribe({\n next: (response: {\n mcp_oauth_connections: {\n id: number;\n client_name: string;\n created_at: string;\n expires_at: string;\n last_used_at: string | null;\n }[];\n }) => {\n this.connections = response?.mcp_oauth_connections ?? [];\n this.cdr.markForCheck();\n }\n })\n .add(() => {\n this.loadingConnections = false;\n this.cdr.markForCheck();\n });\n }\n\n deregisterConnection(id: number) {\n this.confirmDialog\n .open({\n title: this.translation.translate(\n 'User.Subscriptions.RegisteredApps.DeregisterConfirmTitle'\n ),\n text: this.translation.translate(\n 'User.Subscriptions.RegisteredApps.DeregisterConfirmText'\n ),\n destructive: true,\n confirmLabel: this.translation.translate(\n 'User.Subscriptions.RegisteredApps.DeregisterConfirmButton'\n )\n })\n .then(ok => {\n if (!ok) {\n return;\n }\n\n this.userService.deleteMcpConnection(id).subscribe({\n next: () => {\n // Success toast comes from the backend response (handled by the\n // HTTP interceptor); no client-side toast to avoid a duplicate.\n this.loadConnections();\n },\n error: () => {\n this.toast.error(\n this.translation.translate(\n 'User.Subscriptions.RegisteredApps.DeregisterFailed'\n )\n );\n }\n });\n });\n }\n\n private getForms() {\n this.emailForm = this.fb.group({\n email: ['', [Validators.required, Validators.email]]\n });\n\n this.passwordForm = this.fb.group(\n {\n currentPassword: ['', [Validators.required]],\n newPassword: ['', [Validators.required, Validators.minLength(8)]],\n confirmPassword: ['', [Validators.required, Validators.minLength(8)]]\n },\n {\n validators: this.passwordMatcher\n }\n );\n\n this.profileForm = AppUser.getForm(new AppUser({}));\n }\n\n private passwordMatcher(ac: AbstractControl): null {\n const password = ac.get('newPassword').value;\n const confirmPassword = ac.get('confirmPassword').value;\n if (password !== confirmPassword) {\n ac.get('confirmPassword').setErrors({ MatchPassword: true });\n }\n\n return null;\n }\n\n dataURLtoBlob(dataUrl: string) {\n const arr = dataUrl.split(',');\n const mime = /^[A-Z]*[a-z]*:(.*?);[A-Z]*/.exec(arr[0])?.[1];\n const bStr = atob(arr[1]);\n let n = bStr.length;\n const u8arr = new Uint8Array(n);\n while (n--) {\n u8arr[n] = bStr.charCodeAt(n);\n }\n\n return new Blob([u8arr], { type: mime });\n }\n\n onToggleEmail() {\n this.emailForm.reset();\n this.passwordVerified = false;\n this.toggleEmail = false;\n }\n\n onTogglePassword() {\n this.passwordForm.reset();\n this.togglePassword = false;\n }\n\n onClose() {\n this.modalService.dismissAll();\n }\n\n shouldUserChangeEmail() {\n if (this.user.has_password) {\n this.toggleEmail = !this.toggleEmail;\n } else {\n this.confirmDialog.open({\n text: \"You don't have password, please reset your password first and then try changing email\",\n confirmOnly: true\n });\n }\n }\n\n toggleApiTokenVisibility() {\n this.showApiToken = !this.showApiToken;\n }\n\n toggleApiClientIdVisibility() {\n this.showApiClientId = !this.showApiClientId;\n }\n\n refreshApiTokens() {\n this.confirmDialog\n .open({\n title: 'Are you sure?',\n text: this.translation.translate(\n 'User.Subscriptions.APICredentials.RefreshWarning'\n ),\n destructive: true,\n confirmLabel: 'Yes, refresh tokens!'\n })\n .then(ok => {\n if (ok) {\n this.performTokenRefresh();\n }\n });\n }\n\n private performTokenRefresh() {\n this.refreshingTokens = true;\n this.userService\n .refreshUserApiTokens()\n .subscribe({\n next: response => {\n if (response && response.api_keys) {\n if (!this.user.api_keys) {\n this.user.api_keys = {};\n }\n if (response.api_keys.api_user_token) {\n this.user.api_keys.api_user_token = response.api_keys.api_user_token;\n }\n if (response.api_keys.api_user_id) {\n this.user.api_keys.api_user_id = response.api_keys.api_user_id;\n }\n if (response.api_keys.api_hits !== undefined) {\n this.user.api_keys.api_hits = response.api_keys.api_hits;\n }\n if (response.api_keys.api_hits_max !== undefined) {\n this.user.api_keys.api_hits_max = response.api_keys.api_hits_max;\n }\n }\n\n this.showApiToken = false;\n this.showApiClientId = false;\n this.getUserProfile();\n this.cdr.markForCheck();\n }\n })\n .add(() => {\n this.refreshingTokens = false;\n this.cdr.markForCheck();\n });\n }\n\n get currentApiTokenScope(): string {\n return this.user?.api_keys?.api_token_scope ?? 'read_only';\n }\n\n /**\n * Tenant-dynamic MCP endpoint URL, resolved from the host the user is on.\n * The MCP host is always `brain-api-mcp.{env}.{company-domain}`, so the\n * environment segment has to survive the swap:\n * www.dev.posiwise.com -> brain-api-mcp.dev.posiwise.com\n * www.go.posiwise.com -> brain-api-mcp.go.posiwise.com\n * www.posiwise.com -> brain-api-mcp.go.posiwise.com (apex = PROD)\n * Stripping the first label unconditionally (the previous behaviour) broke\n * PROD, where the app is also served from the apex: it produced\n * `brain-api-mcp.posiwise.com`, which does not exist in DNS.\n */\n get mcpEndpointUrl(): string {\n const url = `https://brain-api-mcp.${this.mcpHostBase(window.location.hostname)}/mcp`;\n const shard = this.user?.user_shard;\n return shard ? `${url}?user_shard=${encodeURIComponent(shard)}` : url;\n }\n\n /**\n * Company domain prefixed by its environment segment. Resolves the company\n * domain with the same `getDomain` the AppConfigService uses to identify the\n * tenant, so multi-label TLDs (acme.co.uk) and arbitrary subdomains both\n * reduce correctly. Only a recognised environment segment is carried over —\n * anything else (`www`, a custom subdomain) falls back to PROD rather than\n * being prefixed onto the host, which would misroute.\n */\n private mcpHostBase(hostname: string): string {\n const companyDomain = getDomain(hostname, { allowPrivateDomains: true });\n if (!companyDomain) {\n // Non-public hosts (localhost, bare IPs) carry no company domain.\n return hostname;\n }\n const prefix = hostname.slice(0, -companyDomain.length).split('.').filter(Boolean);\n const segment = prefix[prefix.length - 1];\n const env = MCP_ENV_SEGMENTS.includes(segment) ? segment : MCP_PROD_SEGMENT;\n return `${env}.${companyDomain}`;\n }\n\n /** Tenant company name (domain-metadata driven), falling back to PosiWise. */\n get mcpCompanyName(): string {\n return this.appConfig?.company?.name || 'PosiWise';\n }\n\n changeApiTokenScope(scope: string) {\n if (this.updatingScope || scope === this.currentApiTokenScope) {\n return;\n }\n this.confirmDialog\n .open({\n title: this.translation.translate(\n 'User.Subscriptions.APICredentials.ScopeConfirmTitle'\n ),\n text: this.translation.translate(\n scope === 'read_write'\n ? 'User.Subscriptions.APICredentials.ScopeWriteWarning'\n : 'User.Subscriptions.APICredentials.ScopeReadWarning'\n ),\n destructive: scope === 'read_write',\n confirmLabel: this.translation.translate(\n 'User.Subscriptions.APICredentials.ScopeConfirmLabel'\n )\n })\n .then(ok => {\n if (ok) {\n this.performScopeUpdate(scope);\n }\n });\n }\n\n private performScopeUpdate(scope: string) {\n this.updatingScope = true;\n this.userService\n .updateApiTokenScope(scope)\n .subscribe({\n next: () => {\n if (!this.user.api_keys) {\n this.user.api_keys = {};\n }\n this.user.api_keys.api_token_scope = scope;\n this.toast.success(\n this.translation.translate('User.Subscriptions.APICredentials.ScopeUpdated')\n );\n this.cdr.markForCheck();\n },\n error: () => {\n this.toast.error(\n this.translation.translate(\n 'User.Subscriptions.APICredentials.ScopeUpdateFailed'\n )\n );\n this.cdr.markForCheck();\n }\n })\n .add(() => {\n this.updatingScope = false;\n this.cdr.markForCheck();\n });\n }\n}\n","<div class=\"w-100 text-center\">\n @if (!isLoaded) {\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n }\n</div>\n<div class=\"row gx-3 mb-3\">\n <div class=\"col-md-4\">\n <section class=\"card p-4 h-100 d-flex flex-column\">\n <h2>{{ 'User.Profile.Avatar' | transloco }}</h2>\n <div class=\"text-center d-flex flex-column justify-content-center flex-grow-1 mt-1\">\n <div class=\"image-container\">\n <img [src]=\"image\"\n width=\"150\"\n height=\"150\"\n class=\"image rounded-circle\"\n alt=\"User Male\"\n (error)=\"handleImageError($event, 'assets/img/icons/male.png')\" />\n <div class=\"overlay\"\n (keydown.enter)=\"openModal(content)\"\n (click)=\"openModal(content)\">\n <div class=\"overlay-text\">{{ 'User.Profile.Change' | transloco }}</div>\n </div>\n </div>\n <h4 class=\"mt-2\">{{ user?.first_name }} {{ user?.last_name }}</h4>\n <a aria-label=\"Navigate to Target\"\n class=\"d-inline-block mb-2\"\n (click)=\"openModal(content)\">\n {{ 'User.Profile.EditAvatar' | transloco }}</a>\n </div>\n </section>\n </div>\n <div class=\"col-md-8\">\n <section id=\"user-profile\"\n class=\"card p-4 overflow-visible h-100\">\n <form [formGroup]=\"profileForm\"\n (ngSubmit)=\"onProfileFormSubmit()\">\n <h2>{{ 'User.Profile.UserProfile' | transloco }}</h2>\n <div class=\"row mt-3\">\n <div class=\"col-sm-12 col-md-6 col-lg-6\">\n <pw-input-container label=\"First Name\"\n name=\"first_name\"\n controlId=\"account-first_name\"\n errorMsg=\"Please enter first Name\">\n <input type=\"text\"\n id=\"account-first_name\"\n class=\"form-control\"\n formControlName=\"first_name\"\n autocomplete=\"given-name\" name=\"input_first_name_9\"\n aria-label=\"First Name\"/>\n </pw-input-container>\n <pw-input-container label=\"Preferred name\"\n name=\"preferred_name\"\n controlId=\"account-preferred_name\"\n errorMsg=\"Please enter preferred Name\">\n <input type=\"text\"\n id=\"account-preferred_name\"\n class=\"form-control\"\n formControlName=\"preferred_name\"\n autocomplete=\"username\" name=\"input_preferred_name_10\"\n aria-label=\"Preferred Name\"/>\n </pw-input-container>\n @if (countries$ | async; as countries) {\n <pw-input-container label=\"Country\"\n name=\"country\"\n controlId=\"account-country\"\n [useAriaLabelledbyOnly]=\"true\"\n errorMsg=\"Please select a country\">\n <p-select\n [attr.aria-labelledby]=\"'account-country-label'\"\n [options]=\"countries\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"country\"\n (onChange)=\"getRegion($event.value)\"\n placeholder=\"{{ 'User.Profile.SelectCountry' | transloco }}\">\n </p-select>\n </pw-input-container>\n }\n <pw-input-container label=\"Province\"\n name=\"province\"\n controlId=\"account-province\"\n errorMsg=\"Please enter province\">\n <input type=\"text\"\n id=\"account-province\"\n class=\"form-control\"\n formControlName=\"province\"\n autocomplete=\"postal-code\" name=\"input_province_11\"\n aria-label=\"Province\"/>\n </pw-input-container>\n <pw-input-container label=\"Website Url\"\n name=\"website_url\"\n controlId=\"account-website_url\"\n errorMsg=\"Please enter Website\">\n <input type=\"text\"\n id=\"account-website_url\"\n class=\"form-control\"\n formControlName=\"website_url\"\n autocomplete=\"url\" name=\"input_website_url_12\"\n aria-label=\"Website Url\"/>\n </pw-input-container>\n </div>\n <div class=\"col-sm-12 col-md-6 col-lg-6\">\n <pw-input-container label=\"Last Name\"\n name=\"last_name\"\n controlId=\"account-last_name\"\n errorMsg=\"Please enter last Name\">\n <input type=\"text\"\n id=\"account-last_name\"\n class=\"form-control\"\n formControlName=\"last_name\"\n autocomplete=\"family-name\" name=\"input_last_name_13\"\n aria-label=\"Last Name\"/>\n </pw-input-container>\n <pw-input-container label=\"Date of Birth\"\n name=\"dob\"\n controlId=\"account-dob\"\n errorMsg=\"Please enter date of birth\">\n <div class=\"input-group\">\n <input class=\"form-control\"\n id=\"account-dob\"\n name=\"dob\"\n placeholder=\"dd-mmm-yyyy\"\n formControlName=\"dob\"\n ngbDatepicker\n #d=\"ngbDatepicker\"\n [minDate]=\"{ day: 1, month: 1, year: 1950 }\"\n [maxDate]=\"{ day: 31, month: 12, year: 2018 }\"\n aria-label=\"dd-mmm-yyyy\" />\n <button class=\"btn btn-primary\"\n type=\"button\"\n id=\"account-dob-trigger\"\n aria-label=\"Open date picker for date of birth\"\n (click)=\"d.toggle()\">\n <i class=\"fa fa-calendar\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </pw-input-container>\n <pw-input-container label=\"State\"\n name=\"state\"\n controlId=\"account-state\"\n [useAriaLabelledbyOnly]=\"true\"\n errorMsg=\"Please select a state\">\n <p-select\n [attr.aria-labelledby]=\"'account-state-label'\"\n [options]=\"states\"\n [(ngModel)]=\"selectedState\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"state\"\n [placeholder]=\"'User.Profile.SelectState' | transloco\">\n </p-select>\n </pw-input-container>\n <pw-input-container label=\"Location\"\n name=\"location\"\n controlId=\"account-location\"\n [useAriaLabelledbyOnly]=\"true\">\n <input ngx-gp-autocomplete\n id=\"account-location\"\n name=\"location\"\n class=\"form-control\"\n [attr.aria-labelledby]=\"'account-location-label'\"\n #places=\"ngx-places\"\n formControlName=\"location\"\n (onAddressChange)=\"handleAddressChange($event)\"\n aria-label=\"Location\" />\n </pw-input-container>\n <pw-input-container label=\"Phone Number\"\n name=\"phone_number\"\n controlId=\"account-phone_number\"\n errorMsg=\"Please enter phone number\">\n <input type=\"text\"\n id=\"account-phone_number\"\n class=\"form-control\"\n formControlName=\"phone_number\"\n autocomplete=\"tel\" name=\"input_phone_number_16\"\n aria-label=\"Phone Number\"/>\n </pw-input-container>\n </div>\n <div class=\"col-12 text-end\">\n <div class=\"mb-3\">\n <button class=\"btn btn-raised btn-primary\" [buttonBusy]=\"profileBusyButton\">\n {{ 'Button.Save' | transloco }}\n </button>\n </div>\n </div>\n </div>\n </form>\n </section>\n </div>\n</div>\n<div class=\"row gx-3 mb-3\">\n <div class=\"col-md-6\">\n <section id=\"email-section\"\n class=\"card p-4 h-100\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>{{ 'User.Account.RegisteredEmail' | transloco }}</h2>\n <section id=\"email-form\">\n <form [formGroup]=\"emailForm\"\n (ngSubmit)=\"onEmailFormSubmit()\">\n <!-- Email Address -->\n <div class=\"mt-0\">\n <span id=\"account-primary-email-label\" class=\"me-3 pw-label-style\">{{ 'User.Account.PrimaryEmail' | transloco }}:\n </span>\n <strong>{{ validatedEmail }}</strong>\n <div class=\"mt-1\">\n @if (!toggleEmail) {\n <a class=\"btn btn-raised btn-outline-primary\"\n aria-label=\"Navigate to Target\"\n (click)=\"shouldUserChangeEmail()\">\n {{ 'User.Account.ChangeEmail' | transloco }}</a>\n }\n @if (toggleEmail) {\n <div class=\"row\">\n <div class=\"clearfix\"></div>\n <div class=\"col-12 mb-3\">\n @if (!passwordVerified) {\n <input type=\"password\"\n class=\"form-control\"\n id=\"account-email-current-password\"\n name=\"currentPassword\"\n #password\n placeholder=\"Current Password\"\n autocomplete=\"current-password\"\n (keyup)=\"checkValidity()\"\n aria-label=\"Current Password\" />\n }\n @if (passwordVerified) {\n <input type=\"text\"\n class=\"form-control\"\n id=\"account-new-email\"\n name=\"newEmail\"\n placeholder=\"New Email\"\n autocomplete=\"email\"\n formControlName=\"email\"\n aria-label=\"New Email\" />\n }\n </div>\n <div class=\"col-12\">\n @if (toggleEmail) {\n <a\n class=\"btn btn-raised btn-outline-default my-2 me-2\"\n aria-label=\"Navigate to Target\"\n (click)=\"onToggleEmail()\">{{ 'Button.Cancel' | transloco }}</a>\n }\n @if (!passwordVerified) {\n <button class=\"btn btn-raised btn-primary\"\n type=\"submit\"\n [buttonBusy]=\"validatePasswordBusyButton\"\n (click)=\"validatePassword()\"\n [disabled]=\"isCurrentPasswordValid\">\n {{ 'User.Account.Validate' | transloco }}\n </button>\n }\n @if (passwordVerified) {\n <button type=\"submit\"\n class=\"btn btn-raised btn-primary\"\n [buttonBusy]=\"emailBusyButton\"\n >\n {{\n 'User.Account.SendVerification' | transloco\n }}\n </button>\n }\n </div>\n </div>\n }\n </div>\n </div>\n <section id=\"slug\"\n class=\"mb-2 mt-3\">\n <div>\n <span class=\"me-3 pw-label-style\" id=\"account-nickname-label\">{{ 'User.Account.NickName' | transloco }}:</span>\n <span class=\"tooltip-wrap me-3\" [pTooltip]=\"'User.Account.HandleTooltip' | transloco\" [appendTo]=\"'body'\" tooltipPosition=\"top\"><i class=\"far fa-info-circle text-muted\"></i></span>\n <strong>{{ slug }}</strong>\n <div class=\"mt-1\">\n @if (!toggleNickName) {\n <a class=\"btn btn-raised btn-outline-primary me-2\"\n aria-label=\"Navigate to Target\"\n (click)=\"toggleNickName = true\">\n {{ 'User.Account.ChangeNickname' | transloco }}</a>\n }\n @if (toggleNickName) {\n <div class=\"mb-3\">\n <input type=\"text\"\n id=\"account-nickname\"\n name=\"nickname\"\n class=\"form-control slug-input\"\n aria-labelledby=\"account-nickname-label\"\n [(ngModel)]=\"slug\"\n [ngModelOptions]=\"{ standalone: true }\"\n aria-label=\"Nickname\" />\n </div>\n <div>\n <button type=\"button\"\n class=\"btn btn-raised btn-outline-default\"\n (click)=\"toggleNickName = false\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"button\"\n class=\"btn btn-raised btn-primary ms-2\"\n [buttonBusy]=\"slugBusyButton\"\n [disabled]=\"slug?.length < 2\"\n (click)=\"onUpdateSlug()\">\n {{ 'User.Account.UpdateNickname' | transloco }}\n </button>\n </div>\n }\n </div>\n </div>\n </section>\n </form>\n </section>\n </div>\n </div>\n </section>\n </div>\n <div class=\"col-md-6\">\n <section id=\"password-change\"\n class=\"card p-4 h-100\">\n <form [formGroup]=\"passwordForm\"\n (ngSubmit)=\"onPasswordFormSubmit()\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>{{ 'User.Account.ChangePassword' | transloco }}</h2>\n </div>\n @if (!user?.has_password) {\n <div class=\"text-danger mx-3 my-2\">\n <div>\n You don't have a password set, click on\n <em>{{ 'User.Account.ChangePassword' | transloco }}</em>.\n </div>\n <div>{{ 'User.Profile.PictureMessage' | transloco }}</div>\n </div>\n }\n @if (user?.has_password) {\n <div class=\"col-12\"\n >\n @if (togglePassword) {\n <div class=\"mb-3\">\n <label for=\"account-current-password\">{{ 'User.Account.CurrentPassword' | transloco }}</label>\n <input type=\"password\"\n id=\"account-current-password\"\n class=\"form-control\"\n formControlName=\"currentPassword\"\n autocomplete=\"current-password\" name=\"input_currentPassword_4\"\n aria-label=\"Current Password\"/>\n @if (\n !passwordForm.get('currentPassword').valid &&\n (passwordForm.get('currentPassword').dirty ||\n passwordForm.get('currentPassword').touched)\n ) {\n <small class=\"form-text text-muted danger\"\n >\n {{ 'User.Account.Required' | transloco }}\n </small>\n }\n </div>\n <div class=\"mb-3\">\n <label for=\"account-new-password\">{{ 'User.Account.NewPassword' | transloco }}</label>\n <input type=\"password\"\n id=\"account-new-password\"\n class=\"form-control\"\n formControlName=\"newPassword\"\n autocomplete=\"new-password\" name=\"input_newPassword_5\"\n aria-label=\"New Password\"/>\n @if (\n !passwordForm.get('newPassword').valid &&\n (passwordForm.get('newPassword').dirty ||\n passwordForm.get('newPassword').touched)\n ) {\n <small class=\"form-text text-muted danger\"\n >{{ 'User.Account.Validation.StrongPassword' | transloco }}\n </small>\n }\n </div>\n <div class=\"mb-3\">\n <label for=\"account-confirm-password\">{{\n 'User.Account.ConfirmPassword' | transloco\n }}</label>\n <input type=\"password\"\n id=\"account-confirm-password\"\n class=\"form-control\"\n formControlName=\"confirmPassword\"\n autocomplete=\"new-password\" name=\"input_confirmPassword_6\"\n aria-label=\"Confirm Password\"/>\n @if (\n passwordForm.get('confirmPassword').touched &&\n passwordForm.get('confirmPassword').errors\n ?.MatchPassword\n ) {\n <div class=\"text-danger\"\n >\n {{ 'User.Account.Validation.PasswordsMatch' | transloco }}\n </div>\n }\n </div>\n <div class=\"mb-3\">\n @if (togglePassword) {\n <a class=\"btn btn-raised btn-outline-default\"\n aria-label=\"Navigate to Target\"\n data-bs-target=\"\"\n (click)=\"onTogglePassword()\">\n {{ 'Button.Cancel' | transloco }}</a>\n }\n <button class=\"btn btn-raised btn-primary ms-2\"\n [buttonBusy]=\"passwordBusyButton\"\n [disabled]=\"!passwordForm.valid\">\n {{ 'User.Account.UpdatePassword' | transloco }}\n </button>\n </div>\n }\n <div>\n @if (!togglePassword) {\n <a class=\"btn btn-raised btn-outline-primary\"\n aria-label=\"Navigate to Target\"\n data-bs-target=\"\"\n (click)=\"togglePassword = !togglePassword\">\n {{ 'User.Account.ChangePassword' | transloco }}</a>\n }\n </div>\n </div>\n }\n @if (!user?.has_password) {\n <div class=\"col-12\"\n >\n <a class=\"btn btn-raised btn-primary me-2\"\n aria-label=\"Navigate to Target\"\n data-bs-target=\"\"\n (click)=\"sendMailToResetPassword()\">\n {{ 'User.Account.ChangePassword' | transloco }}</a>\n </div>\n }\n </div>\n </form>\n </section>\n </div>\n @if (user?.api_keys?.api_hits_max > 0) {\n <div class=\"col-12 mt-3\">\n <section id=\"api-credentials\"\n class=\"card p-4 h-auto\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>{{ 'User.Subscriptions.APICredentials.Title' | transloco }}</h2>\n <p>\n {{ 'User.Subscriptions.APICredentials.Description' | transloco: { company: mcpCompanyName } }}\n </p>\n <p class=\"text-muted small mb-2\">\n <i class=\"fas fa-link me-1\"></i>\n {{ 'User.Subscriptions.APICredentials.McpEndpointNote' | transloco: { url: mcpEndpointUrl, company: mcpCompanyName } }}\n </p>\n <!-- pb (not mb): .card .mb-3:last-child is margin-reset in this component's scss -->\n <p class=\"text-muted small mb-0 pb-3\">\n <i class=\"fas fa-info-circle me-1\"></i>\n {{ 'User.Subscriptions.APICredentials.SubscriptionClientIdNote' | transloco }}\n </p>\n </div>\n <div class=\"col-12 col-md-6\">\n <div class=\"form-group\">\n <label class=\"form-label\" for=\"account-api-token\">{{ 'User.Account.APIUserToken' | transloco }}</label>\n <div class=\"input-group\">\n <input type=\"text\"\n id=\"account-api-token\"\n name=\"api_token\"\n class=\"form-control\"\n [value]=\"showApiToken ? user?.api_keys?.api_user_token || ('User.Subscriptions.APICredentials.NoTokenAvailable' | transloco) : '*************************'\"\n readonly\n aria-label=\"Api Token\" />\n <button type=\"button\"\n class=\"btn btn-outline-secondary\"\n (click)=\"toggleApiTokenVisibility()\">\n {{ showApiToken ? ('User.Subscriptions.APICredentials.Hide' | transloco) : ('User.Subscriptions.APICredentials.View' | transloco) }}\n </button>\n </div>\n </div>\n </div>\n <div class=\"col-12 col-md-6\">\n <div class=\"form-group\">\n <label class=\"form-label\" for=\"account-api-client-id\">{{ 'User.Account.APIUserId' | transloco }}</label>\n <div class=\"input-group\">\n <input type=\"text\"\n id=\"account-api-client-id\"\n name=\"api_client_id\"\n class=\"form-control\"\n [value]=\"showApiClientId ? user?.api_keys?.api_user_id || ('User.Subscriptions.APICredentials.NoClientIdAvailable' | transloco) : '*************************'\"\n readonly\n aria-label=\"Api Client Id\" />\n <button type=\"button\"\n class=\"btn btn-outline-secondary\"\n (click)=\"toggleApiClientIdVisibility()\">\n {{ showApiClientId ? ('User.Subscriptions.APICredentials.Hide' | transloco) : ('User.Subscriptions.APICredentials.View' | transloco) }}\n </button>\n </div>\n </div>\n </div>\n <div class=\"col-12 mt-3\">\n <div class=\"d-flex align-items-center gap-3\">\n <button type=\"button\"\n class=\"btn btn-outline-secondary\"\n (click)=\"refreshApiTokens()\"\n [disabled]=\"refreshingTokens\">\n <i class=\"fas fa-sync-alt me-2\" [class.fa-spin]=\"refreshingTokens\"></i>\n {{ refreshingTokens ? ('User.Subscriptions.APICredentials.Refreshing' | transloco) : ('User.Subscriptions.APICredentials.RefreshTokens' | transloco) }}\n </button>\n <div class=\"d-flex align-items-center gap-2\">\n @if (user?.api_keys?.api_hits !== null) {\n <span class=\"text-muted\">{{ 'User.Subscriptions.APICredentials.ApiHits' | transloco }}:</span>\n <span class=\"fw-bold\">{{ user.api_keys.api_hits | number }}</span>\n }\n @if (user?.api_keys?.api_hits_max !== null) {\n <span class=\"text-muted\">{{ 'User.Subscriptions.APICredentials.ApiHitsMax' | transloco }}:</span>\n <span class=\"fw-bold\">{{ user.api_keys.api_hits_max | number }}</span>\n }\n <!-- Show utilization percentage when both values exist -->\n @if (user?.api_keys?.api_hits !== null && user?.api_keys?.api_hits_max !== null && user?.api_keys?.api_hits_max > 0) {\n <span class=\"text-muted ms-2\">(</span>\n <span class=\"fw-bold\" [ngClass]=\"{\n 'text-success-muted': (user.api_keys.api_hits / user.api_keys.api_hits_max) <= 0.8,\n 'text-warning': (user.api_keys.api_hits / user.api_keys.api_hits_max) > 0.8 && (user.api_keys.api_hits / user.api_keys.api_hits_max) <= 0.9,\n 'text-danger': (user.api_keys.api_hits / user.api_keys.api_hits_max) > 0.9\n }\">\n {{ (user.api_keys.api_hits / user.api_keys.api_hits_max * 100) | number:'1.0-0' }}% consumed\n </span>\n <span class=\"text-muted\">)</span>\n }\n </div>\n </div>\n </div>\n <div class=\"col-12 mt-3\">\n <label class=\"form-label\">{{ 'User.Subscriptions.APICredentials.ScopeLabel' | transloco }}</label>\n <div class=\"d-flex align-items-center flex-wrap gap-2\">\n <div class=\"btn-group\" role=\"group\"\n [attr.aria-label]=\"'User.Subscriptions.APICredentials.ScopeLabel' | transloco\">\n <button type=\"button\" class=\"btn\"\n [ngClass]=\"currentApiTokenScope === 'read_only' ? 'btn-primary' : 'btn-outline-secondary'\"\n [disabled]=\"updatingScope\"\n (click)=\"changeApiTokenScope('read_only')\">\n {{ 'User.Subscriptions.APICredentials.ScopeReadOnly' | transloco }}\n </button>\n <button type=\"button\" class=\"btn\"\n [ngClass]=\"currentApiTokenScope === 'read_write' ? 'btn-primary' : 'btn-outline-secondary'\"\n [disabled]=\"updatingScope\"\n (click)=\"changeApiTokenScope('read_write')\">\n {{ 'User.Subscriptions.APICredentials.ScopeReadWrite' | transloco }}\n </button>\n </div>\n <span class=\"text-muted small\">{{ 'User.Subscriptions.APICredentials.ScopeHint' | transloco }}</span>\n </div>\n </div>\n </div>\n </section>\n </div>\n }\n <div class=\"col-12 mt-3\">\n <section id=\"registered-apps\"\n class=\"card p-4 h-auto\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>{{ 'User.Subscriptions.RegisteredApps.Title' | transloco }}</h2>\n <p>\n {{ 'User.Subscriptions.RegisteredApps.Description' | transloco }}\n </p>\n </div>\n <div class=\"col-12\">\n <pw-loader [isVisible]=\"loadingConnections\"></pw-loader>\n @if (!loadingConnections) {\n @if (connections.length === 0) {\n <p class=\"text-muted\">{{ 'User.Subscriptions.RegisteredApps.NoApps' | transloco }}</p>\n }\n @for (conn of connections; track conn.id) {\n <div class=\"d-flex align-items-center justify-content-between py-2 border-bottom\">\n <div>\n <span class=\"fw-bold me-3\">{{ conn.client_name }}</span>\n <span class=\"text-muted small\">\n {{ 'User.Subscriptions.RegisteredApps.ConnectedOn' | transloco }}\n {{ conn.created_at | date:'mediumDate' }}\n </span>\n <span class=\"text-muted small d-block\">\n {{ 'User.Subscriptions.RegisteredApps.LastUsed' | transloco }}\n @if (conn.last_used_at) {\n {{ conn.last_used_at | date:'medium' }}\n } @else {\n {{ 'User.Subscriptions.RegisteredApps.NeverUsed' | transloco }}\n }\n </span>\n </div>\n <button type=\"button\"\n class=\"btn btn-outline-danger btn-sm\"\n (click)=\"deregisterConnection(conn.id)\">\n {{ 'User.Subscriptions.RegisteredApps.Deregister' | transloco }}\n </button>\n </div>\n }\n }\n </div>\n </div>\n </section>\n </div>\n</div>\n<ng-template #content\n let-modal>\n <div class=\"card m-0\">\n <div class=\"card-content\">\n <div class=\"card-title\">\n <h3 class=\"modal-title\">{{ 'User.Profile.ProfilePicture' | transloco }}</h3>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n </button>\n </div>\n <div class=\"card-header\">\n <small> {{ 'User.Profile.PictureMessage' | transloco }}</small>\n <pw-image-cropper #profile\n aspectRatio=\"auto\"\n (imageSelectionEvent)=\"onImageSelection($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n </div>\n </div>\n</ng-template>\n","import { ChangeDetectorRef, Component, Injector, OnDestroy, OnInit } from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { ProductService } from '@posiwise/common-services';\nimport { Product, PRODUCT_CATEGORY, Subscription, User } from '@posiwise/common-utilities';\n\nimport cloneDeep from 'lodash/cloneDeep';\nimport sortBy from 'lodash/sortBy';\n\n@Component({\n selector: 'pw-add-subscription',\n templateUrl: './add-subscription.component.html',\n styleUrls: ['./add-subscription.component.scss'],\n\n standalone: false\n})\nexport class AddSubscriptionComponent extends AppBaseComponent implements OnInit, OnDestroy {\n private readonly singleProducts = [];\n\n private readonly enterpriseProducts = [];\n\n form: UntypedFormGroup;\n\n busy: boolean;\n isLoaded: boolean;\n selectedProduct: boolean;\n isPurchaseAttempted: boolean;\n userLoggedIn: boolean;\n\n availableProducts: Product[] = [];\n products: Product[];\n\n user: User;\n\n unitError: string;\n\n category = PRODUCT_CATEGORY;\n\n units = 1;\n\n subscribedPermissionKeys = [];\n\n currentSubscription: Subscription;\n\n subscriptionId: number;\n\n constructor(\n private readonly productService: ProductService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n }\n\n ngOnInit() {\n this.subscriptionId = Number(this.route.snapshot.queryParamMap.get('subscription_id'));\n this.getProducts();\n }\n\n private getProducts() {\n // Gets All the products\n this.productService\n .getProductList({}, this.subscriptionId, { only_relevant: true })\n .subscribe((response: Subscription) => {\n this.products = response.products || [];\n if (this.products?.length) {\n this.products = this.products.filter(x => x.active);\n }\n\n this.isLoaded = true;\n this.userStore().subscribe(user => {\n this.user = user;\n if (this.user) {\n const subs: Subscription[] = cloneDeep(this.user.subscriptions);\n subs.forEach(subscription => {\n subscription.products.forEach(product => {\n const prod = this.products.find(x => x.id === product.id);\n if (prod) {\n prod['is_subscribed'] = true;\n prod['purchased_units'] = product?.purchased_units;\n }\n });\n });\n\n this.subscribedPermissionKeys = Array.from(\n new Set(\n this.user.subscriptions\n .flatMap(x => x.products)\n .map(product => product.permission_key)\n )\n );\n\n // show category only if we have products\n const prodPermissionKeys = this.products.map(p => p.permission_key);\n this.subscribedPermissionKeys = this.subscribedPermissionKeys.filter(x =>\n prodPermissionKeys.includes(x)\n );\n\n // Filtering the product with the existing permission_key\n this.availableProducts = sortBy(\n this.getSingleCategoryProducts(),\n 'is_subscribed'\n );\n }\n this.cdr.markForCheck();\n });\n this.cdr.markForCheck();\n });\n }\n\n private getSingleCategoryProducts(category = this.subscribedPermissionKeys[0]) {\n return this.products.filter(x => category === x.permission_key);\n }\n\n onChangeCategory(category) {\n this.availableProducts = this.getSingleCategoryProducts(category);\n this.availableProducts = sortBy(this.availableProducts, 'is_subscribed');\n }\n\n onSelection(product) {\n this.router.navigate([\n `account/subscriptions/upgrade/${this.subscriptionId}/${product.id}`\n ]);\n }\n\n trackByProduct(_index: number, item: Product) {\n return item.id;\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n }\n}\n","@if (isLoaded && !selectedProduct) {\n <div\n class=\"mt-4\">\n <div class=\"d-flex align-items-start category-tabs-row\">\n <a aria-label=\"Navigate to Target\"\n [routerLink]=\"['/account/subscriptions']\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i>\n </a>\n <div class=\"d-flex category-tabs\">\n @for (item of subscribedPermissionKeys; track item; let i = $index) {\n <div class=\"toggle\"\n >\n <input type=\"radio\"\n name=\"sizeBy\"\n value=\"option{{ i + 1 }}\"\n id=\"option{{ i + 1 }}\"\n (change)=\"onChangeCategory(item)\"\n [checked]=\"i === 0\"\n aria-label=\"Size By\" />\n <label for=\"option{{ i + 1 }}\">{{ item }}</label>\n </div>\n }\n </div>\n </div>\n <ul class=\"row animated fadeIn d-flex\">\n @for (product of availableProducts; track trackByProduct($index, product)) {\n <li\n class=\"col-sm-12 col-md-6 col-xl-4 my-3 mt-sm-2\">\n <div class=\"card\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <h4 class=\"text-bold-500 primary mb-3\">{{ product.name }}</h4>\n @if (product.price_per_unit) {\n @if (product?.purchased_units) {\n <h5\n class=\"my-3 branding-color-1\">\n Currently {{ product.currency | currencySymbol\n }}{{\n (\n (product.purchased_units * product.price_per_unit) /\n 100\n ) | number:'1.2-2'\n }}&nbsp;/&nbsp;{{ product.billing_frequency }}\n </h5>\n }\n <h5 class=\"my-3\">\n Min\n {{product.min_units &gt; 1 ? (product.min_units + ' Seats'): (product.min_units + ' Seat')}}\n - {{ product.currency | currencySymbol\n }}{{\n ((product.min_units * product.price_per_unit) / 100) | number:'1.2-2'\n }}&nbsp;/&nbsp;{{ product.billing_frequency }}\n </h5>\n <h5 class=\"d-inline-block text-bold-600 mb-2\">\n {{ product.currency | currencySymbol\n }}{{ (product.price_per_unit / 100) | number:'1.2-2' }}&nbsp;/&nbsp;{{\n product.billing_frequency\n }}&nbsp;/&nbsp;seat\n </h5>\n } @else {\n <div class=\"d-inline-block text-bold-600 mb-2\">Free</div>\n }\n <p class=\"mb-2\"\n [innerHTML]=\"product?.description\"></p>\n </div>\n <div class=\"card-footer px-3\">\n @if (\n !product.is_subscribed &&\n !product.trial_subscription &&\n product.stripe_plan_id\n ) {\n <a aria-label=\"Navigate to Target\"\n (click)=\"onSelection(product)\"\n class=\"card-btn btn btn-raised me-1 btn-primary btn-sm\">\n {{ 'User.Subscriptions.Subscribe' | transloco }}\n </a>\n }\n @if (\n !product.is_subscribed &&\n product.trial_subscription &&\n product.stripe_plan_id\n ) {\n <div class=\"mt-3\"\n >\n <a aria-label=\"Navigate to Target\"\n (click)=\"onSelection(product)\"\n class=\"card-btn btn btn-raised me-1 btn-primary btn-sm\">\n {{ 'Button.Upgrade' | transloco }}\n </a>\n <span class=\"badge bg-secondary position-absolute trial-badge\">{{ 'User.Subscriptions.Trial' | transloco }}\n </span>\n </div>\n }\n @if (\n product.is_subscribed &&\n !product.trial_subscription &&\n !product.is_deleted\n ) {\n <span\n class=\"card-btn badge bg-default text-white\">\n {{ 'User.Subscriptions.Subscribed' | transloco }}\n </span>\n }\n @if (\n product.is_subscribed &&\n product.trial_subscription &&\n product.price_per_unit === 0 &&\n !product.is_deleted &&\n !product.stripe_plan_id\n ) {\n <span\n class=\"card-btn badge bg-default text-white\">\n Free\n </span>\n }\n @if (product.is_deleted) {\n <span\n class=\"card-btn badge bg-default text-white\">\n {{ 'User.Subscriptions.UnsubscribedButActive' | transloco }}\n </span>\n }\n </div>\n </div>\n </div>\n </li>\n }\n </ul>\n <div class=\"row\">\n <div class=\"col-12\">\n @if (availableProducts && availableProducts.length === 0) {\n <pw-no-data [withImage]=\"true\" message=\"No products available under this category.\"\n >\n </pw-no-data>\n }\n </div>\n </div>\n </div>\n}\n","/**\n * @summary Shows the saved credit card details of the user\n * @author anikets43\n *\n * Created at : 2020-02-08 16:56:18\n * Last modified : 2020-02-08 17:06:29\n */\n\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\n\n@Component({\n selector: 'pw-saved-card-details',\n templateUrl: './saved-card-details.component.html',\n styleUrls: ['./saved-card-details.component.scss'],\n\n standalone: false\n})\nexport class SavedCardDetailsComponent {\n /**\n * Credit Card details like brand, exp_month, exp_year, card_number\n */\n @Input() data: {\n brand?: string;\n exp_month?: string;\n exp_year?: string;\n card_number?: string;\n };\n\n /**\n * boolean: change payment option\n */\n @Input() isChangePayment: boolean;\n\n @Input() showNewCard: boolean;\n\n /**\n * Emitter: on payment change request\n */\n @Output() changeEvent: EventEmitter<boolean> = new EventEmitter();\n\n OnPaymentChange(value) {\n this.changeEvent.emit(value);\n }\n}\n","<div class=\"row\">\n @if (!showNewCard) {\n <div class=\"col-12\"\n >\n <h4 class=\"title\">Saved Card</h4>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">Type:</div>\n <div class=\"summary-right\">{{ data?.brand }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">Expiry:</div>\n <div class=\"summary-right\">{{ data.exp_month }} / {{ data.exp_year }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">Card Number:</div>\n <div class=\"summary-right\">{{ data?.card_number }}</div>\n </div>\n </div>\n }\n\n @if (!showNewCard) {\n <div class=\"col-12 mt-3\"\n >\n <button type=\"button\"\n class=\"btn btn-outline-primary btn-sm\"\n aria-label=\"Change Payment Option\"\n (click)=\"OnPaymentChange(true)\">\n Change Payment Option\n </button>\n </div>\n }\n</div>\n","import { Directive, HostListener, Optional, Self } from '@angular/core';\nimport { NgControl } from '@angular/forms';\n\n@Directive({\n selector: 'input[pwClearMaskedOnFocus]',\n standalone: false\n})\nexport class ClearMaskedOnFocusDirective {\n constructor(@Optional() @Self() private readonly control: NgControl) {}\n\n @HostListener('focus', ['$event'])\n onFocus(event: FocusEvent): void {\n const input = event.target as HTMLInputElement;\n const value = input?.value ?? '';\n if (/\\*{3,}/.test(value)) {\n this.control?.control?.setValue('');\n input.value = '';\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nconst ACRONYMS = new Set([\n 'id',\n 'url',\n 'api',\n 'aws',\n 'smtp',\n 'ssl',\n 'tls',\n 'iam',\n 'sso',\n 'sdk',\n 'jwt',\n 'oauth'\n]);\n\n@Pipe({ name: 'subscriptionNameById', standalone: false })\nexport class SubscriptionNameByIdPipe implements PipeTransform {\n transform(\n subs:\n | { id: number | string; organisation?: string; organization?: string; name?: string }[]\n | null\n | undefined,\n id: number | string | null | undefined\n ): string {\n if (!subs || id == null) return '';\n const found = subs.find(s => String(s.id) === String(id));\n return (found?.organisation || found?.organization || found?.name || '') as string;\n }\n}\n\n@Pipe({ name: 'credentialAvatarHue', standalone: false })\nexport class CredentialAvatarHuePipe implements PipeTransform {\n transform(value: string | null | undefined): number {\n if (!value) return 215;\n let hash = 0;\n for (let i = 0; i < value.length; i++) {\n hash = (hash * 31 + value.charCodeAt(i)) | 0;\n }\n return Math.abs(hash) % 360;\n }\n}\n\n@Pipe({ name: 'humanizeCredentialName', standalone: false })\nexport class HumanizeCredentialNamePipe implements PipeTransform {\n transform(value: string | null | undefined): string {\n if (!value) return '';\n return value\n .replace(/[_-]+/g, ' ')\n .split(' ')\n .filter(Boolean)\n .map(word =>\n ACRONYMS.has(word.toLowerCase())\n ? word.toUpperCase()\n : word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()\n )\n .join(' ');\n }\n}\n","import {\n ChangeDetectorRef,\n Component,\n Injector,\n OnDestroy,\n OnInit,\n ViewChild\n} from '@angular/core';\nimport { UntypedFormArray, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { SubscriptionService } from '@posiwise/common-services';\nimport { Subscription } from '@posiwise/common-utilities';\nimport { PasswordValidationComponent } from '@posiwise/shared-components';\n\nimport { forkJoin, from, Observable } from 'rxjs';\nimport { distinct } from 'rxjs/operators';\n\nimport { CredentialData } from '../../../shared/interface/user-module.interface';\n\n@Component({\n selector: 'pw-subscription-credential',\n templateUrl: './subscription-credential.component.html',\n styleUrls: ['./subscription-credential.component.scss'],\n\n standalone: false\n})\nexport class SubscriptionCredentialComponent extends AppBaseComponent implements OnInit, OnDestroy {\n private credentialToEdit;\n\n @ViewChild('passwordValidationModalForRevealCredential', { static: false })\n passwordValidationModalForRevealCredential: PasswordValidationComponent;\n\n @ViewChild('passwordValidationModalForEditCredential', { static: false })\n passwordValidationModalForEditCredential: PasswordValidationComponent;\n\n @ViewChild('passwordValidationModalForAddCredential', { static: false })\n passwordValidationModalForAddCredential: PasswordValidationComponent;\n\n form: UntypedFormGroup;\n\n data = [];\n\n subscriptionId: number;\n totalRecords: number;\n\n allSubscriptionCredentials: CredentialData[];\n availableCredentials: CredentialData[] = [];\n credentialsSelect: CredentialData[];\n updatedCredential: CredentialData;\n uniqueCredential = [];\n\n isEdit = false;\n submitted = false;\n buttonBusy = false;\n isLoaded = false;\n\n credentials = [];\n\n showForm = false;\n\n credentialSaved: string;\n credentialName: string;\n\n credentialToReveal;\n\n constructor(\n private readonly fb: UntypedFormBuilder,\n private readonly subscriptionService: SubscriptionService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n this.form = this.fb.group({\n credentials: this.fb.array([])\n });\n }\n\n ngOnInit() {\n this.route.params.subscribe(params => {\n this.subscriptionId = params['subscriptionId'];\n if (this.subscriptionId) {\n this.getAllCredentials();\n }\n this.cdr.markForCheck();\n });\n }\n\n get credentialsGroup() {\n return this.form.get('credentials') as UntypedFormArray;\n }\n\n /** Function to get all credentials */\n private getAllCredentials() {\n this.allSubscriptionCredentials = [];\n this.subscriptionService\n .getAllSubscriptionCredentials(this.subscriptionId)\n .subscribe(response => {\n this.allSubscriptionCredentials = response.subscription_credentials;\n this.totalRecords = response.object_count;\n this.getAllAvailableCredentials();\n this.cdr.markForCheck();\n })\n .add(() => {\n this.isLoaded = true;\n this.cdr.markForCheck();\n });\n }\n\n /** Function to get available Credentials */\n private getAllAvailableCredentials() {\n this.credentials = [];\n this.uniqueCredential = [];\n this.subscriptionService.getAllCredentials().subscribe(response => {\n this.availableCredentials = response.credentials;\n from(this.availableCredentials)\n .pipe(distinct(c => c.name))\n .subscribe(res => {\n this.uniqueCredential.push(res);\n });\n this.uniqueCredential.forEach(credential => {\n const subscriptionCredentialGroup = { credential_name: '', credentials: [] };\n this.allSubscriptionCredentials.forEach(subscriptionCredential => {\n if (credential.name === subscriptionCredential.name) {\n subscriptionCredentialGroup['credentials'].push(subscriptionCredential);\n }\n });\n if (subscriptionCredentialGroup['credentials'].length > 0) {\n subscriptionCredentialGroup['credential_name'] = credential.name;\n this.credentials.push(subscriptionCredentialGroup);\n }\n });\n this.cdr.markForCheck();\n });\n }\n\n /** Function to get credential on select */\n selectedOption(event) {\n this.credentialsGroup.clear();\n const credentialName = this.isEdit ? event : event.value;\n this.credentialsSelect = this.availableCredentials.filter(x => x.name === credentialName);\n this.credentialsSelect.forEach(adminCredential => {\n const subscriptionCredential = this.allSubscriptionCredentials.find(\n credential => credential?.credential_id === adminCredential?.id\n );\n adminCredential.value = subscriptionCredential?.value;\n adminCredential.subscription_credential_id = subscriptionCredential?.id;\n adminCredential.credential_id = subscriptionCredential?.credential_id;\n this.credentialsGroup.push(\n this.fb.group({\n subscription_id: [0, [Validators.required]],\n credential_id: [adminCredential?.id],\n field: [adminCredential?.field],\n description: [adminCredential?.description],\n value: [\n adminCredential?.value,\n adminCredential?.is_required ? [Validators.required] : []\n ],\n id: [subscriptionCredential?.id]\n })\n );\n });\n }\n\n /** Function to post credentials */\n saveCredentials() {\n this.submitted = true;\n this.buttonBusy = true;\n const subscription$: Observable<Subscription>[] = [];\n const isValid = this.form.value.credentials.every(\n (_x, i) => this.credentialsGroup.controls[i].valid === true\n );\n if (isValid) {\n this.form.value.credentials.forEach(credential => {\n if (credential?.value && !String(credential.value).startsWith('***')) {\n const data = {\n subscription_id: this.subscriptionId,\n credential_id: credential.credential_id,\n value: credential.value\n };\n const sub$ = credential?.id\n ? this.subscriptionService.editSubscriptionCredential(credential.id, data)\n : this.subscriptionService.postSubscriptionCredential(data);\n\n subscription$.push(sub$);\n }\n });\n\n forkJoin(subscription$)\n .subscribe(response => {\n if (response?.length) {\n this.toast.success(\n this.translation.translate(\n 'User.Subscriptions.SubscriptionCredentials.UpdateMessage'\n )\n );\n } else {\n this.toast.error(`Something went wrong while saving credentials`);\n }\n this.cdr.markForCheck();\n })\n .add(() => {\n this.submitted = false;\n this.buttonBusy = false;\n this.cdr.markForCheck();\n });\n } else {\n this.buttonBusy = false;\n }\n }\n\n revealCredentials(credential) {\n this.credentialToReveal = credential.credential_name;\n this.passwordValidationModalForRevealCredential.open();\n }\n\n hideCredentials() {\n this.credentialName = '';\n }\n\n showCredentials() {\n this.credentialName = this.credentialToReveal;\n }\n\n /** Function to get form controls */\n get f() {\n return this.form.controls;\n }\n\n onCancel() {\n this.getAllCredentials();\n this.submitted = false;\n this.form.reset();\n this.showForm = false;\n this.isEdit = false;\n this.credentialsSelect = [];\n this.data = [];\n this.credentialSaved = '';\n }\n\n // password popup for add credential\n openCredentialsForAdd() {\n this.passwordValidationModalForAddCredential.open();\n }\n\n // password popup for edit credential\n openCredentialsForEdit(credential) {\n this.credentialToEdit = credential;\n this.passwordValidationModalForEditCredential.open();\n }\n\n editCredentials() {\n this.showForm = true;\n this.isEdit = true;\n this.selectedOption(this.credentialToEdit);\n }\n\n showEditForm() {\n this.data = [];\n this.isEdit = false;\n this.showForm = true;\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n }\n}\n","@let subName = ((userService.getUserState() | async)?.currentUser?.subscriptions | subscriptionNameById: subscriptionId);\n\n@if (showForm) {\n <div class=\"row\">\n <div class=\"col-12 d-flex\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"onCancel()\"\n (keydown.enter)=\"onCancel()\"\n class=\"previous\">\n <i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i>\n </a>\n <h3 class=\"m-subheader__title m-subheader__title--separator\">\n <span>\n @if (subName) {\n {{ (isEdit ? 'User.Subscriptions.SubscriptionCredentials.EditTitle' : 'User.Subscriptions.SubscriptionCredentials.CreateTitle') | transloco: { name: subName } }}\n } @else {\n {{ (isEdit ? 'User.Subscriptions.SubscriptionCredentials.EditTitleFallback' : 'User.Subscriptions.SubscriptionCredentials.CreateTitleFallback') | transloco }}\n }\n </span>\n </h3>\n </div>\n </div>\n <p class=\"credential-page-subtitle text-muted mb-4\">\n @if (subName) {\n {{ 'User.Subscriptions.SubscriptionCredentials.FormSubtitle' | transloco: { name: subName } }}\n } @else {\n {{ 'User.Subscriptions.SubscriptionCredentials.FormSubtitleFallback' | transloco }}\n }\n </p>\n\n <section class=\"credential-form-shell\">\n @if (credentialsSelect?.length) {\n <div class=\"credential-form-band\"\n [style.--avatar-hue]=\"credentialsSelect[0].name | credentialAvatarHue\">\n <span class=\"credential-avatar\" aria-hidden=\"true\"\n [style.--avatar-hue]=\"credentialsSelect[0].name | credentialAvatarHue\">\n {{ (credentialsSelect[0].name | humanizeCredentialName).charAt(0) }}\n </span>\n <span class=\"credential-form-band-name\">\n {{ credentialsSelect[0].name | humanizeCredentialName }}\n </span>\n </div>\n }\n\n <form [formGroup]=\"form\" novalidate (ngSubmit)=\"saveCredentials()\" class=\"credential-form\">\n @if (!isEdit) {\n <div class=\"credential-form-row\">\n <pw-input-container\n [label]=\"'User.Subscriptions.SubscriptionCredentials.CredentialLabel' | transloco\"\n name=\"credentialType\">\n <p-select\n [options]=\"uniqueCredential\"\n [placeholder]=\"'User.Subscriptions.SubscriptionCredentials.CredentialPlaceholder' | transloco\"\n optionLabel=\"name\" optionValue=\"name\" appendTo=\"body\"\n (onChange)=\"selectedOption($event)\">\n </p-select>\n </pw-input-container>\n </div>\n }\n\n @if (credentialsSelect?.length) {\n <div formArrayName=\"credentials\" class=\"credential-form-fields\">\n @for (credential of credentialsGroup.controls; track credential; let i = $index) {\n <div [formGroupName]=\"i\" class=\"credential-form-row\">\n <pw-input-container\n [label]=\"credential.get('field').value | humanizeCredentialName\"\n [showTooltip]=\"!!credential.get('description').value\"\n [tooltipText]=\"credential.get('description').value\"\n tooltipPosition=\"top\"\n name=\"value\"\n [errorMsg]=\"'User.Subscriptions.SubscriptionCredentials.ValueError' | transloco\">\n <input type=\"text\" class=\"form-control\" formControlName=\"value\" pwClearMaskedOnFocus\n [ngClass]=\"{ 'is-invalid': submitted && credential.get('value').invalid }\"\n [id]=\"'credential-value-' + i\" [name]=\"'credential-value-' + i\"\n [attr.aria-label]=\"credential.get('field').value | humanizeCredentialName\" />\n </pw-input-container>\n </div>\n }\n </div>\n }\n\n <div class=\"credential-form-actions\">\n <button type=\"button\" class=\"btn btn-outline-default\" (click)=\"onCancel()\" (keydown.enter)=\"onCancel()\">\n {{ 'Button.Back' | transloco }}\n </button>\n @if (credentialsSelect?.length) {\n <button type=\"submit\" [buttonBusy]=\"buttonBusy\" class=\"btn btn-primary\">\n {{ 'Button.Submit' | transloco }}\n </button>\n }\n </div>\n </form>\n </section>\n}\n\n@if (!showForm) {\n <div class=\"row\">\n <div class=\"col-12 d-flex\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"back()\"\n (keydown.enter)=\"back()\"\n class=\"previous\">\n <i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i>\n </a>\n <h2 class=\"mt-3\">\n @if (subName) {\n {{ 'User.Subscriptions.SubscriptionCredentials.PageTitle' | transloco: { name: subName } }}\n } @else {\n {{ 'User.Subscriptions.SubscriptionCredentials.PageTitleFallback' | transloco }}\n }\n </h2>\n </div>\n <div class=\"col-12 col-md-12 text-end\">\n <button class=\"btn btn-sm btn-outline-primary\" (click)=\"openCredentialsForAdd()\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'User.Subscriptions.SubscriptionCredentials.AddButton' | transloco }}\n </button>\n </div>\n </div>\n <p class=\"credential-page-subtitle text-muted mb-4\">\n @if (subName) {\n {{ 'User.Subscriptions.SubscriptionCredentials.ListSubtitle' | transloco: { name: subName } }}\n } @else {\n {{ 'User.Subscriptions.SubscriptionCredentials.ListSubtitleFallback' | transloco }}\n }\n </p>\n\n <pw-loader [isVisible]=\"!isLoaded\"></pw-loader>\n\n @if (isLoaded) {\n @if (allSubscriptionCredentials?.length === 0) {\n <div class=\"credential-empty\">\n <pw-no-data [withImage]=\"true\"\n [message]=\"'User.Subscriptions.SubscriptionCredentials.NoDataMessage' | transloco\"></pw-no-data>\n </div>\n } @else {\n <ul class=\"credential-grid\">\n @for (credential of credentials; track credential.credential_name) {\n <li class=\"credential-card\">\n <header class=\"credential-card-header\"\n [style.--avatar-hue]=\"credential.credential_name | credentialAvatarHue\">\n <span class=\"credential-avatar\" aria-hidden=\"true\">\n {{ (credential.credential_name | humanizeCredentialName).charAt(0) }}\n </span>\n <h3 class=\"credential-card-title\">\n {{ credential.credential_name | humanizeCredentialName }}\n </h3>\n <button type=\"button\" class=\"credential-icon-btn\"\n [attr.aria-label]=\"'User.Subscriptions.SubscriptionCredentials.EditAriaLabel' | transloco\"\n (click)=\"openCredentialsForEdit(credential.credential_name)\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n </button>\n </header>\n <dl class=\"credential-card-fields\">\n @for (entry of credential.credentials; track entry.id) {\n <div class=\"credential-card-row\">\n <dt>{{ entry.field | humanizeCredentialName }}</dt>\n <dd><code class=\"credential-card-value\">{{ entry?.value }}</code></dd>\n </div>\n }\n </dl>\n </li>\n }\n </ul>\n }\n }\n}\n\n<pw-password-validation #passwordValidationModalForEditCredential (successEvent)=\"editCredentials()\"></pw-password-validation>\n<pw-password-validation #passwordValidationModalForAddCredential (successEvent)=\"showEditForm()\"></pw-password-validation>\n","/**\n * Thin wrapper around the Braintree Web Drop-in script.\n * Mounts a Drop-in instance into a host DOM element and resolves the\n * payment_method_nonce on submit. Loaded as a CDN script (mirrors the Stripe\n * pattern in the same component) — see UpdatePaymentDetailsComponent.\n */\n\nconst DROPIN_CDN_URL = 'https://js.braintreegateway.com/web/dropin/1.43.0/js/dropin.min.js';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\ndeclare const braintree: {\n dropin: {\n create: (options: BraintreeDropinCreateOptions) => Promise<BraintreeDropinInstance>;\n };\n};\n\nexport interface BraintreeDropinCreateOptions {\n authorization: string;\n container: string | HTMLElement;\n card?: { cardholderName?: { required: boolean } };\n}\n\nexport interface BraintreeDropinInstance {\n requestPaymentMethod: () => Promise<{ nonce: string; type: string }>;\n teardown: () => Promise<void>;\n}\n\nexport class BraintreeDropinHelper {\n private dropinInstance: BraintreeDropinInstance | null = null;\n\n /**\n * Loads the Drop-in script into <head> if not already present, then mounts\n * a Drop-in instance bound to clientToken into the host element.\n */\n async mount(host: HTMLElement, clientToken: string): Promise<void> {\n await this.ensureScriptLoaded();\n await this.teardown();\n this.dropinInstance = await braintree.dropin.create({\n authorization: clientToken,\n container: host\n });\n }\n\n async requestNonce(): Promise<string> {\n if (!this.dropinInstance) {\n throw new Error('braintree_dropin_not_mounted');\n }\n const result = await this.dropinInstance.requestPaymentMethod();\n return result.nonce;\n }\n\n async teardown(): Promise<void> {\n if (!this.dropinInstance) {\n return;\n }\n try {\n await this.dropinInstance.teardown();\n } finally {\n this.dropinInstance = null;\n }\n }\n\n private ensureScriptLoaded(): Promise<void> {\n if (typeof window === 'undefined') {\n return Promise.resolve();\n }\n if ((window as unknown as { braintree?: unknown }).braintree) {\n return Promise.resolve();\n }\n const existing = document.querySelector(\n `script[src=\"${DROPIN_CDN_URL}\"]`\n ) as HTMLScriptElement | null;\n if (existing) {\n return new Promise<void>((resolve, reject) => {\n existing.addEventListener('load', () => resolve(), { once: true });\n existing.addEventListener(\n 'error',\n () => reject(new Error('braintree_script_load_failed')),\n { once: true }\n );\n });\n }\n return new Promise<void>((resolve, reject) => {\n const script = document.createElement('script');\n script.src = DROPIN_CDN_URL;\n script.async = true;\n script.addEventListener('load', () => resolve(), { once: true });\n script.addEventListener(\n 'error',\n () => reject(new Error('braintree_script_load_failed')),\n { once: true }\n );\n document.head.appendChild(script);\n });\n }\n}\n","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n Injector,\n OnDestroy,\n OnInit,\n ViewChild\n} from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport {\n ProductService,\n ScriptLoaderService,\n SubscriptionService\n} from '@posiwise/common-services';\nimport { HelperService } from '@posiwise/helper-service';\nimport { ValidateForm } from '@posiwise/utils';\n\nimport { StatusCodes } from 'http-status-codes';\nimport { forkJoin } from 'rxjs';\n\nimport { CardDetails, StripeCardResponse } from '../../../shared/interface/user-module.interface';\n\nimport { BraintreeDropinHelper } from './braintree-dropin.helper';\nimport { BraintreeCardSummary, StripeJsApi } from './update-payment-details.types';\n\ndeclare const Stripe: StripeJsApi;\n\n@Component({\n selector: 'pw-update-payment-details',\n templateUrl: './update-payment-details.component.html',\n styleUrls: ['./update-payment-details.component.scss'],\n\n standalone: false\n})\nexport class UpdatePaymentDetailsComponent extends AppBaseComponent implements OnInit, OnDestroy {\n form: UntypedFormGroup;\n\n years = [];\n months = [];\n\n busy: boolean;\n isChangePayment: boolean;\n\n cardDetails: CardDetails | null = null;\n secondaryCard: BraintreeCardSummary | null = null;\n showBraintreeForm = false;\n braintreeBusy = false;\n\n loading = true;\n\n errorMessage: string;\n stripePublishKey: string;\n errorMsg: string;\n\n subscriptionId: number;\n productId: number;\n\n @ViewChild('braintreeContainer') braintreeContainer?: ElementRef<HTMLDivElement>;\n\n private readonly braintreeHelper = new BraintreeDropinHelper();\n\n constructor(\n private readonly fb: UntypedFormBuilder,\n private readonly scriptLoader: ScriptLoaderService,\n private readonly productService: ProductService,\n private readonly subscriptionService: SubscriptionService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n\n this.route.params.subscribe(response => {\n this.subscriptionId = Number(response['subscriptionId']);\n this.productId = Number(response['productId']);\n this.refreshPaymentMethods();\n this.cdr.markForCheck();\n });\n\n this.form = this.fb.group({\n card_number: ['', Validators.required],\n cvc: ['', Validators.required],\n exp_month: ['', Validators.required],\n exp_year: ['', Validators.required]\n });\n }\n\n ngOnInit() {\n this.scriptLoader.loadScriptOnce('head', 'https://js.stripe.com/v2/');\n this.years = HelperService.getYears();\n this.months = HelperService.getMonths();\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n this.braintreeHelper.teardown();\n }\n\n private refreshPaymentMethods() {\n forkJoin({\n paymentMethods: this.subscriptionService.getPaymentMethods(this.subscriptionId),\n product: this.productService.getProductById(this.productId)\n })\n .subscribe(response => {\n this.stripePublishKey = response.product.stripe_publishable_key;\n if (response.paymentMethods.status === StatusCodes.OK) {\n const data = response.paymentMethods.data || {};\n this.cardDetails = data.primary || null;\n this.secondaryCard = data.secondary || null;\n }\n this.cdr.markForCheck();\n })\n .add(() => {\n this.loading = false;\n this.cdr.markForCheck();\n });\n }\n\n onUpdatePaymentDetailsCancel() {\n this.router.navigate(['/account/subscriptions']);\n }\n\n @ValidateForm('form')\n onSave() {\n this.busy = true;\n this.errorMsg = '';\n const cardDetails = {\n number: this.form.value.card_number,\n cvc: this.form.value.cvc,\n exp_month: this.form.value.exp_month,\n exp_year: this.form.value.exp_year\n };\n Stripe.setPublishableKey(this.stripePublishKey);\n Stripe.card.createToken(cardDetails, (status, res) => this.onStripeToken(status, res));\n }\n\n private onStripeToken(status: number, res: StripeCardResponse) {\n if (status !== 200) {\n this.toast.error(res?.error?.message);\n this.busy = false;\n this.cdr.markForCheck();\n return;\n }\n this.subscriptionService\n .updateCardDetails(this.form.value, this.subscriptionId)\n .subscribe({\n next: response => {\n if (response.error) {\n this.toast.error(response.error.errors[0].message);\n } else if (response.status === StatusCodes.CREATED) {\n this.toast.success(response.message);\n }\n this.cancel();\n }\n })\n .add(() => {\n this.busy = false;\n this.cdr.markForCheck();\n });\n }\n\n cancel() {\n this.router.navigate(['/account/subscriptions']);\n }\n\n onChange(value) {\n this.isChangePayment = value;\n }\n\n async startBraintreeFlow() {\n this.showBraintreeForm = true;\n this.cdr.markForCheck();\n try {\n const tokenResponse = await this.subscriptionService\n .getBraintreeClientToken(this.subscriptionId)\n .toPromise();\n const clientToken = tokenResponse?.data?.client_token;\n await this.braintreeHelper.mount(this.braintreeContainer.nativeElement, clientToken);\n } catch {\n this.toast.error('PAYMENTS.BRAINTREE.SCRIPT_FAILED');\n this.showBraintreeForm = false;\n } finally {\n this.cdr.markForCheck();\n }\n }\n\n async submitBraintree() {\n this.braintreeBusy = true;\n try {\n const nonce = await this.braintreeHelper.requestNonce();\n this.subscriptionService\n .registerBraintreePaymentMethod(this.subscriptionId, nonce)\n .subscribe({\n next: response => {\n if (response?.status === StatusCodes.CREATED) {\n this.toast.success(response.message);\n // Refresh the user payload so payment_methods_status is re-evaluated\n // and the secondary-payment modal in UserService stops firing.\n this.userService.getUserInfo().subscribe();\n this.showBraintreeForm = false;\n this.refreshPaymentMethods();\n } else if (response?.error) {\n this.toast.error(response.error.errors?.[0]?.message);\n }\n this.cdr.markForCheck();\n }\n })\n .add(() => {\n this.braintreeBusy = false;\n this.cdr.markForCheck();\n });\n } catch {\n this.braintreeBusy = false;\n this.toast.error('PAYMENTS.BRAINTREE.NONCE_FAILED');\n }\n }\n\n cancelBraintreeFlow() {\n this.braintreeHelper.teardown();\n this.showBraintreeForm = false;\n this.cdr.markForCheck();\n }\n}\n","<div class=\"container-fluid\">\n <div class=\"card-block\">\n <div class=\"row\">\n <div class=\"col-lg-12 ps-0\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"back()\"\n class=\"previous float-start\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n <h4 class=\"form-section my-3\">\n <i class=\"ft-edit\" aria-hidden=\"true\"></i>\n {{ 'User.Payments.UpdateTitle' | transloco }}\n </h4>\n </div>\n </div>\n\n <div class=\"row g-3 mt-1\">\n <!-- Primary payment method (Stripe) -->\n <div class=\"col-12 col-lg-6\">\n <div class=\"card payment-left p-3 h-100\">\n <div class=\"card-body\">\n <h5 class=\"section-title\">{{ 'User.Payments.Primary.Title' | transloco }}</h5>\n <p class=\"text-muted\">{{ 'User.Payments.Primary.Description' | transloco }}</p>\n\n @if (errorMsg) {\n <div class=\"alert alert-danger\">{{ errorMsg }}</div>\n }\n @if (!isChangePayment && cardDetails) {\n <pw-saved-card-details [data]=\"cardDetails\"\n (changeEvent)=\"onChange($event)\">\n </pw-saved-card-details>\n }\n\n @if (loading) {\n <div class=\"text-center\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n\n @if ((!cardDetails && !loading) || isChangePayment) {\n <form [formGroup]=\"form\" (ngSubmit)=\"onSave()\">\n <h4 class=\"title\">{{ 'User.Payments.Primary.NewCard' | transloco }}</h4>\n <div class=\"row\">\n <div class=\"col-md-9\">\n <div class=\"mb-3\">\n <label for=\"update-payment-card_number\">{{ 'User.Payments.CardNumber' | transloco }}</label>\n <input type=\"text\"\n id=\"update-payment-card_number\"\n class=\"form-control\"\n formControlName=\"card_number\"\n [placeholder]=\"'User.Payments.CardNumber' | transloco\"\n name=\"card_number\"\n aria-label=\"Card Number\" />\n @if (form.get('card_number').touched && form.get('card_number').errors?.required) {\n <div class=\"danger\"><span>{{ 'User.Payments.Errors.CardNumberRequired' | transloco }}</span></div>\n }\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"mb-3\">\n <label for=\"update-payment-cvc\">{{ 'User.Payments.Cvc' | transloco }}</label>\n <input type=\"text\"\n id=\"update-payment-cvc\"\n class=\"form-control\"\n formControlName=\"cvc\"\n [placeholder]=\"'User.Payments.Cvc' | transloco\"\n name=\"cvc\"\n aria-label=\"Cvc\" />\n @if (form.get('cvc').touched && form.get('cvc').errors?.required) {\n <div class=\"danger\"><span>{{ 'User.Payments.Errors.CvcRequired' | transloco }}</span></div>\n }\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only\" id=\"update-payment-exp_month-label\" class=\"pw-label-style\">{{ 'User.Payments.ExpMonth' | transloco }}</span>\n <p-select\n [attr.aria-labelledby]=\"'update-payment-exp_month-label'\"\n [options]=\"months\"\n [appendTo]=\"'body'\"\n formControlName=\"exp_month\"\n [placeholder]=\"'User.Payments.ExpMonth' | transloco\"\n optionValue=\"value\"\n optionLabel=\"value\">\n </p-select>\n @if (form.get('exp_month').touched && form.get('exp_month').errors?.required) {\n <div class=\"danger\"><span>{{ 'User.Payments.Errors.ExpMonthRequired' | transloco }}</span></div>\n }\n </div>\n </div>\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only\" id=\"update-payment-exp_year-label\">{{ 'User.Payments.ExpYear' | transloco }}</span>\n <p-select\n [attr.aria-labelledby]=\"'update-payment-exp_year-label'\"\n [options]=\"years\"\n formControlName=\"exp_year\"\n [placeholder]=\"'User.Payments.ExpYear' | transloco\"\n optionValue=\"value\"\n [appendTo]=\"'body'\"\n optionLabel=\"value\">\n </p-select>\n @if (form.get('exp_year')?.touched && form.get('exp_year')?.errors?.['required']) {\n <div class=\"danger\"><span>{{ 'User.Payments.Errors.ExpYearRequired' | transloco }}</span></div>\n }\n </div>\n </div>\n <div class=\"col-12 text-center mt-4\">\n <img src=\"/assets/img/icons/powered_by_stripe_v2.png\"\n class=\"payment-provider\"\n alt=\"\" />\n </div>\n <div class=\"col-12 mt-4 text-end\">\n <button type=\"button\"\n (click)=\"cancel()\"\n class=\"btn btn-outline-default me-2\">\n {{ 'User.Payments.Cancel' | transloco }}\n </button>\n <button type=\"submit\"\n class=\"btn btn-primary\"\n [buttonBusy]=\"busy\">\n {{ 'User.Payments.Submit' | transloco }}\n </button>\n </div>\n </div>\n </form>\n }\n </div>\n </div>\n </div>\n\n <!-- Secondary payment method (Braintree) -->\n <div class=\"col-12 col-lg-6\">\n <div class=\"card payment-right p-3 h-100\">\n <div class=\"card-body\">\n <h5 class=\"section-title\">{{ 'User.Payments.Secondary.Title' | transloco }}</h5>\n <p class=\"alert alert-info\" [pTooltip]=\"'User.Payments.Secondary.Tooltip' | transloco\" tooltipPosition=\"top\" appendTo=\"body\">\n {{ 'User.Payments.Secondary.Callout' | transloco }}\n </p>\n\n @if (loading) {\n <div class=\"text-center\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n\n @if (secondaryCard && !showBraintreeForm) {\n <pw-saved-card-details [data]=\"secondaryCard\"\n (changeEvent)=\"startBraintreeFlow()\">\n </pw-saved-card-details>\n }\n\n @if (!secondaryCard && !showBraintreeForm && !loading) {\n <button type=\"button\"\n class=\"btn btn-primary\"\n (click)=\"startBraintreeFlow()\">\n {{ 'User.Payments.Secondary.AddCta' | transloco }}\n </button>\n }\n\n @if (showBraintreeForm) {\n <div #braintreeContainer class=\"braintree-dropin-container mt-3\"></div>\n <div class=\"col-12 mt-4 text-end\">\n <button type=\"button\"\n (click)=\"cancelBraintreeFlow()\"\n class=\"btn btn-outline-default me-2\">\n {{ 'User.Payments.Cancel' | transloco }}\n </button>\n <button type=\"button\"\n class=\"btn btn-primary\"\n [buttonBusy]=\"braintreeBusy\"\n (click)=\"submitBraintree()\">\n {{ 'User.Payments.Submit' | transloco }}\n </button>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n\n </div>\n</div>\n","import {\n ChangeDetectorRef,\n Component,\n Injector,\n OnDestroy,\n OnInit,\n ViewChild\n} from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AppState, GetUser } from '@posiwise/app-store';\nimport {\n FormHelperService,\n ProductService,\n ScriptLoaderService,\n SubscriptionService\n} from '@posiwise/common-services';\nimport { Product, Subscription, User } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\nimport { ConfirmDialogService, PasswordValidationComponent } from '@posiwise/shared-components';\nimport { ValidateForm } from '@posiwise/utils';\n\nimport { StatusCodes } from 'http-status-codes';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\nimport { Store } from '@ngrx/store';\n\nimport { CardDetails } from '../../../shared/interface/user-module.interface';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\ndeclare let Stripe;\n\n@Component({\n selector: 'pw-upgrade-subscription',\n templateUrl: './upgrade-subscription.component.html',\n styleUrls: ['./upgrade-subscription.component.scss'],\n\n standalone: false\n})\nexport class UpgradeSubscriptionComponent extends AppBaseComponent implements OnInit, OnDestroy {\n @ViewChild('passwordValidationModal', { static: true })\n passwordValidationModal: PasswordValidationComponent;\n\n form: UntypedFormGroup;\n\n product: Product;\n subscription: Subscription;\n user: User;\n cardDetails: CardDetails;\n\n units: number;\n subscriptionId: number;\n productId: number;\n\n unitError: string;\n password: string;\n stripePublishKey: string;\n\n busy: boolean;\n isPurchaseAttempted: boolean;\n\n months = [];\n years = [];\n\n showNewCard: boolean;\n passwordModalVisible: boolean;\n\n errorMsg;\n\n get totalAmount() {\n if (this.product) {\n const units = Number(this.form.get('units').value);\n // eslint-disable-next-line no-restricted-globals\n if (!Number.isNaN(units)) {\n return (units * this.product.price_per_unit) / 100;\n }\n }\n\n return 0;\n }\n\n constructor(\n injector: Injector,\n private readonly productService: ProductService,\n private readonly fb: UntypedFormBuilder,\n private readonly modalService: NgbModal,\n private readonly subscriptionService: SubscriptionService,\n private readonly store: Store<AppState>,\n private readonly scriptLoader: ScriptLoaderService,\n private readonly cdr: ChangeDetectorRef,\n private readonly confirmDialog: ConfirmDialogService\n ) {\n super(injector);\n this.form = this.fb.group({\n card_number: ['', Validators.required],\n units: [],\n cvc: ['', Validators.required],\n exp_month: ['', Validators.required],\n exp_year: ['', Validators.required]\n });\n }\n\n ngOnInit(): void {\n this.scriptLoader.loadScriptOnce('head', 'https://js.stripe.com/v2/');\n this.years = HelperService.getYears();\n this.months = HelperService.getMonths();\n\n this.userStore().subscribe(user => {\n this.user = user;\n this.cdr.markForCheck();\n });\n\n this.route.params.subscribe(response => {\n this.subscriptionId = +response['subscriptionId'];\n this.productId = +response['productId'];\n this.getSubscriptionDetails();\n this.getCardDetails(this.subscriptionId);\n this.cdr.markForCheck();\n });\n }\n\n getSubscriptionDetails() {\n this.subscriptionService\n .getById(this.subscriptionId)\n .subscribe(response => {\n this.subscription = response;\n const product = this.subscription.products.find(x => x.id === this.productId);\n this.form.patchValue({\n units: product?.purchased_units\n });\n\n this.units = this.form.get('units').value;\n this.cdr.markForCheck();\n })\n .add(() => {\n this.getProductDetails();\n });\n }\n\n getProductDetails() {\n this.productService.getProductById(this.productId).subscribe(response => {\n this.product = response;\n this.stripePublishKey = response?.stripe_publishable_key;\n if (response?.stripe_publishable_key) {\n Stripe.setPublishableKey(response.stripe_publishable_key);\n }\n const prodUnits =\n this.units > this.product.min_units ? this.units : this.product.min_units || 1;\n\n this.form.patchValue({\n units: prodUnits\n });\n\n this.units = this.form.get('units').value;\n this.cdr.markForCheck();\n });\n }\n\n onMaxReached(event) {\n if (event) {\n this.unitError = `Maximum is ${this.units}`;\n }\n }\n\n onMinReached(event) {\n if (event) {\n this.unitError = `Minimum is ${this.subscription.min_units || this.product.min_units}`;\n }\n }\n\n onUnitChange(event) {\n this.units = event;\n this.form.patchValue({\n units: event\n });\n this.unitError = '';\n }\n\n onValidatePassword(isSuccess: boolean) {\n if (isSuccess) {\n this.onPurchaseSubmit();\n this.password = null;\n this.modalService.dismissAll();\n }\n }\n\n private postCreateToken(cardToken) {\n const data = {\n stripe_token: cardToken,\n product_id: this.product.id,\n units: this.form.get('units').value || 1,\n subscription_id: this.subscriptionId\n };\n this.userService\n .addNewSubscriptionUsingStripe(data)\n .subscribe({\n next: () => {\n this.toast.success(\n this.translation.translate('User.Subscriptions.SubscriptionPurchased')\n );\n this.router.navigate(['/account/subscriptions']);\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n },\n error: () => {\n this.busy = false;\n this.cdr.markForCheck();\n }\n })\n .add(() => {\n this.busy = false;\n this.cdr.markForCheck();\n });\n }\n\n attemptPurchase() {\n if (this.user.has_password) {\n this.passwordValidationModal.open();\n } else {\n this.noPasswordModal();\n }\n }\n\n private onPurchaseSubmit() {\n this.busy = true;\n this.passwordModalVisible = true;\n if (this.subscription.stripe_customer_id) {\n if (this.showNewCard) {\n this.updateCardDetails();\n } else {\n this.enrollUserToSubscription();\n }\n } else if (this.form.valid) {\n const cardDetails = {\n number: this.form.value.card_number,\n cvc: this.form.value.cvc,\n exp_month: this.form.value.exp_month,\n exp_year: this.form.value.exp_year\n };\n // Get publishable key from product get id\n Stripe.card.createToken(\n cardDetails,\n (status, response) => {\n if (status === StatusCodes.OK) {\n const cardToken = response.id;\n this.postCreateToken(cardToken);\n } else {\n this.toast.error(response?.error?.message, '', { disableTimeOut: true });\n this.busy = false;\n this.isPurchaseAttempted = false;\n }\n this.cdr.markForCheck();\n },\n () => {\n this.busy = false;\n this.isPurchaseAttempted = false;\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n }\n );\n }\n }\n\n private enrollUserToSubscription() {\n const data = {\n product_id: this.product.id,\n units: this.form.get('units').value,\n subscription_id: this.subscriptionId\n };\n\n this.subscriptionService.postSubscription(data).subscribe({\n next: response => {\n this.store.dispatch(new GetUser());\n if (response.id) {\n this.router.navigate(['/account/subscriptions']);\n this.toast.success(\n this.translation.translate('User.Subscriptions.SubscriptionPurchased')\n );\n this.isPurchaseAttempted = false;\n this.modalService.dismissAll();\n this.back();\n }\n this.cdr.markForCheck();\n },\n error: () => {\n this.busy = false;\n this.isPurchaseAttempted = false;\n this.cdr.markForCheck();\n },\n complete: () => {\n this.busy = !this.busy;\n this.cdr.markForCheck();\n }\n });\n }\n\n private noPasswordModal() {\n this.confirmDialog.open({\n title: 'Set Password',\n text: '<div>Please set a password before changing the subscription in the account section.</div><br /><strong><a href=\"/account/details\">Click here to reset</a></strong>',\n confirmOnly: true\n });\n }\n\n private getCardDetails(subscriptionId: number) {\n this.subscriptionService.getCardDetails(subscriptionId).subscribe(data => {\n this.cardDetails = data.data || null;\n this.form.patchValue({\n units: this.units,\n card_number: this.cardDetails?.card_number,\n cvc: this.cardDetails?.cvc,\n exp_month: this.cardDetails?.exp_month || '',\n exp_year: this.cardDetails?.exp_year || ''\n });\n this.cdr.markForCheck();\n });\n }\n\n onDiscardToggle() {\n this.form.markAllAsTouched();\n FormHelperService.markFormAsPristine(this.form);\n }\n\n @ValidateForm('form')\n updateCardDetails() {\n const cardDetails = {\n number: this.form.value.card_number,\n cvc: this.form.value.cvc,\n exp_month: this.form.value.exp_month,\n exp_year: this.form.value.exp_year\n };\n Stripe.setPublishableKey(this.stripePublishKey);\n\n Stripe.card.createToken(cardDetails, (status, res) => {\n if (status !== 200) {\n this.toast.error(res.error.message);\n } else {\n this.subscriptionService\n .updateCardDetails(this.form.value, this.subscriptionId)\n .subscribe({\n next: response => {\n if (response.error) {\n const err = response.error.errors[0].message;\n this.toast.error(err);\n } else if (response.status === StatusCodes.CREATED) {\n this.enrollUserToSubscription();\n this.toast.success(response.message);\n }\n this.cdr.markForCheck();\n },\n error: error => {\n this.errorMsg = HelperService.getErrorMessage(error);\n this.toast.error(this.errorMsg);\n this.cdr.markForCheck();\n }\n });\n }\n this.cdr.markForCheck();\n });\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n }\n}\n","<h4 class=\"form-section m-3\">\n <i class=\"ft-check-circle\" aria-hidden=\"true\"></i> {{ 'Button.Payment' | transloco }}\n</h4>\n<div class=\"card-block\">\n <!-- Show Payment Page when there is user.has_stripe_account===false -->\n <ng-container>\n <form class=\"form\"\n (ngSubmit)=\"attemptPurchase()\"\n [formGroup]=\"form\">\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"form-body p-3 payment-left card pb-0\">\n <div class=\"card-body\">\n @if (product?.max_units > 1) {\n <div class=\"row\"\n >\n <div class=\"col-12\">\n <div class=\"mb-3\">\n <h4 class=\"title\">\n {{ 'User.Subscriptions.LicensesRequired' | transloco }}\n </h4>\n <div class=\"row btns-row\">\n <div class=\"col-md-4 col-8\">\n <pw-number-picker name=\"number-picker\"\n [(value)]=\"units\"\n [min]=\"subscription.min_units || product.min_units\"\n [max]=\"product.max_units\"\n step=\"1\"\n postfix=\"Units\"\n placeholder=\"Total Licenses\"\n [inputReadOnly]=\"false\"\n size=\"small\"\n pickStartAfter=\"500\"\n pickTimer=\"100\"\n [arrowKeys]=\"true\"\n (minReached)=\"onMinReached($event)\"\n (maxReached)=\"onMaxReached($event)\"\n (valueChange)=\"onUnitChange($event)\">\n </pw-number-picker>\n </div>\n </div>\n <div class=\"text-center\">\n <small class=\"form-text text-muted danger\">\n {{ unitError }}\n </small>\n </div>\n </div>\n <p>\n If you proceed, your credit card will be charged\n <strong>{{ product.currency }}\n {{ totalAmount | number:'1.2-2' }}</strong>\n </p>\n </div>\n </div>\n }\n <!-- Shows Saved Card: Shows when user has card details and not trying to update the card details -->\n @if (cardDetails) {\n <pw-saved-card-details [data]=\"cardDetails\"\n (changeEvent)=\"showNewCard = $event\"\n [showNewCard]=\"showNewCard\">\n </pw-saved-card-details>\n }\n <!-- Add New Payment Starts, opens up when user doesn't have stripe account or tries to change the\n card details -->\n @if ((user && !cardDetails) || (cardDetails && showNewCard)) {\n <h4 class=\"title\">\n {{ 'User.Subscriptions.NewCard' | transloco }}?\n </h4>\n <div class=\"row\">\n <div class=\"col-md-9\">\n <div class=\"mb-3\">\n <label for=\"upgrade-subscription-card_number\">{{\n 'User.Subscriptions.CardNumber' | transloco\n }}</label>\n <input type=\"text\"\n id=\"upgrade-subscription-card_number\"\n class=\"form-control\"\n formControlName=\"card_number\"\n placeholder=\"Card Number\"\n name=\"card_number\"\n aria-label=\"Card Number\" />\n @if (\n form.get('card_number').touched &&\n form.get('card_number').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter card number. </span>\n </div>\n }\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"mb-3\">\n <label for=\"upgrade-subscription-cvc\">{{\n 'User.Subscriptions.CVC' | transloco\n }}</label>\n <input type=\"text\"\n id=\"upgrade-subscription-cvc\"\n class=\"form-control\"\n formControlName=\"cvc\"\n placeholder=\"CVC\"\n name=\"cvc\"\n aria-label=\"CVC\" />\n @if (\n form.get('cvc').touched &&\n form.get('cvc').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter cvc. </span>\n </div>\n }\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only pw-label-style\" id=\"upgrade-subscription-exp_month-label\">Exp. Month</span>\n <p-select\n [attr.aria-labelledby]=\"'upgrade-subscription-exp_month-label'\"\n [options]=\"months\"\n formControlName=\"exp_month\"\n [placeholder]=\"'Exp. Month'\"\n optionValue=\"value\"\n [appendTo]=\"'body'\"\n optionLabel=\"value\">\n </p-select>\n @if (\n form.get('exp_month').touched &&\n form.get('exp_month').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter expiry month. </span>\n </div>\n }\n </div>\n </div>\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only\" id=\"upgrade-subscription-exp_year-label\">Exp. Year</span>\n <p-select\n [attr.aria-labelledby]=\"'upgrade-subscription-exp_year-label'\"\n [options]=\"years\"\n formControlName=\"exp_year\"\n [placeholder]=\"'Exp. Year'\"\n [appendTo]=\"'body'\"\n optionValue=\"value\"\n optionLabel=\"value\">\n </p-select>\n @if (\n form.get('exp_year').touched &&\n form.get('exp_year').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter expiry year. </span>\n </div>\n }\n </div>\n </div>\n @if (cardDetails) {\n <div class=\"col-12 mt-2\"\n >\n <a aria-label=\"Navigate to Target\"\n (click)=\"showNewCard = false; onDiscardToggle()\">Disregard and pay with current registered card</a>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n <!-- Purchase Summary -->\n @if (product) {\n <div class=\"col-md-6\"\n >\n <div class=\"purchase-summary card p-3 payment-right\">\n <div class=\"card-body\">\n <h4 class=\"title\">{{ 'Label.PurchaseSummary' | transloco }}</h4>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Plan' | transloco }}:</div>\n <div class=\"summary-right\">{{ product.name }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Price' | transloco }}:</div>\n <div class=\"summary-right\">\n {{ product.currency }}\n {{ (product.price_per_unit / 100) | number:'1.2-2' }}\n </div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Seats' | transloco }}:</div>\n <div class=\"summary-right\">{{ form.get('units').value }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Total' | transloco }}:</div>\n <div class=\"summary-right\">\n {{ product.currency }} {{ totalAmount | number:'1.2-2' }}\n </div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">\n {{ 'Label.Recurrency' | transloco }}:\n </div>\n <div class=\"summary-right\">{{ product.billing_frequency }}</div>\n </div>\n </div>\n <div class=\"text-center\">\n <hr />\n <p>\n By subscribing you acknowledge and accept our terms of service and\n privacy policy\n </p>\n </div>\n </div>\n </div>\n }\n </div>\n <div class=\"row\">\n <div class=\"col-12 text-center mt-3\">\n <img src=\"/assets/img/icons/powered_by_stripe_v2.png\"\n class=\"payment-provider\"\n alt=\"\" />\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"form-actions text-end\">\n <button type=\"button\"\n class=\"btn btn-raised btn-outline-default me-1\"\n [disabled]=\"isPurchaseAttempted\"\n routerLink=\"/account/subscriptions\">\n <i class=\"ft-x\" aria-hidden=\"true\"></i>{{ 'Button.Back' | transloco }}\n </button>\n <button type=\"submit\"\n class=\"btn btn-raised btn-primary\"\n [disabled]=\"isPurchaseAttempted\"\n [buttonBusy]=\"busy\">\n <i class=\"ft-check\" aria-hidden=\"true\"></i>\n {{ 'Button.Purchase' | transloco }}\n </button>\n </div>\n </div>\n </div>\n </form>\n </ng-container>\n</div>\n\n<pw-password-validation #passwordValidationModal\n (successEvent)=\"onValidatePassword($event)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <p>\n If you proceed, your credit card will be charged\n @if (totalAmount) {\n <strong>{{ product.currency }} {{ totalAmount | number:'1.2-2' }}</strong>\n }\n </p>\n </div>\n </div>\n</pw-password-validation>\n","import {\n ChangeDetectorRef,\n Component,\n Injector,\n OnDestroy,\n OnInit,\n ViewChild\n} from '@angular/core';\nimport {\n AbstractControl,\n UntypedFormBuilder,\n UntypedFormGroup,\n ValidationErrors,\n ValidatorFn,\n Validators\n} from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AppState, GetUser } from '@posiwise/app-store';\nimport { GeoService, SubscriptionService, ValidationService } from '@posiwise/common-services';\nimport { Country, Product, Subscription, User } from '@posiwise/common-utilities';\nimport { ConfirmDialogService, PasswordValidationComponent } from '@posiwise/shared-components';\nimport { ValidateForm } from '@posiwise/utils';\n\nimport { StatusCodes } from 'http-status-codes';\nimport { map, Observable } from 'rxjs';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\nimport { Store } from '@ngrx/store';\n\n@Component({\n templateUrl: './user-subscription-details.component.html',\n styleUrls: ['./user-subscription-details.component.scss'],\n\n standalone: false\n})\nexport class UserSubscriptionDetailsComponent\n extends AppBaseComponent\n implements OnInit, OnDestroy\n{\n @ViewChild('modal', { static: true }) modal: PasswordValidationComponent;\n\n allowUpdate: boolean;\n hasUnitChanged: boolean;\n\n busyButton = false;\n\n form: UntypedFormGroup;\n\n unitError: string;\n\n subscription: Subscription;\n\n units = 1;\n\n countries$: Observable<Country[]>;\n\n squaredLogo: string;\n fullLogo: string;\n fullLogoBroken = false;\n squaredLogoBroken = false;\n slug: string;\n\n userId: number;\n subscriptionId: number;\n\n user: User;\n\n showApiToken = false;\n showApiClientId = false;\n refreshingTokens = false;\n\n totalAmount() {\n const allProductsPrice = this.subscription.products.map(x => x.price_per_unit * this.units);\n\n return allProductsPrice.reduce((a: number, b: number) => a + b, 0) / 100;\n }\n\n constructor(\n private readonly fb: UntypedFormBuilder,\n private readonly geoService: GeoService,\n private readonly modalService: NgbModal,\n private readonly subscriptionService: SubscriptionService,\n private readonly store: Store<AppState>,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef,\n private readonly confirmDialog: ConfirmDialogService\n ) {\n super(injector);\n this.form = this.getForm();\n this.route.params.subscribe(params => {\n this.subscriptionId = +params['subscriptionId'];\n this.fetchData();\n this.cdr.markForCheck();\n });\n }\n\n ngOnInit() {\n this.geoService.getCountries().subscribe(() => {\n this.countries$ = this.geoService\n .getCountries()\n .pipe(\n map((countries: []) => [{ name: 'Select Country', code: null }, ...countries])\n );\n this.cdr.markForCheck();\n });\n this.userStore().subscribe(user => {\n if (user) {\n this.slug = user.slug;\n this.user = user;\n this.userId = user.id;\n }\n this.cdr.markForCheck();\n });\n }\n\n private fetchData() {\n this.subscriptionService.getById(this.subscriptionId).subscribe(response => {\n this.subscription = response;\n this.fullLogo = this.subscription?.full_logo.url;\n this.squaredLogo = this.subscription?.squared_logo?.url;\n this.fullLogoBroken = false;\n this.squaredLogoBroken = false;\n this.form.patchValue(this.subscription);\n this.units = this.subscription?.products[0]?.purchased_units;\n this.form.patchValue({\n units: this.units\n });\n this.cdr.markForCheck();\n });\n }\n\n /** White-label company name for \"Your {brand} AI assistant\" (same source as the login page and chat widget). */\n get brandName(): string {\n return this.appConfig?.company?.name?.trim() || 'PosiWise';\n }\n\n private getForm() {\n return this.fb.group({\n organisation: ['', [Validators.required]],\n contact_name: ['', [Validators.required]],\n contact_email: ['', [Validators.required, Validators.email]],\n contact_tel: [''],\n tax_id: [''],\n invoice_recipient_emails: ['', [this.commaSeparatedEmailsValidator()]],\n address: ['', [Validators.required]],\n country_code: ['', [Validators.required]],\n facebook_handle: [''],\n twitter_handle: [''],\n linkedin_handle: [''],\n reddit_handle: [''],\n company_url: [''],\n enforce_2fa: [false],\n rag_use_own_data: [true],\n rag_keep_pii: [false]\n });\n }\n\n private commaSeparatedEmailsValidator(): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n if (!control.value) {\n return null; // Allow empty values\n }\n\n const value = control.value as string;\n\n // Check if there are spaces around commas (comma-space or space-comma patterns)\n if (value.includes(',') && (value.includes(', ') || value.includes(' ,'))) {\n return { invalidFormat: true };\n }\n\n // Check if any email part contains spaces (after splitting by comma)\n const emailParts = value.split(',');\n if (emailParts.some((part: string) => part.trim() !== part || part.includes(' '))) {\n return { invalidFormat: true };\n }\n\n // Validate each email\n const emails = emailParts.map((email: string) => email.trim());\n for (const email of emails) {\n if (email && !ValidationService.email(email)) {\n return { invalidEmail: true };\n }\n }\n\n return null;\n };\n }\n\n /** *\n * Update seats for all the products of subscription\n */\n updateUnits() {\n if (this.subscription.products[0].trial_subscription) {\n return;\n }\n this.modal.open();\n }\n\n openModal(content) {\n this.modalService.open(content, { centered: true, windowClass: 'modal-holder' });\n }\n\n onImageSelection(event) {\n const blob = this.dataURLtoBlob(event);\n const filename = `${`${this.slug.toLocaleLowerCase()}_${Date.parse(\n new Date().toString()\n )}`}.png`;\n const file: File = new File([blob], filename);\n this.subscriptionService.addFullLogo(this.subscriptionId, file).subscribe(res => {\n this.modalService.dismissAll();\n this.fullLogo = res?.full_logo?.url;\n this.fullLogoBroken = false;\n this.cdr.markForCheck();\n });\n }\n\n uploadSquaredLogo(event) {\n const blob = this.dataURLtoBlob(event);\n const filename = `${`${this.slug.toLocaleLowerCase()}_${Date.parse(\n new Date().toString()\n )}`}.png`;\n const file: File = new File([blob], filename);\n this.subscriptionService.addSquaredLogo(this.subscriptionId, file).subscribe(res => {\n this.modalService.dismissAll();\n this.squaredLogo = res?.squared_logo?.url;\n this.squaredLogoBroken = false;\n this.cdr.markForCheck();\n });\n }\n\n onClose() {\n this.modalService.dismissAll();\n }\n\n dataURLtoBlob(dataUrl) {\n const arr = dataUrl.split(',');\n const mime = /^[A-Z]*[a-z]*:(.*?);[A-Z]*/.exec(arr[0])?.[1];\n const bStr = atob(arr[1]);\n let n = bStr.length;\n const u8arr = new Uint8Array(n);\n while (n--) {\n u8arr[n] = bStr.charCodeAt(n);\n }\n\n return new Blob([u8arr], { type: mime });\n }\n\n @ValidateForm('form')\n onSaveDetails() {\n this.busyButton = true;\n const formValue = { ...this.form.value };\n\n // Process invoice_recipient_emails: remove spaces from comma-separated emails\n if (formValue.invoice_recipient_emails) {\n formValue.invoice_recipient_emails = formValue.invoice_recipient_emails\n .split(',')\n .map((email: string) => email.trim())\n .join(',');\n }\n\n this.subscriptionService\n .updateSubscription(Number(this.subscriptionId), formValue)\n .subscribe(() => {\n this.toast.success('Subscription details updated.');\n this.store.dispatch(new GetUser());\n this.back();\n this.cdr.markForCheck();\n })\n .add(() => {\n this.busyButton = false;\n this.cdr.markForCheck();\n });\n }\n\n onPasswordValidation(_event) {\n this.subscriptionService\n .updateSubscriptionUnit(this.subscription.id, this.units)\n .subscribe(response => {\n if (response.status === StatusCodes.OK) {\n this.toast.success('Unit quantity updated.');\n } else {\n this.toast.error('Something went wrong!');\n }\n this.cdr.markForCheck();\n });\n }\n\n onMaxReached(event) {\n if (event) {\n this.unitError = `Maximum is ${this.units}`;\n }\n }\n\n onMinReached(event) {\n if (event) {\n this.unitError = `Minimum is ${this.units}`;\n }\n }\n\n onUnitChange(event) {\n this.allowUpdate = true;\n this.hasUnitChanged = true;\n this.units = event;\n this.unitError = '';\n }\n\n /** Function to execute on location select */\n handleAddressChange(event) {\n this.form.get('address').setValue(event.formatted_address);\n }\n\n toggleApiTokenVisibility() {\n this.showApiToken = !this.showApiToken;\n }\n\n toggleApiClientIdVisibility() {\n this.showApiClientId = !this.showApiClientId;\n }\n\n refreshApiTokens() {\n this.confirmDialog\n .open({\n title: 'Are you sure?',\n text: 'This will expire the current tokens.',\n destructive: true,\n confirmLabel: 'Yes, refresh tokens!'\n })\n .then(ok => {\n if (ok) {\n this.performTokenRefresh();\n }\n });\n }\n\n private performTokenRefresh() {\n this.refreshingTokens = true;\n this.subscriptionService\n .refreshApiTokens(this.subscriptionId)\n .subscribe({\n next: response => {\n if (response && response.api_access_token) {\n this.subscription.api_access_token = response.api_access_token;\n }\n if (response && response.api_client_id) {\n this.subscription.api_client_id = response.api_client_id;\n }\n\n this.showApiToken = false;\n this.showApiClientId = false;\n this.fetchData();\n this.cdr.markForCheck();\n }\n })\n .add(() => {\n this.refreshingTokens = false;\n this.cdr.markForCheck();\n });\n }\n\n trackByProduct(_index: number, item: Product) {\n return item.id;\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n this.allowUpdate = false;\n }\n}\n","<!-- edit Subscription details page -->\n<div class=\"row\">\n <div class=\"col-12\">\n <h3 class=\"my-3\">{{ subscription?.organisation || subscription?.contact_name }}</h3>\n </div>\n</div>\n\n@if (subscription) {\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSaveDetails()\"\n class=\"row mt-4\"\n >\n <!-- 1. Contact details -->\n <div class=\"col-12\">\n <h3>Contact details</h3>\n </div>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.ContactName' | transloco\"\n class=\"col-md-6\"\n label=\"Contact Name\"\n name=\"contact_name\"\n controlId=\"user-subscription-contact_name\"\n errorMsg=\"Please enter Contact Name\">\n <input type=\"text\"\n id=\"user-subscription-contact_name\"\n class=\"form-control\"\n formControlName=\"contact_name\"\n aria-label=\"Contact Name\" />\n </pw-input-container>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.ContactEmail' | transloco\"\n class=\"col-md-6\"\n label=\"Contact Email\"\n name=\"contact_email\"\n controlId=\"user-subscription-contact_email\"\n errorMsg=\"Please enter Contact Email\">\n <input type=\"text\"\n id=\"user-subscription-contact_email\"\n class=\"form-control\"\n formControlName=\"contact_email\"\n aria-label=\"Contact Email\" />\n </pw-input-container>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.Organization' | transloco\"\n class=\"col-md-6\"\n label=\"Organisation\"\n name=\"organisation\"\n controlId=\"user-subscription-organisation\"\n errorMsg=\"Please enter organisation\">\n <input type=\"text\"\n id=\"user-subscription-organisation\"\n class=\"form-control\"\n formControlName=\"organisation\"\n aria-label=\"Organisation\" />\n </pw-input-container>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.Phone' | transloco\"\n class=\"col-md-6\"\n label=\"Contact Tel\"\n name=\"contact_tel\"\n controlId=\"user-subscription-contact_tel\"\n errorMsg=\"Please enter Contact Telephone Number\">\n <input type=\"text\"\n id=\"user-subscription-contact_tel\"\n class=\"form-control\"\n formControlName=\"contact_tel\"\n aria-label=\"Contact Tel\" />\n </pw-input-container>\n @if (countries$ | async; as countries) {\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.Country' | transloco\"\n class=\"col-md-6\"\n label=\"Country\"\n name=\"country_code\"\n controlId=\"user-subscription-country_code\"\n [useAriaLabelledbyOnly]=\"true\"\n [isLeftTooltip]=\"true\"\n errorMsg=\"Please select a country\">\n <p-select\n [attr.aria-labelledby]=\"'user-subscription-country_code-label'\"\n [options]=\"countries\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"country_code\"\n placeholder=\"Select Country\">\n </p-select>\n </pw-input-container>\n }\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.Address' | transloco\"\n class=\"col-md-6\"\n label=\"Address\"\n name=\"address\"\n controlId=\"user-subscription-address\"\n [useAriaLabelledbyOnly]=\"true\"\n errorMsg=\"Please enter address\">\n <input ngx-gp-autocomplete\n id=\"user-subscription-address\"\n name=\"address\"\n class=\"form-control\"\n [attr.aria-labelledby]=\"'user-subscription-address-label'\"\n #places=\"ngx-places\"\n formControlName=\"address\"\n (onAddressChange)=\"handleAddressChange($event)\"\n aria-label=\"Address\" />\n </pw-input-container>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.VatNumber' | transloco\"\n class=\"col-md-6\"\n label=\"GST/VAT Number\"\n name=\"tax_id\"\n controlId=\"user-subscription-tax_id\"\n errorMsg=\"Please enter GST/VAT Number\">\n <input type=\"text\"\n id=\"user-subscription-tax_id\"\n class=\"form-control\"\n formControlName=\"tax_id\"\n aria-label=\"Tax Id\" />\n </pw-input-container>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.CompanyUrl' | transloco\"\n class=\"col-md-6\"\n label=\"Company URL\"\n name=\"company_url\"\n controlId=\"user-subscription-company_url\"\n errorMsg=\"Please enter company url\">\n <input type=\"text\"\n id=\"user-subscription-company_url\"\n class=\"form-control\"\n formControlName=\"company_url\"\n aria-label=\"Company Url\" />\n </pw-input-container>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.InvoiceRecipientEmails' | transloco\"\n class=\"col-md-6\"\n label=\"Invoice Recipient Emails\"\n name=\"invoice_recipient_emails\"\n controlId=\"user-subscription-invoice_recipient_emails\"\n errorMsg=\"Please enter valid email addresses separated by commas\">\n <input type=\"text\"\n id=\"user-subscription-invoice_recipient_emails\"\n class=\"form-control\"\n formControlName=\"invoice_recipient_emails\"\n placeholder=\"email1@example.com,email2@example.com\"\n aria-label=\"email1@example.com,email2@example.com\" />\n </pw-input-container>\n\n <!-- 2. Branding / Logos -->\n <div class=\"col-12\">\n <div class=\"row branding-section\">\n <div class=\"col-12\">\n <h3>Branding</h3>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"text-center mt-5\">\n <div class=\"image-container\">\n <h4 class=\"mb-2\">{{ 'User.Subscriptions.FullLogo' | transloco }}\n <span class=\"tooltip-wrap ms-1\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.FullLogo'|transloco\"\n [appendTo]=\"'body'\"\n [tooltipPosition]=\"'top'\">\n <i class=\"far fa-info-circle text-muted\"></i>\n </span>\n </h4>\n @if (fullLogo && !fullLogo.includes('no_image_uploaded') && !fullLogoBroken) {\n <img [src]=\"fullLogo\"\n alt=\"full logo\"\n class=\"image full-logo\"\n role=\"presentation\"\n (error)=\"fullLogoBroken = true\" />\n <div class=\"overlay mt-2\"\n (keydown.enter)=\"openModal(content)\"\n (click)=\"openModal(content)\">\n <div class=\"overlay-text\">\n <a aria-label=\"Navigate to Target\">{{ 'User.Profile.Change' | transloco }}</a>\n </div>\n </div>\n } @else {\n <div class=\"logo-dropzone full-dropzone\"\n role=\"button\"\n tabindex=\"0\"\n aria-label=\"Upload full logo\"\n (keydown.enter)=\"openModal(content)\"\n (click)=\"openModal(content)\">\n <i class=\"fas fa-upload\"></i>\n <span class=\"dropzone-title\">Upload a logo</span>\n <span class=\"dropzone-hint\">PNG or JPG</span>\n </div>\n }\n </div>\n </div>\n </div>\n <div class=\"col-md-6\">\n <div class=\"text-center mt-5\">\n <div class=\"image-container\">\n <h4 class=\"mb-2\">Squared Logo\n <span class=\"tooltip-wrap ms-1\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.SquaredLogo'|transloco\"\n [appendTo]=\"'body'\"\n [tooltipPosition]=\"'top'\">\n <i class=\"far fa-info-circle text-muted\"></i>\n </span>\n </h4>\n @if (squaredLogo && !squaredLogo.includes('no_image_uploaded') && !squaredLogoBroken) {\n <img [src]=\"squaredLogo\"\n alt=\"Squared Presentation\"\n class=\"squared_logo\"\n role=\"presentation\"\n (error)=\"squaredLogoBroken = true\" />\n <div class=\"overlay mt-2\"\n (keydown.enter)=\"openModal(squaredLogoContent)\"\n (click)=\"openModal(squaredLogoContent)\">\n <div class=\"overlay-text\">\n <a aria-label=\"Navigate to Target\">{{ 'User.Profile.Change' | transloco }}</a>\n </div>\n </div>\n } @else {\n <div class=\"logo-dropzone squared-dropzone\"\n role=\"button\"\n tabindex=\"0\"\n aria-label=\"Upload squared logo\"\n (keydown.enter)=\"openModal(squaredLogoContent)\"\n (click)=\"openModal(squaredLogoContent)\">\n <i class=\"fas fa-upload\"></i>\n <span class=\"dropzone-title\">Upload a logo</span>\n <span class=\"dropzone-hint\">PNG or JPG</span>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- 3. Social Media -->\n <ng-container *rbacAllow=\"'SubscriptionSuperAdmin'\">\n <div class=\"col-12\">\n <h3>Social Media</h3>\n <p>\n Any of the social media handles that you set here will appear in the footer of emails going out to your child subscriptions.\n </p>\n </div>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.FacebookHandle' | transloco\"\n class=\"col-md-6\"\n label=\"Facebook handle\"\n name=\"facebook_handle\"\n controlId=\"user-subscription-facebook_handle\"\n errorMsg=\"Please enter facebook id\">\n <input type=\"text\"\n id=\"user-subscription-facebook_handle\"\n class=\"form-control\"\n formControlName=\"facebook_handle\"\n aria-label=\"Facebook Handle\" />\n </pw-input-container>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.TwitterHandle' | transloco\"\n class=\"col-md-6\"\n label=\"Twitter handle\"\n name=\"twitter_handle\"\n controlId=\"user-subscription-twitter_handle\"\n errorMsg=\"Please enter twitter id\">\n <input type=\"text\"\n id=\"user-subscription-twitter_handle\"\n class=\"form-control\"\n formControlName=\"twitter_handle\"\n aria-label=\"Twitter Handle\" />\n </pw-input-container>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.LinkedinHandle' | transloco\"\n class=\"col-md-6\"\n label=\"Linkedin handle\"\n name=\"linkedin_handle\"\n controlId=\"user-subscription-linkedin_handle\"\n errorMsg=\"Please enter linkedin id\">\n <input type=\"text\"\n id=\"user-subscription-linkedin_handle\"\n class=\"form-control\"\n formControlName=\"linkedin_handle\"\n aria-label=\"Linkedin Handle\" />\n </pw-input-container>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.RedditHandle' | transloco\"\n class=\"col-md-6\"\n label=\"Reddit handle\"\n name=\"reddit_handle\"\n controlId=\"user-subscription-reddit_handle\"\n errorMsg=\"Please enter reddit id\">\n <input type=\"text\"\n id=\"user-subscription-reddit_handle\"\n class=\"form-control\"\n formControlName=\"reddit_handle\"\n aria-label=\"Reddit Handle\" />\n </pw-input-container>\n </ng-container>\n\n <!-- 4. Seats -->\n <div class=\"col-12\">\n <div class=\"row seats-section\">\n <div class=\"col-12\">\n <h3>Seats</h3>\n <p>Changing the number of seats updates your subscription cost.</p>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n @if (subscription?.trial_subscription && subscription?.calculated_price) {\n <small\n class=\"text-danger\">Upgrade to be able to update your purchased seats</small>\n }\n </div>\n </div>\n <div class=\"row btns-row align-items-center\">\n @if (subscription) {\n <div class=\"col-md-3 col-8\"\n >\n <label for=\"user-subscription-seats\" class=\"visually-hidden\">{{ 'User.Subscriptions.Tooltip.Seats' | transloco }}</label>\n <pw-number-picker [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.Seats'|transloco\"\n inputId=\"user-subscription-seats\"\n name=\"number-picker\"\n [(value)]=\"units\"\n [min]=\"subscription?.min_units||subscription?.products[0].min_units\"\n [max]=\"subscription?.products[0].max_units\"\n step=\"1\"\n postfix=\"seats\"\n placeholder=\"Total Licences\"\n [inputReadOnly]=\"subscription?.products[0].trial_subscription\"\n [showUpButton]=\"!subscription?.products[0].trial_subscription\"\n [showDownButton]=\"!subscription?.products[0].trial_subscription\"\n size=\"small\"\n pickStartAfter=\"500\"\n pickTimer=\"100\"\n [arrowKeys]=\"true\"\n (minReached)=\"onMinReached($event)\"\n (maxReached)=\"onMaxReached($event)\"\n (valueChange)=\"onUnitChange($event)\">\n </pw-number-picker>\n </div>\n }\n\n @if (subscription) {\n <div class=\"col-md-3 col-4 p-1\"\n >\n @if (!subscription?.products[0].trial_subscription && allowUpdate) {\n <button type=\"button\"\n class=\"btn btn-primary\"\n (click)=\"updateUnits()\">\n {{ 'User.Subscriptions.UpdateUnits' | transloco }}\n </button>\n } @else {\n <div>\n @if (subscription?.products[0].trial_subscription) {\n <small class=\"text-muted\"\n >Update seats is available only to paid subscriptions</small>\n }\n </div>\n }\n </div>\n }\n\n @if (hasUnitChanged) {\n <div class=\"col-12 col-md-6\"\n >\n <table class=\"table table-borderless table-sm\"\n aria-describedby=\"Product details\">\n <thead>\n <tr>\n <th scope=\"true\">Product</th>\n <th scope=\"true\">Price per seat <span>({{subscription?.products[0]?.currency|currencySymbol}})</span></th>\n <th scope=\"true\">Seats</th>\n </tr>\n </thead>\n <tbody>\n @for (product of subscription.products; track trackByProduct($index, product)) {\n <tr>\n <td>{{ product.name }}</td>\n <td>{{ product.price_per_unit / 100 }}</td>\n <td>{{ units }}</td>\n </tr>\n }\n </tbody>\n </table>\n <p>\n If you proceed, the new cost for your subscription will be\n <strong>{{ totalAmount()| currency: subscription?.products[0]?.currency:'symbol-narrow'}}</strong>\n </p>\n </div>\n }\n </div>\n </div>\n\n <!-- 5. API & MCP Credentials -->\n @if (subscription?.api_hits_max > 0) {\n <div class=\"col-12\">\n <h3>{{ 'User.Subscriptions.APICredentials.Title' | transloco }}</h3>\n <p>\n These credentials authenticate both REST API and MCP (Model Context Protocol) requests, and must be used together with the user tokens defined on your Account page.\n </p>\n </div>\n <div class=\"col-md-6\">\n <div class=\"form-group\">\n <label class=\"form-label\" for=\"user-subscription-api-token\">\n {{ 'User.Subscriptions.APICredentials.AccessToken' | transloco }}\n <span class=\"tooltip-wrap ms-1\"\n pTooltip=\"The subscription token has been discontinued in favour of the user token defined on your Account page.\"\n [appendTo]=\"'body'\"\n [tooltipPosition]=\"'top'\">\n <i class=\"far fa-info-circle text-muted\"></i>\n </span>\n </label>\n <div class=\"input-group\">\n <input type=\"text\"\n id=\"user-subscription-api-token\"\n name=\"api_token\"\n class=\"form-control\"\n [value]=\"showApiToken ? subscription?.api_access_token || ('User.Subscriptions.APICredentials.NoTokenAvailable' | transloco) : '*************************'\"\n readonly\n aria-label=\"Api Token\" />\n <button type=\"button\"\n class=\"btn btn-outline-secondary\"\n (click)=\"toggleApiTokenVisibility()\">\n {{ showApiToken ? ('User.Subscriptions.APICredentials.Hide' | transloco) : ('User.Subscriptions.APICredentials.View' | transloco) }}\n </button>\n </div>\n </div>\n </div>\n <div class=\"col-md-6\">\n <div class=\"form-group\">\n <label class=\"form-label\" for=\"user-subscription-api-client-id\">{{ 'User.Subscriptions.APICredentials.ClientId' | transloco }}</label>\n <div class=\"input-group\">\n <input type=\"text\"\n id=\"user-subscription-api-client-id\"\n name=\"api_client_id\"\n class=\"form-control\"\n [value]=\"showApiClientId ? subscription?.api_client_id || ('User.Subscriptions.APICredentials.NoClientIdAvailable' | transloco) : '*************************'\"\n readonly\n aria-label=\"Api Client Id\" />\n <button type=\"button\"\n class=\"btn btn-outline-secondary\"\n (click)=\"toggleApiClientIdVisibility()\">\n {{ showApiClientId ? ('User.Subscriptions.APICredentials.Hide' | transloco) : ('User.Subscriptions.APICredentials.View' | transloco) }}\n </button>\n </div>\n </div>\n </div>\n <div class=\"col-12 mt-3\">\n <div class=\"d-flex align-items-center gap-3\">\n <button type=\"button\"\n class=\"btn btn-outline-secondary\"\n (click)=\"refreshApiTokens()\"\n [disabled]=\"refreshingTokens\">\n <i class=\"fas fa-sync-alt me-2\" [class.fa-spin]=\"refreshingTokens\"></i>\n {{ refreshingTokens ? ('User.Subscriptions.APICredentials.Refreshing' | transloco) : ('User.Subscriptions.APICredentials.RefreshTokens' | transloco) }}\n </button>\n <div class=\"d-flex align-items-center gap-2\">\n @if (subscription?.api_hits !== null) {\n <span class=\"text-muted\">{{ 'User.Subscriptions.APICredentials.ApiHits' | transloco }}:</span>\n <span class=\"fw-bold\">{{ subscription.api_hits | number }}</span>\n }\n @if (subscription?.api_hits_max !== null) {\n <span class=\"text-muted\">{{ 'User.Subscriptions.APICredentials.ApiHitsMax' | transloco }}:</span>\n <span class=\"fw-bold\">{{ subscription.api_hits_max | number }}</span>\n }\n <!-- Show utilization percentage when both values exist -->\n @if (subscription?.api_hits !== null || subscription?.api_hits_max !== null) {\n <span class=\"text-muted ms-2\">(</span>\n <span class=\"fw-bold\" [ngClass]=\"{\n 'text-success-muted': (subscription.api_hits / subscription.api_hits_max) <= 0.8,\n 'text-warning': (subscription.api_hits / subscription.api_hits_max) > 0.8 && (subscription.api_hits / subscription.api_hits_max) <= 0.9,\n 'text-danger': (subscription.api_hits / subscription.api_hits_max) > 0.9\n }\">\n {{ (subscription.api_hits / subscription.api_hits_max * 100) | number:'1.0-0' }}% consumed\n </span>\n <span class=\"text-muted\">)</span>\n }\n </div>\n </div>\n </div>\n }\n\n <!-- 6. Security -->\n <div class=\"col-12\">\n <h3>Security</h3>\n <p>\n While we'll add more security options in the future, please start by enforcing 2FA for all your subscription members.\n </p>\n </div>\n <div class=\"col-12 col-sm-3\">\n <pw-input-container label=\"Enforce 2FA\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.Enforce2fa' | transloco\"\n name=\"enforce_2fa\"\n controlId=\"user-subscription-enforce_2fa\"\n [useAriaLabelledbyOnly]=\"true\">\n <ui-switch formControlName=\"enforce_2fa\"\n name=\"enforce_2fa\"\n [attr.aria-labelledby]=\"'user-subscription-enforce_2fa-label'\"> </ui-switch>\n </pw-input-container>\n </div>\n\n <!-- 7. Brain AI data -->\n <div class=\"col-12\">\n <h3>{{ 'User.Subscriptions.BrainData.Title' | transloco: { brand: brandName } }}</h3>\n <p>{{ 'User.Subscriptions.BrainData.Description' | transloco: { brand: brandName } }}</p>\n </div>\n <div class=\"col-12 col-sm-3\">\n <pw-input-container [label]=\"'User.Subscriptions.BrainData.UseOwnDataLabel' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.RagUseOwnData' | transloco: { brand: brandName }\"\n name=\"rag_use_own_data\"\n controlId=\"user-subscription-rag_use_own_data\"\n [useAriaLabelledbyOnly]=\"true\">\n <ui-switch formControlName=\"rag_use_own_data\"\n name=\"rag_use_own_data\"\n [attr.aria-labelledby]=\"'user-subscription-rag_use_own_data-label'\"> </ui-switch>\n </pw-input-container>\n </div>\n <!-- Keeping personal data is a question about WHAT is kept, so it only\n arises while there is something to keep. Hidden rather than disabled:\n a greyed-out switch still reads as an affordance, and the stored value\n survives in the form either way. -->\n @if (form.value.rag_use_own_data) {\n <div class=\"col-12 col-sm-3\">\n <pw-input-container [label]=\"'User.Subscriptions.BrainData.KeepPiiLabel' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.RagKeepPii' | transloco: { brand: brandName }\"\n name=\"rag_keep_pii\"\n controlId=\"user-subscription-rag_keep_pii\"\n [useAriaLabelledbyOnly]=\"true\">\n <ui-switch formControlName=\"rag_keep_pii\"\n name=\"rag_keep_pii\"\n [attr.aria-labelledby]=\"'user-subscription-rag_keep_pii-label'\"> </ui-switch>\n </pw-input-container>\n </div>\n } @else {\n <div class=\"col-12 col-sm-6\">\n <p>{{ 'User.Subscriptions.BrainData.KeepPiiNotApplicable' | transloco: { brand: brandName } }}</p>\n </div>\n }\n <div class=\"mb-3 col-12 text-end mt-3\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n routerLink=\"/account/subscriptions\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button name=\"submit\"\n type=\"submit\"\n [buttonBusy]=\"busyButton\"\n class=\"btn btn-primary\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n </form>\n}\n\n<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h3 class=\"modal-title mb-0 p-0\">{{ 'User.Subscriptions.FullLogo' | transloco }}</h3>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <small> {{ 'User.Profile.PictureMessage' | transloco }}</small>\n <pw-image-cropper #profile\n (imageSelectionEvent)=\"onImageSelection($event)\"\n aspectRatio=\"fullLogo\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n<ng-template #squaredLogoContent\n let-modal>\n <div class=\"modal-header\">\n <h3 class=\"modal-title mb-0 p-0\">{{ 'User.Subscriptions.SquaredLogo' | transloco }}</h3>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <small> {{ 'User.Profile.PictureMessage' | transloco }}</small>\n <pw-image-cropper #profile\n (imageSelectionEvent)=\"uploadSquaredLogo($event)\"\n aspectRatio=\"auto\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n<pw-password-validation #modal\n(successEvent)=\"onPasswordValidation($event)\"> </pw-password-validation>\n","/*\n * @Author: anikets43\n * @description: shows all the subscribed user products\n * Account => Subscription\n */\n\nimport { Clipboard } from '@angular/cdk/clipboard';\nimport { HttpParams } from '@angular/common/http';\nimport {\n ChangeDetectorRef,\n Component,\n Injector,\n OnDestroy,\n OnInit,\n TemplateRef,\n ViewChild\n} from '@angular/core';\n\nimport { AdminService } from '@posiwise/admin-module-utils';\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AppState, GetUser } from '@posiwise/app-store';\nimport { PermissionService, SubscriptionService } from '@posiwise/common-services';\nimport { Product, Subscription, User } from '@posiwise/common-utilities';\nimport { ConfirmDialogService, PasswordValidationComponent } from '@posiwise/shared-components';\n\nimport sortBy from 'lodash/sortBy';\nimport { MenuItem } from 'primeng/api';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\nimport { Store } from '@ngrx/store';\n\nimport { CurrentItem } from '../../../shared/interface/user-module.interface';\nimport { AddSubscriptionComponent } from '../add-subscription/add-subscription.component';\n\n@Component({\n selector: 'pw-user-subscriptions-list',\n templateUrl: './user-subscriptions-list.component.html',\n styleUrls: ['./user-subscriptions-list.component.scss'],\n\n standalone: false\n})\nexport class UserSubscriptionListComponent extends AppBaseComponent implements OnInit, OnDestroy {\n @ViewChild('menuItems', { static: false })\n menu: MenuItem[];\n\n @ViewChild(AddSubscriptionComponent, { static: false })\n changeSubscriptionRef: AddSubscriptionComponent;\n\n @ViewChild('passwordValidationModalForAccountDelete', { static: false })\n passwordValidationModalForAccountDelete: PasswordValidationComponent;\n\n @ViewChild('passwordValidationModalForKey', { static: false })\n passwordValidationModalForKey: PasswordValidationComponent;\n\n @ViewChild('passwordValidationForUnsubscribe', { static: false })\n passwordValidationForUnsubscribe: PasswordValidationComponent;\n\n @ViewChild('cancelSubscriptionModal', { static: false })\n cancelSubscriptionModal: TemplateRef<unknown>;\n\n showApiKey = true;\n\n password: string;\n productName: string;\n\n subscribedSubscriptions = [];\n\n activeItem: MenuItem;\n\n isAddNew: boolean;\n\n user: User;\n\n isUpdatePayment: false;\n\n selectedSubscription: { id: number; productId: number };\n\n editing: boolean;\n\n isLoaded = false;\n\n reasonToCancel = '';\n\n currentItem: CurrentItem;\n\n showTos = false;\n\n objectKeys = Object.keys;\n\n items: MenuItem[] = [\n { id: 'profile', label: 'Profile', icon: 'fa fa-fw fa-user-cog' },\n { id: 'subscription', label: 'Subscription', icon: 'fa fa-fw fa-book' },\n { id: 'invoice', label: 'Invoice', icon: 'fa fa-file-invoice-dollar' }\n ];\n\n productId: number;\n\n constructor(\n private readonly subscriptionService: SubscriptionService,\n private readonly adminService: AdminService,\n private readonly modalService: NgbModal,\n private readonly store: Store<AppState>,\n private readonly clipboard: Clipboard,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef,\n private readonly confirmDialog: ConfirmDialogService\n ) {\n super(injector);\n this.getSubscribedProduct = this.getSubscribedProduct.bind(this);\n }\n\n ngOnInit() {\n this.route.queryParams.subscribe(params => {\n this.isAddNew = params['isNew'];\n this.getSubscribedProduct();\n this.selectedSubscription = null;\n this.cdr.markForCheck();\n });\n\n [this.activeItem] = this.items;\n }\n\n onClipboardCopy(accessCode: string) {\n this.clipboard.copy(accessCode);\n this.toast.success('Access Key copied to the clipboard');\n }\n\n attemptUnsubscribe(item, productId: number) {\n this.selectedSubscription = item;\n this.selectedSubscription.productId = productId;\n if (this.user.has_password) {\n this.passwordValidationForUnsubscribe.open();\n } else {\n this.noPasswordModal();\n }\n }\n\n openCancelSubscriptionModal() {\n this.modalService.open(this.cancelSubscriptionModal, {\n centered: true,\n windowClass: 'modal-holder'\n });\n }\n\n private getSubscribedProduct() {\n this.userStore().subscribe(user => {\n this.user = user;\n if (user) {\n this.userService.getUserSubscriptions(user.id).subscribe(response => {\n this.subscribedSubscriptions = sortBy(response.subscriptions, 'deleted');\n response?.expired_subscriptions.forEach(subscription => {\n this.subscribedSubscriptions.push(subscription);\n });\n this.subscribedSubscriptions.forEach(subscription => {\n subscription.products.forEach((product: Product) => {\n product.masked = product.api_access_token\n ? '*************************'\n : null;\n });\n });\n this.isLoaded = true;\n this.cdr.markForCheck();\n });\n }\n this.cdr.markForCheck();\n });\n }\n\n updateApiKey(subscription, product) {\n this.subscriptionService\n .updateSubscriptionAPIKey(subscription.id, product.id)\n .subscribe(response => {\n product.api_access_token = response;\n this.toast.success(this.translation.translate('User.Subscriptions.UpdatedKey'));\n this.getSubscribedProduct();\n this.cdr.markForCheck();\n });\n }\n\n showKey(item) {\n this.currentItem = item;\n this.passwordValidationModalForKey.open();\n this.showApiKey = false;\n }\n\n displayApiKey() {\n this.showApiKey = true;\n this.currentItem.masked = this.currentItem?.api_access_token;\n }\n\n activateMenu() {\n this.activeItem = this.menu['activeItem'];\n if (this.activeItem.id === 'subscription') {\n this.getSubscribedProduct();\n }\n }\n\n onUnsubscribe(item, reasonToCancel: string) {\n const httpParams = new HttpParams().set('product_id', item.productId);\n const requestOptions = {\n params: httpParams,\n body: {\n reason_to_cancel: reasonToCancel\n }\n };\n this.subscriptionService.deleteSubscription(item.id, requestOptions).subscribe(() => {\n this.store.dispatch(new GetUser());\n this.modalService.dismissAll();\n this.getSubscribedProduct();\n this.selectedSubscription = null;\n this.reasonToCancel = '';\n this.cdr.markForCheck();\n });\n }\n\n onValidatePassword(isSuccess: boolean) {\n if (isSuccess) {\n // Password validation component already closes its modal\n // Use setTimeout to ensure modal is fully closed before opening the next one\n setTimeout(() => {\n this.openCancelSubscriptionModal();\n }, 100);\n }\n }\n\n onConfirmCancel() {\n if (!this.reasonToCancel || this.reasonToCancel.trim() === '') {\n this.toast.error(\n this.translation.translate('User.Subscriptions.Validation.ReasonRequired')\n );\n return;\n }\n this.onUnsubscribe(this.selectedSubscription, this.reasonToCancel);\n }\n\n discardEdit() {\n this.editing = false;\n this.selectedSubscription = null;\n }\n\n onSaveDetails() {\n this.toast.success(this.translation.translate('User.Subscriptions.UpdatedMessage'));\n this.editing = false;\n }\n\n onUpdatePaymentDetailsCancel() {\n this.router.navigate(['.'], { relativeTo: this.route, queryParams: {} });\n }\n\n attemptUpgrade(subscription: Subscription, product: Product) {\n if (this.user.has_password) {\n this.router.navigate([\n `account/subscriptions/upgrade/${subscription.id}/${product.id}`\n ]);\n } else {\n this.noPasswordModal();\n }\n }\n\n private noPasswordModal() {\n this.confirmDialog.open({\n title: 'Set Password',\n text: 'Please set a password before changing the subscription in the account section.',\n confirmOnly: true\n });\n }\n\n showModalForAccountDeletion() {\n this.confirmDialog\n .confirmDelete({\n textKey: 'Common.Confirm.Delete.TextSimple',\n textParams: { entityType: 'account' }\n })\n .then(ok => {\n if (ok) {\n this.passwordValidationModalForAccountDelete.open();\n }\n });\n }\n\n deleteUser(_event) {\n const subscriptionId = PermissionService.selectedSubscription.id;\n this.adminService.deleteUser(this.user.id, subscriptionId).subscribe(() => {\n this.router.navigate(['logout']);\n this.cdr.markForCheck();\n });\n }\n\n showPrivacyAndTos(product: Product) {\n this.productId = product.id;\n this.productName = product.name;\n this.showTos = true;\n }\n\n onCancel() {\n this.showTos = false;\n }\n\n trackBySubscription(_index: number, item: { id: number }) {\n return item.id;\n }\n\n trackByProduct(_index: number, item: { id: number }) {\n return item.id;\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n }\n}\n","@if (!showTos) {\n <!-- Subscriptions Tab Content -->\n @if (!editing && !isAddNew) {\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>Your Subscriptions</h2>\n <p>You'll find in this section the summary of your subscriptions.</p>\n </div>\n </div>\n }\n <!-- Subscribed Product Cards -->\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (\n !editing && !isAddNew && !isUpdatePayment && isLoaded && subscribedSubscriptions.length\n ) {\n <div class=\"row\"\n >\n @for (subscription of subscribedSubscriptions; track trackBySubscription($index, subscription)) {\n <div class=\"col-12 col-md-6 my-3\"\n >\n <div class=\"subscription-details mb-4\">\n <div class=\"subscription-summary d-flex flex-wrap justify-content-between align-items-start gap-2 mb-3\">\n <div class=\"subscription-summary__info\">\n <div>\n <strong>Organisation:</strong>\n {{ subscription.organisation ? subscription.organisation : subscription.contact_name }}\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.TotalPriceExclTax' | transloco }}:</strong>\n @if (subscription.calculated_price) {\n {{ subscription.products[0]?.currency }} {{ subscription.calculated_price / 100 | number:'1.2-2' }}\n {{ subscription.products[0].trial_subscription ? '(After Trial)' : '' }}\n } @else {\n Free\n }\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.SeatsInUse' | transloco }}:</strong>\n {{ subscription.units_in_use || 1 }} / {{ subscription.purchased_units }}\n @if (subscription.purchased_units) {\n <span class=\"seats-usage\"\n [style.--seats-pct]=\"(subscription.units_in_use || 1) / subscription.purchased_units\"></span>\n }\n </div>\n </div>\n <!-- Subscription-level actions (a subscription may hold multiple products) -->\n @if (\n (subscription.is_subscription_owner || subscription.is_subscription_admin) &&\n subscription.products?.length &&\n !subscription.products[0].deleted &&\n !subscription.products[0].dependency_products?.length\n ) {\n <div class=\"subscription-summary__actions d-flex flex-wrap align-items-center gap-2\">\n <a class=\"btn btn-outline-primary btn-sm\"\n aria-label=\"Navigate to Target\"\n [routerLink]=\"['../subscriptions', subscription.id]\">\n {{ 'Button.Edit' | transloco }}\n </a>\n @if (!subscription.products[0].expired && !subscription.products[0].trial_subscription) {\n <button [routerLink]=\"['../subscriptions', subscription.id, 'credential']\"\n class=\"btn btn-outline-secondary btn-sm\">\n {{ 'User.Subscriptions.Credentials' | transloco }}\n </button>\n }\n @if (!isUpdatePayment && subscription.stripe_customer_id) {\n <a class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"['../subscriptions', subscription.id, 'product', subscription.products[0].id, 'update-payment']\">\n <i class=\"fa fa-edit me-1\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.UpdateCardDetails' | transloco }}</a>\n }\n <button class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"'/account/subscriptions/add-new'\"\n [queryParams]=\"{ subscription_id: subscription.id }\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.ManageAllProducts' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n <i class=\"fa fa-plus me-1\"></i>{{ 'User.Subscriptions.SeeAllProducts' | transloco }}\n </button>\n </div>\n }\n </div>\n <!-- Products list -->\n @for (\n product of subscription.products; track trackByProduct($index,\n product); let first = $first) {\n <div class=\"mb-3\">\n <div class=\"card subscription-products-cards\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <div>\n <h4 class=\"mb-3 text-bold-500 primary\">{{ product?.name }}</h4>\n <!-- Frequency -->\n <div>\n <div>\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.Frequency' | transloco\n }}:</strong>\n {{ product?.billing_frequency | uppercase }}\n </div>\n </div>\n <!-- Expiration -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n product.expired ? 'Expired' : 'Expiry Date'\n }}:</strong>\n {{ product.expires_at | dateFormat }}\n </div>\n <!-- Estimated Price -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.PriceExclTax' | transloco\n }}:</strong>\n {{ product.currency }}\n {{ (product.calculated_price / 100) | number:'1.2-2' }}\n </div>\n <!-- Product API Key (Alpha-only) -->\n <ng-container *rbacAllow=\"'Pages.Alpha'\">\n @if (\n (product.stripe_plan_id && product.max_hits > 0) ||\n product.max_hits_trial > 0\n ) {\n <div class=\"d-flex align-items-center\">\n <strong class=\"d-inline-block w-50\">\n {{ 'User.Subscriptions.ApiKey' | transloco }}:\n <i class=\"far fa-info-circle ms-1 text-muted\"\n aria-hidden=\"true\"\n [pTooltip]=\"'User.Subscriptions.ApiKey.NotUsedHint' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"></i>\n </strong>\n <code class=\"text-truncate me-2\">{{ product.masked }}</code>\n <span class=\"ms-auto d-flex align-items-center flex-shrink-0\">\n <!-- Show Access Key -->\n <button class=\"btn\"\n pTooltip=\"Show Access Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"showKey(product)\">\n <i class=\"fas fa-eye\" aria-hidden=\"true\"></i>\n </button>\n <!-- Copy To Clipboard -->\n <button class=\"btn\"\n pTooltip=\"Copy Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <i class=\"fal fa-copy\"\n aria-hidden=\"true\"\n (click)=\"onClipboardCopy(product.api_access_token)\"\n (keydown.enter)=\"onClipboardCopy(product.api_access_token)\"></i>\n </button>\n <!-- Update API Key -->\n @if (!product.expired && !product.deleted) {\n <button class=\"btn\"\n pTooltip=\"Change Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"updateApiKey(subscription, product)\">\n <i class=\"fal fa-sync-alt\" aria-hidden=\"true\"></i>\n </button>\n }\n </span>\n </div>\n }\n </ng-container>\n </div>\n </div>\n <div class=\"card-footer px-3 d-flex flex-column gap-2\">\n <div class=\"footer-status d-flex flex-wrap align-items-center gap-2\">\n @if (product.deleted && !product.expired) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.OutdatedMessage' | transloco }}\n </span>\n }\n @if (product.deleted) {\n <span class=\"badge bg-danger\">Deleted</span>\n }\n @if (\n product.trial_subscription &&\n product.calculated_price\n ) {\n <span class=\"badge bg-warning\">Trial</span>\n }\n @if (product?.pause_collection && objectKeys(product?.pause_collection)?.length) {\n <span class=\"badge bg-grey\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.PausedCollection'|transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n Paused collection\n </span>\n }\n @if (!product.calculated_price) {\n <span class=\"badge bg-success\">Free</span>\n }\n @if (!product?.deleted && !subscription.is_subscription_owner) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>Invited to use this product\n @if (subscription.is_subscription_admin) {\n <span class=\"badge bg-role-admin ms-1\">as an admin</span>\n }\n </span>\n }\n </div>\n @if (\n subscription.is_subscription_owner ||\n subscription.is_subscription_admin\n ) {\n <div class=\"footer-actions d-flex flex-wrap align-items-center justify-content-end gap-2\">\n <!-- Unsubscribe -->\n @if (\n subscription?.stripe_customer_id &&\n !product?.deleted &&\n !product?.trial_subscription\n ) {\n <button class=\"btn btn-outline-danger btn-sm\"\n (click)=\"attemptUnsubscribe(subscription, product.id)\">\n {{ 'User.Subscriptions.Unsubscribe' | transloco }}\n </button>\n }\n @if (product.stripe_plan_id && product.active) {\n <!-- Upgrade (single primary CTA) -->\n @if (product.trial_subscription && !product.deleted) {\n <button class=\"btn btn-primary btn-sm\"\n (click)=\"attemptUpgrade(subscription, product)\">\n {{ 'Button.Upgrade' | transloco }}\n </button>\n }\n <!-- Subscribe -->\n @if (subscription.expired && product.stripe_plan_id) {\n <button class=\"btn btn-primary btn-sm\"\n [routerLink]=\"'/account/subscriptions/add-new'\">\n {{ 'User.Subscriptions.Subscribe' | transloco }}\n </button>\n }\n }\n <!-- Privacy & Terms of Service (quiet link, not a button) -->\n @if (product?.product_privacy_service_id) {\n <button class=\"btn btn-link btn-sm p-0 footer-tos-link\"\n (click)=\"showPrivacyAndTos(product)\">\n {{\n 'User.Subscriptions.PrivacyAndTermsOfService'\n | transloco\n }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n @if (subscription.products.length === 0) {\n <div>\n <div class=\"card\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <p class=\"text-center\">\n No product available for this subscription\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n @if (!editing && !isAddNew && !isUpdatePayment) {\n <div class=\"col-12\"\n >\n @if (subscribedSubscriptions.length === 0) {\n <pw-no-data [withImage]=\"true\" message=\"You don't have any subscription.\"\n >\n </pw-no-data>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n <!-- Danger zone (demoted account deletion) -->\n @if (!editing && !isAddNew && !isUpdatePayment && isLoaded) {\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"danger-zone mt-4\">\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger danger-zone__action\"\n (click)=\"showModalForAccountDeletion()\"\n [pTooltip]=\"'User.Account.Tooltip.DeleteAccount' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n {{ 'User.Account.DeleteAccount' | transloco }}\n </button>\n </div>\n </div>\n </div>\n }\n <!--\n Add New Subscription\n -->\n <!-- <ng-template [ngIf]=\"isAddNew && !isUpdatePayment\">\n <pw-subscription-details></pw-subscription-details>\n</ng-template> -->\n<!--\nValidate Password For Account Delete\n-->\n<pw-password-validation #passwordValidationModalForAccountDelete\n [destructive]=\"true\"\n (successEvent)=\"deleteUser($event)\">\n</pw-password-validation>\n<!--\nValidate Password For Display Key\n-->\n<pw-password-validation #passwordValidationModalForKey\n (successEvent)=\"displayApiKey()\">\n</pw-password-validation>\n<!--\nValidate Password For Unsubscribe\n-->\n<pw-password-validation #passwordValidationForUnsubscribe\n [destructive]=\"true\"\n (successEvent)=\"onValidatePassword($event)\">\n</pw-password-validation>\n<!--\nCancel Subscription Modal\n-->\n<ng-template #cancelSubscriptionModal let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\">{{ 'User.Subscriptions.CancelSubscription.Title' | transloco }}</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss(); reasonToCancel = '';\">\n </button>\n </div>\n <div class=\"modal-body\">\n <p>{{ 'User.Subscriptions.CancelSubscription.Message' | transloco }}</p>\n <div class=\"mb-3\">\n <label for=\"reasonToCancel\" class=\"form-label\">\n {{ 'User.Subscriptions.CancelSubscription.ReasonLabel' | transloco }} <span class=\"text-danger\">*</span>\n </label>\n <textarea\n id=\"reasonToCancel\"\n class=\"form-control\"\n rows=\"4\"\n [(ngModel)]=\"reasonToCancel\"\n [ngClass]=\"{'is-invalid': reasonToCancel && reasonToCancel.trim() === ''}\"\n placeholder=\"{{ 'User.Subscriptions.CancelSubscription.ReasonPlaceholder' | transloco }}\"\n aria-label=\"{{ 'User.Subscriptions.CancelSubscription.ReasonPlaceholder' | transloco }}\"></textarea>\n @if (reasonToCancel && reasonToCancel.trim() === '') {\n <div class=\"invalid-feedback\">\n {{ 'User.Subscriptions.Validation.ReasonRequired' | transloco }}\n </div>\n }\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"modal.dismiss(); reasonToCancel = '';\">\n {{ 'User.Subscriptions.CancelSubscription.KeepItForNow' | transloco }}\n </button>\n <button type=\"button\"\n class=\"btn btn-danger\"\n [disabled]=\"!reasonToCancel || reasonToCancel.trim() === ''\"\n (click)=\"onConfirmCancel(); modal.close()\">\n {{ 'User.Subscriptions.CancelSubscription.ConfirmButton' | transloco }}\n </button>\n </div>\n</ng-template>\n}\n\n@if (showTos) {\n <pw-privacy-and-tos [productId]=\"productId\"></pw-privacy-and-tos>\n}\n\n<router-outlet></router-outlet>\n","import { ChangeDetectorRef, Component, Injector, OnDestroy } from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { Paging, POLL_TIMEOUT } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\n\nimport { LazyLoadEvent } from 'primeng/api';\nimport { interval, Subscription } from 'rxjs';\nimport { mergeMap } from 'rxjs/operators';\n\n@Component({\n selector: 'pw-user-invoice',\n templateUrl: './user-invoice.component.html',\n styleUrls: ['./user-invoice.component.scss'],\n\n standalone: false\n})\nexport class UserInvoiceComponent extends AppBaseComponent implements OnDestroy {\n invoices = [];\n buttonBusy = false;\n userId: number;\n totalRecordsUnFiltered = 0;\n\n searchText = '';\n subscription: Subscription;\n intervalTimer = interval(POLL_TIMEOUT * 60 * 1000);\n isLoaded = false;\n page = 0;\n totalRecords = 0;\n\n invoiceFrequency = ['week', 'month', 'year'];\n\n constructor(\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n }\n\n onLazyLoad(event: LazyLoadEvent) {\n const pageDetails = HelperService.onTableLazyLoad(event);\n this.page = pageDetails.page;\n this.fetchInvoices({\n page: this.page,\n page_size: this.PAGE_SIZE,\n order_by: pageDetails.sortField,\n order_direction: pageDetails.sortOrder,\n search: this.searchText\n });\n }\n\n private fetchInvoices(paging: Paging) {\n this.isLoaded = false;\n this.userStore().subscribe(user => {\n if (user) {\n this.userId = user.id;\n this.userService.getUserInvoices(paging, user.id).subscribe(response => {\n this.isLoaded = true;\n this.invoices = response.invoices;\n this.totalRecords = response.object_count;\n this.totalRecordsUnFiltered = response.unfiltered_count;\n this.pollForInvoices();\n this.cdr.markForCheck();\n });\n }\n this.cdr.markForCheck();\n });\n }\n\n private pollForInvoices() {\n this.subscription = this.intervalTimer\n .pipe(mergeMap(() => this.userService.getUserInvoices({}, this.userId)))\n .subscribe(data => {\n this.invoices = data.invoices;\n this.cdr.markForCheck();\n });\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n}\n","<div class=\"row\" [class.custom-disable-wrapper]=\"buttonBusy\">\n <div class=\"col-12 d-flex flex-wrap justify-content-between align-items-center\">\n <h2 class=\"card-title p-0 float-start\">Your Invoices</h2>\n </div>\n</div>\n\n@if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"></p-progressSpinner>\n </div>\n}\n<div class=\"row primeng-datatable-container actions-collapsed mt-0\" [class.custom-disable-wrapper]=\"buttonBusy\" [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <div class=\"col-12 px-0\">\n <p-table #tt\n [value]=\"invoices\"\n [paginator]=\"totalRecords !== 0\"\n [rows]=\"PAGE_SIZE\"\n [lazy]=\"true\"\n [totalRecords]=\"totalRecords\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n >\n <ng-template pTemplate=\"caption\">\n <div class=\"search-filter justify-content-end\">\n <div class=\"text-end\">\n <label for=\"user-invoice-search\" class=\"visually-hidden\">Search Invoices</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><i class=\"fa fa-search\" aria-hidden=\"true\"></i></p-inputicon>\n <input id=\"user-invoice-search\"\n name=\"user-invoice-search\"\n [(ngModel)]=\"searchText\"\n (input)=\"tt.filterGlobal($event.target.value, 'contains')\"\n type=\"text\"\n pInputText\n placeholder=\"Search invoices...\"\n data-cy=\"incident-search\"\n aria-label=\"Search invoices...\" />\n </p-iconfield>\n </div>\n </div>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"col\" pSortableColumn=\"date\">Invoice Date <p-sortIcon field=\"date\"></p-sortIcon></th>\n <th scope=\"col\" pSortableColumn=\"frequency\">Frequency <p-sortIcon field=\"frequency\"></p-sortIcon></th>\n <th scope=\"col\" pSortableColumn=\"seatsPurchased\">Seats Purchased <p-sortIcon field=\"seatsPurchased\"></p-sortIcon></th>\n <th scope=\"col\" pSortableColumn=\"subtotal\">Subtotal <p-sortIcon field=\"subtotal\"></p-sortIcon></th>\n <th scope=\"col\" pSortableColumn=\"total\">Total (incl. tax) <p-sortIcon field=\"total\"></p-sortIcon></th>\n <th scope=\"col\">Action</th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-invoice>\n <tr>\n <td>{{ invoice.date | date:'dd-MMM-yyyy' }}</td>\n <td>\n <span class=\"badge\"\n [appDynamicBadge]=\"{\n itemsArray: invoiceFrequency,\n item: invoice.product.billing_frequency\n }\"\n color=\"blue-grey\">{{ invoice.product.billing_frequency }}</span>\n </td>\n <td>{{ invoice?.subscription_product?.purchased_units }}</td>\n <td>{{ (invoice.subtotal_in_cents / 100) | currency:invoice?.product?.currency }}</td>\n <td class=\"td-total\">{{ (invoice.total_in_cents / 100) | currency:invoice?.product?.currency }}</td>\n <td>\n @if (invoice?.file?.url) {\n <a class=\"btn btn-sm btn-primary\" [attr.href]=\"invoice.file.url\" target=\"_blank\" title=\"Download\">\n <i class=\"fa fa-download\">&nbsp;Download</i>\n </a>\n } @else {\n <a class=\"btn btn-sm btn-primary\" [attr.href]=\"invoice?.stripe_invoice_pdf\" target=\"_blank\" title=\"Download\">\n <i class=\"fa fa-download\">&nbsp;Download</i>\n </a>\n }\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (totalRecords === 0 && totalRecordsUnFiltered !== 0) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n }\n\n @if (totalRecords !== 0) {\n <pw-records-summary [showing]=\"tt?.value?.length ?? 0\" [total]=\"totalRecords\" />\n }\n\n </div>\n</div>\n@if (totalRecordsUnFiltered === 0 && isLoaded) {\n <pw-no-data [withImage]=\"true\" message=\"You don't have any invoice yet.\">\n </pw-no-data>\n}\n\n","import { ChangeDetectorRef, Component, Injector, OnInit } from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AppState, getUser } from '@posiwise/app-store';\nimport { CommonService, ProfileService } from '@posiwise/common-services';\nimport { User } from '@posiwise/common-utilities';\n\nimport { Store } from '@ngrx/store';\n\n@Component({\n selector: 'pw-communication-tab',\n templateUrl: './communication-tab.component.html',\n styleUrl: './communication-tab.component.scss',\n\n standalone: false\n})\nexport class CommunicationTabComponent extends AppBaseComponent implements OnInit {\n subscriptions = [];\n userSubscription = [];\n\n isLoaded = false;\n\n user: User;\n\n constructor(\n private readonly commonService: CommonService,\n private readonly profileService: ProfileService,\n private readonly store: Store<AppState>,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n }\n\n ngOnInit() {\n this.getAllSubscription();\n }\n\n private getAllSubscription() {\n this.commonService.getAllNewsletter().subscribe(response => {\n this.store.select(getUser).subscribe(user => {\n if (user?.currentUser) {\n this.user = user.currentUser;\n this.profileService\n .getUserObject('user_newsletters', this.user.slug)\n .subscribe(newsletter => {\n this.isLoaded = true;\n this.userSubscription = newsletter;\n this.subscriptions = response.newsletters;\n if (this.userSubscription.length > 0 && this.subscriptions.length > 0) {\n this.subscriptions.forEach(element => {\n const item = this.userSubscription?.find(\n x => x.newsletter_id === element.id\n );\n element.enabled = item ? item.send_newsletters : false;\n });\n } else {\n this.subscriptions.forEach(element => {\n element.enabled = false;\n });\n }\n this.cdr.markForCheck();\n });\n }\n this.cdr.markForCheck();\n });\n });\n }\n\n onValueChange(item, value) {\n const data = {\n send_newsletter: value\n };\n\n if (item.id === 9999) {\n const marketingSubs = {\n id: this.user.id,\n send_marketing_emails: value\n };\n this.profileService.updateUserProfile(marketingSubs).subscribe(() => {\n this.updateUser();\n this.toast.success(this.translation.translate('User.Settings.UpdatedMessage'));\n this.cdr.markForCheck();\n });\n } else {\n this.commonService.toggleNewsletter(item.id, data).subscribe(() => {\n this.updateUser();\n this.toast.success(\n this.translation.translate('User.Settings.Communications.UpdatedMessage')\n );\n this.cdr.markForCheck();\n });\n }\n }\n\n updateUser() {\n // this.userService.getUserInfo().subscribe(resp => {\n // this.localStorage.setItem('user', JSON.stringify(resp)).subscribe();\n // });\n }\n}\n","<div class=\"communication-settings\">\n <h2>{{ 'User.Settings.Communications.Title' | transloco }}</h2>\n\n <p class=\"settings-intro\">{{ 'User.Settings.Communications.Intro1' | transloco }}</p>\n <p class=\"settings-intro\">{{ 'User.Settings.Communications.Intro2' | transloco }}</p>\n\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n\n @if (isLoaded && subscriptions.length > 0) {\n <ul class=\"pref-list\">\n @for (item of subscriptions; track item; let idx = $index) {\n @if (item.visible || item.enabled) {\n <li class=\"pref-row\">\n <span class=\"pref-name\" [id]=\"'communication-tab-' + idx\">{{ item.name }}</span>\n <ui-switch [checked]=\"item.enabled\"\n [attr.aria-labelledby]=\"'communication-tab-' + idx\"\n (valueChange)=\"onValueChange(item, $event)\">\n </ui-switch>\n </li>\n }\n }\n </ul>\n }\n\n @if (isLoaded && subscriptions.length === 0) {\n <pw-no-data [withImage]=\"true\"\n [message]=\"'User.Settings.Communications.NoDataMessage' | transloco\">\n </pw-no-data>\n }\n</div>\n","import { ChangeDetectorRef, Component, Injector, OnDestroy, OnInit } from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { CommonService } from '@posiwise/common-services';\n\n@Component({\n selector: 'pw-others-tab',\n templateUrl: './others-tab.component.html',\n\n standalone: false\n})\nexport class OthersTabComponent extends AppBaseComponent implements OnInit, OnDestroy {\n subscriptionConfigs = [];\n globalConfigs = [];\n\n userId: number;\n\n isLoaded = false;\n\n constructor(\n private readonly commonService: CommonService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n }\n\n ngOnInit(): void {\n this.getGlobalConfigs();\n this.userStore().subscribe(res => {\n if (res) {\n this.userId = res.id;\n }\n this.cdr.markForCheck();\n });\n }\n\n private getGlobalSubscriptionConfig() {\n this.commonService\n .getAllGlobalSubscriptionConfigs()\n .subscribe(response => {\n this.subscriptionConfigs = response.global_subscription_configs;\n this.globalConfigs.forEach(globalConfig => {\n const config = this.subscriptionConfigs?.find(\n subscriptionConfig =>\n subscriptionConfig.global_config_id === globalConfig?.id\n );\n globalConfig.value = config?.value;\n globalConfig.global_subscription_config_id = config?.id;\n });\n this.cdr.markForCheck();\n })\n .add(() => {\n this.isLoaded = true;\n this.cdr.markForCheck();\n });\n }\n\n private getGlobalConfigs() {\n this.commonService.getAllGlobalConfigs().subscribe(response => {\n this.globalConfigs = response.global_configs;\n this.getGlobalSubscriptionConfig();\n this.cdr.markForCheck();\n });\n }\n\n onValueChange(item, value) {\n const data = {\n user_id: this.userId,\n value,\n global_config_id: item?.id\n };\n const sub$ = item?.global_subscription_config_id\n ? this.commonService.editGlobalSubscriptionConfig(\n item?.global_subscription_config_id,\n data\n )\n : this.commonService.postGlobalSubscriptionConfig(data);\n sub$.subscribe(() => {\n this.toast.success(this.translation.translate('User.OtherSettings.UpdatedMessage'));\n this.cdr.markForCheck();\n }).add(() => {\n this.getGlobalConfigs();\n });\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n }\n}\n","<div class=\"row\">\n <div class=\"col-12\">\n <h2>Other</h2>\n </div>\n</div>\n@if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n}\n@if (isLoaded && globalConfigs?.length) {\n <div class=\"row mt-4 pt-1\"\n >\n <div class=\"col-md-6 col-sm-6\">\n @for (item of globalConfigs; track item; let idx = $index) {\n <div class=\"mb-3\">\n <div class=\"row\">\n <div class=\"col-md-10 col-sm-6\">\n <span class=\"pw-label-style\" [id]=\"'others-tab-' + idx\"> {{ item?.name }} </span>\n </div>\n <div class=\"col-md-2 col-sm-6\">\n <ui-switch [checked]=\"item.value === 'true'\"\n [attr.aria-labelledby]=\"'others-tab-' + idx\"\n (valueChange)=\"onValueChange(item, $event)\">\n </ui-switch>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n}\n\n@if (isLoaded && !globalConfigs?.length) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'User.OtherSettings.NoDataMessage' | transloco\"> </pw-no-data>\n </div>\n}\n","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n Injector,\n OnInit,\n ViewChild\n} from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\n\nimport { StatusCodes } from 'http-status-codes';\n\n@Component({\n selector: 'pw-security-tab',\n templateUrl: './security-tab.component.html',\n styleUrls: ['./security-tab.component.scss'],\n\n standalone: false\n})\nexport class SecurityTabComponent extends AppBaseComponent implements OnInit {\n @ViewChild('password', { static: false }) passwordRef: ElementRef;\n @ViewChild('verificationCode', { static: false }) verificationCode: ElementRef;\n\n @ViewChild('ssoPassword', { static: false }) ssoPasswordRef: ElementRef;\n\n showSSOSection = false;\n ssoPasswordVerified = false;\n isSSOPasswordInvalid = true;\n\n user;\n\n isCurrentPasswordValid = true;\n passwordVerified = false;\n show2FA = false;\n\n created2faDetails: object;\n\n constructor(\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n }\n\n ngOnInit() {\n this.getUser();\n }\n\n private getUser() {\n this.userService.getUserInfo().subscribe(res => {\n this.user = res;\n this.cdr.markForCheck();\n });\n }\n\n validatePassword() {\n const password = this.passwordRef.nativeElement.value;\n if (password) {\n this.userService.checkPassword({ password }).subscribe({\n next: data => {\n if (data?.status === StatusCodes.OK) {\n if (this.user?.enable_two_factor_authenticator === false) {\n this.passwordVerified = true;\n this.create2FA();\n } else {\n this.disable2FA();\n }\n }\n this.cdr.markForCheck();\n },\n error: err => {\n if (err) {\n this.toast.error(err.error.message);\n this.passwordRef.nativeElement.value = '';\n }\n this.cdr.markForCheck();\n }\n });\n }\n }\n\n checkValidity() {\n const password = this.passwordRef.nativeElement.value;\n if (password.length > 5) {\n this.isCurrentPasswordValid = false;\n } else {\n this.isCurrentPasswordValid = true;\n }\n }\n\n private create2FA() {\n this.userService.createTwoFactorAuthenticator().subscribe(res => {\n this.created2faDetails = res;\n this.cdr.markForCheck();\n });\n }\n\n verify2FA() {\n this.userService\n .verifyTwoFactorAuthenticator(this.verificationCode.nativeElement.value)\n .subscribe(() => {\n this.enable2FA();\n });\n }\n\n private enable2FA() {\n this.userService\n .enableTwoFactorAuthenticator(this.verificationCode.nativeElement.value)\n .subscribe(_ => {\n this.getUser();\n this.reset();\n this.cdr.markForCheck();\n });\n }\n\n private disable2FA() {\n this.userService.disableTwoFactorAuthenticator().subscribe(_ => {\n this.getUser();\n this.reset();\n this.cdr.markForCheck();\n });\n }\n\n reset() {\n this.show2FA = false;\n this.isCurrentPasswordValid = true;\n this.passwordVerified = false;\n this.created2faDetails = {};\n }\n\n checkSSOPasswordValidity() {\n const password = this.ssoPasswordRef.nativeElement.value;\n this.isSSOPasswordInvalid = password.length <= 5;\n }\n\n validateSSOPassword() {\n const password = this.ssoPasswordRef.nativeElement.value;\n if (password) {\n this.userService.checkPassword({ password }).subscribe({\n next: data => {\n if (data?.status === StatusCodes.OK) {\n this.ssoPasswordVerified = true;\n }\n this.cdr.markForCheck();\n },\n error: err => {\n this.toast.error(err.error.message);\n this.ssoPasswordRef.nativeElement.value = '';\n this.cdr.markForCheck();\n }\n });\n }\n }\n\n triggerSSO() {\n this.userService.sendSSOActivationEmail().subscribe(() => {\n this.toast.success(\n this.user?.cognito_sso_activated\n ? 'Activation email resent successfully.'\n : 'SSO activation email sent successfully.'\n );\n this.getUser();\n this.resetSSO();\n this.cdr.markForCheck();\n });\n }\n\n resetSSO() {\n this.showSSOSection = false;\n this.ssoPasswordVerified = false;\n this.isSSOPasswordInvalid = true;\n if (this.ssoPasswordRef?.nativeElement) {\n this.ssoPasswordRef.nativeElement.value = '';\n }\n }\n}\n","<div class=\"row\">\n <div class=\"col-12\">\n <h2>Security settings</h2>\n </div>\n</div>\n<p-accordion>\n <p-accordion-panel value=\"0\">\n <p-accordion-header>Two Factor Authentication (2FA)</p-accordion-header>\n <p-accordion-content>\n <div class=\"row mt-2\">\n <div class=\"col-12\">\n <div class=\"d-flex\">\n <p class=\"small text-muted\"> Add an extra layer of security to your user account by asking to verify their\n identity when they enter a username and password </p>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <!-- Disable 2FA -->\n @if (user?.enable_two_factor_authenticator) {\n <button class=\"btn btn-danger\" (click)=\"show2FA = true\"> Disable\n </button>\n }\n <!-- Enable 2FA -->\n @if (!user?.enable_two_factor_authenticator) {\n <button class=\"btn btn-primary\"\n [disabled]=\"created2faDetails?.code\" (click)=\"show2FA = true\"> Enable </button>\n }\n </div>\n </div>\n @if (show2FA) {\n <div class=\"row\">\n <div class=\"col-12 col-md-6 col-lg-4 mt-2\">\n <div class=\"mb-3\">\n @if (!passwordVerified) {\n <input type=\"password\" class=\"form-control\" #password placeholder=\"Current Password\"\n (keyup)=\"checkValidity()\" id=\"input_current_password_800\" name=\"input_current_password_800\"\n aria-label=\"Current Password\" />\n }\n </div>\n </div>\n @if (created2faDetails?.code) {\n <div class=\"col-12\">\n <p class=\"small\"> Scan the QR code below or use secret manually with the Google authenticator app on your mobile\n device, after that fill in the field below with the code generated in the app </p>\n <img [src]=\"created2faDetails?.qr_uri\" alt=\"loading QR code...\" class=\"qr-code img-thumbnail img-responsive\" />\n <strong> Secret Key: {{ created2faDetails?.code }}</strong>\n <p class=\"small\">Auth Type: Time Based OTP</p>\n </div>\n }\n </div>\n }\n @if (show2FA) {\n <div class=\"row\">\n <div class=\"col-4\">\n <div class=\"mb-3 mt-2\">\n @if (passwordVerified) {\n <input type=\"text\" #verificationCode class=\"form-control\"\n placeholder=\"Provide passcode from authenticator app\" id=\"input_provide_passcode_from_authenticator_app_800\" name=\"input_provide_passcode_from_authenticator_app_800\"\n aria-label=\"Provide passcode from authenticator app\" />\n }\n </div>\n </div>\n @if (show2FA) {\n <div class=\"col-12\">\n <div class=\"d-flex mt-2\">\n <button class=\"btn btn-raised btn-outline-default me-2\" (click)=\"reset()\"> Cancel </button>\n @if (!passwordVerified) {\n <button class=\"btn btn-raised btn-primary\" (click)=\"validatePassword()\"\n [disabled]=\"isCurrentPasswordValid\"> Validate </button>\n }\n @if (passwordVerified) {\n <button class=\"btn btn-raised btn-primary\" (click)=\"verify2FA()\"> Confirm </button>\n }\n </div>\n </div>\n }\n </div>\n }\n </p-accordion-content>\n </p-accordion-panel>\n <p-accordion-panel value=\"1\">\n <p-accordion-header>Single Sign On (SSO) - AWS Cognito</p-accordion-header>\n <p-accordion-content>\n <div class=\"row mt-2\">\n <div class=\"col-12\">\n <p class=\"small text-muted\"> {{ user?.cognito_sso_activated ? 'You have already activated AWS Cognito SSO, if you click on ‘Resend activation email‘ you‘ll receive an email with instructions to reset your SSO\n password.' : 'Once you click ‘Enable’, you’ll receive an email with instructions to activate your AWS Cognito\n SSO. This will enable you to access all our systems using a single password.' }} </p>\n </div>\n </div>\n <!-- Enable or Resend Button -->\n @if (!showSSOSection) {\n <div class=\"row\">\n <div class=\"col-12\">\n <button class=\"btn btn-primary\" (click)=\"showSSOSection = true\"> {{ user?.cognito_sso_activated ? 'Resend\n activation email' : 'Enable' }} </button>\n </div>\n </div>\n }\n <!-- Password Validation -->\n @if (showSSOSection) {\n <div class=\"row\">\n @if (!ssoPasswordVerified) {\n <div class=\"col-12 col-md-6 col-lg-4 mt-2\">\n <div class=\"mb-3\">\n <input type=\"password\" class=\"form-control\" #ssoPassword placeholder=\"Current Password\"\n (keyup)=\"checkSSOPasswordValidity()\" id=\"input_current_password_801\" name=\"input_current_password_801\"\n aria-label=\"Current Password\" />\n </div>\n </div>\n }\n <div class=\"col-12\">\n <div class=\"d-flex mt-2\">\n <button class=\"btn btn-raised btn-outline-default me-2\" (click)=\"resetSSO()\"> Cancel </button>\n @if (!ssoPasswordVerified) {\n <button class=\"btn btn-raised btn-primary\" (click)=\"validateSSOPassword()\"\n [disabled]=\"isSSOPasswordInvalid\"> Validate </button>\n }\n @if (ssoPasswordVerified) {\n <button class=\"btn btn-primary\" (click)=\"triggerSSO()\"> Confirm </button>\n }\n </div>\n </div>\n </div>\n }\n </p-accordion-content>\n </p-accordion-panel>\n</p-accordion>\n","import { Component, ViewChild } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { PermissionService } from '@posiwise/common-services';\n\nimport { MenuItem } from 'primeng/api';\n\n@Component({\n selector: 'pw-settings',\n templateUrl: './settings-tabs.component.html',\n\n standalone: false\n})\nexport class SettingsComponent {\n @ViewChild('menuItems', { static: true }) menu: MenuItem[];\n\n items: MenuItem[];\n activeItem: MenuItem;\n\n constructor(\n private readonly router: Router,\n private readonly permissionService: PermissionService\n ) {\n this.items = [\n {\n id: 'communications',\n label: 'Communications',\n icon: 'fa fa-fw fa-cogs',\n routerLink: ['/settings/communication']\n },\n {\n id: 'security',\n label: 'Security',\n icon: 'fa fa-fw fa-lock',\n routerLink: ['/settings/security']\n },\n {\n id: 'other',\n label: 'Other',\n icon: 'fa fa-fw fa-list',\n routerLink: ['/settings/other']\n }\n ];\n this.activeItem =\n this.items[\n this.items.findIndex(\n record => record.routerLink[0] === this.router.url.split('?')[0]\n )\n ];\n }\n\n activateMenu() {\n this.activeItem = this.menu['activeItem'];\n }\n}\n","<pw-tabs [items]=\"items\"></pw-tabs>\n","import { ChangeDetectorRef, Component, Injector, OnInit } from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { CommonService, PermissionService } from '@posiwise/common-services';\n\n@Component({\n selector: 'pw-support',\n templateUrl: './support.component.html',\n styleUrls: ['./support.component.scss'],\n\n standalone: false\n})\nexport class SupportComponent extends AppBaseComponent implements OnInit {\n supports = [];\n\n subscriptionId: number;\n\n isLoading: boolean;\n\n isLoaded = false;\n\n constructor(\n injector: Injector,\n private readonly commonService: CommonService,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n }\n\n ngOnInit(): void {\n this.subscriptionId = PermissionService.selectedSubscription?.id;\n this.getAllSupport();\n }\n\n private getAllSupport() {\n this.isLoading = true;\n this.commonService\n .getAllCustomerSupport(this.subscriptionId)\n .subscribe(response => {\n this.supports = response;\n this.cdr.markForCheck();\n })\n .add(() => {\n this.isLoading = false;\n this.isLoaded = true;\n this.cdr.markForCheck();\n });\n }\n}\n","<div class=\"row m-3\">\n <div class=\"col-12 mb-3\">\n <div\n class=\"col-12 d-flex flex-wrap justify-content-between align-items-center mt-4\">\n <h2 class=\"card-title p-0 float-start\">Support Center</h2>\n <a routerLink=\"/support-details/add\"\n aria-label=\"Navigate to Target\"\n class=\"btn btn-sm btn-outline-primary float-end\"\n tabindex=\"0\"\n (keydown)=\"$event.key === 'Enter' && $event.target.click()\"\n aria-expanded=\"false\">\n <i class=\"fa fa-plus-circle\"\n aria-hidden=\"true\"></i>\n Create new support request\n </a>\n </div>\n </div>\n <div class=\"col-12 my-3\">\n <h3>Previous support requests</h3>\n <p>Please note that responses to your support requests are sent directly to your email. You can simply reply to those\n emails for further assistance.</p>\n </div>\n @if (isLoading) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (supports?.length) {\n <div class=\"col-12 mb-3\">\n <p-accordion>\n @for (item of supports; track item; let i = $index) {\n <p-accordion-panel [value]=\"i\">\n <p-accordion-header>{{ item?.created_at | dateFormat }} ({{ item?.user_name }}) {{ item?.title }}</p-accordion-header>\n <p-accordion-content>\n <p>{{ item?.description }}</p>\n <a [href]=\"item?.attachment?.version_200x200?.url\"\n target=\"_blank\">\n @if (item?.attachment?.version_200x200?.url) {\n <img alt=\"version_200x200\"\n [src]=\"item?.attachment?.version_200x200?.url\"\n class=\"img-fluid\" />\n }</a>\n </p-accordion-content>\n </p-accordion-panel>\n }\n </p-accordion>\n </div>\n }\n @if (!supports?.length && isLoaded) {\n <div class=\"col-12\"\n >\n <pw-no-data [withImage]=\"true\" message=\"No support requests found\"> </pw-no-data>\n </div>\n }\n </div>\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Injector,\n OnInit,\n Renderer2\n} from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\n\nimport { AppAdmin } from '@posiwise/admin-module-utils';\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AuthService, CommonService, PermissionService } from '@posiwise/common-services';\nimport { HelperService } from '@posiwise/helper-service';\nimport { ValidateForm } from '@posiwise/utils';\n\n@Component({\n selector: 'pw-support-details',\n templateUrl: './support-details.component.html',\n styleUrls: ['./support-details.component.scss'],\n\n standalone: false\n})\nexport class SupportDetailsComponent extends AppBaseComponent implements AfterViewInit, OnInit {\n form: UntypedFormGroup;\n\n uploadedFiles = [];\n\n invalidFile = false;\n isSubmitClicked = false;\n\n siteKey: string;\n\n recaptcha = null;\n\n isLoading: boolean;\n filesUploaded: boolean;\n subscriptionId;\n\n constructor(\n injector: Injector,\n private readonly commonService: CommonService,\n private readonly authService: AuthService,\n private readonly renderer: Renderer2,\n private readonly el: ElementRef,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n this.form = AppAdmin.customerSupportForm();\n this.form.get('product_id').setValue(PermissionService.selectedProduct.id);\n this.siteKey = this.appConfig.integrations.captcha_key_V2;\n }\n\n ngOnInit(): void {\n this.subscriptionId = PermissionService.selectedSubscription?.id;\n }\n\n ngAfterViewInit() {\n this.attachCloseButtonListener();\n }\n\n @ValidateForm('form')\n onSave() {\n this.isSubmitClicked = true;\n }\n\n handleSuccess(token: string) {\n if (token) {\n this.authService.validateReCaptcha(token).subscribe((isSuccess: boolean) => {\n this.cdr.markForCheck();\n if (isSuccess) {\n this.isLoading = true;\n const data = {\n ...this.form.value\n };\n if (this.uploadedFiles.length > 0) {\n data.attachment = this.uploadedFiles[0];\n }\n if (!data.attachment) {\n delete data.attachment;\n }\n this.commonService\n .postCustomerSupport({ ...data, subscription_id: this.subscriptionId })\n .subscribe(() => {\n this.back();\n })\n .add(() => {\n this.isLoading = false;\n this.isSubmitClicked = false;\n this.cdr.markForCheck();\n });\n }\n });\n }\n }\n\n onSelect(event = null) {\n this.invalidFile = false;\n for (const file of event.files) {\n if (!HelperService.validateFile(file, this.toast)) {\n this.invalidFile = true;\n } else {\n this.uploadedFiles.push(file);\n }\n }\n this.filesUploaded = true;\n\n if (this.invalidFile) {\n setTimeout(() => this.attachCloseButtonListener(), 0);\n }\n }\n\n onRemove(event) {\n this.uploadedFiles = this.uploadedFiles.filter(x => event.file.name !== x.name);\n if (this.uploadedFiles.length === 0) {\n this.filesUploaded = false;\n }\n this.invalidFile = false;\n }\n\n attachCloseButtonListener() {\n const closeButton = this.el.nativeElement.querySelector('.p-message-close');\n\n if (closeButton) {\n this.renderer.listen(closeButton, 'click', () => {\n this.handleCloseButtonClick();\n });\n }\n }\n\n handleCloseButtonClick() {\n this.invalidFile = false;\n this.filesUploaded = false;\n }\n\n onUploadError(event) {\n HelperService.onUploadError(event, this.toast);\n }\n}\n","<div class=\"container-fluid pw-tab overflow-hidden\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body\">\n <div class=\"me-auto col-xs-6 mt-4\">\n <a aria-label=\"Navigate to Target\" (click)=\"back()\" class=\"previous\"><i\n class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n <h3 class=\"mt-3\">{{ 'Label.NewSupport' | transloco }}</h3>\n </div>\n <div class=\"p-2 m-1 mt-3\">\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSave()\">\n <div class=\"row\">\n <div class=\"col-12\">\n <pw-input-container controlId=\"support-details-title\"\n label=\"title\"\n name=\"title\"\n errorMsg=\"Title is required\">\n <input type=\"text\"\n id=\"support-details-title\"\n class=\"form-control\"\n [placeholder]=\"'Support.Placeholder.Title' | transloco\"\n formControlName=\"title\"\n aria-label=\"Title\" />\n </pw-input-container>\n </div>\n <div class=\"col-12\">\n <pw-input-container controlId=\"support-details-description\"\n label=\"Description\"\n errorMsg=\"description is required\"\n name=\"description\">\n <textarea rows=\"3\"\n id=\"support-details-description\"\n type=\"text\"\n class=\"form-control\"\n [placeholder]=\"'Support.Placeholder.Description' | transloco\"\n formControlName=\"description\"\n aria-label=\"Description\"></textarea>\n </pw-input-container>\n </div>\n <div class=\"col-12\">\n <div class=\"mb-3 file-upload-support-details\">\n <span id=\"support-details-file-label\" class=\"pw-label-style\">Upload Picture</span>\n <p-fileUpload #forms\n [attr.aria-labelledby]=\"'support-details-file-label'\"\n name=\"myfile[]\"\n [customUpload]=\"true\"\n [showUploadButton]=\"false\"\n accept=\"image/*\"\n [disabled]=\"uploadedFiles && uploadedFiles.length > 0\"\n (onSelect)=\"onSelect($event)\"\n (onRemove)=\"onRemove($event)\"\n (onError)=\"onUploadError($event)\">\n <ng-template pTemplate=\"content\">\n @if (!uploadedFiles?.length) {\n <div class=\"drag-drop-text\">\n <p>You can drag and drop your file here</p>\n </div>\n }\n </ng-template>\n </p-fileUpload>\n </div>\n </div>\n @if (isLoading) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n <div class=\"col-12 text-end mt-3\">\n @if (isSubmitClicked) {\n <div class=\"support-details-captcha\">\n <ngx-recaptcha2 [ngModelOptions]=\"{ standalone: true }\"\n [siteKey]=\"siteKey\"\n size=\"normal\"\n [(ngModel)]=\"recaptcha\"\n (success)=\"handleSuccess($event)\">\n </ngx-recaptcha2>\n </div>\n }\n @if (!isSubmitClicked) {\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"back()\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"submit\"\n class=\"btn btn-primary\" [disabled]=\"invalidFile\">\n {{ 'Button.Submit' | transloco }}\n </button>\n }\n </div>\n </div>\n </form>\n </div>\n </div>\n </div>\n</div>\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n Output,\n TemplateRef,\n ViewChild\n} from '@angular/core';\n\nimport { ProfileService } from '@posiwise/common-services';\nimport { Subscription } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\n\nimport { FileUpload } from 'primeng/fileupload';\nimport { forkJoin, Observable } from 'rxjs';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { ModalContext } from '../../shared/interface/user-module.interface';\n\n@Component({\n selector: 'pw-edit-portfolios',\n templateUrl: './edit-portfolios.component.html',\n styleUrls: ['./edit-portfolios.component.scss'],\n\n standalone: false\n})\nexport class EditPortfoliosComponent {\n @ViewChild('content', { static: true }) content: TemplateRef<ModalContext>;\n @ViewChild('form', { static: false }) uploader: FileUpload;\n\n @Output() successEvent: EventEmitter<boolean> = new EventEmitter();\n\n @Input() id: number;\n @Input() slug: string;\n\n uploadedFiles = [];\n project = [];\n projectPictures = [];\n\n busy: boolean;\n filesUploaded: boolean;\n\n constructor(\n private readonly modalService: NgbModal,\n private readonly profileService: ProfileService,\n private readonly cdr: ChangeDetectorRef\n ) {}\n\n openModal(id: number) {\n this.id = 0;\n this.id = id;\n this.modalService.open(this.content, {\n centered: true,\n size: 'lg',\n windowClass: 'modal-holder'\n });\n }\n\n onSelect(event = null) {\n // eslint-disable-next-line no-restricted-syntax\n for (const file of event.files) {\n if (HelperService.validateFile(file)) {\n this.uploadedFiles.push(file);\n }\n }\n this.filesUploaded = true;\n }\n\n getProjectPictures() {\n this.profileService.getProjectPictures(this.slug).subscribe(response => {\n if (response.length > 0) {\n this.projectPictures = response.flatMap(x => x.project_pictures);\n }\n this.cdr.markForCheck();\n });\n }\n\n /**\n * Uploads multiple images for the project\n * @param form\n */\n onSave(form) {\n if (this.uploadedFiles.length > 0) {\n this.busy = true;\n const subscriptions$: Observable<Subscription>[] = [];\n this.uploadedFiles.forEach(file => {\n subscriptions$.push(\n this.profileService.addProjectPictures({\n project_id: Number(this.id),\n image: file\n })\n );\n });\n\n forkJoin(subscriptions$)\n .subscribe({\n next: () => {\n form.clear();\n this.successEvent.emit();\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n },\n error: () => {\n form.clear();\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n }\n })\n .add(() => {\n this.busy = false;\n this.cdr.markForCheck();\n });\n }\n }\n\n deleteProjectPicture(id: number) {\n this.profileService.deletePicture(id).subscribe(_ => {\n this.getProjectPictures();\n this.cdr.markForCheck();\n });\n }\n\n trackByImage(_index: number, item: { id: number }) {\n return item?.id;\n }\n\n onRemove(event) {\n this.uploadedFiles = this.uploadedFiles.filter(x => event.file.name !== x.name);\n this.filesUploaded = false;\n }\n\n onUploadError(event) {\n HelperService.onUploadError(event);\n }\n}\n","<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\"\n id=\"modal-basic-title\">Add/Edit Portfolio Item</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n Add a cover image or a downloadable file for your portfolio item\n <p-fileUpload #form\n name=\"myfile[]\"\n [customUpload]=\"true\"\n [showUploadButton]=\"false\"\n accept=\"\"\n [disabled]=\"uploadedFiles && uploadedFiles.length > 0\"\n (onSelect)=\"onSelect($event)\"\n (onRemove)=\"onRemove($event)\"\n (onError)=\"onUploadError($event)\">\n <ng-template pTemplate=\"content\">\n @if (!uploadedFiles?.length) {\n <div class=\"drag-drop-text\">\n <p>You can drag and drop your file here</p>\n </div>\n }\n </ng-template>\n </p-fileUpload>\n <div class=\"ui-fileupload-content ui-widget-content ui-corner-bottom\">\n <div class=\"ui-fileupload-files\">\n <div class=\"\">\n <h5>Uploaded Pictures</h5>\n @for (image of projectPictures; track trackByImage($index, image)) {\n <div\n class=\"ui-fileupload-row d-inline-block\">\n <div>\n <img [src]=\"image?.picture?.version_50x50?.url\"\n alt=\"\"\n width=\"50\" />\n </div>\n <div class=\"pt-1 ps-1\">\n <button icon=\"pi pi-times\"\n type=\"button\"\n (click)=\"deleteProjectPicture(image.id)\"\n class=\"ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only\">\n <span class=\"ui-button-icon-left ui-clickable pi pi-times\"></span>\n </button>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"modal.close()\">\n Cancel\n </button>\n <button type=\"button\"\n class=\"btn btn-primary\"\n [buttonBusy]=\"busy\"\n (click)=\"onSave(form)\">\n Save\n </button>\n </div>\n</ng-template>\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Injector,\n OnDestroy,\n OnInit,\n Output,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { ProfileService, ValidationService } from '@posiwise/common-services';\nimport { Project } from '@posiwise/common-utilities';\nimport { appendQueryParam, clearQueryParams, ValidateForm } from '@posiwise/utils';\n\nimport moment from 'moment';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { ModalContext } from '../../shared/interface/user-module.interface';\n\n@Component({\n selector: 'pw-edit-project-modal',\n templateUrl: './edit-project-modal.component.html',\n styleUrls: ['./edit-project-modal.component.scss'],\n\n standalone: false\n})\nexport class EditProjectModalComponent extends AppBaseComponent implements OnInit, OnDestroy {\n @ViewChild('content', { static: true }) content: TemplateRef<ModalContext>;\n\n @Output() cancelEvent: EventEmitter<void> = new EventEmitter();\n @Output() saveEvent: EventEmitter<boolean> = new EventEmitter();\n\n form: UntypedFormGroup;\n\n weeks: number[] = [];\n startYears: number[];\n endYears: number[];\n\n title = 'Add Project';\n\n submitted = false;\n buttonBusy = false;\n\n private currentProject: Project;\n\n userId: number;\n\n constructor(\n public modalService: NgbModal,\n private readonly fb: UntypedFormBuilder,\n private readonly profileService: ProfileService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n this.getForm();\n }\n\n get f() {\n return this.form.controls;\n }\n\n ngOnInit() {\n clearQueryParams(this.router, this.route);\n this.userStore().subscribe(user => {\n this.userId = user.id;\n this.cdr.markForCheck();\n });\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n }\n\n getStartYear() {\n const d = new Date(`01 July 1980`);\n const range = [];\n for (let i = new Date().getFullYear(); i >= d.getFullYear(); i--) {\n range.push(i);\n }\n this.startYears = range;\n }\n\n getEndYears(start_year) {\n const range = [];\n for (let i = new Date().getFullYear(); i >= start_year; i--) {\n range.push(i);\n }\n this.endYears = range;\n }\n\n private getWeeks() {\n const endYear = moment([this.form.value['end_year']]);\n const startYear = moment([this.form.value['start_year']]);\n if (endYear) {\n const weeks = endYear.diff(startYear, 'weeks');\n this.weeks = Array.from(Array(weeks).keys());\n }\n }\n\n onOpen(item = null) {\n this.currentProject = item;\n appendQueryParam(this.router, this.route, {\n modal: 'editProjects'\n });\n\n if (item) {\n this.form.patchValue(item);\n this.title = `Edit Project - ${item.title}`;\n this.getStartYear();\n this.getEndYears(item.end_year);\n this.getWeeks();\n } else {\n this.form.reset();\n this.title = 'Add Project';\n }\n\n this.modalService.open(this.content, {\n centered: true,\n size: 'lg',\n windowClass: 'modal-holder'\n });\n }\n\n @ValidateForm('form')\n onSaveDetail() {\n this.submitted = true;\n this.buttonBusy = true;\n const { value } = this.form;\n value.user_id = this.userId;\n\n const subscription$ = this.currentProject?.id\n ? this.profileService.updateProjects(this.currentProject.id, value)\n : this.profileService.addProjects(value);\n subscription$\n .subscribe(() => {\n this.modalService.dismissAll();\n this.toast.success(\n this.translation.translate('User.Profile.Projects.ProjectUpdated')\n );\n this.saveEvent.emit(true);\n this.cdr.markForCheck();\n })\n .add(() => {\n this.submitted = false;\n this.buttonBusy = false;\n this.cdr.markForCheck();\n });\n }\n\n private getForm() {\n this.form = this.fb.group({\n start_year: [\n null,\n [\n Validators.required,\n Validators.pattern(ValidationService.CustomValidatorPatterns.Year)\n ]\n ],\n end_year: [\n null,\n [\n Validators.required,\n Validators.pattern(ValidationService.CustomValidatorPatterns.Year)\n ]\n ],\n client_name: [null, Validators.required],\n title: [null, Validators.required],\n description: [null, Validators.required],\n length: ['', [Validators.required, Validators.max(5000)]],\n advertisable: [false],\n syndicated: [false]\n });\n }\n}\n","<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\"\n id=\"modal-basic-title\">{{ title }}</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"form\">\n <div class=\"row p-2\">\n <!-- Title -->\n <pw-input-container class=\"col-12\"\n controlId=\"edit-project-title\"\n label=\"Title\"\n name=\"title\"\n errorMsg=\"This field is required.\">\n <input type=\"text\"\n id=\"edit-project-title\"\n class=\"form-control\"\n formControlName=\"title\"\n [placeholder]=\"'User.Profile.Projects.Placeholder.Title' | transloco\"\n [ngClass]=\"{ 'is-invalid': submitted && f.title.errors }\"\n aria-label=\"Title\" />\n </pw-input-container>\n <!-- Client Name -->\n <pw-input-container class=\"col-12\"\n controlId=\"edit-project-client_name\"\n label=\"Client Name\"\n name=\"client_name\"\n errorMsg=\"This field is required.\">\n <input type=\"text\"\n id=\"edit-project-client_name\"\n class=\"form-control\"\n formControlName=\"client_name\"\n [placeholder]=\"'User.Profile.Projects.Placeholder.ClientName' | transloco\"\n [ngClass]=\"{ 'is-invalid': submitted && f.client_name.errors }\"\n aria-label=\"Client Name\" />\n </pw-input-container>\n <!-- Project Start Year -->\n <pw-input-container class=\"col-12 col-md-4\"\n controlId=\"edit-project-start_year\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"Start\"\n name=\"start_year\"\n errorMsg=\"YYYY format date is required\">\n <p-select\n [attr.aria-labelledby]=\"'edit-project-start_year-label'\"\n (onShow)=\"getStartYear()\"\n formControlName=\"start_year\"\n [options]=\"startYears\"\n [placeholder]=\"'User.Profile.Projects.Placeholder.StartYear' | transloco\"\n (onChange)=\"getEndYears($event.value)\"\n [ngClass]=\"{ 'is-invalid': submitted && f.start_year.errors }\">\n </p-select>\n </pw-input-container>\n <!-- Project End Year -->\n <pw-input-container class=\"col-12 col-md-4\"\n controlId=\"edit-project-end_year\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"End\"\n name=\"end_year\"\n errorMsg=\"YYYY format date is required\">\n <p-select\n [attr.aria-labelledby]=\"'edit-project-end_year-label'\"\n formControlName=\"end_year\"\n [options]=\"endYears\"\n [placeholder]=\"'User.Profile.Projects.Placeholder.EndYear' | transloco\"\n (onChange)=\"getEndYears($event.value)\"\n [ngClass]=\"{ 'is-invalid': submitted && f.end_year.errors }\">\n </p-select>\n </pw-input-container>\n <!-- Total Weeks Worked -->\n <pw-input-container class=\"col-12 col-md-4\"\n controlId=\"edit-project-length\"\n label=\"Weeks worked\"\n name=\"length\"\n errorMsg=\"This field is required. (0-5000)\">\n <input type=\"number\"\n id=\"edit-project-length\"\n formControlName=\"length\"\n class=\"form-control\"\n [ngClass]=\"{ 'is-invalid': submitted && f.length.errors }\"\n aria-label=\"Length\" />\n </pw-input-container>\n <!-- Description -->\n <pw-input-container class=\"col-12\"\n controlId=\"edit-project-description\"\n label=\"Description\"\n name=\"description\"\n errorMsg=\"This field is required.\">\n <textarea type=\"text\"\n id=\"edit-project-description\"\n class=\"form-control\"\n formControlName=\"description\"\n required\n [placeholder]=\"'User.Profile.Projects.Placeholder.Description' | transloco\"\n [ngClass]=\"{ 'is-invalid': submitted && f.description.errors }\"\n aria-label=\"Description\"></textarea>\n </pw-input-container>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"modal.close()\">\n Cancel\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary\"\n (click)=\"onSaveDetail()\">Save</button>\n </div>\n</ng-template>\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Injector,\n OnInit,\n Output,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { QualificationService } from '@posiwise/common-services';\nimport { appendQueryParam, clearQueryParams, ValidateForm } from '@posiwise/utils';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { ModalContext } from '../../shared/interface/user-module.interface';\n\n@Component({\n selector: 'pw-edit-qualifications-modal',\n templateUrl: './edit-qualifications-modal.component.html',\n styleUrls: ['./edit-qualifications-modal.component.scss'],\n\n standalone: false\n})\nexport class EditQualificationsModalComponent extends AppBaseComponent implements OnInit {\n @Output()\n saveEvent: EventEmitter<void> = new EventEmitter();\n\n @ViewChild('content', { static: true }) content: TemplateRef<ModalContext>;\n\n title = 'Add Education';\n\n form: UntypedFormGroup;\n\n userId: number;\n\n now: Date = new Date(); // Used for datepicker\n\n minToDate = this.now;\n\n qualifications = [\n { value: 0, label: 'No formal education' },\n { value: 1, label: 'Primary education' },\n { value: 2, label: 'Secondary educ, action or high school' },\n { value: 3, label: 'GED' },\n { value: 4, label: 'Vocational qualification' },\n { value: 5, label: \"Bachelor's degree\" },\n { value: 7, label: \"Master's degree\" },\n { value: 9, label: 'Doctorate or higher' }\n ];\n buttonBusy = false;\n\n constructor(\n public modalService: NgbModal,\n private readonly fb: UntypedFormBuilder,\n private readonly qualificationService: QualificationService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n\n this.form = this.fb.group({\n id: [null],\n school: [null, Validators.required],\n course: [null, Validators.required],\n degree: [null],\n started_on: [null, Validators.required],\n ended_on: [null, Validators.required],\n description: [null],\n points: [null]\n });\n }\n\n ngOnInit() {\n clearQueryParams(this.router, this.route);\n this.userStore().subscribe(response => {\n this.userId = response.id;\n this.cdr.markForCheck();\n });\n }\n\n onOpen(value = null) {\n appendQueryParam(this.router, this.route, {\n modal: 'editQualifications'\n });\n\n if (value) {\n this.form.patchValue(value);\n this.title = 'Edit Education';\n } else {\n this.form.reset();\n this.title = 'Add Education';\n }\n\n this.modalService.open(this.content, {\n centered: true,\n size: 'lg',\n windowClass: 'modal-holder'\n });\n }\n\n onDateChange(): void {\n const fromDate = this.form.controls['started_on'].value;\n if (fromDate) {\n this.minToDate = new Date(fromDate);\n this.minToDate.setDate(this.minToDate.getDate() + 1);\n }\n }\n\n @ValidateForm('form')\n onSaveDetail() {\n this.buttonBusy = true;\n const data = { ...this.form.value };\n data.user_id = this.userId;\n data.degree = this.qualifications.find(x => x.value === data.points)?.label;\n\n const sub$ = data?.id\n ? this.qualificationService.updateQualifications(data.id, data)\n : this.qualificationService.addQualifications(data);\n\n sub$.subscribe(() => {\n const msg = data.id\n ? this.translation.translate('User.Profile.Qualifications.UpdatedMessage')\n : this.translation.translate('User.Profile.Qualifications.AddedMessage');\n this.toast.success(msg);\n this.saveEvent.emit();\n clearQueryParams(this.router, this.route);\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n }).add(() => {\n this.buttonBusy = false;\n this.cdr.markForCheck();\n });\n }\n}\n","<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\"\n id=\"modal-basic-title\">{{ title }}</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"form\">\n <div class=\"row p-2\">\n <pw-input-container class=\"col-12\"\n controlId=\"edit-qualifications-school\"\n label=\"School\"\n name=\"school\"\n errorMsg=\"This field is required.\">\n <input type=\"text\"\n id=\"edit-qualifications-school\"\n class=\"form-control\"\n [placeholder]=\"'User.Profile.Qualifications.Placeholder.School' | transloco\"\n formControlName=\"school\"\n aria-label=\"School\" />\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-qualifications-started_on\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"Dates Attended\"\n name=\"started_on\"\n errorMsg=\"This field is required.\">\n <div class=\"ui-fluid\">\n <p-datepicker inputId=\"edit-qualifications-started_on\" formControlName=\"started_on\"\n [attr.aria-labelledby]=\"'edit-qualifications-started_on-label'\"\n [monthNavigator]=\"true\"\n [yearNavigator]=\"true\"\n yearRange=\"1950:2020\"\n (onSelect)=\"onDateChange()\"\n [showIcon]=\"true\"\n placeholder=\"yyyy-mm-dd\"\n dateFormat=\"yy-mm-dd\">\n </p-datepicker>\n </div>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-qualifications-ended_on\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"Dates Completed\"\n name=\"ended_on\"\n errorMsg=\"This field is required.\">\n <div class=\"ui-fluid\">\n <p-datepicker inputId=\"edit-qualifications-ended_on\" formControlName=\"ended_on\"\n [attr.aria-labelledby]=\"'edit-qualifications-ended_on-label'\"\n [monthNavigator]=\"true\"\n [yearNavigator]=\"true\"\n [showIcon]=\"true\"\n (onSelect)=\"onDateChange()\"\n [minDate]=\"minToDate\"\n placeholder=\"yyyy-mm-dd\"\n dateFormat=\"yy-mm-dd\"\n yearRange=\"1950:2025\"></p-datepicker>\n </div>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-qualifications-points\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"Degree\"\n name=\"points\"\n errorMsg=\"This field is required.\">\n <p-select inputId=\"edit-qualifications-points\"\n [options]=\"qualifications\"\n [attr.aria-labelledby]=\"'edit-qualifications-points-label'\"\n [placeholder]=\"'User.Profile.Qualifications.Placeholder.Degree' | transloco\"\n formControlName=\"points\"></p-select>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-qualifications-course\"\n label=\"Course\"\n name=\"course\"\n errorMsg=\"This field is required.\">\n <input type=\"text\"\n id=\"edit-qualifications-course\"\n class=\"form-control\"\n [placeholder]=\"'User.Profile.Qualifications.Placeholder.Course' | transloco\"\n formControlName=\"course\"\n aria-label=\"Course\" />\n </pw-input-container>\n\n <pw-input-container class=\"col-12\"\n controlId=\"edit-qualifications-description\"\n label=\"Description\"\n name=\"description\">\n <textarea type=\"text\"\n id=\"edit-qualifications-description\"\n class=\"form-control\"\n [placeholder]=\"'User.Profile.Qualifications.Placeholder.Description' | transloco\"\n formControlName=\"description\"\n aria-label=\"Description\"></textarea>\n </pw-input-container>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"modal.close()\">\n Cancel\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary\"\n (click)=\"onSaveDetail()\">Save</button>\n </div>\n</ng-template>\n\n<i\n class=\"fa fa-lg pi pi-plus-circle float-end mt-2 pt-1 pt-md-0 profile-icons\"\n data-cy=\"add-qualification\"\n (keydown.enter)=\"onOpen()\"\n aria-label=\"Add Qualification\"\n (click)=\"onOpen()\"\n aria-hidden=\"true\"\n></i>\n","import { ChangeDetectorRef, Component, Input, TemplateRef, ViewChild } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\n\nimport { ProfileService } from '@posiwise/common-services';\nimport { Project, User } from '@posiwise/common-utilities';\nimport { ValidateForm } from '@posiwise/utils';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { ModalContext } from '../../shared/interface/user-module.interface';\n\n@Component({\n selector: 'pw-edit-recommendation-modal',\n templateUrl: './edit-recommendation-modal.component.html',\n\n standalone: false\n})\nexport class EditRecommendationModalComponent {\n @ViewChild('content', { static: true }) content: TemplateRef<ModalContext>;\n\n @Input() user: User;\n\n form: UntypedFormGroup;\n\n title = 'Endorse';\n\n buttonBusy = false;\n\n project = new Project();\n\n constructor(\n public modalService: NgbModal,\n private readonly fb: UntypedFormBuilder,\n private readonly profileService: ProfileService,\n private readonly cdr: ChangeDetectorRef\n ) {\n this.form = this.fb.group({\n project_id: [null],\n user_id: [null],\n description: [null, Validators.required],\n quality: [null],\n time: [null],\n communication: [null]\n });\n }\n\n onOpen(value = null) {\n if (value) {\n this.project = value;\n }\n this.modalService.open(this.content, {\n centered: true,\n size: 'lg',\n windowClass: 'modal-holder'\n });\n }\n\n @ValidateForm('form')\n onSaveDetail() {\n this.buttonBusy = true;\n const data = {\n user_id: this.user.id,\n project_id: this.project.id,\n description: this.form.get('description').value,\n quality: this.form.get('quality').value,\n time: this.form.get('time').value,\n communication: this.form.get('communication').value\n } as object;\n\n this.profileService\n .postProjectRecommendation(data)\n .subscribe(_ => {\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n })\n .add(() => {\n this.buttonBusy = false;\n this.cdr.markForCheck();\n });\n }\n}\n","<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\"\n id=\"modal-basic-title\">{{ title }}</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"form\">\n <div class=\"row p-2\">\n <pw-input-container class=\"col-12 col-md-4\"\n controlId=\"edit-recommendation-quality\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"Quality\"\n name=\"quality\"\n errorMsg=\"This field is required.\">\n <p-rating formControlName=\"quality\"\n [attr.aria-labelledby]=\"'edit-recommendation-quality-label'\"\n [cancel]=\"false\"></p-rating>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-4\"\n controlId=\"edit-recommendation-communication\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"Communication\"\n name=\"communication\"\n errorMsg=\"This field is required.\">\n <p-rating formControlName=\"communication\"\n [attr.aria-labelledby]=\"'edit-recommendation-communication-label'\"\n [cancel]=\"false\"></p-rating>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-4\"\n controlId=\"edit-recommendation-time\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"Time\"\n name=\"time\"\n errorMsg=\"This field is required.\">\n <p-rating formControlName=\"time\"\n [attr.aria-labelledby]=\"'edit-recommendation-time-label'\"\n [cancel]=\"false\"></p-rating>\n </pw-input-container>\n\n <pw-input-container class=\"col-12\"\n controlId=\"edit-recommendation-description\"\n label=\"Description\"\n name=\"description\"\n errorMsg=\"This field is required.\">\n <textarea type=\"text\"\n id=\"edit-recommendation-description\"\n class=\"form-control\"\n formControlName=\"description\"\n aria-label=\"Description\"></textarea>\n </pw-input-container>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"modal.close()\">\n Cancel\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary\"\n (click)=\"onSaveDetail()\">Save</button>\n </div>\n</ng-template>\n\n<!-- <i class=\"fal fa-plus-circle fa-2x btn-link float-end btn-add\" (click)=\"onOpen()\" aria-hidden=\"true\"></i> -->\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Injector,\n Input,\n Output,\n TemplateRef,\n ViewChild\n} from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { TagService } from '@posiwise/common-services';\nimport { TAG_ENTITY, TAG_TYPE } from '@posiwise/common-utilities';\nimport { appendQueryParam, clearQueryParams } from '@posiwise/utils';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { ModalContext } from '../../shared/interface/user-module.interface';\n\n@Component({\n selector: 'pw-edit-skills-modal',\n templateUrl: './edit-skills-modal.component.html',\n\n standalone: false\n})\nexport class EditSkillsModalComponent extends AppBaseComponent {\n @ViewChild('content', { static: true }) content: TemplateRef<ModalContext>;\n\n @Input()\n userId: number;\n\n @Input()\n slug: string;\n\n @Input()\n entityType = TAG_TYPE.SKILLS;\n\n @Input()\n entityEntity = TAG_ENTITY.USER;\n\n @Output()\n saveEvent: EventEmitter<boolean> = new EventEmitter();\n\n allSkills = [];\n\n searchSkills = [];\n\n selectedSkills = [];\n\n constructor(\n private readonly modalService: NgbModal,\n private readonly tagService: TagService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n }\n\n open() {\n this.getSkills();\n this.modalService.open(this.content, { centered: true, windowClass: 'modal-holder' });\n appendQueryParam(this.router, this.route, {\n modal: 'editskills'\n });\n }\n\n /**\n * Populate all the skills for the dropdown\n */\n private getSkills() {\n this.tagService.getTagsByType('skills', {}).subscribe(response => {\n this.allSkills = response.tags;\n this.getEntitySkills();\n this.cdr.markForCheck();\n });\n }\n\n /**\n * Skills Search\n * @param event: keyword to search\n */\n search(event) {\n let data = [];\n if (event.query) {\n data = this.allSkills.filter(x =>\n x.name.toLowerCase().includes(event.query.toLowerCase())\n );\n } else {\n this.allSkills.forEach(item => {\n data.push(item);\n });\n }\n this.searchSkills = data;\n }\n\n close(modal) {\n modal.close();\n this.selectedSkills = [];\n }\n\n private getEntitySkills() {\n this.tagService\n .getTagsByEntity(this.slug, this.entityEntity, this.entityType)\n .subscribe(response => {\n this.selectedSkills = this.allSkills.filter(item => {\n return response.tags.find(x => x.id === item.id);\n });\n this.cdr.markForCheck();\n });\n }\n\n saveUserSkills() {\n const skills = [];\n this.selectedSkills.forEach(element => {\n skills.push({\n tag_id: element.id,\n rank: element.id,\n years: 0,\n preferred: true\n });\n });\n\n const postData = {\n entity_tags: skills,\n user_id: Number(this.userId),\n slug: this.slug,\n tag_entity: this.entityEntity\n };\n\n this.tagService.addTags(postData).subscribe(() => {\n this.saveEvent.emit(true);\n this.toast.success(this.translation.translate('User.Profile.Skills.UpdatedMessage'));\n clearQueryParams(this.router, this.route);\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n });\n }\n}\n","<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\"\n id=\"modal-basic-title\">My Skills</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"ui-fluid skills-modal skills-dropdown\">\n <p-autoComplete appendTo=\"body\" [(ngModel)]=\"selectedSkills\"\n [suggestions]=\"searchSkills\"\n dataKey=\"id\"\n optionLabel=\"name\"\n (completeMethod)=\"search($event)\"\n styleClass=\"w-100\"\n [minLength]=\"1\"\n [maxlength]=\"10\"\n placeholder=\"Skills\"\n [dropdown]=\"true\"\n [multiple]=\"true\"></p-autoComplete>\n\n <small class=\"p-2\">Select up to 10 skills.</small>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"close(modal)\">Cancel</button>\n <button type=\"button\"\n class=\"btn btn-primary\"\n (click)=\"saveUserSkills()\">Save</button>\n </div>\n</ng-template>\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Injector,\n Input,\n OnInit,\n Output,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport { AbstractControl, UntypedFormBuilder, UntypedFormGroup, ValidatorFn } from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { ProfileService } from '@posiwise/common-services';\nimport { ValidateForm } from '@posiwise/utils';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { ModalContext, ValidationError } from '../../shared/interface/user-module.interface';\n\n@Component({\n selector: 'pw-edit-social-links',\n templateUrl: './edit-social-links.component.html',\n styleUrls: ['./edit-social-links.component.scss'],\n standalone: false\n})\nexport class EditSocialLinksComponent extends AppBaseComponent implements OnInit {\n @ViewChild('content', { static: true }) content: TemplateRef<ModalContext>;\n\n @Input() links: Record<string, string> = {};\n @Input() userId: number;\n\n @Output() saveEvent: EventEmitter<void> = new EventEmitter();\n\n form: UntypedFormGroup;\n\n buttonBusy = false;\n\n readonly socialNetworks: ReadonlyArray<{\n key: string;\n labelKey: string;\n icon: string;\n placeholder: string;\n }> = [\n {\n key: 'linkedin',\n labelKey: 'User.Profile.SocialLinks.Label.LinkedIn',\n icon: 'linkedin',\n placeholder: 'https://linkedin.com/in/nickname'\n },\n {\n key: 'twitter',\n labelKey: 'User.Profile.SocialLinks.Label.Twitter',\n icon: 'twitter',\n placeholder: 'https://twitter.com/nickname'\n },\n {\n key: 'facebook',\n labelKey: 'User.Profile.SocialLinks.Label.Facebook',\n icon: 'facebook',\n placeholder: 'https://www.facebook.com/nickname'\n },\n {\n key: 'youtube',\n labelKey: 'User.Profile.SocialLinks.Label.YouTube',\n icon: 'youtube',\n placeholder: 'https://www.youtube.com/nickname'\n },\n {\n key: 'instagram',\n labelKey: 'User.Profile.SocialLinks.Label.Instagram',\n icon: 'instagram',\n placeholder: 'https://www.instagram.com/nickname'\n },\n {\n key: 'github',\n labelKey: 'User.Profile.SocialLinks.Label.Github',\n icon: 'github',\n placeholder: 'https://github.com/nickname'\n },\n {\n key: 'stackoverflow',\n labelKey: 'User.Profile.SocialLinks.Label.Stackoverflow',\n icon: 'stackoverflow',\n placeholder: 'http://stackoverflow.com/users/nickname'\n }\n ];\n\n constructor(\n injector: Injector,\n private readonly modalService: NgbModal,\n private readonly fb: UntypedFormBuilder,\n private readonly profileService: ProfileService,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n this.form = this.fb.group({\n user_id: 0,\n linkedin: ['', this.urlValidator('linkedin')],\n twitter: ['', this.urlValidator('twitter')],\n facebook: ['', this.urlValidator('facebook')],\n youtube: ['', this.urlValidator('youtube')],\n instagram: ['', this.urlValidator('instagram')],\n github: ['', this.urlValidator('github')],\n stackoverflow: ['', this.urlValidator('stackoverflow')]\n });\n }\n\n /** Tenant company name (domain-metadata driven), falling back to PosiWise. */\n get companyName(): string {\n return this.appConfig?.company?.name || 'PosiWise';\n }\n\n private urlValidator(social: string): ValidatorFn {\n return (control: AbstractControl): ValidationError | null => {\n if (!control.value) {\n return null;\n }\n try {\n const parsed = new URL(control.value);\n if (parsed.protocol !== 'https:' && parsed.protocol !== 'http:') {\n return { urlMalformed: { value: control.value } };\n }\n const host = parsed.hostname.toLowerCase();\n\n return host.includes(social) ? null : { urlMalformed: { value: control.value } };\n } catch {\n return { urlMalformed: { value: control.value } };\n }\n };\n }\n\n ngOnInit() {\n this.form.patchValue(this.links);\n }\n\n onOpen(links) {\n this.links = links;\n this.form.patchValue(this.links);\n this.modalService.open(this.content, {\n centered: true,\n size: 'md',\n windowClass: 'modal-holder edit-social-links-modal'\n });\n }\n\n @ValidateForm('form')\n onSaveDetail() {\n this.buttonBusy = true;\n this.form.patchValue({\n user_id: this.userId\n });\n this.profileService\n .postLinks(this.form.value)\n .subscribe(_ => {\n this.toast.success(\n this.translation.translate('User.Profile.SocialLinks.AddedMessage')\n );\n this.modalService.dismissAll();\n this.saveEvent.emit();\n this.cdr.markForCheck();\n })\n .add(() => {\n this.buttonBusy = false;\n this.cdr.markForCheck();\n });\n }\n}\n","<ng-template #content\n let-modal>\n <div class=\"modal-header edit-social-links-header\">\n <h4 class=\"modal-title edit-social-links__title\"\n id=\"modal-basic-title\">{{ 'User.Profile.SocialLinks.Title' | transloco }}</h4>\n <button type=\"button\"\n class=\"btn-close\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n </button>\n </div>\n <div class=\"modal-body edit-social-links-body\">\n <form [formGroup]=\"form\"\n class=\"edit-social-links\"\n (ngSubmit)=\"onSaveDetail()\">\n <p class=\"edit-social-links__intro\">\n {{ 'User.Profile.SocialLinks.Description' | transloco: { company: companyName } }}\n </p>\n\n <div class=\"edit-social-links__stack\">\n @for (social of socialNetworks; track social.key) {\n <div class=\"edit-social-links__field\">\n <label [for]=\"'external-portfolio-' + social.key\"\n class=\"edit-social-links__label\">\n <span class=\"edit-social-links__chip\">\n <img [src]=\"'/assets/img/icons/social/' + social.icon + '.svg'\"\n width=\"18\"\n height=\"18\"\n alt=\"\" />\n </span>\n <span class=\"edit-social-links__label-text\">{{ social.labelKey | transloco }}</span>\n </label>\n <input type=\"url\"\n [id]=\"'external-portfolio-' + social.key\"\n [name]=\"social.key\"\n [formControlName]=\"social.key\"\n class=\"form-control edit-social-links__input\"\n [placeholder]=\"social.placeholder\"\n autocomplete=\"url\" />\n </div>\n }\n </div>\n </form>\n </div>\n <div class=\"modal-footer edit-social-links-footer\">\n <button type=\"button\"\n class=\"btn edit-social-links__cancel\"\n (click)=\"modal.close()\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary edit-social-links__save\"\n (click)=\"onSaveDetail()\">{{ 'Button.Save' | transloco }}</button>\n </div>\n</ng-template>\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Injector,\n Input,\n OnInit,\n Output,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\nimport { NgxGpAutocompleteDirective } from '@angular-magic/ngx-gp-autocomplete';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { GeoService, ProfileService } from '@posiwise/common-services';\nimport { Country } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\nimport { ValidateForm } from '@posiwise/utils';\n\nimport { Observable } from 'rxjs';\n\nimport { NgbDateStruct, NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { EditUser, ModalContext, UserProfile } from '../../shared/interface/user-module.interface';\n\n@Component({\n selector: 'pw-edit-user-profile-modal',\n templateUrl: './edit-user-profile-modal.component.html',\n styleUrl: './edit-user-profile-modal.component.scss',\n\n standalone: false\n})\nexport class EditUserProfileModalComponent extends AppBaseComponent implements OnInit {\n @ViewChild('content', { static: true }) content: TemplateRef<ModalContext>;\n\n @Input() slug: string;\n @Input() user: EditUser;\n\n @Output() saveEvent: EventEmitter<UserProfile> = new EventEmitter<UserProfile>();\n\n @ViewChild('ngxPlaces') placesRef: NgxGpAutocompleteDirective;\n\n form: UntypedFormGroup;\n\n countries$: Observable<Country[]>;\n\n states: Country[] = [];\n buttonBusy = false;\n\n constructor(\n public modalService: NgbModal,\n private readonly fb: UntypedFormBuilder,\n private readonly profileService: ProfileService,\n private readonly geoService: GeoService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n this.form = this.fb.group({\n first_name: [null, Validators.required],\n last_name: [null, Validators.required],\n headline: [null, Validators.required],\n description: [null, Validators.required],\n gender: ['M'],\n phone_number: [null],\n dob: [null, Validators.required],\n website_url: [null],\n country: [null, Validators.required],\n postcode: [null],\n location: [null],\n state: [null, Validators.required],\n province: [null, Validators.required]\n });\n }\n\n ngOnInit() {\n this.countries$ = this.geoService.getCountries();\n this.cdr.markForCheck();\n this.getValues();\n }\n\n getValues() {\n let dobObject: NgbDateStruct;\n\n const userProfile = this.user?.profile;\n if (userProfile) {\n if (userProfile?.country) {\n this.getRegion(userProfile.country);\n }\n if (userProfile?.dob) {\n dobObject = {\n year: Number(userProfile.dob.substring(0, 4)),\n month: Number(userProfile.dob.substring(5, 7)),\n day: Number(userProfile.dob.substring(8, 10))\n };\n\n this.form.patchValue({});\n }\n\n this.form.patchValue(userProfile);\n this.form.patchValue({\n first_name: this.user.first_name,\n last_name: this.user.last_name,\n dob: dobObject || {}\n });\n }\n }\n\n handleAddressChange(_event) {\n this.form.patchValue({\n latitude: _event.geometry.location.lat(),\n longitude: _event.geometry.location.lng(),\n location: _event.formatted_address\n });\n }\n\n onOpen() {\n this.form.reset();\n this.getValues();\n this.modalService.open(this.content, {\n centered: true,\n size: 'lg',\n windowClass: 'modal-holder'\n });\n }\n\n getRegion(countryId) {\n if (countryId) {\n this.geoService.getRegions(countryId).subscribe(response => {\n this.states = response;\n this.cdr.markForCheck();\n });\n }\n }\n\n onSaveDetail() {\n this.form.patchValue({ province: this.form.value.state });\n this.save();\n }\n\n @ValidateForm('form')\n save() {\n this.buttonBusy = true;\n const data = { ...this.form.value };\n data.dob = HelperService.dateFormat(this.form.get('dob').value);\n\n this.profileService\n .updateUserProfile(data)\n .subscribe(response => {\n if (response.id) {\n this.toast.success(this.translation.translate('User.Profile.ProfileUpdated'));\n this.modalService.dismissAll();\n this.saveEvent.emit(response);\n }\n this.cdr.markForCheck();\n })\n .add(() => {\n this.buttonBusy = false;\n this.cdr.markForCheck();\n });\n }\n}\n","<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\"\n id=\"modal-basic-title\">Edit Intro</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSaveDetail()\">\n <div class=\"row\">\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-first-name\"\n label=\"First Name\"\n name=\"first_name\"\n errorMsg=\"Please enter first Name\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"first_name\"\n id=\"edit-intro-first-name\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.FirstName' | transloco\"\n autocomplete=\"given-name\" name=\"input_first_name_1\"\n aria-label=\"First Name\"/>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-last-name\"\n label=\"Last Name\"\n name=\"last_name\"\n errorMsg=\"Please enter last Name\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"last_name\"\n id=\"edit-intro-last-name\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.LastName' | transloco\"\n autocomplete=\"family-name\" name=\"input_last_name_2\"\n aria-label=\"Last Name\"/>\n </pw-input-container>\n\n <pw-input-container class=\"col-12\"\n controlId=\"edit-intro-headline\"\n label=\"Headline\"\n name=\"headline\"\n errorMsg=\"Please enter headline\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"headline\"\n id=\"edit-intro-headline\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Headline' | transloco\" name=\"input_headline_3\"\n aria-label=\"Headline\"/>\n </pw-input-container>\n\n <pw-input-container class=\"col-12\"\n controlId=\"edit-intro-description\"\n label=\"About me\"\n name=\"description\"\n errorMsg=\"Please enter description\">\n <textarea class=\"form-control\"\n id=\"edit-intro-description\"\n name=\"description\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Description' | transloco\"\n formControlName=\"description\"\n aria-label=\"Description\"></textarea>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-gender\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"Gender\"\n name=\"gender\"\n errorMsg=\"Please enter Gender\">\n <p-selectButton [options]=\"[\n { label: 'Male', value: 'M' },\n { label: 'Female', value: 'F' }\n ]\"\n [attr.aria-labelledby]=\"'edit-intro-gender-label'\"\n formControlName=\"gender\"></p-selectButton>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-dob\"\n label=\"Date of Birth\"\n name=\"dob\"\n errorMsg=\"Please enter date of birth\">\n <div class=\"input-group\">\n <input class=\"form-control\"\n id=\"edit-intro-dob\"\n name=\"dob\"\n placeholder=\"yyyy-mm-dd\"\n formControlName=\"dob\"\n ngbDatepicker\n #d=\"ngbDatepicker\"\n [minDate]=\"{ year: 1950, month: 1, day: 1 }\"\n [maxDate]=\"{ year: 2018, month: 12, day: 31 }\"\n autocomplete=\"off\"\n aria-label=\"yyyy-mm-dd\" />\n <button class=\"btn btn-primary\"\n type=\"button\"\n aria-label=\"Open date picker\"\n (click)=\"d.toggle()\">\n <i class=\"fa fa-calendar\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-phone\"\n label=\"Phone\"\n name=\"phone_number\"\n errorMsg=\"Please enter phone\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"phone_number\"\n id=\"edit-intro-phone\"\n name=\"phone_number\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Phone' | transloco\"\n autocomplete=\"tel\"\n aria-label=\"Phone Number\" />\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-postcode\"\n label=\"Postcode\"\n name=\"postcode\"\n errorMsg=\"Please enter postcode\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"postcode\"\n id=\"edit-intro-postcode\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Postcode' | transloco\"\n autocomplete=\"postal-code\" name=\"input_postcode_6\"\n aria-label=\"Postcode\"/>\n </pw-input-container>\n\n @if (countries$ | async; as countries) {\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-country\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"Country\"\n name=\"country\"\n errorMsg=\"Please select a country\">\n <p-select\n [attr.aria-labelledby]=\"'edit-intro-country-label'\"\n [options]=\"countries\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"country\"\n (onChange)=\"getRegion($event.value)\"\n [placeholder]=\"'User.Profile.SelectCountry' | transloco\">\n </p-select>\n </pw-input-container>\n }\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-state\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"State\"\n name=\"state\"\n errorMsg=\"Please select a state\">\n <p-select\n [attr.aria-labelledby]=\"'edit-intro-state-label'\"\n [options]=\"states\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"state\"\n [placeholder]=\"'User.Profile.SelectState' | transloco\">\n </p-select>\n </pw-input-container>\n\n <!-- Location -->\n <pw-input-container label=\"Location\"\n class=\"col-12 col-md-6\"\n controlId=\"edit-intro-location\"\n [useAriaLabelledbyOnly]=\"true\"\n name=\"location\">\n <input ngx-gp-autocomplete\n id=\"edit-intro-location\"\n name=\"location\"\n class=\"form-control\"\n #places=\"ngx-places\"\n formControlName=\"location\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Location' | transloco\"\n [attr.aria-labelledby]=\"'edit-intro-location-label'\"\n (onAddressChange)=\"handleAddressChange($event)\"\n aria-label=\"Location\" />\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-website\"\n label=\"Website\"\n name=\"website_url\"\n errorMsg=\"Please enter Website\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"website_url\"\n id=\"edit-intro-website\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Website' | transloco\"\n autocomplete=\"url\" name=\"input_website_url_8\"\n aria-label=\"Website Url\"/>\n </pw-input-container>\n </div>\n <div class=\"modal-footer\">\n <input type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"modal.close()\"\n value=\"Cancel\" id=\"input_field_9\" name=\"input_field_9\"\n aria-label=\"Cancel\"/>\n <input type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary\"\n value=\"Save Changes\" id=\"input_field_10\" name=\"input_field_10\"\n aria-label=\"Save Changes\"/>\n </div>\n </form>\n </div>\n</ng-template>\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Injector,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild\n} from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { ProfileService, QualificationService, TagService } from '@posiwise/common-services';\nimport { TAG_ENTITY, TAG_TYPE, User } from '@posiwise/common-utilities';\nimport { ConfirmDialogService } from '@posiwise/shared-components';\n\nimport { forkJoin, Subscription } from 'rxjs';\n\nimport {\n AboutUserProfile,\n Qualification,\n Skill\n} from '../../shared/interface/user-module.interface';\nimport { EditQualificationsModalComponent } from '../edit-qualifications-modal/edit-qualifications-modal.component';\nimport { EditSkillsModalComponent } from '../edit-skills-modal/edit-skills-modal.component';\nimport { EditSocialLinksComponent } from '../edit-social-links/edit-social-links.component';\nimport { EditUserProfileModalComponent } from '../edit-user-profile-modal/edit-user-profile-modal.component';\n\n@Component({\n selector: 'pw-user-about',\n templateUrl: './user-about.component.html',\n styleUrls: ['./user-about.component.scss'],\n\n standalone: false\n})\nexport class UserAboutComponent extends AppBaseComponent implements OnInit, OnDestroy {\n @Input() user: User;\n @Input() isEdit = false;\n\n @Output()\n saveEvent: EventEmitter<boolean> = new EventEmitter();\n\n @ViewChild(EditUserProfileModalComponent, { static: false })\n modal: EditUserProfileModalComponent;\n\n @ViewChild(EditQualificationsModalComponent, { static: false })\n qualificationModal: EditQualificationsModalComponent;\n\n @ViewChild(EditSkillsModalComponent, { static: false })\n skillsModal: EditSkillsModalComponent;\n\n @ViewChild(EditSocialLinksComponent, { static: false })\n socialModal: EditSocialLinksComponent;\n\n private readonly navigationSubscription: Subscription;\n\n allSkills = [];\n\n searchSkills = [];\n\n selectedSkills: Skill[];\n\n objectKeys = Object.keys;\n\n user_profile: AboutUserProfile;\n\n qualifications: Qualification[] = [];\n\n userLinks: Record<string, string> = {};\n\n noUserLinks: boolean;\n\n loading = false;\n\n constructor(\n private readonly profileService: ProfileService,\n private readonly qualificationService: QualificationService,\n private readonly tagService: TagService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef,\n private readonly confirmDialog: ConfirmDialogService\n ) {\n super(injector);\n }\n\n ngOnInit() {\n this.getUserDetails();\n this.getSkills();\n }\n\n getUserDetails() {\n this.loading = true;\n forkJoin({\n user_profile: this.profileService.getUserObject('user_profile', this.user.slug),\n qualifications: this.profileService.getUserObject('qualifications', this.user.slug),\n user_links: this.profileService.getUserObject('user_link', this.user.slug),\n user_skills: this.tagService.getGroupedSkills(\n this.user.slug,\n TAG_ENTITY.USER,\n TAG_TYPE.SKILLS\n )\n }).subscribe({\n next: response => {\n this.user_profile = response.user_profile;\n this.user['profile'] = response.user_profile;\n this.qualifications = response.qualifications;\n this.userLinks = response.user_links || [];\n this.noUserLinks = Object.values(this.userLinks).some(x => !!x);\n this.selectedSkills = response.user_skills;\n this.loading = false;\n this.cdr.markForCheck();\n },\n error: err => {\n this.loading = false;\n this.toast.showToast(err);\n this.cdr.markForCheck();\n },\n complete: () => {\n this.loading = false;\n this.cdr.markForCheck();\n }\n });\n }\n\n /**\n * Populate all the skills for the dropdown\n */\n private getSkills() {\n this.tagService.getTagsByType('skills', {}).subscribe(response => {\n this.allSkills = response.skills;\n this.cdr.markForCheck();\n });\n }\n\n onProfileOpen() {\n this.modal.onOpen();\n }\n\n openSkills() {\n this.skillsModal.open();\n }\n\n onProfileSaved(_event) {\n this.getUserDetails();\n this.saveEvent.emit();\n }\n\n onOpenSocial() {\n if (this.socialModal) {\n this.socialModal.onOpen(this.userLinks); // Pass userLinks to the modal\n }\n }\n\n editQualification(item) {\n this.qualificationModal.onOpen(item);\n }\n\n deleteQualification(item) {\n this.confirmDialog\n .open({\n title: 'Delete',\n text: `Are you sure you want to delete <strong>${item.degree}</strong>?`,\n destructive: true\n })\n .then(ok => {\n if (!ok) {\n return;\n }\n this.qualificationService.deleteQualifications(item.id).subscribe(() => {\n this.toast.success(\n this.translation.translate(\n 'User.Profile.Qualifications.QualificationDelete'\n )\n );\n this.getUserDetails();\n this.cdr.markForCheck();\n });\n });\n }\n\n onSaveUserLinks() {\n this.getUserDetails();\n }\n\n trackByQualification(_index: number, item: { id: number }) {\n return item.id;\n }\n\n override ngOnDestroy() {\n // avoid memory leaks here by cleaning up after ourselves. If we\n // don't then we will continue to run our initialiseInvites()\n // method on every navigationEnd event.\n if (this.navigationSubscription) {\n this.navigationSubscription.unsubscribe();\n }\n }\n}\n","<div class=\"about\">\n <!-- Personal Information -->\n <section class=\"about-section\" data-cy=\"personal-info\">\n <header class=\"about-section__head\">\n <span class=\"about-section__icon\"><i class=\"fa fa-user\" aria-hidden=\"true\"></i></span>\n <h2 class=\"about-section__title\">{{ 'User.Profile.About.PersonalInfo' | transloco }}</h2>\n @if (user && isEdit) {\n <button type=\"button\" class=\"about-section__edit\" (click)=\"onProfileOpen()\" [attr.aria-label]=\"'User.Profile.About.EditPersonalInfo' | transloco\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n </button>\n }\n </header>\n <div class=\"about-bio\">\n <span class=\"about-field__label\">{{ 'User.Profile.About.AboutMe' | transloco }}</span>\n <p class=\"about-bio__text\" [class.is-empty]=\"!user_profile?.description\">\n {{ user_profile?.description || ('User.Profile.About.NoDescription' | transloco) }}\n </p>\n </div>\n <dl class=\"about-grid\">\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Birthday' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user_profile?.dob\">{{ (user_profile?.dob | dateFormat) || '—' }}</dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.LivesIn' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user_profile?.country\">{{ user_profile?.country || '—' }}</dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Gender' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user_profile?.gender\">\n {{\n user_profile?.gender === 'M'\n ? ('User.Profile.About.Male' | transloco)\n : user_profile?.gender === 'F'\n ? ('User.Profile.About.Female' | transloco)\n : '—'\n }}\n </dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Email' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user?.email\">\n @if (user?.email) {\n <a class=\"about-field__link\" [href]=\"'mailto:' + user.email\">{{ user.email }}</a>\n } @else {\n —\n }\n </dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.PhoneNumber' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user_profile?.phone_number\">{{ user_profile?.phone_number || '—' }}</dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Website' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user_profile?.website_url\">\n @if (user_profile?.website_url) {\n <a class=\"about-field__link\" target=\"_blank\" rel=\"noopener noreferrer\" [href]=\"user_profile.website_url\">{{ user_profile.website_url }}</a>\n } @else {\n —\n }\n </dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Joined' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user?.joined_at\">{{ (user?.joined_at | dateFormat) || '—' }}</dd>\n </div>\n </dl>\n @if (user && isEdit) {\n <pw-edit-user-profile-modal [user]=\"user\" (saveEvent)=\"onProfileSaved($event)\" [slug]=\"user?.slug\"></pw-edit-user-profile-modal>\n }\n </section>\n\n <!-- Skills -->\n <section class=\"about-section\" data-cy=\"skills-info\">\n <header class=\"about-section__head\">\n <span class=\"about-section__icon\"><i class=\"fa fa-bolt\" aria-hidden=\"true\"></i></span>\n <h2 class=\"about-section__title\">{{ 'User.Profile.About.Skills' | transloco }}</h2>\n @if (isEdit) {\n <button type=\"button\" class=\"about-section__edit\" (click)=\"openSkills()\" [attr.aria-label]=\"'User.Profile.About.EditSkills' | transloco\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n </button>\n }\n </header>\n @if (selectedSkills?.length) {\n <div class=\"about-skills\">\n @for (skill of selectedSkills; track skill) {\n <div class=\"about-skills__group\">\n <span class=\"about-skills__category\">{{ skill.category_name }}</span>\n <div class=\"about-tags\">\n @for (item of skill.tags; track item) {\n <span class=\"about-tag\">{{ item.name }}</span>\n }\n </div>\n </div>\n }\n </div>\n } @else {\n <p class=\"about-empty\">{{ (isEdit ? 'User.Profile.About.NoSkillsEdit' : 'User.Profile.About.NoSkills') | transloco }}</p>\n }\n @if (isEdit) {\n <pw-edit-skills-modal [userId]=\"user?.id\" [slug]=\"user?.slug\" (saveEvent)=\"getUserDetails()\"></pw-edit-skills-modal>\n }\n </section>\n\n <!-- Educational Information -->\n <section class=\"about-section\" data-cy=\"educational-info\">\n <header class=\"about-section__head\">\n <span class=\"about-section__icon\"><i class=\"fa fa-graduation-cap\" aria-hidden=\"true\"></i></span>\n <h2 class=\"about-section__title\">{{ 'User.Profile.About.Education' | transloco }}</h2>\n @if (isEdit) {\n <button type=\"button\" class=\"about-section__edit\" (click)=\"qualificationModal.onOpen()\" [attr.aria-label]=\"'User.Profile.About.AddEducation' | transloco\">\n <i class=\"fa fa-plus\" aria-hidden=\"true\"></i>\n </button>\n }\n </header>\n @if (qualifications?.length) {\n <div class=\"about-edu\">\n @for (item of qualifications; track trackByQualification($index, item)) {\n <article class=\"about-edu__item\">\n <div class=\"about-edu__main\">\n <h4 class=\"about-edu__school\">{{ item?.school }}</h4>\n <dl class=\"about-grid about-grid--compact\">\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Period' | transloco }}</dt>\n <dd class=\"about-field__value\">{{ item?.started_on }} – {{ item?.ended_on }}</dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Degree' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!item?.degree\">{{ item?.degree || '—' }}</dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Course' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!item?.course\">{{ item?.course || '—' }}</dd>\n </div>\n </dl>\n </div>\n @if (isEdit) {\n <div class=\"about-edu__actions\">\n <button type=\"button\" class=\"about-icon-btn\" [attr.aria-label]=\"'User.Profile.About.EditEducation' | transloco\" (click)=\"editQualification(item)\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n </button>\n <button type=\"button\" class=\"about-icon-btn about-icon-btn--danger\" data-cy=\"delete-qualification\" [attr.aria-label]=\"'User.Profile.About.DeleteEducation' | transloco\" (click)=\"deleteQualification(item)\">\n <i class=\"fa fa-trash\" aria-hidden=\"true\"></i>\n </button>\n </div>\n }\n </article>\n }\n </div>\n } @else {\n <p class=\"about-empty\">{{ 'User.Profile.About.NoEducation' | transloco }}</p>\n }\n @if (isEdit) {\n <pw-edit-qualifications-modal (saveEvent)=\"getUserDetails()\"></pw-edit-qualifications-modal>\n }\n </section>\n\n <!-- External Portfolio -->\n <section class=\"about-section\" data-cy=\"portfolio-info\">\n <header class=\"about-section__head\">\n <span class=\"about-section__icon\"><i class=\"fa fa-link\" aria-hidden=\"true\"></i></span>\n <h2 class=\"about-section__title\">{{ 'User.Profile.About.Portfolio' | transloco }}</h2>\n @if (isEdit) {\n <button type=\"button\" class=\"about-section__edit\" (click)=\"onOpenSocial()\" [attr.aria-label]=\"'User.Profile.About.EditPortfolio' | transloco\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n </button>\n }\n </header>\n @if (noUserLinks) {\n <div class=\"about-social\">\n @for (link of objectKeys(userLinks); track link) {\n @if (userLinks[link]) {\n <a class=\"about-social__link\" target=\"_blank\" rel=\"noopener noreferrer\" [href]=\"userLinks[link]\" [attr.aria-label]=\"link\">\n <img src=\"assets/img/icons/social/{{ link }}.svg\" width=\"32\" height=\"32\" [alt]=\"link\" />\n </a>\n }\n }\n </div>\n } @else {\n <p class=\"about-empty\">{{ 'User.Profile.About.NoPortfolio' | transloco }}</p>\n }\n @if (user && isEdit) {\n <pw-edit-social-links [userId]=\"user.id\" [links]=\"userLinks\" (saveEvent)=\"onSaveUserLinks()\"></pw-edit-social-links>\n }\n </section>\n\n @if (loading) {\n <div class=\"w-100 text-center p-3\"><p-progressSpinner strokeWidth=\"2\"></p-progressSpinner></div>\n }\n</div>\n","import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core';\n\nimport { ProfileService } from '@posiwise/common-services';\nimport { User } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\n@Component({\n selector: 'pw-portfolios',\n templateUrl: './user-portfolios.component.html',\n styleUrls: ['./user-portfolios.component.scss'],\n\n standalone: false\n})\nexport class PortfoliosComponent implements OnInit {\n @Input() user: User;\n @Input() isEdit = false;\n\n projectPictures = [];\n\n selectedPicURL: string;\n\n isLoaded = false;\n\n constructor(\n private readonly service: ProfileService,\n private readonly modalService: NgbModal,\n private readonly cdr: ChangeDetectorRef\n ) {}\n\n ngOnInit() {\n this.getProjectPictures();\n }\n\n private getProjectPictures() {\n this.service.getProjectPictures(this.user.slug).subscribe(response => {\n if (response.length > 0) {\n this.projectPictures = response.flatMap(x => x.project_pictures);\n }\n this.isLoaded = true;\n this.cdr.markForCheck();\n });\n }\n\n deletePicture(id) {\n HelperService.raiseDeletePopup().then(resp => {\n if (resp.value) {\n this.service.deletePicture(id).subscribe(_ => {\n this.getProjectPictures();\n this.cdr.markForCheck();\n });\n }\n });\n }\n\n trackByImage(_index: number, item: { id: number }) {\n return item.id;\n }\n\n showFullImage(picture, content, evt) {\n if ($(evt.target).attr('id') !== 'delete-icon') {\n this.selectedPicURL = picture.picture.url;\n this.modalService.open(content, {\n centered: true,\n size: 'lg',\n windowClass: 'img-popup'\n });\n }\n }\n}\n","<div class=\"row\">\n <div class=\"col-sm-12 mt-2\">\n <h2>User's Portfolio</h2>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (projectPictures.length === 0 && isLoaded) {\n <pw-no-data [withImage]=\"true\" message=\"No portfolio listed yet - please consider adding some.\"\n ></pw-no-data>\n }\n <div class=\"card-body\">\n @if (projectPictures.length) {\n <div class=\"card-block\"\n >\n <div class=\"grid-hover\">\n <div class=\"row\">\n @for (picture of projectPictures; track trackByImage($index, picture)) {\n <div class=\"col-md-4 col-12 mb-2\"\n >\n <figure class=\"effect-marley\"\n (keydown.enter)=\"showFullImage(picture, content, $event)\"\n (click)=\"showFullImage(picture, content, $event)\">\n <img [src]=\"picture.picture.url\"\n alt=\"project pic\" />\n <figcaption>\n <h2>\n <span class=\"portfolio-header-text\">{{ picture.project_title }}</span>\n </h2>\n @if (isEdit) {\n <i\n class=\"fal fa-2x fa-times white\"\n id=\"delete-icon\"\n (click)=\"deletePicture(picture.id)\"\n (keydown.enter)=\"deletePicture(picture.id)\"\n aria-hidden=\"true\"\n ></i>\n }\n <p class=\"thumb-description\">\n {{ picture?.project_description }}\n </p>\n </figcaption>\n </figure>\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n</div>\n<ng-template #content\n let-modal>\n <div class=\"modal-img-popup\">\n <img alt=\"Selected Url\"\n [src]=\"selectedPicURL\"\n class=\"img-fluid\" />\n <button type=\"button\"\n class=\"close close-img\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss('Cross click')\">\n <span class=\"btn\">&times;</span>\n </button>\n </div>\n</ng-template>\n","import { ChangeDetectorRef, Component, Injector, Input, OnInit, ViewChild } from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { ProfileService } from '@posiwise/common-services';\nimport { Project, User } from '@posiwise/common-utilities';\nimport { ConfirmDialogService } from '@posiwise/shared-components';\n\nimport { EditPortfoliosComponent } from '../edit-portfolios/edit-portfolios.component';\nimport { EditProjectModalComponent } from '../edit-project-modal/edit-project-modal.component';\nimport { EditRecommendationModalComponent } from '../edit-recommendation-modal/edit-recommendation-modal.component';\nimport { EditSkillsModalComponent } from '../edit-skills-modal/edit-skills-modal.component';\n\n@Component({\n selector: 'pw-user-projects',\n templateUrl: './user-projects.component.html',\n styleUrls: ['./user-projects.component.scss'],\n\n standalone: false\n})\nexport class UserProjectsComponent extends AppBaseComponent implements OnInit {\n @Input() user: User;\n @Input() isEdit = false;\n @Input() slug: string;\n\n @ViewChild(EditProjectModalComponent, { static: true })\n projectModal: EditProjectModalComponent;\n\n @ViewChild(EditSkillsModalComponent, { static: false })\n skillModal: EditSkillsModalComponent;\n\n @ViewChild(EditRecommendationModalComponent, { static: true })\n recommendationModal: EditRecommendationModalComponent;\n\n @ViewChild(EditPortfoliosComponent, { static: false })\n portfolios: EditPortfoliosComponent;\n\n projects: Project[] = [];\n\n submitted: boolean;\n\n isLoaded = false;\n\n constructor(\n private readonly service: ProfileService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef,\n private readonly confirmDialog: ConfirmDialogService\n ) {\n super(injector);\n }\n\n ngOnInit() {\n this.getProjects();\n }\n\n onEditProject(item) {\n this.projectModal.onOpen(item);\n }\n\n editRecommendation(item) {\n this.recommendationModal.onOpen(item);\n }\n\n openSkills(project) {\n this.skillModal.slug = project.slug;\n this.skillModal.open();\n }\n\n getProjects() {\n const profileSlug = this.user?.slug || this.slug;\n this.service.getProjects(profileSlug).subscribe(response => {\n this.projects = response.projects;\n this.isLoaded = true;\n this.cdr.markForCheck();\n });\n }\n\n onSkillsSave() {\n this.getProjects();\n }\n\n onSaveProject(_event) {\n this.getProjects();\n }\n\n openPortfolios(id: number) {\n this.portfolios.openModal(id);\n this.portfolios.getProjectPictures();\n }\n\n onDeleteProject(project) {\n this.confirmDialog\n .open({\n title: 'Delete',\n text: `Are you sure you want to delete ${project.title}?`,\n destructive: true\n })\n .then(ok => {\n if (!ok) {\n return;\n }\n this.service.deleteProject(project.id).subscribe(() => {\n this.projects = this.projects.filter((x: Project) => x.id !== project.id);\n this.cdr.markForCheck();\n });\n });\n }\n\n trackByProject(_index: number, item: Project) {\n return item.id;\n }\n\n deletePicture(project) {\n this.service.deletePicture(project.project_pictures[0].id).subscribe(_ => {\n this.getProjects();\n this.cdr.markForCheck();\n });\n }\n}\n","<div class=\"row\">\n <div class=\"col-sm-12 mt-2\">\n <h2>User's Projects</h2>\n @if (isEdit) {\n <div class=\"row\"\n >\n <div class=\"col-12\">\n <div class=\"content-header\">\n <button class=\"btn btn-primary float-end\"\n (click)=\"onEditProject(null)\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> {{'Create Project' | transloco}}\n </button>\n </div>\n </div>\n </div>\n }\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (projects?.length) {\n <div id=\"timeline\"\n class=\"timeline-center timeline-wrapper\"\n >\n <ul class=\"timeline\">\n <li class=\"timeline-line\"></li>\n </ul>\n <ul class=\"timeline\">\n <li class=\"timeline-line\"></li>\n @for (\n project of projects; track trackByProject(i,\n project); let i = $index; let odd = $odd; let even = $even) {\n <li class=\"timeline-item\"\n [ngClass]=\"{ 'mt-5': odd }\"\n >\n <div class=\"timeline-badge\">\n <span class=\"bg-red bg-lighten-1\"\n data-bs-toggle=\"tooltip\"\n data-placement=\"right\"\n title=\"Portfolio project work\">\n <span class=\"timeline-year\"> {{ project.start_year }} </span>\n </span>\n </div>\n <div class=\"timeline-card card pb-0\">\n <div class=\"card-header\">\n <h4 class=\"mb-0 card-title\">\n <a>{{ project.title }}</a>\n </h4>\n <div class=\"card-subtitle text-muted mt-0\">\n <span class=\"font-small-3\">\n {{ project.start_year }} - {{ project.end_year }}</span>\n </div>\n </div>\n <div class=\"card-body project-card\">\n @if (project.project_pictures?.length) {\n <i\n class=\"fal fa-times\"\n (click)=\"deletePicture(project)\"\n (keydown.enter)=\"deletePicture(project)\"\n aria-hidden=\"true\"\n ></i>\n <img class=\"img-fluid project-picture\"\n [src]=\"project.project_pictures[0].picture.url\"\n alt=\"Project Cover\" />\n }\n <div class=\"card-body\">\n <div class=\"\">\n <p class=\"card-text\">{{ project.description }}</p>\n <div class=\"list-inline mb-1\">\n <!-- Skills -->\n @if (project.tags?.length) {\n <div>\n <div class=\"my-2\">\n <i class=\"fa fa-user-tag\" aria-hidden=\"true\"></i>\n Skills\n </div>\n @for (tag of project.tags; track tag) {\n <span class=\"badge bg-success me-2\">{{\n tag.name\n }}</span>\n }\n </div>\n }\n @if (project.project_recommendations?.length) {\n <div class=\"mt-2\"\n >\n <div class=\"my-2\">\n <i\n class=\"fa fa-clipboard-check me-2\"\n aria-hidden=\"true\"\n ></i>\n Recommendations\n </div>\n @for (\n recommendation of project.project_recommendations\n ; track\n recommendation) {\n <section class=\"mb-2\"\n >\n <div class=\"me-2\">\n Client: {{ recommendation?.client_name }}\n </div>\n <div class=\"me-2\">\n Message: {{ recommendation?.description }}\n </div>\n <div class=\"row recommendation\">\n <div class=\"col-4\">\n <span>Communication</span>\n <p-rating [(ngModel)]=\"\n recommendation.communication\n \"\n [cancel]=\"false\"\n [readonly]=\"true\">\n </p-rating>\n </div>\n <div class=\"col-4\">\n <span>Quality</span>\n <p-rating [(ngModel)]=\"recommendation.quality\"\n [cancel]=\"false\"\n [readonly]=\"true\">\n </p-rating>\n </div>\n <div class=\"col-4\">\n <span>Time</span>\n <p-rating [(ngModel)]=\"recommendation.time\"\n [cancel]=\"false\"\n [readonly]=\"true\">\n </p-rating>\n </div>\n </div>\n </section>\n }\n </div>\n }\n @if (isEdit) {\n <div class=\"text-end mt-3 d-flex justify-content-end project-actions\"\n >\n <!-- Project Edit -->\n <span class=\"btn btn-link pb-0 actions\"\n (keydown.enter)=\"onEditProject(project)\"\n (click)=\"onEditProject(project)\">\n Edit\n </span>\n <button class=\"btn btn-link pb-0 actions\"\n (click)=\"openSkills(project)\">\n Skills\n </button>\n <pw-edit-skills-modal [userId]=\"user?.id\"\n entityEntity=\"Project\"\n entityType=\"skills\"\n (saveEvent)=\"onSkillsSave()\"\n [slug]=\"project?.slug\">\n </pw-edit-skills-modal>\n <!-- Portfolios -->\n <button class=\"btn btn-link pb-0 actions\"\n (click)=\"openPortfolios(project.id)\">\n Photos\n </button>\n <pw-edit-portfolios [slug]=\"user?.slug\"\n [id]=\"project.id\"\n (successEvent)=\"getProjects()\">\n </pw-edit-portfolios>\n <span class=\"btn btn-link pb-0 delete-project actions\"\n (keydown.enter)=\"onDeleteProject(project)\"\n (click)=\"onDeleteProject(project)\">\n Delete\n </span>\n </div>\n }\n <!-- Recommendation -->\n @if (!isEdit) {\n <span class=\"pe-1 mt-3\"\n (click)=\"editRecommendation(project)\"\n (keydown.enter)=\"editRecommendation(project)\"\n >\n <a class=\"primary\"><span class=\"fa fa-commenting-o\"></span> Endorse\n </a></span>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n </li>\n }\n </ul>\n </div>\n }\n @if (projects?.length === 0 && isLoaded) {\n<pw-no-data [withImage]=\"true\" [message]=\"\n isEdit\n ? ('User.Profile.Projects.NoProjects' | transloco)\n : ('User.Profile.Projects.NoUserProjects' | transloco)\n \"\n >\n </pw-no-data>\n }\n </div>\n</div>\n<pw-edit-project-modal (saveEvent)=\"onSaveProject($event)\"></pw-edit-project-modal>\n<pw-edit-recommendation-modal [user]=\"user\"></pw-edit-recommendation-modal>\n","import { ChangeDetectorRef, Component, Injector, OnDestroy, OnInit } from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { ProfileService } from '@posiwise/common-services';\nimport { ScriptLoaderService } from '@posiwise/common-services';\nimport { User } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\n\nimport { StatusCodes } from 'http-status-codes';\nimport { MenuItem } from 'primeng/api';\nimport { forkJoin } from 'rxjs';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { UserProfile, UserRelationship } from '../shared/interface/user-module.interface';\n\n@Component({\n selector: 'pw-user-profile-page',\n templateUrl: './user-profile-page.component.html',\n styleUrls: ['./user-profile-page.component.scss'],\n\n standalone: false\n})\nexport class UserProfilePageComponent extends AppBaseComponent implements OnInit, OnDestroy {\n private loggedInUserDetails: User;\n\n user: User;\n slug: string;\n\n objectKeys = Object.keys;\n\n image = 'assets/img/icons/male.png';\n\n isFollowing: boolean;\n\n isLoaded = false;\n\n userProfile: UserProfile;\n\n items: MenuItem[];\n activeItem: MenuItem;\n /** Current tab value for p-tabs */\n activeTabValue: string;\n\n onTabChange(value: string) {\n const item = this.items.find(i => i.id === value);\n if (item) {\n this.activeItem = item;\n }\n }\n\n constructor(\n injector: Injector,\n private readonly profileService: ProfileService,\n private readonly modalService: NgbModal,\n private readonly scriptLoader: ScriptLoaderService,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n this.route.params.subscribe(data => {\n this.slug = data['user-slug'];\n this.cdr.markForCheck();\n });\n\n this.items = [\n { id: 'about', label: 'About', icon: 'fa fa-fw fa-user' },\n {\n id: 'projects',\n label: 'Projects',\n icon: 'fa fa-fw fa-briefcase',\n state: {\n permission: this.permissionService.evaluatePermissions('Pages.Product.CRM')\n }\n },\n {\n id: 'portfolio',\n label: 'Portfolio',\n icon: 'fa fa-fw fa-image',\n state: {\n permission: this.permissionService.evaluatePermissions('Pages.Product.CRM')\n }\n }\n ];\n [this.activeItem] = this.items;\n this.activeTabValue = this.activeItem?.id as string;\n }\n\n get allowEdit() {\n return (\n this.loggedInUserDetails?.slug === this.slug || this.permissionService.isSuperAdmin()\n );\n }\n\n ngOnInit() {\n this.getUserBySlug();\n // Horizontal Timeline js for user timeline\n this.waitForJQuery(() => {\n this.scriptLoader.loadScriptOnce('head', '/assets/js/vertical-timeline.js');\n });\n }\n\n handleImageError(event: Event, fallbackPath): void {\n HelperService.handleImageFallbackPath(event, fallbackPath);\n }\n\n private dataURLtoBlob(dataUrl: string) {\n const arr = dataUrl?.split(',');\n // eslint-disable-next-line @typescript-eslint/prefer-regexp-exec\n const mime = /^[A-Z]*[a-z]*:(.*?);[A-Z]*/.exec(arr[0])?.[1];\n const bStr = atob(arr[1]);\n let n = bStr.length;\n const u8arr = new Uint8Array(n);\n // eslint-disable-next-line no-plusplus\n while (n--) {\n u8arr[n] = bStr.charCodeAt(n);\n }\n\n return new Blob([u8arr], { type: mime });\n }\n\n openModal(content) {\n if (this.allowEdit) {\n this.modalService.open(content, { centered: true, windowClass: 'modal-holder' });\n }\n }\n\n onImageSelection(event) {\n const blob = this.dataURLtoBlob(event);\n const filename = `${`${this.slug.toLocaleLowerCase()}_${Date.parse(\n new Date().toString()\n )}`}.png`;\n const file: File = new File([blob], filename);\n this.userService.addAvatar(file).subscribe(res => {\n this.modalService.dismissAll();\n this.image = res?.user_avatar[2]?.url;\n this.cdr.markForCheck();\n });\n }\n\n getUserBySlug() {\n forkJoin({\n user: this.profileService.getUserObject('user', this.slug),\n user_profile: this.profileService.getUserObject('user_profile', this.slug),\n avatar: this.profileService.getUserObject('avatar', this.slug)\n }).subscribe({\n next: response => {\n this.user = response.user;\n this.userProfile = response.user_profile;\n if (response.avatar && response.avatar.length > 0) {\n this.image = response?.avatar[2]?.url;\n }\n this.getCurrentUserDetails();\n this.isLoaded = true;\n this.cdr.markForCheck();\n },\n error: error => {\n if (error.status === StatusCodes.NOT_FOUND) {\n this.router.navigate(['NotFound']);\n }\n this.cdr.markForCheck();\n }\n });\n }\n\n onClose() {\n this.modalService.dismissAll();\n }\n\n private getCurrentUserDetails() {\n this.userStore().subscribe((currentUser: User) => {\n if (currentUser) {\n this.loggedInUserDetails = currentUser;\n\n this.userService\n .getCurrentUserObject('user_relationships')\n .subscribe((response: UserRelationship[]) => {\n this.isFollowing =\n response.length > 0\n ? response.some(\n x =>\n x.followed_id === this.user.id &&\n currentUser.id === x.follower_id\n )\n : false;\n this.cdr.markForCheck();\n });\n }\n this.cdr.markForCheck();\n });\n }\n\n sendMessageSlug() {\n this.router.navigate(['/message'], { fragment: this.slug });\n }\n\n followUser() {\n this.userService.followUser(this.user.id).subscribe(response => {\n const name = this.user.first_name || this.user.slug;\n if (response.id) {\n this.isFollowing = true;\n this.toast.success(`You're now following ${name}`);\n } else {\n this.isFollowing = false;\n this.toast.success(`You've unfollowed ${name}`);\n }\n this.cdr.markForCheck();\n });\n }\n\n private waitForJQuery(callback: () => void): void {\n let attempts = 0;\n const maxAttempts = 100; // 10 seconds max wait time\n\n const checkJQuery = () => {\n if (window['jQuery']) {\n callback();\n } else if (attempts < maxAttempts) {\n attempts++;\n setTimeout(checkJQuery, 100);\n } else {\n // Load jQuery since it's needed\n this.loadJQueryForUserProfile(callback);\n }\n };\n checkJQuery();\n }\n\n private loadJQueryForUserProfile(callback: () => void): void {\n const jquerySrc = 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js';\n const script = document.createElement('script');\n script.src = jquerySrc;\n script.crossOrigin = 'anonymous';\n script.async = false;\n script.onload = () => {\n callback();\n };\n script.onerror = () => {\n console.error('Failed to load jQuery for user profile');\n // Try fallback\n const fallbackScript = document.createElement('script');\n fallbackScript.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js';\n fallbackScript.crossOrigin = 'anonymous';\n fallbackScript.async = false;\n fallbackScript.onload = () => {\n callback();\n };\n fallbackScript.onerror = () => {\n console.error('All jQuery CDNs failed for user profile');\n };\n document.head.appendChild(fallbackScript);\n };\n document.head.appendChild(script);\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n }\n}\n","<!-- User Profile Starts -->\n<!-- Basic User Details Starts -->\n@if (user) {\n <section id=\"user-profile\"\n >\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"dashboard\">\n <div class=\"media row py-3 align-items-center\">\n <div class=\"col-3 col-sm-2\">\n <div class=\"align-self-center halfway-fab text-center\">\n <!-- User Avatar -->\n <a class=\"profile-image\">\n <img [src]=\"image\"\n width=\"100\"\n height=\"100\"\n class=\"rounded-circle img-border width-100\"\n alt=\"User Male\"\n (error)=\"handleImageError($event, 'assets/img/icons/male.png')\"\n (keydown.enter)=\"openModal(content)\"\n (click)=\"openModal(content)\" />\n @if (allowEdit) {\n <div class=\"overlay\"\n (keydown.enter)=\"openModal(content)\"\n (click)=\"openModal(content)\"\n >\n <div class=\"overlay-text\">\n <!-- Change Profile Pic -->\n <a aria-label=\"Navigate to Target\">\n {{ 'User.Profile.Change' | transloco }}\n </a>\n </div>\n </div>\n }\n </a>\n </div>\n </div>\n <div class=\"col-9 col-sm-5\">\n <div class=\"align-self-start halfway-fab ps-3 pt-2\">\n <div>\n @if (user?.last_name) {\n <strong class=\"font-medium-2 text-uppercase\"\n >\n {{\n user?.first_name\n ? user?.first_name + ' ' + user?.last_name\n : 'Update Profile'\n }}\n </strong>\n }\n @if (!user?.last_name) {\n <strong class=\"font-medium-2 text-uppercase\"\n >\n {{ user?.first_name ? user?.first_name : 'Update Profile' }}\n </strong>\n }\n <p class=\"font-small-4\">{{ userProfile?.headline }}</p>\n </div>\n </div>\n </div>\n <div class=\"col-12 col-sm-5\">\n @if (!allowEdit) {\n <div class=\"profile-cover-buttons\"\n >\n <div class=\"d-flex halfway-fab align-self-end\">\n <div class=\"text-end d-none d-sm-none d-md-none d-lg-block\">\n <button type=\"button\"\n (click)=\"followUser()\"\n class=\"btn btn-outline-primary btn-raised me-2\">\n <i class=\"fa fa-plus\" aria-hidden=\"true\"></i>\n {{ isFollowing ? 'Following' : 'Follow' }}\n </button>\n <button type=\"button\"\n class=\"btn btn-primary btn-raised me-3\"\n (click)=\"sendMessageSlug()\">\n <i class=\"fa fa-mail-bulk\" aria-hidden=\"true\"></i> Message\n </button>\n </div>\n <div class=\"text-end d-block d-sm-block d-md-block d-lg-none\">\n <button type=\"button\"\n class=\"btn btn-primary btn-raised me-2\">\n <i class=\"fa fa-plus\" aria-hidden=\"true\"></i>\n </button>\n <button type=\"button\"\n class=\"btn btn-primary btn-raised me-3\">\n <i class=\"fa fa-mail-bulk\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n </section>\n}\n<!-- Basic User Details Ends -->\n<section>\n <div class=\"container-fluid pw-tab overflow-hidden\">\n <p-tabs [value]=\"activeTabValue\" (valueChange)=\"onTabChange($event)\">\n <p-tablist>\n @for (item of items; track item) {\n <p-tab [value]=\"item.id\">\n @if (item.icon) {\n <i [class]=\"item.icon\" aria-hidden=\"true\"></i>\n }\n <span>{{ item.label }}</span>\n </p-tab>\n }\n </p-tablist>\n </p-tabs>\n <div class=\"dashboard\">\n <div class=\"dashboard-body\">\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (user && activeItem.id === 'about') {\n <pw-user-about [user]=\"user\"\n [isEdit]=\"allowEdit\"\n (saveEvent)=\"getUserBySlug()\">\n </pw-user-about>\n }\n @if (activeItem.id === 'projects') {\n <pw-user-projects [user]=\"user\"\n [slug]=\"slug\"\n [isEdit]=\"allowEdit\"></pw-user-projects>\n }\n @if (activeItem.id === 'portfolio') {\n <pw-portfolios [user]=\"user\"\n [isEdit]=\"allowEdit\"></pw-portfolios>\n }\n </div>\n </div>\n </div>\n</section>\n<ng-template #content\n let-modal>\n <div class=\"card m-0\">\n <div class=\"card-content\">\n <div class=\"card-title\">\n <h3 class=\"modal-title\">{{ 'User.Profile.ProfilePicture' | transloco }}</h3>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"card-header\">\n <small> {{ 'User.Profile.PictureMessage' | transloco }}</small>\n <pw-image-cropper #profile\n aspectRatio=\"auto\"\n [userAvatar]=\"image\"\n (imageSelectionEvent)=\"onImageSelection($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n </div>\n </div>\n</ng-template>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { RouterModule } from '@angular/router';\nimport { NgxGpAutocompleteModule } from '@angular-magic/ngx-gp-autocomplete';\n\nimport { AppConfigService } from '@posiwise/app-config-service';\nimport { AppLoaderModule } from '@posiwise/app-loader';\nimport { CoreTranslocoModule } from '@posiwise/core-transloco';\nimport { DirectivesModule } from '@posiwise/directives';\nimport { PipesModule } from '@posiwise/pipes';\nimport { SharedComponentsModule } from '@posiwise/shared-components';\n\nimport { NgxCaptchaModule } from 'ngx-captcha';\nimport { UiSwitchModule } from 'ngx-ui-switch';\nimport { AccordionModule } from 'primeng/accordion';\nimport { DatePickerModule } from 'primeng/datepicker';\nimport { FileUploadModule } from 'primeng/fileupload';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { MultiSelectModule } from 'primeng/multiselect';\nimport { ProgressSpinnerModule } from 'primeng/progressspinner';\nimport { RatingModule } from 'primeng/rating';\nimport { SelectModule } from 'primeng/select';\nimport { SelectButtonModule } from 'primeng/selectbutton';\nimport { TooltipModule } from 'primeng/tooltip';\n\nimport { Loader } from '@googlemaps/js-api-loader';\nimport { NgbDatepickerModule, NgbModalModule } from '@ng-bootstrap/ng-bootstrap';\n\nimport { AccountComponent } from './account/account.component';\nimport { AccountDetailsComponent } from './account/account-details/account-details.component';\nimport { AddSubscriptionComponent } from './account/subscriptions/add-subscription/add-subscription.component';\nimport { SavedCardDetailsComponent } from './account/subscriptions/saved-card-details/saved-card-details.component';\nimport { ClearMaskedOnFocusDirective } from './account/subscriptions/subscription-credential/clear-masked-on-focus.directive';\nimport {\n CredentialAvatarHuePipe,\n HumanizeCredentialNamePipe,\n SubscriptionNameByIdPipe\n} from './account/subscriptions/subscription-credential/humanize-credential-name.pipe';\nimport { SubscriptionCredentialComponent } from './account/subscriptions/subscription-credential/subscription-credential.component';\nimport { UpdatePaymentDetailsComponent } from './account/subscriptions/update-payment-details/update-payment-details.component';\nimport { UpgradeSubscriptionComponent } from './account/subscriptions/upgrade-subscription/upgrade-subscription.component';\nimport { UserSubscriptionDetailsComponent } from './account/subscriptions/user-subscription-details/user-subscription-details.component';\nimport { UserSubscriptionListComponent } from './account/subscriptions/user-subscriptions-list/user-subscriptions-list.component';\nimport { UserInvoiceComponent } from './account/user-invoice/user-invoice.component';\nimport { CommunicationTabComponent } from './settings-tabs/communication-tab/communication-tab.component';\nimport { OthersTabComponent } from './settings-tabs/others-tab/others-tab.component';\nimport { SecurityTabComponent } from './settings-tabs/security-tab/security-tab.component';\nimport { SettingsComponent } from './settings-tabs/settings-tabs.component';\nimport { SupportComponent } from './support/support.component';\nimport { SupportDetailsComponent } from './support/support-details/support-details.component';\nimport { EditPortfoliosComponent } from './user-profile/edit-portfolios/edit-portfolios.component';\nimport { EditProjectModalComponent } from './user-profile/edit-project-modal/edit-project-modal.component';\nimport { EditQualificationsModalComponent } from './user-profile/edit-qualifications-modal/edit-qualifications-modal.component';\nimport { EditRecommendationModalComponent } from './user-profile/edit-recommendation-modal/edit-recommendation-modal.component';\nimport { EditSkillsModalComponent } from './user-profile/edit-skills-modal/edit-skills-modal.component';\nimport { EditSocialLinksComponent } from './user-profile/edit-social-links/edit-social-links.component';\nimport { EditUserProfileModalComponent } from './user-profile/edit-user-profile-modal/edit-user-profile-modal.component';\nimport { UserAboutComponent } from './user-profile/user-about/user-about.component';\nimport { PortfoliosComponent } from './user-profile/user-portfolios/user-portfolios.component';\nimport { UserProfilePageComponent } from './user-profile/user-profile-page.component';\nimport { UserProjectsComponent } from './user-profile/user-projects/user-projects.component';\n\nconst primeNgModules = [\n DatePickerModule,\n MultiSelectModule,\n ProgressSpinnerModule,\n AccordionModule,\n FileUploadModule,\n SelectModule,\n RatingModule,\n SelectButtonModule,\n TooltipModule\n];\n\nconst ngbModule = [NgbModalModule, NgbDatepickerModule];\n\n@NgModule({\n declarations: [\n AccountComponent,\n AccountDetailsComponent,\n AddSubscriptionComponent,\n SavedCardDetailsComponent,\n SubscriptionCredentialComponent,\n HumanizeCredentialNamePipe,\n CredentialAvatarHuePipe,\n SubscriptionNameByIdPipe,\n ClearMaskedOnFocusDirective,\n UpdatePaymentDetailsComponent,\n UpgradeSubscriptionComponent,\n UserSubscriptionDetailsComponent,\n UserSubscriptionListComponent,\n UserInvoiceComponent,\n CommunicationTabComponent,\n OthersTabComponent,\n SecurityTabComponent,\n SettingsComponent,\n SupportComponent,\n EditPortfoliosComponent,\n EditProjectModalComponent,\n EditQualificationsModalComponent,\n EditRecommendationModalComponent,\n EditSkillsModalComponent,\n EditSocialLinksComponent,\n EditUserProfileModalComponent,\n UserAboutComponent,\n PortfoliosComponent,\n UserProfilePageComponent,\n UserProjectsComponent,\n SupportDetailsComponent\n ],\n imports: [\n InputTextModule,\n AppLoaderModule,\n DirectivesModule,\n CommonModule,\n RouterModule,\n ReactiveFormsModule,\n CoreTranslocoModule,\n NgxGpAutocompleteModule,\n SharedComponentsModule,\n PipesModule,\n UiSwitchModule,\n NgxCaptchaModule,\n FormsModule,\n ...primeNgModules,\n ...ngbModule\n ],\n exports: [\n AccountComponent,\n AccountDetailsComponent,\n AddSubscriptionComponent,\n SavedCardDetailsComponent,\n SubscriptionCredentialComponent,\n HumanizeCredentialNamePipe,\n CredentialAvatarHuePipe,\n SubscriptionNameByIdPipe,\n ClearMaskedOnFocusDirective,\n UpdatePaymentDetailsComponent,\n UpgradeSubscriptionComponent,\n UserSubscriptionDetailsComponent,\n UserSubscriptionListComponent,\n UserInvoiceComponent,\n CommunicationTabComponent,\n OthersTabComponent,\n SecurityTabComponent,\n SettingsComponent,\n SupportComponent,\n EditPortfoliosComponent,\n EditProjectModalComponent,\n EditQualificationsModalComponent,\n EditRecommendationModalComponent,\n EditSkillsModalComponent,\n EditSocialLinksComponent,\n EditUserProfileModalComponent,\n UserAboutComponent,\n PortfoliosComponent,\n UserProfilePageComponent,\n UserProjectsComponent,\n SupportDetailsComponent\n ],\n providers: [\n {\n provide: Loader,\n useFactory: (appConfigService: AppConfigService) => {\n return new Loader({\n apiKey: appConfigService.getGoogleApiKey(),\n libraries: ['places']\n });\n },\n deps: [AppConfigService]\n }\n ]\n})\nexport class UserModuleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2","i1","i3","i4","i5","i6","i10","i11","i13","i7","i8.ClearMaskedOnFocusDirective","i9","i10.HumanizeCredentialNamePipe","i10.CredentialAvatarHuePipe","i10.SubscriptionNameByIdPipe","i7.SavedCardDetailsComponent","i8","i9.SavedCardDetailsComponent","i12","i14","i15","i5.EditQualificationsModalComponent","i6.EditSkillsModalComponent","i7.EditSocialLinksComponent","i8.EditUserProfileModalComponent","i8.EditPortfoliosComponent","i9.EditProjectModalComponent","i10.EditRecommendationModalComponent","i11.EditSkillsModalComponent","i7.UserAboutComponent","i8.PortfoliosComponent","i9.UserProjectsComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAWa,gBAAgB,CAAA;AASzB,IAAA,WAAA,CAA6B,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;QAC/B,IAAI,CAAC,KAAK,GAAG;AACT,YAAA;AACI,gBAAA,EAAE,EAAE,SAAS;AACb,gBAAA,KAAK,EAAE,SAAS;AAChB,gBAAA,IAAI,E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G;AACN,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,gBAAgB;wBAChB,uBAAuB;wBACvB,wBAAwB;wBACxB,yBAAyB;wBACzB,+BAA+B;wBAC/B,0BAA0B;wBAC1B,uBAAuB;wBACvB,wBAAwB;wBACxB,2BAA2B;wBAC3B,6BAA6B;wBAC7B,4BAA4B;wBAC5B,gCAAgC;wBAChC,6BAA6B;wBAC7B,oBAAoB;wBACpB,yBAAyB;wBACzB,kBAAkB;wBAClB,oBAAoB;wBACpB,iBAAiB;wBACjB,gBAAgB;wBAChB,uBAAuB;wBACvB,yBAAyB;wBACzB,gCAAgC;wBAChC,gCAAgC;wBAChC,wBAAwB;wBACxB,wBAAwB;wBACxB,6BAA6B;wBAC7B,kBAAkB;wBAClB,mBAAmB;wBACnB,wBAAwB;wBACxB,qBAAqB;wBACrB;AACH,qBAAA;AACD,oBAAA,SAAS,EAAE;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,MAAM;AACf,4BAAA,UAAU,EAAE,CAAC,gBAAkC,KAAI;gCAC/C,OAAO,IAAI,MAAM,CAAC;AACd,oCAAA,MAAM,EAAE,gBAAgB,CAAC,eAAe,EAAE;oCAC1C,SAAS,EAAE,CAAC,QAAQ;AACvB,iCAAA,CAAC;4BACN,CAAC;4BACD,IAAI,EAAE,CAAC,gBAAgB;AAC1B;AACJ;AACJ,iBAAA;;;AC7KD;;AAEG;;;;"}
1
+ {"version":3,"file":"posiwise-user-module.mjs","names":["i1","i2","i1","i2","i4","i5","i6","i7","i8","i12","i1","i2","i3","i4","i5","i6","i1","i1","i2","i3","i4","i5","i6","i7","i8.ClearMaskedOnFocusDirective","i9","i10.HumanizeCredentialNamePipe","i10.CredentialAvatarHuePipe","i10.SubscriptionNameByIdPipe","i1","i2","i3","i4","i5","i6.SavedCardDetailsComponent","i1","i2","i3","i4","i5","i6.SavedCardDetailsComponent","i7.SecondaryPaymentMethodComponent","i8","i1","i2","i3","i4","i5","i6","i7","i8","i9.SavedCardDetailsComponent","i10","i11","i1","i2","i3","i4","i5","i6","i7","i8","i9","i10","i11","i13","i14","i15","i1","i2","i3","i4","i5","i6","i7","i8","i9","i10","i11","i12","i14","i2","i3","i4","i5","i6","i7","i8","i1","i2","i3","i4","i5","i6","i1","i2","i3","i4","i5","i1","i1","i2","i3","i1","i2","i3","i4","i5","i6","i7","i1","i2","i3","i4","i6","i7","i1","i2","i3","i4","i1","i2","i4","i5","i6","i7","i8","i1","i2","i4","i5","i6","i8","i1","i2","i4","i5","i1","i2","i3","i4","i1","i2","i4","i5","i1","i2","i4","i5","i6","i7","i9","i10","i1","i2","i3","i4","i5.EditQualificationsModalComponent","i6.EditSkillsModalComponent","i7.EditSocialLinksComponent","i8.EditUserProfileModalComponent","i9","i10","i1","i2","i3","i4","i5","i1","i2","i3","i4","i5","i6","i7","i8.EditPortfoliosComponent","i9.EditProjectModalComponent","i10.EditRecommendationModalComponent","i11.EditSkillsModalComponent","i12","i1","i2","i3","i5","i6","i7.UserAboutComponent","i8.PortfoliosComponent","i9.UserProjectsComponent","i10"],"sources":["../../../../libs/user-module/src/lib/account/account.component.ts","../../../../libs/user-module/src/lib/account/account.component.html","../../../../libs/user-module/src/lib/account/account-details/account-details.component.ts","../../../../libs/user-module/src/lib/account/account-details/account-details.component.html","../../../../libs/user-module/src/lib/account/subscriptions/add-subscription/add-subscription.component.ts","../../../../libs/user-module/src/lib/account/subscriptions/add-subscription/add-subscription.component.html","../../../../libs/user-module/src/lib/account/subscriptions/saved-card-details/saved-card-details.component.ts","../../../../libs/user-module/src/lib/account/subscriptions/saved-card-details/saved-card-details.component.html","../../../../libs/user-module/src/lib/account/subscriptions/subscription-credential/clear-masked-on-focus.directive.ts","../../../../libs/user-module/src/lib/account/subscriptions/subscription-credential/humanize-credential-name.pipe.ts","../../../../libs/user-module/src/lib/account/subscriptions/subscription-credential/subscription-credential.component.ts","../../../../libs/user-module/src/lib/account/subscriptions/subscription-credential/subscription-credential.component.html","../../../../libs/user-module/src/lib/account/subscriptions/update-payment-details/airwallex-element.helper.ts","../../../../libs/user-module/src/lib/account/subscriptions/update-payment-details/braintree-dropin.helper.ts","../../../../libs/user-module/src/lib/account/subscriptions/update-payment-details/secondary-payment-method.component.ts","../../../../libs/user-module/src/lib/account/subscriptions/update-payment-details/secondary-payment-method.component.html","../../../../libs/user-module/src/lib/account/subscriptions/update-payment-details/update-payment-details.component.ts","../../../../libs/user-module/src/lib/account/subscriptions/update-payment-details/update-payment-details.component.html","../../../../libs/user-module/src/lib/account/subscriptions/upgrade-subscription/upgrade-subscription.component.ts","../../../../libs/user-module/src/lib/account/subscriptions/upgrade-subscription/upgrade-subscription.component.html","../../../../libs/user-module/src/lib/account/subscriptions/user-subscription-details/user-subscription-details.component.ts","../../../../libs/user-module/src/lib/account/subscriptions/user-subscription-details/user-subscription-details.component.html","../../../../libs/user-module/src/lib/account/subscriptions/user-subscriptions-list/user-subscriptions-list.component.ts","../../../../libs/user-module/src/lib/account/subscriptions/user-subscriptions-list/user-subscriptions-list.component.html","../../../../libs/user-module/src/lib/account/user-invoice/user-invoice.component.ts","../../../../libs/user-module/src/lib/account/user-invoice/user-invoice.component.html","../../../../libs/user-module/src/lib/settings-tabs/communication-tab/communication-tab.component.ts","../../../../libs/user-module/src/lib/settings-tabs/communication-tab/communication-tab.component.html","../../../../libs/user-module/src/lib/settings-tabs/others-tab/others-tab.component.ts","../../../../libs/user-module/src/lib/settings-tabs/others-tab/others-tab.component.html","../../../../libs/user-module/src/lib/settings-tabs/security-tab/security-tab.component.ts","../../../../libs/user-module/src/lib/settings-tabs/security-tab/security-tab.component.html","../../../../libs/user-module/src/lib/settings-tabs/settings-tabs.component.ts","../../../../libs/user-module/src/lib/settings-tabs/settings-tabs.component.html","../../../../libs/user-module/src/lib/support/support.component.ts","../../../../libs/user-module/src/lib/support/support.component.html","../../../../libs/user-module/src/lib/support/support-details/support-details.component.ts","../../../../libs/user-module/src/lib/support/support-details/support-details.component.html","../../../../libs/user-module/src/lib/user-profile/edit-portfolios/edit-portfolios.component.ts","../../../../libs/user-module/src/lib/user-profile/edit-portfolios/edit-portfolios.component.html","../../../../libs/user-module/src/lib/user-profile/edit-project-modal/edit-project-modal.component.ts","../../../../libs/user-module/src/lib/user-profile/edit-project-modal/edit-project-modal.component.html","../../../../libs/user-module/src/lib/user-profile/edit-qualifications-modal/edit-qualifications-modal.component.ts","../../../../libs/user-module/src/lib/user-profile/edit-qualifications-modal/edit-qualifications-modal.component.html","../../../../libs/user-module/src/lib/user-profile/edit-recommendation-modal/edit-recommendation-modal.component.ts","../../../../libs/user-module/src/lib/user-profile/edit-recommendation-modal/edit-recommendation-modal.component.html","../../../../libs/user-module/src/lib/user-profile/edit-skills-modal/edit-skills-modal.component.ts","../../../../libs/user-module/src/lib/user-profile/edit-skills-modal/edit-skills-modal.component.html","../../../../libs/user-module/src/lib/user-profile/edit-social-links/edit-social-links.component.ts","../../../../libs/user-module/src/lib/user-profile/edit-social-links/edit-social-links.component.html","../../../../libs/user-module/src/lib/user-profile/edit-user-profile-modal/edit-user-profile-modal.component.ts","../../../../libs/user-module/src/lib/user-profile/edit-user-profile-modal/edit-user-profile-modal.component.html","../../../../libs/user-module/src/lib/user-profile/user-about/user-about.component.ts","../../../../libs/user-module/src/lib/user-profile/user-about/user-about.component.html","../../../../libs/user-module/src/lib/user-profile/user-portfolios/user-portfolios.component.ts","../../../../libs/user-module/src/lib/user-profile/user-portfolios/user-portfolios.component.html","../../../../libs/user-module/src/lib/user-profile/user-projects/user-projects.component.ts","../../../../libs/user-module/src/lib/user-profile/user-projects/user-projects.component.html","../../../../libs/user-module/src/lib/user-profile/user-profile-page.component.ts","../../../../libs/user-module/src/lib/user-profile/user-profile-page.component.html","../../../../libs/user-module/src/lib/user-module.module.ts"],"sourcesContent":["import { Component, ViewChild } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { MenuItem } from 'primeng/api';\n\n@Component({\n selector: 'pw-user-account',\n templateUrl: './account.component.html',\n\n standalone: false\n})\nexport class AccountComponent {\n @ViewChild('menuItems', { static: true }) menu: MenuItem[];\n\n items: MenuItem[];\n\n activeItem: MenuItem;\n\n path: string;\n\n constructor(private readonly router: Router) {\n this.items = [\n {\n id: 'account',\n label: 'Account',\n icon: 'fa fa-fw fa-list',\n routerLink: ['/account/details']\n },\n {\n id: 'subscription',\n label: 'Subscriptions',\n icon: 'fa fa-fw fa-file-invoice',\n routerLink: ['/account/subscriptions']\n },\n {\n id: 'invoice',\n label: 'Invoices',\n icon: 'fa fa-fw fa-tag',\n routerLink: ['/account/invoice']\n }\n ];\n this.activeItem =\n this.items[\n this.items.findIndex(\n record => record.routerLink[0] === this.router.url.split('?')[0]\n )\n ];\n }\n\n activateMenu() {\n this.activeItem = this.menu['activeItem'];\n }\n}\n","<pw-tabs [items]=\"items\"></pw-tabs>\n","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n Injector,\n OnInit,\n ViewChild\n} from '@angular/core';\nimport { AbstractControl, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\nimport { NgxGpAutocompleteDirective } from '@angular-magic/ngx-gp-autocomplete';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AuthService, GeoService, ProfileService } from '@posiwise/common-services';\nimport { AppUser, Country, User } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\nimport { ConfirmDialogService } from '@posiwise/shared-components';\nimport { ValidateForm } from '@posiwise/utils';\n\nimport { StatusCodes } from 'http-status-codes';\nimport { map, Observable } from 'rxjs';\nimport { getDomain } from 'tldts';\n\nimport { NgbDateStruct, NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\n/** Environment segments that may already sit in front of the company domain. */\nconst MCP_ENV_SEGMENTS = ['dev', 'uat', 'staging', 'go'];\n\n/** Segment assumed when the host carries none — PROD is served from the apex too. */\nconst MCP_PROD_SEGMENT = 'go';\n\n@Component({\n selector: 'pw-account-details',\n templateUrl: './account-details.component.html',\n styleUrls: ['./account-details.component.scss'],\n\n standalone: false\n})\nexport class AccountDetailsComponent extends AppBaseComponent implements OnInit {\n @ViewChild('ngxPlaces') placesRef: NgxGpAutocompleteDirective;\n @ViewChild('password', { static: false }) passwordRef: ElementRef;\n\n emailForm: UntypedFormGroup;\n passwordForm: UntypedFormGroup;\n profileForm: UntypedFormGroup;\n\n image = 'assets/img/icons/male.png';\n\n countries$: Observable<Country[]>;\n\n states: Country[] = [];\n\n validatedEmail: string;\n\n toggleEmail: boolean;\n togglePassword: boolean;\n toggleNickName: boolean;\n\n passwordVerified = false;\n isCurrentPasswordValid = true;\n\n selectedState;\n\n user: User;\n\n slug: string;\n\n isLoaded = false;\n passwordBusyButton = false;\n slugBusyButton = false;\n emailBusyButton = false;\n validatePasswordBusyButton = false;\n profileBusyButton = false;\n\n showApiToken = false;\n showApiClientId = false;\n refreshingTokens = false;\n updatingScope = false;\n\n connections: {\n id: number;\n client_name: string;\n created_at: string;\n expires_at: string;\n last_used_at: string | null;\n }[] = [];\n loadingConnections = false;\n\n constructor(\n private readonly fb: UntypedFormBuilder,\n private readonly modalService: NgbModal,\n private readonly authService: AuthService,\n private readonly geoService: GeoService,\n private readonly profileService: ProfileService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef,\n private readonly confirmDialog: ConfirmDialogService\n ) {\n super(injector);\n this.getForms();\n }\n\n ngOnInit() {\n console.log('AccountDetailsComponent.ngOnInit()');\n this.getUserProfile();\n this.loadConnections();\n this.geoService.getCountries().subscribe(() => {\n this.countries$ = this.geoService\n .getCountries()\n .pipe(\n map((countries: []) => [{ name: 'Select Country', code: null }, ...countries])\n );\n this.cdr.markForCheck();\n });\n }\n\n handleAddressChange(_event) {\n this.profileForm.patchValue({\n latitude: _event.geometry.location.lat(),\n longitude: _event.geometry.location.lng(),\n location: _event.formatted_address\n });\n }\n\n private getUserProfile() {\n this.userService\n .getUserInfo()\n .subscribe(user => {\n if (user) {\n this.user = user;\n this.slug = user.slug;\n if (user?.user_avatar?.length) {\n this.image = user?.user_avatar[2]?.url;\n }\n let dobObject: NgbDateStruct;\n if (user.dob) {\n dobObject = {\n day: Number(user.dob.substring(8, 10)),\n month: Number(user.dob.substring(5, 7)),\n year: Number(user.dob.substring(0, 4))\n };\n }\n\n this.getRegion(user.country);\n\n // Map api_keys if present\n if (user && user.api_keys) {\n if (user.api_keys.api_user_token && !user.api_user_token) {\n this.user.api_user_token = user.api_keys.api_user_token;\n }\n if (user.api_keys.api_user_id && !user.api_user_id) {\n this.user.api_user_id = user.api_keys.api_user_id;\n }\n if (user.api_keys.api_hits !== undefined && user.api_hits === undefined) {\n this.user.api_hits = user.api_keys.api_hits;\n }\n if (\n user.api_keys.api_hits_max !== undefined &&\n user.api_hits_max === undefined\n ) {\n this.user.api_hits_max = user.api_keys.api_hits_max;\n }\n }\n\n this.profileForm.patchValue(this.user);\n this.profileForm.patchValue({ dob: dobObject });\n this.validatedEmail = this.user.email;\n }\n this.cdr.markForCheck();\n })\n .add(() => {\n this.isLoaded = true;\n this.cdr.markForCheck();\n });\n }\n\n /**\n * Updates Email Address\n * this needs to be separate and requires the email to be validated from email before it's actually changed\n */\n onEmailFormSubmit() {\n this.emailBusyButton = true;\n const data = this.emailForm.value;\n data.confirmation_path = 'confirm-email';\n\n if (data && this.passwordVerified) {\n this.userService\n .updateEmail(data)\n .subscribe(() => {\n this.emailForm.reset();\n this.passwordVerified = false;\n this.toast.success(`A verification email has been sent to ${data.email}`, '', {\n positionClass: 'toast-top-center',\n timeOut: 100000\n });\n this.cdr.markForCheck();\n })\n .add(() => {\n this.emailBusyButton = false;\n this.cdr.markForCheck();\n });\n }\n }\n\n validatePassword() {\n this.validatePasswordBusyButton = true;\n const password = this.passwordRef.nativeElement.value;\n if (password) {\n this.userService\n .checkPassword({ password })\n .subscribe(data => {\n if (data?.status === StatusCodes.OK) {\n this.passwordVerified = true;\n } else {\n this.toast.error(data.error.message);\n this.passwordRef.nativeElement.value = '';\n }\n this.cdr.markForCheck();\n })\n .add(() => {\n this.validatePasswordBusyButton = false;\n this.cdr.markForCheck();\n });\n }\n }\n\n handleImageError(event: Event, fallbackPath): void {\n HelperService.handleImageFallbackPath(event, fallbackPath);\n }\n\n checkValidity() {\n const password = this.passwordRef.nativeElement.value;\n if (password.length > 5) {\n this.isCurrentPasswordValid = false;\n } else {\n this.isCurrentPasswordValid = true;\n }\n }\n\n onPasswordFormSubmit() {\n if (this.passwordForm.valid) {\n this.passwordBusyButton = true;\n const data = {\n password: this.passwordForm.value['newPassword'],\n password_confirmation: this.passwordForm.value['confirmPassword'],\n old_password: this.passwordForm.value['currentPassword']\n };\n this.userService\n .updatePassword(data)\n .subscribe(response => {\n if (response.status_code === 200) {\n this.toast.success(response.message, '', {\n positionClass: 'toast-top-center'\n });\n this.onTogglePassword();\n } else {\n this.toast.error(response.error.message);\n }\n this.passwordForm.reset();\n this.cdr.markForCheck();\n })\n .add(() => {\n this.passwordBusyButton = false;\n this.cdr.markForCheck();\n });\n }\n }\n\n @ValidateForm('profileForm')\n onProfileFormSubmit() {\n this.profileBusyButton = true;\n const data = { ...this.profileForm.value };\n data.dob = HelperService.dateFormat(this.profileForm.get('dob')?.value);\n if (data.location === '') {\n data.location = null;\n }\n Object.entries(data).forEach(([key, val]) => {\n if (val === '' || val === null) {\n delete data[key];\n }\n });\n this.profileService\n .updateUserProfile(data)\n .subscribe(() => {\n this.toast.success(this.translation.translate('User.Profile.ProfileUpdated'));\n this.cdr.markForCheck();\n })\n .add(() => {\n this.profileBusyButton = false;\n this.cdr.markForCheck();\n });\n }\n\n onAvatarSave() {\n const data = {\n avatar: this.profileForm.get('avatar')?.value\n };\n this.profileService.updateUserProfile(data).subscribe(() => {\n this.toast.success(this.translation.translate('User.Profile.ProfileUpdated'));\n this.cdr.markForCheck();\n });\n }\n\n openModal(content) {\n this.modalService.open(content, { centered: true, windowClass: 'modal-holder' });\n }\n\n onUpdateSlug() {\n this.slugBusyButton = true;\n this.userService\n .updateSlug(this.slug)\n .subscribe(response => {\n this.toggleNickName = false;\n if (response?.status === StatusCodes.OK) {\n this.getUserProfile();\n } else {\n this.toast.error('User.Account.UserNameError');\n }\n this.cdr.markForCheck();\n })\n .add(() => {\n this.slugBusyButton = false;\n this.cdr.markForCheck();\n });\n }\n\n onImageSelection(event) {\n const blob = this.dataURLtoBlob(event);\n const filename = `${`${this.slug.toLocaleLowerCase()}_${Date.parse(\n new Date().toString()\n )}`}.png`;\n const file: File = new File([blob], filename);\n this.userService.addAvatar(file).subscribe(res => {\n this.image = res?.user_avatar[2]?.url;\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n });\n }\n\n sendMailToResetPassword() {\n this.authService.forgotPassword(this.user.email, 'reset-password').subscribe(() => {\n this.toast.success(this.translation.translate('User.Account.Message.CheckEmail'));\n this.cdr.markForCheck();\n });\n }\n\n getRegion(countryId: number | string) {\n if (countryId) {\n this.geoService.getRegions(countryId).subscribe(response => {\n this.states = [{ code: 0, name: 'Select State' }, ...response];\n this.cdr.markForCheck();\n });\n }\n }\n\n loadConnections() {\n this.loadingConnections = true;\n this.userService\n .getMcpConnections()\n .subscribe({\n next: (response: {\n mcp_oauth_connections: {\n id: number;\n client_name: string;\n created_at: string;\n expires_at: string;\n last_used_at: string | null;\n }[];\n }) => {\n this.connections = response?.mcp_oauth_connections ?? [];\n this.cdr.markForCheck();\n }\n })\n .add(() => {\n this.loadingConnections = false;\n this.cdr.markForCheck();\n });\n }\n\n deregisterConnection(id: number) {\n this.confirmDialog\n .open({\n title: this.translation.translate(\n 'User.Subscriptions.RegisteredApps.DeregisterConfirmTitle'\n ),\n text: this.translation.translate(\n 'User.Subscriptions.RegisteredApps.DeregisterConfirmText'\n ),\n destructive: true,\n confirmLabel: this.translation.translate(\n 'User.Subscriptions.RegisteredApps.DeregisterConfirmButton'\n )\n })\n .then(ok => {\n if (!ok) {\n return;\n }\n\n this.userService.deleteMcpConnection(id).subscribe({\n next: () => {\n // Success toast comes from the backend response (handled by the\n // HTTP interceptor); no client-side toast to avoid a duplicate.\n this.loadConnections();\n },\n error: () => {\n this.toast.error(\n this.translation.translate(\n 'User.Subscriptions.RegisteredApps.DeregisterFailed'\n )\n );\n }\n });\n });\n }\n\n private getForms() {\n this.emailForm = this.fb.group({\n email: ['', [Validators.required, Validators.email]]\n });\n\n this.passwordForm = this.fb.group(\n {\n currentPassword: ['', [Validators.required]],\n newPassword: ['', [Validators.required, Validators.minLength(8)]],\n confirmPassword: ['', [Validators.required, Validators.minLength(8)]]\n },\n {\n validators: this.passwordMatcher\n }\n );\n\n this.profileForm = AppUser.getForm(new AppUser({}));\n }\n\n private passwordMatcher(ac: AbstractControl): null {\n const password = ac.get('newPassword').value;\n const confirmPassword = ac.get('confirmPassword').value;\n if (password !== confirmPassword) {\n ac.get('confirmPassword').setErrors({ MatchPassword: true });\n }\n\n return null;\n }\n\n dataURLtoBlob(dataUrl: string) {\n const arr = dataUrl.split(',');\n const mime = /^[A-Z]*[a-z]*:(.*?);[A-Z]*/.exec(arr[0])?.[1];\n const bStr = atob(arr[1]);\n let n = bStr.length;\n const u8arr = new Uint8Array(n);\n while (n--) {\n u8arr[n] = bStr.charCodeAt(n);\n }\n\n return new Blob([u8arr], { type: mime });\n }\n\n onToggleEmail() {\n this.emailForm.reset();\n this.passwordVerified = false;\n this.toggleEmail = false;\n }\n\n onTogglePassword() {\n this.passwordForm.reset();\n this.togglePassword = false;\n }\n\n onClose() {\n this.modalService.dismissAll();\n }\n\n shouldUserChangeEmail() {\n if (this.user.has_password) {\n this.toggleEmail = !this.toggleEmail;\n } else {\n this.confirmDialog.open({\n text: \"You don't have password, please reset your password first and then try changing email\",\n confirmOnly: true\n });\n }\n }\n\n toggleApiTokenVisibility() {\n this.showApiToken = !this.showApiToken;\n }\n\n toggleApiClientIdVisibility() {\n this.showApiClientId = !this.showApiClientId;\n }\n\n refreshApiTokens() {\n this.confirmDialog\n .open({\n title: 'Are you sure?',\n text: this.translation.translate(\n 'User.Subscriptions.APICredentials.RefreshWarning'\n ),\n destructive: true,\n confirmLabel: 'Yes, refresh tokens!'\n })\n .then(ok => {\n if (ok) {\n this.performTokenRefresh();\n }\n });\n }\n\n private performTokenRefresh() {\n this.refreshingTokens = true;\n this.userService\n .refreshUserApiTokens()\n .subscribe({\n next: response => {\n if (response && response.api_keys) {\n if (!this.user.api_keys) {\n this.user.api_keys = {};\n }\n if (response.api_keys.api_user_token) {\n this.user.api_keys.api_user_token = response.api_keys.api_user_token;\n }\n if (response.api_keys.api_user_id) {\n this.user.api_keys.api_user_id = response.api_keys.api_user_id;\n }\n if (response.api_keys.api_hits !== undefined) {\n this.user.api_keys.api_hits = response.api_keys.api_hits;\n }\n if (response.api_keys.api_hits_max !== undefined) {\n this.user.api_keys.api_hits_max = response.api_keys.api_hits_max;\n }\n }\n\n this.showApiToken = false;\n this.showApiClientId = false;\n this.getUserProfile();\n this.cdr.markForCheck();\n }\n })\n .add(() => {\n this.refreshingTokens = false;\n this.cdr.markForCheck();\n });\n }\n\n get currentApiTokenScope(): string {\n return this.user?.api_keys?.api_token_scope ?? 'read_only';\n }\n\n /**\n * Tenant-dynamic MCP endpoint URL, resolved from the host the user is on.\n * The MCP host is always `brain-api-mcp.{env}.{company-domain}`, so the\n * environment segment has to survive the swap:\n * www.dev.posiwise.com -> brain-api-mcp.dev.posiwise.com\n * www.go.posiwise.com -> brain-api-mcp.go.posiwise.com\n * www.posiwise.com -> brain-api-mcp.go.posiwise.com (apex = PROD)\n * Stripping the first label unconditionally (the previous behaviour) broke\n * PROD, where the app is also served from the apex: it produced\n * `brain-api-mcp.posiwise.com`, which does not exist in DNS.\n */\n get mcpEndpointUrl(): string {\n const url = `https://brain-api-mcp.${this.mcpHostBase(window.location.hostname)}/mcp`;\n const shard = this.user?.user_shard;\n return shard ? `${url}?user_shard=${encodeURIComponent(shard)}` : url;\n }\n\n /**\n * Company domain prefixed by its environment segment. Resolves the company\n * domain with the same `getDomain` the AppConfigService uses to identify the\n * tenant, so multi-label TLDs (acme.co.uk) and arbitrary subdomains both\n * reduce correctly. Only a recognised environment segment is carried over —\n * anything else (`www`, a custom subdomain) falls back to PROD rather than\n * being prefixed onto the host, which would misroute.\n */\n private mcpHostBase(hostname: string): string {\n const companyDomain = getDomain(hostname, { allowPrivateDomains: true });\n if (!companyDomain) {\n // Non-public hosts (localhost, bare IPs) carry no company domain.\n return hostname;\n }\n const prefix = hostname.slice(0, -companyDomain.length).split('.').filter(Boolean);\n const segment = prefix[prefix.length - 1];\n const env = MCP_ENV_SEGMENTS.includes(segment) ? segment : MCP_PROD_SEGMENT;\n return `${env}.${companyDomain}`;\n }\n\n /** Tenant company name (domain-metadata driven), falling back to PosiWise. */\n get mcpCompanyName(): string {\n return this.appConfig?.company?.name || 'PosiWise';\n }\n\n changeApiTokenScope(scope: string) {\n if (this.updatingScope || scope === this.currentApiTokenScope) {\n return;\n }\n this.confirmDialog\n .open({\n title: this.translation.translate(\n 'User.Subscriptions.APICredentials.ScopeConfirmTitle'\n ),\n text: this.translation.translate(\n scope === 'read_write'\n ? 'User.Subscriptions.APICredentials.ScopeWriteWarning'\n : 'User.Subscriptions.APICredentials.ScopeReadWarning'\n ),\n destructive: scope === 'read_write',\n confirmLabel: this.translation.translate(\n 'User.Subscriptions.APICredentials.ScopeConfirmLabel'\n )\n })\n .then(ok => {\n if (ok) {\n this.performScopeUpdate(scope);\n }\n });\n }\n\n private performScopeUpdate(scope: string) {\n this.updatingScope = true;\n this.userService\n .updateApiTokenScope(scope)\n .subscribe({\n next: () => {\n if (!this.user.api_keys) {\n this.user.api_keys = {};\n }\n this.user.api_keys.api_token_scope = scope;\n this.toast.success(\n this.translation.translate('User.Subscriptions.APICredentials.ScopeUpdated')\n );\n this.cdr.markForCheck();\n },\n error: () => {\n this.toast.error(\n this.translation.translate(\n 'User.Subscriptions.APICredentials.ScopeUpdateFailed'\n )\n );\n this.cdr.markForCheck();\n }\n })\n .add(() => {\n this.updatingScope = false;\n this.cdr.markForCheck();\n });\n }\n}\n","<div class=\"w-100 text-center\">\n @if (!isLoaded) {\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n }\n</div>\n<div class=\"row gx-3 mb-3\">\n <div class=\"col-md-4\">\n <section class=\"card p-4 h-100 d-flex flex-column\">\n <h2>{{ 'User.Profile.Avatar' | transloco }}</h2>\n <div class=\"text-center d-flex flex-column justify-content-center flex-grow-1 mt-1\">\n <div class=\"image-container\">\n <img [src]=\"image\"\n width=\"150\"\n height=\"150\"\n class=\"image rounded-circle\"\n alt=\"User Male\"\n (error)=\"handleImageError($event, 'assets/img/icons/male.png')\" />\n <div class=\"overlay\"\n (keydown.enter)=\"openModal(content)\"\n (click)=\"openModal(content)\">\n <div class=\"overlay-text\">{{ 'User.Profile.Change' | transloco }}</div>\n </div>\n </div>\n <h4 class=\"mt-2\">{{ user?.first_name }} {{ user?.last_name }}</h4>\n <a aria-label=\"Navigate to Target\"\n class=\"d-inline-block mb-2\"\n (click)=\"openModal(content)\">\n {{ 'User.Profile.EditAvatar' | transloco }}</a>\n </div>\n </section>\n </div>\n <div class=\"col-md-8\">\n <section id=\"user-profile\"\n class=\"card p-4 overflow-visible h-100\">\n <form [formGroup]=\"profileForm\"\n (ngSubmit)=\"onProfileFormSubmit()\">\n <h2>{{ 'User.Profile.UserProfile' | transloco }}</h2>\n <div class=\"row mt-3\">\n <div class=\"col-sm-12 col-md-6 col-lg-6\">\n <pw-input-container label=\"First Name\"\n name=\"first_name\"\n controlId=\"account-first_name\"\n errorMsg=\"Please enter first Name\">\n <input type=\"text\"\n id=\"account-first_name\"\n class=\"form-control\"\n formControlName=\"first_name\"\n autocomplete=\"given-name\" name=\"input_first_name_9\"\n aria-label=\"First Name\"/>\n </pw-input-container>\n <pw-input-container label=\"Preferred name\"\n name=\"preferred_name\"\n controlId=\"account-preferred_name\"\n errorMsg=\"Please enter preferred Name\">\n <input type=\"text\"\n id=\"account-preferred_name\"\n class=\"form-control\"\n formControlName=\"preferred_name\"\n autocomplete=\"username\" name=\"input_preferred_name_10\"\n aria-label=\"Preferred Name\"/>\n </pw-input-container>\n @if (countries$ | async; as countries) {\n <pw-input-container label=\"Country\"\n name=\"country\"\n controlId=\"account-country\"\n [useAriaLabelledbyOnly]=\"true\"\n errorMsg=\"Please select a country\">\n <p-select\n [attr.aria-labelledby]=\"'account-country-label'\"\n [options]=\"countries\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"country\"\n (onChange)=\"getRegion($event.value)\"\n placeholder=\"{{ 'User.Profile.SelectCountry' | transloco }}\">\n </p-select>\n </pw-input-container>\n }\n <pw-input-container label=\"Province\"\n name=\"province\"\n controlId=\"account-province\"\n errorMsg=\"Please enter province\">\n <input type=\"text\"\n id=\"account-province\"\n class=\"form-control\"\n formControlName=\"province\"\n autocomplete=\"postal-code\" name=\"input_province_11\"\n aria-label=\"Province\"/>\n </pw-input-container>\n <pw-input-container label=\"Website Url\"\n name=\"website_url\"\n controlId=\"account-website_url\"\n errorMsg=\"Please enter Website\">\n <input type=\"text\"\n id=\"account-website_url\"\n class=\"form-control\"\n formControlName=\"website_url\"\n autocomplete=\"url\" name=\"input_website_url_12\"\n aria-label=\"Website Url\"/>\n </pw-input-container>\n </div>\n <div class=\"col-sm-12 col-md-6 col-lg-6\">\n <pw-input-container label=\"Last Name\"\n name=\"last_name\"\n controlId=\"account-last_name\"\n errorMsg=\"Please enter last Name\">\n <input type=\"text\"\n id=\"account-last_name\"\n class=\"form-control\"\n formControlName=\"last_name\"\n autocomplete=\"family-name\" name=\"input_last_name_13\"\n aria-label=\"Last Name\"/>\n </pw-input-container>\n <pw-input-container label=\"Date of Birth\"\n name=\"dob\"\n controlId=\"account-dob\"\n errorMsg=\"Please enter date of birth\">\n <div class=\"input-group\">\n <input class=\"form-control\"\n id=\"account-dob\"\n name=\"dob\"\n placeholder=\"dd-mmm-yyyy\"\n formControlName=\"dob\"\n ngbDatepicker\n #d=\"ngbDatepicker\"\n [minDate]=\"{ day: 1, month: 1, year: 1950 }\"\n [maxDate]=\"{ day: 31, month: 12, year: 2018 }\"\n aria-label=\"dd-mmm-yyyy\" />\n <button class=\"btn btn-primary\"\n type=\"button\"\n id=\"account-dob-trigger\"\n aria-label=\"Open date picker for date of birth\"\n (click)=\"d.toggle()\">\n <i class=\"fa fa-calendar\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </pw-input-container>\n <pw-input-container label=\"State\"\n name=\"state\"\n controlId=\"account-state\"\n [useAriaLabelledbyOnly]=\"true\"\n errorMsg=\"Please select a state\">\n <p-select\n [attr.aria-labelledby]=\"'account-state-label'\"\n [options]=\"states\"\n [(ngModel)]=\"selectedState\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"state\"\n [placeholder]=\"'User.Profile.SelectState' | transloco\">\n </p-select>\n </pw-input-container>\n <pw-input-container label=\"Location\"\n name=\"location\"\n controlId=\"account-location\"\n [useAriaLabelledbyOnly]=\"true\">\n <input ngx-gp-autocomplete\n id=\"account-location\"\n name=\"location\"\n class=\"form-control\"\n [attr.aria-labelledby]=\"'account-location-label'\"\n #places=\"ngx-places\"\n formControlName=\"location\"\n (onAddressChange)=\"handleAddressChange($event)\"\n aria-label=\"Location\" />\n </pw-input-container>\n <pw-input-container label=\"Phone Number\"\n name=\"phone_number\"\n controlId=\"account-phone_number\"\n errorMsg=\"Please enter phone number\">\n <input type=\"text\"\n id=\"account-phone_number\"\n class=\"form-control\"\n formControlName=\"phone_number\"\n autocomplete=\"tel\" name=\"input_phone_number_16\"\n aria-label=\"Phone Number\"/>\n </pw-input-container>\n </div>\n <div class=\"col-12 text-end\">\n <div class=\"mb-3\">\n <button class=\"btn btn-raised btn-primary\" [buttonBusy]=\"profileBusyButton\">\n {{ 'Button.Save' | transloco }}\n </button>\n </div>\n </div>\n </div>\n </form>\n </section>\n </div>\n</div>\n<div class=\"row gx-3 mb-3\">\n <div class=\"col-md-6\">\n <section id=\"email-section\"\n class=\"card p-4 h-100\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>{{ 'User.Account.RegisteredEmail' | transloco }}</h2>\n <section id=\"email-form\">\n <form [formGroup]=\"emailForm\"\n (ngSubmit)=\"onEmailFormSubmit()\">\n <!-- Email Address -->\n <div class=\"mt-0\">\n <span id=\"account-primary-email-label\" class=\"me-3 pw-label-style\">{{ 'User.Account.PrimaryEmail' | transloco }}:\n </span>\n <strong>{{ validatedEmail }}</strong>\n <div class=\"mt-1\">\n @if (!toggleEmail) {\n <a class=\"btn btn-raised btn-outline-primary\"\n aria-label=\"Navigate to Target\"\n (click)=\"shouldUserChangeEmail()\">\n {{ 'User.Account.ChangeEmail' | transloco }}</a>\n }\n @if (toggleEmail) {\n <div class=\"row\">\n <div class=\"clearfix\"></div>\n <div class=\"col-12 mb-3\">\n @if (!passwordVerified) {\n <input type=\"password\"\n class=\"form-control\"\n id=\"account-email-current-password\"\n name=\"currentPassword\"\n #password\n placeholder=\"Current Password\"\n autocomplete=\"current-password\"\n (keyup)=\"checkValidity()\"\n aria-label=\"Current Password\" />\n }\n @if (passwordVerified) {\n <input type=\"text\"\n class=\"form-control\"\n id=\"account-new-email\"\n name=\"newEmail\"\n placeholder=\"New Email\"\n autocomplete=\"email\"\n formControlName=\"email\"\n aria-label=\"New Email\" />\n }\n </div>\n <div class=\"col-12\">\n @if (toggleEmail) {\n <a\n class=\"btn btn-raised btn-outline-default my-2 me-2\"\n aria-label=\"Navigate to Target\"\n (click)=\"onToggleEmail()\">{{ 'Button.Cancel' | transloco }}</a>\n }\n @if (!passwordVerified) {\n <button class=\"btn btn-raised btn-primary\"\n type=\"submit\"\n [buttonBusy]=\"validatePasswordBusyButton\"\n (click)=\"validatePassword()\"\n [disabled]=\"isCurrentPasswordValid\">\n {{ 'User.Account.Validate' | transloco }}\n </button>\n }\n @if (passwordVerified) {\n <button type=\"submit\"\n class=\"btn btn-raised btn-primary\"\n [buttonBusy]=\"emailBusyButton\"\n >\n {{\n 'User.Account.SendVerification' | transloco\n }}\n </button>\n }\n </div>\n </div>\n }\n </div>\n </div>\n <section id=\"slug\"\n class=\"mb-2 mt-3\">\n <div>\n <span class=\"me-3 pw-label-style\" id=\"account-nickname-label\">{{ 'User.Account.NickName' | transloco }}:</span>\n <span class=\"tooltip-wrap me-3\" [pTooltip]=\"'User.Account.HandleTooltip' | transloco\" [appendTo]=\"'body'\" tooltipPosition=\"top\"><i class=\"far fa-info-circle text-muted\"></i></span>\n <strong>{{ slug }}</strong>\n <div class=\"mt-1\">\n @if (!toggleNickName) {\n <a class=\"btn btn-raised btn-outline-primary me-2\"\n aria-label=\"Navigate to Target\"\n (click)=\"toggleNickName = true\">\n {{ 'User.Account.ChangeNickname' | transloco }}</a>\n }\n @if (toggleNickName) {\n <div class=\"mb-3\">\n <input type=\"text\"\n id=\"account-nickname\"\n name=\"nickname\"\n class=\"form-control slug-input\"\n aria-labelledby=\"account-nickname-label\"\n [(ngModel)]=\"slug\"\n [ngModelOptions]=\"{ standalone: true }\"\n aria-label=\"Nickname\" />\n </div>\n <div>\n <button type=\"button\"\n class=\"btn btn-raised btn-outline-default\"\n (click)=\"toggleNickName = false\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"button\"\n class=\"btn btn-raised btn-primary ms-2\"\n [buttonBusy]=\"slugBusyButton\"\n [disabled]=\"slug?.length < 2\"\n (click)=\"onUpdateSlug()\">\n {{ 'User.Account.UpdateNickname' | transloco }}\n </button>\n </div>\n }\n </div>\n </div>\n </section>\n </form>\n </section>\n </div>\n </div>\n </section>\n </div>\n <div class=\"col-md-6\">\n <section id=\"password-change\"\n class=\"card p-4 h-100\">\n <form [formGroup]=\"passwordForm\"\n (ngSubmit)=\"onPasswordFormSubmit()\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>{{ 'User.Account.ChangePassword' | transloco }}</h2>\n </div>\n @if (!user?.has_password) {\n <div class=\"text-danger mx-3 my-2\">\n <div>\n You don't have a password set, click on\n <em>{{ 'User.Account.ChangePassword' | transloco }}</em>.\n </div>\n <div>{{ 'User.Profile.PictureMessage' | transloco }}</div>\n </div>\n }\n @if (user?.has_password) {\n <div class=\"col-12\"\n >\n @if (togglePassword) {\n <div class=\"mb-3\">\n <label for=\"account-current-password\">{{ 'User.Account.CurrentPassword' | transloco }}</label>\n <input type=\"password\"\n id=\"account-current-password\"\n class=\"form-control\"\n formControlName=\"currentPassword\"\n autocomplete=\"current-password\" name=\"input_currentPassword_4\"\n aria-label=\"Current Password\"/>\n @if (\n !passwordForm.get('currentPassword').valid &&\n (passwordForm.get('currentPassword').dirty ||\n passwordForm.get('currentPassword').touched)\n ) {\n <small class=\"form-text text-muted danger\"\n >\n {{ 'User.Account.Required' | transloco }}\n </small>\n }\n </div>\n <div class=\"mb-3\">\n <label for=\"account-new-password\">{{ 'User.Account.NewPassword' | transloco }}</label>\n <input type=\"password\"\n id=\"account-new-password\"\n class=\"form-control\"\n formControlName=\"newPassword\"\n autocomplete=\"new-password\" name=\"input_newPassword_5\"\n aria-label=\"New Password\"/>\n @if (\n !passwordForm.get('newPassword').valid &&\n (passwordForm.get('newPassword').dirty ||\n passwordForm.get('newPassword').touched)\n ) {\n <small class=\"form-text text-muted danger\"\n >{{ 'User.Account.Validation.StrongPassword' | transloco }}\n </small>\n }\n </div>\n <div class=\"mb-3\">\n <label for=\"account-confirm-password\">{{\n 'User.Account.ConfirmPassword' | transloco\n }}</label>\n <input type=\"password\"\n id=\"account-confirm-password\"\n class=\"form-control\"\n formControlName=\"confirmPassword\"\n autocomplete=\"new-password\" name=\"input_confirmPassword_6\"\n aria-label=\"Confirm Password\"/>\n @if (\n passwordForm.get('confirmPassword').touched &&\n passwordForm.get('confirmPassword').errors\n ?.MatchPassword\n ) {\n <div class=\"text-danger\"\n >\n {{ 'User.Account.Validation.PasswordsMatch' | transloco }}\n </div>\n }\n </div>\n <div class=\"mb-3\">\n @if (togglePassword) {\n <a class=\"btn btn-raised btn-outline-default\"\n aria-label=\"Navigate to Target\"\n data-bs-target=\"\"\n (click)=\"onTogglePassword()\">\n {{ 'Button.Cancel' | transloco }}</a>\n }\n <button class=\"btn btn-raised btn-primary ms-2\"\n [buttonBusy]=\"passwordBusyButton\"\n [disabled]=\"!passwordForm.valid\">\n {{ 'User.Account.UpdatePassword' | transloco }}\n </button>\n </div>\n }\n <div>\n @if (!togglePassword) {\n <a class=\"btn btn-raised btn-outline-primary\"\n aria-label=\"Navigate to Target\"\n data-bs-target=\"\"\n (click)=\"togglePassword = !togglePassword\">\n {{ 'User.Account.ChangePassword' | transloco }}</a>\n }\n </div>\n </div>\n }\n @if (!user?.has_password) {\n <div class=\"col-12\"\n >\n <a class=\"btn btn-raised btn-primary me-2\"\n aria-label=\"Navigate to Target\"\n data-bs-target=\"\"\n (click)=\"sendMailToResetPassword()\">\n {{ 'User.Account.ChangePassword' | transloco }}</a>\n </div>\n }\n </div>\n </form>\n </section>\n </div>\n @if (user?.api_keys?.api_hits_max > 0) {\n <div class=\"col-12 mt-3\">\n <section id=\"api-credentials\"\n class=\"card p-4 h-auto\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>{{ 'User.Subscriptions.APICredentials.Title' | transloco }}</h2>\n <p>\n {{ 'User.Subscriptions.APICredentials.Description' | transloco: { company: mcpCompanyName } }}\n </p>\n <p class=\"text-muted small mb-2\">\n <i class=\"fas fa-link me-1\"></i>\n {{ 'User.Subscriptions.APICredentials.McpEndpointNote' | transloco: { url: mcpEndpointUrl, company: mcpCompanyName } }}\n </p>\n <!-- pb (not mb): .card .mb-3:last-child is margin-reset in this component's scss -->\n <p class=\"text-muted small mb-0 pb-3\">\n <i class=\"fas fa-info-circle me-1\"></i>\n {{ 'User.Subscriptions.APICredentials.SubscriptionClientIdNote' | transloco }}\n </p>\n </div>\n <div class=\"col-12 col-md-6\">\n <div class=\"form-group\">\n <label class=\"form-label\" for=\"account-api-token\">{{ 'User.Account.APIUserToken' | transloco }}</label>\n <div class=\"input-group\">\n <input type=\"text\"\n id=\"account-api-token\"\n name=\"api_token\"\n class=\"form-control\"\n [value]=\"showApiToken ? user?.api_keys?.api_user_token || ('User.Subscriptions.APICredentials.NoTokenAvailable' | transloco) : '*************************'\"\n readonly\n aria-label=\"Api Token\" />\n <button type=\"button\"\n class=\"btn btn-outline-secondary\"\n (click)=\"toggleApiTokenVisibility()\">\n {{ showApiToken ? ('User.Subscriptions.APICredentials.Hide' | transloco) : ('User.Subscriptions.APICredentials.View' | transloco) }}\n </button>\n </div>\n </div>\n </div>\n <div class=\"col-12 col-md-6\">\n <div class=\"form-group\">\n <label class=\"form-label\" for=\"account-api-client-id\">{{ 'User.Account.APIUserId' | transloco }}</label>\n <div class=\"input-group\">\n <input type=\"text\"\n id=\"account-api-client-id\"\n name=\"api_client_id\"\n class=\"form-control\"\n [value]=\"showApiClientId ? user?.api_keys?.api_user_id || ('User.Subscriptions.APICredentials.NoClientIdAvailable' | transloco) : '*************************'\"\n readonly\n aria-label=\"Api Client Id\" />\n <button type=\"button\"\n class=\"btn btn-outline-secondary\"\n (click)=\"toggleApiClientIdVisibility()\">\n {{ showApiClientId ? ('User.Subscriptions.APICredentials.Hide' | transloco) : ('User.Subscriptions.APICredentials.View' | transloco) }}\n </button>\n </div>\n </div>\n </div>\n <div class=\"col-12 mt-3\">\n <div class=\"d-flex align-items-center gap-3\">\n <button type=\"button\"\n class=\"btn btn-outline-secondary\"\n (click)=\"refreshApiTokens()\"\n [disabled]=\"refreshingTokens\">\n <i class=\"fas fa-sync-alt me-2\" [class.fa-spin]=\"refreshingTokens\"></i>\n {{ refreshingTokens ? ('User.Subscriptions.APICredentials.Refreshing' | transloco) : ('User.Subscriptions.APICredentials.RefreshTokens' | transloco) }}\n </button>\n <div class=\"d-flex align-items-center gap-2\">\n @if (user?.api_keys?.api_hits !== null) {\n <span class=\"text-muted\">{{ 'User.Subscriptions.APICredentials.ApiHits' | transloco }}:</span>\n <span class=\"fw-bold\">{{ user.api_keys.api_hits | number }}</span>\n }\n @if (user?.api_keys?.api_hits_max !== null) {\n <span class=\"text-muted\">{{ 'User.Subscriptions.APICredentials.ApiHitsMax' | transloco }}:</span>\n <span class=\"fw-bold\">{{ user.api_keys.api_hits_max | number }}</span>\n }\n <!-- Show utilization percentage when both values exist -->\n @if (user?.api_keys?.api_hits !== null && user?.api_keys?.api_hits_max !== null && user?.api_keys?.api_hits_max > 0) {\n <span class=\"text-muted ms-2\">(</span>\n <span class=\"fw-bold\" [ngClass]=\"{\n 'text-success-muted': (user.api_keys.api_hits / user.api_keys.api_hits_max) <= 0.8,\n 'text-warning': (user.api_keys.api_hits / user.api_keys.api_hits_max) > 0.8 && (user.api_keys.api_hits / user.api_keys.api_hits_max) <= 0.9,\n 'text-danger': (user.api_keys.api_hits / user.api_keys.api_hits_max) > 0.9\n }\">\n {{ (user.api_keys.api_hits / user.api_keys.api_hits_max * 100) | number:'1.0-0' }}% consumed\n </span>\n <span class=\"text-muted\">)</span>\n }\n </div>\n </div>\n </div>\n <div class=\"col-12 mt-3\">\n <label class=\"form-label\">{{ 'User.Subscriptions.APICredentials.ScopeLabel' | transloco }}</label>\n <div class=\"d-flex align-items-center flex-wrap gap-2\">\n <div class=\"btn-group\" role=\"group\"\n [attr.aria-label]=\"'User.Subscriptions.APICredentials.ScopeLabel' | transloco\">\n <button type=\"button\" class=\"btn\"\n [ngClass]=\"currentApiTokenScope === 'read_only' ? 'btn-primary' : 'btn-outline-secondary'\"\n [disabled]=\"updatingScope\"\n (click)=\"changeApiTokenScope('read_only')\">\n {{ 'User.Subscriptions.APICredentials.ScopeReadOnly' | transloco }}\n </button>\n <button type=\"button\" class=\"btn\"\n [ngClass]=\"currentApiTokenScope === 'read_write' ? 'btn-primary' : 'btn-outline-secondary'\"\n [disabled]=\"updatingScope\"\n (click)=\"changeApiTokenScope('read_write')\">\n {{ 'User.Subscriptions.APICredentials.ScopeReadWrite' | transloco }}\n </button>\n </div>\n <span class=\"text-muted small\">{{ 'User.Subscriptions.APICredentials.ScopeHint' | transloco }}</span>\n </div>\n </div>\n </div>\n </section>\n </div>\n }\n <div class=\"col-12 mt-3\">\n <section id=\"registered-apps\"\n class=\"card p-4 h-auto\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>{{ 'User.Subscriptions.RegisteredApps.Title' | transloco }}</h2>\n <p>\n {{ 'User.Subscriptions.RegisteredApps.Description' | transloco }}\n </p>\n </div>\n <div class=\"col-12\">\n <pw-loader [isVisible]=\"loadingConnections\"></pw-loader>\n @if (!loadingConnections) {\n @if (connections.length === 0) {\n <p class=\"text-muted\">{{ 'User.Subscriptions.RegisteredApps.NoApps' | transloco }}</p>\n }\n @for (conn of connections; track conn.id) {\n <div class=\"d-flex align-items-center justify-content-between py-2 border-bottom\">\n <div>\n <span class=\"fw-bold me-3\">{{ conn.client_name }}</span>\n <span class=\"text-muted small\">\n {{ 'User.Subscriptions.RegisteredApps.ConnectedOn' | transloco }}\n {{ conn.created_at | date:'mediumDate' }}\n </span>\n <span class=\"text-muted small d-block\">\n {{ 'User.Subscriptions.RegisteredApps.LastUsed' | transloco }}\n @if (conn.last_used_at) {\n {{ conn.last_used_at | date:'medium' }}\n } @else {\n {{ 'User.Subscriptions.RegisteredApps.NeverUsed' | transloco }}\n }\n </span>\n </div>\n <button type=\"button\"\n class=\"btn btn-outline-danger btn-sm\"\n (click)=\"deregisterConnection(conn.id)\">\n {{ 'User.Subscriptions.RegisteredApps.Deregister' | transloco }}\n </button>\n </div>\n }\n }\n </div>\n </div>\n </section>\n </div>\n</div>\n<ng-template #content\n let-modal>\n <div class=\"card m-0\">\n <div class=\"card-content\">\n <div class=\"card-title\">\n <h3 class=\"modal-title\">{{ 'User.Profile.ProfilePicture' | transloco }}</h3>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n </button>\n </div>\n <div class=\"card-header\">\n <small> {{ 'User.Profile.PictureMessage' | transloco }}</small>\n <pw-image-cropper #profile\n aspectRatio=\"auto\"\n (imageSelectionEvent)=\"onImageSelection($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n </div>\n </div>\n</ng-template>\n","import { ChangeDetectorRef, Component, Injector, OnDestroy, OnInit } from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { ProductService } from '@posiwise/common-services';\nimport { Product, PRODUCT_CATEGORY, Subscription, User } from '@posiwise/common-utilities';\n\nimport cloneDeep from 'lodash/cloneDeep';\nimport sortBy from 'lodash/sortBy';\n\n@Component({\n selector: 'pw-add-subscription',\n templateUrl: './add-subscription.component.html',\n styleUrls: ['./add-subscription.component.scss'],\n\n standalone: false\n})\nexport class AddSubscriptionComponent extends AppBaseComponent implements OnInit, OnDestroy {\n private readonly singleProducts = [];\n\n private readonly enterpriseProducts = [];\n\n form: UntypedFormGroup;\n\n busy: boolean;\n isLoaded: boolean;\n selectedProduct: boolean;\n isPurchaseAttempted: boolean;\n userLoggedIn: boolean;\n\n availableProducts: Product[] = [];\n products: Product[];\n\n user: User;\n\n unitError: string;\n\n category = PRODUCT_CATEGORY;\n\n units = 1;\n\n subscribedPermissionKeys = [];\n\n currentSubscription: Subscription;\n\n subscriptionId: number;\n\n constructor(\n private readonly productService: ProductService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n }\n\n ngOnInit() {\n this.subscriptionId = Number(this.route.snapshot.queryParamMap.get('subscription_id'));\n this.getProducts();\n }\n\n private getProducts() {\n // Gets All the products\n this.productService\n .getProductList({}, this.subscriptionId, { only_relevant: true })\n .subscribe((response: Subscription) => {\n this.products = response.products || [];\n if (this.products?.length) {\n this.products = this.products.filter(x => x.active);\n }\n\n this.isLoaded = true;\n this.userStore().subscribe(user => {\n this.user = user;\n if (this.user) {\n const subs: Subscription[] = cloneDeep(this.user.subscriptions);\n subs.forEach(subscription => {\n subscription.products.forEach(product => {\n const prod = this.products.find(x => x.id === product.id);\n if (prod) {\n prod['is_subscribed'] = true;\n prod['purchased_units'] = product?.purchased_units;\n }\n });\n });\n\n this.subscribedPermissionKeys = Array.from(\n new Set(\n this.user.subscriptions\n .flatMap(x => x.products)\n .map(product => product.permission_key)\n )\n );\n\n // show category only if we have products\n const prodPermissionKeys = this.products.map(p => p.permission_key);\n this.subscribedPermissionKeys = this.subscribedPermissionKeys.filter(x =>\n prodPermissionKeys.includes(x)\n );\n\n // Filtering the product with the existing permission_key\n this.availableProducts = sortBy(\n this.getSingleCategoryProducts(),\n 'is_subscribed'\n );\n }\n this.cdr.markForCheck();\n });\n this.cdr.markForCheck();\n });\n }\n\n private getSingleCategoryProducts(category = this.subscribedPermissionKeys[0]) {\n return this.products.filter(x => category === x.permission_key);\n }\n\n onChangeCategory(category) {\n this.availableProducts = this.getSingleCategoryProducts(category);\n this.availableProducts = sortBy(this.availableProducts, 'is_subscribed');\n }\n\n onSelection(product) {\n this.router.navigate([\n `account/subscriptions/upgrade/${this.subscriptionId}/${product.id}`\n ]);\n }\n\n trackByProduct(_index: number, item: Product) {\n return item.id;\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n }\n}\n","@if (isLoaded && !selectedProduct) {\n <div\n class=\"mt-4\">\n <div class=\"d-flex align-items-start category-tabs-row\">\n <a aria-label=\"Navigate to Target\"\n [routerLink]=\"['/account/subscriptions']\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i>\n </a>\n <div class=\"d-flex category-tabs\">\n @for (item of subscribedPermissionKeys; track item; let i = $index) {\n <div class=\"toggle\"\n >\n <input type=\"radio\"\n name=\"sizeBy\"\n value=\"option{{ i + 1 }}\"\n id=\"option{{ i + 1 }}\"\n (change)=\"onChangeCategory(item)\"\n [checked]=\"i === 0\"\n aria-label=\"Size By\" />\n <label for=\"option{{ i + 1 }}\">{{ item }}</label>\n </div>\n }\n </div>\n </div>\n <ul class=\"row animated fadeIn d-flex\">\n @for (product of availableProducts; track trackByProduct($index, product)) {\n <li\n class=\"col-sm-12 col-md-6 col-xl-4 my-3 mt-sm-2\">\n <div class=\"card\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <h4 class=\"text-bold-500 primary mb-3\">{{ product.name }}</h4>\n @if (product.price_per_unit) {\n @if (product?.purchased_units) {\n <h5\n class=\"my-3 branding-color-1\">\n Currently {{ product.currency | currencySymbol\n }}{{\n (\n (product.purchased_units * product.price_per_unit) /\n 100\n ) | number:'1.2-2'\n }}&nbsp;/&nbsp;{{ product.billing_frequency }}\n </h5>\n }\n <h5 class=\"my-3\">\n Min\n {{product.min_units &gt; 1 ? (product.min_units + ' Seats'): (product.min_units + ' Seat')}}\n - {{ product.currency | currencySymbol\n }}{{\n ((product.min_units * product.price_per_unit) / 100) | number:'1.2-2'\n }}&nbsp;/&nbsp;{{ product.billing_frequency }}\n </h5>\n <h5 class=\"d-inline-block text-bold-600 mb-2\">\n {{ product.currency | currencySymbol\n }}{{ (product.price_per_unit / 100) | number:'1.2-2' }}&nbsp;/&nbsp;{{\n product.billing_frequency\n }}&nbsp;/&nbsp;seat\n </h5>\n } @else {\n <div class=\"d-inline-block text-bold-600 mb-2\">Free</div>\n }\n <p class=\"mb-2\"\n [innerHTML]=\"product?.description\"></p>\n </div>\n <div class=\"card-footer px-3\">\n @if (\n !product.is_subscribed &&\n !product.trial_subscription &&\n product.stripe_plan_id\n ) {\n <a aria-label=\"Navigate to Target\"\n (click)=\"onSelection(product)\"\n class=\"card-btn btn btn-raised me-1 btn-primary btn-sm\">\n {{ 'User.Subscriptions.Subscribe' | transloco }}\n </a>\n }\n @if (\n !product.is_subscribed &&\n product.trial_subscription &&\n product.stripe_plan_id\n ) {\n <div class=\"mt-3\"\n >\n <a aria-label=\"Navigate to Target\"\n (click)=\"onSelection(product)\"\n class=\"card-btn btn btn-raised me-1 btn-primary btn-sm\">\n {{ 'Button.Upgrade' | transloco }}\n </a>\n <span class=\"badge bg-secondary position-absolute trial-badge\">{{ 'User.Subscriptions.Trial' | transloco }}\n </span>\n </div>\n }\n @if (\n product.is_subscribed &&\n !product.trial_subscription &&\n !product.is_deleted\n ) {\n <span\n class=\"card-btn badge bg-default text-white\">\n {{ 'User.Subscriptions.Subscribed' | transloco }}\n </span>\n }\n @if (\n product.is_subscribed &&\n product.trial_subscription &&\n product.price_per_unit === 0 &&\n !product.is_deleted &&\n !product.stripe_plan_id\n ) {\n <span\n class=\"card-btn badge bg-default text-white\">\n Free\n </span>\n }\n @if (product.is_deleted) {\n <span\n class=\"card-btn badge bg-default text-white\">\n {{ 'User.Subscriptions.UnsubscribedButActive' | transloco }}\n </span>\n }\n </div>\n </div>\n </div>\n </li>\n }\n </ul>\n <div class=\"row\">\n <div class=\"col-12\">\n @if (availableProducts && availableProducts.length === 0) {\n <pw-no-data [withImage]=\"true\" message=\"No products available under this category.\"\n >\n </pw-no-data>\n }\n </div>\n </div>\n </div>\n}\n","/**\n * @summary Shows the saved credit card details of the user\n * @author anikets43\n *\n * Created at : 2020-02-08 16:56:18\n * Last modified : 2020-02-08 17:06:29\n */\n\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\n\n@Component({\n selector: 'pw-saved-card-details',\n templateUrl: './saved-card-details.component.html',\n styleUrls: ['./saved-card-details.component.scss'],\n\n standalone: false\n})\nexport class SavedCardDetailsComponent {\n /**\n * Credit Card details like brand, exp_month, exp_year, card_number\n */\n @Input() data: {\n brand?: string;\n exp_month?: string;\n exp_year?: string;\n card_number?: string;\n };\n\n /**\n * boolean: change payment option\n */\n @Input() isChangePayment: boolean;\n\n @Input() showNewCard: boolean;\n\n /**\n * Emitter: on payment change request\n */\n @Output() changeEvent: EventEmitter<boolean> = new EventEmitter();\n\n OnPaymentChange(value) {\n this.changeEvent.emit(value);\n }\n}\n","<div class=\"row\">\n @if (!showNewCard) {\n <div class=\"col-12\"\n >\n <h4 class=\"title\">Saved Card</h4>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">Type:</div>\n <div class=\"summary-right\">{{ data?.brand }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">Expiry:</div>\n <div class=\"summary-right\">{{ data.exp_month }} / {{ data.exp_year }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">Card Number:</div>\n <div class=\"summary-right\">{{ data?.card_number }}</div>\n </div>\n </div>\n }\n\n @if (!showNewCard) {\n <div class=\"col-12 mt-3\"\n >\n <button type=\"button\"\n class=\"btn btn-outline-primary btn-sm\"\n aria-label=\"Change Payment Option\"\n (click)=\"OnPaymentChange(true)\">\n Change Payment Option\n </button>\n </div>\n }\n</div>\n","import { Directive, HostListener, Optional, Self } from '@angular/core';\nimport { NgControl } from '@angular/forms';\n\n@Directive({\n selector: 'input[pwClearMaskedOnFocus]',\n standalone: false\n})\nexport class ClearMaskedOnFocusDirective {\n constructor(@Optional() @Self() private readonly control: NgControl) {}\n\n @HostListener('focus', ['$event'])\n onFocus(event: FocusEvent): void {\n const input = event.target as HTMLInputElement;\n const value = input?.value ?? '';\n if (/\\*{3,}/.test(value)) {\n this.control?.control?.setValue('');\n input.value = '';\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nconst ACRONYMS = new Set([\n 'id',\n 'url',\n 'api',\n 'aws',\n 'smtp',\n 'ssl',\n 'tls',\n 'iam',\n 'sso',\n 'sdk',\n 'jwt',\n 'oauth'\n]);\n\n@Pipe({ name: 'subscriptionNameById', standalone: false })\nexport class SubscriptionNameByIdPipe implements PipeTransform {\n transform(\n subs:\n | { id: number | string; organisation?: string; organization?: string; name?: string }[]\n | null\n | undefined,\n id: number | string | null | undefined\n ): string {\n if (!subs || id == null) return '';\n const found = subs.find(s => String(s.id) === String(id));\n return (found?.organisation || found?.organization || found?.name || '') as string;\n }\n}\n\n@Pipe({ name: 'credentialAvatarHue', standalone: false })\nexport class CredentialAvatarHuePipe implements PipeTransform {\n transform(value: string | null | undefined): number {\n if (!value) return 215;\n let hash = 0;\n for (let i = 0; i < value.length; i++) {\n hash = (hash * 31 + value.charCodeAt(i)) | 0;\n }\n return Math.abs(hash) % 360;\n }\n}\n\n@Pipe({ name: 'humanizeCredentialName', standalone: false })\nexport class HumanizeCredentialNamePipe implements PipeTransform {\n transform(value: string | null | undefined): string {\n if (!value) return '';\n return value\n .replace(/[_-]+/g, ' ')\n .split(' ')\n .filter(Boolean)\n .map(word =>\n ACRONYMS.has(word.toLowerCase())\n ? word.toUpperCase()\n : word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()\n )\n .join(' ');\n }\n}\n","import {\n ChangeDetectorRef,\n Component,\n Injector,\n OnDestroy,\n OnInit,\n ViewChild\n} from '@angular/core';\nimport { UntypedFormArray, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { SubscriptionService } from '@posiwise/common-services';\nimport { Subscription } from '@posiwise/common-utilities';\nimport { PasswordValidationComponent } from '@posiwise/shared-components';\n\nimport { forkJoin, from, Observable } from 'rxjs';\nimport { distinct } from 'rxjs/operators';\n\nimport { CredentialData } from '../../../shared/interface/user-module.interface';\n\n@Component({\n selector: 'pw-subscription-credential',\n templateUrl: './subscription-credential.component.html',\n styleUrls: ['./subscription-credential.component.scss'],\n\n standalone: false\n})\nexport class SubscriptionCredentialComponent extends AppBaseComponent implements OnInit, OnDestroy {\n private credentialToEdit;\n\n @ViewChild('passwordValidationModalForRevealCredential', { static: false })\n passwordValidationModalForRevealCredential: PasswordValidationComponent;\n\n @ViewChild('passwordValidationModalForEditCredential', { static: false })\n passwordValidationModalForEditCredential: PasswordValidationComponent;\n\n @ViewChild('passwordValidationModalForAddCredential', { static: false })\n passwordValidationModalForAddCredential: PasswordValidationComponent;\n\n form: UntypedFormGroup;\n\n data = [];\n\n subscriptionId: number;\n totalRecords: number;\n\n allSubscriptionCredentials: CredentialData[];\n availableCredentials: CredentialData[] = [];\n credentialsSelect: CredentialData[];\n updatedCredential: CredentialData;\n uniqueCredential = [];\n\n isEdit = false;\n submitted = false;\n buttonBusy = false;\n isLoaded = false;\n\n credentials = [];\n\n showForm = false;\n\n credentialSaved: string;\n credentialName: string;\n\n credentialToReveal;\n\n constructor(\n private readonly fb: UntypedFormBuilder,\n private readonly subscriptionService: SubscriptionService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n this.form = this.fb.group({\n credentials: this.fb.array([])\n });\n }\n\n ngOnInit() {\n this.route.params.subscribe(params => {\n this.subscriptionId = params['subscriptionId'];\n if (this.subscriptionId) {\n this.getAllCredentials();\n }\n this.cdr.markForCheck();\n });\n }\n\n get credentialsGroup() {\n return this.form.get('credentials') as UntypedFormArray;\n }\n\n /** Function to get all credentials */\n private getAllCredentials() {\n this.allSubscriptionCredentials = [];\n this.subscriptionService\n .getAllSubscriptionCredentials(this.subscriptionId)\n .subscribe(response => {\n this.allSubscriptionCredentials = response.subscription_credentials;\n this.totalRecords = response.object_count;\n this.getAllAvailableCredentials();\n this.cdr.markForCheck();\n })\n .add(() => {\n this.isLoaded = true;\n this.cdr.markForCheck();\n });\n }\n\n /** Function to get available Credentials */\n private getAllAvailableCredentials() {\n this.credentials = [];\n this.uniqueCredential = [];\n this.subscriptionService.getAllCredentials().subscribe(response => {\n this.availableCredentials = response.credentials;\n from(this.availableCredentials)\n .pipe(distinct(c => c.name))\n .subscribe(res => {\n this.uniqueCredential.push(res);\n });\n this.uniqueCredential.forEach(credential => {\n const subscriptionCredentialGroup = { credential_name: '', credentials: [] };\n this.allSubscriptionCredentials.forEach(subscriptionCredential => {\n if (credential.name === subscriptionCredential.name) {\n subscriptionCredentialGroup['credentials'].push(subscriptionCredential);\n }\n });\n if (subscriptionCredentialGroup['credentials'].length > 0) {\n subscriptionCredentialGroup['credential_name'] = credential.name;\n this.credentials.push(subscriptionCredentialGroup);\n }\n });\n this.cdr.markForCheck();\n });\n }\n\n /** Function to get credential on select */\n selectedOption(event) {\n this.credentialsGroup.clear();\n const credentialName = this.isEdit ? event : event.value;\n this.credentialsSelect = this.availableCredentials.filter(x => x.name === credentialName);\n this.credentialsSelect.forEach(adminCredential => {\n const subscriptionCredential = this.allSubscriptionCredentials.find(\n credential => credential?.credential_id === adminCredential?.id\n );\n adminCredential.value = subscriptionCredential?.value;\n adminCredential.subscription_credential_id = subscriptionCredential?.id;\n adminCredential.credential_id = subscriptionCredential?.credential_id;\n this.credentialsGroup.push(\n this.fb.group({\n subscription_id: [0, [Validators.required]],\n credential_id: [adminCredential?.id],\n field: [adminCredential?.field],\n description: [adminCredential?.description],\n value: [\n adminCredential?.value,\n adminCredential?.is_required ? [Validators.required] : []\n ],\n id: [subscriptionCredential?.id]\n })\n );\n });\n }\n\n /** Function to post credentials */\n saveCredentials() {\n this.submitted = true;\n this.buttonBusy = true;\n const subscription$: Observable<Subscription>[] = [];\n const isValid = this.form.value.credentials.every(\n (_x, i) => this.credentialsGroup.controls[i].valid === true\n );\n if (isValid) {\n this.form.value.credentials.forEach(credential => {\n if (credential?.value && !String(credential.value).startsWith('***')) {\n const data = {\n subscription_id: this.subscriptionId,\n credential_id: credential.credential_id,\n value: credential.value\n };\n const sub$ = credential?.id\n ? this.subscriptionService.editSubscriptionCredential(credential.id, data)\n : this.subscriptionService.postSubscriptionCredential(data);\n\n subscription$.push(sub$);\n }\n });\n\n forkJoin(subscription$)\n .subscribe(response => {\n if (response?.length) {\n this.toast.success(\n this.translation.translate(\n 'User.Subscriptions.SubscriptionCredentials.UpdateMessage'\n )\n );\n } else {\n this.toast.error(`Something went wrong while saving credentials`);\n }\n this.cdr.markForCheck();\n })\n .add(() => {\n this.submitted = false;\n this.buttonBusy = false;\n this.cdr.markForCheck();\n });\n } else {\n this.buttonBusy = false;\n }\n }\n\n revealCredentials(credential) {\n this.credentialToReveal = credential.credential_name;\n this.passwordValidationModalForRevealCredential.open();\n }\n\n hideCredentials() {\n this.credentialName = '';\n }\n\n showCredentials() {\n this.credentialName = this.credentialToReveal;\n }\n\n /** Function to get form controls */\n get f() {\n return this.form.controls;\n }\n\n onCancel() {\n this.getAllCredentials();\n this.submitted = false;\n this.form.reset();\n this.showForm = false;\n this.isEdit = false;\n this.credentialsSelect = [];\n this.data = [];\n this.credentialSaved = '';\n }\n\n // password popup for add credential\n openCredentialsForAdd() {\n this.passwordValidationModalForAddCredential.open();\n }\n\n // password popup for edit credential\n openCredentialsForEdit(credential) {\n this.credentialToEdit = credential;\n this.passwordValidationModalForEditCredential.open();\n }\n\n editCredentials() {\n this.showForm = true;\n this.isEdit = true;\n this.selectedOption(this.credentialToEdit);\n }\n\n showEditForm() {\n this.data = [];\n this.isEdit = false;\n this.showForm = true;\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n }\n}\n","@let subName = ((userService.getUserState() | async)?.currentUser?.subscriptions | subscriptionNameById: subscriptionId);\n\n@if (showForm) {\n <div class=\"row\">\n <div class=\"col-12 d-flex\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"onCancel()\"\n (keydown.enter)=\"onCancel()\"\n class=\"previous\">\n <i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i>\n </a>\n <h3 class=\"m-subheader__title m-subheader__title--separator\">\n <span>\n @if (subName) {\n {{ (isEdit ? 'User.Subscriptions.SubscriptionCredentials.EditTitle' : 'User.Subscriptions.SubscriptionCredentials.CreateTitle') | transloco: { name: subName } }}\n } @else {\n {{ (isEdit ? 'User.Subscriptions.SubscriptionCredentials.EditTitleFallback' : 'User.Subscriptions.SubscriptionCredentials.CreateTitleFallback') | transloco }}\n }\n </span>\n </h3>\n </div>\n </div>\n <p class=\"credential-page-subtitle text-muted mb-4\">\n @if (subName) {\n {{ 'User.Subscriptions.SubscriptionCredentials.FormSubtitle' | transloco: { name: subName } }}\n } @else {\n {{ 'User.Subscriptions.SubscriptionCredentials.FormSubtitleFallback' | transloco }}\n }\n </p>\n\n <section class=\"credential-form-shell\">\n @if (credentialsSelect?.length) {\n <div class=\"credential-form-band\"\n [style.--avatar-hue]=\"credentialsSelect[0].name | credentialAvatarHue\">\n <span class=\"credential-avatar\" aria-hidden=\"true\"\n [style.--avatar-hue]=\"credentialsSelect[0].name | credentialAvatarHue\">\n {{ (credentialsSelect[0].name | humanizeCredentialName).charAt(0) }}\n </span>\n <span class=\"credential-form-band-name\">\n {{ credentialsSelect[0].name | humanizeCredentialName }}\n </span>\n </div>\n }\n\n <form [formGroup]=\"form\" novalidate (ngSubmit)=\"saveCredentials()\" class=\"credential-form\">\n @if (!isEdit) {\n <div class=\"credential-form-row\">\n <pw-input-container\n [label]=\"'User.Subscriptions.SubscriptionCredentials.CredentialLabel' | transloco\"\n name=\"credentialType\">\n <p-select\n [options]=\"uniqueCredential\"\n [placeholder]=\"'User.Subscriptions.SubscriptionCredentials.CredentialPlaceholder' | transloco\"\n optionLabel=\"name\" optionValue=\"name\" appendTo=\"body\"\n (onChange)=\"selectedOption($event)\">\n </p-select>\n </pw-input-container>\n </div>\n }\n\n @if (credentialsSelect?.length) {\n <div formArrayName=\"credentials\" class=\"credential-form-fields\">\n @for (credential of credentialsGroup.controls; track credential; let i = $index) {\n <div [formGroupName]=\"i\" class=\"credential-form-row\">\n <pw-input-container\n [label]=\"credential.get('field').value | humanizeCredentialName\"\n [showTooltip]=\"!!credential.get('description').value\"\n [tooltipText]=\"credential.get('description').value\"\n tooltipPosition=\"top\"\n name=\"value\"\n [errorMsg]=\"'User.Subscriptions.SubscriptionCredentials.ValueError' | transloco\">\n <input type=\"text\" class=\"form-control\" formControlName=\"value\" pwClearMaskedOnFocus\n [ngClass]=\"{ 'is-invalid': submitted && credential.get('value').invalid }\"\n [id]=\"'credential-value-' + i\" [name]=\"'credential-value-' + i\"\n [attr.aria-label]=\"credential.get('field').value | humanizeCredentialName\" />\n </pw-input-container>\n </div>\n }\n </div>\n }\n\n <div class=\"credential-form-actions\">\n <button type=\"button\" class=\"btn btn-outline-default\" (click)=\"onCancel()\" (keydown.enter)=\"onCancel()\">\n {{ 'Button.Back' | transloco }}\n </button>\n @if (credentialsSelect?.length) {\n <button type=\"submit\" [buttonBusy]=\"buttonBusy\" class=\"btn btn-primary\">\n {{ 'Button.Submit' | transloco }}\n </button>\n }\n </div>\n </form>\n </section>\n}\n\n@if (!showForm) {\n <div class=\"row\">\n <div class=\"col-12 d-flex\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"back()\"\n (keydown.enter)=\"back()\"\n class=\"previous\">\n <i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i>\n </a>\n <h2 class=\"mt-3\">\n @if (subName) {\n {{ 'User.Subscriptions.SubscriptionCredentials.PageTitle' | transloco: { name: subName } }}\n } @else {\n {{ 'User.Subscriptions.SubscriptionCredentials.PageTitleFallback' | transloco }}\n }\n </h2>\n </div>\n <div class=\"col-12 col-md-12 text-end\">\n <button class=\"btn btn-sm btn-outline-primary\" (click)=\"openCredentialsForAdd()\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'User.Subscriptions.SubscriptionCredentials.AddButton' | transloco }}\n </button>\n </div>\n </div>\n <p class=\"credential-page-subtitle text-muted mb-4\">\n @if (subName) {\n {{ 'User.Subscriptions.SubscriptionCredentials.ListSubtitle' | transloco: { name: subName } }}\n } @else {\n {{ 'User.Subscriptions.SubscriptionCredentials.ListSubtitleFallback' | transloco }}\n }\n </p>\n\n <pw-loader [isVisible]=\"!isLoaded\"></pw-loader>\n\n @if (isLoaded) {\n @if (allSubscriptionCredentials?.length === 0) {\n <div class=\"credential-empty\">\n <pw-no-data [withImage]=\"true\"\n [message]=\"'User.Subscriptions.SubscriptionCredentials.NoDataMessage' | transloco\"></pw-no-data>\n </div>\n } @else {\n <ul class=\"credential-grid\">\n @for (credential of credentials; track credential.credential_name) {\n <li class=\"credential-card\">\n <header class=\"credential-card-header\"\n [style.--avatar-hue]=\"credential.credential_name | credentialAvatarHue\">\n <span class=\"credential-avatar\" aria-hidden=\"true\">\n {{ (credential.credential_name | humanizeCredentialName).charAt(0) }}\n </span>\n <h3 class=\"credential-card-title\">\n {{ credential.credential_name | humanizeCredentialName }}\n </h3>\n <button type=\"button\" class=\"credential-icon-btn\"\n [attr.aria-label]=\"'User.Subscriptions.SubscriptionCredentials.EditAriaLabel' | transloco\"\n (click)=\"openCredentialsForEdit(credential.credential_name)\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n </button>\n </header>\n <dl class=\"credential-card-fields\">\n @for (entry of credential.credentials; track entry.id) {\n <div class=\"credential-card-row\">\n <dt>{{ entry.field | humanizeCredentialName }}</dt>\n <dd><code class=\"credential-card-value\">{{ entry?.value }}</code></dd>\n </div>\n }\n </dl>\n </li>\n }\n </ul>\n }\n }\n}\n\n<pw-password-validation #passwordValidationModalForEditCredential (successEvent)=\"editCredentials()\"></pw-password-validation>\n<pw-password-validation #passwordValidationModalForAddCredential (successEvent)=\"showEditForm()\"></pw-password-validation>\n","// Airwallex Drop-in for saving a backup card: card entry and the 3DS challenge happen\n// inside it. The SDK is imported lazily so it only loads on this page.\nimport type { Payment } from '@airwallex/components-sdk';\n\nexport interface AirwallexCardFormSetup {\n intent_id: string;\n client_secret: string;\n currency: string;\n environment: string;\n}\n\n// Mirrors integrations-api Airwallex::Core::Environment::PRODUCTION_VALUES.\nconst PRODUCTION_ENVIRONMENTS = ['prod', 'production', 'live'];\nconst READY_TIMEOUT_MS = 20_000;\n\nexport class AirwallexElementHelper {\n private element: Payment.DropInElementType | null = null;\n\n async mount(host: HTMLElement, setup: AirwallexCardFormSetup): Promise<void> {\n this.teardown();\n const sdk = await import('@airwallex/components-sdk');\n await sdk.init({\n env: AirwallexElementHelper.sdkEnv(setup.environment),\n enabledElements: ['payments']\n });\n const element = await sdk.createElement('dropIn', this.options(setup));\n const ready = AirwallexElementHelper.whenReady(host);\n element.mount(host);\n this.element = element;\n await ready;\n }\n\n /**\n * mount() returns before the iframe draws its fields. SDK 1.35 announces readiness as a DOM\n * `onReady` event on the host; element.on('ready') never fires (measured in the demo env).\n */\n private static whenReady(host: HTMLElement): Promise<void> {\n return new Promise((resolve, reject) => {\n const finish = (done: () => void) => () => {\n clearTimeout(timer);\n host.removeEventListener('onReady', onReady);\n host.removeEventListener('onError', onError);\n done();\n };\n const onReady = finish(resolve);\n const onError = finish(() => reject(new Error('airwallex_form_failed')));\n const timer = setTimeout(\n finish(() => reject(new Error('airwallex_ready_timeout'))),\n READY_TIMEOUT_MS\n );\n host.addEventListener('onReady', onReady);\n host.addEventListener('onError', onError);\n });\n }\n\n /** Resolves with the intent id once the card and any 3DS challenge completed. */\n async confirm(): Promise<string> {\n if (!this.element) {\n throw new Error('airwallex_element_not_mounted');\n }\n const intent = await this.element.confirm();\n if (!intent?.id) {\n throw new Error('airwallex_confirm_failed');\n }\n return intent.id;\n }\n\n teardown(): void {\n this.element?.destroy();\n this.element = null;\n }\n\n static sdkEnv(environment: string): 'prod' | 'demo' {\n return PRODUCTION_ENVIRONMENTS.includes((environment || '').trim().toLowerCase())\n ? 'prod'\n : 'demo';\n }\n\n private options(setup: AirwallexCardFormSetup): Payment.DropInElementOptions {\n return {\n intent_id: setup.intent_id,\n client_secret: setup.client_secret,\n currency: setup.currency,\n methods: ['card'],\n showConfirmButton: false,\n payment_consent: {\n next_triggered_by: 'merchant',\n merchant_trigger_reason: 'unscheduled'\n }\n };\n }\n}\n","/**\n * Thin wrapper around the Braintree Web Drop-in script.\n * Mounts a Drop-in instance into a host DOM element and resolves the\n * payment_method_nonce on submit. Loaded as a CDN script (mirrors the Stripe\n * pattern in the same component) — see UpdatePaymentDetailsComponent.\n */\n\nconst DROPIN_CDN_URL = 'https://js.braintreegateway.com/web/dropin/1.43.0/js/dropin.min.js';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\ndeclare const braintree: {\n dropin: {\n create: (options: BraintreeDropinCreateOptions) => Promise<BraintreeDropinInstance>;\n };\n};\n\nexport interface BraintreeDropinCreateOptions {\n authorization: string;\n container: string | HTMLElement;\n card?: { cardholderName?: { required: boolean } };\n}\n\nexport interface BraintreeDropinInstance {\n requestPaymentMethod: () => Promise<{ nonce: string; type: string }>;\n teardown: () => Promise<void>;\n}\n\nexport class BraintreeDropinHelper {\n private dropinInstance: BraintreeDropinInstance | null = null;\n\n /**\n * Loads the Drop-in script into <head> if not already present, then mounts\n * a Drop-in instance bound to clientToken into the host element.\n */\n async mount(host: HTMLElement, clientToken: string): Promise<void> {\n await this.ensureScriptLoaded();\n await this.teardown();\n this.dropinInstance = await braintree.dropin.create({\n authorization: clientToken,\n container: host\n });\n }\n\n async requestNonce(): Promise<string> {\n if (!this.dropinInstance) {\n throw new Error('braintree_dropin_not_mounted');\n }\n const result = await this.dropinInstance.requestPaymentMethod();\n return result.nonce;\n }\n\n async teardown(): Promise<void> {\n if (!this.dropinInstance) {\n return;\n }\n try {\n await this.dropinInstance.teardown();\n } finally {\n this.dropinInstance = null;\n }\n }\n\n private ensureScriptLoaded(): Promise<void> {\n if (typeof window === 'undefined') {\n return Promise.resolve();\n }\n if ((window as unknown as { braintree?: unknown }).braintree) {\n return Promise.resolve();\n }\n const existing = document.querySelector(\n `script[src=\"${DROPIN_CDN_URL}\"]`\n ) as HTMLScriptElement | null;\n if (existing) {\n return new Promise<void>((resolve, reject) => {\n existing.addEventListener('load', () => resolve(), { once: true });\n existing.addEventListener(\n 'error',\n () => reject(new Error('braintree_script_load_failed')),\n { once: true }\n );\n });\n }\n return new Promise<void>((resolve, reject) => {\n const script = document.createElement('script');\n script.src = DROPIN_CDN_URL;\n script.async = true;\n script.addEventListener('load', () => resolve(), { once: true });\n script.addEventListener(\n 'error',\n () => reject(new Error('braintree_script_load_failed')),\n { once: true }\n );\n document.head.appendChild(script);\n });\n }\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n ViewChild\n} from '@angular/core';\n\nimport { CustomToastService, SubscriptionService, UserService } from '@posiwise/common-services';\n\nimport { firstValueFrom } from 'rxjs';\n\nimport { TranslocoService } from '@jsverse/transloco';\n\nimport { AirwallexCardFormSetup, AirwallexElementHelper } from './airwallex-element.helper';\nimport { BraintreeDropinHelper } from './braintree-dropin.helper';\nimport { SecondaryCardSummary, SecondaryProvider } from './update-payment-details.types';\n\n// Secondary (backup card) column: Braintree or Airwallex, as the backend selected.\n@Component({\n selector: 'pw-secondary-payment-method',\n templateUrl: './secondary-payment-method.component.html',\n styleUrls: ['./secondary-payment-method.component.scss'],\n standalone: false\n})\nexport class SecondaryPaymentMethodComponent implements OnDestroy {\n @Input() subscriptionId: number;\n @Input() card: SecondaryCardSummary | null = null;\n @Input() provider: SecondaryProvider = 'airwallex';\n @Input() loading = true;\n @Output() saved = new EventEmitter<void>();\n\n @ViewChild('formHost') formHost?: ElementRef<HTMLDivElement>;\n\n showForm = false;\n mounting = false; // the card form loads after showForm: its host must already exist\n busy = false;\n\n private readonly braintree = new BraintreeDropinHelper();\n private readonly airwallex = new AirwallexElementHelper();\n\n constructor(\n private readonly subscriptionService: SubscriptionService,\n private readonly userService: UserService,\n private readonly toast: CustomToastService,\n private readonly transloco: TranslocoService,\n private readonly cdr: ChangeDetectorRef\n ) {}\n\n ngOnDestroy() {\n this.teardown();\n }\n\n async startFlow() {\n this.showForm = true;\n this.mounting = true;\n this.cdr.detectChanges(); // the form host only exists once showForm renders\n try {\n await this.mountForm(this.formHost.nativeElement);\n } catch (error) {\n if (!(error instanceof HttpErrorResponse)) {\n this.fail('User.Payments.Secondary.Errors.FormFailed');\n }\n this.showForm = false;\n } finally {\n this.mounting = false;\n this.cdr.markForCheck();\n }\n }\n\n async submit() {\n this.busy = true;\n this.cdr.markForCheck();\n try {\n const response = await firstValueFrom(this.register(await this.collectCard()));\n if (response?.data) {\n this.onSaved(response.message);\n }\n } catch (error) {\n // The HTTP interceptor already toasts a rejected API call.\n if (!(error instanceof HttpErrorResponse)) {\n this.fail('User.Payments.Secondary.Errors.CardNotConfirmed');\n }\n } finally {\n this.busy = false;\n this.cdr.markForCheck();\n }\n }\n\n cancel() {\n this.teardown();\n this.showForm = false;\n this.cdr.markForCheck();\n }\n\n private onSaved(message: string) {\n // Braintree's hand-built response isn't toasted by the interceptor; Airwallex's is.\n if (this.provider === 'braintree') {\n this.toast.success(message);\n }\n // Refresh the user payload so payment_methods_status is re-evaluated\n // and the secondary-payment modal in UserService stops firing.\n this.userService.getUserInfo().subscribe();\n this.teardown();\n this.showForm = false;\n this.saved.emit();\n }\n\n private async mountForm(host: HTMLElement) {\n if (this.provider === 'braintree') {\n const response = await firstValueFrom(\n this.subscriptionService.getBraintreeClientToken(this.subscriptionId)\n );\n await this.braintree.mount(host, response?.data?.client_token);\n return;\n }\n const response = await firstValueFrom(\n this.subscriptionService.getAirwallexIntent(this.subscriptionId)\n );\n await this.airwallex.mount(host, response?.data as AirwallexCardFormSetup);\n }\n\n /** Braintree yields a nonce; Airwallex yields the confirmed intent id (after 3DS). */\n private collectCard(): Promise<string> {\n return this.provider === 'braintree'\n ? this.braintree.requestNonce()\n : this.airwallex.confirm();\n }\n\n private register(reference: string) {\n return this.provider === 'braintree'\n ? this.subscriptionService.registerBraintreePaymentMethod(\n this.subscriptionId,\n reference\n )\n : this.subscriptionService.registerAirwallexPaymentMethod(\n this.subscriptionId,\n reference\n );\n }\n\n private teardown() {\n this.braintree.teardown();\n this.airwallex.teardown();\n }\n\n private fail(key: string) {\n this.toast.error(this.transloco.translate(key));\n }\n}\n","<h5 class=\"section-title\">{{ 'User.Payments.Secondary.Title' | transloco }}</h5>\n<p class=\"alert alert-info\" [pTooltip]=\"'User.Payments.Secondary.Tooltip' | transloco\" tooltipPosition=\"top\" appendTo=\"body\">\n {{ 'User.Payments.Secondary.Callout' | transloco }}\n</p>\n\n@if (loading || mounting) {\n <div class=\"text-center\">\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n}\n\n@if (card && !showForm) {\n <pw-saved-card-details [data]=\"card\"\n (changeEvent)=\"startFlow()\">\n </pw-saved-card-details>\n}\n\n@if (!card && !showForm && !loading) {\n <button type=\"button\"\n class=\"btn btn-primary\"\n (click)=\"startFlow()\">\n {{ 'User.Payments.Secondary.AddCta' | transloco }}\n </button>\n}\n\n@if (showForm) {\n <div #formHost class=\"secondary-card-form\" [class.mt-3]=\"!mounting\" [class.secondary-card-form--mounting]=\"mounting\"\n [attr.data-provider]=\"provider\"></div>\n @if (!mounting) {\n <div class=\"col-12 mt-4 text-end\">\n <button type=\"button\"\n (click)=\"cancel()\"\n class=\"btn btn-outline-default me-2\">\n {{ 'User.Payments.Cancel' | transloco }}\n </button>\n <button type=\"button\"\n class=\"btn btn-primary\"\n [buttonBusy]=\"busy\"\n (click)=\"submit()\">\n {{ 'User.Payments.Submit' | transloco }}\n </button>\n </div>\n }\n}\n","import { ChangeDetectorRef, Component, Injector, OnInit } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport {\n ProductService,\n ScriptLoaderService,\n SubscriptionService\n} from '@posiwise/common-services';\nimport { HelperService } from '@posiwise/helper-service';\nimport { ValidateForm } from '@posiwise/utils';\n\nimport { StatusCodes } from 'http-status-codes';\nimport { forkJoin } from 'rxjs';\n\nimport { CardDetails, StripeCardResponse } from '../../../shared/interface/user-module.interface';\n\nimport {\n SecondaryCardSummary,\n SecondaryProvider,\n StripeJsApi\n} from './update-payment-details.types';\n\ndeclare const Stripe: StripeJsApi;\n\n@Component({\n selector: 'pw-update-payment-details',\n templateUrl: './update-payment-details.component.html',\n styleUrls: ['./update-payment-details.component.scss'],\n\n standalone: false\n})\nexport class UpdatePaymentDetailsComponent extends AppBaseComponent implements OnInit {\n form: UntypedFormGroup;\n\n years = [];\n months = [];\n\n busy: boolean;\n isChangePayment: boolean;\n\n cardDetails: CardDetails | null = null;\n secondaryCard: SecondaryCardSummary | null = null;\n secondaryProvider: SecondaryProvider = 'airwallex';\n\n loading = true;\n\n errorMessage: string;\n stripePublishKey: string;\n errorMsg: string;\n\n subscriptionId: number;\n productId: number;\n\n constructor(\n private readonly fb: UntypedFormBuilder,\n private readonly scriptLoader: ScriptLoaderService,\n private readonly productService: ProductService,\n private readonly subscriptionService: SubscriptionService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n\n this.route.params.subscribe(response => {\n this.subscriptionId = Number(response['subscriptionId']);\n this.productId = Number(response['productId']);\n this.refreshPaymentMethods();\n this.cdr.markForCheck();\n });\n\n this.form = this.fb.group({\n card_number: ['', Validators.required],\n cvc: ['', Validators.required],\n exp_month: ['', Validators.required],\n exp_year: ['', Validators.required]\n });\n }\n\n ngOnInit() {\n this.scriptLoader.loadScriptOnce('head', 'https://js.stripe.com/v2/');\n this.years = HelperService.getYears();\n this.months = HelperService.getMonths();\n }\n\n refreshPaymentMethods() {\n forkJoin({\n paymentMethods: this.subscriptionService.getPaymentMethods(this.subscriptionId),\n product: this.productService.getProductById(this.productId)\n })\n .subscribe(response => {\n this.stripePublishKey = response.product.stripe_publishable_key;\n if (response.paymentMethods.status === StatusCodes.OK) {\n const data = response.paymentMethods.data || {};\n this.cardDetails = data.primary || null;\n this.secondaryCard = data.secondary || null;\n this.secondaryProvider = data.secondary_provider || 'braintree';\n }\n this.cdr.markForCheck();\n })\n .add(() => {\n this.loading = false;\n this.cdr.markForCheck();\n });\n }\n\n onUpdatePaymentDetailsCancel() {\n this.router.navigate(['/account/subscriptions']);\n }\n\n @ValidateForm('form')\n onSave() {\n this.busy = true;\n this.errorMsg = '';\n const cardDetails = {\n number: this.form.value.card_number,\n cvc: this.form.value.cvc,\n exp_month: this.form.value.exp_month,\n exp_year: this.form.value.exp_year\n };\n Stripe.setPublishableKey(this.stripePublishKey);\n Stripe.card.createToken(cardDetails, (status, res) => this.onStripeToken(status, res));\n }\n\n private onStripeToken(status: number, res: StripeCardResponse) {\n if (status !== 200) {\n this.toast.error(res?.error?.message);\n this.busy = false;\n this.cdr.markForCheck();\n return;\n }\n this.subscriptionService\n .updateCardDetails(this.form.value, this.subscriptionId)\n .subscribe({\n next: response => {\n if (response.error) {\n this.toast.error(response.error.errors[0].message);\n } else if (response.status === StatusCodes.CREATED) {\n this.toast.success(response.message);\n }\n this.cancel();\n }\n })\n .add(() => {\n this.busy = false;\n this.cdr.markForCheck();\n });\n }\n\n cancel() {\n this.router.navigate(['/account/subscriptions']);\n }\n\n onChange(value) {\n this.isChangePayment = value;\n }\n}\n","<div class=\"container-fluid\">\n <div class=\"card-block\">\n <div class=\"row\">\n <div class=\"col-lg-12 ps-0\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"back()\"\n class=\"previous float-start\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n <h4 class=\"form-section my-3\">\n <i class=\"ft-edit\" aria-hidden=\"true\"></i>\n {{ 'User.Payments.UpdateTitle' | transloco }}\n </h4>\n </div>\n </div>\n\n <div class=\"row g-3 mt-1\">\n <!-- Primary payment method (Stripe) -->\n <div class=\"col-12 col-lg-6\">\n <div class=\"card payment-left p-3 h-100\">\n <div class=\"card-body\">\n <h5 class=\"section-title\">{{ 'User.Payments.Primary.Title' | transloco }}</h5>\n <p class=\"text-muted\">{{ 'User.Payments.Primary.Description' | transloco }}</p>\n\n @if (errorMsg) {\n <div class=\"alert alert-danger\">{{ errorMsg }}</div>\n }\n @if (!isChangePayment && cardDetails) {\n <pw-saved-card-details [data]=\"cardDetails\"\n (changeEvent)=\"onChange($event)\">\n </pw-saved-card-details>\n }\n\n @if (loading) {\n <div class=\"text-center\">\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n\n @if ((!cardDetails && !loading) || isChangePayment) {\n <form [formGroup]=\"form\" (ngSubmit)=\"onSave()\">\n <h4 class=\"title\">{{ 'User.Payments.Primary.NewCard' | transloco }}</h4>\n <div class=\"row\">\n <div class=\"col-md-9\">\n <div class=\"mb-3\">\n <label for=\"update-payment-card_number\">{{ 'User.Payments.CardNumber' | transloco }}</label>\n <input type=\"text\"\n id=\"update-payment-card_number\"\n class=\"form-control\"\n formControlName=\"card_number\"\n [placeholder]=\"'User.Payments.CardNumber' | transloco\"\n name=\"card_number\"\n aria-label=\"Card Number\" />\n @if (form.get('card_number').touched && form.get('card_number').errors?.required) {\n <div class=\"danger\"><span>{{ 'User.Payments.Errors.CardNumberRequired' | transloco }}</span></div>\n }\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"mb-3\">\n <label for=\"update-payment-cvc\">{{ 'User.Payments.Cvc' | transloco }}</label>\n <input type=\"text\"\n id=\"update-payment-cvc\"\n class=\"form-control\"\n formControlName=\"cvc\"\n [placeholder]=\"'User.Payments.Cvc' | transloco\"\n name=\"cvc\"\n aria-label=\"Cvc\" />\n @if (form.get('cvc').touched && form.get('cvc').errors?.required) {\n <div class=\"danger\"><span>{{ 'User.Payments.Errors.CvcRequired' | transloco }}</span></div>\n }\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only\" id=\"update-payment-exp_month-label\" class=\"pw-label-style\">{{ 'User.Payments.ExpMonth' | transloco }}</span>\n <p-select\n [attr.aria-labelledby]=\"'update-payment-exp_month-label'\"\n [options]=\"months\"\n [appendTo]=\"'body'\"\n formControlName=\"exp_month\"\n [placeholder]=\"'User.Payments.ExpMonth' | transloco\"\n optionValue=\"value\"\n optionLabel=\"value\">\n </p-select>\n @if (form.get('exp_month').touched && form.get('exp_month').errors?.required) {\n <div class=\"danger\"><span>{{ 'User.Payments.Errors.ExpMonthRequired' | transloco }}</span></div>\n }\n </div>\n </div>\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only\" id=\"update-payment-exp_year-label\">{{ 'User.Payments.ExpYear' | transloco }}</span>\n <p-select\n [attr.aria-labelledby]=\"'update-payment-exp_year-label'\"\n [options]=\"years\"\n formControlName=\"exp_year\"\n [placeholder]=\"'User.Payments.ExpYear' | transloco\"\n optionValue=\"value\"\n [appendTo]=\"'body'\"\n optionLabel=\"value\">\n </p-select>\n @if (form.get('exp_year')?.touched && form.get('exp_year')?.errors?.['required']) {\n <div class=\"danger\"><span>{{ 'User.Payments.Errors.ExpYearRequired' | transloco }}</span></div>\n }\n </div>\n </div>\n <div class=\"col-12 text-center mt-4\">\n <img src=\"/assets/img/icons/powered_by_stripe_v2.png\"\n class=\"payment-provider\"\n alt=\"\" />\n </div>\n <div class=\"col-12 mt-4 text-end\">\n <button type=\"button\"\n (click)=\"cancel()\"\n class=\"btn btn-outline-default me-2\">\n {{ 'User.Payments.Cancel' | transloco }}\n </button>\n <button type=\"submit\"\n class=\"btn btn-primary\"\n [buttonBusy]=\"busy\">\n {{ 'User.Payments.Submit' | transloco }}\n </button>\n </div>\n </div>\n </form>\n }\n </div>\n </div>\n </div>\n\n <!-- Secondary payment method (Braintree or Airwallex, main-api #974) -->\n <div class=\"col-12 col-lg-6\">\n <div class=\"card payment-right p-3 h-100\">\n <div class=\"card-body\">\n <pw-secondary-payment-method\n [subscriptionId]=\"subscriptionId\"\n [card]=\"secondaryCard\"\n [provider]=\"secondaryProvider\"\n [loading]=\"loading\"\n (saved)=\"refreshPaymentMethods()\">\n </pw-secondary-payment-method>\n </div>\n </div>\n </div>\n </div>\n\n </div>\n</div>\n","import {\n ChangeDetectorRef,\n Component,\n Injector,\n OnDestroy,\n OnInit,\n ViewChild\n} from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AppState, GetUser } from '@posiwise/app-store';\nimport {\n FormHelperService,\n ProductService,\n ScriptLoaderService,\n SubscriptionService\n} from '@posiwise/common-services';\nimport { Product, Subscription, User } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\nimport { ConfirmDialogService, PasswordValidationComponent } from '@posiwise/shared-components';\nimport { ValidateForm } from '@posiwise/utils';\n\nimport { StatusCodes } from 'http-status-codes';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\nimport { Store } from '@ngrx/store';\n\nimport { CardDetails } from '../../../shared/interface/user-module.interface';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\ndeclare let Stripe;\n\n@Component({\n selector: 'pw-upgrade-subscription',\n templateUrl: './upgrade-subscription.component.html',\n styleUrls: ['./upgrade-subscription.component.scss'],\n\n standalone: false\n})\nexport class UpgradeSubscriptionComponent extends AppBaseComponent implements OnInit, OnDestroy {\n @ViewChild('passwordValidationModal', { static: true })\n passwordValidationModal: PasswordValidationComponent;\n\n form: UntypedFormGroup;\n\n product: Product;\n subscription: Subscription;\n user: User;\n cardDetails: CardDetails;\n\n units: number;\n subscriptionId: number;\n productId: number;\n\n unitError: string;\n password: string;\n stripePublishKey: string;\n\n busy: boolean;\n isPurchaseAttempted: boolean;\n\n months = [];\n years = [];\n\n showNewCard: boolean;\n passwordModalVisible: boolean;\n\n errorMsg;\n\n get totalAmount() {\n if (this.product) {\n const units = Number(this.form.get('units').value);\n // eslint-disable-next-line no-restricted-globals\n if (!Number.isNaN(units)) {\n return (units * this.product.price_per_unit) / 100;\n }\n }\n\n return 0;\n }\n\n constructor(\n injector: Injector,\n private readonly productService: ProductService,\n private readonly fb: UntypedFormBuilder,\n private readonly modalService: NgbModal,\n private readonly subscriptionService: SubscriptionService,\n private readonly store: Store<AppState>,\n private readonly scriptLoader: ScriptLoaderService,\n private readonly cdr: ChangeDetectorRef,\n private readonly confirmDialog: ConfirmDialogService\n ) {\n super(injector);\n this.form = this.fb.group({\n card_number: ['', Validators.required],\n units: [],\n cvc: ['', Validators.required],\n exp_month: ['', Validators.required],\n exp_year: ['', Validators.required]\n });\n }\n\n ngOnInit(): void {\n this.scriptLoader.loadScriptOnce('head', 'https://js.stripe.com/v2/');\n this.years = HelperService.getYears();\n this.months = HelperService.getMonths();\n\n this.userStore().subscribe(user => {\n this.user = user;\n this.cdr.markForCheck();\n });\n\n this.route.params.subscribe(response => {\n this.subscriptionId = +response['subscriptionId'];\n this.productId = +response['productId'];\n this.getSubscriptionDetails();\n this.getCardDetails(this.subscriptionId);\n this.cdr.markForCheck();\n });\n }\n\n getSubscriptionDetails() {\n this.subscriptionService\n .getById(this.subscriptionId)\n .subscribe(response => {\n this.subscription = response;\n const product = this.subscription.products.find(x => x.id === this.productId);\n this.form.patchValue({\n units: product?.purchased_units\n });\n\n this.units = this.form.get('units').value;\n this.cdr.markForCheck();\n })\n .add(() => {\n this.getProductDetails();\n });\n }\n\n getProductDetails() {\n this.productService.getProductById(this.productId).subscribe(response => {\n this.product = response;\n this.stripePublishKey = response?.stripe_publishable_key;\n if (response?.stripe_publishable_key) {\n Stripe.setPublishableKey(response.stripe_publishable_key);\n }\n const prodUnits =\n this.units > this.product.min_units ? this.units : this.product.min_units || 1;\n\n this.form.patchValue({\n units: prodUnits\n });\n\n this.units = this.form.get('units').value;\n this.cdr.markForCheck();\n });\n }\n\n onMaxReached(event) {\n if (event) {\n this.unitError = `Maximum is ${this.units}`;\n }\n }\n\n onMinReached(event) {\n if (event) {\n this.unitError = `Minimum is ${this.subscription.min_units || this.product.min_units}`;\n }\n }\n\n onUnitChange(event) {\n this.units = event;\n this.form.patchValue({\n units: event\n });\n this.unitError = '';\n }\n\n onValidatePassword(isSuccess: boolean) {\n if (isSuccess) {\n this.onPurchaseSubmit();\n this.password = null;\n this.modalService.dismissAll();\n }\n }\n\n private postCreateToken(cardToken) {\n const data = {\n stripe_token: cardToken,\n product_id: this.product.id,\n units: this.form.get('units').value || 1,\n subscription_id: this.subscriptionId\n };\n this.userService\n .addNewSubscriptionUsingStripe(data)\n .subscribe({\n next: () => {\n this.toast.success(\n this.translation.translate('User.Subscriptions.SubscriptionPurchased')\n );\n this.router.navigate(['/account/subscriptions']);\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n },\n error: () => {\n this.busy = false;\n this.cdr.markForCheck();\n }\n })\n .add(() => {\n this.busy = false;\n this.cdr.markForCheck();\n });\n }\n\n attemptPurchase() {\n if (this.user.has_password) {\n this.passwordValidationModal.open();\n } else {\n this.noPasswordModal();\n }\n }\n\n private onPurchaseSubmit() {\n this.busy = true;\n this.passwordModalVisible = true;\n if (this.subscription.stripe_customer_id) {\n if (this.showNewCard) {\n this.updateCardDetails();\n } else {\n this.enrollUserToSubscription();\n }\n } else if (this.form.valid) {\n const cardDetails = {\n number: this.form.value.card_number,\n cvc: this.form.value.cvc,\n exp_month: this.form.value.exp_month,\n exp_year: this.form.value.exp_year\n };\n // Get publishable key from product get id\n Stripe.card.createToken(\n cardDetails,\n (status, response) => {\n if (status === StatusCodes.OK) {\n const cardToken = response.id;\n this.postCreateToken(cardToken);\n } else {\n this.toast.error(response?.error?.message, '', { disableTimeOut: true });\n this.busy = false;\n this.isPurchaseAttempted = false;\n }\n this.cdr.markForCheck();\n },\n () => {\n this.busy = false;\n this.isPurchaseAttempted = false;\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n }\n );\n }\n }\n\n private enrollUserToSubscription() {\n const data = {\n product_id: this.product.id,\n units: this.form.get('units').value,\n subscription_id: this.subscriptionId\n };\n\n this.subscriptionService.postSubscription(data).subscribe({\n next: response => {\n this.store.dispatch(new GetUser());\n if (response.id) {\n this.router.navigate(['/account/subscriptions']);\n this.toast.success(\n this.translation.translate('User.Subscriptions.SubscriptionPurchased')\n );\n this.isPurchaseAttempted = false;\n this.modalService.dismissAll();\n this.back();\n }\n this.cdr.markForCheck();\n },\n error: () => {\n this.busy = false;\n this.isPurchaseAttempted = false;\n this.cdr.markForCheck();\n },\n complete: () => {\n this.busy = !this.busy;\n this.cdr.markForCheck();\n }\n });\n }\n\n private noPasswordModal() {\n this.confirmDialog.open({\n title: 'Set Password',\n text: '<div>Please set a password before changing the subscription in the account section.</div><br /><strong><a href=\"/account/details\">Click here to reset</a></strong>',\n confirmOnly: true\n });\n }\n\n private getCardDetails(subscriptionId: number) {\n this.subscriptionService.getCardDetails(subscriptionId).subscribe(data => {\n this.cardDetails = data.data || null;\n this.form.patchValue({\n units: this.units,\n card_number: this.cardDetails?.card_number,\n cvc: this.cardDetails?.cvc,\n exp_month: this.cardDetails?.exp_month || '',\n exp_year: this.cardDetails?.exp_year || ''\n });\n this.cdr.markForCheck();\n });\n }\n\n onDiscardToggle() {\n this.form.markAllAsTouched();\n FormHelperService.markFormAsPristine(this.form);\n }\n\n @ValidateForm('form')\n updateCardDetails() {\n const cardDetails = {\n number: this.form.value.card_number,\n cvc: this.form.value.cvc,\n exp_month: this.form.value.exp_month,\n exp_year: this.form.value.exp_year\n };\n Stripe.setPublishableKey(this.stripePublishKey);\n\n Stripe.card.createToken(cardDetails, (status, res) => {\n if (status !== 200) {\n this.toast.error(res.error.message);\n } else {\n this.subscriptionService\n .updateCardDetails(this.form.value, this.subscriptionId)\n .subscribe({\n next: response => {\n if (response.error) {\n const err = response.error.errors[0].message;\n this.toast.error(err);\n } else if (response.status === StatusCodes.CREATED) {\n this.enrollUserToSubscription();\n this.toast.success(response.message);\n }\n this.cdr.markForCheck();\n },\n error: error => {\n this.errorMsg = HelperService.getErrorMessage(error);\n this.toast.error(this.errorMsg);\n this.cdr.markForCheck();\n }\n });\n }\n this.cdr.markForCheck();\n });\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n }\n}\n","<h4 class=\"form-section m-3\">\n <i class=\"ft-check-circle\" aria-hidden=\"true\"></i> {{ 'Button.Payment' | transloco }}\n</h4>\n<div class=\"card-block\">\n <!-- Show Payment Page when there is user.has_stripe_account===false -->\n <ng-container>\n <form class=\"form\"\n (ngSubmit)=\"attemptPurchase()\"\n [formGroup]=\"form\">\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"form-body p-3 payment-left card pb-0\">\n <div class=\"card-body\">\n @if (product?.max_units > 1) {\n <div class=\"row\"\n >\n <div class=\"col-12\">\n <div class=\"mb-3\">\n <h4 class=\"title\">\n {{ 'User.Subscriptions.LicensesRequired' | transloco }}\n </h4>\n <div class=\"row btns-row\">\n <div class=\"col-md-4 col-8\">\n <pw-number-picker name=\"number-picker\"\n [(value)]=\"units\"\n [min]=\"subscription.min_units || product.min_units\"\n [max]=\"product.max_units\"\n step=\"1\"\n postfix=\"Units\"\n placeholder=\"Total Licenses\"\n [inputReadOnly]=\"false\"\n size=\"small\"\n pickStartAfter=\"500\"\n pickTimer=\"100\"\n [arrowKeys]=\"true\"\n (minReached)=\"onMinReached($event)\"\n (maxReached)=\"onMaxReached($event)\"\n (valueChange)=\"onUnitChange($event)\">\n </pw-number-picker>\n </div>\n </div>\n <div class=\"text-center\">\n <small class=\"form-text text-muted danger\">\n {{ unitError }}\n </small>\n </div>\n </div>\n <p>\n If you proceed, your credit card will be charged\n <strong>{{ product.currency }}\n {{ totalAmount | number:'1.2-2' }}</strong>\n </p>\n </div>\n </div>\n }\n <!-- Shows Saved Card: Shows when user has card details and not trying to update the card details -->\n @if (cardDetails) {\n <pw-saved-card-details [data]=\"cardDetails\"\n (changeEvent)=\"showNewCard = $event\"\n [showNewCard]=\"showNewCard\">\n </pw-saved-card-details>\n }\n <!-- Add New Payment Starts, opens up when user doesn't have stripe account or tries to change the\n card details -->\n @if ((user && !cardDetails) || (cardDetails && showNewCard)) {\n <h4 class=\"title\">\n {{ 'User.Subscriptions.NewCard' | transloco }}?\n </h4>\n <div class=\"row\">\n <div class=\"col-md-9\">\n <div class=\"mb-3\">\n <label for=\"upgrade-subscription-card_number\">{{\n 'User.Subscriptions.CardNumber' | transloco\n }}</label>\n <input type=\"text\"\n id=\"upgrade-subscription-card_number\"\n class=\"form-control\"\n formControlName=\"card_number\"\n placeholder=\"Card Number\"\n name=\"card_number\"\n aria-label=\"Card Number\" />\n @if (\n form.get('card_number').touched &&\n form.get('card_number').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter card number. </span>\n </div>\n }\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"mb-3\">\n <label for=\"upgrade-subscription-cvc\">{{\n 'User.Subscriptions.CVC' | transloco\n }}</label>\n <input type=\"text\"\n id=\"upgrade-subscription-cvc\"\n class=\"form-control\"\n formControlName=\"cvc\"\n placeholder=\"CVC\"\n name=\"cvc\"\n aria-label=\"CVC\" />\n @if (\n form.get('cvc').touched &&\n form.get('cvc').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter cvc. </span>\n </div>\n }\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only pw-label-style\" id=\"upgrade-subscription-exp_month-label\">Exp. Month</span>\n <p-select\n [attr.aria-labelledby]=\"'upgrade-subscription-exp_month-label'\"\n [options]=\"months\"\n formControlName=\"exp_month\"\n [placeholder]=\"'Exp. Month'\"\n optionValue=\"value\"\n [appendTo]=\"'body'\"\n optionLabel=\"value\">\n </p-select>\n @if (\n form.get('exp_month').touched &&\n form.get('exp_month').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter expiry month. </span>\n </div>\n }\n </div>\n </div>\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only\" id=\"upgrade-subscription-exp_year-label\">Exp. Year</span>\n <p-select\n [attr.aria-labelledby]=\"'upgrade-subscription-exp_year-label'\"\n [options]=\"years\"\n formControlName=\"exp_year\"\n [placeholder]=\"'Exp. Year'\"\n [appendTo]=\"'body'\"\n optionValue=\"value\"\n optionLabel=\"value\">\n </p-select>\n @if (\n form.get('exp_year').touched &&\n form.get('exp_year').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter expiry year. </span>\n </div>\n }\n </div>\n </div>\n @if (cardDetails) {\n <div class=\"col-12 mt-2\"\n >\n <a aria-label=\"Navigate to Target\"\n (click)=\"showNewCard = false; onDiscardToggle()\">Disregard and pay with current registered card</a>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n <!-- Purchase Summary -->\n @if (product) {\n <div class=\"col-md-6\"\n >\n <div class=\"purchase-summary card p-3 payment-right\">\n <div class=\"card-body\">\n <h4 class=\"title\">{{ 'Label.PurchaseSummary' | transloco }}</h4>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Plan' | transloco }}:</div>\n <div class=\"summary-right\">{{ product.name }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Price' | transloco }}:</div>\n <div class=\"summary-right\">\n {{ product.currency }}\n {{ (product.price_per_unit / 100) | number:'1.2-2' }}\n </div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Seats' | transloco }}:</div>\n <div class=\"summary-right\">{{ form.get('units').value }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Total' | transloco }}:</div>\n <div class=\"summary-right\">\n {{ product.currency }} {{ totalAmount | number:'1.2-2' }}\n </div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">\n {{ 'Label.Recurrency' | transloco }}:\n </div>\n <div class=\"summary-right\">{{ product.billing_frequency }}</div>\n </div>\n </div>\n <div class=\"text-center\">\n <hr />\n <p>\n By subscribing you acknowledge and accept our terms of service and\n privacy policy\n </p>\n </div>\n </div>\n </div>\n }\n </div>\n <div class=\"row\">\n <div class=\"col-12 text-center mt-3\">\n <img src=\"/assets/img/icons/powered_by_stripe_v2.png\"\n class=\"payment-provider\"\n alt=\"\" />\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"form-actions text-end\">\n <button type=\"button\"\n class=\"btn btn-raised btn-outline-default me-1\"\n [disabled]=\"isPurchaseAttempted\"\n routerLink=\"/account/subscriptions\">\n <i class=\"ft-x\" aria-hidden=\"true\"></i>{{ 'Button.Back' | transloco }}\n </button>\n <button type=\"submit\"\n class=\"btn btn-raised btn-primary\"\n [disabled]=\"isPurchaseAttempted\"\n [buttonBusy]=\"busy\">\n <i class=\"ft-check\" aria-hidden=\"true\"></i>\n {{ 'Button.Purchase' | transloco }}\n </button>\n </div>\n </div>\n </div>\n </form>\n </ng-container>\n</div>\n\n<pw-password-validation #passwordValidationModal\n (successEvent)=\"onValidatePassword($event)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <p>\n If you proceed, your credit card will be charged\n @if (totalAmount) {\n <strong>{{ product.currency }} {{ totalAmount | number:'1.2-2' }}</strong>\n }\n </p>\n </div>\n </div>\n</pw-password-validation>\n","import {\n ChangeDetectorRef,\n Component,\n Injector,\n OnDestroy,\n OnInit,\n ViewChild\n} from '@angular/core';\nimport {\n AbstractControl,\n UntypedFormBuilder,\n UntypedFormGroup,\n ValidationErrors,\n ValidatorFn,\n Validators\n} from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AppState, GetUser } from '@posiwise/app-store';\nimport { GeoService, SubscriptionService, ValidationService } from '@posiwise/common-services';\nimport { Country, Product, Subscription, User } from '@posiwise/common-utilities';\nimport { ConfirmDialogService, PasswordValidationComponent } from '@posiwise/shared-components';\nimport { ValidateForm } from '@posiwise/utils';\n\nimport { StatusCodes } from 'http-status-codes';\nimport { map, Observable } from 'rxjs';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\nimport { Store } from '@ngrx/store';\n\n@Component({\n templateUrl: './user-subscription-details.component.html',\n styleUrls: ['./user-subscription-details.component.scss'],\n\n standalone: false\n})\nexport class UserSubscriptionDetailsComponent\n extends AppBaseComponent\n implements OnInit, OnDestroy\n{\n @ViewChild('modal', { static: true }) modal: PasswordValidationComponent;\n\n allowUpdate: boolean;\n hasUnitChanged: boolean;\n\n busyButton = false;\n\n form: UntypedFormGroup;\n\n unitError: string;\n\n subscription: Subscription;\n\n units = 1;\n\n countries$: Observable<Country[]>;\n\n squaredLogo: string;\n fullLogo: string;\n fullLogoBroken = false;\n squaredLogoBroken = false;\n slug: string;\n\n userId: number;\n subscriptionId: number;\n\n user: User;\n\n showApiToken = false;\n showApiClientId = false;\n refreshingTokens = false;\n\n totalAmount() {\n const allProductsPrice = this.subscription.products.map(x => x.price_per_unit * this.units);\n\n return allProductsPrice.reduce((a: number, b: number) => a + b, 0) / 100;\n }\n\n constructor(\n private readonly fb: UntypedFormBuilder,\n private readonly geoService: GeoService,\n private readonly modalService: NgbModal,\n private readonly subscriptionService: SubscriptionService,\n private readonly store: Store<AppState>,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef,\n private readonly confirmDialog: ConfirmDialogService\n ) {\n super(injector);\n this.form = this.getForm();\n this.route.params.subscribe(params => {\n this.subscriptionId = +params['subscriptionId'];\n this.fetchData();\n this.cdr.markForCheck();\n });\n }\n\n ngOnInit() {\n this.geoService.getCountries().subscribe(() => {\n this.countries$ = this.geoService\n .getCountries()\n .pipe(\n map((countries: []) => [{ name: 'Select Country', code: null }, ...countries])\n );\n this.cdr.markForCheck();\n });\n this.userStore().subscribe(user => {\n if (user) {\n this.slug = user.slug;\n this.user = user;\n this.userId = user.id;\n }\n this.cdr.markForCheck();\n });\n }\n\n private fetchData() {\n this.subscriptionService.getById(this.subscriptionId).subscribe(response => {\n this.subscription = response;\n this.fullLogo = this.subscription?.full_logo.url;\n this.squaredLogo = this.subscription?.squared_logo?.url;\n this.fullLogoBroken = false;\n this.squaredLogoBroken = false;\n this.form.patchValue(this.subscription);\n this.units = this.subscription?.products[0]?.purchased_units;\n this.form.patchValue({\n units: this.units\n });\n this.cdr.markForCheck();\n });\n }\n\n /** White-label company name for \"Your {brand} AI assistant\" (same source as the login page and chat widget). */\n get brandName(): string {\n return this.appConfig?.company?.name?.trim() || 'PosiWise';\n }\n\n private getForm() {\n return this.fb.group({\n organisation: ['', [Validators.required]],\n contact_name: ['', [Validators.required]],\n contact_email: ['', [Validators.required, Validators.email]],\n contact_tel: [''],\n tax_id: [''],\n invoice_recipient_emails: ['', [this.commaSeparatedEmailsValidator()]],\n address: ['', [Validators.required]],\n country_code: ['', [Validators.required]],\n facebook_handle: [''],\n twitter_handle: [''],\n linkedin_handle: [''],\n reddit_handle: [''],\n company_url: [''],\n enforce_2fa: [false],\n rag_use_own_data: [true],\n rag_keep_pii: [false]\n });\n }\n\n private commaSeparatedEmailsValidator(): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n if (!control.value) {\n return null; // Allow empty values\n }\n\n const value = control.value as string;\n\n // Check if there are spaces around commas (comma-space or space-comma patterns)\n if (value.includes(',') && (value.includes(', ') || value.includes(' ,'))) {\n return { invalidFormat: true };\n }\n\n // Check if any email part contains spaces (after splitting by comma)\n const emailParts = value.split(',');\n if (emailParts.some((part: string) => part.trim() !== part || part.includes(' '))) {\n return { invalidFormat: true };\n }\n\n // Validate each email\n const emails = emailParts.map((email: string) => email.trim());\n for (const email of emails) {\n if (email && !ValidationService.email(email)) {\n return { invalidEmail: true };\n }\n }\n\n return null;\n };\n }\n\n /** *\n * Update seats for all the products of subscription\n */\n updateUnits() {\n if (this.subscription.products[0].trial_subscription) {\n return;\n }\n this.modal.open();\n }\n\n openModal(content) {\n this.modalService.open(content, { centered: true, windowClass: 'modal-holder' });\n }\n\n onImageSelection(event) {\n const blob = this.dataURLtoBlob(event);\n const filename = `${`${this.slug.toLocaleLowerCase()}_${Date.parse(\n new Date().toString()\n )}`}.png`;\n const file: File = new File([blob], filename);\n this.subscriptionService.addFullLogo(this.subscriptionId, file).subscribe(res => {\n this.modalService.dismissAll();\n this.fullLogo = res?.full_logo?.url;\n this.fullLogoBroken = false;\n this.cdr.markForCheck();\n });\n }\n\n uploadSquaredLogo(event) {\n const blob = this.dataURLtoBlob(event);\n const filename = `${`${this.slug.toLocaleLowerCase()}_${Date.parse(\n new Date().toString()\n )}`}.png`;\n const file: File = new File([blob], filename);\n this.subscriptionService.addSquaredLogo(this.subscriptionId, file).subscribe(res => {\n this.modalService.dismissAll();\n this.squaredLogo = res?.squared_logo?.url;\n this.squaredLogoBroken = false;\n this.cdr.markForCheck();\n });\n }\n\n onClose() {\n this.modalService.dismissAll();\n }\n\n dataURLtoBlob(dataUrl) {\n const arr = dataUrl.split(',');\n const mime = /^[A-Z]*[a-z]*:(.*?);[A-Z]*/.exec(arr[0])?.[1];\n const bStr = atob(arr[1]);\n let n = bStr.length;\n const u8arr = new Uint8Array(n);\n while (n--) {\n u8arr[n] = bStr.charCodeAt(n);\n }\n\n return new Blob([u8arr], { type: mime });\n }\n\n @ValidateForm('form')\n onSaveDetails() {\n this.busyButton = true;\n const formValue = { ...this.form.value };\n\n // Process invoice_recipient_emails: remove spaces from comma-separated emails\n if (formValue.invoice_recipient_emails) {\n formValue.invoice_recipient_emails = formValue.invoice_recipient_emails\n .split(',')\n .map((email: string) => email.trim())\n .join(',');\n }\n\n this.subscriptionService\n .updateSubscription(Number(this.subscriptionId), formValue)\n .subscribe(() => {\n this.toast.success('Subscription details updated.');\n this.store.dispatch(new GetUser());\n this.back();\n this.cdr.markForCheck();\n })\n .add(() => {\n this.busyButton = false;\n this.cdr.markForCheck();\n });\n }\n\n onPasswordValidation(_event) {\n this.subscriptionService\n .updateSubscriptionUnit(this.subscription.id, this.units)\n .subscribe(response => {\n if (response.status === StatusCodes.OK) {\n this.toast.success('Unit quantity updated.');\n } else {\n this.toast.error('Something went wrong!');\n }\n this.cdr.markForCheck();\n });\n }\n\n onMaxReached(event) {\n if (event) {\n this.unitError = `Maximum is ${this.units}`;\n }\n }\n\n onMinReached(event) {\n if (event) {\n this.unitError = `Minimum is ${this.units}`;\n }\n }\n\n onUnitChange(event) {\n this.allowUpdate = true;\n this.hasUnitChanged = true;\n this.units = event;\n this.unitError = '';\n }\n\n /** Function to execute on location select */\n handleAddressChange(event) {\n this.form.get('address').setValue(event.formatted_address);\n }\n\n toggleApiTokenVisibility() {\n this.showApiToken = !this.showApiToken;\n }\n\n toggleApiClientIdVisibility() {\n this.showApiClientId = !this.showApiClientId;\n }\n\n refreshApiTokens() {\n this.confirmDialog\n .open({\n title: 'Are you sure?',\n text: 'This will expire the current tokens.',\n destructive: true,\n confirmLabel: 'Yes, refresh tokens!'\n })\n .then(ok => {\n if (ok) {\n this.performTokenRefresh();\n }\n });\n }\n\n private performTokenRefresh() {\n this.refreshingTokens = true;\n this.subscriptionService\n .refreshApiTokens(this.subscriptionId)\n .subscribe({\n next: response => {\n if (response && response.api_access_token) {\n this.subscription.api_access_token = response.api_access_token;\n }\n if (response && response.api_client_id) {\n this.subscription.api_client_id = response.api_client_id;\n }\n\n this.showApiToken = false;\n this.showApiClientId = false;\n this.fetchData();\n this.cdr.markForCheck();\n }\n })\n .add(() => {\n this.refreshingTokens = false;\n this.cdr.markForCheck();\n });\n }\n\n trackByProduct(_index: number, item: Product) {\n return item.id;\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n this.allowUpdate = false;\n }\n}\n","<!-- edit Subscription details page -->\n<div class=\"row\">\n <div class=\"col-12\">\n <h3 class=\"my-3\">{{ subscription?.organisation || subscription?.contact_name }}</h3>\n </div>\n</div>\n\n@if (subscription) {\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSaveDetails()\"\n class=\"row mt-4\"\n >\n <!-- 1. Contact details -->\n <div class=\"col-12\">\n <h3>Contact details</h3>\n </div>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.ContactName' | transloco\"\n class=\"col-md-6\"\n label=\"Contact Name\"\n name=\"contact_name\"\n controlId=\"user-subscription-contact_name\"\n errorMsg=\"Please enter Contact Name\">\n <input type=\"text\"\n id=\"user-subscription-contact_name\"\n class=\"form-control\"\n formControlName=\"contact_name\"\n aria-label=\"Contact Name\" />\n </pw-input-container>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.ContactEmail' | transloco\"\n class=\"col-md-6\"\n label=\"Contact Email\"\n name=\"contact_email\"\n controlId=\"user-subscription-contact_email\"\n errorMsg=\"Please enter Contact Email\">\n <input type=\"text\"\n id=\"user-subscription-contact_email\"\n class=\"form-control\"\n formControlName=\"contact_email\"\n aria-label=\"Contact Email\" />\n </pw-input-container>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.Organization' | transloco\"\n class=\"col-md-6\"\n label=\"Organisation\"\n name=\"organisation\"\n controlId=\"user-subscription-organisation\"\n errorMsg=\"Please enter organisation\">\n <input type=\"text\"\n id=\"user-subscription-organisation\"\n class=\"form-control\"\n formControlName=\"organisation\"\n aria-label=\"Organisation\" />\n </pw-input-container>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.Phone' | transloco\"\n class=\"col-md-6\"\n label=\"Contact Tel\"\n name=\"contact_tel\"\n controlId=\"user-subscription-contact_tel\"\n errorMsg=\"Please enter Contact Telephone Number\">\n <input type=\"text\"\n id=\"user-subscription-contact_tel\"\n class=\"form-control\"\n formControlName=\"contact_tel\"\n aria-label=\"Contact Tel\" />\n </pw-input-container>\n @if (countries$ | async; as countries) {\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.Country' | transloco\"\n class=\"col-md-6\"\n label=\"Country\"\n name=\"country_code\"\n controlId=\"user-subscription-country_code\"\n [useAriaLabelledbyOnly]=\"true\"\n [isLeftTooltip]=\"true\"\n errorMsg=\"Please select a country\">\n <p-select\n [attr.aria-labelledby]=\"'user-subscription-country_code-label'\"\n [options]=\"countries\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"country_code\"\n placeholder=\"Select Country\">\n </p-select>\n </pw-input-container>\n }\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.Address' | transloco\"\n class=\"col-md-6\"\n label=\"Address\"\n name=\"address\"\n controlId=\"user-subscription-address\"\n [useAriaLabelledbyOnly]=\"true\"\n errorMsg=\"Please enter address\">\n <input ngx-gp-autocomplete\n id=\"user-subscription-address\"\n name=\"address\"\n class=\"form-control\"\n [attr.aria-labelledby]=\"'user-subscription-address-label'\"\n #places=\"ngx-places\"\n formControlName=\"address\"\n (onAddressChange)=\"handleAddressChange($event)\"\n aria-label=\"Address\" />\n </pw-input-container>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.VatNumber' | transloco\"\n class=\"col-md-6\"\n label=\"GST/VAT Number\"\n name=\"tax_id\"\n controlId=\"user-subscription-tax_id\"\n errorMsg=\"Please enter GST/VAT Number\">\n <input type=\"text\"\n id=\"user-subscription-tax_id\"\n class=\"form-control\"\n formControlName=\"tax_id\"\n aria-label=\"Tax Id\" />\n </pw-input-container>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.CompanyUrl' | transloco\"\n class=\"col-md-6\"\n label=\"Company URL\"\n name=\"company_url\"\n controlId=\"user-subscription-company_url\"\n errorMsg=\"Please enter company url\">\n <input type=\"text\"\n id=\"user-subscription-company_url\"\n class=\"form-control\"\n formControlName=\"company_url\"\n aria-label=\"Company Url\" />\n </pw-input-container>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.InvoiceRecipientEmails' | transloco\"\n class=\"col-md-6\"\n label=\"Invoice Recipient Emails\"\n name=\"invoice_recipient_emails\"\n controlId=\"user-subscription-invoice_recipient_emails\"\n errorMsg=\"Please enter valid email addresses separated by commas\">\n <input type=\"text\"\n id=\"user-subscription-invoice_recipient_emails\"\n class=\"form-control\"\n formControlName=\"invoice_recipient_emails\"\n placeholder=\"email1@example.com,email2@example.com\"\n aria-label=\"email1@example.com,email2@example.com\" />\n </pw-input-container>\n\n <!-- 2. Branding / Logos -->\n <div class=\"col-12\">\n <div class=\"row branding-section\">\n <div class=\"col-12\">\n <h3>Branding</h3>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"text-center mt-5\">\n <div class=\"image-container\">\n <h4 class=\"mb-2\">{{ 'User.Subscriptions.FullLogo' | transloco }}\n <span class=\"tooltip-wrap ms-1\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.FullLogo'|transloco\"\n [appendTo]=\"'body'\"\n [tooltipPosition]=\"'top'\">\n <i class=\"far fa-info-circle text-muted\"></i>\n </span>\n </h4>\n @if (fullLogo && !fullLogo.includes('no_image_uploaded') && !fullLogoBroken) {\n <img [src]=\"fullLogo\"\n alt=\"full logo\"\n class=\"image full-logo\"\n role=\"presentation\"\n (error)=\"fullLogoBroken = true\" />\n <div class=\"overlay mt-2\"\n (keydown.enter)=\"openModal(content)\"\n (click)=\"openModal(content)\">\n <div class=\"overlay-text\">\n <a aria-label=\"Navigate to Target\">{{ 'User.Profile.Change' | transloco }}</a>\n </div>\n </div>\n } @else {\n <div class=\"logo-dropzone full-dropzone\"\n role=\"button\"\n tabindex=\"0\"\n aria-label=\"Upload full logo\"\n (keydown.enter)=\"openModal(content)\"\n (click)=\"openModal(content)\">\n <i class=\"fas fa-upload\"></i>\n <span class=\"dropzone-title\">Upload a logo</span>\n <span class=\"dropzone-hint\">PNG or JPG</span>\n </div>\n }\n </div>\n </div>\n </div>\n <div class=\"col-md-6\">\n <div class=\"text-center mt-5\">\n <div class=\"image-container\">\n <h4 class=\"mb-2\">Squared Logo\n <span class=\"tooltip-wrap ms-1\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.SquaredLogo'|transloco\"\n [appendTo]=\"'body'\"\n [tooltipPosition]=\"'top'\">\n <i class=\"far fa-info-circle text-muted\"></i>\n </span>\n </h4>\n @if (squaredLogo && !squaredLogo.includes('no_image_uploaded') && !squaredLogoBroken) {\n <img [src]=\"squaredLogo\"\n alt=\"Squared Presentation\"\n class=\"squared_logo\"\n role=\"presentation\"\n (error)=\"squaredLogoBroken = true\" />\n <div class=\"overlay mt-2\"\n (keydown.enter)=\"openModal(squaredLogoContent)\"\n (click)=\"openModal(squaredLogoContent)\">\n <div class=\"overlay-text\">\n <a aria-label=\"Navigate to Target\">{{ 'User.Profile.Change' | transloco }}</a>\n </div>\n </div>\n } @else {\n <div class=\"logo-dropzone squared-dropzone\"\n role=\"button\"\n tabindex=\"0\"\n aria-label=\"Upload squared logo\"\n (keydown.enter)=\"openModal(squaredLogoContent)\"\n (click)=\"openModal(squaredLogoContent)\">\n <i class=\"fas fa-upload\"></i>\n <span class=\"dropzone-title\">Upload a logo</span>\n <span class=\"dropzone-hint\">PNG or JPG</span>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- 3. Social Media -->\n <ng-container *rbacAllow=\"'SubscriptionSuperAdmin'\">\n <div class=\"col-12\">\n <h3>Social Media</h3>\n <p>\n Any of the social media handles that you set here will appear in the footer of emails going out to your child subscriptions.\n </p>\n </div>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.FacebookHandle' | transloco\"\n class=\"col-md-6\"\n label=\"Facebook handle\"\n name=\"facebook_handle\"\n controlId=\"user-subscription-facebook_handle\"\n errorMsg=\"Please enter facebook id\">\n <input type=\"text\"\n id=\"user-subscription-facebook_handle\"\n class=\"form-control\"\n formControlName=\"facebook_handle\"\n aria-label=\"Facebook Handle\" />\n </pw-input-container>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.TwitterHandle' | transloco\"\n class=\"col-md-6\"\n label=\"Twitter handle\"\n name=\"twitter_handle\"\n controlId=\"user-subscription-twitter_handle\"\n errorMsg=\"Please enter twitter id\">\n <input type=\"text\"\n id=\"user-subscription-twitter_handle\"\n class=\"form-control\"\n formControlName=\"twitter_handle\"\n aria-label=\"Twitter Handle\" />\n </pw-input-container>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.LinkedinHandle' | transloco\"\n class=\"col-md-6\"\n label=\"Linkedin handle\"\n name=\"linkedin_handle\"\n controlId=\"user-subscription-linkedin_handle\"\n errorMsg=\"Please enter linkedin id\">\n <input type=\"text\"\n id=\"user-subscription-linkedin_handle\"\n class=\"form-control\"\n formControlName=\"linkedin_handle\"\n aria-label=\"Linkedin Handle\" />\n </pw-input-container>\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.RedditHandle' | transloco\"\n class=\"col-md-6\"\n label=\"Reddit handle\"\n name=\"reddit_handle\"\n controlId=\"user-subscription-reddit_handle\"\n errorMsg=\"Please enter reddit id\">\n <input type=\"text\"\n id=\"user-subscription-reddit_handle\"\n class=\"form-control\"\n formControlName=\"reddit_handle\"\n aria-label=\"Reddit Handle\" />\n </pw-input-container>\n </ng-container>\n\n <!-- 4. Seats -->\n <div class=\"col-12\">\n <div class=\"row seats-section\">\n <div class=\"col-12\">\n <h3>Seats</h3>\n <p>Changing the number of seats updates your subscription cost.</p>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n @if (subscription?.trial_subscription && subscription?.calculated_price) {\n <small\n class=\"text-danger\">Upgrade to be able to update your purchased seats</small>\n }\n </div>\n </div>\n <div class=\"row btns-row align-items-center\">\n @if (subscription) {\n <div class=\"col-md-3 col-8\"\n >\n <label for=\"user-subscription-seats\" class=\"visually-hidden\">{{ 'User.Subscriptions.Tooltip.Seats' | transloco }}</label>\n <pw-number-picker [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.Seats'|transloco\"\n inputId=\"user-subscription-seats\"\n name=\"number-picker\"\n [(value)]=\"units\"\n [min]=\"subscription?.min_units||subscription?.products[0].min_units\"\n [max]=\"subscription?.products[0].max_units\"\n step=\"1\"\n postfix=\"seats\"\n placeholder=\"Total Licences\"\n [inputReadOnly]=\"subscription?.products[0].trial_subscription\"\n [showUpButton]=\"!subscription?.products[0].trial_subscription\"\n [showDownButton]=\"!subscription?.products[0].trial_subscription\"\n size=\"small\"\n pickStartAfter=\"500\"\n pickTimer=\"100\"\n [arrowKeys]=\"true\"\n (minReached)=\"onMinReached($event)\"\n (maxReached)=\"onMaxReached($event)\"\n (valueChange)=\"onUnitChange($event)\">\n </pw-number-picker>\n </div>\n }\n\n @if (subscription) {\n <div class=\"col-md-3 col-4 p-1\"\n >\n @if (!subscription?.products[0].trial_subscription && allowUpdate) {\n <button type=\"button\"\n class=\"btn btn-primary\"\n (click)=\"updateUnits()\">\n {{ 'User.Subscriptions.UpdateUnits' | transloco }}\n </button>\n } @else {\n <div>\n @if (subscription?.products[0].trial_subscription) {\n <small class=\"text-muted\"\n >Update seats is available only to paid subscriptions</small>\n }\n </div>\n }\n </div>\n }\n\n @if (hasUnitChanged) {\n <div class=\"col-12 col-md-6\"\n >\n <table class=\"table table-borderless table-sm\"\n aria-describedby=\"Product details\">\n <thead>\n <tr>\n <th scope=\"true\">Product</th>\n <th scope=\"true\">Price per seat <span>({{subscription?.products[0]?.currency|currencySymbol}})</span></th>\n <th scope=\"true\">Seats</th>\n </tr>\n </thead>\n <tbody>\n @for (product of subscription.products; track trackByProduct($index, product)) {\n <tr>\n <td>{{ product.name }}</td>\n <td>{{ product.price_per_unit / 100 }}</td>\n <td>{{ units }}</td>\n </tr>\n }\n </tbody>\n </table>\n <p>\n If you proceed, the new cost for your subscription will be\n <strong>{{ totalAmount()| currency: subscription?.products[0]?.currency:'symbol-narrow'}}</strong>\n </p>\n </div>\n }\n </div>\n </div>\n\n <!-- 5. API & MCP Credentials -->\n @if (subscription?.api_hits_max > 0) {\n <div class=\"col-12\">\n <h3>{{ 'User.Subscriptions.APICredentials.Title' | transloco }}</h3>\n <p>\n These credentials authenticate both REST API and MCP (Model Context Protocol) requests, and must be used together with the user tokens defined on your Account page.\n </p>\n </div>\n <div class=\"col-md-6\">\n <div class=\"form-group\">\n <label class=\"form-label\" for=\"user-subscription-api-token\">\n {{ 'User.Subscriptions.APICredentials.AccessToken' | transloco }}\n <span class=\"tooltip-wrap ms-1\"\n pTooltip=\"The subscription token has been discontinued in favour of the user token defined on your Account page.\"\n [appendTo]=\"'body'\"\n [tooltipPosition]=\"'top'\">\n <i class=\"far fa-info-circle text-muted\"></i>\n </span>\n </label>\n <div class=\"input-group\">\n <input type=\"text\"\n id=\"user-subscription-api-token\"\n name=\"api_token\"\n class=\"form-control\"\n [value]=\"showApiToken ? subscription?.api_access_token || ('User.Subscriptions.APICredentials.NoTokenAvailable' | transloco) : '*************************'\"\n readonly\n aria-label=\"Api Token\" />\n <button type=\"button\"\n class=\"btn btn-outline-secondary\"\n (click)=\"toggleApiTokenVisibility()\">\n {{ showApiToken ? ('User.Subscriptions.APICredentials.Hide' | transloco) : ('User.Subscriptions.APICredentials.View' | transloco) }}\n </button>\n </div>\n </div>\n </div>\n <div class=\"col-md-6\">\n <div class=\"form-group\">\n <label class=\"form-label\" for=\"user-subscription-api-client-id\">{{ 'User.Subscriptions.APICredentials.ClientId' | transloco }}</label>\n <div class=\"input-group\">\n <input type=\"text\"\n id=\"user-subscription-api-client-id\"\n name=\"api_client_id\"\n class=\"form-control\"\n [value]=\"showApiClientId ? subscription?.api_client_id || ('User.Subscriptions.APICredentials.NoClientIdAvailable' | transloco) : '*************************'\"\n readonly\n aria-label=\"Api Client Id\" />\n <button type=\"button\"\n class=\"btn btn-outline-secondary\"\n (click)=\"toggleApiClientIdVisibility()\">\n {{ showApiClientId ? ('User.Subscriptions.APICredentials.Hide' | transloco) : ('User.Subscriptions.APICredentials.View' | transloco) }}\n </button>\n </div>\n </div>\n </div>\n <div class=\"col-12 mt-3\">\n <div class=\"d-flex align-items-center gap-3\">\n <button type=\"button\"\n class=\"btn btn-outline-secondary\"\n (click)=\"refreshApiTokens()\"\n [disabled]=\"refreshingTokens\">\n <i class=\"fas fa-sync-alt me-2\" [class.fa-spin]=\"refreshingTokens\"></i>\n {{ refreshingTokens ? ('User.Subscriptions.APICredentials.Refreshing' | transloco) : ('User.Subscriptions.APICredentials.RefreshTokens' | transloco) }}\n </button>\n <div class=\"d-flex align-items-center gap-2\">\n @if (subscription?.api_hits !== null) {\n <span class=\"text-muted\">{{ 'User.Subscriptions.APICredentials.ApiHits' | transloco }}:</span>\n <span class=\"fw-bold\">{{ subscription.api_hits | number }}</span>\n }\n @if (subscription?.api_hits_max !== null) {\n <span class=\"text-muted\">{{ 'User.Subscriptions.APICredentials.ApiHitsMax' | transloco }}:</span>\n <span class=\"fw-bold\">{{ subscription.api_hits_max | number }}</span>\n }\n <!-- Show utilization percentage when both values exist -->\n @if (subscription?.api_hits !== null || subscription?.api_hits_max !== null) {\n <span class=\"text-muted ms-2\">(</span>\n <span class=\"fw-bold\" [ngClass]=\"{\n 'text-success-muted': (subscription.api_hits / subscription.api_hits_max) <= 0.8,\n 'text-warning': (subscription.api_hits / subscription.api_hits_max) > 0.8 && (subscription.api_hits / subscription.api_hits_max) <= 0.9,\n 'text-danger': (subscription.api_hits / subscription.api_hits_max) > 0.9\n }\">\n {{ (subscription.api_hits / subscription.api_hits_max * 100) | number:'1.0-0' }}% consumed\n </span>\n <span class=\"text-muted\">)</span>\n }\n </div>\n </div>\n </div>\n }\n\n <!-- 6. Security -->\n <div class=\"col-12\">\n <h3>Security</h3>\n <p>\n While we'll add more security options in the future, please start by enforcing 2FA for all your subscription members.\n </p>\n </div>\n <div class=\"col-12 col-sm-3\">\n <pw-input-container label=\"Enforce 2FA\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.Enforce2fa' | transloco\"\n name=\"enforce_2fa\"\n controlId=\"user-subscription-enforce_2fa\"\n [useAriaLabelledbyOnly]=\"true\">\n <ui-switch formControlName=\"enforce_2fa\"\n name=\"enforce_2fa\"\n [attr.aria-labelledby]=\"'user-subscription-enforce_2fa-label'\"> </ui-switch>\n </pw-input-container>\n </div>\n\n <!-- 7. Brain AI data -->\n <div class=\"col-12\">\n <h3>{{ 'User.Subscriptions.BrainData.Title' | transloco: { brand: brandName } }}</h3>\n <p>{{ 'User.Subscriptions.BrainData.Description' | transloco: { brand: brandName } }}</p>\n </div>\n <div class=\"col-12 col-sm-3\">\n <pw-input-container [label]=\"'User.Subscriptions.BrainData.UseOwnDataLabel' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.RagUseOwnData' | transloco: { brand: brandName }\"\n name=\"rag_use_own_data\"\n controlId=\"user-subscription-rag_use_own_data\"\n [useAriaLabelledbyOnly]=\"true\">\n <ui-switch formControlName=\"rag_use_own_data\"\n name=\"rag_use_own_data\"\n [attr.aria-labelledby]=\"'user-subscription-rag_use_own_data-label'\"> </ui-switch>\n </pw-input-container>\n </div>\n <!-- Keeping personal data is a question about WHAT is kept, so it only\n arises while there is something to keep. Hidden rather than disabled:\n a greyed-out switch still reads as an affordance, and the stored value\n survives in the form either way. -->\n @if (form.value.rag_use_own_data) {\n <div class=\"col-12 col-sm-3\">\n <pw-input-container [label]=\"'User.Subscriptions.BrainData.KeepPiiLabel' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'User.Subscriptions.Tooltip.RagKeepPii' | transloco: { brand: brandName }\"\n name=\"rag_keep_pii\"\n controlId=\"user-subscription-rag_keep_pii\"\n [useAriaLabelledbyOnly]=\"true\">\n <ui-switch formControlName=\"rag_keep_pii\"\n name=\"rag_keep_pii\"\n [attr.aria-labelledby]=\"'user-subscription-rag_keep_pii-label'\"> </ui-switch>\n </pw-input-container>\n </div>\n } @else {\n <div class=\"col-12 col-sm-6\">\n <p>{{ 'User.Subscriptions.BrainData.KeepPiiNotApplicable' | transloco: { brand: brandName } }}</p>\n </div>\n }\n <div class=\"mb-3 col-12 text-end mt-3\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n routerLink=\"/account/subscriptions\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button name=\"submit\"\n type=\"submit\"\n [buttonBusy]=\"busyButton\"\n class=\"btn btn-primary\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n </form>\n}\n\n<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h3 class=\"modal-title mb-0 p-0\">{{ 'User.Subscriptions.FullLogo' | transloco }}</h3>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <small> {{ 'User.Profile.PictureMessage' | transloco }}</small>\n <pw-image-cropper #profile\n (imageSelectionEvent)=\"onImageSelection($event)\"\n aspectRatio=\"fullLogo\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n<ng-template #squaredLogoContent\n let-modal>\n <div class=\"modal-header\">\n <h3 class=\"modal-title mb-0 p-0\">{{ 'User.Subscriptions.SquaredLogo' | transloco }}</h3>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <small> {{ 'User.Profile.PictureMessage' | transloco }}</small>\n <pw-image-cropper #profile\n (imageSelectionEvent)=\"uploadSquaredLogo($event)\"\n aspectRatio=\"auto\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n<pw-password-validation #modal\n(successEvent)=\"onPasswordValidation($event)\"> </pw-password-validation>\n","/*\n * @Author: anikets43\n * @description: shows all the subscribed user products\n * Account => Subscription\n */\n\nimport { Clipboard } from '@angular/cdk/clipboard';\nimport { HttpParams } from '@angular/common/http';\nimport {\n ChangeDetectorRef,\n Component,\n Injector,\n OnDestroy,\n OnInit,\n TemplateRef,\n ViewChild\n} from '@angular/core';\n\nimport { AdminService } from '@posiwise/admin-module-utils';\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AppState, GetUser } from '@posiwise/app-store';\nimport { PermissionService, SubscriptionService } from '@posiwise/common-services';\nimport { Product, Subscription, User } from '@posiwise/common-utilities';\nimport { ConfirmDialogService, PasswordValidationComponent } from '@posiwise/shared-components';\n\nimport sortBy from 'lodash/sortBy';\nimport { MenuItem } from 'primeng/api';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\nimport { Store } from '@ngrx/store';\n\nimport { CurrentItem } from '../../../shared/interface/user-module.interface';\nimport { AddSubscriptionComponent } from '../add-subscription/add-subscription.component';\n\n@Component({\n selector: 'pw-user-subscriptions-list',\n templateUrl: './user-subscriptions-list.component.html',\n styleUrls: ['./user-subscriptions-list.component.scss'],\n\n standalone: false\n})\nexport class UserSubscriptionListComponent extends AppBaseComponent implements OnInit, OnDestroy {\n @ViewChild('menuItems', { static: false })\n menu: MenuItem[];\n\n @ViewChild(AddSubscriptionComponent, { static: false })\n changeSubscriptionRef: AddSubscriptionComponent;\n\n @ViewChild('passwordValidationModalForAccountDelete', { static: false })\n passwordValidationModalForAccountDelete: PasswordValidationComponent;\n\n @ViewChild('passwordValidationModalForKey', { static: false })\n passwordValidationModalForKey: PasswordValidationComponent;\n\n @ViewChild('passwordValidationForUnsubscribe', { static: false })\n passwordValidationForUnsubscribe: PasswordValidationComponent;\n\n @ViewChild('cancelSubscriptionModal', { static: false })\n cancelSubscriptionModal: TemplateRef<unknown>;\n\n showApiKey = true;\n\n password: string;\n productName: string;\n\n subscribedSubscriptions = [];\n\n activeItem: MenuItem;\n\n isAddNew: boolean;\n\n user: User;\n\n isUpdatePayment: false;\n\n selectedSubscription: { id: number; productId: number };\n\n editing: boolean;\n\n isLoaded = false;\n\n reasonToCancel = '';\n\n currentItem: CurrentItem;\n\n showTos = false;\n\n objectKeys = Object.keys;\n\n items: MenuItem[] = [\n { id: 'profile', label: 'Profile', icon: 'fa fa-fw fa-user-cog' },\n { id: 'subscription', label: 'Subscription', icon: 'fa fa-fw fa-book' },\n { id: 'invoice', label: 'Invoice', icon: 'fa fa-file-invoice-dollar' }\n ];\n\n productId: number;\n\n constructor(\n private readonly subscriptionService: SubscriptionService,\n private readonly adminService: AdminService,\n private readonly modalService: NgbModal,\n private readonly store: Store<AppState>,\n private readonly clipboard: Clipboard,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef,\n private readonly confirmDialog: ConfirmDialogService\n ) {\n super(injector);\n this.getSubscribedProduct = this.getSubscribedProduct.bind(this);\n }\n\n ngOnInit() {\n this.route.queryParams.subscribe(params => {\n this.isAddNew = params['isNew'];\n this.getSubscribedProduct();\n this.selectedSubscription = null;\n this.cdr.markForCheck();\n });\n\n [this.activeItem] = this.items;\n }\n\n onClipboardCopy(accessCode: string) {\n this.clipboard.copy(accessCode);\n this.toast.success('Access Key copied to the clipboard');\n }\n\n attemptUnsubscribe(item, productId: number) {\n this.selectedSubscription = item;\n this.selectedSubscription.productId = productId;\n if (this.user.has_password) {\n this.passwordValidationForUnsubscribe.open();\n } else {\n this.noPasswordModal();\n }\n }\n\n openCancelSubscriptionModal() {\n this.modalService.open(this.cancelSubscriptionModal, {\n centered: true,\n windowClass: 'modal-holder'\n });\n }\n\n private getSubscribedProduct() {\n this.userStore().subscribe(user => {\n this.user = user;\n if (user) {\n this.userService.getUserSubscriptions(user.id).subscribe(response => {\n this.subscribedSubscriptions = sortBy(response.subscriptions, 'deleted');\n response?.expired_subscriptions.forEach(subscription => {\n this.subscribedSubscriptions.push(subscription);\n });\n this.subscribedSubscriptions.forEach(subscription => {\n subscription.products.forEach((product: Product) => {\n product.masked = product.api_access_token\n ? '*************************'\n : null;\n });\n });\n this.isLoaded = true;\n this.cdr.markForCheck();\n });\n }\n this.cdr.markForCheck();\n });\n }\n\n updateApiKey(subscription, product) {\n this.subscriptionService\n .updateSubscriptionAPIKey(subscription.id, product.id)\n .subscribe(response => {\n product.api_access_token = response;\n this.toast.success(this.translation.translate('User.Subscriptions.UpdatedKey'));\n this.getSubscribedProduct();\n this.cdr.markForCheck();\n });\n }\n\n showKey(item) {\n this.currentItem = item;\n this.passwordValidationModalForKey.open();\n this.showApiKey = false;\n }\n\n displayApiKey() {\n this.showApiKey = true;\n this.currentItem.masked = this.currentItem?.api_access_token;\n }\n\n activateMenu() {\n this.activeItem = this.menu['activeItem'];\n if (this.activeItem.id === 'subscription') {\n this.getSubscribedProduct();\n }\n }\n\n onUnsubscribe(item, reasonToCancel: string) {\n const httpParams = new HttpParams().set('product_id', item.productId);\n const requestOptions = {\n params: httpParams,\n body: {\n reason_to_cancel: reasonToCancel\n }\n };\n this.subscriptionService.deleteSubscription(item.id, requestOptions).subscribe(() => {\n this.store.dispatch(new GetUser());\n this.modalService.dismissAll();\n this.getSubscribedProduct();\n this.selectedSubscription = null;\n this.reasonToCancel = '';\n this.cdr.markForCheck();\n });\n }\n\n onValidatePassword(isSuccess: boolean) {\n if (isSuccess) {\n // Password validation component already closes its modal\n // Use setTimeout to ensure modal is fully closed before opening the next one\n setTimeout(() => {\n this.openCancelSubscriptionModal();\n }, 100);\n }\n }\n\n onConfirmCancel() {\n if (!this.reasonToCancel || this.reasonToCancel.trim() === '') {\n this.toast.error(\n this.translation.translate('User.Subscriptions.Validation.ReasonRequired')\n );\n return;\n }\n this.onUnsubscribe(this.selectedSubscription, this.reasonToCancel);\n }\n\n discardEdit() {\n this.editing = false;\n this.selectedSubscription = null;\n }\n\n onSaveDetails() {\n this.toast.success(this.translation.translate('User.Subscriptions.UpdatedMessage'));\n this.editing = false;\n }\n\n onUpdatePaymentDetailsCancel() {\n this.router.navigate(['.'], { relativeTo: this.route, queryParams: {} });\n }\n\n attemptUpgrade(subscription: Subscription, product: Product) {\n if (this.user.has_password) {\n this.router.navigate([\n `account/subscriptions/upgrade/${subscription.id}/${product.id}`\n ]);\n } else {\n this.noPasswordModal();\n }\n }\n\n private noPasswordModal() {\n this.confirmDialog.open({\n title: 'Set Password',\n text: 'Please set a password before changing the subscription in the account section.',\n confirmOnly: true\n });\n }\n\n showModalForAccountDeletion() {\n this.confirmDialog\n .confirmDelete({\n textKey: 'Common.Confirm.Delete.TextSimple',\n textParams: { entityType: 'account' }\n })\n .then(ok => {\n if (ok) {\n this.passwordValidationModalForAccountDelete.open();\n }\n });\n }\n\n deleteUser(_event) {\n const subscriptionId = PermissionService.selectedSubscription.id;\n this.adminService.deleteUser(this.user.id, subscriptionId).subscribe(() => {\n this.router.navigate(['logout']);\n this.cdr.markForCheck();\n });\n }\n\n showPrivacyAndTos(product: Product) {\n this.productId = product.id;\n this.productName = product.name;\n this.showTos = true;\n }\n\n onCancel() {\n this.showTos = false;\n }\n\n trackBySubscription(_index: number, item: { id: number }) {\n return item.id;\n }\n\n trackByProduct(_index: number, item: { id: number }) {\n return item.id;\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n }\n}\n","@if (!showTos) {\n <!-- Subscriptions Tab Content -->\n @if (!editing && !isAddNew) {\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>Your Subscriptions</h2>\n <p>You'll find in this section the summary of your subscriptions.</p>\n </div>\n </div>\n }\n <!-- Subscribed Product Cards -->\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (\n !editing && !isAddNew && !isUpdatePayment && isLoaded && subscribedSubscriptions.length\n ) {\n <div class=\"row\"\n >\n @for (subscription of subscribedSubscriptions; track trackBySubscription($index, subscription)) {\n <div class=\"col-12 col-md-6 my-3\"\n >\n <div class=\"subscription-details mb-4\">\n <div class=\"subscription-summary d-flex flex-wrap justify-content-between align-items-start gap-2 mb-3\">\n <div class=\"subscription-summary__info\">\n <div>\n <strong>Organisation:</strong>\n {{ subscription.organisation ? subscription.organisation : subscription.contact_name }}\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.TotalPriceExclTax' | transloco }}:</strong>\n @if (subscription.calculated_price) {\n {{ subscription.products[0]?.currency }} {{ subscription.calculated_price / 100 | number:'1.2-2' }}\n {{ subscription.products[0].trial_subscription ? '(After Trial)' : '' }}\n } @else {\n Free\n }\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.SeatsInUse' | transloco }}:</strong>\n {{ subscription.units_in_use || 1 }} / {{ subscription.purchased_units }}\n @if (subscription.purchased_units) {\n <span class=\"seats-usage\"\n [style.--seats-pct]=\"(subscription.units_in_use || 1) / subscription.purchased_units\"></span>\n }\n </div>\n </div>\n <!-- Subscription-level actions (a subscription may hold multiple products) -->\n @if (\n (subscription.is_subscription_owner || subscription.is_subscription_admin) &&\n subscription.products?.length &&\n !subscription.products[0].deleted &&\n !subscription.products[0].dependency_products?.length\n ) {\n <div class=\"subscription-summary__actions d-flex flex-wrap align-items-center gap-2\">\n <a class=\"btn btn-outline-primary btn-sm\"\n aria-label=\"Navigate to Target\"\n [routerLink]=\"['../subscriptions', subscription.id]\">\n {{ 'Button.Edit' | transloco }}\n </a>\n @if (!subscription.products[0].expired && !subscription.products[0].trial_subscription) {\n <button [routerLink]=\"['../subscriptions', subscription.id, 'credential']\"\n class=\"btn btn-outline-secondary btn-sm\">\n {{ 'User.Subscriptions.Credentials' | transloco }}\n </button>\n }\n @if (!isUpdatePayment && subscription.stripe_customer_id) {\n <a class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"['../subscriptions', subscription.id, 'product', subscription.products[0].id, 'update-payment']\">\n <i class=\"fa fa-edit me-1\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.UpdateCardDetails' | transloco }}</a>\n }\n <button class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"'/account/subscriptions/add-new'\"\n [queryParams]=\"{ subscription_id: subscription.id }\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.ManageAllProducts' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n <i class=\"fa fa-plus me-1\"></i>{{ 'User.Subscriptions.SeeAllProducts' | transloco }}\n </button>\n </div>\n }\n </div>\n <!-- Products list -->\n @for (\n product of subscription.products; track trackByProduct($index,\n product); let first = $first) {\n <div class=\"mb-3\">\n <div class=\"card subscription-products-cards\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <div>\n <h4 class=\"mb-3 text-bold-500 primary\">{{ product?.name }}</h4>\n <!-- Frequency -->\n <div>\n <div>\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.Frequency' | transloco\n }}:</strong>\n {{ product?.billing_frequency | uppercase }}\n </div>\n </div>\n <!-- Expiration -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n product.expired ? 'Expired' : 'Expiry Date'\n }}:</strong>\n {{ product.expires_at | dateFormat }}\n </div>\n <!-- Estimated Price -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.PriceExclTax' | transloco\n }}:</strong>\n {{ product.currency }}\n {{ (product.calculated_price / 100) | number:'1.2-2' }}\n </div>\n <!-- Product API Key (Alpha-only) -->\n <ng-container *rbacAllow=\"'Pages.Alpha'\">\n @if (\n (product.stripe_plan_id && product.max_hits > 0) ||\n product.max_hits_trial > 0\n ) {\n <div class=\"d-flex align-items-center\">\n <strong class=\"d-inline-block w-50\">\n {{ 'User.Subscriptions.ApiKey' | transloco }}:\n <i class=\"far fa-info-circle ms-1 text-muted\"\n aria-hidden=\"true\"\n [pTooltip]=\"'User.Subscriptions.ApiKey.NotUsedHint' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"></i>\n </strong>\n <code class=\"text-truncate me-2\">{{ product.masked }}</code>\n <span class=\"ms-auto d-flex align-items-center flex-shrink-0\">\n <!-- Show Access Key -->\n <button class=\"btn\"\n pTooltip=\"Show Access Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"showKey(product)\">\n <i class=\"fas fa-eye\" aria-hidden=\"true\"></i>\n </button>\n <!-- Copy To Clipboard -->\n <button class=\"btn\"\n pTooltip=\"Copy Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <i class=\"fal fa-copy\"\n aria-hidden=\"true\"\n (click)=\"onClipboardCopy(product.api_access_token)\"\n (keydown.enter)=\"onClipboardCopy(product.api_access_token)\"></i>\n </button>\n <!-- Update API Key -->\n @if (!product.expired && !product.deleted) {\n <button class=\"btn\"\n pTooltip=\"Change Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"updateApiKey(subscription, product)\">\n <i class=\"fal fa-sync-alt\" aria-hidden=\"true\"></i>\n </button>\n }\n </span>\n </div>\n }\n </ng-container>\n </div>\n </div>\n <div class=\"card-footer px-3 d-flex flex-column gap-2\">\n <div class=\"footer-status d-flex flex-wrap align-items-center gap-2\">\n @if (product.deleted && !product.expired) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.OutdatedMessage' | transloco }}\n </span>\n }\n @if (product.deleted) {\n <span class=\"badge bg-danger\">Deleted</span>\n }\n @if (\n product.trial_subscription &&\n product.calculated_price\n ) {\n <span class=\"badge bg-warning\">Trial</span>\n }\n @if (product?.pause_collection && objectKeys(product?.pause_collection)?.length) {\n <span class=\"badge bg-grey\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.PausedCollection'|transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n Paused collection\n </span>\n }\n @if (!product.calculated_price) {\n <span class=\"badge bg-success\">Free</span>\n }\n @if (!product?.deleted && !subscription.is_subscription_owner) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>Invited to use this product\n @if (subscription.is_subscription_admin) {\n <span class=\"badge bg-role-admin ms-1\">as an admin</span>\n }\n </span>\n }\n </div>\n @if (\n subscription.is_subscription_owner ||\n subscription.is_subscription_admin\n ) {\n <div class=\"footer-actions d-flex flex-wrap align-items-center justify-content-end gap-2\">\n <!-- Unsubscribe -->\n @if (\n subscription?.stripe_customer_id &&\n !product?.deleted &&\n !product?.trial_subscription\n ) {\n <button class=\"btn btn-outline-danger btn-sm\"\n (click)=\"attemptUnsubscribe(subscription, product.id)\">\n {{ 'User.Subscriptions.Unsubscribe' | transloco }}\n </button>\n }\n @if (product.stripe_plan_id && product.active) {\n <!-- Upgrade (single primary CTA) -->\n @if (product.trial_subscription && !product.deleted) {\n <button class=\"btn btn-primary btn-sm\"\n (click)=\"attemptUpgrade(subscription, product)\">\n {{ 'Button.Upgrade' | transloco }}\n </button>\n }\n <!-- Subscribe -->\n @if (subscription.expired && product.stripe_plan_id) {\n <button class=\"btn btn-primary btn-sm\"\n [routerLink]=\"'/account/subscriptions/add-new'\">\n {{ 'User.Subscriptions.Subscribe' | transloco }}\n </button>\n }\n }\n <!-- Privacy & Terms of Service (quiet link, not a button) -->\n @if (product?.product_privacy_service_id) {\n <button class=\"btn btn-link btn-sm p-0 footer-tos-link\"\n (click)=\"showPrivacyAndTos(product)\">\n {{\n 'User.Subscriptions.PrivacyAndTermsOfService'\n | transloco\n }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n @if (subscription.products.length === 0) {\n <div>\n <div class=\"card\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <p class=\"text-center\">\n No product available for this subscription\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n @if (!editing && !isAddNew && !isUpdatePayment) {\n <div class=\"col-12\"\n >\n @if (subscribedSubscriptions.length === 0) {\n <pw-no-data [withImage]=\"true\" message=\"You don't have any subscription.\"\n >\n </pw-no-data>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n <!-- Danger zone (demoted account deletion) -->\n @if (!editing && !isAddNew && !isUpdatePayment && isLoaded) {\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"danger-zone mt-4\">\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger danger-zone__action\"\n (click)=\"showModalForAccountDeletion()\"\n [pTooltip]=\"'User.Account.Tooltip.DeleteAccount' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n {{ 'User.Account.DeleteAccount' | transloco }}\n </button>\n </div>\n </div>\n </div>\n }\n <!--\n Add New Subscription\n -->\n <!-- <ng-template [ngIf]=\"isAddNew && !isUpdatePayment\">\n <pw-subscription-details></pw-subscription-details>\n</ng-template> -->\n<!--\nValidate Password For Account Delete\n-->\n<pw-password-validation #passwordValidationModalForAccountDelete\n [destructive]=\"true\"\n (successEvent)=\"deleteUser($event)\">\n</pw-password-validation>\n<!--\nValidate Password For Display Key\n-->\n<pw-password-validation #passwordValidationModalForKey\n (successEvent)=\"displayApiKey()\">\n</pw-password-validation>\n<!--\nValidate Password For Unsubscribe\n-->\n<pw-password-validation #passwordValidationForUnsubscribe\n [destructive]=\"true\"\n (successEvent)=\"onValidatePassword($event)\">\n</pw-password-validation>\n<!--\nCancel Subscription Modal\n-->\n<ng-template #cancelSubscriptionModal let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\">{{ 'User.Subscriptions.CancelSubscription.Title' | transloco }}</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss(); reasonToCancel = '';\">\n </button>\n </div>\n <div class=\"modal-body\">\n <p>{{ 'User.Subscriptions.CancelSubscription.Message' | transloco }}</p>\n <div class=\"mb-3\">\n <label for=\"reasonToCancel\" class=\"form-label\">\n {{ 'User.Subscriptions.CancelSubscription.ReasonLabel' | transloco }} <span class=\"text-danger\">*</span>\n </label>\n <textarea\n id=\"reasonToCancel\"\n class=\"form-control\"\n rows=\"4\"\n [(ngModel)]=\"reasonToCancel\"\n [ngClass]=\"{'is-invalid': reasonToCancel && reasonToCancel.trim() === ''}\"\n placeholder=\"{{ 'User.Subscriptions.CancelSubscription.ReasonPlaceholder' | transloco }}\"\n aria-label=\"{{ 'User.Subscriptions.CancelSubscription.ReasonPlaceholder' | transloco }}\"></textarea>\n @if (reasonToCancel && reasonToCancel.trim() === '') {\n <div class=\"invalid-feedback\">\n {{ 'User.Subscriptions.Validation.ReasonRequired' | transloco }}\n </div>\n }\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"modal.dismiss(); reasonToCancel = '';\">\n {{ 'User.Subscriptions.CancelSubscription.KeepItForNow' | transloco }}\n </button>\n <button type=\"button\"\n class=\"btn btn-danger\"\n [disabled]=\"!reasonToCancel || reasonToCancel.trim() === ''\"\n (click)=\"onConfirmCancel(); modal.close()\">\n {{ 'User.Subscriptions.CancelSubscription.ConfirmButton' | transloco }}\n </button>\n </div>\n</ng-template>\n}\n\n@if (showTos) {\n <pw-privacy-and-tos [productId]=\"productId\"></pw-privacy-and-tos>\n}\n\n<router-outlet></router-outlet>\n","import { ChangeDetectorRef, Component, Injector, OnDestroy } from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { Paging, POLL_TIMEOUT } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\n\nimport { LazyLoadEvent } from 'primeng/api';\nimport { interval, Subscription } from 'rxjs';\nimport { mergeMap } from 'rxjs/operators';\n\n@Component({\n selector: 'pw-user-invoice',\n templateUrl: './user-invoice.component.html',\n styleUrls: ['./user-invoice.component.scss'],\n\n standalone: false\n})\nexport class UserInvoiceComponent extends AppBaseComponent implements OnDestroy {\n invoices = [];\n buttonBusy = false;\n userId: number;\n totalRecordsUnFiltered = 0;\n\n searchText = '';\n subscription: Subscription;\n intervalTimer = interval(POLL_TIMEOUT * 60 * 1000);\n isLoaded = false;\n page = 0;\n totalRecords = 0;\n\n invoiceFrequency = ['week', 'month', 'year'];\n\n constructor(\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n }\n\n onLazyLoad(event: LazyLoadEvent) {\n const pageDetails = HelperService.onTableLazyLoad(event);\n this.page = pageDetails.page;\n this.fetchInvoices({\n page: this.page,\n page_size: this.PAGE_SIZE,\n order_by: pageDetails.sortField,\n order_direction: pageDetails.sortOrder,\n search: this.searchText\n });\n }\n\n private fetchInvoices(paging: Paging) {\n this.isLoaded = false;\n this.userStore().subscribe(user => {\n if (user) {\n this.userId = user.id;\n this.userService.getUserInvoices(paging, user.id).subscribe(response => {\n this.isLoaded = true;\n this.invoices = response.invoices;\n this.totalRecords = response.object_count;\n this.totalRecordsUnFiltered = response.unfiltered_count;\n this.pollForInvoices();\n this.cdr.markForCheck();\n });\n }\n this.cdr.markForCheck();\n });\n }\n\n private pollForInvoices() {\n this.subscription = this.intervalTimer\n .pipe(mergeMap(() => this.userService.getUserInvoices({}, this.userId)))\n .subscribe(data => {\n this.invoices = data.invoices;\n this.cdr.markForCheck();\n });\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n}\n","<div class=\"row\" [class.custom-disable-wrapper]=\"buttonBusy\">\n <div class=\"col-12 d-flex flex-wrap justify-content-between align-items-center\">\n <h2 class=\"card-title p-0 float-start\">Your Invoices</h2>\n </div>\n</div>\n\n@if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progress-spinner strokeWidth=\"2\"></p-progress-spinner>\n </div>\n}\n<div class=\"row primeng-datatable-container actions-collapsed mt-0\" [class.custom-disable-wrapper]=\"buttonBusy\" [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <div class=\"col-12 px-0\">\n <p-table #tt\n [value]=\"invoices\"\n [paginator]=\"totalRecords !== 0\"\n [rows]=\"PAGE_SIZE\"\n [lazy]=\"true\"\n [totalRecords]=\"totalRecords\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n >\n <ng-template #caption>\n <div class=\"search-filter justify-content-end\">\n <div class=\"text-end\">\n <label for=\"user-invoice-search\" class=\"visually-hidden\">Search Invoices</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><i class=\"fa fa-search\" aria-hidden=\"true\"></i></p-inputicon>\n <input id=\"user-invoice-search\"\n name=\"user-invoice-search\"\n [(ngModel)]=\"searchText\"\n (input)=\"tt.filterGlobal($event.target.value, 'contains')\"\n type=\"text\"\n pInputText\n placeholder=\"Search invoices...\"\n data-cy=\"incident-search\"\n aria-label=\"Search invoices...\" />\n </p-iconfield>\n </div>\n </div>\n </ng-template>\n\n <ng-template #header>\n <tr>\n <th scope=\"col\" pSortableColumn=\"date\">Invoice Date <p-sort-icon field=\"date\"></p-sort-icon></th>\n <th scope=\"col\" pSortableColumn=\"frequency\">Frequency <p-sort-icon field=\"frequency\"></p-sort-icon></th>\n <th scope=\"col\" pSortableColumn=\"seatsPurchased\">Seats Purchased <p-sort-icon field=\"seatsPurchased\"></p-sort-icon></th>\n <th scope=\"col\" pSortableColumn=\"subtotal\">Subtotal <p-sort-icon field=\"subtotal\"></p-sort-icon></th>\n <th scope=\"col\" pSortableColumn=\"total\">Total (incl. tax) <p-sort-icon field=\"total\"></p-sort-icon></th>\n <th scope=\"col\">Action</th>\n </tr>\n </ng-template>\n\n <ng-template #body let-invoice>\n <tr>\n <td>{{ invoice.date | date:'dd-MMM-yyyy' }}</td>\n <td>\n <span class=\"badge\"\n [appDynamicBadge]=\"{\n itemsArray: invoiceFrequency,\n item: invoice.product.billing_frequency\n }\"\n color=\"blue-grey\">{{ invoice.product.billing_frequency }}</span>\n </td>\n <td>{{ invoice?.subscription_product?.purchased_units }}</td>\n <td>{{ (invoice.subtotal_in_cents / 100) | currency:invoice?.product?.currency }}</td>\n <td class=\"td-total\">{{ (invoice.total_in_cents / 100) | currency:invoice?.product?.currency }}</td>\n <td>\n @if (invoice?.file?.url) {\n <a class=\"btn btn-sm btn-primary\" [attr.href]=\"invoice.file.url\" target=\"_blank\" title=\"Download\">\n <i class=\"fa fa-download\">&nbsp;Download</i>\n </a>\n } @else {\n <a class=\"btn btn-sm btn-primary\" [attr.href]=\"invoice?.stripe_invoice_pdf\" target=\"_blank\" title=\"Download\">\n <i class=\"fa fa-download\">&nbsp;Download</i>\n </a>\n }\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (totalRecords === 0 && totalRecordsUnFiltered !== 0) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n }\n\n @if (totalRecords !== 0) {\n <pw-records-summary [showing]=\"tt?.value?.length ?? 0\" [total]=\"totalRecords\" />\n }\n\n </div>\n</div>\n@if (totalRecordsUnFiltered === 0 && isLoaded) {\n <pw-no-data [withImage]=\"true\" message=\"You don't have any invoice yet.\">\n </pw-no-data>\n}\n\n","import { ChangeDetectorRef, Component, Injector, OnInit } from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AppState, getUser } from '@posiwise/app-store';\nimport { CommonService, ProfileService } from '@posiwise/common-services';\nimport { User } from '@posiwise/common-utilities';\n\nimport { Store } from '@ngrx/store';\n\n@Component({\n selector: 'pw-communication-tab',\n templateUrl: './communication-tab.component.html',\n styleUrl: './communication-tab.component.scss',\n\n standalone: false\n})\nexport class CommunicationTabComponent extends AppBaseComponent implements OnInit {\n subscriptions = [];\n userSubscription = [];\n\n isLoaded = false;\n\n user: User;\n\n constructor(\n private readonly commonService: CommonService,\n private readonly profileService: ProfileService,\n private readonly store: Store<AppState>,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n }\n\n ngOnInit() {\n this.getAllSubscription();\n }\n\n private getAllSubscription() {\n this.commonService.getAllNewsletter().subscribe(response => {\n this.store.select(getUser).subscribe(user => {\n if (user?.currentUser) {\n this.user = user.currentUser;\n this.profileService\n .getUserObject('user_newsletters', this.user.slug)\n .subscribe(newsletter => {\n this.isLoaded = true;\n this.userSubscription = newsletter;\n this.subscriptions = response.newsletters;\n if (this.userSubscription.length > 0 && this.subscriptions.length > 0) {\n this.subscriptions.forEach(element => {\n const item = this.userSubscription?.find(\n x => x.newsletter_id === element.id\n );\n element.enabled = item ? item.send_newsletters : false;\n });\n } else {\n this.subscriptions.forEach(element => {\n element.enabled = false;\n });\n }\n this.cdr.markForCheck();\n });\n }\n this.cdr.markForCheck();\n });\n });\n }\n\n onValueChange(item, value) {\n const data = {\n send_newsletter: value\n };\n\n if (item.id === 9999) {\n const marketingSubs = {\n id: this.user.id,\n send_marketing_emails: value\n };\n this.profileService.updateUserProfile(marketingSubs).subscribe(() => {\n this.updateUser();\n this.toast.success(this.translation.translate('User.Settings.UpdatedMessage'));\n this.cdr.markForCheck();\n });\n } else {\n this.commonService.toggleNewsletter(item.id, data).subscribe(() => {\n this.updateUser();\n this.toast.success(\n this.translation.translate('User.Settings.Communications.UpdatedMessage')\n );\n this.cdr.markForCheck();\n });\n }\n }\n\n updateUser() {\n // this.userService.getUserInfo().subscribe(resp => {\n // this.localStorage.setItem('user', JSON.stringify(resp)).subscribe();\n // });\n }\n}\n","<div class=\"communication-settings\">\n <h2>{{ 'User.Settings.Communications.Title' | transloco }}</h2>\n\n <p class=\"settings-intro\">{{ 'User.Settings.Communications.Intro1' | transloco }}</p>\n <p class=\"settings-intro\">{{ 'User.Settings.Communications.Intro2' | transloco }}</p>\n\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n\n @if (isLoaded && subscriptions.length > 0) {\n <ul class=\"pref-list\">\n @for (item of subscriptions; track item; let idx = $index) {\n @if (item.visible || item.enabled) {\n <li class=\"pref-row\">\n <span class=\"pref-name\" [id]=\"'communication-tab-' + idx\">{{ item.name }}</span>\n <ui-switch [checked]=\"item.enabled\"\n [attr.aria-labelledby]=\"'communication-tab-' + idx\"\n (valueChange)=\"onValueChange(item, $event)\">\n </ui-switch>\n </li>\n }\n }\n </ul>\n }\n\n @if (isLoaded && subscriptions.length === 0) {\n <pw-no-data [withImage]=\"true\"\n [message]=\"'User.Settings.Communications.NoDataMessage' | transloco\">\n </pw-no-data>\n }\n</div>\n","import { ChangeDetectorRef, Component, Injector, OnDestroy, OnInit } from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { CommonService } from '@posiwise/common-services';\n\n@Component({\n selector: 'pw-others-tab',\n templateUrl: './others-tab.component.html',\n\n standalone: false\n})\nexport class OthersTabComponent extends AppBaseComponent implements OnInit, OnDestroy {\n subscriptionConfigs = [];\n globalConfigs = [];\n\n userId: number;\n\n isLoaded = false;\n\n constructor(\n private readonly commonService: CommonService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n }\n\n ngOnInit(): void {\n this.getGlobalConfigs();\n this.userStore().subscribe(res => {\n if (res) {\n this.userId = res.id;\n }\n this.cdr.markForCheck();\n });\n }\n\n private getGlobalSubscriptionConfig() {\n this.commonService\n .getAllGlobalSubscriptionConfigs()\n .subscribe(response => {\n this.subscriptionConfigs = response.global_subscription_configs;\n this.globalConfigs.forEach(globalConfig => {\n const config = this.subscriptionConfigs?.find(\n subscriptionConfig =>\n subscriptionConfig.global_config_id === globalConfig?.id\n );\n globalConfig.value = config?.value;\n globalConfig.global_subscription_config_id = config?.id;\n });\n this.cdr.markForCheck();\n })\n .add(() => {\n this.isLoaded = true;\n this.cdr.markForCheck();\n });\n }\n\n private getGlobalConfigs() {\n this.commonService.getAllGlobalConfigs().subscribe(response => {\n this.globalConfigs = response.global_configs;\n this.getGlobalSubscriptionConfig();\n this.cdr.markForCheck();\n });\n }\n\n onValueChange(item, value) {\n const data = {\n user_id: this.userId,\n value,\n global_config_id: item?.id\n };\n const sub$ = item?.global_subscription_config_id\n ? this.commonService.editGlobalSubscriptionConfig(\n item?.global_subscription_config_id,\n data\n )\n : this.commonService.postGlobalSubscriptionConfig(data);\n sub$.subscribe(() => {\n this.toast.success(this.translation.translate('User.OtherSettings.UpdatedMessage'));\n this.cdr.markForCheck();\n }).add(() => {\n this.getGlobalConfigs();\n });\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n }\n}\n","<div class=\"row\">\n <div class=\"col-12\">\n <h2>Other</h2>\n </div>\n</div>\n@if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n}\n@if (isLoaded && globalConfigs?.length) {\n <div class=\"row mt-4 pt-1\"\n >\n <div class=\"col-md-6 col-sm-6\">\n @for (item of globalConfigs; track item; let idx = $index) {\n <div class=\"mb-3\">\n <div class=\"row\">\n <div class=\"col-md-10 col-sm-6\">\n <span class=\"pw-label-style\" [id]=\"'others-tab-' + idx\"> {{ item?.name }} </span>\n </div>\n <div class=\"col-md-2 col-sm-6\">\n <ui-switch [checked]=\"item.value === 'true'\"\n [attr.aria-labelledby]=\"'others-tab-' + idx\"\n (valueChange)=\"onValueChange(item, $event)\">\n </ui-switch>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n}\n\n@if (isLoaded && !globalConfigs?.length) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'User.OtherSettings.NoDataMessage' | transloco\"> </pw-no-data>\n </div>\n}\n","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n Injector,\n OnInit,\n ViewChild\n} from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\n\nimport { StatusCodes } from 'http-status-codes';\n\n@Component({\n selector: 'pw-security-tab',\n templateUrl: './security-tab.component.html',\n styleUrls: ['./security-tab.component.scss'],\n\n standalone: false\n})\nexport class SecurityTabComponent extends AppBaseComponent implements OnInit {\n @ViewChild('password', { static: false }) passwordRef: ElementRef;\n @ViewChild('verificationCode', { static: false }) verificationCode: ElementRef;\n\n @ViewChild('ssoPassword', { static: false }) ssoPasswordRef: ElementRef;\n\n showSSOSection = false;\n ssoPasswordVerified = false;\n isSSOPasswordInvalid = true;\n\n user;\n\n isCurrentPasswordValid = true;\n passwordVerified = false;\n show2FA = false;\n\n created2faDetails: object;\n\n constructor(\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n }\n\n ngOnInit() {\n this.getUser();\n }\n\n private getUser() {\n this.userService.getUserInfo().subscribe(res => {\n this.user = res;\n this.cdr.markForCheck();\n });\n }\n\n validatePassword() {\n const password = this.passwordRef.nativeElement.value;\n if (password) {\n this.userService.checkPassword({ password }).subscribe({\n next: data => {\n if (data?.status === StatusCodes.OK) {\n if (this.user?.enable_two_factor_authenticator === false) {\n this.passwordVerified = true;\n this.create2FA();\n } else {\n this.disable2FA();\n }\n }\n this.cdr.markForCheck();\n },\n error: err => {\n if (err) {\n this.toast.error(err.error.message);\n this.passwordRef.nativeElement.value = '';\n }\n this.cdr.markForCheck();\n }\n });\n }\n }\n\n checkValidity() {\n const password = this.passwordRef.nativeElement.value;\n if (password.length > 5) {\n this.isCurrentPasswordValid = false;\n } else {\n this.isCurrentPasswordValid = true;\n }\n }\n\n private create2FA() {\n this.userService.createTwoFactorAuthenticator().subscribe(res => {\n this.created2faDetails = res;\n this.cdr.markForCheck();\n });\n }\n\n verify2FA() {\n this.userService\n .verifyTwoFactorAuthenticator(this.verificationCode.nativeElement.value)\n .subscribe(() => {\n this.enable2FA();\n });\n }\n\n private enable2FA() {\n this.userService\n .enableTwoFactorAuthenticator(this.verificationCode.nativeElement.value)\n .subscribe(_ => {\n this.getUser();\n this.reset();\n this.cdr.markForCheck();\n });\n }\n\n private disable2FA() {\n this.userService.disableTwoFactorAuthenticator().subscribe(_ => {\n this.getUser();\n this.reset();\n this.cdr.markForCheck();\n });\n }\n\n reset() {\n this.show2FA = false;\n this.isCurrentPasswordValid = true;\n this.passwordVerified = false;\n this.created2faDetails = {};\n }\n\n checkSSOPasswordValidity() {\n const password = this.ssoPasswordRef.nativeElement.value;\n this.isSSOPasswordInvalid = password.length <= 5;\n }\n\n validateSSOPassword() {\n const password = this.ssoPasswordRef.nativeElement.value;\n if (password) {\n this.userService.checkPassword({ password }).subscribe({\n next: data => {\n if (data?.status === StatusCodes.OK) {\n this.ssoPasswordVerified = true;\n }\n this.cdr.markForCheck();\n },\n error: err => {\n this.toast.error(err.error.message);\n this.ssoPasswordRef.nativeElement.value = '';\n this.cdr.markForCheck();\n }\n });\n }\n }\n\n triggerSSO() {\n this.userService.sendSSOActivationEmail().subscribe(() => {\n this.toast.success(\n this.user?.cognito_sso_activated\n ? 'Activation email resent successfully.'\n : 'SSO activation email sent successfully.'\n );\n this.getUser();\n this.resetSSO();\n this.cdr.markForCheck();\n });\n }\n\n resetSSO() {\n this.showSSOSection = false;\n this.ssoPasswordVerified = false;\n this.isSSOPasswordInvalid = true;\n if (this.ssoPasswordRef?.nativeElement) {\n this.ssoPasswordRef.nativeElement.value = '';\n }\n }\n}\n","<div class=\"row\">\n <div class=\"col-12\">\n <h2>Security settings</h2>\n </div>\n</div>\n<p-accordion>\n <p-accordion-panel value=\"0\">\n <p-accordion-header>Two Factor Authentication (2FA)</p-accordion-header>\n <p-accordion-content>\n <div class=\"row mt-2\">\n <div class=\"col-12\">\n <div class=\"d-flex\">\n <p class=\"small text-muted\"> Add an extra layer of security to your user account by asking to verify their\n identity when they enter a username and password </p>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <!-- Disable 2FA -->\n @if (user?.enable_two_factor_authenticator) {\n <button class=\"btn btn-danger\" (click)=\"show2FA = true\"> Disable\n </button>\n }\n <!-- Enable 2FA -->\n @if (!user?.enable_two_factor_authenticator) {\n <button class=\"btn btn-primary\"\n [disabled]=\"created2faDetails?.code\" (click)=\"show2FA = true\"> Enable </button>\n }\n </div>\n </div>\n @if (show2FA) {\n <div class=\"row\">\n <div class=\"col-12 col-md-6 col-lg-4 mt-2\">\n <div class=\"mb-3\">\n @if (!passwordVerified) {\n <input type=\"password\" class=\"form-control\" #password placeholder=\"Current Password\"\n (keyup)=\"checkValidity()\" id=\"input_current_password_800\" name=\"input_current_password_800\"\n aria-label=\"Current Password\" />\n }\n </div>\n </div>\n @if (created2faDetails?.code) {\n <div class=\"col-12\">\n <p class=\"small\"> Scan the QR code below or use secret manually with the Google authenticator app on your mobile\n device, after that fill in the field below with the code generated in the app </p>\n <img [src]=\"created2faDetails?.qr_uri\" alt=\"loading QR code...\" class=\"qr-code img-thumbnail img-responsive\" />\n <strong> Secret Key: {{ created2faDetails?.code }}</strong>\n <p class=\"small\">Auth Type: Time Based OTP</p>\n </div>\n }\n </div>\n }\n @if (show2FA) {\n <div class=\"row\">\n <div class=\"col-4\">\n <div class=\"mb-3 mt-2\">\n @if (passwordVerified) {\n <input type=\"text\" #verificationCode class=\"form-control\"\n placeholder=\"Provide passcode from authenticator app\" id=\"input_provide_passcode_from_authenticator_app_800\" name=\"input_provide_passcode_from_authenticator_app_800\"\n aria-label=\"Provide passcode from authenticator app\" />\n }\n </div>\n </div>\n @if (show2FA) {\n <div class=\"col-12\">\n <div class=\"d-flex mt-2\">\n <button class=\"btn btn-raised btn-outline-default me-2\" (click)=\"reset()\"> Cancel </button>\n @if (!passwordVerified) {\n <button class=\"btn btn-raised btn-primary\" (click)=\"validatePassword()\"\n [disabled]=\"isCurrentPasswordValid\"> Validate </button>\n }\n @if (passwordVerified) {\n <button class=\"btn btn-raised btn-primary\" (click)=\"verify2FA()\"> Confirm </button>\n }\n </div>\n </div>\n }\n </div>\n }\n </p-accordion-content>\n </p-accordion-panel>\n <p-accordion-panel value=\"1\">\n <p-accordion-header>Single Sign On (SSO) - AWS Cognito</p-accordion-header>\n <p-accordion-content>\n <div class=\"row mt-2\">\n <div class=\"col-12\">\n <p class=\"small text-muted\"> {{ user?.cognito_sso_activated ? 'You have already activated AWS Cognito SSO, if you click on ‘Resend activation email‘ you‘ll receive an email with instructions to reset your SSO\n password.' : 'Once you click ‘Enable’, you’ll receive an email with instructions to activate your AWS Cognito\n SSO. This will enable you to access all our systems using a single password.' }} </p>\n </div>\n </div>\n <!-- Enable or Resend Button -->\n @if (!showSSOSection) {\n <div class=\"row\">\n <div class=\"col-12\">\n <button class=\"btn btn-primary\" (click)=\"showSSOSection = true\"> {{ user?.cognito_sso_activated ? 'Resend\n activation email' : 'Enable' }} </button>\n </div>\n </div>\n }\n <!-- Password Validation -->\n @if (showSSOSection) {\n <div class=\"row\">\n @if (!ssoPasswordVerified) {\n <div class=\"col-12 col-md-6 col-lg-4 mt-2\">\n <div class=\"mb-3\">\n <input type=\"password\" class=\"form-control\" #ssoPassword placeholder=\"Current Password\"\n (keyup)=\"checkSSOPasswordValidity()\" id=\"input_current_password_801\" name=\"input_current_password_801\"\n aria-label=\"Current Password\" />\n </div>\n </div>\n }\n <div class=\"col-12\">\n <div class=\"d-flex mt-2\">\n <button class=\"btn btn-raised btn-outline-default me-2\" (click)=\"resetSSO()\"> Cancel </button>\n @if (!ssoPasswordVerified) {\n <button class=\"btn btn-raised btn-primary\" (click)=\"validateSSOPassword()\"\n [disabled]=\"isSSOPasswordInvalid\"> Validate </button>\n }\n @if (ssoPasswordVerified) {\n <button class=\"btn btn-primary\" (click)=\"triggerSSO()\"> Confirm </button>\n }\n </div>\n </div>\n </div>\n }\n </p-accordion-content>\n </p-accordion-panel>\n</p-accordion>\n","import { Component, ViewChild } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { PermissionService } from '@posiwise/common-services';\n\nimport { MenuItem } from 'primeng/api';\n\n@Component({\n selector: 'pw-settings',\n templateUrl: './settings-tabs.component.html',\n\n standalone: false\n})\nexport class SettingsComponent {\n @ViewChild('menuItems', { static: true }) menu: MenuItem[];\n\n items: MenuItem[];\n activeItem: MenuItem;\n\n constructor(\n private readonly router: Router,\n private readonly permissionService: PermissionService\n ) {\n this.items = [\n {\n id: 'communications',\n label: 'Communications',\n icon: 'fa fa-fw fa-cogs',\n routerLink: ['/settings/communication']\n },\n {\n id: 'security',\n label: 'Security',\n icon: 'fa fa-fw fa-lock',\n routerLink: ['/settings/security']\n },\n {\n id: 'other',\n label: 'Other',\n icon: 'fa fa-fw fa-list',\n routerLink: ['/settings/other']\n }\n ];\n this.activeItem =\n this.items[\n this.items.findIndex(\n record => record.routerLink[0] === this.router.url.split('?')[0]\n )\n ];\n }\n\n activateMenu() {\n this.activeItem = this.menu['activeItem'];\n }\n}\n","<pw-tabs [items]=\"items\"></pw-tabs>\n","import { ChangeDetectorRef, Component, Injector, OnInit } from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { CommonService, PermissionService } from '@posiwise/common-services';\n\n@Component({\n selector: 'pw-support',\n templateUrl: './support.component.html',\n styleUrls: ['./support.component.scss'],\n\n standalone: false\n})\nexport class SupportComponent extends AppBaseComponent implements OnInit {\n supports = [];\n\n subscriptionId: number;\n\n isLoading: boolean;\n\n isLoaded = false;\n\n constructor(\n injector: Injector,\n private readonly commonService: CommonService,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n }\n\n ngOnInit(): void {\n this.subscriptionId = PermissionService.selectedSubscription?.id;\n this.getAllSupport();\n }\n\n private getAllSupport() {\n this.isLoading = true;\n this.commonService\n .getAllCustomerSupport(this.subscriptionId)\n .subscribe(response => {\n this.supports = response;\n this.cdr.markForCheck();\n })\n .add(() => {\n this.isLoading = false;\n this.isLoaded = true;\n this.cdr.markForCheck();\n });\n }\n}\n","<div class=\"row m-3\">\n <div class=\"col-12 mb-3\">\n <div\n class=\"col-12 d-flex flex-wrap justify-content-between align-items-center mt-4\">\n <h2 class=\"card-title p-0 float-start\">Support Center</h2>\n <a routerLink=\"/support-details/add\"\n aria-label=\"Navigate to Target\"\n class=\"btn btn-sm btn-outline-primary float-end\"\n tabindex=\"0\"\n (keydown)=\"$event.key === 'Enter' && $event.target.click()\"\n aria-expanded=\"false\">\n <i class=\"fa fa-plus-circle\"\n aria-hidden=\"true\"></i>\n Create new support request\n </a>\n </div>\n </div>\n <div class=\"col-12 my-3\">\n <h3>Previous support requests</h3>\n <p>Please note that responses to your support requests are sent directly to your email. You can simply reply to those\n emails for further assistance.</p>\n </div>\n @if (isLoading) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (supports?.length) {\n <div class=\"col-12 mb-3\">\n <p-accordion>\n @for (item of supports; track item; let i = $index) {\n <p-accordion-panel [value]=\"i\">\n <p-accordion-header>{{ item?.created_at | dateFormat }} ({{ item?.user_name }}) {{ item?.title }}</p-accordion-header>\n <p-accordion-content>\n <p>{{ item?.description }}</p>\n <a [href]=\"item?.attachment?.version_200x200?.url\"\n target=\"_blank\">\n @if (item?.attachment?.version_200x200?.url) {\n <img alt=\"version_200x200\"\n [src]=\"item?.attachment?.version_200x200?.url\"\n class=\"img-fluid\" />\n }</a>\n </p-accordion-content>\n </p-accordion-panel>\n }\n </p-accordion>\n </div>\n }\n @if (!supports?.length && isLoaded) {\n <div class=\"col-12\"\n >\n <pw-no-data [withImage]=\"true\" message=\"No support requests found\"> </pw-no-data>\n </div>\n }\n </div>\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Injector,\n OnInit,\n Renderer2\n} from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\n\nimport { AppAdmin } from '@posiwise/admin-module-utils';\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AuthService, CommonService, PermissionService } from '@posiwise/common-services';\nimport { HelperService } from '@posiwise/helper-service';\nimport { ValidateForm } from '@posiwise/utils';\n\n@Component({\n selector: 'pw-support-details',\n templateUrl: './support-details.component.html',\n styleUrls: ['./support-details.component.scss'],\n\n standalone: false\n})\nexport class SupportDetailsComponent extends AppBaseComponent implements AfterViewInit, OnInit {\n form: UntypedFormGroup;\n\n uploadedFiles = [];\n\n invalidFile = false;\n isSubmitClicked = false;\n\n siteKey: string;\n\n recaptcha = null;\n\n isLoading: boolean;\n filesUploaded: boolean;\n subscriptionId;\n\n constructor(\n injector: Injector,\n private readonly commonService: CommonService,\n private readonly authService: AuthService,\n private readonly renderer: Renderer2,\n private readonly el: ElementRef,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n this.form = AppAdmin.customerSupportForm();\n this.form.get('product_id').setValue(PermissionService.selectedProduct.id);\n this.siteKey = this.appConfig.integrations.captcha_key_V2;\n }\n\n ngOnInit(): void {\n this.subscriptionId = PermissionService.selectedSubscription?.id;\n }\n\n ngAfterViewInit() {\n this.attachCloseButtonListener();\n }\n\n @ValidateForm('form')\n onSave() {\n this.isSubmitClicked = true;\n }\n\n handleSuccess(token: string) {\n if (token) {\n this.authService.validateReCaptcha(token).subscribe((isSuccess: boolean) => {\n this.cdr.markForCheck();\n if (isSuccess) {\n this.isLoading = true;\n const data = {\n ...this.form.value\n };\n if (this.uploadedFiles.length > 0) {\n data.attachment = this.uploadedFiles[0];\n }\n if (!data.attachment) {\n delete data.attachment;\n }\n this.commonService\n .postCustomerSupport({ ...data, subscription_id: this.subscriptionId })\n .subscribe(() => {\n this.back();\n })\n .add(() => {\n this.isLoading = false;\n this.isSubmitClicked = false;\n this.cdr.markForCheck();\n });\n }\n });\n }\n }\n\n onSelect(event = null) {\n this.invalidFile = false;\n for (const file of event.files) {\n if (!HelperService.validateFile(file, this.toast)) {\n this.invalidFile = true;\n } else {\n this.uploadedFiles.push(file);\n }\n }\n this.filesUploaded = true;\n\n if (this.invalidFile) {\n setTimeout(() => this.attachCloseButtonListener(), 0);\n }\n }\n\n onRemove(event) {\n this.uploadedFiles = this.uploadedFiles.filter(x => event.file.name !== x.name);\n if (this.uploadedFiles.length === 0) {\n this.filesUploaded = false;\n }\n this.invalidFile = false;\n }\n\n attachCloseButtonListener() {\n const closeButton = this.el.nativeElement.querySelector('.p-message-close');\n\n if (closeButton) {\n this.renderer.listen(closeButton, 'click', () => {\n this.handleCloseButtonClick();\n });\n }\n }\n\n handleCloseButtonClick() {\n this.invalidFile = false;\n this.filesUploaded = false;\n }\n\n onUploadError(event) {\n HelperService.onUploadError(event, this.toast);\n }\n}\n","<div class=\"container-fluid pw-tab overflow-hidden\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body\">\n <div class=\"me-auto col-xs-6 mt-4\">\n <a aria-label=\"Navigate to Target\" (click)=\"back()\" class=\"previous\"><i\n class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n <h3 class=\"mt-3\">{{ 'Label.NewSupport' | transloco }}</h3>\n </div>\n <div class=\"p-2 m-1 mt-3\">\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSave()\">\n <div class=\"row\">\n <div class=\"col-12\">\n <pw-input-container controlId=\"support-details-title\"\n label=\"title\"\n name=\"title\"\n errorMsg=\"Title is required\">\n <input type=\"text\"\n id=\"support-details-title\"\n class=\"form-control\"\n [placeholder]=\"'Support.Placeholder.Title' | transloco\"\n formControlName=\"title\"\n aria-label=\"Title\" />\n </pw-input-container>\n </div>\n <div class=\"col-12\">\n <pw-input-container controlId=\"support-details-description\"\n label=\"Description\"\n errorMsg=\"description is required\"\n name=\"description\">\n <textarea rows=\"3\"\n id=\"support-details-description\"\n type=\"text\"\n class=\"form-control\"\n [placeholder]=\"'Support.Placeholder.Description' | transloco\"\n formControlName=\"description\"\n aria-label=\"Description\"></textarea>\n </pw-input-container>\n </div>\n <div class=\"col-12\">\n <div class=\"mb-3 file-upload-support-details\">\n <span id=\"support-details-file-label\" class=\"pw-label-style\">Upload Picture</span>\n <p-fileupload #forms\n [attr.aria-labelledby]=\"'support-details-file-label'\"\n name=\"myfile[]\"\n [customUpload]=\"true\"\n [showUploadButton]=\"false\"\n accept=\"image/*\"\n [disabled]=\"uploadedFiles && uploadedFiles.length > 0\"\n (onSelect)=\"onSelect($event)\"\n (onRemove)=\"onRemove($event)\"\n (onError)=\"onUploadError($event)\">\n <ng-template #content>\n @if (!uploadedFiles?.length) {\n <div class=\"drag-drop-text\">\n <p>You can drag and drop your file here</p>\n </div>\n }\n </ng-template>\n </p-fileupload>\n </div>\n </div>\n @if (isLoading) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n <div class=\"col-12 text-end mt-3\">\n @if (isSubmitClicked) {\n <div class=\"support-details-captcha\">\n <ngx-recaptcha2 [ngModelOptions]=\"{ standalone: true }\"\n [siteKey]=\"siteKey\"\n size=\"normal\"\n [(ngModel)]=\"recaptcha\"\n (success)=\"handleSuccess($event)\">\n </ngx-recaptcha2>\n </div>\n }\n @if (!isSubmitClicked) {\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"back()\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"submit\"\n class=\"btn btn-primary\" [disabled]=\"invalidFile\">\n {{ 'Button.Submit' | transloco }}\n </button>\n }\n </div>\n </div>\n </form>\n </div>\n </div>\n </div>\n</div>\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n Output,\n TemplateRef,\n ViewChild\n} from '@angular/core';\n\nimport { ProfileService } from '@posiwise/common-services';\nimport { Subscription } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\n\nimport { FileUpload } from 'primeng/fileupload';\nimport { forkJoin, Observable } from 'rxjs';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { ModalContext } from '../../shared/interface/user-module.interface';\n\n@Component({\n selector: 'pw-edit-portfolios',\n templateUrl: './edit-portfolios.component.html',\n styleUrls: ['./edit-portfolios.component.scss'],\n\n standalone: false\n})\nexport class EditPortfoliosComponent {\n @ViewChild('content', { static: true }) content: TemplateRef<ModalContext>;\n @ViewChild('form', { static: false }) uploader: FileUpload;\n\n @Output() successEvent: EventEmitter<boolean> = new EventEmitter();\n\n @Input() id: number;\n @Input() slug: string;\n\n uploadedFiles = [];\n project = [];\n projectPictures = [];\n\n busy: boolean;\n filesUploaded: boolean;\n\n constructor(\n private readonly modalService: NgbModal,\n private readonly profileService: ProfileService,\n private readonly cdr: ChangeDetectorRef\n ) {}\n\n openModal(id: number) {\n this.id = 0;\n this.id = id;\n this.modalService.open(this.content, {\n centered: true,\n size: 'lg',\n windowClass: 'modal-holder'\n });\n }\n\n onSelect(event = null) {\n // eslint-disable-next-line no-restricted-syntax\n for (const file of event.files) {\n if (HelperService.validateFile(file)) {\n this.uploadedFiles.push(file);\n }\n }\n this.filesUploaded = true;\n }\n\n getProjectPictures() {\n this.profileService.getProjectPictures(this.slug).subscribe(response => {\n if (response.length > 0) {\n this.projectPictures = response.flatMap(x => x.project_pictures);\n }\n this.cdr.markForCheck();\n });\n }\n\n /**\n * Uploads multiple images for the project\n * @param form\n */\n onSave(form) {\n if (this.uploadedFiles.length > 0) {\n this.busy = true;\n const subscriptions$: Observable<Subscription>[] = [];\n this.uploadedFiles.forEach(file => {\n subscriptions$.push(\n this.profileService.addProjectPictures({\n project_id: Number(this.id),\n image: file\n })\n );\n });\n\n forkJoin(subscriptions$)\n .subscribe({\n next: () => {\n form.clear();\n this.successEvent.emit();\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n },\n error: () => {\n form.clear();\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n }\n })\n .add(() => {\n this.busy = false;\n this.cdr.markForCheck();\n });\n }\n }\n\n deleteProjectPicture(id: number) {\n this.profileService.deletePicture(id).subscribe(_ => {\n this.getProjectPictures();\n this.cdr.markForCheck();\n });\n }\n\n trackByImage(_index: number, item: { id: number }) {\n return item?.id;\n }\n\n onRemove(event) {\n this.uploadedFiles = this.uploadedFiles.filter(x => event.file.name !== x.name);\n this.filesUploaded = false;\n }\n\n onUploadError(event) {\n HelperService.onUploadError(event);\n }\n}\n","<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\"\n id=\"modal-basic-title\">Add/Edit Portfolio Item</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n Add a cover image or a downloadable file for your portfolio item\n <p-fileupload #form\n name=\"myfile[]\"\n [customUpload]=\"true\"\n [showUploadButton]=\"false\"\n accept=\"\"\n [disabled]=\"uploadedFiles && uploadedFiles.length > 0\"\n (onSelect)=\"onSelect($event)\"\n (onRemove)=\"onRemove($event)\"\n (onError)=\"onUploadError($event)\">\n <ng-template #content>\n @if (!uploadedFiles?.length) {\n <div class=\"drag-drop-text\">\n <p>You can drag and drop your file here</p>\n </div>\n }\n </ng-template>\n </p-fileupload>\n <div class=\"ui-fileupload-content ui-widget-content ui-corner-bottom\">\n <div class=\"ui-fileupload-files\">\n <div class=\"\">\n <h5>Uploaded Pictures</h5>\n @for (image of projectPictures; track trackByImage($index, image)) {\n <div\n class=\"ui-fileupload-row d-inline-block\">\n <div>\n <img [src]=\"image?.picture?.version_50x50?.url\"\n alt=\"\"\n width=\"50\" />\n </div>\n <div class=\"pt-1 ps-1\">\n <button icon=\"pi pi-times\"\n type=\"button\"\n (click)=\"deleteProjectPicture(image.id)\"\n class=\"ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only\">\n <span class=\"ui-button-icon-left ui-clickable pi pi-times\"></span>\n </button>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"modal.close()\">\n Cancel\n </button>\n <button type=\"button\"\n class=\"btn btn-primary\"\n [buttonBusy]=\"busy\"\n (click)=\"onSave(form)\">\n Save\n </button>\n </div>\n</ng-template>\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Injector,\n OnDestroy,\n OnInit,\n Output,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { ProfileService, ValidationService } from '@posiwise/common-services';\nimport { Project } from '@posiwise/common-utilities';\nimport { appendQueryParam, clearQueryParams, ValidateForm } from '@posiwise/utils';\n\nimport moment from 'moment';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { ModalContext } from '../../shared/interface/user-module.interface';\n\n@Component({\n selector: 'pw-edit-project-modal',\n templateUrl: './edit-project-modal.component.html',\n styleUrls: ['./edit-project-modal.component.scss'],\n\n standalone: false\n})\nexport class EditProjectModalComponent extends AppBaseComponent implements OnInit, OnDestroy {\n @ViewChild('content', { static: true }) content: TemplateRef<ModalContext>;\n\n @Output() cancelEvent: EventEmitter<void> = new EventEmitter();\n @Output() saveEvent: EventEmitter<boolean> = new EventEmitter();\n\n form: UntypedFormGroup;\n\n weeks: number[] = [];\n startYears: number[];\n endYears: number[];\n\n title = 'Add Project';\n\n submitted = false;\n buttonBusy = false;\n\n private currentProject: Project;\n\n userId: number;\n\n constructor(\n public modalService: NgbModal,\n private readonly fb: UntypedFormBuilder,\n private readonly profileService: ProfileService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n this.getForm();\n }\n\n get f() {\n return this.form.controls;\n }\n\n ngOnInit() {\n clearQueryParams(this.router, this.route);\n this.userStore().subscribe(user => {\n this.userId = user.id;\n this.cdr.markForCheck();\n });\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n }\n\n getStartYear() {\n const d = new Date(`01 July 1980`);\n const range = [];\n for (let i = new Date().getFullYear(); i >= d.getFullYear(); i--) {\n range.push(i);\n }\n this.startYears = range;\n }\n\n getEndYears(start_year) {\n const range = [];\n for (let i = new Date().getFullYear(); i >= start_year; i--) {\n range.push(i);\n }\n this.endYears = range;\n }\n\n private getWeeks() {\n const endYear = moment([this.form.value['end_year']]);\n const startYear = moment([this.form.value['start_year']]);\n if (endYear) {\n const weeks = endYear.diff(startYear, 'weeks');\n this.weeks = Array.from(Array(weeks).keys());\n }\n }\n\n onOpen(item = null) {\n this.currentProject = item;\n appendQueryParam(this.router, this.route, {\n modal: 'editProjects'\n });\n\n if (item) {\n this.form.patchValue(item);\n this.title = `Edit Project - ${item.title}`;\n this.getStartYear();\n this.getEndYears(item.end_year);\n this.getWeeks();\n } else {\n this.form.reset();\n this.title = 'Add Project';\n }\n\n this.modalService.open(this.content, {\n centered: true,\n size: 'lg',\n windowClass: 'modal-holder'\n });\n }\n\n @ValidateForm('form')\n onSaveDetail() {\n this.submitted = true;\n this.buttonBusy = true;\n const { value } = this.form;\n value.user_id = this.userId;\n\n const subscription$ = this.currentProject?.id\n ? this.profileService.updateProjects(this.currentProject.id, value)\n : this.profileService.addProjects(value);\n subscription$\n .subscribe(() => {\n this.modalService.dismissAll();\n this.toast.success(\n this.translation.translate('User.Profile.Projects.ProjectUpdated')\n );\n this.saveEvent.emit(true);\n this.cdr.markForCheck();\n })\n .add(() => {\n this.submitted = false;\n this.buttonBusy = false;\n this.cdr.markForCheck();\n });\n }\n\n private getForm() {\n this.form = this.fb.group({\n start_year: [\n null,\n [\n Validators.required,\n Validators.pattern(ValidationService.CustomValidatorPatterns.Year)\n ]\n ],\n end_year: [\n null,\n [\n Validators.required,\n Validators.pattern(ValidationService.CustomValidatorPatterns.Year)\n ]\n ],\n client_name: [null, Validators.required],\n title: [null, Validators.required],\n description: [null, Validators.required],\n length: ['', [Validators.required, Validators.max(5000)]],\n advertisable: [false],\n syndicated: [false]\n });\n }\n}\n","<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\"\n id=\"modal-basic-title\">{{ title }}</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"form\">\n <div class=\"row p-2\">\n <!-- Title -->\n <pw-input-container class=\"col-12\"\n controlId=\"edit-project-title\"\n label=\"Title\"\n name=\"title\"\n errorMsg=\"This field is required.\">\n <input type=\"text\"\n id=\"edit-project-title\"\n class=\"form-control\"\n formControlName=\"title\"\n [placeholder]=\"'User.Profile.Projects.Placeholder.Title' | transloco\"\n [ngClass]=\"{ 'is-invalid': submitted && f.title.errors }\"\n aria-label=\"Title\" />\n </pw-input-container>\n <!-- Client Name -->\n <pw-input-container class=\"col-12\"\n controlId=\"edit-project-client_name\"\n label=\"Client Name\"\n name=\"client_name\"\n errorMsg=\"This field is required.\">\n <input type=\"text\"\n id=\"edit-project-client_name\"\n class=\"form-control\"\n formControlName=\"client_name\"\n [placeholder]=\"'User.Profile.Projects.Placeholder.ClientName' | transloco\"\n [ngClass]=\"{ 'is-invalid': submitted && f.client_name.errors }\"\n aria-label=\"Client Name\" />\n </pw-input-container>\n <!-- Project Start Year -->\n <pw-input-container class=\"col-12 col-md-4\"\n controlId=\"edit-project-start_year\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"Start\"\n name=\"start_year\"\n errorMsg=\"YYYY format date is required\">\n <p-select\n [attr.aria-labelledby]=\"'edit-project-start_year-label'\"\n (onShow)=\"getStartYear()\"\n formControlName=\"start_year\"\n [options]=\"startYears\"\n [placeholder]=\"'User.Profile.Projects.Placeholder.StartYear' | transloco\"\n (onChange)=\"getEndYears($event.value)\"\n [ngClass]=\"{ 'is-invalid': submitted && f.start_year.errors }\">\n </p-select>\n </pw-input-container>\n <!-- Project End Year -->\n <pw-input-container class=\"col-12 col-md-4\"\n controlId=\"edit-project-end_year\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"End\"\n name=\"end_year\"\n errorMsg=\"YYYY format date is required\">\n <p-select\n [attr.aria-labelledby]=\"'edit-project-end_year-label'\"\n formControlName=\"end_year\"\n [options]=\"endYears\"\n [placeholder]=\"'User.Profile.Projects.Placeholder.EndYear' | transloco\"\n (onChange)=\"getEndYears($event.value)\"\n [ngClass]=\"{ 'is-invalid': submitted && f.end_year.errors }\">\n </p-select>\n </pw-input-container>\n <!-- Total Weeks Worked -->\n <pw-input-container class=\"col-12 col-md-4\"\n controlId=\"edit-project-length\"\n label=\"Weeks worked\"\n name=\"length\"\n errorMsg=\"This field is required. (0-5000)\">\n <input type=\"number\"\n id=\"edit-project-length\"\n formControlName=\"length\"\n class=\"form-control\"\n [ngClass]=\"{ 'is-invalid': submitted && f.length.errors }\"\n aria-label=\"Length\" />\n </pw-input-container>\n <!-- Description -->\n <pw-input-container class=\"col-12\"\n controlId=\"edit-project-description\"\n label=\"Description\"\n name=\"description\"\n errorMsg=\"This field is required.\">\n <textarea type=\"text\"\n id=\"edit-project-description\"\n class=\"form-control\"\n formControlName=\"description\"\n required\n [placeholder]=\"'User.Profile.Projects.Placeholder.Description' | transloco\"\n [ngClass]=\"{ 'is-invalid': submitted && f.description.errors }\"\n aria-label=\"Description\"></textarea>\n </pw-input-container>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"modal.close()\">\n Cancel\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary\"\n (click)=\"onSaveDetail()\">Save</button>\n </div>\n</ng-template>\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Injector,\n OnInit,\n Output,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { QualificationService } from '@posiwise/common-services';\nimport { appendQueryParam, clearQueryParams, ValidateForm } from '@posiwise/utils';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { ModalContext } from '../../shared/interface/user-module.interface';\n\n@Component({\n selector: 'pw-edit-qualifications-modal',\n templateUrl: './edit-qualifications-modal.component.html',\n styleUrls: ['./edit-qualifications-modal.component.scss'],\n\n standalone: false\n})\nexport class EditQualificationsModalComponent extends AppBaseComponent implements OnInit {\n @Output()\n saveEvent: EventEmitter<void> = new EventEmitter();\n\n @ViewChild('content', { static: true }) content: TemplateRef<ModalContext>;\n\n title = 'Add Education';\n\n form: UntypedFormGroup;\n\n userId: number;\n\n now: Date = new Date(); // Used for datepicker\n\n minToDate = this.now;\n\n qualifications = [\n { value: 0, label: 'No formal education' },\n { value: 1, label: 'Primary education' },\n { value: 2, label: 'Secondary educ, action or high school' },\n { value: 3, label: 'GED' },\n { value: 4, label: 'Vocational qualification' },\n { value: 5, label: \"Bachelor's degree\" },\n { value: 7, label: \"Master's degree\" },\n { value: 9, label: 'Doctorate or higher' }\n ];\n buttonBusy = false;\n\n constructor(\n public modalService: NgbModal,\n private readonly fb: UntypedFormBuilder,\n private readonly qualificationService: QualificationService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n\n this.form = this.fb.group({\n id: [null],\n school: [null, Validators.required],\n course: [null, Validators.required],\n degree: [null],\n started_on: [null, Validators.required],\n ended_on: [null, Validators.required],\n description: [null],\n points: [null]\n });\n }\n\n ngOnInit() {\n clearQueryParams(this.router, this.route);\n this.userStore().subscribe(response => {\n this.userId = response.id;\n this.cdr.markForCheck();\n });\n }\n\n onOpen(value = null) {\n appendQueryParam(this.router, this.route, {\n modal: 'editQualifications'\n });\n\n if (value) {\n this.form.patchValue(value);\n this.title = 'Edit Education';\n } else {\n this.form.reset();\n this.title = 'Add Education';\n }\n\n this.modalService.open(this.content, {\n centered: true,\n size: 'lg',\n windowClass: 'modal-holder'\n });\n }\n\n onDateChange(): void {\n const fromDate = this.form.controls['started_on'].value;\n if (fromDate) {\n this.minToDate = new Date(fromDate);\n this.minToDate.setDate(this.minToDate.getDate() + 1);\n }\n }\n\n @ValidateForm('form')\n onSaveDetail() {\n this.buttonBusy = true;\n const data = { ...this.form.value };\n data.user_id = this.userId;\n data.degree = this.qualifications.find(x => x.value === data.points)?.label;\n\n const sub$ = data?.id\n ? this.qualificationService.updateQualifications(data.id, data)\n : this.qualificationService.addQualifications(data);\n\n sub$.subscribe(() => {\n const msg = data.id\n ? this.translation.translate('User.Profile.Qualifications.UpdatedMessage')\n : this.translation.translate('User.Profile.Qualifications.AddedMessage');\n this.toast.success(msg);\n this.saveEvent.emit();\n clearQueryParams(this.router, this.route);\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n }).add(() => {\n this.buttonBusy = false;\n this.cdr.markForCheck();\n });\n }\n}\n","<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\"\n id=\"modal-basic-title\">{{ title }}</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"form\">\n <div class=\"row p-2\">\n <pw-input-container class=\"col-12\"\n controlId=\"edit-qualifications-school\"\n label=\"School\"\n name=\"school\"\n errorMsg=\"This field is required.\">\n <input type=\"text\"\n id=\"edit-qualifications-school\"\n class=\"form-control\"\n [placeholder]=\"'User.Profile.Qualifications.Placeholder.School' | transloco\"\n formControlName=\"school\"\n aria-label=\"School\" />\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-qualifications-started_on\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"Dates Attended\"\n name=\"started_on\"\n errorMsg=\"This field is required.\">\n <div class=\"ui-fluid\">\n <p-datepicker inputId=\"edit-qualifications-started_on\" formControlName=\"started_on\"\n [attr.aria-labelledby]=\"'edit-qualifications-started_on-label'\"\n [monthNavigator]=\"true\"\n [yearNavigator]=\"true\"\n yearRange=\"1950:2020\"\n (onSelect)=\"onDateChange()\"\n [showIcon]=\"true\"\n placeholder=\"yyyy-mm-dd\"\n dateFormat=\"yy-mm-dd\">\n </p-datepicker>\n </div>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-qualifications-ended_on\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"Dates Completed\"\n name=\"ended_on\"\n errorMsg=\"This field is required.\">\n <div class=\"ui-fluid\">\n <p-datepicker inputId=\"edit-qualifications-ended_on\" formControlName=\"ended_on\"\n [attr.aria-labelledby]=\"'edit-qualifications-ended_on-label'\"\n [monthNavigator]=\"true\"\n [yearNavigator]=\"true\"\n [showIcon]=\"true\"\n (onSelect)=\"onDateChange()\"\n [minDate]=\"minToDate\"\n placeholder=\"yyyy-mm-dd\"\n dateFormat=\"yy-mm-dd\"\n yearRange=\"1950:2025\"></p-datepicker>\n </div>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-qualifications-points\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"Degree\"\n name=\"points\"\n errorMsg=\"This field is required.\">\n <p-select inputId=\"edit-qualifications-points\"\n [options]=\"qualifications\"\n [attr.aria-labelledby]=\"'edit-qualifications-points-label'\"\n [placeholder]=\"'User.Profile.Qualifications.Placeholder.Degree' | transloco\"\n formControlName=\"points\"></p-select>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-qualifications-course\"\n label=\"Course\"\n name=\"course\"\n errorMsg=\"This field is required.\">\n <input type=\"text\"\n id=\"edit-qualifications-course\"\n class=\"form-control\"\n [placeholder]=\"'User.Profile.Qualifications.Placeholder.Course' | transloco\"\n formControlName=\"course\"\n aria-label=\"Course\" />\n </pw-input-container>\n\n <pw-input-container class=\"col-12\"\n controlId=\"edit-qualifications-description\"\n label=\"Description\"\n name=\"description\">\n <textarea type=\"text\"\n id=\"edit-qualifications-description\"\n class=\"form-control\"\n [placeholder]=\"'User.Profile.Qualifications.Placeholder.Description' | transloco\"\n formControlName=\"description\"\n aria-label=\"Description\"></textarea>\n </pw-input-container>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"modal.close()\">\n Cancel\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary\"\n (click)=\"onSaveDetail()\">Save</button>\n </div>\n</ng-template>\n\n<i\n class=\"fa fa-lg pi pi-plus-circle float-end mt-2 pt-1 pt-md-0 profile-icons\"\n data-cy=\"add-qualification\"\n (keydown.enter)=\"onOpen()\"\n aria-label=\"Add Qualification\"\n (click)=\"onOpen()\"\n aria-hidden=\"true\"\n></i>\n","import { ChangeDetectorRef, Component, Input, TemplateRef, ViewChild } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\n\nimport { ProfileService } from '@posiwise/common-services';\nimport { Project, User } from '@posiwise/common-utilities';\nimport { ValidateForm } from '@posiwise/utils';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { ModalContext } from '../../shared/interface/user-module.interface';\n\n@Component({\n selector: 'pw-edit-recommendation-modal',\n templateUrl: './edit-recommendation-modal.component.html',\n\n standalone: false\n})\nexport class EditRecommendationModalComponent {\n @ViewChild('content', { static: true }) content: TemplateRef<ModalContext>;\n\n @Input() user: User;\n\n form: UntypedFormGroup;\n\n title = 'Endorse';\n\n buttonBusy = false;\n\n project = new Project();\n\n constructor(\n public modalService: NgbModal,\n private readonly fb: UntypedFormBuilder,\n private readonly profileService: ProfileService,\n private readonly cdr: ChangeDetectorRef\n ) {\n this.form = this.fb.group({\n project_id: [null],\n user_id: [null],\n description: [null, Validators.required],\n quality: [null],\n time: [null],\n communication: [null]\n });\n }\n\n onOpen(value = null) {\n if (value) {\n this.project = value;\n }\n this.modalService.open(this.content, {\n centered: true,\n size: 'lg',\n windowClass: 'modal-holder'\n });\n }\n\n @ValidateForm('form')\n onSaveDetail() {\n this.buttonBusy = true;\n const data = {\n user_id: this.user.id,\n project_id: this.project.id,\n description: this.form.get('description').value,\n quality: this.form.get('quality').value,\n time: this.form.get('time').value,\n communication: this.form.get('communication').value\n } as object;\n\n this.profileService\n .postProjectRecommendation(data)\n .subscribe(_ => {\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n })\n .add(() => {\n this.buttonBusy = false;\n this.cdr.markForCheck();\n });\n }\n}\n","<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\"\n id=\"modal-basic-title\">{{ title }}</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"form\">\n <div class=\"row p-2\">\n <pw-input-container class=\"col-12 col-md-4\"\n controlId=\"edit-recommendation-quality\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"Quality\"\n name=\"quality\"\n errorMsg=\"This field is required.\">\n <p-rating formControlName=\"quality\"\n [attr.aria-labelledby]=\"'edit-recommendation-quality-label'\"\n [cancel]=\"false\"></p-rating>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-4\"\n controlId=\"edit-recommendation-communication\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"Communication\"\n name=\"communication\"\n errorMsg=\"This field is required.\">\n <p-rating formControlName=\"communication\"\n [attr.aria-labelledby]=\"'edit-recommendation-communication-label'\"\n [cancel]=\"false\"></p-rating>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-4\"\n controlId=\"edit-recommendation-time\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"Time\"\n name=\"time\"\n errorMsg=\"This field is required.\">\n <p-rating formControlName=\"time\"\n [attr.aria-labelledby]=\"'edit-recommendation-time-label'\"\n [cancel]=\"false\"></p-rating>\n </pw-input-container>\n\n <pw-input-container class=\"col-12\"\n controlId=\"edit-recommendation-description\"\n label=\"Description\"\n name=\"description\"\n errorMsg=\"This field is required.\">\n <textarea type=\"text\"\n id=\"edit-recommendation-description\"\n class=\"form-control\"\n formControlName=\"description\"\n aria-label=\"Description\"></textarea>\n </pw-input-container>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"modal.close()\">\n Cancel\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary\"\n (click)=\"onSaveDetail()\">Save</button>\n </div>\n</ng-template>\n\n<!-- <i class=\"fal fa-plus-circle fa-2x btn-link float-end btn-add\" (click)=\"onOpen()\" aria-hidden=\"true\"></i> -->\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Injector,\n Input,\n Output,\n TemplateRef,\n ViewChild\n} from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { TagService } from '@posiwise/common-services';\nimport { TAG_ENTITY, TAG_TYPE } from '@posiwise/common-utilities';\nimport { appendQueryParam, clearQueryParams } from '@posiwise/utils';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { ModalContext } from '../../shared/interface/user-module.interface';\n\n@Component({\n selector: 'pw-edit-skills-modal',\n templateUrl: './edit-skills-modal.component.html',\n\n standalone: false\n})\nexport class EditSkillsModalComponent extends AppBaseComponent {\n @ViewChild('content', { static: true }) content: TemplateRef<ModalContext>;\n\n @Input()\n userId: number;\n\n @Input()\n slug: string;\n\n @Input()\n entityType = TAG_TYPE.SKILLS;\n\n @Input()\n entityEntity = TAG_ENTITY.USER;\n\n @Output()\n saveEvent: EventEmitter<boolean> = new EventEmitter();\n\n allSkills = [];\n\n searchSkills = [];\n\n selectedSkills = [];\n\n constructor(\n private readonly modalService: NgbModal,\n private readonly tagService: TagService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n }\n\n open() {\n this.getSkills();\n this.modalService.open(this.content, { centered: true, windowClass: 'modal-holder' });\n appendQueryParam(this.router, this.route, {\n modal: 'editskills'\n });\n }\n\n /**\n * Populate all the skills for the dropdown\n */\n private getSkills() {\n this.tagService.getTagsByType('skills', {}).subscribe(response => {\n this.allSkills = response.tags;\n this.getEntitySkills();\n this.cdr.markForCheck();\n });\n }\n\n /**\n * Skills Search\n * @param event: keyword to search\n */\n search(event) {\n let data = [];\n if (event.query) {\n data = this.allSkills.filter(x =>\n x.name.toLowerCase().includes(event.query.toLowerCase())\n );\n } else {\n this.allSkills.forEach(item => {\n data.push(item);\n });\n }\n this.searchSkills = data;\n }\n\n close(modal) {\n modal.close();\n this.selectedSkills = [];\n }\n\n private getEntitySkills() {\n this.tagService\n .getTagsByEntity(this.slug, this.entityEntity, this.entityType)\n .subscribe(response => {\n this.selectedSkills = this.allSkills.filter(item => {\n return response.tags.find(x => x.id === item.id);\n });\n this.cdr.markForCheck();\n });\n }\n\n saveUserSkills() {\n const skills = [];\n this.selectedSkills.forEach(element => {\n skills.push({\n tag_id: element.id,\n rank: element.id,\n years: 0,\n preferred: true\n });\n });\n\n const postData = {\n entity_tags: skills,\n user_id: Number(this.userId),\n slug: this.slug,\n tag_entity: this.entityEntity\n };\n\n this.tagService.addTags(postData).subscribe(() => {\n this.saveEvent.emit(true);\n this.toast.success(this.translation.translate('User.Profile.Skills.UpdatedMessage'));\n clearQueryParams(this.router, this.route);\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n });\n }\n}\n","<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\"\n id=\"modal-basic-title\">My Skills</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"ui-fluid skills-modal skills-dropdown\">\n <p-auto-complete class=\"w-100\" appendTo=\"body\" [(ngModel)]=\"selectedSkills\"\n [suggestions]=\"searchSkills\"\n dataKey=\"id\"\n optionLabel=\"name\"\n (completeMethod)=\"search($event)\"\n [minLength]=\"1\"\n [maxlength]=\"10\"\n placeholder=\"Skills\"\n [dropdown]=\"true\"\n [multiple]=\"true\"></p-auto-complete>\n\n <small class=\"p-2\">Select up to 10 skills.</small>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"close(modal)\">Cancel</button>\n <button type=\"button\"\n class=\"btn btn-primary\"\n (click)=\"saveUserSkills()\">Save</button>\n </div>\n</ng-template>\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Injector,\n Input,\n OnInit,\n Output,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport { AbstractControl, UntypedFormBuilder, UntypedFormGroup, ValidatorFn } from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { ProfileService } from '@posiwise/common-services';\nimport { ValidateForm } from '@posiwise/utils';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { ModalContext, ValidationError } from '../../shared/interface/user-module.interface';\n\n@Component({\n selector: 'pw-edit-social-links',\n templateUrl: './edit-social-links.component.html',\n styleUrls: ['./edit-social-links.component.scss'],\n standalone: false\n})\nexport class EditSocialLinksComponent extends AppBaseComponent implements OnInit {\n @ViewChild('content', { static: true }) content: TemplateRef<ModalContext>;\n\n @Input() links: Record<string, string> = {};\n @Input() userId: number;\n\n @Output() saveEvent: EventEmitter<void> = new EventEmitter();\n\n form: UntypedFormGroup;\n\n buttonBusy = false;\n\n readonly socialNetworks: ReadonlyArray<{\n key: string;\n labelKey: string;\n icon: string;\n placeholder: string;\n }> = [\n {\n key: 'linkedin',\n labelKey: 'User.Profile.SocialLinks.Label.LinkedIn',\n icon: 'linkedin',\n placeholder: 'https://linkedin.com/in/nickname'\n },\n {\n key: 'twitter',\n labelKey: 'User.Profile.SocialLinks.Label.Twitter',\n icon: 'twitter',\n placeholder: 'https://twitter.com/nickname'\n },\n {\n key: 'facebook',\n labelKey: 'User.Profile.SocialLinks.Label.Facebook',\n icon: 'facebook',\n placeholder: 'https://www.facebook.com/nickname'\n },\n {\n key: 'youtube',\n labelKey: 'User.Profile.SocialLinks.Label.YouTube',\n icon: 'youtube',\n placeholder: 'https://www.youtube.com/nickname'\n },\n {\n key: 'instagram',\n labelKey: 'User.Profile.SocialLinks.Label.Instagram',\n icon: 'instagram',\n placeholder: 'https://www.instagram.com/nickname'\n },\n {\n key: 'github',\n labelKey: 'User.Profile.SocialLinks.Label.Github',\n icon: 'github',\n placeholder: 'https://github.com/nickname'\n },\n {\n key: 'stackoverflow',\n labelKey: 'User.Profile.SocialLinks.Label.Stackoverflow',\n icon: 'stackoverflow',\n placeholder: 'http://stackoverflow.com/users/nickname'\n }\n ];\n\n constructor(\n injector: Injector,\n private readonly modalService: NgbModal,\n private readonly fb: UntypedFormBuilder,\n private readonly profileService: ProfileService,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n this.form = this.fb.group({\n user_id: 0,\n linkedin: ['', this.urlValidator('linkedin')],\n twitter: ['', this.urlValidator('twitter')],\n facebook: ['', this.urlValidator('facebook')],\n youtube: ['', this.urlValidator('youtube')],\n instagram: ['', this.urlValidator('instagram')],\n github: ['', this.urlValidator('github')],\n stackoverflow: ['', this.urlValidator('stackoverflow')]\n });\n }\n\n /** Tenant company name (domain-metadata driven), falling back to PosiWise. */\n get companyName(): string {\n return this.appConfig?.company?.name || 'PosiWise';\n }\n\n private urlValidator(social: string): ValidatorFn {\n return (control: AbstractControl): ValidationError | null => {\n if (!control.value) {\n return null;\n }\n try {\n const parsed = new URL(control.value);\n if (parsed.protocol !== 'https:' && parsed.protocol !== 'http:') {\n return { urlMalformed: { value: control.value } };\n }\n const host = parsed.hostname.toLowerCase();\n\n return host.includes(social) ? null : { urlMalformed: { value: control.value } };\n } catch {\n return { urlMalformed: { value: control.value } };\n }\n };\n }\n\n ngOnInit() {\n this.form.patchValue(this.links);\n }\n\n onOpen(links) {\n this.links = links;\n this.form.patchValue(this.links);\n this.modalService.open(this.content, {\n centered: true,\n size: 'md',\n windowClass: 'modal-holder edit-social-links-modal'\n });\n }\n\n @ValidateForm('form')\n onSaveDetail() {\n this.buttonBusy = true;\n this.form.patchValue({\n user_id: this.userId\n });\n this.profileService\n .postLinks(this.form.value)\n .subscribe(_ => {\n this.toast.success(\n this.translation.translate('User.Profile.SocialLinks.AddedMessage')\n );\n this.modalService.dismissAll();\n this.saveEvent.emit();\n this.cdr.markForCheck();\n })\n .add(() => {\n this.buttonBusy = false;\n this.cdr.markForCheck();\n });\n }\n}\n","<ng-template #content\n let-modal>\n <div class=\"modal-header edit-social-links-header\">\n <h4 class=\"modal-title edit-social-links__title\"\n id=\"modal-basic-title\">{{ 'User.Profile.SocialLinks.Title' | transloco }}</h4>\n <button type=\"button\"\n class=\"btn-close\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n </button>\n </div>\n <div class=\"modal-body edit-social-links-body\">\n <form [formGroup]=\"form\"\n class=\"edit-social-links\"\n (ngSubmit)=\"onSaveDetail()\">\n <p class=\"edit-social-links__intro\">\n {{ 'User.Profile.SocialLinks.Description' | transloco: { company: companyName } }}\n </p>\n\n <div class=\"edit-social-links__stack\">\n @for (social of socialNetworks; track social.key) {\n <div class=\"edit-social-links__field\">\n <label [for]=\"'external-portfolio-' + social.key\"\n class=\"edit-social-links__label\">\n <span class=\"edit-social-links__chip\">\n <img [src]=\"'/assets/img/icons/social/' + social.icon + '.svg'\"\n width=\"18\"\n height=\"18\"\n alt=\"\" />\n </span>\n <span class=\"edit-social-links__label-text\">{{ social.labelKey | transloco }}</span>\n </label>\n <input type=\"url\"\n [id]=\"'external-portfolio-' + social.key\"\n [name]=\"social.key\"\n [formControlName]=\"social.key\"\n class=\"form-control edit-social-links__input\"\n [placeholder]=\"social.placeholder\"\n autocomplete=\"url\" />\n </div>\n }\n </div>\n </form>\n </div>\n <div class=\"modal-footer edit-social-links-footer\">\n <button type=\"button\"\n class=\"btn edit-social-links__cancel\"\n (click)=\"modal.close()\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary edit-social-links__save\"\n (click)=\"onSaveDetail()\">{{ 'Button.Save' | transloco }}</button>\n </div>\n</ng-template>\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Injector,\n Input,\n OnInit,\n Output,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\nimport { NgxGpAutocompleteDirective } from '@angular-magic/ngx-gp-autocomplete';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { GeoService, ProfileService } from '@posiwise/common-services';\nimport { Country } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\nimport { ValidateForm } from '@posiwise/utils';\n\nimport { Observable } from 'rxjs';\n\nimport { NgbDateStruct, NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { EditUser, ModalContext, UserProfile } from '../../shared/interface/user-module.interface';\n\n@Component({\n selector: 'pw-edit-user-profile-modal',\n templateUrl: './edit-user-profile-modal.component.html',\n styleUrl: './edit-user-profile-modal.component.scss',\n\n standalone: false\n})\nexport class EditUserProfileModalComponent extends AppBaseComponent implements OnInit {\n @ViewChild('content', { static: true }) content: TemplateRef<ModalContext>;\n\n @Input() slug: string;\n @Input() user: EditUser;\n\n @Output() saveEvent: EventEmitter<UserProfile> = new EventEmitter<UserProfile>();\n\n @ViewChild('ngxPlaces') placesRef: NgxGpAutocompleteDirective;\n\n form: UntypedFormGroup;\n\n countries$: Observable<Country[]>;\n\n states: Country[] = [];\n buttonBusy = false;\n\n constructor(\n public modalService: NgbModal,\n private readonly fb: UntypedFormBuilder,\n private readonly profileService: ProfileService,\n private readonly geoService: GeoService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n this.form = this.fb.group({\n first_name: [null, Validators.required],\n last_name: [null, Validators.required],\n headline: [null, Validators.required],\n description: [null, Validators.required],\n gender: ['M'],\n phone_number: [null],\n dob: [null, Validators.required],\n website_url: [null],\n country: [null, Validators.required],\n postcode: [null],\n location: [null],\n state: [null, Validators.required],\n province: [null, Validators.required]\n });\n }\n\n ngOnInit() {\n this.countries$ = this.geoService.getCountries();\n this.cdr.markForCheck();\n this.getValues();\n }\n\n getValues() {\n let dobObject: NgbDateStruct;\n\n const userProfile = this.user?.profile;\n if (userProfile) {\n if (userProfile?.country) {\n this.getRegion(userProfile.country);\n }\n if (userProfile?.dob) {\n dobObject = {\n year: Number(userProfile.dob.substring(0, 4)),\n month: Number(userProfile.dob.substring(5, 7)),\n day: Number(userProfile.dob.substring(8, 10))\n };\n\n this.form.patchValue({});\n }\n\n this.form.patchValue(userProfile);\n this.form.patchValue({\n first_name: this.user.first_name,\n last_name: this.user.last_name,\n dob: dobObject || {}\n });\n }\n }\n\n handleAddressChange(_event) {\n this.form.patchValue({\n latitude: _event.geometry.location.lat(),\n longitude: _event.geometry.location.lng(),\n location: _event.formatted_address\n });\n }\n\n onOpen() {\n this.form.reset();\n this.getValues();\n this.modalService.open(this.content, {\n centered: true,\n size: 'lg',\n windowClass: 'modal-holder'\n });\n }\n\n getRegion(countryId) {\n if (countryId) {\n this.geoService.getRegions(countryId).subscribe(response => {\n this.states = response;\n this.cdr.markForCheck();\n });\n }\n }\n\n onSaveDetail() {\n this.form.patchValue({ province: this.form.value.state });\n this.save();\n }\n\n @ValidateForm('form')\n save() {\n this.buttonBusy = true;\n const data = { ...this.form.value };\n data.dob = HelperService.dateFormat(this.form.get('dob').value);\n\n this.profileService\n .updateUserProfile(data)\n .subscribe(response => {\n if (response.id) {\n this.toast.success(this.translation.translate('User.Profile.ProfileUpdated'));\n this.modalService.dismissAll();\n this.saveEvent.emit(response);\n }\n this.cdr.markForCheck();\n })\n .add(() => {\n this.buttonBusy = false;\n this.cdr.markForCheck();\n });\n }\n}\n","<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\"\n id=\"modal-basic-title\">Edit Intro</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSaveDetail()\">\n <div class=\"row\">\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-first-name\"\n label=\"First Name\"\n name=\"first_name\"\n errorMsg=\"Please enter first Name\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"first_name\"\n id=\"edit-intro-first-name\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.FirstName' | transloco\"\n autocomplete=\"given-name\" name=\"input_first_name_1\"\n aria-label=\"First Name\"/>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-last-name\"\n label=\"Last Name\"\n name=\"last_name\"\n errorMsg=\"Please enter last Name\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"last_name\"\n id=\"edit-intro-last-name\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.LastName' | transloco\"\n autocomplete=\"family-name\" name=\"input_last_name_2\"\n aria-label=\"Last Name\"/>\n </pw-input-container>\n\n <pw-input-container class=\"col-12\"\n controlId=\"edit-intro-headline\"\n label=\"Headline\"\n name=\"headline\"\n errorMsg=\"Please enter headline\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"headline\"\n id=\"edit-intro-headline\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Headline' | transloco\" name=\"input_headline_3\"\n aria-label=\"Headline\"/>\n </pw-input-container>\n\n <pw-input-container class=\"col-12\"\n controlId=\"edit-intro-description\"\n label=\"About me\"\n name=\"description\"\n errorMsg=\"Please enter description\">\n <textarea class=\"form-control\"\n id=\"edit-intro-description\"\n name=\"description\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Description' | transloco\"\n formControlName=\"description\"\n aria-label=\"Description\"></textarea>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-gender\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"Gender\"\n name=\"gender\"\n errorMsg=\"Please enter Gender\">\n <p-select-button [options]=\"[\n { label: 'Male', value: 'M' },\n { label: 'Female', value: 'F' }\n ]\"\n [attr.aria-labelledby]=\"'edit-intro-gender-label'\"\n formControlName=\"gender\"></p-select-button>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-dob\"\n label=\"Date of Birth\"\n name=\"dob\"\n errorMsg=\"Please enter date of birth\">\n <div class=\"input-group\">\n <input class=\"form-control\"\n id=\"edit-intro-dob\"\n name=\"dob\"\n placeholder=\"yyyy-mm-dd\"\n formControlName=\"dob\"\n ngbDatepicker\n #d=\"ngbDatepicker\"\n [minDate]=\"{ year: 1950, month: 1, day: 1 }\"\n [maxDate]=\"{ year: 2018, month: 12, day: 31 }\"\n autocomplete=\"off\"\n aria-label=\"yyyy-mm-dd\" />\n <button class=\"btn btn-primary\"\n type=\"button\"\n aria-label=\"Open date picker\"\n (click)=\"d.toggle()\">\n <i class=\"fa fa-calendar\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-phone\"\n label=\"Phone\"\n name=\"phone_number\"\n errorMsg=\"Please enter phone\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"phone_number\"\n id=\"edit-intro-phone\"\n name=\"phone_number\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Phone' | transloco\"\n autocomplete=\"tel\"\n aria-label=\"Phone Number\" />\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-postcode\"\n label=\"Postcode\"\n name=\"postcode\"\n errorMsg=\"Please enter postcode\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"postcode\"\n id=\"edit-intro-postcode\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Postcode' | transloco\"\n autocomplete=\"postal-code\" name=\"input_postcode_6\"\n aria-label=\"Postcode\"/>\n </pw-input-container>\n\n @if (countries$ | async; as countries) {\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-country\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"Country\"\n name=\"country\"\n errorMsg=\"Please select a country\">\n <p-select\n [attr.aria-labelledby]=\"'edit-intro-country-label'\"\n [options]=\"countries\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"country\"\n (onChange)=\"getRegion($event.value)\"\n [placeholder]=\"'User.Profile.SelectCountry' | transloco\">\n </p-select>\n </pw-input-container>\n }\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-state\"\n [useAriaLabelledbyOnly]=\"true\"\n label=\"State\"\n name=\"state\"\n errorMsg=\"Please select a state\">\n <p-select\n [attr.aria-labelledby]=\"'edit-intro-state-label'\"\n [options]=\"states\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"state\"\n [placeholder]=\"'User.Profile.SelectState' | transloco\">\n </p-select>\n </pw-input-container>\n\n <!-- Location -->\n <pw-input-container label=\"Location\"\n class=\"col-12 col-md-6\"\n controlId=\"edit-intro-location\"\n [useAriaLabelledbyOnly]=\"true\"\n name=\"location\">\n <input ngx-gp-autocomplete\n id=\"edit-intro-location\"\n name=\"location\"\n class=\"form-control\"\n #places=\"ngx-places\"\n formControlName=\"location\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Location' | transloco\"\n [attr.aria-labelledby]=\"'edit-intro-location-label'\"\n (onAddressChange)=\"handleAddressChange($event)\"\n aria-label=\"Location\" />\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-website\"\n label=\"Website\"\n name=\"website_url\"\n errorMsg=\"Please enter Website\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"website_url\"\n id=\"edit-intro-website\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Website' | transloco\"\n autocomplete=\"url\" name=\"input_website_url_8\"\n aria-label=\"Website Url\"/>\n </pw-input-container>\n </div>\n <div class=\"modal-footer\">\n <input type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"modal.close()\"\n value=\"Cancel\" id=\"input_field_9\" name=\"input_field_9\"\n aria-label=\"Cancel\"/>\n <input type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary\"\n value=\"Save Changes\" id=\"input_field_10\" name=\"input_field_10\"\n aria-label=\"Save Changes\"/>\n </div>\n </form>\n </div>\n</ng-template>\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Injector,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild\n} from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { ProfileService, QualificationService, TagService } from '@posiwise/common-services';\nimport { TAG_ENTITY, TAG_TYPE, User } from '@posiwise/common-utilities';\nimport { ConfirmDialogService } from '@posiwise/shared-components';\n\nimport { forkJoin, Subscription } from 'rxjs';\n\nimport {\n AboutUserProfile,\n Qualification,\n Skill\n} from '../../shared/interface/user-module.interface';\nimport { EditQualificationsModalComponent } from '../edit-qualifications-modal/edit-qualifications-modal.component';\nimport { EditSkillsModalComponent } from '../edit-skills-modal/edit-skills-modal.component';\nimport { EditSocialLinksComponent } from '../edit-social-links/edit-social-links.component';\nimport { EditUserProfileModalComponent } from '../edit-user-profile-modal/edit-user-profile-modal.component';\n\n@Component({\n selector: 'pw-user-about',\n templateUrl: './user-about.component.html',\n styleUrls: ['./user-about.component.scss'],\n\n standalone: false\n})\nexport class UserAboutComponent extends AppBaseComponent implements OnInit, OnDestroy {\n @Input() user: User;\n @Input() isEdit = false;\n\n @Output()\n saveEvent: EventEmitter<boolean> = new EventEmitter();\n\n @ViewChild(EditUserProfileModalComponent, { static: false })\n modal: EditUserProfileModalComponent;\n\n @ViewChild(EditQualificationsModalComponent, { static: false })\n qualificationModal: EditQualificationsModalComponent;\n\n @ViewChild(EditSkillsModalComponent, { static: false })\n skillsModal: EditSkillsModalComponent;\n\n @ViewChild(EditSocialLinksComponent, { static: false })\n socialModal: EditSocialLinksComponent;\n\n private readonly navigationSubscription: Subscription;\n\n allSkills = [];\n\n searchSkills = [];\n\n selectedSkills: Skill[];\n\n objectKeys = Object.keys;\n\n user_profile: AboutUserProfile;\n\n qualifications: Qualification[] = [];\n\n userLinks: Record<string, string> = {};\n\n noUserLinks: boolean;\n\n loading = false;\n\n constructor(\n private readonly profileService: ProfileService,\n private readonly qualificationService: QualificationService,\n private readonly tagService: TagService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef,\n private readonly confirmDialog: ConfirmDialogService\n ) {\n super(injector);\n }\n\n ngOnInit() {\n this.getUserDetails();\n this.getSkills();\n }\n\n getUserDetails() {\n this.loading = true;\n forkJoin({\n user_profile: this.profileService.getUserObject('user_profile', this.user.slug),\n qualifications: this.profileService.getUserObject('qualifications', this.user.slug),\n user_links: this.profileService.getUserObject('user_link', this.user.slug),\n user_skills: this.tagService.getGroupedSkills(\n this.user.slug,\n TAG_ENTITY.USER,\n TAG_TYPE.SKILLS\n )\n }).subscribe({\n next: response => {\n this.user_profile = response.user_profile;\n this.user['profile'] = response.user_profile;\n this.qualifications = response.qualifications;\n this.userLinks = response.user_links || [];\n this.noUserLinks = Object.values(this.userLinks).some(x => !!x);\n this.selectedSkills = response.user_skills;\n this.loading = false;\n this.cdr.markForCheck();\n },\n error: err => {\n this.loading = false;\n this.toast.showToast(err);\n this.cdr.markForCheck();\n },\n complete: () => {\n this.loading = false;\n this.cdr.markForCheck();\n }\n });\n }\n\n /**\n * Populate all the skills for the dropdown\n */\n private getSkills() {\n this.tagService.getTagsByType('skills', {}).subscribe(response => {\n this.allSkills = response.skills;\n this.cdr.markForCheck();\n });\n }\n\n onProfileOpen() {\n this.modal.onOpen();\n }\n\n openSkills() {\n this.skillsModal.open();\n }\n\n onProfileSaved(_event) {\n this.getUserDetails();\n this.saveEvent.emit();\n }\n\n onOpenSocial() {\n if (this.socialModal) {\n this.socialModal.onOpen(this.userLinks); // Pass userLinks to the modal\n }\n }\n\n editQualification(item) {\n this.qualificationModal.onOpen(item);\n }\n\n deleteQualification(item) {\n this.confirmDialog\n .open({\n title: 'Delete',\n text: `Are you sure you want to delete <strong>${item.degree}</strong>?`,\n destructive: true\n })\n .then(ok => {\n if (!ok) {\n return;\n }\n this.qualificationService.deleteQualifications(item.id).subscribe(() => {\n this.toast.success(\n this.translation.translate(\n 'User.Profile.Qualifications.QualificationDelete'\n )\n );\n this.getUserDetails();\n this.cdr.markForCheck();\n });\n });\n }\n\n onSaveUserLinks() {\n this.getUserDetails();\n }\n\n trackByQualification(_index: number, item: { id: number }) {\n return item.id;\n }\n\n override ngOnDestroy() {\n // avoid memory leaks here by cleaning up after ourselves. If we\n // don't then we will continue to run our initialiseInvites()\n // method on every navigationEnd event.\n if (this.navigationSubscription) {\n this.navigationSubscription.unsubscribe();\n }\n }\n}\n","<div class=\"about\">\n <!-- Personal Information -->\n <section class=\"about-section\" data-cy=\"personal-info\">\n <header class=\"about-section__head\">\n <span class=\"about-section__icon\"><i class=\"fa fa-user\" aria-hidden=\"true\"></i></span>\n <h2 class=\"about-section__title\">{{ 'User.Profile.About.PersonalInfo' | transloco }}</h2>\n @if (user && isEdit) {\n <button type=\"button\" class=\"about-section__edit\" (click)=\"onProfileOpen()\" [attr.aria-label]=\"'User.Profile.About.EditPersonalInfo' | transloco\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n </button>\n }\n </header>\n <div class=\"about-bio\">\n <span class=\"about-field__label\">{{ 'User.Profile.About.AboutMe' | transloco }}</span>\n <p class=\"about-bio__text\" [class.is-empty]=\"!user_profile?.description\">\n {{ user_profile?.description || ('User.Profile.About.NoDescription' | transloco) }}\n </p>\n </div>\n <dl class=\"about-grid\">\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Birthday' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user_profile?.dob\">{{ (user_profile?.dob | dateFormat) || '—' }}</dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.LivesIn' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user_profile?.country\">{{ user_profile?.country || '—' }}</dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Gender' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user_profile?.gender\">\n {{\n user_profile?.gender === 'M'\n ? ('User.Profile.About.Male' | transloco)\n : user_profile?.gender === 'F'\n ? ('User.Profile.About.Female' | transloco)\n : '—'\n }}\n </dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Email' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user?.email\">\n @if (user?.email) {\n <a class=\"about-field__link\" [href]=\"'mailto:' + user.email\">{{ user.email }}</a>\n } @else {\n —\n }\n </dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.PhoneNumber' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user_profile?.phone_number\">{{ user_profile?.phone_number || '—' }}</dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Website' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user_profile?.website_url\">\n @if (user_profile?.website_url) {\n <a class=\"about-field__link\" target=\"_blank\" rel=\"noopener noreferrer\" [href]=\"user_profile.website_url\">{{ user_profile.website_url }}</a>\n } @else {\n —\n }\n </dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Joined' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user?.joined_at\">{{ (user?.joined_at | dateFormat) || '—' }}</dd>\n </div>\n </dl>\n @if (user && isEdit) {\n <pw-edit-user-profile-modal [user]=\"user\" (saveEvent)=\"onProfileSaved($event)\" [slug]=\"user?.slug\"></pw-edit-user-profile-modal>\n }\n </section>\n\n <!-- Skills -->\n <section class=\"about-section\" data-cy=\"skills-info\">\n <header class=\"about-section__head\">\n <span class=\"about-section__icon\"><i class=\"fa fa-bolt\" aria-hidden=\"true\"></i></span>\n <h2 class=\"about-section__title\">{{ 'User.Profile.About.Skills' | transloco }}</h2>\n @if (isEdit) {\n <button type=\"button\" class=\"about-section__edit\" (click)=\"openSkills()\" [attr.aria-label]=\"'User.Profile.About.EditSkills' | transloco\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n </button>\n }\n </header>\n @if (selectedSkills?.length) {\n <div class=\"about-skills\">\n @for (skill of selectedSkills; track skill) {\n <div class=\"about-skills__group\">\n <span class=\"about-skills__category\">{{ skill.category_name }}</span>\n <div class=\"about-tags\">\n @for (item of skill.tags; track item) {\n <span class=\"about-tag\">{{ item.name }}</span>\n }\n </div>\n </div>\n }\n </div>\n } @else {\n <p class=\"about-empty\">{{ (isEdit ? 'User.Profile.About.NoSkillsEdit' : 'User.Profile.About.NoSkills') | transloco }}</p>\n }\n @if (isEdit) {\n <pw-edit-skills-modal [userId]=\"user?.id\" [slug]=\"user?.slug\" (saveEvent)=\"getUserDetails()\"></pw-edit-skills-modal>\n }\n </section>\n\n <!-- Educational Information -->\n <section class=\"about-section\" data-cy=\"educational-info\">\n <header class=\"about-section__head\">\n <span class=\"about-section__icon\"><i class=\"fa fa-graduation-cap\" aria-hidden=\"true\"></i></span>\n <h2 class=\"about-section__title\">{{ 'User.Profile.About.Education' | transloco }}</h2>\n @if (isEdit) {\n <button type=\"button\" class=\"about-section__edit\" (click)=\"qualificationModal.onOpen()\" [attr.aria-label]=\"'User.Profile.About.AddEducation' | transloco\">\n <i class=\"fa fa-plus\" aria-hidden=\"true\"></i>\n </button>\n }\n </header>\n @if (qualifications?.length) {\n <div class=\"about-edu\">\n @for (item of qualifications; track trackByQualification($index, item)) {\n <article class=\"about-edu__item\">\n <div class=\"about-edu__main\">\n <h4 class=\"about-edu__school\">{{ item?.school }}</h4>\n <dl class=\"about-grid about-grid--compact\">\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Period' | transloco }}</dt>\n <dd class=\"about-field__value\">{{ item?.started_on }} – {{ item?.ended_on }}</dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Degree' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!item?.degree\">{{ item?.degree || '—' }}</dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Course' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!item?.course\">{{ item?.course || '—' }}</dd>\n </div>\n </dl>\n </div>\n @if (isEdit) {\n <div class=\"about-edu__actions\">\n <button type=\"button\" class=\"about-icon-btn\" [attr.aria-label]=\"'User.Profile.About.EditEducation' | transloco\" (click)=\"editQualification(item)\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n </button>\n <button type=\"button\" class=\"about-icon-btn about-icon-btn--danger\" data-cy=\"delete-qualification\" [attr.aria-label]=\"'User.Profile.About.DeleteEducation' | transloco\" (click)=\"deleteQualification(item)\">\n <i class=\"fa fa-trash\" aria-hidden=\"true\"></i>\n </button>\n </div>\n }\n </article>\n }\n </div>\n } @else {\n <p class=\"about-empty\">{{ 'User.Profile.About.NoEducation' | transloco }}</p>\n }\n @if (isEdit) {\n <pw-edit-qualifications-modal (saveEvent)=\"getUserDetails()\"></pw-edit-qualifications-modal>\n }\n </section>\n\n <!-- External Portfolio -->\n <section class=\"about-section\" data-cy=\"portfolio-info\">\n <header class=\"about-section__head\">\n <span class=\"about-section__icon\"><i class=\"fa fa-link\" aria-hidden=\"true\"></i></span>\n <h2 class=\"about-section__title\">{{ 'User.Profile.About.Portfolio' | transloco }}</h2>\n @if (isEdit) {\n <button type=\"button\" class=\"about-section__edit\" (click)=\"onOpenSocial()\" [attr.aria-label]=\"'User.Profile.About.EditPortfolio' | transloco\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n </button>\n }\n </header>\n @if (noUserLinks) {\n <div class=\"about-social\">\n @for (link of objectKeys(userLinks); track link) {\n @if (userLinks[link]) {\n <a class=\"about-social__link\" target=\"_blank\" rel=\"noopener noreferrer\" [href]=\"userLinks[link]\" [attr.aria-label]=\"link\">\n <img src=\"assets/img/icons/social/{{ link }}.svg\" width=\"32\" height=\"32\" [alt]=\"link\" />\n </a>\n }\n }\n </div>\n } @else {\n <p class=\"about-empty\">{{ 'User.Profile.About.NoPortfolio' | transloco }}</p>\n }\n @if (user && isEdit) {\n <pw-edit-social-links [userId]=\"user.id\" [links]=\"userLinks\" (saveEvent)=\"onSaveUserLinks()\"></pw-edit-social-links>\n }\n </section>\n\n @if (loading) {\n <div class=\"w-100 text-center p-3\"><p-progress-spinner strokeWidth=\"2\"></p-progress-spinner></div>\n }\n</div>\n","import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core';\n\nimport { ProfileService } from '@posiwise/common-services';\nimport { User } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\n@Component({\n selector: 'pw-portfolios',\n templateUrl: './user-portfolios.component.html',\n styleUrls: ['./user-portfolios.component.scss'],\n\n standalone: false\n})\nexport class PortfoliosComponent implements OnInit {\n @Input() user: User;\n @Input() isEdit = false;\n\n projectPictures = [];\n\n selectedPicURL: string;\n\n isLoaded = false;\n\n constructor(\n private readonly service: ProfileService,\n private readonly modalService: NgbModal,\n private readonly cdr: ChangeDetectorRef\n ) {}\n\n ngOnInit() {\n this.getProjectPictures();\n }\n\n private getProjectPictures() {\n this.service.getProjectPictures(this.user.slug).subscribe(response => {\n if (response.length > 0) {\n this.projectPictures = response.flatMap(x => x.project_pictures);\n }\n this.isLoaded = true;\n this.cdr.markForCheck();\n });\n }\n\n deletePicture(id) {\n HelperService.raiseDeletePopup().then(resp => {\n if (resp.value) {\n this.service.deletePicture(id).subscribe(_ => {\n this.getProjectPictures();\n this.cdr.markForCheck();\n });\n }\n });\n }\n\n trackByImage(_index: number, item: { id: number }) {\n return item.id;\n }\n\n showFullImage(picture, content, evt) {\n if ($(evt.target).attr('id') !== 'delete-icon') {\n this.selectedPicURL = picture.picture.url;\n this.modalService.open(content, {\n centered: true,\n size: 'lg',\n windowClass: 'img-popup'\n });\n }\n }\n}\n","<div class=\"row\">\n <div class=\"col-sm-12 mt-2\">\n <h2>User's Portfolio</h2>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (projectPictures.length === 0 && isLoaded) {\n <pw-no-data [withImage]=\"true\" message=\"No portfolio listed yet - please consider adding some.\"\n ></pw-no-data>\n }\n <div class=\"card-body\">\n @if (projectPictures.length) {\n <div class=\"card-block\"\n >\n <div class=\"grid-hover\">\n <div class=\"row\">\n @for (picture of projectPictures; track trackByImage($index, picture)) {\n <div class=\"col-md-4 col-12 mb-2\"\n >\n <figure class=\"effect-marley\"\n (keydown.enter)=\"showFullImage(picture, content, $event)\"\n (click)=\"showFullImage(picture, content, $event)\">\n <img [src]=\"picture.picture.url\"\n alt=\"project pic\" />\n <figcaption>\n <h2>\n <span class=\"portfolio-header-text\">{{ picture.project_title }}</span>\n </h2>\n @if (isEdit) {\n <i\n class=\"fal fa-2x fa-times white\"\n id=\"delete-icon\"\n (click)=\"deletePicture(picture.id)\"\n (keydown.enter)=\"deletePicture(picture.id)\"\n aria-hidden=\"true\"\n ></i>\n }\n <p class=\"thumb-description\">\n {{ picture?.project_description }}\n </p>\n </figcaption>\n </figure>\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n</div>\n<ng-template #content\n let-modal>\n <div class=\"modal-img-popup\">\n <img alt=\"Selected Url\"\n [src]=\"selectedPicURL\"\n class=\"img-fluid\" />\n <button type=\"button\"\n class=\"close close-img\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss('Cross click')\">\n <span class=\"btn\">&times;</span>\n </button>\n </div>\n</ng-template>\n","import { ChangeDetectorRef, Component, Injector, Input, OnInit, ViewChild } from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { ProfileService } from '@posiwise/common-services';\nimport { Project, User } from '@posiwise/common-utilities';\nimport { ConfirmDialogService } from '@posiwise/shared-components';\n\nimport { EditPortfoliosComponent } from '../edit-portfolios/edit-portfolios.component';\nimport { EditProjectModalComponent } from '../edit-project-modal/edit-project-modal.component';\nimport { EditRecommendationModalComponent } from '../edit-recommendation-modal/edit-recommendation-modal.component';\nimport { EditSkillsModalComponent } from '../edit-skills-modal/edit-skills-modal.component';\n\n@Component({\n selector: 'pw-user-projects',\n templateUrl: './user-projects.component.html',\n styleUrls: ['./user-projects.component.scss'],\n\n standalone: false\n})\nexport class UserProjectsComponent extends AppBaseComponent implements OnInit {\n @Input() user: User;\n @Input() isEdit = false;\n @Input() slug: string;\n\n @ViewChild(EditProjectModalComponent, { static: true })\n projectModal: EditProjectModalComponent;\n\n @ViewChild(EditSkillsModalComponent, { static: false })\n skillModal: EditSkillsModalComponent;\n\n @ViewChild(EditRecommendationModalComponent, { static: true })\n recommendationModal: EditRecommendationModalComponent;\n\n @ViewChild(EditPortfoliosComponent, { static: false })\n portfolios: EditPortfoliosComponent;\n\n projects: Project[] = [];\n\n submitted: boolean;\n\n isLoaded = false;\n\n constructor(\n private readonly service: ProfileService,\n injector: Injector,\n private readonly cdr: ChangeDetectorRef,\n private readonly confirmDialog: ConfirmDialogService\n ) {\n super(injector);\n }\n\n ngOnInit() {\n this.getProjects();\n }\n\n onEditProject(item) {\n this.projectModal.onOpen(item);\n }\n\n editRecommendation(item) {\n this.recommendationModal.onOpen(item);\n }\n\n openSkills(project) {\n this.skillModal.slug = project.slug;\n this.skillModal.open();\n }\n\n getProjects() {\n const profileSlug = this.user?.slug || this.slug;\n this.service.getProjects(profileSlug).subscribe(response => {\n this.projects = response.projects;\n this.isLoaded = true;\n this.cdr.markForCheck();\n });\n }\n\n onSkillsSave() {\n this.getProjects();\n }\n\n onSaveProject(_event) {\n this.getProjects();\n }\n\n openPortfolios(id: number) {\n this.portfolios.openModal(id);\n this.portfolios.getProjectPictures();\n }\n\n onDeleteProject(project) {\n this.confirmDialog\n .open({\n title: 'Delete',\n text: `Are you sure you want to delete ${project.title}?`,\n destructive: true\n })\n .then(ok => {\n if (!ok) {\n return;\n }\n this.service.deleteProject(project.id).subscribe(() => {\n this.projects = this.projects.filter((x: Project) => x.id !== project.id);\n this.cdr.markForCheck();\n });\n });\n }\n\n trackByProject(_index: number, item: Project) {\n return item.id;\n }\n\n deletePicture(project) {\n this.service.deletePicture(project.project_pictures[0].id).subscribe(_ => {\n this.getProjects();\n this.cdr.markForCheck();\n });\n }\n}\n","<div class=\"row\">\n <div class=\"col-sm-12 mt-2\">\n <h2>User's Projects</h2>\n @if (isEdit) {\n <div class=\"row\"\n >\n <div class=\"col-12\">\n <div class=\"content-header\">\n <button class=\"btn btn-primary float-end\"\n (click)=\"onEditProject(null)\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> {{'Create Project' | transloco}}\n </button>\n </div>\n </div>\n </div>\n }\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (projects?.length) {\n <div id=\"timeline\"\n class=\"timeline-center timeline-wrapper\"\n >\n <ul class=\"timeline\">\n <li class=\"timeline-line\"></li>\n </ul>\n <ul class=\"timeline\">\n <li class=\"timeline-line\"></li>\n @for (\n project of projects; track trackByProject(i,\n project); let i = $index; let odd = $odd; let even = $even) {\n <li class=\"timeline-item\"\n [ngClass]=\"{ 'mt-5': odd }\"\n >\n <div class=\"timeline-badge\">\n <span class=\"bg-red bg-lighten-1\"\n data-bs-toggle=\"tooltip\"\n data-placement=\"right\"\n title=\"Portfolio project work\">\n <span class=\"timeline-year\"> {{ project.start_year }} </span>\n </span>\n </div>\n <div class=\"timeline-card card pb-0\">\n <div class=\"card-header\">\n <h4 class=\"mb-0 card-title\">\n <a>{{ project.title }}</a>\n </h4>\n <div class=\"card-subtitle text-muted mt-0\">\n <span class=\"font-small-3\">\n {{ project.start_year }} - {{ project.end_year }}</span>\n </div>\n </div>\n <div class=\"card-body project-card\">\n @if (project.project_pictures?.length) {\n <i\n class=\"fal fa-times\"\n (click)=\"deletePicture(project)\"\n (keydown.enter)=\"deletePicture(project)\"\n aria-hidden=\"true\"\n ></i>\n <img class=\"img-fluid project-picture\"\n [src]=\"project.project_pictures[0].picture.url\"\n alt=\"Project Cover\" />\n }\n <div class=\"card-body\">\n <div class=\"\">\n <p class=\"card-text\">{{ project.description }}</p>\n <div class=\"list-inline mb-1\">\n <!-- Skills -->\n @if (project.tags?.length) {\n <div>\n <div class=\"my-2\">\n <i class=\"fa fa-user-tag\" aria-hidden=\"true\"></i>\n Skills\n </div>\n @for (tag of project.tags; track tag) {\n <span class=\"badge bg-success me-2\">{{\n tag.name\n }}</span>\n }\n </div>\n }\n @if (project.project_recommendations?.length) {\n <div class=\"mt-2\"\n >\n <div class=\"my-2\">\n <i\n class=\"fa fa-clipboard-check me-2\"\n aria-hidden=\"true\"\n ></i>\n Recommendations\n </div>\n @for (\n recommendation of project.project_recommendations\n ; track\n recommendation) {\n <section class=\"mb-2\"\n >\n <div class=\"me-2\">\n Client: {{ recommendation?.client_name }}\n </div>\n <div class=\"me-2\">\n Message: {{ recommendation?.description }}\n </div>\n <div class=\"row recommendation\">\n <div class=\"col-4\">\n <span>Communication</span>\n <p-rating [(ngModel)]=\"\n recommendation.communication\n \"\n [cancel]=\"false\"\n [readonly]=\"true\">\n </p-rating>\n </div>\n <div class=\"col-4\">\n <span>Quality</span>\n <p-rating [(ngModel)]=\"recommendation.quality\"\n [cancel]=\"false\"\n [readonly]=\"true\">\n </p-rating>\n </div>\n <div class=\"col-4\">\n <span>Time</span>\n <p-rating [(ngModel)]=\"recommendation.time\"\n [cancel]=\"false\"\n [readonly]=\"true\">\n </p-rating>\n </div>\n </div>\n </section>\n }\n </div>\n }\n @if (isEdit) {\n <div class=\"text-end mt-3 d-flex justify-content-end project-actions\"\n >\n <!-- Project Edit -->\n <span class=\"btn btn-link pb-0 actions\"\n (keydown.enter)=\"onEditProject(project)\"\n (click)=\"onEditProject(project)\">\n Edit\n </span>\n <button class=\"btn btn-link pb-0 actions\"\n (click)=\"openSkills(project)\">\n Skills\n </button>\n <pw-edit-skills-modal [userId]=\"user?.id\"\n entityEntity=\"Project\"\n entityType=\"skills\"\n (saveEvent)=\"onSkillsSave()\"\n [slug]=\"project?.slug\">\n </pw-edit-skills-modal>\n <!-- Portfolios -->\n <button class=\"btn btn-link pb-0 actions\"\n (click)=\"openPortfolios(project.id)\">\n Photos\n </button>\n <pw-edit-portfolios [slug]=\"user?.slug\"\n [id]=\"project.id\"\n (successEvent)=\"getProjects()\">\n </pw-edit-portfolios>\n <span class=\"btn btn-link pb-0 delete-project actions\"\n (keydown.enter)=\"onDeleteProject(project)\"\n (click)=\"onDeleteProject(project)\">\n Delete\n </span>\n </div>\n }\n <!-- Recommendation -->\n @if (!isEdit) {\n <span class=\"pe-1 mt-3\"\n (click)=\"editRecommendation(project)\"\n (keydown.enter)=\"editRecommendation(project)\"\n >\n <a class=\"primary\"><span class=\"fa fa-commenting-o\"></span> Endorse\n </a></span>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n </li>\n }\n </ul>\n </div>\n }\n @if (projects?.length === 0 && isLoaded) {\n<pw-no-data [withImage]=\"true\" [message]=\"\n isEdit\n ? ('User.Profile.Projects.NoProjects' | transloco)\n : ('User.Profile.Projects.NoUserProjects' | transloco)\n \"\n >\n </pw-no-data>\n }\n </div>\n</div>\n<pw-edit-project-modal (saveEvent)=\"onSaveProject($event)\"></pw-edit-project-modal>\n<pw-edit-recommendation-modal [user]=\"user\"></pw-edit-recommendation-modal>\n","import { ChangeDetectorRef, Component, Injector, OnDestroy, OnInit } from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { ProfileService } from '@posiwise/common-services';\nimport { ScriptLoaderService } from '@posiwise/common-services';\nimport { User } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\n\nimport { StatusCodes } from 'http-status-codes';\nimport { MenuItem } from 'primeng/api';\nimport { forkJoin } from 'rxjs';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { UserProfile, UserRelationship } from '../shared/interface/user-module.interface';\n\n@Component({\n selector: 'pw-user-profile-page',\n templateUrl: './user-profile-page.component.html',\n styleUrls: ['./user-profile-page.component.scss'],\n\n standalone: false\n})\nexport class UserProfilePageComponent extends AppBaseComponent implements OnInit, OnDestroy {\n private loggedInUserDetails: User;\n\n user: User;\n slug: string;\n\n objectKeys = Object.keys;\n\n image = 'assets/img/icons/male.png';\n\n isFollowing: boolean;\n\n isLoaded = false;\n\n userProfile: UserProfile;\n\n items: MenuItem[];\n activeItem: MenuItem;\n /** Current tab value for p-tabs */\n activeTabValue: string;\n\n onTabChange(value: string) {\n const item = this.items.find(i => i.id === value);\n if (item) {\n this.activeItem = item;\n }\n }\n\n constructor(\n injector: Injector,\n private readonly profileService: ProfileService,\n private readonly modalService: NgbModal,\n private readonly scriptLoader: ScriptLoaderService,\n private readonly cdr: ChangeDetectorRef\n ) {\n super(injector);\n this.route.params.subscribe(data => {\n this.slug = data['user-slug'];\n this.cdr.markForCheck();\n });\n\n this.items = [\n { id: 'about', label: 'About', icon: 'fa fa-fw fa-user' },\n {\n id: 'projects',\n label: 'Projects',\n icon: 'fa fa-fw fa-briefcase',\n state: {\n permission: this.permissionService.evaluatePermissions('Pages.Product.CRM')\n }\n },\n {\n id: 'portfolio',\n label: 'Portfolio',\n icon: 'fa fa-fw fa-image',\n state: {\n permission: this.permissionService.evaluatePermissions('Pages.Product.CRM')\n }\n }\n ];\n [this.activeItem] = this.items;\n this.activeTabValue = this.activeItem?.id as string;\n }\n\n get allowEdit() {\n return (\n this.loggedInUserDetails?.slug === this.slug || this.permissionService.isSuperAdmin()\n );\n }\n\n ngOnInit() {\n this.getUserBySlug();\n // Horizontal Timeline js for user timeline\n this.waitForJQuery(() => {\n this.scriptLoader.loadScriptOnce('head', '/assets/js/vertical-timeline.js');\n });\n }\n\n handleImageError(event: Event, fallbackPath): void {\n HelperService.handleImageFallbackPath(event, fallbackPath);\n }\n\n private dataURLtoBlob(dataUrl: string) {\n const arr = dataUrl?.split(',');\n // eslint-disable-next-line @typescript-eslint/prefer-regexp-exec\n const mime = /^[A-Z]*[a-z]*:(.*?);[A-Z]*/.exec(arr[0])?.[1];\n const bStr = atob(arr[1]);\n let n = bStr.length;\n const u8arr = new Uint8Array(n);\n // eslint-disable-next-line no-plusplus\n while (n--) {\n u8arr[n] = bStr.charCodeAt(n);\n }\n\n return new Blob([u8arr], { type: mime });\n }\n\n openModal(content) {\n if (this.allowEdit) {\n this.modalService.open(content, { centered: true, windowClass: 'modal-holder' });\n }\n }\n\n onImageSelection(event) {\n const blob = this.dataURLtoBlob(event);\n const filename = `${`${this.slug.toLocaleLowerCase()}_${Date.parse(\n new Date().toString()\n )}`}.png`;\n const file: File = new File([blob], filename);\n this.userService.addAvatar(file).subscribe(res => {\n this.modalService.dismissAll();\n this.image = res?.user_avatar[2]?.url;\n this.cdr.markForCheck();\n });\n }\n\n getUserBySlug() {\n forkJoin({\n user: this.profileService.getUserObject('user', this.slug),\n user_profile: this.profileService.getUserObject('user_profile', this.slug),\n avatar: this.profileService.getUserObject('avatar', this.slug)\n }).subscribe({\n next: response => {\n this.user = response.user;\n this.userProfile = response.user_profile;\n if (response.avatar && response.avatar.length > 0) {\n this.image = response?.avatar[2]?.url;\n }\n this.getCurrentUserDetails();\n this.isLoaded = true;\n this.cdr.markForCheck();\n },\n error: error => {\n if (error.status === StatusCodes.NOT_FOUND) {\n this.router.navigate(['NotFound']);\n }\n this.cdr.markForCheck();\n }\n });\n }\n\n onClose() {\n this.modalService.dismissAll();\n }\n\n private getCurrentUserDetails() {\n this.userStore().subscribe((currentUser: User) => {\n if (currentUser) {\n this.loggedInUserDetails = currentUser;\n\n this.userService\n .getCurrentUserObject('user_relationships')\n .subscribe((response: UserRelationship[]) => {\n this.isFollowing =\n response.length > 0\n ? response.some(\n x =>\n x.followed_id === this.user.id &&\n currentUser.id === x.follower_id\n )\n : false;\n this.cdr.markForCheck();\n });\n }\n this.cdr.markForCheck();\n });\n }\n\n sendMessageSlug() {\n this.router.navigate(['/message'], { fragment: this.slug });\n }\n\n followUser() {\n this.userService.followUser(this.user.id).subscribe(response => {\n const name = this.user.first_name || this.user.slug;\n if (response.id) {\n this.isFollowing = true;\n this.toast.success(`You're now following ${name}`);\n } else {\n this.isFollowing = false;\n this.toast.success(`You've unfollowed ${name}`);\n }\n this.cdr.markForCheck();\n });\n }\n\n private waitForJQuery(callback: () => void): void {\n let attempts = 0;\n const maxAttempts = 100; // 10 seconds max wait time\n\n const checkJQuery = () => {\n if (window['jQuery']) {\n callback();\n } else if (attempts < maxAttempts) {\n attempts++;\n setTimeout(checkJQuery, 100);\n } else {\n // Load jQuery since it's needed\n this.loadJQueryForUserProfile(callback);\n }\n };\n checkJQuery();\n }\n\n private loadJQueryForUserProfile(callback: () => void): void {\n const jquerySrc = 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js';\n const script = document.createElement('script');\n script.src = jquerySrc;\n script.crossOrigin = 'anonymous';\n script.async = false;\n script.onload = () => {\n callback();\n };\n script.onerror = () => {\n console.error('Failed to load jQuery for user profile');\n // Try fallback\n const fallbackScript = document.createElement('script');\n fallbackScript.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js';\n fallbackScript.crossOrigin = 'anonymous';\n fallbackScript.async = false;\n fallbackScript.onload = () => {\n callback();\n };\n fallbackScript.onerror = () => {\n console.error('All jQuery CDNs failed for user profile');\n };\n document.head.appendChild(fallbackScript);\n };\n document.head.appendChild(script);\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n }\n}\n","<!-- User Profile Starts -->\n<!-- Basic User Details Starts -->\n@if (user) {\n <section id=\"user-profile\"\n >\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"dashboard\">\n <div class=\"media row py-3 align-items-center\">\n <div class=\"col-3 col-sm-2\">\n <div class=\"align-self-center halfway-fab text-center\">\n <!-- User Avatar -->\n <a class=\"profile-image\">\n <img [src]=\"image\"\n width=\"100\"\n height=\"100\"\n class=\"rounded-circle img-border width-100\"\n alt=\"User Male\"\n (error)=\"handleImageError($event, 'assets/img/icons/male.png')\"\n (keydown.enter)=\"openModal(content)\"\n (click)=\"openModal(content)\" />\n @if (allowEdit) {\n <div class=\"overlay\"\n (keydown.enter)=\"openModal(content)\"\n (click)=\"openModal(content)\"\n >\n <div class=\"overlay-text\">\n <!-- Change Profile Pic -->\n <a aria-label=\"Navigate to Target\">\n {{ 'User.Profile.Change' | transloco }}\n </a>\n </div>\n </div>\n }\n </a>\n </div>\n </div>\n <div class=\"col-9 col-sm-5\">\n <div class=\"align-self-start halfway-fab ps-3 pt-2\">\n <div>\n @if (user?.last_name) {\n <strong class=\"font-medium-2 text-uppercase\"\n >\n {{\n user?.first_name\n ? user?.first_name + ' ' + user?.last_name\n : 'Update Profile'\n }}\n </strong>\n }\n @if (!user?.last_name) {\n <strong class=\"font-medium-2 text-uppercase\"\n >\n {{ user?.first_name ? user?.first_name : 'Update Profile' }}\n </strong>\n }\n <p class=\"font-small-4\">{{ userProfile?.headline }}</p>\n </div>\n </div>\n </div>\n <div class=\"col-12 col-sm-5\">\n @if (!allowEdit) {\n <div class=\"profile-cover-buttons\"\n >\n <div class=\"d-flex halfway-fab align-self-end\">\n <div class=\"text-end d-none d-sm-none d-md-none d-lg-block\">\n <button type=\"button\"\n (click)=\"followUser()\"\n class=\"btn btn-outline-primary btn-raised me-2\">\n <i class=\"fa fa-plus\" aria-hidden=\"true\"></i>\n {{ isFollowing ? 'Following' : 'Follow' }}\n </button>\n <button type=\"button\"\n class=\"btn btn-primary btn-raised me-3\"\n (click)=\"sendMessageSlug()\">\n <i class=\"fa fa-mail-bulk\" aria-hidden=\"true\"></i> Message\n </button>\n </div>\n <div class=\"text-end d-block d-sm-block d-md-block d-lg-none\">\n <button type=\"button\"\n class=\"btn btn-primary btn-raised me-2\">\n <i class=\"fa fa-plus\" aria-hidden=\"true\"></i>\n </button>\n <button type=\"button\"\n class=\"btn btn-primary btn-raised me-3\">\n <i class=\"fa fa-mail-bulk\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n </section>\n}\n<!-- Basic User Details Ends -->\n<section>\n <div class=\"container-fluid pw-tab overflow-hidden\">\n <p-tabs [value]=\"activeTabValue\" (valueChange)=\"onTabChange($event)\">\n <p-tablist>\n @for (item of items; track item) {\n <p-tab [value]=\"item.id\">\n @if (item.icon) {\n <i [class]=\"item.icon\" aria-hidden=\"true\"></i>\n }\n <span>{{ item.label }}</span>\n </p-tab>\n }\n </p-tablist>\n </p-tabs>\n <div class=\"dashboard\">\n <div class=\"dashboard-body\">\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (user && activeItem.id === 'about') {\n <pw-user-about [user]=\"user\"\n [isEdit]=\"allowEdit\"\n (saveEvent)=\"getUserBySlug()\">\n </pw-user-about>\n }\n @if (activeItem.id === 'projects') {\n <pw-user-projects [user]=\"user\"\n [slug]=\"slug\"\n [isEdit]=\"allowEdit\"></pw-user-projects>\n }\n @if (activeItem.id === 'portfolio') {\n <pw-portfolios [user]=\"user\"\n [isEdit]=\"allowEdit\"></pw-portfolios>\n }\n </div>\n </div>\n </div>\n</section>\n<ng-template #content\n let-modal>\n <div class=\"card m-0\">\n <div class=\"card-content\">\n <div class=\"card-title\">\n <h3 class=\"modal-title\">{{ 'User.Profile.ProfilePicture' | transloco }}</h3>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"card-header\">\n <small> {{ 'User.Profile.PictureMessage' | transloco }}</small>\n <pw-image-cropper #profile\n aspectRatio=\"auto\"\n [userAvatar]=\"image\"\n (imageSelectionEvent)=\"onImageSelection($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n </div>\n </div>\n</ng-template>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { RouterModule } from '@angular/router';\nimport { NgxGpAutocompleteModule } from '@angular-magic/ngx-gp-autocomplete';\n\nimport { AppConfigService } from '@posiwise/app-config-service';\nimport { AppLoaderModule } from '@posiwise/app-loader';\nimport { CoreTranslocoModule } from '@posiwise/core-transloco';\nimport { DirectivesModule } from '@posiwise/directives';\nimport { PipesModule } from '@posiwise/pipes';\nimport { SharedComponentsModule } from '@posiwise/shared-components';\n\nimport { NgxCaptchaModule } from 'ngx-captcha';\nimport { UiSwitchModule } from 'ngx-ui-switch';\nimport { AccordionModule } from 'primeng/accordion';\nimport { DatePickerModule } from 'primeng/datepicker';\nimport { FileUploadModule } from 'primeng/fileupload';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { MultiSelectModule } from 'primeng/multiselect';\nimport { ProgressSpinnerModule } from 'primeng/progressspinner';\nimport { RatingModule } from 'primeng/rating';\nimport { SelectModule } from 'primeng/select';\nimport { SelectButtonModule } from 'primeng/selectbutton';\nimport { TooltipModule } from 'primeng/tooltip';\n\nimport { Loader } from '@googlemaps/js-api-loader';\nimport { NgbDatepickerModule, NgbModalModule } from '@ng-bootstrap/ng-bootstrap';\n\nimport { AccountComponent } from './account/account.component';\nimport { AccountDetailsComponent } from './account/account-details/account-details.component';\nimport { AddSubscriptionComponent } from './account/subscriptions/add-subscription/add-subscription.component';\nimport { SavedCardDetailsComponent } from './account/subscriptions/saved-card-details/saved-card-details.component';\nimport { ClearMaskedOnFocusDirective } from './account/subscriptions/subscription-credential/clear-masked-on-focus.directive';\nimport {\n CredentialAvatarHuePipe,\n HumanizeCredentialNamePipe,\n SubscriptionNameByIdPipe\n} from './account/subscriptions/subscription-credential/humanize-credential-name.pipe';\nimport { SubscriptionCredentialComponent } from './account/subscriptions/subscription-credential/subscription-credential.component';\nimport { SecondaryPaymentMethodComponent } from './account/subscriptions/update-payment-details/secondary-payment-method.component';\nimport { UpdatePaymentDetailsComponent } from './account/subscriptions/update-payment-details/update-payment-details.component';\nimport { UpgradeSubscriptionComponent } from './account/subscriptions/upgrade-subscription/upgrade-subscription.component';\nimport { UserSubscriptionDetailsComponent } from './account/subscriptions/user-subscription-details/user-subscription-details.component';\nimport { UserSubscriptionListComponent } from './account/subscriptions/user-subscriptions-list/user-subscriptions-list.component';\nimport { UserInvoiceComponent } from './account/user-invoice/user-invoice.component';\nimport { CommunicationTabComponent } from './settings-tabs/communication-tab/communication-tab.component';\nimport { OthersTabComponent } from './settings-tabs/others-tab/others-tab.component';\nimport { SecurityTabComponent } from './settings-tabs/security-tab/security-tab.component';\nimport { SettingsComponent } from './settings-tabs/settings-tabs.component';\nimport { SupportComponent } from './support/support.component';\nimport { SupportDetailsComponent } from './support/support-details/support-details.component';\nimport { EditPortfoliosComponent } from './user-profile/edit-portfolios/edit-portfolios.component';\nimport { EditProjectModalComponent } from './user-profile/edit-project-modal/edit-project-modal.component';\nimport { EditQualificationsModalComponent } from './user-profile/edit-qualifications-modal/edit-qualifications-modal.component';\nimport { EditRecommendationModalComponent } from './user-profile/edit-recommendation-modal/edit-recommendation-modal.component';\nimport { EditSkillsModalComponent } from './user-profile/edit-skills-modal/edit-skills-modal.component';\nimport { EditSocialLinksComponent } from './user-profile/edit-social-links/edit-social-links.component';\nimport { EditUserProfileModalComponent } from './user-profile/edit-user-profile-modal/edit-user-profile-modal.component';\nimport { UserAboutComponent } from './user-profile/user-about/user-about.component';\nimport { PortfoliosComponent } from './user-profile/user-portfolios/user-portfolios.component';\nimport { UserProfilePageComponent } from './user-profile/user-profile-page.component';\nimport { UserProjectsComponent } from './user-profile/user-projects/user-projects.component';\n\nconst primeNgModules = [\n DatePickerModule,\n MultiSelectModule,\n ProgressSpinnerModule,\n AccordionModule,\n FileUploadModule,\n SelectModule,\n RatingModule,\n SelectButtonModule,\n TooltipModule\n];\n\nconst ngbModule = [NgbModalModule, NgbDatepickerModule];\n\n@NgModule({\n declarations: [\n AccountComponent,\n AccountDetailsComponent,\n AddSubscriptionComponent,\n SavedCardDetailsComponent,\n SubscriptionCredentialComponent,\n HumanizeCredentialNamePipe,\n CredentialAvatarHuePipe,\n SubscriptionNameByIdPipe,\n ClearMaskedOnFocusDirective,\n UpdatePaymentDetailsComponent,\n SecondaryPaymentMethodComponent,\n UpgradeSubscriptionComponent,\n UserSubscriptionDetailsComponent,\n UserSubscriptionListComponent,\n UserInvoiceComponent,\n CommunicationTabComponent,\n OthersTabComponent,\n SecurityTabComponent,\n SettingsComponent,\n SupportComponent,\n EditPortfoliosComponent,\n EditProjectModalComponent,\n EditQualificationsModalComponent,\n EditRecommendationModalComponent,\n EditSkillsModalComponent,\n EditSocialLinksComponent,\n EditUserProfileModalComponent,\n UserAboutComponent,\n PortfoliosComponent,\n UserProfilePageComponent,\n UserProjectsComponent,\n SupportDetailsComponent\n ],\n imports: [\n InputTextModule,\n AppLoaderModule,\n DirectivesModule,\n CommonModule,\n RouterModule,\n ReactiveFormsModule,\n CoreTranslocoModule,\n NgxGpAutocompleteModule,\n SharedComponentsModule,\n PipesModule,\n UiSwitchModule,\n NgxCaptchaModule,\n FormsModule,\n ...primeNgModules,\n ...ngbModule\n ],\n exports: [\n AccountComponent,\n AccountDetailsComponent,\n AddSubscriptionComponent,\n SavedCardDetailsComponent,\n SubscriptionCredentialComponent,\n HumanizeCredentialNamePipe,\n CredentialAvatarHuePipe,\n SubscriptionNameByIdPipe,\n ClearMaskedOnFocusDirective,\n UpdatePaymentDetailsComponent,\n UpgradeSubscriptionComponent,\n UserSubscriptionDetailsComponent,\n UserSubscriptionListComponent,\n UserInvoiceComponent,\n CommunicationTabComponent,\n OthersTabComponent,\n SecurityTabComponent,\n SettingsComponent,\n SupportComponent,\n EditPortfoliosComponent,\n EditProjectModalComponent,\n EditQualificationsModalComponent,\n EditRecommendationModalComponent,\n EditSkillsModalComponent,\n EditSocialLinksComponent,\n EditUserProfileModalComponent,\n UserAboutComponent,\n PortfoliosComponent,\n UserProfilePageComponent,\n UserProjectsComponent,\n SupportDetailsComponent\n ],\n providers: [\n {\n provide: Loader,\n useFactory: (appConfigService: AppConfigService) => {\n return new Loader({\n apiKey: appConfigService.getGoogleApiKey(),\n libraries: ['places']\n });\n },\n deps: [AppConfigService]\n }\n ]\n})\nexport class UserModuleModule {}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,IAAa,mBAAb,MAAa,iBAAgB;CASzB,YAA6B,QAAc;EAAd,KAAA,SAAA;EACzB,KAAK,QAAQ;GACT;IACI,IAAI;IACJ,OAAO;IACP,MAAM;IACN,YAAY,CAAC,kBAAkB;GAClC;GACD;IACI,IAAI;IACJ,OAAO;IACP,MAAM;IACN,YAAY,CAAC,wBAAwB;GACxC;GACD;IACI,IAAI;IACJ,OAAO;IACP,MAAM;IACN,YAAY,CAAC,kBAAkB;GAClC;EACJ;EACD,KAAK,aACD,KAAK,MACD,KAAK,MAAM,WACP,WAAU,OAAO,WAAW,OAAO,KAAK,OAAO,IAAI,MAAM,GAAG,CAAC,CAAC,EAAE;CAGhF;CAEA,eAAY;EACR,KAAK,aAAa,KAAK,KAAK;CAChC;CAxCS;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAgB,MAAA,CAAA,EAAA,OAAAA,KAAA,OAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAhB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAgB,cAAA;GAAA,UAAA;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A;GAAA,MAAA;GAAgB,WAbd,CACP;IACI,SAAS;IACT,aAAa,qBAAsC;KAC/C,OAAO,IAAI,OAAO;MACd,QAAQ,iBAAiB,gBAAe;MACxC,WAAW,CAAC,QAAQ;KACvB,CAAA;IACL;IACA,MAAM,CAAC,gBAAgB;GAC1B,CACJ;GAAA,SAAA;IA5DG;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACG;IACA;GAAS;EAAA,CAAA;CAAA;;AAgDP,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAgB,YAAA,CAAA;EAlG5B,MAAA;EAAS,MAAA,CAAA;GACN,cAAc;IACV;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACH;GACD,SAAS;IACL;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,GAAG;IACH,GAAG;GACN;GACD,SAAS;IACL;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACH;GACD,WAAW,CACP;IACI,SAAS;IACT,aAAa,qBAAsC;KAC/C,OAAO,IAAI,OAAO;MACd,QAAQ,iBAAiB,gBAAe;MACxC,WAAW,CAAC,QAAQ;KACvB,CAAA;IACL;IACA,MAAM,CAAC,gBAAgB;GAC1B,CACJ;EACJ,CAAA"}