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AAS,CAClB,CAACC,KAAM,GAAIC,UAAWH,EAAmBI,UAAW,OAAQC,YAAa,CAACC,OAmDvE,SACIC,SAASN,wCADPM,6DAzBE,CAIP,CACIC,QAASC,KACTC,SAAUC,KACVC,KAAM,CAACH,KAAiBE,OAG5B,CACIH,QAASC,KAAkBI,SAAU,CACjCpC,MAAO,CACHqC,UAAW,WAEfC,QAAS,CACLD,UAAW,UACXE,eAAgB,WAChBC,cAAe,KACfC,mBAAoB,gBAInCC,SA7CQ,CACLC,KACAC,cAAsBpB,GACtBqB,KACAC,KACAzH,KACAA,KACA0H,IACAC,KACAC,KACAC,IACAC,KACAzK,KACA0K","names":["T","BESTELLFEHLER","s","e","constructor","t","n","this","ngOnInit","selectedIdf","data","currentlySelectedIdf","onCancelClick","dialogRef","close","onClickReturn","p","d","selectors","onBlur","r","formControlDir","control","formControlName","i","value","o","trim","patchValue","f","Date","now","q","returnAnnouncementResponse$","retourenService","getReturnAnnouncementResponseObservable","download","pipe","m","ngUnsubscribe$","subscribe","hasOwnProperty","msv3","Object","keys","idf","dc","documentId","retourenAnteil","dokumentID","retourenRestService","getReturnDocument","ngOnDestroy","next","complete","u","h","U","D","E","c","P","idfs$","userService","selectContextualizedIdfsObservable","input","isPhoenixUser","isInternalUser","selectedIdf$","currentlyDisplayedIdf","returnAnnouncementForm","products","addProductField","returnRequestResponse$","getReturnRequestResponseObservable","returnRequestLoading$","getReturnRequestLoadingObservable","returnRequestError$","getReturnRequestErrorObservable","returnAnnouncementLoading$","getReturnAnnouncementLoadingObservable","returnAnnouncementError$","getReturnAnnouncementErrorObservable","status","orderNumber","pzn","quantity","reason","batch","expiration","push","resetStatusAndReasonSelection","controls","get","reset","setValue","datePickerEvent","checkStorageDetails","getStorageDetails","returnObject","btm","coolingArticle","addValidators","removeValidators","updateValueAndValidity","setErrors","incorrect","storageCheckError","getErrorMessage","RegExp","test","length","removeProductField","removeAt","resetProductField","at","clear","isSubmitBtnDisable","filter","isTermsChecked","onReasonTypeChange","getIndex","markAllAsTouched","valid","returnRequestStatusMsg","activeRequestPZN","activeRequestOrderNo","format","loadReturnRequest","btmOrCoolingArticle","isBtmOrCoolingArticleExist","isGreenArticleExist","processReturnRequestStatusMsg","onReturnAnnouncement","JSON","parse","stringify","forEach","processReturnAnnouncement","autoFocus","idfs","perform","dialog","open","afterClosed","errorMsg","setTimeout","loadReturnAnnouncement","matomoService","trackEvent","sendProductsToMatomo","showReturnAnnouncement","chosenYearHandler","year","chosenMonthHandler","month","date","findIndex","v","C","path","component","pathMatch","canActivate","ne","g","provide","x","useClass","F","deps","useValue","dateInput","display","monthYearLabel","dateA11yLabel","monthYearA11yLabel","imports","l","O","Z","M","y","w","_","te","b","k"],"sources":["webpack:///src/app/core/models/retouren/retouren-product.model.ts","webpack:///src/app/modules/webshop/components/retouren/retouren-idf-selection-modal/retouren-idf-selection-modal.component.html","webpack:///src/app/modules/webshop/components/retouren/retouren-idf-selection-modal/retouren-idf-selection-modal.component.ts","webpack:///src/app/core/directives/trim.directive.ts","webpack:///src/app/modules/webshop/components/retouren/retouren-announcement/retouren-announcement.component.html","webpack:///src/app/modules/webshop/components/retouren/retouren-announcement/retouren-announcement.component.ts","webpack:///src/app/modules/webshop/components/retouren/retouren.component.html","webpack:///src/app/modules/webshop/components/retouren/retouren.component.ts","webpack:///src/app/modules/webshop/components/retouren/retouren.module.ts"],"sourcesContent":["export enum ReturnReason {\n BESTELLFEHLER = 'Bestellfehler',\n BERECHNET_NICHT_GELIEFERT = 'Berechnet nicht geliefert',\n BESCHAEDIGT = 'Beschädigt',\n VERFALL_ZU_KURZ = 'Verfall zu kurz',\n ZUVIEL_GELIEFERT = 'zu viel geliefert, nicht berechnet'\n}\n\nexport class RetourenProductModel {\n orderNumber: string;\n pzn: string;\n quantity: number;\n reason: ReturnReason;\n batch: string;\n expiration: Date;\n\n constructor(obj: any) {\n this.orderNumber = obj && obj.orderNumber;\n this.pzn = obj && obj.pzn;\n this.quantity = obj && obj.quantity;\n this.reason = obj && obj.reason;\n this.batch = obj && obj.batch;\n this.expiration = obj && obj.expiration;\n }\n}\n","
\n

