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,aAAc,IAAMC,+BAA6BC,KAAKC,GAAKA,EAAEC,YAC7DjB,YAAa,CAACY,IAAgBb,OAUhC,MAAOmB,EAAoB3H,kDAApB2H,EAAoB,sCAApBA,IAAoB3H,wCAHrB4H,cAAsBd,IACtBc,wBCXN,MAAOC,EAAa7H,kDAAb6H,EAAa,sCAAbA,IAAa7H,yCAFb,CAAC8H,MAASC,SATXC,KAAcC,KAAcN","names":["i0","AccountPageComponent","constructor","apiService","loaderService","dialogsService","toastMessagesService","userService","this","FormGroup","firstName","FormControl","Validators","lastName","email","EPlanType","environment","ngOnInit","user","User","auth","fullName","splitFullName","split","length","onToggleEditing","location","href","onToggleIsDeleting","isDeleting","onDeleteProfile","dialog","open","OkCancelDialogComponent","title","message","okText","cancelText","okButtonType","afterClosed","subscribe","closeEvent","status","EDialogCloseEventStatus","users","delete","show","type","EToastMessageType","logout","static","core","selectors","ctx","UserKeysComponent","apiKey","value","disabled","roboRxnApiKey","nonNullable","getById","id","pipe","finalize","hide","response","content","form","patchValue","onCopyApiKey","copyToClipboard","_this","onGenerateKey","generateKey","x","metadata","uiMessages","errors","payload","onRemoveKey","removeKey","onSaveRoboRxnApiKey","get","patchUserRxnKey","onResetRoboRxnApiKey","patch","body","isBodyRaw","setValue","AccountContainerComponent","appSessionService","isAccountArea","ngOnDestroy","UserSubscriptionComponent","router","datePipe","socketNotificationService","authService","ESubscriptionStatus","fetchSubscription","subscriptions","currentSubscription","map","data","tap","subscription","isPlanDisabled","subscriptionInProgress","plan","Plan","name","levels","subscribeToNotifications","onChangePlan","navigate","onDeleteSubscription","transform","endTermDate","useConfirmDropdown","confirmDropdownLabel","confirmDropdownOptions","filter","switchMap","deleteCurrentSubscription","notifications$","notification","ESocketNotificationSubTopic","includes","subTopic","take","BillingDetailsComponent","fetchBillingOverview","billings","overview","billingOverview","billingInformation","UserBillingInformation","userBillingInformation","paymentMethod","onEditBillingInformation","BillingInformationDialogComponent","request","method","post","onEditPaymentMethods","plans","PaymentMethodDialogComponent","subscriptionCost","SubscriptionCost","price","tax","total","currencyCode","isWalletManagementSession","TeamGuard","canActivate","next","state","isTeamOwner","factory","routes","path","redirectTo","pathMatch","component","accountArea","children","EcommerceGuard","loadChildren","__webpack_require__","then","m","TeamModule","AccountRoutingModule","RouterModule","AccountModule","DatePipe","imports","CommonModule","SharedModule"],"sourceRoot":"webpack:///","sources":["./src/app/modules/account/account-page/account-page.component.html","./src/app/modules/account/account-page/account-page.component.ts","./src/app/modules/account/user-keys/user-keys.component.html","./src/app/modules/account/user-keys/user-keys.component.ts","./src/app/modules/account/account-container/account-container.component.ts","./src/app/modules/account/account-container/account-container.component.html","./src/app/modules/account/user-subscription/user-subscription.component.html","./src/app/modules/account/user-subscription/user-subscription.component.ts","./src/app/modules/account/billing-details/billing-details.component.html","./src/app/modules/account/billing-details/billing-details.component.ts","./src/app/libs/bitforce/guards/team.guard.ts","./src/app/modules/account/account-routing.module.ts","./src/app/modules/account/account.module.ts"],"sourcesContent":["<ibm-mlrp-header [hasSidenav]=\"true\">\n <ibm-user-account-menu></ibm-user-account-menu>\n</ibm-mlrp-header>\n\n<h2 class=\"mb-7\">Account Overview</h2>\n\n<div ibmRow>\n <div ibmCol\n [columnNumbers]=\"{max: 8, xlg: 10, lg: 10, md: 6, sm: 4 }\">\n <ibm-tile>\n <div class=\"bx--tile--toolbar\">\n <button ibmButton=\"ghost\"\n (click)=\"onToggleEditing()\">\n Edit\n <svg icon\n ibmIconEdit\n size=\"16\"\n fill=\"currentColor\"\n class=\"ml-1\"></svg>\n </button>\n </div>\n <div ibmRow\n class=\"mb-5\">\n <div ibmCol>\n <p><strong>Name</strong></p>\n <p class=\"small--sm\">{{user.fullName}}</p>\n </div>\n </div>\n <div ibmRow\n class=\"mb-5\">\n <div ibmCol>\n <p><strong>Email</strong></p>\n <p class=\"small--sm\">{{user.email}}</p>\n </div>\n </div>\n <div ibmRow>\n <div ibmCol>\n <p><strong>Password</strong></p>\n <p class=\"small--sm\">**********</p>\n </div>\n </div>\n </ibm-tile>\n\n <ibm-tile class=\"mt-1\"\n *ngIf=\"environment.ecommerceEnabled && apiService?.auth?.user.canUpgradePlan\">\n <div ibmRow>\n <div ibmCol>\n <p class=\"mb-6\">\n Integrate RXN for Chemistry into your existing workflows. Get API access, no rate limitations,\n and the managed infrastructure required for cutting-edge research applications.\n </p>\n <ibm-upgrade-plan-button></ibm-upgrade-plan-button>\n </div>\n </div>\n </ibm-tile>\n\n <ng-container *ngIf=\"!isDeleting\">\n <p class=\"text-danger cursor-pointer mt-7\"\n (click)=\"onToggleIsDeleting()\">Delete my account</p>\n </ng-container>\n <ng-container *ngIf=\"isDeleting\">\n <h2 class=\"mb-6 mt-7\">\n Delete my account\n </h2>\n <ibm-tile>\n <p>\n If you delete your profile,\n <strong>all your files and data will be lost</strong>\n </p>\n <div class=\"mt-5 d-flex align-items-center flex-wrap\">\n <button ibmButton=\"danger\"\n class=\"btn-delete-profile max-w-100 mr-2 mt-2\"\n (click)=\"onDeleteProfile()\">\n I understand, I want to delete my account\n </button>\n <button ibmButton=\"tertiary\"\n class=\"mt-2\"\n (click)=\"onToggleIsDeleting()\">\n Cancel\n </button>\n </div>\n\n </ibm-tile>\n </ng-container>\n\n <div *ngIf=\"environment.ecommerceEnabled\">\n <ibm-unsubscribe-button class=\"mt-8\"></ibm-unsubscribe-button>\n </div>\n </div>\n</div>","import { Component, OnInit } from '@angular/core';\nimport { EPlanType } from '@app/core/models';\nimport { ApiService, DialogsService, ToastMessagesService, UsersService } from '@app/core/services';\nimport { LoaderService } from '@app/libs/bitforce/components';\nimport { finalize } from 'rxjs/operators';\nimport { User } from '@app/core/models';\nimport { AuthService } from '@app/libs/bitforce/services';\nimport { IDialogCloseEvent } from '@app/core/services/dialog/dialog.interface';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { OkCancelDialogComponent } from '@app/shared/components/ok-cancel-dialog/ok-cancel-dialog.component';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nimport { environment } from '@env/environment';\n\n@Component({\n selector: 'ibm-account-page',\n templateUrl: './account-page.component.html',\n styleUrls: ['./account-page.component.scss'],\n})\nexport class AccountPageComponent implements OnInit {\n form = new FormGroup({\n firstName: new FormControl('', [Validators.required, Validators.minLength(2)]),\n lastName: new FormControl('', [Validators.required, Validators.minLength(2)]),\n email: new FormControl('', [Validators.required, Validators.email]),\n });\n user: User;\n ePlanType = EPlanType;\n isDeleting = false;\n\n environment = environment;\n\n constructor(\n public apiService: ApiService,\n private loaderService: LoaderService,\n private dialogsService: DialogsService,\n private toastMessagesService: ToastMessagesService,\n private userService: UsersService\n ) {}\n\n ngOnInit(): void {\n this.user = new User(this.apiService.auth.user);\n\n if (!this.user.firstName && this.user.fullName) {\n const splitFullName = this.user.fullName.split(' ', 2);\n if (splitFullName.length === 2) {\n this.user.firstName = splitFullName[0];\n this.user.lastName = splitFullName[1];\n }\n }\n }\n\n onToggleEditing() {\n location.href = environment.userProfileUrl;\n }\n\n onToggleIsDeleting() {\n this.isDeleting = !this.isDeleting;\n }\n\n onDeleteProfile() {\n this.dialogsService.dialog\n .open(OkCancelDialogComponent, {\n title: 'Delete user',\n message: 'Are you sure to delete your profile?',\n okText: 'Delete',\n cancelText: 'Cancel',\n okButtonType: 'danger--primary',\n })\n .afterClosed()\n .subscribe((closeEvent: IDialogCloseEvent<void>) => {\n if (closeEvent.status === EDialogCloseEventStatus.OK) {\n this.apiService.users.delete(this.apiService.auth.user).subscribe(\n () => {\n this.toastMessagesService.show({\n title: 'User delete',\n message: 'User has been deleted',\n type: EToastMessageType.SUCCESS,\n });\n this.apiService.auth.logout();\n },\n () => {\n this.toastMessagesService.show({\n title: 'User delete',\n message: 'Error on user delete',\n type: EToastMessageType.ERROR,\n });\n }\n );\n }\n });\n }\n}\n","<ibm-mlrp-header [hasSidenav]=\"true\">\n <ibm-user-account-menu></ibm-user-account-menu>\n</ibm-mlrp-header>\n\n<h2 class=\"mb-7\">My Keys</h2>\n\n<form [formGroup]=\"form\">\n <div ibmRow\n class=\"mb-6\">\n <div ibmCol\n [columnNumbers]=\"{ max: 8, xlg: 10, lg: 12, md: 6, sm: 4 }\">\n <label class=\"bx--label\">Api Key</label>\n <input ibmText\n theme=\"dark\"\n formControlName=\"apiKey\" />\n <button [ibmButton]=\"'primary'\"\n class=\"mt-5 mr-5\"\n (click)=\"onGenerateKey()\">\n Generate\n </button>\n <button [ibmButton]=\"'tertiary'\"\n class=\"mt-5 mr-5\"\n [disabled]=\"!form.get('apiKey').value\"\n (click)=\"onRemoveKey()\">\n Delete\n </button>\n <button [ibmButton]=\"'tertiary'\"\n (click)=\"onCopyApiKey()\"\n [disabled]=\"!form.get('apiKey').value\"\n value=\"Copy\"\n class=\"mt-5 mr-5\">\n Copy\n </button>\n </div>\n </div>\n</form>\n\n<div *ngIf=\"user?.apiKey\">\n <div ibmRow\n class=\"mb-6\">\n <div ibmCol\n [columnNumbers]=\"{ max: 8, xlg: 10, lg: 12, md: 6, sm: 4 }\">\n <ibm-progress-bar label=\"Api Key Usage\"\n *ngIf=\"user?.hasApiKeyCallsLimitation\"\n helperText=\"{{user?.apiKeyCallsCount}}/{{user?.maxFreeApiKeyCalls}}\"\n [max]=\"user?.maxFreeApiKeyCalls\"\n [value]=\"user?.apiKeyCallsCount\">\n </ibm-progress-bar>\n\n <ibm-notification [notificationObj]=\"{\n type: 'warning',\n showClose: false,\n lowContrast: true,\n title: 'Api Key usage limit reached: ',\n\t\tmessage: 'You have reached the maximum number of API key calls.',\n }\"\n *ngIf=\"user?.isApiKeyLimitReached\">\n </ibm-notification>\n </div>\n </div>\n</div>","import { Component, OnInit } from '@angular/core';\nimport { FormGroup, FormControl } from '@angular/forms';\nimport { finalize } from 'rxjs/operators';\nimport { EPlanType, User } from '@app/core/models';\nimport { ApiService, ToastMessagesService, UsersService } from '@app/core/services';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\nimport { LoaderService } from '@app/libs/bitforce/components';\nimport { copyToClipboard } from '@app/shared/common-utilities/clipboard';\n\n@Component({\n selector: 'ibm-user-keys',\n templateUrl: './user-keys.component.html',\n styleUrls: ['./user-keys.component.scss'],\n})\nexport class UserKeysComponent implements OnInit {\n form = new FormGroup({\n apiKey: new FormControl({ value: '', disabled: true }),\n roboRxnApiKey: new FormControl('', { nonNullable: true }),\n });\n user: User;\n ePlanType = EPlanType;\n\n constructor(\n private apiService: ApiService,\n private toastMessagesService: ToastMessagesService,\n private userService: UsersService,\n private loaderService: LoaderService\n ) {}\n\n ngOnInit(): void {\n this.loaderService.show();\n this.apiService.users\n .getById<User>({ id: this.apiService.auth.user.id })\n .pipe(finalize(() => this.loaderService.hide()))\n .subscribe(response => {\n this.user = response.content;\n this.form.patchValue(this.user);\n });\n }\n\n async onCopyApiKey() {\n const copied = await copyToClipboard(this.user.apiKey);\n if (copied) {\n this.toastMessagesService.show({\n title: 'Info',\n message: 'Api Key copied to clipboard',\n type: EToastMessageType.SUCCESS,\n });\n } else {\n // eslint-disable-next-line @typescript-eslint/quotes\n this.toastMessagesService.show({\n title: 'Error',\n message: `Couldn't copy Api Key to clipboard`,\n type: EToastMessageType.ERROR,\n });\n }\n }\n\n onGenerateKey() {\n this.loaderService.show();\n this.userService\n .generateKey()\n .pipe(finalize(() => this.loaderService.hide()))\n .subscribe(x => {\n if (x.metadata.uiMessages.errors.length === 0) {\n this.form.patchValue({ apiKey: x.payload.apiKey });\n this.user.apiKey = x.payload.apiKey;\n this.toastMessagesService.show({\n title: 'ApiKey Generated!',\n message: 'ApiKey have been generated',\n type: EToastMessageType.SUCCESS,\n });\n }\n });\n }\n\n onRemoveKey() {\n this.loaderService.show();\n this.userService\n .removeKey()\n .pipe(finalize(() => this.loaderService.hide()))\n .subscribe(x => {\n if (x.metadata.uiMessages.errors.length === 0) {\n this.form.patchValue({ apiKey: x.payload.apiKey });\n this.user.apiKey = x.payload.apiKey;\n this.toastMessagesService.show({\n title: 'ApiKey Removed',\n message: 'ApiKey have been removed',\n type: EToastMessageType.SUCCESS,\n });\n }\n });\n }\n\n onSaveRoboRxnApiKey() {\n const roboRxnApiKey = this.form.get('roboRxnApiKey').value;\n this.patchUserRxnKey(roboRxnApiKey);\n }\n\n onResetRoboRxnApiKey() {\n this.patchUserRxnKey(null);\n }\n\n private patchUserRxnKey(roboRxnApiKey: string) {\n this.loaderService.show();\n this.userService\n .patch<User>({\n body: {\n id: this.user.id,\n roboRxnApiKey,\n },\n isBodyRaw: true,\n })\n .pipe(finalize(() => this.loaderService.hide()))\n .subscribe(response => {\n this.form.get('roboRxnApiKey').setValue(roboRxnApiKey);\n this.user = response.content;\n this.userService.user = response.content;\n this.apiService.auth.user = response.content;\n this.toastMessagesService.show({\n title: 'Success',\n message: roboRxnApiKey ? 'Your activation key is correct.' : 'Your activation key has been reset',\n type: EToastMessageType.SUCCESS,\n });\n });\n }\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { AppSessionService } from '@app/core/services';\n\n@Component({\n selector: 'ibm-account-container',\n templateUrl: './account-container.component.html',\n styleUrls: ['./account-container.component.scss'],\n})\nexport class AccountContainerComponent implements OnInit, OnDestroy {\n constructor(public appSessionService: AppSessionService) {}\n\n ngOnInit() {\n this.appSessionService.isAccountArea = true;\n }\n\n ngOnDestroy() {\n this.appSessionService.isAccountArea = false;\n }\n}\n","<router-outlet></router-outlet>","<ibm-mlrp-header [hasSidenav]=\"true\">\n <ibm-user-account-menu></ibm-user-account-menu>\n</ibm-mlrp-header>\n\n<h2 class=\"mb-7\">Subscription</h2>\n\n<div ibmRow\n *ngIf=\"plan\">\n <div ibmCol\n [columnNumbers]=\"{ max: 5, lg: 5 , md: 5, sm: 5 }\"\n class=\"mb-7\">\n <ibm-plan [plan]=\"plan\"\n [levelIndex]=\"0\"\n [buttonAction]=\"authService?.user?.canUpgradePlan ? 'upgrade' : ''\"\n [isCurrentPlan]=\"true\"\n upgradeButtonText=\"Get unlimited access to RXN\"\n [isDisabled]=\"isPlanDisabled\"\n (changePlan)=\"onChangePlan()\"></ibm-plan>\n </div>\n</div>\n<ibm-unsubscribe-button></ibm-unsubscribe-button>","import { DatePipe } from '@angular/common';\nimport { Component, OnInit } from '@angular/core';\nimport { Router } from '@angular/router';\nimport {\n EPlanType,\n Plan,\n Subscription,\n ESubscriptionStatus,\n ESocketNotificationSubTopic,\n} from '@app/core/models';\nimport { ApiService, DialogsService } from '@app/core/services';\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { IOkCancelDialogData } from '@app/core/services/dialog/dialog.interface';\nimport { LoaderService } from '@app/libs/bitforce/components';\nimport { OkCancelDialogComponent } from '@app/shared/components/ok-cancel-dialog/ok-cancel-dialog.component';\nimport { environment } from '@env/environment';\nimport { ListItem } from 'carbon-components-angular';\nimport { map, finalize, switchMap, filter, tap, take } from 'rxjs/operators';\nimport { SocketNotificationService } from '@app/core/services/socket-notification.service';\nimport { AuthService } from '@app/libs/bitforce/services';\n@Component({\n selector: 'ibm-user-subscription',\n templateUrl: './user-subscription.component.html',\n styleUrls: ['./user-subscription.component.scss'],\n})\nexport class UserSubscriptionComponent implements OnInit {\n plan: Plan;\n subscription: Subscription;\n ePlanType = EPlanType;\n eSubscriptionStatus = ESubscriptionStatus;\n isPlanDisabled = false;\n constructor(\n private apiService: ApiService,\n private loaderService: LoaderService,\n private router: Router,\n private dialogsService: DialogsService,\n private datePipe: DatePipe,\n private socketNotificationService: SocketNotificationService,\n public authService: AuthService\n ) {}\n\n ngOnInit() {\n this.fetchSubscription().subscribe();\n }\n\n private fetchSubscription() {\n this.loaderService.show();\n return this.apiService.subscriptions\n .currentSubscription()\n .pipe(map(data => data.content))\n .pipe(\n finalize(() => this.loaderService.hide()),\n tap(subscription => {\n this.subscription = subscription;\n this.isPlanDisabled = subscription.subscriptionInProgress;\n\n if (this.subscription?.plan) {\n // we need to wrap the response in a Plan object because we have to pass it to the ibm-plan component\n this.plan = new Plan({\n name: this.subscription?.plan?.name,\n levels: [this.subscription?.plan],\n });\n }\n if (this.isPlanDisabled) {\n this.subscribeToNotifications();\n }\n })\n );\n }\n\n onChangePlan() {\n this.router.navigate(environment.upgradeUrl.split('/'));\n }\n\n onDeleteSubscription() {\n this.dialogsService.dialog\n .open(OkCancelDialogComponent, {\n title: `Downgrade your plan`,\n message: `Are you sure you want to downgrade your <strong>${\n this.plan?.name\n }</strong> plan to the <strong>Free</strong> plan? <br/><br/> You will continue to have access to the <strong>${\n this.plan?.name\n }</strong> plan's features and rates until the end of your current cycle on ${this.datePipe.transform(\n this.subscription.endTermDate,\n 'yyyy-MM-dd'\n )}.`,\n okText: 'Continue',\n cancelText: 'Cancel',\n okButtonType: 'danger',\n useConfirmDropdown: true,\n confirmDropdownLabel: 'Please Confirm',\n confirmDropdownOptions: [{ content: 'I want to downgrade to the Free plan' } as ListItem],\n } as IOkCancelDialogData)\n .afterClosed()\n .pipe(\n filter(closeEvent => closeEvent.status === EDialogCloseEventStatus.OK),\n switchMap(() => this.apiService.subscriptions.deleteCurrentSubscription()),\n switchMap(() => this.fetchSubscription())\n )\n .subscribe();\n }\n\n private subscribeToNotifications() {\n this.socketNotificationService.notifications$\n .pipe(\n filter(notification =>\n [\n ESocketNotificationSubTopic.SUBSCRIPTION_COMPLETED,\n ESocketNotificationSubTopic.SUBSCRIPTION_ERROR,\n ].includes(notification.subTopic)\n ),\n take(1),\n switchMap(() => this.fetchSubscription())\n )\n .subscribe();\n }\n}\n","<ibm-mlrp-header [hasSidenav]=\"true\">\n <ibm-user-account-menu></ibm-user-account-menu>\n</ibm-mlrp-header>\n\n<!-- <ibm-breadcrumb [noTrailingSlash]=\"true\"\n class=\"mb-5 d-block\">\n <ibm-breadcrumb-item [route]=\"['/','account', 'billing']\">\n Billing\n </ibm-breadcrumb-item>\n <ibm-breadcrumb-item current=\"true\">\n Billing details\n </ibm-breadcrumb-item>\n</ibm-breadcrumb> -->\n\n<ng-container *ngIf=\"billingOverview\">\n <h2 class=\"mb-7\">Billing</h2>\n\n <div ibmRow>\n <div ibmCol\n [columnNumbers]=\"{max: 8, xlg: 10, lg: 10, md: 6, sm: 4 }\">\n <ibm-tile class=\"mb-1\">\n <p><strong>Current billing cycle</strong></p>\n <p class=\"small--sm\">{{billingOverview?.billingCycle}}</p>\n <p class=\"mt-5\"><strong>Usage this cycle (approximate)</strong></p>\n <p class=\"small--sm\">{{billingOverview?.usageInCurrentCycleFormatted}}</p>\n <p class=\"mt-5\"><strong>Amount you'll be billed (approximate)</strong></p>\n <p class=\"small--sm\">{{billingOverview?.amountInCurrentCycleFormatted}}</p>\n </ibm-tile>\n\n <ibm-tile class=\"p-0 mb-6\"\n *ngIf=\"plan\">\n <div ibmRow>\n <div ibmCol\n [columnNumbers]=\"{md: 4, lg: 9}\">\n <ibm-plan [plan]=\"plan\"\n [levelIndex]=\"0\"\n [showHeader]=\"false\"></ibm-plan>\n </div>\n </div>\n\n </ibm-tile>\n\n <ibm-tile class=\"mb-6\">\n <div class=\"bx--tile--toolbar\">\n <button ibmButton=\"ghost\"\n (click)=\"onEditBillingInformation()\">\n Edit\n <svg icon\n ibmIconEdit\n size=\"16\"\n fill=\"currentColor\"\n class=\"ml-1\"></svg>\n </button>\n </div>\n <div ibmRow>\n <div ibmCol>\n <p><strong>Contact</strong></p>\n <p class=\"small--sm\">{{userBillingInformation?.fullName}}</p>\n <p class=\"small--sm\">{{userBillingInformation?.email}}</p>\n <p class=\"small--sm\">{{userBillingInformation?.phone}}</p>\n <p class=\"mt-7\"><strong>Address</strong></p>\n <p class=\"small--sm\">{{userBillingInformation?.addressLine1}}</p>\n <p class=\"small--sm\"\n *ngIf=\"userBillingInformation?.addressLine2\">\n {{userBillingInformation?.addressLine1}}\n </p>\n <p class=\"small--sm\"\n *ngIf=\"userBillingInformation?.addressLine3\">\n {{userBillingInformation?.addressLine3}}\n </p>\n <p class=\"small--sm\"\n *ngIf=\"userBillingInformation\">\n {{userBillingInformation?.locality}}, {{userBillingInformation?.province}}\n {{userBillingInformation?.postalCode}}\n </p>\n </div>\n </div>\n </ibm-tile>\n\n <ibm-tile>\n <div class=\"bx--tile--toolbar\">\n <button ibmButton=\"ghost\"\n (click)=\"onEditPaymentMethods()\">\n Edit\n <svg icon\n ibmIconEdit\n size=\"16\"\n fill=\"currentColor\"\n class=\"ml-1\"></svg>\n </button>\n </div>\n <div ibmRow>\n <div ibmCol>\n <p><strong>Payment method</strong></p>\n <p class=\"small--sm\">Credit card {{paymentMethod?.scrambledCardNumber}}</p>\n </div>\n </div>\n </ibm-tile>\n </div>\n </div>\n\n <ibm-unsubscribe-button class=\"mt-6\"></ibm-unsubscribe-button>\n</ng-container>","import { Component, OnInit } from '@angular/core';\nimport {\n BillingOverview,\n IPaymentMethod,\n Plan,\n SubscriptionCost,\n UserBillingInformation,\n} from '@app/core/models';\nimport { ApiService, DialogsService, ToastMessagesService } from '@app/core/services';\nimport { EDialogCloseEventStatus } from '@app/core/services/dialog/dialog.enum';\nimport { IDialogCloseEvent } from '@app/core/services/dialog/dialog.interface';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\nimport { LoaderService } from '@app/libs/bitforce/components';\nimport { BillingInformationDialogComponent } from '@app/modules/subscription/billing-information-dialog/billing-information-dialog.component';\nimport { PaymentMethodDialogComponent } from '@app/shared/components/payment-method-dialog/payment-method-dialog.component';\nimport { filter, finalize, map, switchMap, tap } from 'rxjs/operators';\n\n@Component({\n selector: 'ibm-billing-details',\n templateUrl: './billing-details.component.html',\n styleUrls: ['./billing-details.component.scss'],\n})\nexport class BillingDetailsComponent implements OnInit {\n userBillingInformation: UserBillingInformation;\n billingOverview: BillingOverview;\n paymentMethod: IPaymentMethod;\n plan: Plan;\n constructor(\n private apiService: ApiService,\n private loaderService: LoaderService,\n private toastMessagesService: ToastMessagesService,\n private dialogsService: DialogsService\n ) {}\n\n ngOnInit(): void {\n this.fetchBillingOverview();\n }\n\n private fetchBillingOverview() {\n this.loaderService.show();\n this.apiService.billings\n .overview()\n .pipe(\n map(data => data.content),\n finalize(() => this.loaderService.hide())\n )\n .subscribe(billingOverview => {\n this.billingOverview = billingOverview;\n billingOverview.billingInformation = new UserBillingInformation(billingOverview.billingInformation);\n this.userBillingInformation = billingOverview.billingInformation;\n this.paymentMethod = billingOverview.paymentMethod;\n this.plan = new Plan({\n name: billingOverview.subscription?.plan?.name,\n levels: [billingOverview.subscription?.plan],\n });\n });\n }\n\n onEditBillingInformation() {\n this.dialogsService.dialog\n .open(BillingInformationDialogComponent, {\n userBillingInformation: this.userBillingInformation,\n })\n .afterClosed()\n .pipe(\n filter(closeEvent => closeEvent.status === EDialogCloseEventStatus.OK),\n switchMap((closeEvent: IDialogCloseEvent<UserBillingInformation>) => {\n this.loaderService.show();\n const userBillingInformation = closeEvent.data;\n return this.userBillingInformation\n ? this.apiService.userBillingInformation.request<UserBillingInformation>({\n body: userBillingInformation,\n method: 'PATCH',\n isBodyRaw: true,\n })\n : this.apiService.userBillingInformation.post<UserBillingInformation>({\n body: userBillingInformation,\n isBodyRaw: true,\n });\n }),\n map(data => data.content),\n finalize(() => this.loaderService.hide())\n )\n .subscribe(\n userBillingInformation => {\n this.toastMessagesService.show({\n title: 'Success',\n message: 'Billing information updated correctly',\n type: EToastMessageType.SUCCESS,\n });\n\n this.userBillingInformation = userBillingInformation;\n this.billingOverview.billingInformation = userBillingInformation;\n },\n () => {\n this.toastMessagesService.show({\n title: 'Error',\n message: 'Error updating billing information',\n type: EToastMessageType.ERROR,\n });\n }\n );\n }\n\n onEditPaymentMethods() {\n this.loaderService.show();\n this.apiService.plans\n .get<Plan>()\n .pipe(\n map(data => data.content),\n finalize(() => this.loaderService.hide()),\n switchMap(plans =>\n this.dialogsService.dialog\n .open(PaymentMethodDialogComponent, {\n subscriptionCost: new SubscriptionCost({\n plan: { price: 0 },\n tax: { price: 0 },\n total: { price: 0 },\n }),\n currencyCode: plans?.[0]?.currencyCode,\n isWalletManagementSession: true,\n })\n .afterClosed()\n ),\n filter(x => x.status === EDialogCloseEventStatus.OK),\n tap(() => this.fetchBillingOverview())\n )\n .subscribe(() => {\n this.toastMessagesService.show({\n title: 'Success',\n message: 'Payment methods updated correctly',\n type: EToastMessageType.SUCCESS,\n });\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot, UrlTree } from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { AuthService } from '../services';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TeamGuard implements CanActivate {\n constructor(private authService: AuthService) {}\n\n canActivate(\n next: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable<boolean> | Promise<boolean> | boolean {\n return this.authService.user.isTeamOwner;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { AccountPageComponent } from './account-page/account-page.component';\nimport { UserKeysComponent } from './user-keys/user-keys.component';\nimport { AccountContainerComponent } from './account-container/account-container.component';\nimport { UserSubscriptionComponent } from './user-subscription/user-subscription.component';\nimport { BillingDetailsComponent } from './billing-details/billing-details.component';\nimport { EcommerceGuard } from '@app/libs/bitforce/guards';\nimport { TeamGuard } from '@app/libs/bitforce/guards/team.guard';\n\nconst routes: Routes = [\n { path: '', redirectTo: 'details', pathMatch: 'full' },\n {\n path: '',\n component: AccountContainerComponent,\n data: { accountArea: true },\n children: [\n //{ path: 'billing/details', component: BillingDetailsComponent },\n { path: 'details', component: AccountPageComponent },\n { path: 'keys', component: UserKeysComponent },\n { path: 'billing', component: BillingDetailsComponent, canActivate: [EcommerceGuard] },\n { path: 'subscription', component: UserSubscriptionComponent, canActivate: [EcommerceGuard] },\n {\n path: 'team',\n loadChildren: () => import('./team/team.module').then(m => m.TeamModule),\n canActivate: [EcommerceGuard, TeamGuard],\n },\n ],\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class AccountRoutingModule {}\n","import { NgModule } from '@angular/core';\nimport { AccountPageComponent } from './account-page/account-page.component';\nimport { BillingComponent } from './billing/billing.component';\nimport { AccountRoutingModule } from './account-routing.module';\nimport { UserKeysComponent } from './user-keys/user-keys.component';\nimport { SharedModule } from '@app/shared/shared.module';\nimport { CommonModule, DatePipe } from '@angular/common';\nimport { AccountContainerComponent } from './account-container/account-container.component';\nimport { UserSubscriptionComponent } from './user-subscription/user-subscription.component';\nimport { BillingDetailsComponent } from './billing-details/billing-details.component';\n\n@NgModule({\n imports: [CommonModule, SharedModule, AccountRoutingModule],\n declarations: [\n AccountPageComponent,\n BillingComponent,\n UserKeysComponent,\n AccountContainerComponent,\n UserSubscriptionComponent,\n BillingDetailsComponent,\n ],\n providers: [DatePipe],\n})\nexport class AccountModule {}\n"],"x_google_ignoreList":[]}