{ "version": 3, "sources": ["src/app/shared/enums/payments/payment-type.enum.ts", "src/app/common/components/payment-dialog/const/balance-cart.ts", "src/app/services/api/external/payment.service.ts", "src/app/services/utils/payment-utility.service.ts", "src/app/common/components/payment-dialog/payment-dialog.component.ts", "src/app/common/components/payment-dialog/payment-dialog.component.html"], "sourcesContent": ["//TODO: запросить финальный енам от бэка когда будет готово, ниже указан как пример\nexport enum PaymentType {\n Payment = 0, // Оплата задолженности\n Balance = 1, // Пополнение баланса\n}\n\nexport enum PaymentTypeTranscription {\n Payment = 'PAYMENT_TYPES.PAYMENT',\n Balance = 'PAYMENT_TYPES.BALANCE',\n}\n\n//================================================================================\n//Получение наименования типа Платежа\n\nconst PaymentTypeMap = {\n [PaymentType.Payment]: PaymentTypeTranscription.Payment,\n [PaymentType.Balance]: PaymentTypeTranscription.Balance,\n};\n\nexport function getPaymentTypeName(type: PaymentType | undefined): string {\n return PaymentTypeMap[type ?? PaymentType.Payment];\n}\n\n//================================================================================\n", "import { PaymentCart } from '@shared/interfaces/payments/payment-pay-keeper-form';\n\nexport type CartCreator = (name: string, sum: number) => PaymentCart;\n\nexport const BalanceCart: CartCreator = (name: string, sum: number) => {\n return {\n name,\n price: sum,\n quantity: 1,\n sum,\n tax: 'vat20',\n item_type: 'goods',\n payment_type: 'advance',\n };\n};\n\nexport const DebtCart: CartCreator = (name: string, sum: number) => {\n return {\n name,\n price: sum,\n quantity: 1,\n sum,\n tax: 'vat20',\n item_type: 'goods',\n payment_type: 'debt',\n };\n};\n", "import { Inject, Injectable } from '@angular/core';\nimport { RestApiService } from '@services/rest-api/rest-api.service';\nimport { Observable } from 'rxjs';\nimport {\n PaymentTransactionForArrears,\n PaymentTransactionForBalance,\n PaymentTransactionShortInfo,\n} from '@shared/interfaces/payments/payment-transaction.interface';\nimport { API_PATH } from '@shared/tokens';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PaymentService {\n constructor(\n private http: RestApiService,\n @Inject(API_PATH) private readonly apiPath: string,\n ) {}\n\n // генерация ids для оплаты задолженности\n getPaymentTransactionsIdsWithDocs(params: PaymentTransactionForArrears): Observable {\n return this.http.put(\n `${this.apiPath}/payment-transaction/debt-docs`,\n params,\n );\n }\n\n // генерация id для пополнения баланса\n getPaymentTransactionId(params: PaymentTransactionForBalance): Observable {\n return this.http.put(`${this.apiPath}/payment-transaction`, params);\n }\n}\n", "import { DestroyRef, Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { PaymentService } from '@services/api/external/payment.service';\nimport { UserFacade } from '../../store/user/user.facade';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n PaymentTransaction,\n PaymentTransactionDocs,\n PaymentTransactionForArrears,\n PaymentTransactionForBalance,\n PaymentTransactionShortInfo,\n} from '@shared/interfaces/payments/payment-transaction.interface';\nimport { PaymentPayKeeperForm } from '@shared/interfaces/payments/payment-pay-keeper-form';\nimport { PaymentType } from '@shared/enums/payments/payment-type.enum';\nimport { GetMeResponse } from '@shared/interfaces';\nimport { environment } from '../../../environments/environment';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PaymentUtilityService {\n private userInfo: GetMeResponse | null = null;\n private paymentPlatformId: string = '';\n\n constructor(\n private paymentService: PaymentService,\n private userFacade: UserFacade,\n private destroyRef: DestroyRef,\n ) {\n this.userFacade.user$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(userInfo => {\n this.userInfo = userInfo;\n });\n\n this.userFacade.balanceInfo$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(userInfo => {\n this.paymentPlatformId = userInfo?.paymentPlatformId ?? '';\n });\n }\n\n getReturnUrl(paymentType: PaymentType) {\n switch (paymentType) {\n case PaymentType.Balance:\n return environment.returnURL;\n case PaymentType.Payment:\n return environment.paymentURL + '/mutual-settlements/list';\n }\n }\n\n // генерация paymentTransactionId для пополнения баланса\n generatePaymentTransactionIdsForBalance(paymentData: PaymentPayKeeperForm) {\n const params: PaymentTransactionForBalance = {\n ...this.getParamsForTransaction(paymentData, PaymentType.Balance),\n paySum: +paymentData.sum || 1, // pay-keeper не принимает 0\n paymentPlatformId: this.paymentPlatformId,\n };\n\n return this.paymentService.getPaymentTransactionId(params);\n }\n\n // генерация paymentTransactionId для оплаты задолженности\n generatePaymentTransactionIdsForArrears(\n paymentForm: PaymentPayKeeperForm,\n docs: PaymentTransactionDocs[],\n ): Observable {\n const params: PaymentTransactionForArrears = {\n ...this.getParamsForTransaction(paymentForm, PaymentType.Payment),\n docs: [...docs],\n };\n\n return this.paymentService.getPaymentTransactionsIdsWithDocs(params);\n }\n\n //TODO: use paymentType\n private getParamsForTransaction(data: PaymentPayKeeperForm, paymentType: PaymentType): PaymentTransaction {\n return {\n legalOrganizationId: this.userInfo?.defaultLegalOrganization.id ?? '',\n contractId: this.userInfo?.defaultContract?.id ?? '',\n payType: 'Visa',\n clientFio: data.clientid,\n clientPhoneNum: data.client_phone,\n clientEmail: data.client_email,\n };\n }\n}\n", "import { ChangeDetectionStrategy, ChangeDetectorRef, Component, DestroyRef, Signal } from '@angular/core';\nimport { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';\nimport { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { PaymentCart, PaymentCreateCustomForm, PaymentPayKeeperForm } from '@shared/interfaces/payments/payment-pay-keeper-form';\nimport { ButtonModule } from 'primeng/button';\nimport { InputMaskModule } from 'primeng/inputmask';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { InputNumberModule } from 'primeng/inputnumber';\nimport { phoneValidator } from '@shared/validators';\nimport { ControlsOf } from '@shared/utils/controls-of';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { UserFacade } from '../../../store/user/user.facade';\nimport { PaymentUtilityService } from '@services/utils/payment-utility.service';\nimport { catchError, EMPTY, finalize, switchMap, take } from 'rxjs';\nimport { PaymentDialogForm } from '@shared/interfaces/payments/payment-dialog.interface';\nimport { getPaymentTypeName, PaymentType } from '@shared/enums/payments/payment-type.enum';\nimport { UserShortInfo } from './interfaces/user-short-info.interface';\nimport { AlertType } from '@shared/enums/notifications/notifications.enum';\nimport { AlertService } from '@services/utils/alert.service';\nimport { BalanceCart, DebtCart } from './const/balance-cart';\nimport { TranslocoPipe, TranslocoService } from '@jsverse/transloco';\nimport { environment } from '../../../../environments/environment';\nimport { PhoneMaskPipe } from '../../../shared/pipes/phone-mask.pipe';\nimport { MaskitoDirective } from '@maskito/angular';\nimport { removeSpaces } from '@shared/utils/string-utils';\nimport { isOnlyPrefix } from '@shared/utils/phone-utils';\n\n@Component({\n selector: 'b2b-portal-payment-dialog',\n imports: [\n ButtonModule,\n InputMaskModule,\n ReactiveFormsModule,\n InputTextModule,\n InputNumberModule,\n TranslocoPipe,\n PhoneMaskPipe,\n MaskitoDirective,\n ],\n templateUrl: './payment-dialog.component.html',\n styleUrl: './payment-dialog.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PaymentDialogComponent {\n form: FormGroup>;\n isLoading: boolean = false;\n actionUrl: string = environment.paymentURL + '/create';\n returnUrl: string = '';\n\n $phonePattern: Signal = this.userFacade.$phonePattern;\n private userInfo: UserShortInfo = { userEmail: '', userName: '' };\n\n constructor(\n private dialogConfig: DynamicDialogConfig,\n private fb: FormBuilder,\n private ref: DynamicDialogRef,\n private userFacade: UserFacade,\n private destroyRef: DestroyRef,\n private paymentUtilityService: PaymentUtilityService,\n private cdr: ChangeDetectorRef,\n private alertService: AlertService,\n private translateService: TranslocoService,\n ) {\n this.userFacade.user$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(userInfo => {\n this.userInfo.userEmail = userInfo?.email ?? '';\n this.userInfo.userName = userInfo?.login ?? '';\n });\n\n this.form = this.fb.nonNullable.group({\n sum: this.fb.control(0, [Validators.required]),\n clientFio: this.fb.control(this.userInfo.userName, [Validators.required]),\n clientEmail: this.fb.control(this.userInfo.userEmail, [Validators.email]),\n clientPhone: this.fb.control('', [phoneValidator(this.$phonePattern())]),\n orderId: this.fb.control(''),\n serviceName: this.fb.control(getPaymentTypeName(this.dialogConfig.data?.payType)),\n });\n\n this.returnUrl = this.paymentUtilityService.getReturnUrl(this.dialogConfig.data?.payType || PaymentType.Balance);\n this.setFormByPrevData();\n }\n\n pay() {\n if (this.form.invalid) return;\n\n const phoneValue = this.form.controls.clientPhone.value;\n const fieldsData: PaymentCreateCustomForm = this.form.getRawValue();\n const paymentData: PaymentPayKeeperForm = {\n sum: fieldsData.sum ? fieldsData.sum : 100, // min value for payment\n clientid: fieldsData.clientFio ?? '',\n orderid: '',\n service_name: fieldsData.serviceName ?? '',\n client_phone: isOnlyPrefix(phoneValue, this.$phonePattern()) ? '' : removeSpaces(phoneValue),\n client_email: fieldsData.clientEmail ?? '',\n };\n\n switch (this.dialogConfig.data?.payType) {\n case PaymentType.Payment:\n this.payToPayment(paymentData);\n break;\n case PaymentType.Balance:\n this.payToBalance(paymentData);\n break;\n default:\n this.showError('PAYMENT_DIALOG.ERROR_INITIALIZE_PAYMENT');\n break;\n }\n }\n\n close() {\n this.ref.close(true);\n }\n\n private payToBalance(paymentData: PaymentPayKeeperForm) {\n this.isLoading = true;\n\n const name = this.translateService.translate('PAYMENT_DIALOG.BALANCE_REASON');\n const sumValue = Number(this.form.controls.sum.value) || 100;\n const balanceCart = BalanceCart(name, this.form.controls.sum.value || 0);\n\n this.paymentUtilityService\n .generatePaymentTransactionIdsForBalance(paymentData)\n .pipe(\n switchMap((transactionId: string) => {\n this.submitPayment(transactionId, sumValue, balanceCart);\n return EMPTY;\n }),\n catchError(error => {\n this.showError(error?.detail ?? 'PAYMENT_DIALOG.ERROR_PAYMENT');\n return EMPTY;\n }),\n finalize(() => {\n this.isLoading = false;\n this.cdr.markForCheck();\n }),\n take(1),\n )\n .subscribe();\n }\n\n private payToPayment(paymentData: PaymentPayKeeperForm) {\n if (!this.dialogConfig.data?.docs?.length) {\n this.showError('PAYMENT_DIALOG.ERROR_DEBT_LIST');\n return;\n }\n\n this.isLoading = true;\n\n const name = this.translateService.translate('PAYMENT_DIALOG.DEBT_REASON');\n const sumValue = Number(this.form.controls.sum.value) || 100; // min payment\n const debtCart = DebtCart(name, this.form.controls.sum.value || 0);\n\n this.paymentUtilityService\n .generatePaymentTransactionIdsForArrears(paymentData, this.dialogConfig.data.docs)\n .pipe(\n switchMap(transactionInfo => {\n this.submitPayment(transactionInfo.paymentTransactionId, sumValue, debtCart);\n return EMPTY;\n }),\n catchError(error => {\n this.showError(error?.detail ?? 'PAYMENT_DIALOG.ERROR_PAYMENT');\n return EMPTY;\n }),\n finalize(() => {\n this.isLoading = false;\n this.cdr.markForCheck();\n }),\n take(1),\n )\n .subscribe();\n }\n\n private submitPayment(transactionId: string, sumValue: number, cart: PaymentCart) {\n this.form.patchValue({ orderId: transactionId });\n\n const sumInput = document.querySelector('input[name=\"sum\"]') as HTMLInputElement;\n if (sumInput) {\n sumInput.value = sumValue.toString();\n }\n\n const cartInput = document.querySelector('input[name=\"cart\"]') as HTMLInputElement;\n if (cartInput) {\n cartInput.value = JSON.stringify([cart]);\n }\n\n const form = document.querySelector('form') as HTMLFormElement;\n if (form) {\n form.submit();\n }\n }\n\n private setFormByPrevData() {\n if (this.dialogConfig.data?.payType === PaymentType.Payment && this.dialogConfig.data?.sum) {\n this.form.controls.sum.disable();\n }\n\n if (this.dialogConfig.data?.sum) {\n this.form.controls.sum.patchValue(this.dialogConfig.data.sum);\n }\n }\n\n private showError(detail: string) {\n this.alertService.show({\n severity: AlertType.Error,\n detail: detail ?? 'PAYMENT_DIALOG.ERROR_UNKNOWN',\n });\n }\n}\n", "\n

{{ form.controls.serviceName.value | transloco }}

\n {{\n 'PAYMENT_DIALOG.FILL_INFO_ABOUT_YOURSELF' | transloco\n }}\n\n
\n
\n \n \n @if (form.controls.clientFio.errors) {\n \n {{ form.controls.clientFio.errors['message'] }}\n \n }\n
\n\n
\n \n\n \n\n @if (form.controls.clientPhone.errors) {\n \n {{ form.controls.clientPhone.errors['message'] | transloco }}\n \n }\n
\n\n
\n \n \n @if (form.controls.clientEmail.errors) {\n \n {{ form.controls.clientEmail.errors['message'] }}\n \n }\n
\n\n
\n \n \n @if (form.controls.sum.errors) {\n \n {{ form.controls.sum.errors['message'] }}\n \n }\n
\n
\n\n \n \n \n \n \n\n
\n \n \n
\n\n"], "mappings": "25BACA,IAAYA,EAAZ,SAAYA,EAAW,CACrBA,OAAAA,EAAAA,EAAA,QAAA,CAAA,EAAA,UACAA,EAAAA,EAAA,QAAA,CAAA,EAAA,UAFUA,CAGZ,EAHYA,GAAW,CAAA,CAAA,EAKXC,EAAZ,SAAYA,EAAwB,CAClCA,OAAAA,EAAA,QAAA,wBACAA,EAAA,QAAA,wBAFUA,CAGZ,EAHYA,GAAwB,CAAA,CAAA,EAQ9BC,GAAiB,CACrB,CAACF,EAAYG,OAAO,EAAGF,EAAyBE,QAChD,CAACH,EAAYI,OAAO,EAAGH,EAAyBG,SAG5C,SAAUC,GAAmBC,EAA6B,CAC9D,OAAOJ,GAAeI,GAAQN,EAAYG,OAAO,CACnD,CCjBO,IAAMI,GAA2BA,CAACC,EAAcC,KAC9C,CACLD,KAAAA,EACAE,MAAOD,EACPE,SAAU,EACVF,IAAAA,EACAG,IAAK,QACLC,UAAW,QACXC,aAAc,YAILC,GAAwBA,CAACP,EAAcC,KAC3C,CACLD,KAAAA,EACAE,MAAOD,EACPE,SAAU,EACVF,IAAAA,EACAG,IAAK,QACLC,UAAW,QACXC,aAAc,SCXlB,IAAaE,IAAc,IAAA,CAArB,MAAOA,CAAc,CACzBC,YACUC,EAC2BC,EAAe,CAD1C,KAAAD,KAAAA,EAC2B,KAAAC,QAAAA,CAClC,CAGHC,kCAAkCC,EAAoC,CACpE,OAAO,KAAKH,KAAKI,IACf,GAAG,KAAKH,OAAO,iCACfE,CAAM,CAEV,CAGAE,wBAAwBF,EAAoC,CAC1D,OAAO,KAAKH,KAAKI,IAA0C,GAAG,KAAKH,OAAO,uBAAwBE,CAAM,CAC1G,iDAjBWL,GAAcQ,EAA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AAZ,EAAApG,SAAA,EAM7C1B,EAAA,CAAA,EAAA0I,EAAA,QAAAnI,EAAA,GAAA,GAAA,sBAAA,CAAA,EAA4C,WAAAuH,EAAAxG,SAAA,EAO5CtB,EAAA,CAAA,EAAA0I,EAAA,QAAAnI,EAAA,GAAA,GAAA,oBAAA,CAAA,EAA0C,WAAAuH,EAAA3H,KAAAkD,OAAA,EAGjB,UAAAyE,EAAAxG,SAAA,kBDxE3BwH,GAAYC,GACZC,GACAC,GAAmBC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EACnBC,GAAeC,GACfC,GAAiBC,GACjBC,GACAC,GACAC,EAAgB,EAAAC,cAAA,EAAAC,gBAAA,CAAA,CAAA,CAAA,SAMPtJ,CAAsB,GAAA", "names": ["PaymentType", "PaymentTypeTranscription", "PaymentTypeMap", "Payment", "Balance", "getPaymentTypeName", "type", "BalanceCart", "name", "sum", "price", "quantity", "tax", "item_type", "payment_type", "DebtCart", "PaymentService", "constructor", "http", "apiPath", "getPaymentTransactionsIdsWithDocs", "params", "put", "getPaymentTransactionId", "\u0275\u0275inject", "RestApiService", "API_PATH", "factory", "\u0275fac", "providedIn", "PaymentUtilityService", "constructor", "paymentService", "userFacade", "destroyRef", "userInfo", "paymentPlatformId", "user$", "pipe", "takeUntilDestroyed", "subscribe", "balanceInfo$", "getReturnUrl", "paymentType", "PaymentType", "Balance", "environment", "returnURL", "Payment", "paymentURL", "generatePaymentTransactionIdsForBalance", "paymentData", "params", "__spreadProps", "__spreadValues", "getParamsForTransaction", "paySum", "sum", "getPaymentTransactionId", "generatePaymentTransactionIdsForArrears", "paymentForm", "docs", "getPaymentTransactionsIdsWithDocs", "data", "legalOrganizationId", "defaultLegalOrganization", "id", "contractId", "defaultContract", "payType", "clientFio", "clientid", "clientPhoneNum", "client_phone", "clientEmail", "client_email", "\u0275\u0275inject", "PaymentService", "UserFacade", "DestroyRef", "factory", "\u0275fac", "providedIn", "\u0275\u0275elementStart", "\u0275\u0275text", "\u0275\u0275elementEnd", "\u0275\u0275advance", "\u0275\u0275textInterpolate1", "ctx_r1", "form", "controls", "clientFio", "errors", "\u0275\u0275pipeBind1", "clientPhone", "clientEmail", "sum", "PaymentDialogComponent", "constructor", "dialogConfig", "fb", "ref", "userFacade", "destroyRef", "paymentUtilityService", "cdr", "alertService", "translateService", "isLoading", "actionUrl", "environment", "paymentURL", "returnUrl", "$phonePattern", "userInfo", "userEmail", "userName", "user$", "pipe", "takeUntilDestroyed", "subscribe", "email", "login", "nonNullable", "group", "control", "Validators", "required", "phoneValidator", "orderId", "serviceName", "getPaymentTypeName", "data", "payType", "getReturnUrl", "PaymentType", "Balance", "setFormByPrevData", "pay", "invalid", "phoneValue", "value", "fieldsData", "getRawValue", "paymentData", "clientid", "orderid", "service_name", "client_phone", "isOnlyPrefix", "removeSpaces", "client_email", "Payment", "payToPayment", "payToBalance", "showError", "close", "name", "translate", "sumValue", "Number", "balanceCart", "BalanceCart", "generatePaymentTransactionIdsForBalance", "switchMap", "transactionId", "submitPayment", "EMPTY", "catchError", "error", "detail", "finalize", "markForCheck", "take", "docs", "length", "debtCart", "DebtCart", "generatePaymentTransactionIdsForArrears", "transactionInfo", "paymentTransactionId", "cart", "patchValue", "sumInput", "document", "querySelector", "toString", "cartInput", "JSON", "stringify", "submit", "disable", "show", "severity", "AlertType", "Error", "\u0275\u0275directiveInject", "DynamicDialogConfig", "FormBuilder", "DynamicDialogRef", "UserFacade", "DestroyRef", "PaymentUtilityService", "ChangeDetectorRef", "AlertService", "TranslocoService", "selectors", "decls", "vars", "consts", "template", "rf", "ctx", "\u0275\u0275element", "\u0275\u0275template", "PaymentDialogComponent_Conditional_14_Template", "PaymentDialogComponent_Conditional_21_Template", "PaymentDialogComponent_Conditional_27_Template", "PaymentDialogComponent_Conditional_33_Template", "\u0275\u0275listener", "i0", "\u0275\u0275restoreView", "_r1", "\u0275\u0275resetView", "\u0275\u0275property", "\u0275\u0275sanitizeUrl", "\u0275\u0275textInterpolate", "\u0275\u0275conditional", "ButtonModule", "ButtonDirective", "InputMaskModule", "ReactiveFormsModule", "\u0275NgNoValidate", "DefaultValueAccessor", "NgControlStatus", "NgControlStatusGroup", "FormControlDirective", "FormGroupDirective", "FormControlName", "InputTextModule", "InputText", "InputNumberModule", "InputNumber", "TranslocoPipe", "PhoneMaskPipe", "MaskitoDirective", "encapsulation", "changeDetection"] }