Auswahl der Apotheke

\n
\n Bitte wählen Sie, für welche Apotheke Sie die Retoure ankündigen möchten:\n
\n
\n \n \n {{ idf.idf }} {{idf.name}}\n \n \n
\n
\n \n \n
\n
\n","import { Component, OnInit, Inject } from '@angular/core';\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\n\n@Component({\n selector: 'app-retouren-idf-selection-modal',\n templateUrl: './retouren-idf-selection-modal.component.html',\n styleUrls: ['./retouren-idf-selection-modal.component.scss']\n})\nexport class RetourenIdfSelectionModalComponent implements OnInit {\n public selectedIdf: string;\n constructor(@Inject(MAT_DIALOG_DATA) public data: any,\n private dialogRef: MatDialogRef) { }\n\n ngOnInit(): void {\n this.selectedIdf = this.data.currentlySelectedIdf;\n }\n\n onCancelClick(): void {\n this.dialogRef.close();\n }\n\n onClickReturn(): void {\n if (this.selectedIdf !== undefined) {\n this.dialogRef.close({data: this.selectedIdf});\n }\n }\n\n}\n","import { Directive, HostListener, Optional } from '@angular/core';\nimport { FormControlDirective, FormControlName } from '@angular/forms';\n\n@Directive({\n selector: '[appTrim]',\n})\nexport class TrimDirective {\n constructor(\n @Optional() private formControlDir: FormControlDirective,\n @Optional() private formControlName: FormControlName\n ) {}\n\n @HostListener('blur')\n onBlur(): void {\n const control =\n this.formControlDir?.control || this.formControlName?.control;\n if (!control) {\n return;\n }\n\n const value = control.value;\n if (value == null) {\n return;\n }\n\n const trimmed = value.trim();\n control.patchValue(trimmed);\n }\n}\n\n","
\n

Retourenankündigung

\n\n
\n
\n
\n

Ihre Retoure wurde erfolgreich angekündigt.

\n
\n
\n
\n
\n \n \n
\n
\n \n
Sie können nun die erforderlichen Dokumente herunterladen. Bitte drucken Sie diese aus und\n legen Sie sie mit den Artikeln in die Retourenwanne.\n
\n
\n
\n Datum\n
\n
\n Bezeichnung\n
\n
\n Download\n
\n
\n
\n
\n {{currentDate | date: 'dd.MM.yyyy'}}\n
\n
\n Retourenavis\n
\n
\n \n
\n
\n
\n\n
\n","import {Component, Input, OnDestroy, OnInit} from '@angular/core';\nimport {RetourenRestService} from '../../../../../core/services/api/retouren.rest-service';\nimport {Observable, Subject} from 'rxjs';\nimport {RetourenService} from '../../../../../core/services/retouren.service';\nimport {takeUntil} from 'rxjs/operators';\n\n@Component({\n selector: 'app-retouren-announcement',\n templateUrl: './retouren-announcement.component.html',\n styleUrls: ['./retouren-announcement.component.scss']\n})\nexport class RetourenAnnouncementComponent implements OnInit, OnDestroy {\n public currentDate = Date.now();\n @Input() isBtmOrCoolingArticleExist: boolean;\n @Input() isGreenArticleExist: boolean;\n @Input() idf: string;\n public returnAnnouncementResponse$: Observable;\n public ngUnsubscribe$ = new Subject();\n\n\n constructor(public retourenRestService: RetourenRestService,\n public retourenService: RetourenService) {\n\n this.returnAnnouncementResponse$ = this.retourenService.getReturnAnnouncementResponseObservable();\n }\n\n ngOnInit(): void {\n }\n\n download() {\n this.returnAnnouncementResponse$.pipe(takeUntil(this.ngUnsubscribe$)).subscribe((response) => {\n if (response && response.hasOwnProperty('msv3')) {\n var dcMap = response['msv3'];\n for (const dc of Object.keys(dcMap)){\n const data = {idf: this.idf,dc: dc, documentId: dcMap[dc].retourenAnteil[0].dokumentID};\n this.retourenRestService.getReturnDocument(data);\n }\n }\n });\n }\n\n /**\n * Unsubscribe from all subscriptions.\n */\n ngOnDestroy(): void {\n this.ngUnsubscribe$.next();\n this.ngUnsubscribe$.complete();\n }\n}\n","
\n
\n\n

Retouren

\n

Möchten Sie wissen, ob die Rücksendung von Artikeln von Ihrem PHOENIX Vertriebszentrum akzeptiert wird,\n können Sie hier eine unverbindliche Retourenanfrage stellen.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n
\n

Status

\n

Belegnummer

\n

PZN

\n

Menge

\n

Charge

\n

Verfall

\n

Retourengrund

\n
\n
\n
\n
\n
\n
\n
\n
\n
\n

Status

\n
\n
\n
\n
\n
\n
\n
\n
\n
\n

Belegnummer

\n
\n
\n \n \n {{getErrorMessage('orderNumber', i)}}\n \n
\n
\n
\n
\n
\n
\n

PZN

\n
\n
\n \n \n\n {{getErrorMessage('pzn', i)}}\n \n
\n
\n
\n
\n
\n
\n

Menge

\n
\n
\n \n \n {{getErrorMessage('quantity', i)}}\n \n
\n
\n
\n
\n
\n
\n

Charge

\n
\n
\n \n \n {{getErrorMessage('batch', i)}}\n \n
\n
\n
\n
\n
\n
\n

Verfall

\n
\n
\n \n \n \n \n \n {{getErrorMessage('expiration', i)}}\n \n
\n
\n
\n
\n
\n
\n

Retourengrund

\n
\n
\n \n \n \n {{reasonsArray[key]}}\n \n \n {{getErrorMessage('reason', i)}}\n \n
\n\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n \n Weitere Artikel hinzufügen\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n Ich bestätige, dass die oben aufgeführten und anliegend zurückgegebenen Waren verkehrsfähig gem. AMG\n bzw. Lebensmittelgesetz sind, vom Arzneimittelgroßhandel bezogen und seit der Lieferung\n ordnungsgemäß gelagert und gehandhabt wurden, insbesondere meinen Verantwortungsbereich nicht\n verlassen haben. Ausgenommen sind Artikel, welche den Retourengrund „beschädigt“ ausgewählt haben.\n \n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
Retoure akzeptiert
\n
\n
\n
\n
Retoure abgelehnt
\n
\n
\n
\n
Anfrage wird an Retourenabteilung übermittelt.
Sie werden gesondert kontaktiert.\n
\n
\n
\n
\n \n \n
\n","import {Component, OnDestroy, OnInit, ViewEncapsulation} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\nimport {UserService} from '../../../../core/services/user.service';\nimport {take, takeUntil} from 'rxjs/operators';\nimport {FormArray, FormControl, FormGroup, Validators} from '@angular/forms';\nimport {ReturnReason} from '../../../../core/models/retouren/retouren-product.model';\nimport {RetourenRequestModel} from '../../../../core/models/retouren/retouren-request.model';\nimport {RetourenService} from '../../../../core/services/retouren.service';\nimport {RetourenRestService} from '../../../../core/services/api/retouren.rest-service';\nimport {formatDate} from '@angular/common';\n// Depending on whether rollup is used, moment needs to be imported differently.\n// Since Moment.js doesn't have a default export, we normally need to import using the `* as`\n// syntax. However, rollup creates a synthetic default module and we thus need to import it using\n// the `default as` syntax.\nimport * as _moment from 'moment';\n// @ts-ignore\nimport {default as _rollupMoment, Moment} from 'moment';\nimport {MatomoService} from '../../../../core/services/matomo.service';\nimport {MatDatepickerInputEvent} from '@angular/material/datepicker';\nimport {MatDialog, MatDialogConfig} from '@angular/material/dialog';\nimport {\n RetourenIdfSelectionModalComponent\n} from './retouren-idf-selection-modal/retouren-idf-selection-modal.component';\nimport {InternalUserAuthority} from '../../../../core/models/enums/internal-user-authority.model';\n\nconst moment = _rollupMoment || _moment;\n\n@Component({\n selector: 'app-retouren',\n templateUrl: './retouren.component.html',\n styleUrls: ['./retouren.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class RetourenComponent implements OnInit, OnDestroy {\n public idfs$: Observable;\n public currentlyDisplayedIdf: string;\n public input = false;\n // public mainIdf: string;\n public reasonsArray = ReturnReason;\n public objectKeys = Object.keys;\n public ngUnsubscribe$ = new Subject();\n public activeRequestPZN: any;\n public activeRequestOrderNo: any;\n public returnRequestResponse$: Observable;\n public returnRequestLoading$: Observable;\n public returnRequestError$: Observable;\n\n public errorMsg = '';\n public returnAnnouncementLoading$: Observable;\n public returnAnnouncementError$: Observable;\n public isBtmOrCoolingArticleExist = false;\n public isGreenArticleExist = false;\n public showReturnAnnouncement = false;\n public isTermsChecked = false;\n public storageCheckError = '';\n public returnRequestStatusMsg = '';\n\n public returnAnnouncementForm: FormGroup;\n public idf: FormControl = new FormControl('', [Validators.required]);\n public products: FormArray = new FormArray([], [Validators.required]);\n protected readonly InternalUserAuthority = InternalUserAuthority;\n\n constructor(public userService: UserService,\n public retourenService: RetourenService,\n public matomoService: MatomoService,\n public retourenRestService: RetourenRestService,\n private dialog: MatDialog) {\n this.idfs$ = this.userService.selectContextualizedIdfsObservable('orders');\n this.input = this.userService.isPhoenixUser() || this.userService.isInternalUser();\n\n this.userService.selectedIdf$.subscribe(idf => {\n if (idf) {\n this.currentlyDisplayedIdf = idf.idf;\n // this.mainIdf = idf;\n }\n });\n\n this.returnAnnouncementForm = new FormGroup({\n idf: this.idf,\n products: this.products\n });\n this.addProductField(); // add default empty fields for add product\n this.returnRequestResponse$ = this.retourenService.getReturnRequestResponseObservable();\n this.returnRequestLoading$ = this.retourenService.getReturnRequestLoadingObservable();\n this.returnRequestError$ = this.retourenService.getReturnRequestErrorObservable();\n\n this.returnAnnouncementLoading$ = this.retourenService.getReturnAnnouncementLoadingObservable();\n this.returnAnnouncementError$ = this.retourenService.getReturnAnnouncementErrorObservable();\n }\n\n // onChangeIdf(idf) {\n // this.currentlyDisplayedIdf = idf;\n // this.returnAnnouncementForm.reset();\n // this.resetProductField();\n // }\n\n addProductField() {\n const group = new FormGroup({\n status: new FormControl('unknown'), // 'warning' | 'success' | 'alerts' | 'unknown'\n orderNumber: new FormControl('', [Validators.required, Validators.pattern('^[0-9]*$'), Validators.maxLength(6)]),\n pzn: new FormControl('', [Validators.required, Validators.pattern('^[0-9]*$'), Validators.maxLength(8), Validators.minLength(1)]),\n quantity: new FormControl('', [Validators.required, Validators.pattern('[1-9][0-9]*')]),\n reason: new FormControl('', [Validators.required]),\n batch: new FormControl(''),\n expiration: new FormControl('')\n });\n this.products.push(group);\n }\n\n resetStatusAndReasonSelection(index: any) {\n // we reset it everytime user make changes to any field\n // as we trigger return-request upon reason change dropdown\n // a user might change the field value after a return request\n // so to let the user know that you have made changes to the inputs\n // so user have to select the reason again.\n this.products.controls[index].get('reason').reset();\n this.products.controls[index].get('status').setValue('unknown');\n }\n\n datePickerEvent(index: any, event: MatDatepickerInputEvent) {\n if (!event.value) {\n this.products.controls[index].get('expiration').setValue('');\n }\n }\n\n checkStorageDetails(index: any) {\n // batch and expiration field will be required for btm or cooling article\n const value = this.products.controls[index].get('pzn').value;\n if (value) {\n this.retourenRestService.getStorageDetails(value).pipe(takeUntil(this.ngUnsubscribe$)).subscribe((result) => {\n const validators = [Validators.required];\n if (result && result.returnObject) {\n if (result.returnObject.btm || result.returnObject.coolingArticle) {\n this.products.controls[index].get('batch').addValidators(validators);\n this.products.controls[index].get('expiration').addValidators(validators);\n } else {\n this.products.controls[index].get('batch').removeValidators(validators);\n this.products.controls[index].get('expiration').removeValidators(validators);\n }\n this.products.controls[index].get('batch').updateValueAndValidity();\n this.products.controls[index].get('expiration').updateValueAndValidity();\n } else {\n this.products.controls[index].get('pzn').setErrors({incorrect: true});\n this.storageCheckError = 'PZN unbekannt.';\n }\n },\n () => {\n this.products.controls[index].get('pzn').setErrors({incorrect: true});\n this.storageCheckError = 'PZN unbekannt.';\n },\n );\n }\n }\n\n getErrorMessage(fieldName: string, index: any) {\n const value = this.products.value[index][fieldName];\n const numberRegex = new RegExp('^[0-9]*$');\n const positiveNumberRegex = new RegExp('[1-9][0-9]*');\n switch (fieldName) {\n case 'orderNumber':\n if (value === '') {\n return 'Pflichtangabe';\n }\n if (!numberRegex.test(value ? value.trim() : value)) {\n return 'Nummer eingeben';\n }\n if (value.length > 6) {\n return 'max. 6-stellige Nummer';\n }\n return '';\n case 'pzn':\n if (value === '') {\n return 'Pflichtangabe';\n }\n if (!numberRegex.test(value ? value.trim() : value)) {\n return 'Nummer eingeben';\n }\n if (value.length > 8) {\n return 'max. 8-stellige Nummer';\n }\n if (this.storageCheckError !== '') {\n return this.storageCheckError;\n }\n return '';\n case 'quantity':\n if (value === '') {\n return 'Pflichtangabe';\n }\n if (!numberRegex.test(value ? value.trim() : value)) {\n return 'Nummer eingeben';\n }\n if (!positiveNumberRegex.test(value ? value.trim() : value)) {\n return 'Menge darf nicht 0 sein';\n }\n return '';\n case 'batch':\n if (value === '') {\n return 'Pflichtangabe';\n }\n return '';\n case 'expiration':\n if (value === '') {\n return 'Pflichtangabe';\n }\n return '';\n case 'reason':\n if (value === '') {\n return 'Pflichtangabe';\n }\n return '';\n default:\n return '';\n }\n }\n\n removeProductField(index: number) {\n this.products.removeAt(index);\n }\n\n resetProductField() {\n const valueToKeep = this.products.at(0);\n this.products.clear();\n this.products.push(valueToKeep);\n }\n\n isSubmitBtnDisable() {\n const data = this.returnAnnouncementForm.value;\n data.products = data.products.filter((item) => item.status !== 'warning' && item.status !== 'unknown');\n return !(this.isTermsChecked && data.products.length > 0);\n }\n\n\n onReasonTypeChange(pzn: string, orderNumber: any) {\n const index = this.getIndex(pzn, orderNumber);\n this.products.controls[index].markAllAsTouched();\n this.returnAnnouncementForm.get('idf').setValue(this.currentlyDisplayedIdf);\n\n if (this.products.controls[index].valid) {\n this.returnRequestStatusMsg = '';\n this.activeRequestPZN = this.products.controls[index].get('pzn').value.trim();\n this.activeRequestOrderNo = this.products.controls[index].get('orderNumber').value.trim();\n const data: RetourenRequestModel = {\n idf: this.returnAnnouncementForm.get('idf').value.trim(),\n orderNumber: this.products.controls[index].get('orderNumber').value.trim(),\n pzn: this.products.controls[index].get('pzn').value.trim(),\n quantity: this.products.controls[index].get('quantity').value.trim(),\n reason: this.products.controls[index].get('reason').value.trim(),\n batch: this.products.controls[index].get('batch').value ?\n this.products.controls[index].get('batch').value.trim() :\n this.products.controls[index].get('batch').value,\n expiration: this.products.controls[index].get('expiration').value ?\n this.products.controls[index].get('expiration').value.format('YYYY-MM-DD') :\n this.products.controls[index].get('expiration').value\n };\n this.retourenService.loadReturnRequest(data);\n this.returnRequestResponse$.pipe(takeUntil(this.ngUnsubscribe$)).subscribe((result) => {\n // update status\n // ACCEPTED = green, DECLINED = RED, REQUIRES_FEEDBACK = ORANGE\n if (result && this.activeRequestPZN === pzn && this.activeRequestOrderNo === orderNumber) {\n if (result.btmOrCoolingArticle) {\n this.isBtmOrCoolingArticleExist = true; // btm article found\n }\n if (result.status === 'REQUIRES_FEEDBACK') {\n this.products.controls[index].get('status').setValue('alerts'); // ORANGE\n }\n if (result.status === 'ACCEPTED') {\n this.products.controls[index].get('status').setValue('success'); // GREEN\n this.isGreenArticleExist = true; // green article found\n }\n if (result.status === 'DECLINED') {\n this.products.controls[index].get('status').setValue('warning'); // RED\n }\n this.returnRequestStatusMsg = this.processReturnRequestStatusMsg(result.reason);\n }\n });\n }\n }\n\n processReturnRequestStatusMsg(reason: string) {\n switch (reason) {\n case 'UNKNOWN_DELIVERY_NOTE':\n return 'Die Belegnummer ist unbekannt. Bitte prüfen Sie Ihre Eingabe.';\n case 'PZN_NOT_IN_DELIVERY_NOTE':\n return 'Die PZN ist nicht im angegebenen Beleg enthalten. Bitte prüfen Sie Ihre Eingabe.';\n case 'AMOUNT_EXCEEDED':\n return 'Die Menge ist überschritten. Bitte prüfen Sie Ihre Eingabe.';\n default:\n return '';\n }\n }\n\n ngOnInit(): void {\n }\n\n onReturnAnnouncement() {\n // find all products that are not in unknown status\n const data = this.returnAnnouncementForm.value;\n data.products = data.products.filter((item) => item.status !== 'unknown');\n const returnProducts = JSON.parse(JSON.stringify(data.products));\n\n data.products.forEach((product) => {\n delete product.status;\n product.expiration = formatDate(product.expiration, 'yyyy-MM-dd', 'de_DE');\n });\n\n if (data.products.length > 0) {\n // show idf selection modal if more than one IDF is present\n this.idfs$.pipe(takeUntil(this.ngUnsubscribe$)).subscribe((idfs) => {\n if (idfs.length === 1) {\n this.processReturnAnnouncement(data, returnProducts);\n } else {\n const idfSelectDialogConfig = new MatDialogConfig();\n idfSelectDialogConfig.autoFocus = false;\n idfSelectDialogConfig.data = {idfs: idfs, currentlySelectedIdf: this.currentlyDisplayedIdf, perform: false};\n this.dialog.open(RetourenIdfSelectionModalComponent, idfSelectDialogConfig).afterClosed()\n .pipe(takeUntil(this.ngUnsubscribe$)).subscribe(result => {\n if (result && result.data) {\n data.idf = result.data;\n this.processReturnAnnouncement(data, returnProducts);\n }\n });\n }\n });\n } else {\n // showing error in case none of the products has return requested\n this.errorMsg = 'Products with return request not found. Please check the products with unknown status (Grey circle).';\n setTimeout(() => {\n this.errorMsg = '';\n }, 5000);\n }\n }\n\n processReturnAnnouncement(data, returnProducts) {\n this.retourenService.loadReturnAnnouncement(data);\n this.returnAnnouncementLoading$.pipe(takeUntil(this.ngUnsubscribe$)).subscribe((loading) => {\n if (!loading) {\n this.returnAnnouncementError$.pipe(takeUntil(this.ngUnsubscribe$)).subscribe((err) => {\n if (err !== null) {\n this.matomoService.trackEvent('Retouren', 'Retoure Ankündigen', 'Fehler');\n // show error message\n this.errorMsg = 'Return announcement failed.';\n setTimeout(() => {\n this.errorMsg = '';\n }, 5000);\n } else {\n this.matomoService.trackEvent('Retouren', 'Retoure Ankündigen', 'Erfolg');\n this.matomoService.trackEvent('Retouren', 'Retouren IDF', this.returnAnnouncementForm.get('idf').value.trim());\n this.sendProductsToMatomo(returnProducts);\n\n this.showReturnAnnouncement = true;\n this.returnAnnouncementForm.reset();\n this.resetProductField();\n }\n });\n }\n });\n }\n\n chosenYearHandler(normalizedYear: Moment, pzn: string, orderNumber: any) {\n const index = this.getIndex(pzn, orderNumber);\n const ctrlValue = this.products.controls[index].get('expiration').value ? this.products.controls[index].get('expiration').value : moment();\n ctrlValue.year(normalizedYear.year());\n this.products.controls[index].get('expiration').setValue(ctrlValue);\n }\n\n chosenMonthHandler(\n normalizedMonth: Moment,\n datepicker: any,\n pzn,\n orderNumber: any\n ) {\n const index = this.getIndex(pzn, orderNumber);\n const ctrlValue = this.products.controls[index].get('expiration').value ? this.products.controls[index].get('expiration').value : moment();\n ctrlValue.month(normalizedMonth.month());\n ctrlValue.date(normalizedMonth.date());\n this.products.controls[index].get('expiration').setValue(ctrlValue);\n datepicker.close();\n }\n\n getIndex(pzn: any, orderNumber: any) {\n return (this.returnAnnouncementForm.get('products')).controls.findIndex(x => x.value.pzn === pzn && x.value.orderNumber === orderNumber);\n }\n\n sendProductsToMatomo(products){\n products.forEach((product) =>{\n if(product.status === 'alerts'){\n this.matomoService.trackEvent('Retouren', 'Retouren Btm Kühl Artikel ', product.pzn);\n }else{\n this.matomoService.trackEvent('Retouren', 'Retouren Normal Artikel', product.pzn);\n }\n this.matomoService.trackEvent('Retouren', 'Retourengrund ' + product.reason);\n });\n }\n\n /**\n * Unsubscribe from all subscriptions.\n */\n ngOnDestroy(): void {\n this.ngUnsubscribe$.next();\n this.ngUnsubscribe$.complete();\n }\n\n}\n","import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {RouterModule} from '@angular/router';\nimport {RetourenComponent} from './retouren.component';\nimport {MatFormFieldModule} from '@angular/material/form-field';\nimport {MatSelectModule} from '@angular/material/select';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {MatInputModule} from '@angular/material/input';\nimport {MatCheckboxModule} from '@angular/material/checkbox';\nimport {MatDatepickerModule} from '@angular/material/datepicker';\nimport {NotificationModule} from '../../../shared/notification/notification.module';\nimport {RetourenAnnouncementComponent} from './retouren-announcement/retouren-announcement.component';\nimport {TrimDirective} from '../../../../core/directives/trim.directive';\nimport {\n DateAdapter,\n MAT_DATE_FORMATS,\n MAT_DATE_LOCALE,\n} from '@angular/material/core';\nimport {\n MomentDateAdapter,\n MAT_MOMENT_DATE_ADAPTER_OPTIONS,\n} from '@angular/material-moment-adapter';\nimport {RouteGuardService} from '../../../../core/services/routeGuards/route-guard.service';\nimport {\n RetourenIdfSelectionModalComponent\n} from './retouren-idf-selection-modal/retouren-idf-selection-modal.component';\nimport {MatRadioModule} from '@angular/material/radio';\nimport {MatDialogModule} from '@angular/material/dialog';\nimport {MatButtonModule} from '@angular/material/button';\n\nexport const routes = [\n {path: '', component: RetourenComponent, pathMatch: 'full', canActivate: [RouteGuardService]}\n];\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule.forChild(routes),\n MatFormFieldModule,\n MatSelectModule,\n FormsModule,\n ReactiveFormsModule,\n MatInputModule,\n MatCheckboxModule,\n MatDatepickerModule,\n NotificationModule,\n MatRadioModule,\n MatDialogModule,\n MatButtonModule\n ],\n declarations: [\n RetourenComponent,\n RetourenAnnouncementComponent,\n TrimDirective,\n RetourenIdfSelectionModalComponent\n ],\n entryComponents: [],\n providers: [\n // `MomentDateAdapter` can be automatically provided by importing `MomentDateModule` in your\n // application's root module. We provide it at the component level here, due to limitations of\n // our example generation script.\n {\n provide: DateAdapter,\n useClass: MomentDateAdapter,\n deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS],\n },\n\n {\n provide: MAT_DATE_FORMATS, useValue: {\n parse: {\n dateInput: 'MM/YYYY',\n },\n display: {\n dateInput: 'MM/YYYY',\n monthYearLabel: 'MMM YYYY',\n dateA11yLabel: 'LL',\n monthYearA11yLabel: 'MMMM YYYY',\n },\n }\n },\n ]\n})\nexport class RetourenModule {\n static routes = routes;\n}\n"]}