Compare commits

...

329 Commits

Author SHA1 Message Date
Lorenz Hilpert
e3bd33ffc3 Scanner Styling and Login Dialog 2022-12-27 18:52:08 +01:00
Lorenz Hilpert
38c2fd07ae Ipad fix test 2022-12-20 17:05:55 +01:00
Lorenz Hilpert
77ebafd018 Added WWS API - Generated with ng-swagger-gen 2022-12-20 13:13:56 +01:00
Nino Righi
dfab7e3540 Merged PR 1457: #3524 #3599 #3598 Responsive Design History
#3524 #3599 #3598 Responsive Design History
2022-12-19 17:07:43 +00:00
Lorenz Hilpert
e4410fe2c7 Added Scandit Scanner to Application 2022-12-19 14:52:17 +01:00
Lorenz Hilpert
1dbd3fd274 Merged PR 1456: Breite für Desktop angepasst
Related work items: #3700
2022-12-16 11:08:08 +00:00
Michael Auer
abdbab807d Merge branch 'feature/docker-multi-label' into develop 2022-12-15 16:46:00 +01:00
Michael Auer
718077025d ~ helmvalues: removed debug-/prod- prefix from docker image tag 2022-12-15 16:45:59 +01:00
Michael Auer
08161c29d3 ~ back to one tag, added extra label BuildType=(Debug/Production) 2022-12-15 16:45:59 +01:00
Michael Auer
942f84dfcf ! removed single quoutes from docker tags 2022-12-15 16:45:59 +01:00
Michael Auer
41defdc291 ~ added second label (Debug/Production) to docker image 2022-12-15 16:45:59 +01:00
Lorenz Hilpert
045b8e162a Merged PR 1452: Update to Angular 15 2022-11-28 15:13:44 +00:00
Michael Auer
e3d7813edb Merge tag '2.1' into develop 2022-11-21 11:35:18 +01:00
Michael Auer
189dc64a0f Merge branch 'release/2.1' 2022-11-21 11:35:17 +01:00
Lorenz Hilpert
2f0ede7170 Merge branch 'develop' into release/2.1 2022-11-11 14:49:43 +01:00
Lorenz Hilpert
c7e444d446 #3617 CompartmentLabel für Kunden zwischenhspeichern 2022-11-11 10:56:18 +01:00
Lorenz Hilpert
f5ac916663 #3617 QR-Code Reservierungen 2022-11-10 15:02:27 +01:00
Lorenz Hilpert
b3b9f0223e #3629 - Scpeichern doppelclick abfangen 2022-11-10 14:08:50 +01:00
Lorenz Hilpert
70455df6d3 Merge branch 'develop' into release/2.1 2022-11-08 17:19:29 +01:00
Andreas Schickinger
b89889a3e9 Merged PR 1440: #3602 TK Kalenderansicht lädt nur noch die angezeigten Tage
#3602 TK Kalenderansicht lädt nur noch die angezeigten Tage

Related work items: #3602
2022-11-08 15:50:29 +00:00
Lorenz Hilpert
7ec00925ed Merged PR 1441: #3626 Fehlerbehebung bei der Dummy Anlage Änderung
#3626 Fehlerbehebung bei der Dummy Anlage Änderung
2022-11-08 15:40:07 +00:00
Andreas Schickinger
d3e3d127b3 Merged PR 1439: #3602 TK Performance
- Kein Reload mehr bei Wechsel zwischen Trefferliste/Kalenderansicht
- Suche startet ca. 150ms früher bei Page Load
- In der Wochenansicht wird nur noch die aktuelle Woche und 7 Tage in die Vergangenheit geladen (zuvor: aktuelle Woche + 7 Tage Vergangenheit/ 7 Tage Zukunft)
- In der Monatsansicht werden nur noch die Tage des Monats geladen (zuvor: aktueller Monat + 7 Tage Vergangenheit/ 7 Tage Zukunft
- Bugfix: doppelte Suche wurde ausgelöst, wenn man sucht -> zurück zur Übersicht klickt -> nochmal das gleiche sucht

Related work items: #3602
2022-11-08 09:13:21 +00:00
Nino Righi
11c4d8fb72 Merged PR 1438: #3608 Fix typo
#3608 Fix typo
2022-11-07 16:23:23 +00:00
Andreas Schickinger
9b02a19b9c Merged PR 1437: #3609 Remission Schriftfarbe bei Auswahl weiß
#3609 Remission Schriftfarbe bei Auswahl weiß

Related work items: #3609
2022-11-07 15:44:11 +00:00
Michael Auer
57262919b8 Merge tag '2.1.10' into develop 2022-11-07 15:07:34 +01:00
Michael Auer
f787a15347 Merge branch 'release/2.1' 2022-11-07 15:06:31 +01:00
Michael Auer
bc74eac86d Merge tag '2.1.2' into develop 2022-11-07 14:58:16 +01:00
Michael Auer
0a1df250cb Merge commit '9e58e8aad9ae6a6928235dca55b30a0925c668f6' 2022-11-07 14:55:46 +01:00
Lorenz Hilpert
8a7b9de29d Merged PR 1436: #3615 Übernahme der Suchfeld eingabe in die Kundenanlage
#3615 Übernahme der Suchfeld eingabe in die Kundenanlage
2022-11-07 13:31:14 +00:00
Nino Righi
8efb87a1f7 Merged PR 1434: #3610 Fix Added Async Validator Function to p4m number form block
#3610 Fix Added Async Validator Function to p4m number form block
2022-11-03 18:21:07 +00:00
Andreas Schickinger
27ee667bfb Merged PR 1435: #3604 Kubi Checkmarks bei Kundentypanlage angepasst
#3604 Kubi Checkmarks bei Kundentypanlage angepasst

Related work items: #3604
2022-11-03 14:34:30 +00:00
Lorenz Hilpert
c64ff772e7 Merged PR 1433: Kundenanlage: Scanbutton für das scannen der Kundenkarte
Kundenanlage: Scanbutton für das scannen der Kundenkarte
2022-11-03 14:13:58 +00:00
Lorenz Hilpert
313efebb8b #3611 Dialog Anpassung handleAction 2022-11-02 16:47:58 +01:00
Lorenz Hilpert
9eee4fff6c Merged PR 1432: #3613 Wannennummer Scannen - Dialog erweitert
#3613 Wannennummer Scannen - Dialog erweitert
2022-11-02 15:15:48 +00:00
Lorenz Hilpert
b5a7c96181 Merge branch 'develop' into release/2.1 2022-11-02 15:00:54 +01:00
Lorenz Hilpert
5bea71e19e Merged PR 1431: #3611 Dummy Command angelegt
#3611 Dummy Command angelegt
2022-11-02 13:55:01 +00:00
Lorenz Hilpert
751e533dce Merge branch 'release/2.1' into develop 2022-10-28 11:20:42 +02:00
Lorenz Hilpert
9e58e8aad9 Merge branch 'develop' into release/2.1 2022-10-26 18:52:17 +02:00
Lorenz Hilpert
d62a7d704a #3587 Fix rueckgaenging gemacht, da fix im BE 2022-10-26 18:21:16 +02:00
Andreas Schickinger
f8d7d12d61 Merged PR 1430: #3586 WK Hindernis Popup Text angepasst
#3586 WK Hindernis Popup Text angepasst

Related work items: #3586
2022-10-26 16:07:07 +00:00
Lorenz Hilpert
2ad71cad78 #3587 Filter wurde nicht richtig übernommen 2022-10-26 18:04:38 +02:00
Andreas Schickinger
689d8ead24 Merged PR 1427: #3592 TK Tasks Wochenansicht reload wenn sich das DisplayedDate ändert
#3592 TK Tasks Wochenansicht reload wenn sich das DisplayedDate ändert

Related work items: #3592
2022-10-26 14:33:52 +00:00
Andreas Schickinger
b6a7df76f6 Merged PR 1428: #3593 TK Footer Menü Klick setzt den Filter zurück
#3593 TK Footer Menü Klick setzt den Filter zurück

Related work items: #3593
2022-10-26 14:30:27 +00:00
Andreas Schickinger
41e8145858 Merged PR 1429: #3594 TK Zurück zur Übersicht Button
#3594 TK Zurück zur Übersicht Button

Related work items: #3594
2022-10-26 14:29:27 +00:00
Lorenz Hilpert
3a5b80657c Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2022-10-26 15:06:23 +02:00
Lorenz Hilpert
41c6897224 uiDateInput - datum mit momentjs parsen 2022-10-26 15:06:16 +02:00
Lorenz Hilpert
8d644cdd65 Merged PR 1426: 3581 Handlungsanweisung
Related work items: #3581
2022-10-25 12:34:39 +00:00
Lorenz Hilpert
7a68229432 Merged PR 1424: #3580 Text in der Kundensuche angepasst
#3580 Text in der Kundensuche angepasst
2022-10-25 11:57:35 +00:00
Lorenz Hilpert
4dab0ef6f6 Merged PR 1425: #3581 Textanpassung für Kundenanlage
#3581 Textanpassung für Kundenanlage
2022-10-25 11:50:22 +00:00
Andreas Schickinger
75cad811bc Merged PR 1423: #3419 TK Suche / Wochenansicht Heute
#3419 TK Suche / Wochenansicht Heute

Related work items: #3419
2022-10-25 08:43:59 +00:00
Lorenz Hilpert
0709f1dd6a Merged PR 1422: #3576 Dialog angepasst und Weiterleitung auf Kundendetails
#3576 Dialog angepasst und Weiterleitung auf Kundendetails

Related work items: #3576
2022-10-24 16:06:00 +00:00
Lorenz Hilpert
478950c446 Merged PR 1421: #3577 Fallback walls Preis undefined ist
#3577 Fallback walls Preis undefined ist
2022-10-24 15:10:13 +00:00
Andreas Schickinger
b5e5601671 Merged PR 1420: #3420 TK Routing
#3420 TK Routing

Related work items: #3420
2022-10-24 14:50:15 +00:00
Lorenz Hilpert
0ee86faa00 Merged PR 1418: Suchbutton werden nicht immer angezeigt
Related work items: #3546
2022-10-24 14:10:30 +00:00
Andreas Schickinger
fa7b204f89 Merged PR 1419: #3547 TK iPad Drucken Button
#3547 TK iPad Drucken Button

Related work items: #3547
2022-10-24 14:06:55 +00:00
Lorenz Hilpert
22f9ba80fe removed unused icons 2022-10-21 16:15:11 +02:00
Michael Auer
065878a6e9 ~ Version Bump: 2.1 2022-10-21 15:35:52 +02:00
Lorenz Hilpert
5df433d603 #3559 PDP falsche Farbe von Reiter-Hintergrund 2022-10-21 14:41:14 +02:00
Lorenz Hilpert
21375855dd #3556 HFI Gutschein Kaufoption im Nachhinein ändern 2022-10-21 14:36:48 +02:00
Lorenz Hilpert
b847ca6b3e #3554 AGB ist Akzeptiert wenn Dialog mit Ja beantwortet wird 2022-10-21 14:26:53 +02:00
Andreas Schickinger
50caf9811d Merged PR 1416: #3520 HFI Geschenkkarte Mengenänderung übergibt Preis
#3520 HFI Geschenkkarte Mengenänderung übergibt Preis

Related work items: #3520
2022-10-21 10:58:21 +00:00
Andreas Schickinger
f0df9e1157 Merged PR 1417: #3571 TK Kalender Klicks navigieren wieder zur Liste
#3571 TK Kalender Klicks navigieren wieder zur Liste

Related work items: #3571
2022-10-21 10:57:53 +00:00
Lorenz Hilpert
3e1347f17e #3573 Breadcrumb Fix 2022-10-20 16:06:10 +02:00
Lorenz Hilpert
86082bbfda #3572 Chckbox Plazierung 2022-10-20 15:21:10 +02:00
Lorenz Hilpert
6e6551ceae #3567 B2B Meldenummer auf der Artikeldetailseite 2022-10-20 14:13:11 +02:00
Lorenz Hilpert
08ef5f0853 #3568 Typo Rechnungsadresse 2022-10-20 13:53:48 +02:00
Lorenz Hilpert
92131453e8 #3422 Focus Searchbar nach Seitenwechsel TK 2022-10-20 13:33:44 +02:00
Lorenz Hilpert
888a95d2a0 #3233 CRM API Anpassung für Kundenkartencheck 2022-10-20 13:12:52 +02:00
Lorenz Hilpert
ab745cba18 #2748 Icons Kundentrefferliste und Details 2022-10-20 11:44:12 +02:00
Lorenz Hilpert
dfe6b3977f #3554 Dialog angepasst 2022-10-19 16:51:06 +02:00
Lorenz Hilpert
e7e8b71a70 Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2022-10-19 13:45:12 +02:00
Lorenz Hilpert
c158e16bd3 #3553 Plattierung AGB akzeptieren 2022-10-19 13:45:04 +02:00
Andreas Schickinger
464fac660b Merged PR 1415: #3543 TK iPad Scrolling
#3543 TK iPad Scrolling

Related work items: #3543
2022-10-19 11:21:18 +00:00
Lorenz Hilpert
79b1920b15 #3542 WA Keine Suchanfrage wenn Daten bereits vorhanden sind 2022-10-18 11:33:52 +02:00
Andreas Schickinger
f071e7b2d5 Merged PR 1411: #3527 Kundenkarten Validator
#3527 Kundenkarten Validator

Related work items: #3527
2022-10-17 15:30:52 +00:00
Andreas Schickinger
3afb8d6ed1 Merged PR 1412: #3422 TK Suchfeld Autofocus directive und Laufende Aufgaben auch ausblenden,...
#3422 TK Suchfeld Autofocus directive und Laufende Aufgaben auch ausblenden, wenn keine vorhanden

Related work items: #3422
2022-10-17 15:03:52 +00:00
Andreas Schickinger
87a2e94dd6 Merged PR 1406: #3496 HFI Geschenkkarte max Preis fix
#3496 HFI Geschenkkarte max Preis fix

Related work items: #3496
2022-10-17 14:01:42 +00:00
Andreas Schickinger
d711d4a816 Merged PR 1409: #3419 TK Überfällige Aufgaben nur anzeigen, wenn vorhanden
#3419 TK Überfällige Aufgaben nur anzeigen, wenn vorhanden

Related work items: #3419
2022-10-17 13:55:47 +00:00
Lorenz Hilpert
a4b4aeed64 #3471 Email entfernen bei klick auf nein 2022-10-17 15:51:08 +02:00
Lorenz Hilpert
3707572bd8 Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2022-10-17 15:48:37 +02:00
Lorenz Hilpert
aef5c06f0a #3531 CSS Kundenanlage Speichern Button Position 2022-10-17 15:48:26 +02:00
Lorenz Hilpert
a021ac0da3 Merged PR 1410: #3503 IPad Sortierung im TK falsh
#3503 IPad Sortierung im TK falsh
2022-10-17 13:40:33 +00:00
Lorenz Hilpert
1e4e6da44e Merged PR 1408: #3545 Fix Icon Positions IPad mini 2
#3545 Fix Icon Positions IPad mini 2
2022-10-17 12:46:45 +00:00
Andreas Schickinger
6b0d9774c5 Merged PR 1407: #3423 TK Kalendar klicks navigieren nicht mehr zur Listenansicht
#3423 TK Kalendar klicks navigieren nicht mehr zur Listenansicht

Related work items: #3423
2022-10-17 11:55:20 +00:00
Lorenz Hilpert
e1720e6023 Merged PR 1405: icon scss 2022-10-14 14:24:12 +00:00
Lorenz Hilpert
3078724ced #3540 Text Änderung Interessen 2022-10-14 15:20:51 +02:00
Lorenz Hilpert
f3eb0a67f6 #3539 Typo Interessen 2022-10-14 15:19:53 +02:00
Lorenz Hilpert
65d7a6f5a4 Merged PR 1404: #3471 Zusätzliche addressen werden nun gespeichert
#3471 Zusätzliche addressen werden nun gespeichert

Related work items: #3471
2022-10-14 11:36:44 +00:00
Lorenz Hilpert
b2b5456400 Merged PR 1403: #3518 Checkbox ist nicht abwählbar bei einer checkbox
#3518 Checkbox ist nicht abwählbar bei einer checkbox
2022-10-14 10:08:29 +00:00
Lorenz Hilpert
a598be069d Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2022-10-14 10:55:59 +02:00
Andreas Schickinger
bf61f2c982 Merged PR 1402: #3507 Listenbestellung getPickUpAvailability hack
#3507 Listenbestellung getPickUpAvailability hack

Related work items: #3507
2022-10-14 08:49:41 +00:00
Lorenz Hilpert
63225491f1 FIX CUSTOMER CREATE NAVIGATION 2022-10-13 18:37:18 +02:00
Andreas Schickinger
0dbc773775 Merged PR 1400: #3496 HFI Geschenkkarte max Preis
#3496 HFI Geschenkkarte max Preis

Related work items: #3496
2022-10-13 13:10:34 +00:00
Lorenz Hilpert
47b7d42dd3 Merged PR 1399: #3227 Anpassung der Handlungsanweisung
#3227 Anpassung der Handlungsanweisung
2022-10-13 13:06:36 +00:00
Lorenz Hilpert
d713c787e6 Merged PR 1398: #3515 Added Newsletter Text to webshop and fix navigation
#3515 Added Newsletter Text to webshop and fix navigation
2022-10-13 13:05:56 +00:00
Lorenz Hilpert
68a2eab425 Merged PR 1396: #3502 Guard bei navigation auf P4M Anlage angepasst
#3502 Guard bei navigation auf P4M Anlage angepasst
2022-10-12 15:02:17 +00:00
Andreas Schickinger
886f063d1b Fix für Anzeigefehler im SectionToggle 2022-10-12 16:40:29 +02:00
Andreas Schickinger
ed6ee36509 Merged PR 1395: #3481 Remission Filter zwischenspeichern bei Wechsel zwischen Pflicht- und Ab...
#3481 Remission Filter zwischenspeichern bei Wechsel zwischen Pflicht- und Abteilungsremission

Related work items: #3481
2022-10-12 13:57:28 +00:00
Andreas Schickinger
ab345dae0d Merged PR 1393: #3514 TK Fehlermeldung fix
#3514 TK Fehlermeldung fix

Related work items: #3514
2022-10-12 13:39:29 +00:00
Lorenz Hilpert
fbb1e6c4a2 Merged PR 1394: #3511 Addressvalidierung für Onlinekonto aktiviert
#3511 Addressvalidierung für Onlinekonto aktiviert
2022-10-12 10:38:35 +00:00
Lorenz Hilpert
4ede9226b4 Merged PR 1392: #3484 Keep Userstates on Tab Changes
#3484 Keep Userstates on Tab Changes
2022-10-11 15:05:04 +00:00
Andreas Schickinger
fbfecbd8ae Merged PR 1391: TK Suche Timespan Fallback angepasst
TK Suche Timespan von 6 Monate Vergangenheit/Zukunft auf 6 Wochen Vergangenheit, 2 Wochen Zukunft geändert. Wird verwendet, wenn kein Timespan Filter gesetzt ist

Related work items: #3422
2022-10-11 14:32:30 +00:00
Lorenz Hilpert
3c4612d15c Merged PR 1389: #3307 Filter Wird Nicht Gerendert
#3307 Filter Wird Nicht Gerendert
2022-10-11 13:33:10 +00:00
Andreas Schickinger
7fa2e7862d Merged PR 1388: #3508 Bestellbestätigung "zur Warenausgabe": Prüfung auf enabled bei CustomerFeature B2B entfernt
#3508 Prüfung auf enabled bei CustomerFeature B2B entfernt

Related work items: #3508
2022-10-11 12:16:07 +00:00
Andreas Schickinger
114267362c Merged PR 1384: #3503 TK Sortierung umgedreht, #3504 Scroll Fix
#3503 TK Sortierung umgedreht, #3504 Scroll Fix

Related work items: #3503, #3504
2022-10-11 11:06:01 +00:00
Lorenz Hilpert
4050e9605d FIX Routing Kundenalage 2022-10-11 10:41:25 +02:00
Andreas Schickinger
fdd5373aaf Merged PR 1385: #3493 TK Modal Header Abstand erhöht
#3493 TK Modal Header Abstand erhöht

Related work items: #3493
2022-10-10 15:59:04 +00:00
Andreas Schickinger
2dfe7ec05b Merged PR 1386: #3492 TK Drucken in der Trefferliste fix
#3492 TK Drucken in der Trefferliste fix

Related work items: #3492
2022-10-10 15:58:42 +00:00
Lorenz Hilpert
82513b5dde Merged PR 1387: Kubi Kundenanlage und Kundenkarte
Related work items: #3230, #3233
2022-10-10 15:57:50 +00:00
Lorenz Hilpert
14d1bb6ac8 Merged PR 1383: HFI Geschnakkarte
Related work items: #3496
2022-10-07 14:20:05 +00:00
Lorenz Hilpert
d589c94681 Fix Kundendatenerfassen - added modifier add-loyality-card 2022-10-06 12:42:45 +02:00
Lorenz Hilpert
eca19bb507 Updateing Customer for P4M 2022-10-06 10:47:10 +02:00
Lorenz Hilpert
282ff30b3e #3494 Upgrade Ava API auf v6 2022-10-05 13:58:02 +02:00
Lorenz Hilpert
5d0b810674 Upgrade catsearch API auf V6 2022-10-05 13:54:12 +02:00
Lorenz Hilpert
e32482c634 Type Kundendaten erfassen speichern aufruf 2022-10-05 13:25:43 +02:00
Lorenz Hilpert
650026b0c0 Es existiert bereits ein Onlinekonto 2022-10-04 17:48:15 +02:00
Lorenz Hilpert
cd25d6da38 #3489 fonts 2022-10-04 12:10:17 +02:00
Andreas Schickinger
9dd0954967 Merged PR 1381: #3326 Tätigkeitskalender Suchfunktion und neues Design
Tätigkeitskalender Suchfunktion und neues Design

Zusätzliche Änderungen im PR:
- Anpassungen für GitHub package Zugriff
- UiModalRef um ein afterChanged$ erweitert, um nach dem schließen zu erkennen ob ein reload notwendig ist
- ui-loader funktionierte nicht bei verwendung von ui-scroll-container mit useLoadAnimation false
- ui-skeleton-loader um Template für TK Listenitem erweitert

Related work items: #3419, #3420, #3421, #3422, #3423
2022-10-04 09:42:49 +00:00
Lorenz Hilpert
fdaceb9bf8 Merged PR 1382: Kubi
Related work items: #3228, #3230, #3289, #3467, #3471, #3478
2022-09-30 13:48:19 +00:00
Lorenz Hilpert
4ab3a3b3cf #3307 Fixed With Filter 2022-09-30 11:19:17 +02:00
Lorenz Hilpert
eb8b54dc63 Fix Unit Test 2022-09-29 18:05:43 +02:00
Lorenz Hilpert
4703aee60c Interveptor Unit Test Fix 2022-09-29 16:26:43 +02:00
Lorenz Hilpert
93b0d43bd7 #3307 Anzeige des backdrops bei Filtern 2022-09-29 14:20:41 +02:00
Lorenz Hilpert
1029310e0d #3483 Neuanmeldung bei 401 Antworten 2022-09-29 14:11:59 +02:00
Michael Auer
c083684db2 Merge tag '3452-Autocomplete-Abbrechen-Bei-Suche' into develop 2022-09-28 22:19:03 +02:00
Michael Auer
d6775aad69 Merge branch 'hotfix/3452-Autocomplete-Abbrechen-Bei-Suche' 2022-09-28 22:19:02 +02:00
Lorenz Hilpert
3eff10bbb4 Merged PR 1380: Upgrade der API auf V6
Upgrade der API auf V6

Related work items: #3466
2022-09-20 16:14:50 +00:00
Lorenz Hilpert
e4cbab8365 Merged PR 1379: #3428 Aktivierung der Buttons ohne Raio button aktivieren wenn nur ein artikel
#3428 Aktivierung der Buttons ohne Raio button aktivieren wenn nur ein artikel
2022-09-15 16:05:12 +00:00
Lorenz Hilpert
18212e7a4c Merged PR 1378: Update CRM API V6
Update CRM API V6
2022-09-14 15:13:14 +00:00
Lorenz Hilpert
0cd0b1abfd Merged PR 1377: Update CRM API
Related work items: #3464
2022-09-14 13:48:25 +00:00
Lorenz Hilpert
a66137873c Merged PR 1376: #3448 Anzeige Sonderinfo
#3448 Anzeige Sonderinfo
2022-09-14 08:26:29 +00:00
Andreas Schickinger
469110eabf Merged PR 1375: #3455 AHF Frist immer für gesamten Warenkorb festlegen
#3455 AHF Frist immer für gesamten Warenkorb festlegen

Related work items: #3455
2022-09-13 13:08:59 +00:00
Lorenz Hilpert
55474fa4e3 Merged PR 1374: #3451 nach löschen des Browser-Verlauf kommt Fehler
#3451 nach löschen des Browser-Verlauf kommt Fehler
2022-09-13 12:56:17 +00:00
Lorenz Hilpert
3bdcdee031 #3452 Autocomplete wird nicht abgebrochen, wenn Suche ausgelöst wurde 2022-09-12 14:34:24 +02:00
Lorenz Hilpert
246c5a61dd Merged PR 1373: #3428 bei Teilabholung ohne ausgewählten Radio-Button wirf Fehler
#3428 bei Teilabholung ohne ausgewählten Radio-Button wirf Fehler
2022-09-08 13:20:45 +00:00
Andreas Schickinger
0c8bfba515 Merged PR 1372: #3340 Quantity Dropdown um Suffix erweitert
#3340 Quantity Dropdown um Suffix erweitert

Related work items: #3340
2022-09-01 08:23:20 +00:00
Michael Auer
3c8d9bb1e5 Merge tag '2.0' into develop 2022-08-24 10:33:19 +02:00
Michael Auer
da2c1c8316 Merge branch 'release/2.0' 2022-08-24 10:33:18 +02:00
Lorenz Hilpert
0334b2dd33 Merge branch 'release/2.0' into develop 2022-08-23 14:24:21 +02:00
Lorenz Hilpert
96356042af Remission - Anpassung HTML fuer E2E Tests 2022-08-23 14:02:50 +02:00
Lorenz Hilpert
21adff8d0c #3140 Button "Nicht-Clickbar"-Icon nur wenn disabled 2022-08-22 16:11:51 +02:00
Lorenz Hilpert
35def2a7c7 #3405 Kalender -Speichern-Button verschwindet 2022-08-19 17:07:30 +02:00
Lorenz Hilpert
e3d82794a3 Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2022-08-19 15:55:10 +02:00
Lorenz Hilpert
20cbac8f17 #3140 Ausgrauen des Auswaehlen Buttons fur
Zuruecklegen bis
2022-08-19 15:55:01 +02:00
Lorenz Hilpert
6067e02729 #3400 Uebergabe 0 Eur wenn kein Preis existiert 2022-08-18 16:57:06 +02:00
Lorenz Hilpert
eb77664ea1 #3387 - Auswertung der Kapazitaeten angepasst 2022-08-18 15:38:24 +02:00
Michael Auer
8b1baf9ebd Merge tag '2.0.531' into develop 2022-08-18 13:47:13 +02:00
Michael Auer
12fb774b73 Merge branch 'release/2.0' 2022-08-18 13:44:03 +02:00
Lorenz Hilpert
d79dbb11fe #2162 - Warnung eingebaut und Anzeigefehler behoben 2022-08-17 17:08:09 +02:00
Lorenz Hilpert
19ccb29248 #2162 - WA - Auf der Details Seite werden nur items mit dem gleichen Kunden angezeigt. 2022-08-16 15:29:33 +02:00
Lorenz Hilpert
199c4f30e7 #3139 Loder angepasst 2022-08-11 17:23:20 +02:00
Lorenz Hilpert
732c0d4e35 #3139 Load Spinner für Abholfrist 2022-08-10 16:50:29 +02:00
Lorenz Hilpert
fa1769da9f 2022-08-08 12:10:19 +02:00
Lorenz Hilpert
029997d624 #3338 - Uebergabe Filter angepasst 2022-08-08 11:56:46 +02:00
Andreas Schickinger
d2546409cb Merged PR 1370: #3139 Abholfachfrist: Für alle festlegen Button in Bestellbestätigung
#3139 Abholfachfrist: Für alle festlegen Button in Bestellbestätigung

Related work items: #3139
2022-08-08 08:46:00 +00:00
Andreas Schickinger
cb2bc8d65b Merged PR 1369: #3332 AHFFrist DisplayOrderItemSubsetDTO verwendet
#3332 AHFFrist DisplayOrderItemSubsetDTO verwendet

Related work items: #3332
2022-08-04 13:38:39 +00:00
Andreas Schickinger
57bd8d4dd4 Merged PR 1368: #3337 Hotfix E-Mail Adresse wird nur noch angehakt, wenn auch eine hinterlegt ist
#3337 E-Mail Adresse wird nur noch angehakt, wenn auch eine hinterlegt ist

Related work items: #3337
2022-08-04 09:45:59 +00:00
Andreas Schickinger
cc1e210799 Merged PR 1367: #3139, #3140, #3328 AHFFrist auf Bestellbestätigung- und Bestellpostenseite
Related work items: #3139, #3140, #3328
2022-08-03 13:51:25 +00:00
Lorenz Hilpert
4bee08d483 Merged PR 1366: Merge release => develop
Related work items: #3180, #3203, #3245, #3293, #3299, #3312, #3320, #3322
2022-08-02 12:30:08 +00:00
Lorenz Hilpert
8cfb160989 Merged PR 1365: #3322 Leseproben - Link geht über Rand
#3322 Leseproben - Link geht über Rand

Related work items: #3322
2022-08-01 13:06:19 +00:00
Lorenz Hilpert
6325167eda Merged PR 1364: changed query from qss to customer_name
changed query from qss to customer_name

Related work items: #3320
2022-08-01 12:10:58 +00:00
Lorenz Hilpert
8925eae4c5 Merged PR 1362: Merge develop => release/2.0
Related work items: #3180, #3203, #3245, #3293, #3299, #3312
2022-07-29 11:58:46 +00:00
Andreas Schickinger
9282bcd779 Merged PR 1361: #3312 NotificationChannel Auswertung angepasst
#3312 NotificationChannel Auswertung angepasst

Related work items: #3312
2022-07-29 11:55:29 +00:00
Lorenz Hilpert
5aa6499598 #3313 Nachbestellen auf der Wareneingangsliste wirft Fehler 2022-07-29 11:47:03 +02:00
Andreas Schickinger
f766781928 Merged PR 1360: Merge release 2.0 -> develop
Related work items: #3180, #3203, #3245, #3293, #3299
2022-07-28 14:05:13 +00:00
Andreas Schickinger
02834b7102 Merged PR 1359: Merge develop -> release 2.0
Merge develop -> release 2.0

Related work items: #3180, #3203, #3245, #3299
2022-07-28 13:48:10 +00:00
Andreas Schickinger
a9e3430505 Merged PR 1358: #3180 getTakeAwayAvailability angepasst
#3180 getTakeAwayAvailability angepasst

Related work items: #3180
2022-07-28 13:30:06 +00:00
Nino Righi
4b9a23001a Merged PR 1357: #3267 Email Validator Regex updated, Notification Channel Control Logic modified
#3267 Email Validator Regex updated, Notification Channel Control Logic modified
2022-07-28 13:25:55 +00:00
Nino Righi
8de7ec9124 Merged PR 1356: #3267 Bugfix If Both Communication Details are Valid update Customer correctly
#3267 Bugfix If Both Communication Details are Valid update Customer correctly
2022-07-27 16:30:18 +00:00
Andreas Schickinger
19a0a3c7c3 Merged PR 1355: #3180 Lupe wird erst angezeigt, wenn das Bild erfolgreich geladen wurde
#3180 Lupe wird erst angezeigt, wenn das Bild erfolgreich geladen wurde

Related work items: #3180
2022-07-27 16:21:55 +00:00
Nino Righi
42a7d6e4b7 Merged PR 1352: #3267 Checkout Cart Fix Notification Channel disable Order CTA if communication details missing
#3267 Checkout Cart Fix Notification Channel disable Order CTA if communication details missing
2022-07-27 15:21:52 +00:00
Nino Righi
66818b1647 Merged PR 1354: #3304 Customer Search Message Fix
#3304 Customer Search Message Fix
2022-07-27 14:06:07 +00:00
Andreas Schickinger
bc8ba9adc8 Merged PR 1353: #3180 Entkoppelte Ladebereiche für Verfügbarkeiten
#3180 Entkoppelte Ladebereiche für Verfügbarkeiten

Related work items: #3180
2022-07-27 13:16:35 +00:00
Nino Righi
4ae5759361 Merged PR 1351: #3304 Fix WA Autocomplete Dropdown closing after queryParams change
#3304 Fix WA Autocomplete Dropdown closing after queryParams change
2022-07-26 14:57:11 +00:00
Andreas Schickinger
b5cfcf8036 Merged PR 1350: #3245 Zubuchen disabled fixes
#3245 Zubuchen disabled fixes

Related work items: #3245
2022-07-26 14:47:46 +00:00
Lorenz Hilpert
061982cf2c Merged PR 1349: Dashboard // nicht alle Infos werden angezeigt
Related work items: #3299
2022-07-26 12:00:09 +00:00
Nino Righi
0e1422c2c4 Merged PR 1348: #3267 Checkout Cart Notification Disable Order Button if Checkbox is Active b...
#3267 Checkout Cart Notification Disable Order Button if Checkbox is Active but E-Mail or Mobilenumber is missing
2022-07-26 11:09:43 +00:00
Nino Righi
3e534029a0 Merged PR 1347: #3167 Fix Reorder Modal Styling Stock Column Text Centered
#3167 Fix Reorder Modal Styling Stock Column Text Centered
2022-07-25 15:44:42 +00:00
Nino Righi
8d9ee9fe5c Merged PR 1343: #3297 Fix Reorder Modal takes now the correct Quantity
#3297 Fix Reorder Modal takes now the correct Quantity
2022-07-25 15:44:10 +00:00
Lorenz Hilpert
675aa04564 Added Generated package-lock.json - npm version 6 2022-07-25 17:42:30 +02:00
Lorenz Hilpert
88c8885a81 Build Test 2022-07-25 17:26:14 +02:00
Andreas Schickinger
151760aef9 Merged PR 1346: #2303 WA AHF // Zusatz bei Gruppierung in Trefferliste beachten
#3203 WA AHF // Zusatz bei Gruppierung in Trefferliste beachten

Related work items: #3203
2022-07-25 15:15:02 +00:00
Nino Righi
6c89969b60 Merged PR 1345: #3214 Price Diff Modal Styling Adjustments
#3214 Price Diff Modal Styling Adjustments
2022-07-25 14:57:13 +00:00
Nino Righi
0fd5e66c33 Merged PR 1344: #3287 Notification Channel preselect E-Mail if E-Mail and SMS is available
#3287 Notification Channel preselect E-Mail if E-Mail and SMS is available
2022-07-25 14:55:08 +00:00
Lorenz Hilpert
c8aa526e4d Fix Toaster Component => onSlideFinished 2022-07-25 16:29:38 +02:00
Andreas Schickinger
f2c492c6ea Merged PR 1342: #3245 Zubuchen disabled wenn ein Zusatz ausgewählt ist
#3245 Zubuchen disabled wenn ein Zusatz ausgewählt ist

Related work items: #3245
2022-07-25 14:24:21 +00:00
Lorenz Hilpert
11cf845235 Update ToastComponent.timeoutRef to any 2022-07-25 15:25:00 +02:00
Lorenz Hilpert
ae6fbc7c64 update packages 2022-07-25 15:23:45 +02:00
Andreas Schickinger
71eda539f6 Merged PR 1341: Merged PR 1340: #3293 Filtereinstellungen bei Tabwechsel
Merged PR 1340: #3293 Filtereinstellungen bei Tabwechsel

#3293 Filtereinstellungen bei Tabwechsel

Related work items: #3293

Related work items: #3293
2022-07-21 13:51:09 +00:00
Andreas Schickinger
f43b948ac9 Merged PR 1340: #3293 Filtereinstellungen bei Tabwechsel
#3293 Filtereinstellungen bei Tabwechsel

Related work items: #3293
2022-07-21 09:58:55 +00:00
Andreas Schickinger
1b77020b6a Merge branch 'develop' into release/2.0 2022-07-20 13:38:46 +02:00
Andreas Schickinger
1f62040560 Merged PR 1339: #3265 Warenausgabe Scrolling und SilentReload Bugfix
#3265 Warenausgabe Scrolling und SilentReload Bugfix

Related work items: #3265
2022-07-19 15:17:11 +00:00
Nino Righi
cc5c3167b1 Merged PR 1338: #3292 Process Guards Breadcrumbs Fix
#3292 Process Guards Breadcrumbs Fix
2022-07-19 15:01:37 +00:00
Andreas Schickinger
b9b79b949f Merged PR 1337: #3291 Warenausgabe Caching Verhalten und Scrolling angepasst
#3291 Warenausgabe Caching Verhalten und Scrolling angepasst

Related work items: #3291
2022-07-19 13:06:05 +00:00
Nino Righi
a0d729fe6d Merged PR 1336: #3272 Revert WA Tab Naming changes back to current production version
#3272 Revert WA Tab Naming changes back to current production version
2022-07-19 12:31:10 +00:00
Andreas Schickinger
f618dd3865 Merged PR 1335: #3291 WA Listenansicht Statusänderung cleared Cache
#3291 WA Listenansicht Statusänderung cleared Cache

Related work items: #3291
2022-07-18 15:58:59 +00:00
Nino Righi
3fd3f972db Merged PR 1334: #3287 Notifications Deactivate Other Channels except SMS and EMail
#3287 Notifications Deactivate Other Channels except SMS and EMail
2022-07-18 15:32:07 +00:00
Andreas Schickinger
2311655e5e Merged PR 1333: #3285 TK Artikelbilder verzerrt Dashboard fix
#3285 TK Artikelbilder verzerrt Dashboard fix
2022-07-18 14:40:29 +00:00
Nino Righi
c589836097 Merged PR 1332: #3286 Remission Fix Filter Settings change to default after Source Changed
#3286 Remission Fix Filter Settings change to default after Source Changed
2022-07-18 14:34:52 +00:00
Andreas Schickinger
dbc641cfce Merged PR 1331: #3285 TK Bilder verzerrt
#3285 TK Bilder verzerrt

Related work items: #3285
2022-07-18 13:53:01 +00:00
Andreas Schickinger
f13bc58925 Merged PR 1330: #3276 Remission Filter Button nicht mehr disabled
#3276 Remission Filter Button nicht mehr disabled

Related work items: #3276
2022-07-18 13:08:07 +00:00
Andreas Schickinger
94d5892cf1 Merged PR 1328: #3272 Beim Wechsel zwischen WA und Artikelrecherche den Warenkorb nicht mehr...
#3272 Beim Wechsel zwischen WA und Artikelrecherche den Warenkorb nicht mehr verwerfen

Related work items: #3272
2022-07-18 10:18:10 +00:00
Andreas Schickinger
8e32b15f26 Merged PR 1329: #3265 Warenausgabe Tabwechsel fixes
#3265 Warenausgabe Tabwechsel fixes
- Fehlermeldung ScrollPosition
- Suche wird trotz Cache ausgeführt
- Scroll Top bei erneuter Suche im gleichen Tab oder über Filter
- Beim Vorgangswechsel wurde der Filter nicht korrekt resetted

Related work items: #3265
2022-07-18 09:37:27 +00:00
Andreas Schickinger
fe5f0ef2eb Merged PR 1327: #3283 Fallback URL für einen Vorgang von Dashboard auf Artikelsuche geändert
#3283 Fallback URL für einen Vorgang von Dashboard auf Artikelsuche geändert. Dadurch kommt es nicht mehr dazu, dass ein Tab nicht selektierbar "hängen bleibt" und zum Dashboard navigiert. Die Ursache wie es zu dem Problem kam ist noch unbekannt

Related work items: #3283
2022-07-18 09:18:13 +00:00
Andreas Schickinger
daa27d5f2d Merged PR 1326: #3282 Fehlerdialog und Logout bei zu langer Inaktivität
#3282 Fehlerdialog und Logout bei zu langer Inaktivität - PR für Test

Related work items: #3282
2022-07-18 09:14:05 +00:00
Nino Righi
bb7626609e Merged PR 1325: #3272 Prozess Tab Bugfixes
#3272 Prozess Tab Bugfixes
2022-07-14 15:59:36 +00:00
Nino Righi
9ed58b685b Merged PR 1323: #3272 #3275 Tab Process Management Updated, Cart, CheckoutCart, WA
#3272 #3275 Tab Process Management Updated, Cart, CheckoutCart, WA
2022-07-14 14:12:21 +00:00
Andreas Schickinger
4eb81ad30a Merged PR 1324: #3276 Remission Starten Button disabled, wenn Liste läd
#3276 Remission Starten Button disabled, wenn Liste läd

Related work items: #3276
2022-07-14 13:49:26 +00:00
Nino Righi
a1f2cb57b3 Merged PR 1322: #3275 Bestellbestätigungs Prozess Bugfixes
#3275 Bestellbestätigungs Prozess Bugfixes
2022-07-13 15:03:40 +00:00
Andreas Schickinger
62b8e387ca Merged PR 1321: #3270 Listenbestellung B2B Preis wird richtig übernommen
#3270 Listenbestellung B2B Preis wird richtig übernommen

Related work items: #3270
2022-07-13 14:59:36 +00:00
Andreas Schickinger
07498db711 Merged PR 1316: #3270 Listenbestellung Popup Preis wird bei Wechsel der Filteroption aktualis...
#3270 Listenbestellung Popup Preis wird bei Wechsel der Filteroption aktualisiert

Related work items: #3270
2022-07-12 15:33:29 +00:00
Nino Righi
2adc8c6f5d Merged PR 1320: #3275 Made Cart Checkout Process reusable
#3275 Made Cart Checkout Process reusable
2022-07-12 15:31:56 +00:00
Lorenz Hilpert
f15a43f303 Merged PR 1319: #3274 Warenausgabe - Filter
#3274 Warenausgabe - Filter
2022-07-12 13:12:59 +00:00
Nino Righi
e35aea5a7e Merged PR 1318: #3273 #3271 Notifications Cart Show Toggle and Bugfix
#3273 #3271 Notifications Cart Show Toggle and Bugfix
2022-07-12 09:02:00 +00:00
Lorenz Hilpert
0e1ed9d8cc Merge branch 'feature/#3265-Scroll-Position-Bug' into develop 2022-07-11 16:13:05 +02:00
Lorenz Hilpert
f62ef06e51 Remove Process Tabs in Goods Out 2022-07-11 16:06:47 +02:00
Andreas Schickinger
30f4d4588f Merged PR 1315: #3269 Bestellbestaetigung fehlerhafte Anzeige
#3269 Bestellbestaetigung fehlerhafte Anzeige

Related work items: #3269
2022-07-11 12:59:22 +00:00
Lorenz Hilpert
e102396dab #3265 Scroll Position Bug 2022-07-11 12:03:10 +02:00
Andreas Schickinger
f60815ef63 Merged PR 1314: #3268 Artikelformat wird überall auf undefined geprüft. Fehlendes FormatIcon...
#3268 Artikelformat wird überall auf undefined geprüft. Fehlendes FormatIcon in PurchasingOptions implementiert

Related work items: #3268
2022-07-08 13:59:37 +00:00
Andreas Schickinger
7b11b53774 Merged PR 1313: #3267 Warenkorb NotificationChannels nur speichern, wenn Haken und Value gese...
#3267 Warenkorb NotificationChannels nur speichern, wenn Haken und Value gesetzt wurden

Related work items: #3267
2022-07-08 08:11:35 +00:00
Nino Righi
abff7715ee Merged PR 1312: #3256 Fix Display Toast Notification
#3256 Fix Display Toast Notification
2022-07-08 08:09:07 +00:00
Andreas Schickinger
83c0a20d61 Warenausgabe Tabwechsel Bugfix 2022-07-06 17:47:39 +02:00
Andreas Schickinger
a4de2391e9 Merged PR 1310: #3262 WA Loader wird nicht angezeigt
#3262 WA Loader wird nicht angezeigt

Related work items: #3262
2022-07-06 14:58:22 +00:00
Andreas Schickinger
732566eacd Merged PR 1311: #3263 WA Details API calls angepasst
#3263 WA Details API calls angepasst

Related work items: #3263
2022-07-06 14:48:37 +00:00
Andreas Schickinger
2c98128531 Merged PR 1309: #3264 WA QueryParam aktualisieren mit debounce
#3264 WA QueryParam aktualisieren mit debounce

Related work items: #3264
2022-07-06 14:38:56 +00:00
Nino Righi
9a45823bdb Merged PR 1308: #3256 Abholfachremissionsvorschau Create Toas with Dialog Text or Fallback Me...
#3256 Abholfachremissionsvorschau Create Toas with Dialog Text or Fallback Message if Dialog is not available
2022-07-06 14:38:35 +00:00
Andreas Schickinger
fa43a08831 Merged PR 1305: Warenbegleitscheine Rechtschreibfehler fix
Warenbegleitscheine Rechtschreibfehler fix
2022-07-04 11:25:51 +00:00
Nino Righi
6fb8bdaff1 Merged PR 1304: Merge Develop -> Release/2.0
Merge Develop -> Release/2.0

Related work items: #905, #2737, #2790, #3040, #3150, #3157, #3158, #3175, #3179, #3189, #3212, #3234
2022-06-29 12:48:45 +00:00
Andreas Schickinger
35e6d60ac0 Merged PR 1301: #3234 Remission Artikel hinzufügen Teilmengen Bugfix
#3234 Remission Artikel hinzufügen Teilmengen Bugfix

Related work items: #3234
2022-06-29 08:37:58 +00:00
Nino Righi
ecfc241fb5 Merged PR 1303: #2953 Fix Zubuchen CompartmentCode
#2953 Fix Zubuchen CompartmentCode
2022-06-29 08:37:25 +00:00
Nino Righi
866a5100b9 Merged PR 1299: #2953 Updated QR Code Print Data
#2953 Updated QR Code Print Data
2022-06-28 13:31:47 +00:00
Andreas Schickinger
3d972fd740 Merged PR 1298: #3234 Bugfix Remission Artikel hinzufügen Menge falsch
#3234 Bugfix Remission Artikel hinzufügen Menge falsch

Related work items: #3234
2022-06-28 08:14:39 +00:00
Nino Righi
59c9275cc4 Merged PR 1297: #2953 Updated PRINT_PRICEDIFFQRCODELABEL compartmentCode and compartmentInfo
#2953 Updated PRINT_PRICEDIFFQRCODELABEL compartmentCode and compartmentInfo
2022-06-27 15:33:10 +00:00
Lorenz Hilpert
3ada83efff #3091 - Meldung bei nicht remittierbaren Artikel 2022-06-27 14:46:12 +02:00
Lorenz Hilpert
e263048a35 gen:swagger:remi - Regenerate remi api 2022-06-27 10:24:41 +02:00
Lorenz Hilpert
63980298b6 #3149 Query Filter Keep Changes Whitput Applying 2022-06-27 10:19:04 +02:00
Lorenz Hilpert
b904e94156 Merged PR 1296: Merge Release into Develop
Related work items: #905, #2737, #2790, #3040, #3150, #3157, #3158, #3175, #3179, #3189, #3212
2022-06-24 15:06:23 +00:00
Lorenz Hilpert
78f91b937f Merged PR 1295: Merge Develop into Release2.0
Related work items: #905, #3040, #3175, #3179, #3189, #3212
2022-06-24 14:54:23 +00:00
Andreas Schickinger
1ecd08d053 Merged PR 1293: #3212 Remission Stapel aktualisieren bugfix
#3212 Remission Stapel aktualisieren bugfix

Related work items: #3212
2022-06-24 14:06:41 +00:00
Andreas Schickinger
8c03accae7 Merged PR 1294: #3224 Remission Artikel hinzufügen Breadcrumb
#3224 Remission Artikel hinzufügen Breadcrumb
2022-06-24 14:05:51 +00:00
Andreas Schickinger
456d3f2f3a Merged PR 1290: #905 Remission WBS Leistung Dummy entfernt
#905 Remission WBS Leistung Dummy entfernt

Related work items: #905
2022-06-24 09:05:39 +00:00
Andreas Schickinger
fa2838ea5c Merged PR 1289: #3212 Remission Stapel aktualisieren fix
#3212 Remission Stapel aktualisieren fix
2022-06-24 09:04:58 +00:00
Andreas Schickinger
e228490812 Merged PR 1288: #3212 Remission Stapel Stock aktualisieren anhand EAN
#3212 Remission Stapel Stock aktualisieren anhand EAN

Related work items: #3212
2022-06-23 15:38:44 +00:00
Nino Righi
13d0ac0cbd Merged PR 1287: #3222 Remission Fix Trigger Init Search after Filter gets loaded, relocated u...
#3222 Remission Fix Trigger Init Search after Filter gets loaded, relocated update Cache function
2022-06-23 15:38:10 +00:00
Nino Righi
09bed1456e Merged PR 1284: #3216 Customer Order Details Display All Subset Items
#3216 Customer Order Details Display All Subset Items
2022-06-23 15:34:11 +00:00
Andreas Schickinger
c6827e499e Merged PR 1286: #3040 Logik zum Entfernen von Duplikaten angepasst
#3040 Logik zum Entfernen von Duplikaten angepasst

Related work items: #3040
2022-06-23 13:03:34 +00:00
Nino Righi
d54cc7a2fd Merged PR 1278: #3204 Platform Detection and Scrollbars
#3204 Platform Detection and Scrollbars
2022-06-23 07:28:14 +00:00
Andreas Schickinger
67dae94524 Merged PR 1283: #3040 Remission SilentReload entfernt und Ladelogik angepasst
#3040 Remission SilentReload entfernt und Ladelogik angepasst

Related work items: #3189
2022-06-22 14:05:11 +00:00
Nino Righi
3273a21246 Merged PR 1282: #3215 Config Produktbilder Changes
#3215 Config Produktbilder Changes
2022-06-22 13:18:40 +00:00
Nino Righi
b40b61a46c Merged PR 1281: #3215 Hotfix Update Configs Production Staging
#3215 Hotfix Update Configs Production Staging
2022-06-22 12:46:57 +00:00
Nino Righi
813f611843 Merged PR 1279: #3206 Hide Supplier if Supplier Count is <= 1 and Disable Logic if click on a...
#3206 Hide Supplier if Supplier Count is <= 1 and Disable Logic if click on already activated Supplier or Source
2022-06-21 13:12:16 +00:00
Lorenz Hilpert
1abacb75be debugger entfernt 2022-06-21 15:11:31 +02:00
Lorenz Hilpert
42028a2777 #3040 Remission - Fehler bei nicht gefunden stehen 2022-06-21 15:11:07 +02:00
Lorenz Hilpert
0a25eeadbe Merged PR 1277: #3149 Process Change and Caching
#3149 Process Change and Caching
2022-06-20 15:39:00 +00:00
Lorenz Hilpert
70a4451f90 #3189 Remission - Artikel entfernen von WBS landen nicht wieder auf Remi-Liste 2022-06-20 12:21:11 +02:00
Lorenz Hilpert
d859395f50 #3160 Spelling 2022-06-20 11:44:02 +02:00
Andreas Schickinger
97948df14e Merged PR 1276: #3175 Remission kein Refresh bei Wechsel von Warenbegleitschein
#3175 Remission kein Refresh bei Wechsel von Warenbegleitschein
#3189 Remission Artikel entfernen Refresh

Related work items: #3175
2022-06-17 09:20:16 +00:00
Lorenz Hilpert
dc84efb3ef #3160 Remission - im Abteilungremission Ladeanimation ohne Filter 2022-06-15 11:26:21 +02:00
Andreas Schickinger
12676a4314 Merged PR 1275: #3179 Refactoring Remission Warenbegleitschein eröffnen Rechtschreibfehler
#3179 Refactoring Remission Warenbegleitschein eröffnen Rechtschreibfehler

Related work items: #3179
2022-06-13 14:05:18 +00:00
Lorenz Hilpert
3aafb9f8e7 #3173 Remission - Single-Selection bei Abteilungsremission - Abteilungen 2022-06-13 16:04:32 +02:00
Lorenz Hilpert
4518db2bdd Merged PR 1274: Merge Dev => Release
Related work items: #2737, #2790, #3150, #3157, #3158
2022-06-10 13:16:11 +00:00
Andreas Schickinger
2cb161b62e Merged PR 1272: #3150 Scroll Arrows in UiSlider nur anzeigen wenn Scrollbar
#3150 Scroll Arrows in UiSlider nur anzeigen wenn Scrollbar

Related work items: #3150
2022-06-10 09:22:34 +00:00
Lorenz Hilpert
9d052284be #3040 - Remission - Fehler bei nicht gefunden stehen 2022-06-10 11:21:43 +02:00
Nico Hanus
98d9029dde remove single build for develop and enabled batch trigger 2022-06-09 12:41:42 +00:00
Lorenz Hilpert
040c67215e Merged PR 1271: #3040 Remission - Fehler bei nicht gefunden stehen
#3040 Remission - Fehler bei nicht gefunden stehen
2022-06-09 11:47:42 +00:00
Andreas Schickinger
d577312b24 Merged PR 1269: #3158 UiSpinner anstatt leerer Warenkorb Meldung beim Laden
#3158 UiSpinner anstatt leerer Warenkorb Meldung beim Laden

Related work items: #3158
2022-06-09 08:54:31 +00:00
Andreas Schickinger
fa10bc9c30 Merged PR 1268: #3157 AHF Routing und Item wählen anhand OrderItemSubsetId
#3157 AHF Routing und Item wählen anhand OrderItemSubsetId

Related work items: #3157
2022-06-09 08:53:45 +00:00
Andreas Schickinger
055339956a Merged PR 1270: #2790 Benachrichtigungskanäle bei Weiter zum Warenkorb nicht überschreiben
#2790 Benachrichtigungskanäle bei Weiter zum Warenkorb nicht überschreiben, wenn der Kunde bereits ausgewhält ist

Related work items: #2790
2022-06-09 08:34:04 +00:00
Lorenz Hilpert
6cffa53ea9 #3062 Remission Footer 2022-06-08 11:21:12 +02:00
Lorenz Hilpert
fe83ef56ea Fix core-application unit tests 2022-06-07 17:12:22 +02:00
Lorenz Hilpert
abd1cacdc0 #3149 Warenausgabe kann mehrmals in einem Vorgang geöffnet werden 2022-06-07 16:49:58 +02:00
Nino Righi
85b448ab85 Merged PR 1267: #3145 Checkout Summary Changes
#3145 Bugfix Artikellink hat keinen neuen Prozess eröffnet sondern einen bestehenden überschrieben,
Wenn neue Bestellung getätigt wird, wird die alte Bestellbestätigung removed
2022-06-07 08:31:07 +00:00
Nico Hanus
5749f0018c add batching in azurepipeline
https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops&tabs=yaml#batching-ci-runs
2022-06-03 11:42:43 +00:00
Lorenz Hilpert
b65d2c5ff3 #3156 Login Test 2022-06-02 11:45:08 +02:00
Lorenz Hilpert
348b2c4aca #3156 manuelles Login mit Username und Passwort nicht möglich 2022-06-02 10:55:53 +02:00
Nino Righi
dfc3f32086 Merged PR 1266: #3147 Fix IPAD 6 Styling Issue inside Availabilities Modal
#3147 Fix IPAD 6 Styling Issue inside Availabilities Modal
2022-06-02 08:26:33 +00:00
Nino Righi
68d331864d Merged PR 1264: #3145 Updated Order Checkout Process
#3145 Updated Order Checkout Process
2022-06-01 08:19:14 +00:00
Lorenz Hilpert
24a008b20d Merged PR 1263: Cleanup 2022-05-31 12:56:41 +00:00
Nino Righi
0e5c35fae4 Merged PR 1262: #3146 Slide Current Active Process Tab Into View after Activating It
#3146 Slide Current Active Process Tab Into View after Activating It
2022-05-31 08:06:08 +00:00
Nino Righi
4d4b989dcd Merged PR 1261: #3082 Improved Error Handling on PDP
#3082 Improved Error Handling on PDP
2022-05-30 15:38:59 +00:00
Andreas Schickinger
2983d5a068 Merged PR 1260: #2737 Bei Zubuchen kein Abholfachzettel ausdrucken
#2737 Bei Zubuchen kein Abholfachzettel ausdrucken

Related work items: #2737
2022-05-30 08:37:19 +00:00
Nino Righi
efdc365b90 Merged PR 1259: #3022 ISA File Caching Improvements
#3022 ISA File Caching Improvements
2022-05-27 07:51:24 +00:00
Nino Righi
c4a8e3eb96 Merged PR 1258: Merge release into develop
Merge release into develop
2022-05-25 13:48:01 +00:00
Nino Righi
8cb3c98b8d Merged PR 1256: #3133 Changed Service Worker Update Implementation to Angular v12 and Fixed U...
#3133 Changed Service Worker Update Implementation to Angular v12 and Fixed Unit Tests
2022-05-24 16:19:25 +00:00
Nino Righi
9c12eda210 #3133 Changed Service Worker Update Implementation to Angular v12 and Fixed Unit Tests 2022-05-24 18:14:58 +02:00
Lorenz Hilpert
90afcc008d Disable check for update with interval 2022-05-24 17:44:19 +02:00
Lorenz Hilpert
7409d096fe Update Check Disabled 2022-05-24 17:43:24 +02:00
Lorenz Hilpert
a4c4a3c0c8 Merged PR 1255: Merge release 2.0 into develop 2022-05-24 14:29:50 +00:00
Lorenz Hilpert
2148af7b63 Merge branch 'develop' into release/2.0 2022-05-24 16:14:19 +02:00
Andreas Schickinger
d984bc04ec Merged PR 1250: #3109 Produktbilder in der Artikeltrefferliste mit ImageId laden
#3109 Produktbilder in der Artikeltrefferliste mit ImageId laden

Related work items: #3109
2022-05-23 14:46:51 +00:00
Andreas Schickinger
1b7dfcc3ac Merged PR 1249: #3127 iPad Zoom deaktivieren
#3127 iPad Zoom deaktivieren

Related work items: #3127
2022-05-23 14:46:26 +00:00
Andreas Schickinger
c762871cce Merged PR 1248: #2877 Preisunterschied Menge wird pro Item übergeben
#2877 Preisunterschied Menge wird pro Item übergeben

Related work items: #2877
2022-05-23 09:14:24 +00:00
Andreas Schickinger
007ea92bd5 Merged PR 1247: #3128 Wareneingang Warenausgang Breadcrumb wurde nicht immer richtig aktualis...
#3128 Wareneingang Warenausgang Breadcrumb wurde nicht immer richtig aktualisiert

Related work items: #3128
2022-05-23 09:13:44 +00:00
Nino Righi
688b758da2 Merged PR 1245: #3022 Unit Test Fix
#3022 Unit Test Fix
2022-05-19 08:38:09 +00:00
Nino Righi
39147d7afa Merged PR 1244: #3022 ISA File Caching
#3022 ISA File Caching
2022-05-19 08:29:30 +00:00
Andreas Schickinger
50cc17a44b Merged PR 1243: #2877 Preisunterschied Popup: Bei Close/Backdrop Click nicht mehr die Sekundä...
#2877 Preisunterschied Popup: Bei Close/Backdrop Click nicht mehr die Sekundär Action ausführen

Related work items: #2877
2022-05-19 08:29:00 +00:00
Andreas Schickinger
73f592df74 Merged PR 1241: #3116 Bei B2B Kunden war der Weiter Button immer disabled
#3116 Bei B2B Kunden war der Weiter Button immer disabled

Related work items: #3116
2022-05-17 14:18:49 +00:00
Lorenz Hilpert
821042d8b6 App Start - leistung verbessert und statusanzeige 2022-05-17 16:17:26 +02:00
Nino Righi
7123f6cc15 Merged PR 1242: #3124 Toast Message Adjusted Width and Height Values
#3124 Toast Message Adjusted Width and Height Values
2022-05-17 12:56:36 +00:00
Andreas Schickinger
6c2e9906b0 Merged PR 1240: #3117 Prozess Scrollpfeile sollte am iPad nicht sichtbar sein
#3117 Prozess Scrollpfeile sollte am iPad nicht sichtbar sein

Related work items: #3117
2022-05-16 13:59:18 +00:00
Andreas Schickinger
37648b79c3 Merged PR 1238: #3116 Weiter Button in den Kundendetails disabled, wenn noch keine Adressen geladen wurden
#3116 Weiter Button in den Kundendetails disabled, wenn noch keine Adressen geladen wurden

Related work items: #3116
2022-05-16 13:55:06 +00:00
Nino Righi
6b00c2c81a Merged PR 1239: #3093 ISA Offline Message Fix
#3093 ISA Offline Message Fix#3093 ISA Offline Message Fix
2022-05-16 13:24:22 +00:00
Andreas Schickinger
cd5599ff1c Merged PR 1237: #2981 Preisunterschied Action und Popup
#2981 Preisunterschied Action und Popup

Related work items: #2877, #2981
2022-05-16 09:51:40 +00:00
Andreas Schickinger
e870eb241b Merged PR 1236: #3122 Warenausgabe Endpoints angepasst
#3122 Warenausgabe Endpoints angepasst

Related work items: #3122
2022-05-16 09:32:52 +00:00
Andreas Schickinger
fbf8c282e8 Merged PR 1235: #3108 Remission Remi Grund nur anzeigen, wenn vor dem remittieren schon vorha...
#3108 Remission Remi Grund nur anzeigen, wenn vor dem remittieren schon vorhanden

Related work items: #3108
2022-05-16 08:19:23 +00:00
Nico Hanus
811e363dd4 increase cpu and ram limits for better performance 2022-05-13 10:55:36 +02:00
Nino Righi
d206ba1606 Merged PR 1234: #3118 Fixed Process nummeration
#3118 Fixed Process nummeration
2022-05-12 14:56:23 +00:00
Nino Righi
c529134cd2 Merged PR 1233: #3093 Improved Offline Handling
#3093 Improved Offline Handling
2022-05-12 14:21:43 +00:00
Andreas Schickinger
dafb1d335e Merged PR 1232: #3113 Bei Klick auf Abbrechen auf der Login Seite erneut zur Login Seite leiten
#3113 Bei Klick auf Abbrechen auf der Login Seite erneut zur Login Seite leiten

Related work items: #3113
2022-05-12 12:48:37 +00:00
Nino Righi
445899e731 Merged PR 1231: #3115 Fix WE WA Multi Search Request
#3115 Fix WE WA Multi Search Request
2022-05-12 08:18:05 +00:00
Andreas Schickinger
b21fbc974c Merged PR 1230: #2995 Kundensuche doppelter Request im Filter behoben
#2995 Kundensuche doppelter Request im Filter behoben

Related work items: #2995
2022-05-11 15:14:29 +00:00
Andreas Schickinger
4c98a73204 Merged PR 1229: #3108 Remission Restmenge nach dem remittieren angepasst
#3108 Remission Restmenge nach dem remittieren angepasst

Related work items: #3108
2022-05-11 14:41:08 +00:00
Nino Righi
e99d669086 Merged PR 1228: #3104 Improved Error Handling of Removing Items from Shipping Document
#3104 Improved Error Handling of Removing Items from Shipping Document
2022-05-10 15:12:34 +00:00
Andreas Schickinger
913ffbda97 Merged PR 1227: #1058 Remission abschließen Breadcrumb wird entfernt
#1058 Remission abschließen Breadcrumb wird entfernt

Related work items: #1058
2022-05-10 13:31:26 +00:00
Nino Righi
ec2bd0bd5d Merged PR 1226: #3061 Remission List Performance
#3061 Remission List Performance
2022-05-09 15:31:47 +00:00
Andreas Schickinger
08fefb1c4b Merged PR 1225: #3094 Remission mehrfach abschließen Fehlermeldung angepasst
#3094 Remission mehrfach abschließen Fehlermeldung angepasst

Related work items: #3094
2022-05-09 15:18:36 +00:00
Andreas Schickinger
e7f20bc553 Merged PR 1224: #3088 Remission Fehlermeldung bei gleichzeitigem entfernen und Liste Reload a...
#3088 Remission Fehlermeldung bei gleichzeitigem entfernen und Liste Reload auch bei Fehler

Related work items: #3088
2022-05-09 15:17:39 +00:00
Andreas Schickinger
f5993ca5c4 Merged PR 1223: #3087 Bei Error Status 409 Custom Fehlermeldung und Liste auch bei Fehler neu...
#3087 Bei Error Status 409 Custom Fehlermeldung und Liste auch bei Fehler neu laden

Related work items: #3087
2022-05-09 15:17:15 +00:00
Nino Righi
9f0c81c20f Merged PR 1215: #3062 #3051 Remission Breadcrumbs contain the correct queryParams, Remission Process Remembers Filters if Remission is started
#3062 #3051 Remission Breadcrumbs contain the correct queryParams, Remission Process Remembers Filters if Remission is started. Always load available Remission
2022-05-09 11:41:50 +00:00
Nino Righi
42199c8cda Merged PR 1222: #3097 #3089 Shell Process Tabs UI Changes
#3097 #3089 Shell Process Tabs UI Changes
2022-05-09 10:02:51 +00:00
Nino Righi
bc525fbffc Merged PR 1218: #3067 #3056 #2685 Toast Notifications
#3067 #3056 #2685 Toast Notifications
2022-05-09 09:45:54 +00:00
Nino Righi
dd6821642f Merged PR 1220: #3092 Remission Empty List Message
#3092 Remission Empty List Message
2022-05-09 09:43:20 +00:00
Nino Righi
b2dd96f044 Merged PR 1219: #3041 If no supplier selected inside create remission, Blank gets selected an...
#3041 If no supplier selected inside create remission, Blank gets selected and changed navigation inside goods in remission preview
2022-05-09 09:33:49 +00:00
Nino Righi
0ca8a1fabf Merged PR 1221: #3095 Remission Disable Remit Button if Quantity < 1
#3095 Remission Disable Remit Button if Quantity < 1
2022-05-09 09:23:14 +00:00
Nino Righi
d46643cf8c Merged PR 1217: #3084 Remission Added Loader to WBS on deleting Items
#3084 Remission Added Loader to WBS on deleting Items
2022-05-09 08:59:59 +00:00
Nino Righi
fc3bea28e8 Merged PR 1216: #2967 Remission Remit PopUp Wording Fix
#2967 Remission Remit PopUp Wording Fix
2022-05-09 08:57:05 +00:00
Nino Righi
b29323864e Updated Isa-App Config Files 2022-05-03 11:38:41 +02:00
Michael Auer
c4cad5d56f Merge branch 'develop' into release/2.0 2022-05-03 10:52:36 +02:00
Nino Righi
1d83c82919 Merged PR 1214: #3083 Adjusted File Memory Budgets for Production Build
#3083 Adjusted File Memory Budgets for Production Build
2022-05-02 12:05:51 +00:00
3094 changed files with 26235 additions and 93599 deletions

7
.browserslistrc Normal file
View File

@@ -0,0 +1,7 @@
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 iOS major versions
safari > 11
Firefox ESR
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

1
.gitignore vendored
View File

@@ -31,6 +31,7 @@ speed-measure-plugin.json
.history/*
# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage

4
.npmrc
View File

@@ -1,3 +1 @@
@isa:registry=https://pkgs.dev.azure.com/hugendubel/_packaging/hugendubel%40Local/npm/registry/
@cmf:registry=https://pkgs.dev.azure.com/hugendubel/_packaging/hugendubel%40Local/npm/registry/
always-auth=true
@paragondata:registry=https://npm.pkg.github.com

View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,22 +1,18 @@
import { Injectable } from '@angular/core';
import { Injectable, isDevMode } from '@angular/core';
import { PromptModalData, UiModalService, UiPromptModalComponent } from '@ui/modal';
import { Observable } from 'rxjs';
import { ScanAdapter } from './scan-adapter';
@Injectable()
export class DevScanAdapter implements ScanAdapter {
readonly name = 'Dev';
constructor(private _modal: UiModalService) {}
getName(): string {
return 'Dev Scanner';
}
isPrimary(): boolean {
return true;
}
isReady(): boolean {
return true;
init(): Promise<boolean> {
return new Promise((resolve, reject) => {
resolve(isDevMode());
});
}
scan(): Observable<string> {

View File

@@ -6,20 +6,14 @@ import { ScanAdapter } from './scan-adapter';
@Injectable()
export class NativeScanAdapter implements ScanAdapter {
readonly name = 'Native';
constructor(private readonly nativeContainerService: NativeContainerService) {}
getName(): string {
return 'Native Scanner';
}
isPrimary(): boolean {
return true;
}
isReady(): boolean {
// TODO: Fix Login Keycard Dauerschleife
return this.nativeContainerService.isUiWebview().isNative || this.nativeContainerService.isIpadMini6();
// return false;
init(): Promise<boolean> {
return new Promise((resolve, reject) => {
resolve(this.nativeContainerService.isUiWebview().isNative);
});
}
scan(): Observable<string> {

View File

@@ -1,11 +1,18 @@
import { Observable } from 'rxjs';
export interface ScanAdapter {
getName(): string;
/**
* Name to identify the adapter
*/
readonly name: string;
isPrimary(): boolean;
isReady(): boolean;
/**
* @returns true if this adapter can be used
*/
init(): Promise<boolean>;
/**
* scan for a barcode
*/
scan(): Observable<string>;
}

View File

@@ -5,10 +5,13 @@ import { SCAN_ADAPTER } from './tokens';
@NgModule({})
export class ScanAdapterModule {
static forRoot(dev?: boolean) {
static forRoot() {
return {
ngModule: ScanAdapterModule,
providers: [{ provide: SCAN_ADAPTER, useClass: NativeScanAdapter, multi: true }],
providers: [
{ provide: SCAN_ADAPTER, useClass: NativeScanAdapter, multi: true },
{ provide: SCAN_ADAPTER, useClass: DevScanAdapter, multi: true },
],
// Use for testing:
// providers: [{ provide: SCAN_ADAPTER, useClass: dev ? DevScanAdapter : NativeScanAdapter, multi: true }],
};

View File

@@ -1,4 +1,5 @@
import { Inject, Injectable } from '@angular/core';
import { Observable, throwError } from 'rxjs';
import { ScanAdapter } from './scan-adapter';
import { SCAN_ADAPTER } from './tokens';
@@ -6,25 +7,59 @@ import { SCAN_ADAPTER } from './tokens';
providedIn: 'root',
})
export class ScanAdapterService {
private _readyAdapters: Record<string, boolean> = {};
constructor(@Inject(SCAN_ADAPTER) private readonly scanAdapters: ScanAdapter[]) {}
scanners() {
return this.scanAdapters.filter((adapter) => adapter.isReady());
}
scanner() {
return this.scanners().find((scanner) => scanner.isPrimary()) || this.scanners().find(() => true);
}
isReady() {
return this.scanAdapters.some((adapter) => adapter.isReady());
}
scan() {
const primaryScanner = this.scanner();
if (primaryScanner) {
return primaryScanner.scan();
async init(): Promise<void> {
for (const adapter of this.scanAdapters) {
const isReady = await adapter.init();
console.log('ScanAdapterService.init', adapter.name, isReady);
this._readyAdapters[adapter.name] = isReady;
}
return null;
}
adapters(): ScanAdapter[] {
return [...this.scanAdapters];
}
getAdapter(name: string): ScanAdapter | undefined {
return this.scanAdapters.find((adapter) => adapter.name === name);
}
// return true if at least one adapter is ready
isReady(): boolean {
return Object.values(this._readyAdapters).some((ready) => ready);
}
scan(ops: { use?: string; include?: string[]; exclude?: string[] } = { exclude: ['Dev'] }): Observable<string> {
let adapter: ScanAdapter;
if (ops.use == undefined) {
// get the first adapter that is ready to use
adapter = this.scanAdapters
.filter((adapter) => {
if (ops.include?.length) {
return ops.include.includes(adapter.name);
} else if (ops.exclude?.length) {
return !ops.exclude.includes(adapter.name);
} else {
return true;
}
})
.find((adapter) => this._readyAdapters[adapter.name]);
} else {
adapter = this.getAdapter(ops.use);
}
if (!adapter) {
return throwError('No adapter found');
}
if (this._readyAdapters[adapter.name] == false) {
return throwError('Adapter is not ready');
}
return adapter.scan();
}
}

View File

@@ -0,0 +1,3 @@
export * from './scandit-overlay.component';
export * from './scandit-scan-adapter.module';
export * from './scandit.scan-adapter';

View File

@@ -0,0 +1,20 @@
:host {
@apply block relative;
}
.scanner-container {
width: 100vw;
max-width: 95vw;
max-height: calc(95vh - 120px);
}
.close-scanner {
@apply block px-6 py-4 bg-white text-brand border-2 border-solid border-brand rounded-full text-lg font-bold mx-auto mt-4;
}
@screen desktop {
.scanner-container {
max-width: 900px;
max-height: 900px;
}
}

View File

@@ -0,0 +1,4 @@
<div class="scanner-container" #scanContainer></div>
<button class="close-scanner" type="button" (click)="close()">
Scan abbrechen
</button>

View File

@@ -0,0 +1,100 @@
import { Component, ChangeDetectionStrategy, ElementRef, ViewChild, NgZone, AfterViewInit, OnDestroy } from '@angular/core';
import { UiMessageModalComponent, UiModalService } from '@ui/modal';
import { Barcode, BarcodePicker, ScanResult, ScanSettings } from 'scandit-sdk';
@Component({
selector: 'app-scandit-overlay',
templateUrl: 'scandit-overlay.component.html',
styleUrls: ['scandit-overlay.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ScanditOverlayComponent implements AfterViewInit, OnDestroy {
private _barcodePicker: BarcodePicker;
private _onScan?: (code: string) => void;
private _onClose?: () => void;
@ViewChild('scanContainer', { read: ElementRef, static: true }) scanContainer: ElementRef;
constructor(private _zone: NgZone, private _modal: UiModalService) {}
ngAfterViewInit(): void {
this.createBarcodePicker()
.then(() => {
this._barcodePicker.on('scan', (scanResult) => {
this._zone.run(() => this.handleScanrResult(scanResult));
});
})
.catch((err: Error) => {
this._modal
.open({
content: UiMessageModalComponent,
title: 'Zugriff auf Kamera verweigert',
data: { message: 'Falls Sie den Zugriff erlauben möchten, können Sie das über die Webseiteinstellung Ihres Browsers.' },
})
.afterClosed$.subscribe(() => {
this._onClose?.();
});
});
}
async createBarcodePicker() {
this._barcodePicker = await BarcodePicker.create(this.scanContainer.nativeElement, {
playSoundOnScan: true,
vibrateOnScan: true,
});
this._barcodePicker.applyScanSettings(this.getScanSettings());
}
getScanSettings(): ScanSettings {
return new ScanSettings({
blurryRecognition: false,
enabledSymbologies: [
Barcode.Symbology.EAN8,
Barcode.Symbology.EAN13,
Barcode.Symbology.UPCA,
Barcode.Symbology.UPCE,
Barcode.Symbology.CODE128,
Barcode.Symbology.CODE39,
Barcode.Symbology.CODE93,
Barcode.Symbology.INTERLEAVED_2_OF_5,
Barcode.Symbology.QR,
],
codeDuplicateFilter: 1000,
});
}
onScan(fn: (code: string) => void) {
this._onScan = fn;
}
onClose(fn: () => void) {
this._onClose = fn;
}
handleScanrResult(scanRestul: ScanResult) {
let result: string | undefined;
if (scanRestul.barcodes.length) {
result = scanRestul.barcodes[0].data;
} else if (scanRestul.texts.length) {
result = scanRestul.texts[0].value;
}
if (result) {
this._onScan?.(result);
}
}
close() {
this._onClose?.();
}
ngOnDestroy(): void {
this._zone.runOutsideAngular(() => {
this._barcodePicker?.destroy(true);
});
}
}

View File

@@ -0,0 +1,20 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ScanditOverlayComponent } from './scandit-overlay.component';
import { ScanditScanAdapter } from './scandit.scan-adapter';
import { SCAN_ADAPTER } from '../tokens';
@NgModule({
imports: [CommonModule],
exports: [ScanditOverlayComponent],
declarations: [ScanditOverlayComponent],
})
export class ScanditScanAdapterModule {
static forRoot() {
return {
ngModule: ScanditScanAdapterModule,
providers: [{ provide: SCAN_ADAPTER, useClass: ScanditScanAdapter, multi: true }],
};
}
}

View File

@@ -0,0 +1,77 @@
import { Injectable } from '@angular/core';
import { Observable, Subscriber } from 'rxjs';
import { ScanAdapter } from '../scan-adapter';
import { Overlay } from '@angular/cdk/overlay';
import { configure } from 'scandit-sdk';
// import { ScanditModalComponent } from './scandit-modal';
import { Config } from '@core/config';
import { ComponentPortal } from '@angular/cdk/portal';
import { ScanditOverlayComponent } from './scandit-overlay.component';
@Injectable()
export class ScanditScanAdapter implements ScanAdapter {
readonly name = 'Scandit';
constructor(private readonly _config: Config, private _overlay: Overlay) {}
async init(): Promise<boolean> {
await configure(this._config.get('licence.scandit'), {
engineLocation: '/scandit/',
});
return true;
}
scan(): Observable<string> {
return new Observable((observer) => {
const overlay = this.createOverlay();
const portal = this.createPortal();
const ref = overlay.attach(portal);
const sub = new Subscriber();
const complete = () => {
overlay.detach();
ref.destroy();
sub.unsubscribe();
sub.complete();
observer.complete();
};
sub.add(
overlay.backdropClick().subscribe(() => {
complete();
})
);
ref.instance.onScan((code) => {
observer.next(code);
complete();
});
ref.instance.onClose(() => {
complete();
});
return complete;
});
}
createOverlay() {
const overlay = this._overlay.create({
positionStrategy: this._overlay.position().global().centerHorizontally().centerVertically(),
hasBackdrop: true,
});
return overlay;
}
createPortal() {
const portal = new ComponentPortal(ScanditOverlayComponent);
return portal;
}
}

View File

@@ -2,5 +2,10 @@
* Public API Surface of scan
*/
export * from './lib/scan.service';
export * from './lib/scandit';
export * from './lib/dev.scan-adapter';
export * from './lib/native.scan-adapter';
export * from './lib/scan-adapter';
export * from './lib/scan.module';
export * from './lib/scan.service';
export * from './lib/tokens';

View File

@@ -5,21 +5,5 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(
path: string,
deep?: boolean,
filter?: RegExp
): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { teardown: { destroyAfterEach: true } });
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);

View File

@@ -3,7 +3,6 @@
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,

View File

@@ -5,20 +5,7 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(
path: string,
deep?: boolean,
filter?: RegExp
): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

View File

@@ -3,7 +3,6 @@
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,

View File

@@ -5,6 +5,6 @@
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"compilationMode": "partial"
}
}

View File

@@ -181,7 +181,8 @@ describe('ApplicationService', () => {
expect(store.dispatch).toHaveBeenCalledWith({
type: actions.patchProcess.type,
process: {
processId: process.id,
changes: {
...process,
},
});

View File

@@ -60,7 +60,7 @@ describe('applicationReducer', () => {
type: 'cart',
};
const action = actions.patchProcess({ process: { ...process, name: 'Test' } });
const action = actions.patchProcess({ processId: process.id, changes: { ...process, name: 'Test' } });
const state = applicationReducer(
{
...initialState,
@@ -81,7 +81,7 @@ describe('applicationReducer', () => {
type: 'cart',
};
const action = actions.patchProcess({ process: { ...process, id: 2 } });
const action = actions.patchProcess({ processId: process.id, changes: { ...process, id: 2 } });
const state = applicationReducer(
{
...initialState,

View File

@@ -23,7 +23,7 @@ const _applicationReducer = createReducer(
on(patchProcess, (state, { processId, changes }) => {
const processes = state.processes.map((process) => {
if (process.id === processId) {
return { ...process, ...changes };
return { ...process, ...changes, id: processId };
}
return process;
});

View File

@@ -5,20 +5,7 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(
path: string,
deep?: boolean,
filter?: RegExp
): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

View File

@@ -3,7 +3,6 @@
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,

View File

@@ -5,6 +5,6 @@
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"compilationMode": "partial"
}
}

View File

@@ -31,7 +31,11 @@ export class AuthService {
this._oAuthService.tokenValidationHandler = new JwksValidationHandler();
this._oAuthService.setupAutomaticSilentRefresh();
await this._oAuthService.loadDiscoveryDocumentAndTryLogin();
try {
await this._oAuthService.loadDiscoveryDocumentAndTryLogin();
} catch (error) {
this.login();
}
this._initialized.next(true);
}

View File

@@ -5,21 +5,5 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(
path: string,
deep?: boolean,
filter?: RegExp
): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { teardown: { destroyAfterEach: true } });
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);

View File

@@ -3,7 +3,6 @@
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,

View File

@@ -20,7 +20,7 @@ export const selectBreadcrumbById = createSelector(selectEntities, (entities, id
/**
* Gibt alle Breadcrumb Entities als Array zurück die den key enthalten
*/
export const selectBreadcrumbsByKey = createSelector(selectAll, (entities, key: string) => entities.filter((crumb) => crumb.key === key));
export const selectBreadcrumbsByKey = createSelector(selectAll, (entities, key: string) => entities.filter((crumb) => crumb.key == key));
/**
* Gibt alle Breadcrumb Entities als Array zurück die den key und tag enthalten
@@ -28,7 +28,7 @@ export const selectBreadcrumbsByKey = createSelector(selectAll, (entities, key:
export const selectBreadcrumbsByKeyAndTag = createSelector(
selectAll,
(entities: Breadcrumb[], { key, tag }: { key: string; tag: string }) =>
entities.filter((crumb) => crumb.key === key && isArray(crumb.tags) && crumb.tags.includes(tag))
entities.filter((crumb) => crumb.key == key && isArray(crumb.tags) && crumb.tags.includes(tag))
);
/**
@@ -37,7 +37,7 @@ export const selectBreadcrumbsByKeyAndTag = createSelector(
export const selectBreadcrumbsByKeyAndTags = createSelector(
selectAll,
(entities: Breadcrumb[], { key, tags }: { key: string; tags: string[] }) =>
entities.filter((crumb) => crumb.key === key && isArray(crumb.tags) && tags.every((tag) => crumb.tags.includes(tag)))
entities.filter((crumb) => crumb.key == key && isArray(crumb.tags) && tags.every((tag) => crumb.tags.includes(tag)))
);
/**

View File

@@ -5,20 +5,7 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(
path: string,
deep?: boolean,
filter?: RegExp
): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

View File

@@ -3,7 +3,6 @@
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,

View File

@@ -5,6 +5,6 @@
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"compilationMode": "partial"
}
}

View File

@@ -1,7 +1,6 @@
import { Injectable } from '@angular/core';
import { CacheOptions } from './cache-options';
import { Cached } from './cached';
import { sha1 } from 'object-hash';
@Injectable({
providedIn: 'root',
@@ -60,7 +59,15 @@ export class CacheService {
}
private getKey(token: Object) {
return sha1(token);
return this.hash(JSON.stringify(token));
}
private hash(data: string): string {
let hash = 0;
for (let i = 0; i < data.length; i++) {
hash = data.charCodeAt(i) + ((hash << 5) - hash);
}
return hash.toString(16);
}
private serialize(data: Cached): string {

View File

@@ -5,20 +5,7 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(
path: string,
deep?: boolean,
filter?: RegExp
): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

View File

@@ -3,7 +3,6 @@
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,

View File

@@ -5,6 +5,6 @@
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"compilationMode": "partial"
}
}

View File

@@ -1,10 +1,10 @@
import { Injectable, Injector } from '@angular/core';
import { Injectable, Injector, Optional, SkipSelf } from '@angular/core';
import { ActionHandler } from './action-handler.interface';
import { FEATURE_ACTION_HANDLERS, ROOT_ACTION_HANDLERS } from './tokens';
@Injectable()
export class CommandService {
constructor(private injector: Injector) {}
constructor(private injector: Injector, @Optional() @SkipSelf() private _parent: CommandService) {}
async handleCommand<T>(command: string, data?: T): Promise<T> {
const actions = this.getActions(command);
@@ -15,7 +15,7 @@ export class CommandService {
console.error('CommandService.handleCommand', 'Action Handler does not exist', { action });
throw new Error('Action Handler does not exist');
}
console.log('handle command', handler, data);
data = await handler.handler(data);
}
return data;
@@ -25,10 +25,16 @@ export class CommandService {
return command?.split('|') || [];
}
getActionHandler(action: string): ActionHandler {
getActionHandler(action: string): ActionHandler | undefined {
const featureActionHandlers: ActionHandler[] = this.injector.get(FEATURE_ACTION_HANDLERS, []);
const rootActionHandlers: ActionHandler[] = this.injector.get(ROOT_ACTION_HANDLERS, []);
return [...featureActionHandlers, ...rootActionHandlers].find((handler) => handler.action === action);
let handler = [...featureActionHandlers, ...rootActionHandlers].find((handler) => handler.action === action);
if (this._parent && !handler) {
handler = this._parent.getActionHandler(action);
}
return handler;
}
}

View File

@@ -5,20 +5,7 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(
path: string,
deep?: boolean,
filter?: RegExp
): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

View File

@@ -3,7 +3,6 @@
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,

View File

@@ -5,6 +5,6 @@
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"compilationMode": "partial"
}
}

View File

@@ -5,21 +5,5 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(
path: string,
deep?: boolean,
filter?: RegExp
): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { teardown: { destroyAfterEach: true } });
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);

View File

@@ -3,7 +3,6 @@
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,

View File

@@ -5,20 +5,7 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(
path: string,
deep?: boolean,
filter?: RegExp
): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

View File

@@ -3,7 +3,6 @@
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,

View File

@@ -5,6 +5,6 @@
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"compilationMode": "partial"
}
}

View File

@@ -5,21 +5,5 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(
path: string,
deep?: boolean,
filter?: RegExp
): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { teardown: { destroyAfterEach: true } });
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);

View File

@@ -3,7 +3,6 @@
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,

View File

@@ -5,20 +5,7 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(
path: string,
deep?: boolean,
filter?: RegExp
): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

View File

@@ -3,7 +3,6 @@
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,

View File

@@ -5,6 +5,6 @@
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"compilationMode": "partial"
}
}

25
apps/core/toast/README.md Normal file
View File

@@ -0,0 +1,25 @@
# Toast
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0.
## Code scaffolding
Run `ng generate component component-name --project toast` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project toast`.
> Note: Don't forget to add `--project toast` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build toast` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build toast`, go to the dist folder `cd dist/toast` and run `npm publish`.
## Running unit tests
Run `ng test toast` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

View File

@@ -9,23 +9,32 @@ module.exports = function (config) {
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma'),
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../../coverage'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true,
jasmineHtmlReporter: {
suppressAll: true, // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, '../../../coverage/core/toast'),
subdir: '.',
reporters: [{ type: 'html' }, { type: 'text-summary' }],
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['ChromeHeadless'],
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true,
});

View File

@@ -0,0 +1,7 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/core/toast",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@@ -0,0 +1,11 @@
{
"name": "@core/toast",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^12.2.0",
"@angular/core": "^12.2.0"
},
"dependencies": {
"tslib": "^2.3.0"
}
}

View File

@@ -1,3 +1,3 @@
// start:ng42.barrel
export * from './focus.directive';
export * from './toast-animation';
// end:ng42.barrel

View File

@@ -0,0 +1,14 @@
import { AnimationTriggerMetadata, trigger, state, transition, style, animate } from '@angular/animations';
export const slideAnimationTime = 150;
export const toastAnimations: {
readonly slideToast: AnimationTriggerMetadata;
} = {
slideToast: trigger('slideAnimation', [
state('default', style({ transform: 'translateY(0%)' })),
transition('void => *', [style({ transform: 'translateY(-100%)' }), animate(`${slideAnimationTime}ms ease-in`)]),
transition('default => closing', animate(`${slideAnimationTime}ms ease-in`, style({ transform: 'translateY(-100%)' }))),
]),
};
export type ToastAnimationState = 'default' | 'closing';

View File

@@ -0,0 +1,4 @@
// start:ng42.barrel
export * from './toast';
export * from './toast-ref';
// end:ng42.barrel

View File

@@ -0,0 +1,17 @@
import { OverlayRef } from '@angular/cdk/overlay';
export class ToastRef {
constructor(private readonly _overlay: OverlayRef) {}
close() {
this._overlay.dispose();
}
isVisible() {
return this._overlay && this._overlay.overlayElement;
}
getPosition() {
return this._overlay.overlayElement.getBoundingClientRect();
}
}

View File

@@ -0,0 +1,11 @@
import { TemplateRef } from '@angular/core';
export interface Toast {
title?: string;
text?: string;
timer?: number;
position?: 'top-left' | 'top' | 'top-right' | 'bottom-right' | 'bottom' | 'bottom-left';
size?: 'width-full' | 'content';
template?: TemplateRef<any>; // For rendering dynamic content
templateContext?: {}; // For rendering dynamic content
}

View File

@@ -0,0 +1,8 @@
// start:ng42.barrel
export * from './toast.component';
export * from './toast.module';
export * from './toast.service';
export * from './defs';
export * from './animation';
export * from './tokens';
// end:ng42.barrel

View File

@@ -0,0 +1,15 @@
<div class="toast-main" [style.width]="width" [@slideAnimation]="{ value: animationState }" (@slideAnimation.done)="onSlideFinished()">
<button class="absolute top-2 right-2 p-6 border-none bg-transparent" (click)="close()">
<ui-icon icon="close" size="20px"></ui-icon>
</button>
<div class="toast-content flex flex-col justify-center items-center">
<h1 class="text-card-sub font-bold text-center py-3 whitespace-pre-wrap">{{ data.title }}</h1>
<ng-container *ngIf="data.text; else templateRef">
<p class="block text-base overflow-y-hidden pb-3 text-center overflow-x-hidden">{{ data.text }}</p>
</ng-container>
</div>
</div>
<ng-template #templateRef>
<ng-container *ngTemplateOutlet="data.template; context: data.templateContext"> </ng-container>
</ng-template>

View File

@@ -0,0 +1,12 @@
.toast-main {
@apply block relative mx-auto box-border text-white p-4;
background-color: var(--toast-background);
min-width: 18.75rem;
max-width: calc(100vw - 2rem);
min-height: 5rem;
border-radius: 25px;
}
.toast-content {
min-height: 3rem;
}

View File

@@ -0,0 +1,24 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ToastComponent } from './toast.component';
describe('ToastComponent', () => {
let component: ToastComponent;
let fixture: ComponentFixture<ToastComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ToastComponent],
}).compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(ToastComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,48 @@
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, OnDestroy, OnInit } from '@angular/core';
import { toastAnimations, ToastAnimationState, slideAnimationTime } from './animation';
import { Toast, ToastRef } from './defs';
import { TOAST_CONFIG_TOKEN } from './tokens';
@Component({
selector: 'lib-toast',
templateUrl: 'toast.component.html',
styleUrls: ['toast.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
animations: [toastAnimations.slideToast],
})
export class ToastComponent implements OnInit, OnDestroy {
timeoutRef?: any;
animationState: ToastAnimationState = 'default';
width = '55.25rem';
constructor(
@Inject(TOAST_CONFIG_TOKEN) public readonly data: Toast,
private readonly _ref: ToastRef,
private readonly _cdr: ChangeDetectorRef
) {}
ngOnInit(): void {
if (this.data?.size) {
this.width = this.data?.size === 'width-full' ? '100vw' : '55.25rem';
}
this.timeoutRef = setTimeout(() => {
this.close();
this._cdr.markForCheck();
}, slideAnimationTime + (this.data.timer ?? 5000));
}
ngOnDestroy() {
clearTimeout(this.timeoutRef);
}
close() {
this.animationState = 'closing';
}
onSlideFinished() {
if (this.animationState === 'closing') {
this._ref.close();
}
}
}

View File

@@ -0,0 +1,12 @@
import { OverlayModule } from '@angular/cdk/overlay';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { UiIconModule } from '@ui/icon';
import { ToastComponent } from './toast.component';
@NgModule({
declarations: [ToastComponent],
imports: [CommonModule, OverlayModule, UiIconModule],
exports: [ToastComponent],
})
export class ToastModule {}

View File

@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { ToastService } from './toast.service';
describe('ToastService', () => {
let service: ToastService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(ToastService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});

View File

@@ -0,0 +1,79 @@
import { Overlay } from '@angular/cdk/overlay';
import { ComponentPortal } from '@angular/cdk/portal';
import { Injectable, Injector } from '@angular/core';
import { Toast, ToastRef } from './defs';
import { ToastComponent } from './toast.component';
import { TOAST_CONFIG_TOKEN } from './tokens';
@Injectable({
providedIn: 'root',
})
export class ToastService {
private _lastToastRef: ToastRef;
get lastToastRef() {
return this._lastToastRef;
}
set lastToastRef(toastRef: ToastRef) {
this._lastToastRef = toastRef;
}
constructor(private readonly _overlay: Overlay, private readonly _injector: Injector) {}
create(data: Toast) {
const positionStrategy = this.getPositionStrategy(data);
const overlayRef = this._overlay.create({ positionStrategy });
this.lastToastRef = new ToastRef(overlayRef);
const injector = this.getInjector(data, this.lastToastRef);
const toastPortal = new ComponentPortal(ToastComponent, null, injector);
overlayRef.attach(toastPortal);
return this.lastToastRef;
}
getInjector(data: Toast, ref: ToastRef) {
return Injector.create({
parent: this._injector,
providers: [
{ provide: TOAST_CONFIG_TOKEN, useValue: data },
{ provide: ToastRef, useValue: ref },
],
});
}
getPositionStrategy(data: Toast) {
switch (data?.position) {
case 'top':
return this._overlay.position().global().top(this.getNextPosition()).centerHorizontally();
case 'top-left':
return this._overlay.position().global().top(this.getNextPosition()).left('1rem');
case 'top-right':
return this._overlay.position().global().top(this.getNextPosition()).right('1rem');
case 'bottom':
return this._overlay.position().global().bottom(this.getNextPosition(true)).centerHorizontally();
case 'bottom-left':
return this._overlay.position().global().bottom(this.getNextPosition(true)).left('1rem');
case 'bottom-right':
return this._overlay.position().global().bottom(this.getNextPosition(true)).right('1rem');
default:
return this._overlay.position().global().top(this.getNextPosition()).centerHorizontally();
}
}
getNextPosition(fromBottom?: boolean) {
const lastToastIsVisible = this.lastToastRef && this.lastToastRef.isVisible();
let position = fromBottom ? 6 : 9;
if (lastToastIsVisible && fromBottom) {
position = (window.innerHeight - this.lastToastRef.getPosition().bottom + this.lastToastRef.getPosition().height + 16) / 16;
} else if (lastToastIsVisible) {
position = (this.lastToastRef.getPosition().bottom + 16) / 16;
}
return position + 'rem';
}
}

View File

@@ -0,0 +1,4 @@
import { InjectionToken } from '@angular/core';
import { Toast } from './defs';
export const TOAST_CONFIG_TOKEN = new InjectionToken<Toast>('TOAST_DATA');

View File

@@ -1,5 +1,5 @@
/*
* Public API Surface of sso
* Public API Surface of toast
*/
export * from './lib';

View File

@@ -1,14 +1,9 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { teardown: { destroyAfterEach: true } });

View File

@@ -0,0 +1,19 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
"types": [],
"lib": [
"dom",
"es2018"
]
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@@ -1,9 +1,10 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"compilationMode": "partial"
}
}
}

View File

@@ -0,0 +1,17 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine"
]
},
"files": [
"src/test.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@@ -1,34 +1,42 @@
import { Injectable } from '@angular/core';
import { ItemDTO, SearchService } from '@swagger/cat';
import { AvailabilityDTO, BranchDTO, OLAAvailabilityDTO, StoreCheckoutService, SupplierDTO } from '@swagger/checkout';
import { ItemDTO } from '@swagger/cat';
import {
AvailabilityDTO,
BranchDTO,
OLAAvailabilityDTO,
StoreCheckoutBranchService,
StoreCheckoutSupplierService,
SupplierDTO,
} from '@swagger/checkout';
import { combineLatest, Observable, of } from 'rxjs';
import {
AvailabilityRequestDTO,
AvailabilityService as SwaggerAvailabilityService,
AvailabilityService,
AvailabilityDTO as SwaggerAvailabilityDTO,
AvailabilityType,
} from '@swagger/availability';
import { AvailabilityDTO as CatAvailabilityDTO } from '@swagger/cat';
import { map, shareReplay, switchMap, withLatestFrom, mergeMap, timeout } from 'rxjs/operators';
import { isArray, memorize } from '@utils/common';
import { OrderService } from '@swagger/oms';
import { LogisticianDTO, LogisticianService } from '@swagger/oms';
import { ResponseArgsOfIEnumerableOfStockInfoDTO, StockDTO, StockInfoDTO, StockService } from '@swagger/remi';
import { ItemData } from './defs/item-data.model';
import { PriceDTO } from '@swagger/availability';
import { AvailabilityByBranchDTO } from './defs/availability-by-branch-dto.model';
import { AvailabilityByBranchDTO, ItemData } from './defs';
import { Availability } from './defs/availability';
@Injectable()
export class DomainAvailabilityService {
constructor(
private swaggerAvailabilityService: SwaggerAvailabilityService,
private storeCheckoutService: StoreCheckoutService,
private orderService: OrderService,
private _stock: StockService
private _availabilityService: AvailabilityService,
private _logisticanService: LogisticianService,
private _stockService: StockService,
private _supplierService: StoreCheckoutSupplierService,
private _branchService: StoreCheckoutBranchService
) {}
@memorize()
getSuppliers(): Observable<SupplierDTO[]> {
return this.storeCheckoutService.StoreCheckoutGetSuppliers({}).pipe(
return this._supplierService.StoreCheckoutSupplierGetSuppliers({}).pipe(
map((response) => response.result),
shareReplay()
);
@@ -36,15 +44,15 @@ export class DomainAvailabilityService {
@memorize()
getTakeAwaySupplier(): Observable<SupplierDTO> {
return this.storeCheckoutService.StoreCheckoutGetSuppliers({}).pipe(
map(({ result }) => result.find((supplier) => supplier?.supplierNumber === 'F')),
return this._supplierService.StoreCheckoutSupplierGetSuppliers({}).pipe(
map(({ result }) => result?.find((supplier) => supplier?.supplierNumber === 'F')),
shareReplay()
);
}
@memorize()
getBranches(): Observable<BranchDTO[]> {
return this.storeCheckoutService.StoreCheckoutGetBranches({}).pipe(
return this._branchService.StoreCheckoutBranchGetBranches({}).pipe(
map((response) => response.result),
shareReplay()
);
@@ -52,7 +60,7 @@ export class DomainAvailabilityService {
@memorize()
getCurrentStock(): Observable<StockDTO> {
return this._stock.StockCurrentStock().pipe(
return this._stockService.StockCurrentStock().pipe(
map((response) => response.result),
shareReplay()
);
@@ -60,7 +68,7 @@ export class DomainAvailabilityService {
@memorize()
getCurrentBranch(): Observable<BranchDTO> {
return this._stock.StockCurrentBranch().pipe(
return this._stockService.StockCurrentBranch().pipe(
map((response) => ({
id: response.result.id,
name: response.result.name,
@@ -83,8 +91,8 @@ export class DomainAvailabilityService {
}
@memorize({})
getLogisticians() {
return this.orderService.OrderGetLogisticians({}).pipe(
getLogisticians(): Observable<LogisticianDTO> {
return this._logisticanService.LogisticianGetLogisticians({}).pipe(
map((response) => response.result?.find((l) => l.logisticianNumber === '2470')),
shareReplay()
);
@@ -101,7 +109,7 @@ export class DomainAvailabilityService {
price: PriceDTO;
quantity: number;
}): Observable<AvailabilityByBranchDTO[]> {
return this._stock.StockStockRequest({ stockRequest: { branchIds, itemId } }).pipe(
return this._stockService.StockStockRequest({ stockRequest: { branchIds, itemId } }).pipe(
map((response) => response.result),
withLatestFrom(this.getTakeAwaySupplier()),
map(([result, supplier]) => {
@@ -125,8 +133,13 @@ export class DomainAvailabilityService {
getTakeAwayAvailability({ item, quantity }: { item: ItemData; quantity: number }): Observable<AvailabilityDTO> {
return this.getCurrentStock().pipe(
switchMap((s) => this._stock.StockInStock({ articleIds: [item.itemId], stockId: s.id })),
withLatestFrom(this.getTakeAwaySupplier(), this.getCurrentBranch()),
switchMap((s) =>
combineLatest([
this._stockService.StockInStock({ articleIds: [item.itemId], stockId: s.id }),
this.getTakeAwaySupplier(),
this.getCurrentBranch(),
])
),
map(([response, supplier, branch]) => {
const price = item?.price;
return this._mapToTakeAwayAvailability({ response, supplier, branch, quantity, price });
@@ -148,7 +161,7 @@ export class DomainAvailabilityService {
quantity: number;
}): Observable<AvailabilityDTO> {
return combineLatest([
this._stock.StockStockRequest({ stockRequest: { branchIds: [branch.id], itemId } }),
this._stockService.StockStockRequest({ stockRequest: { branchIds: [branch.id], itemId } }),
this.getTakeAwaySupplier(),
]).pipe(
map(([response, supplier]) => {
@@ -168,7 +181,7 @@ export class DomainAvailabilityService {
quantity: number;
}): Observable<AvailabilityDTO> {
return this.getCurrentStock().pipe(
switchMap((s) => this._stock.StockInStockByEAN({ eans, stockId: s.id })),
switchMap((s) => this._stockService.StockInStockByEAN({ eans, stockId: s.id })),
withLatestFrom(this.getTakeAwaySupplier(), this.getCurrentBranch()),
map(([response, supplier, branch]) => {
return this._mapToTakeAwayAvailability({ response, supplier, branch, quantity, price });
@@ -180,7 +193,7 @@ export class DomainAvailabilityService {
getTakeAwayAvailabilitiesByEans({ eans }: { eans: string[] }): Observable<StockInfoDTO[]> {
const eansFiltered = Array.from(new Set(eans));
return this.getCurrentStock().pipe(
switchMap((s) => this._stock.StockInStockByEAN({ eans: eansFiltered, stockId: s.id })),
switchMap((s) => this._stockService.StockInStockByEAN({ eans: eansFiltered, stockId: s.id })),
withLatestFrom(this.getTakeAwaySupplier(), this.getCurrentBranch()),
map((response) => response[0].result),
shareReplay()
@@ -188,8 +201,16 @@ export class DomainAvailabilityService {
}
@memorize({ ttl: 10000 })
getPickUpAvailability({ item, branch, quantity }: { item: ItemData; quantity: number; branch: BranchDTO }): Observable<AvailabilityDTO> {
return this.swaggerAvailabilityService
getPickUpAvailability({
item,
branch,
quantity,
}: {
item: ItemData;
quantity: number;
branch: BranchDTO;
}): Observable<Availability<AvailabilityDTO, SwaggerAvailabilityDTO>> {
return this._availabilityService
.AvailabilityStoreAvailability([
{
qty: quantity,
@@ -207,7 +228,7 @@ export class DomainAvailabilityService {
@memorize({ ttl: 10000 })
getDeliveryAvailability({ item, quantity }: { item: ItemData; quantity: number }): Observable<AvailabilityDTO> {
return this.swaggerAvailabilityService
return this._availabilityService
.AvailabilityShippingAvailability([
{
ean: item?.ean,
@@ -225,7 +246,7 @@ export class DomainAvailabilityService {
@memorize({ ttl: 10000 })
getDigDeliveryAvailability({ item, quantity }: { item: ItemData; quantity: number }): Observable<AvailabilityDTO> {
return this.swaggerAvailabilityService
return this._availabilityService
.AvailabilityShippingAvailability([
{
qty: quantity,
@@ -270,7 +291,11 @@ export class DomainAvailabilityService {
timeout(5000),
mergeMap((branch) =>
this.getPickUpAvailability({ item, quantity, branch }).pipe(
mergeMap((availability) => logistician$.pipe(map((logistician) => ({ ...availability, logistician: { id: logistician.id } })))),
mergeMap((availability) =>
logistician$.pipe(
map((logistician) => ({ ...(availability?.length > 0 ? availability[0] : []), logistician: { id: logistician.id } }))
)
),
shareReplay()
)
)
@@ -279,7 +304,7 @@ export class DomainAvailabilityService {
@memorize({ ttl: 10000 })
getDownloadAvailability({ item }: { item: ItemData }): Observable<AvailabilityDTO> {
return this.swaggerAvailabilityService
return this._availabilityService
.AvailabilityShippingAvailability([
{
ean: item?.ean,
@@ -314,11 +339,11 @@ export class DomainAvailabilityService {
@memorize({ ttl: 10000 })
getTakeAwayAvailabilities(items: { id: number; price: PriceDTO }[], branchId: number) {
return this._stock.StockGetStocksByBranch({ branchId }).pipe(
return this._stockService.StockGetStocksByBranch({ branchId }).pipe(
map((req) => req.result?.find((_) => true)?.id),
switchMap((stockId) =>
stockId
? this._stock.StockInStock({ articleIds: items.map((i) => i.id), stockId })
? this._stockService.StockInStock({ articleIds: items.map((i) => i.id), stockId })
: of({ result: [] } as ResponseArgsOfIEnumerableOfStockInfoDTO)
),
timeout(20000),
@@ -339,7 +364,7 @@ export class DomainAvailabilityService {
@memorize({ ttl: 10000 })
getPickUpAvailabilities(payload: AvailabilityRequestDTO[], preferred?: boolean) {
return this.swaggerAvailabilityService.AvailabilityStoreAvailability(payload).pipe(
return this._availabilityService.AvailabilityStoreAvailability(payload).pipe(
timeout(20000),
map((response) => (preferred ? this._mapToPickUpAvailability(response.result) : response.result))
);
@@ -347,7 +372,7 @@ export class DomainAvailabilityService {
@memorize({ ttl: 10000 })
getDeliveryAvailabilities(payload: AvailabilityRequestDTO[]) {
return this.swaggerAvailabilityService.AvailabilityShippingAvailability(payload).pipe(
return this._availabilityService.AvailabilityShippingAvailability(payload).pipe(
timeout(20000),
map((response) => this._mapToShippingAvailability(response.result))
);
@@ -355,7 +380,7 @@ export class DomainAvailabilityService {
@memorize({ ttl: 10000 })
getDigDeliveryAvailabilities(payload: AvailabilityRequestDTO[]) {
return this.swaggerAvailabilityService.AvailabilityShippingAvailability(payload).pipe(
return this._availabilityService.AvailabilityShippingAvailability(payload).pipe(
timeout(20000),
map((response) => this._mapToShippingAvailability(response.result))
);
@@ -381,7 +406,7 @@ export class DomainAvailabilityService {
): PriceDTO {
switch (purchasingOption) {
case 'take-away':
return availability?.price || availability?.retailPrice;
return availability?.price || catalogAvailability?.price;
case 'delivery':
case 'dig-delivery':
if (catalogAvailability?.price?.value?.value < availability?.price?.value?.value) {
@@ -442,9 +467,11 @@ export class DomainAvailabilityService {
inStock: inStock,
supplierSSC: quantity <= inStock ? '999' : '',
supplierSSCText: quantity <= inStock ? 'Filialentnahme' : '',
price,
price: price ?? stockInfo?.retailPrice,
supplier: { id: supplier?.id },
retailPrice: (stockInfo as any)?.retailPrice, // TODO: Change after API Update
// TODO: Change after API Update
// LH: 2021-03-09 preis Property hat nun ein Fallback auf retailPrice
// retailPrice: (stockInfo as any)?.retailPrice,
};
return availability;
}
@@ -474,26 +501,29 @@ export class DomainAvailabilityService {
return availability;
}
private _mapToPickUpAvailability(availabilities: SwaggerAvailabilityDTO[]) {
private _mapToPickUpAvailability(availabilities: SwaggerAvailabilityDTO[]): Availability<AvailabilityDTO, SwaggerAvailabilityDTO>[] {
if (isArray(availabilities)) {
const preferred = availabilities.filter((f) => f.preferred === 1);
const totalAvailable = availabilities.reduce((sum, av) => sum + (av?.qty || 0), 0);
return preferred.map((p) => {
return {
availabilityType: p?.status,
ssc: p?.ssc,
sscText: p?.sscText,
supplier: { id: p?.supplierId },
isPrebooked: p?.isPrebooked,
estimatedShippingDate: p?.requestStatusCode === '32' ? p?.altAt : p?.at,
price: p?.price,
inStock: totalAvailable,
supplierProductNumber: p?.supplierProductNumber,
supplierInfo: p?.requestStatusCode,
lastRequest: p?.requested,
itemId: p.itemId,
};
return [
{
availabilityType: p?.status,
ssc: p?.ssc,
sscText: p?.sscText,
supplier: { id: p?.supplierId },
isPrebooked: p?.isPrebooked,
estimatedShippingDate: p?.requestStatusCode === '32' ? p?.altAt : p?.at,
price: p?.price,
inStock: totalAvailable,
supplierProductNumber: p?.supplierProductNumber,
supplierInfo: p?.requestStatusCode,
lastRequest: p?.requested,
itemId: p.itemId,
},
p,
];
});
}
}

View File

@@ -0,0 +1 @@
export type Availability<T, S> = [T, S];

View File

@@ -1,3 +1,3 @@
// start:ng42.barrel
export * from './item-data.model';
// end:ng42.barrel
export * from './availability-by-branch-dto';
export * from './availability';
export * from './item-data';

View File

@@ -5,20 +5,7 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(
path: string,
deep?: boolean,
filter?: RegExp
): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

View File

@@ -3,7 +3,6 @@
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,

View File

@@ -5,6 +5,6 @@
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"compilationMode": "partial"
}
}

View File

@@ -5,20 +5,7 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(
path: string,
deep?: boolean,
filter?: RegExp
): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

View File

@@ -3,7 +3,6 @@
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,

View File

@@ -5,6 +5,6 @@
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"compilationMode": "partial"
}
}

View File

@@ -21,7 +21,7 @@ export class ThumbnailUrlPipe implements PipeTransform, OnDestroy {
this.input$.complete();
}
transform(ean: string, width: number, height: number): any {
transform(ean: string, width?: number, height?: number): any {
this.input$.next({ ean, width, height });
this.input$

View File

@@ -5,20 +5,7 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(
path: string,
deep?: boolean,
filter?: RegExp
): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

View File

@@ -3,7 +3,6 @@
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,

View File

@@ -5,6 +5,6 @@
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"compilationMode": "partial"
}
}

View File

@@ -21,8 +21,13 @@ import {
UpdateShoppingCartItemDTO,
InputDTO,
ItemPayload,
StoreCheckoutShoppingCartService,
StoreCheckoutPaymentService,
StoreCheckoutBuyerService,
StoreCheckoutPayerService,
StoreCheckoutBranchService,
} from '@swagger/checkout';
import { DisplayOrderDTO, OrderCheckoutService, ReorderValues } from '@swagger/oms';
import { DisplayOrderDTO, DisplayOrderItemDTO, OrderCheckoutService, ReorderValues } from '@swagger/oms';
import { isNullOrUndefined, memorize } from '@utils/common';
import { combineLatest, Observable, of, concat, isObservable, throwError } from 'rxjs';
import { bufferCount, catchError, filter, first, map, mergeMap, shareReplay, switchMap, tap, withLatestFrom } from 'rxjs/operators';
@@ -32,6 +37,7 @@ import * as DomainCheckoutActions from './store/domain-checkout.actions';
import { DomainAvailabilityService } from '@domain/availability';
import { HttpErrorResponse } from '@angular/common/http';
import { ApplicationService } from '@core/application';
import { CustomerDTO, EntityDTOContainerOfAttributeDTO } from '@swagger/crm';
@Injectable()
export class DomainCheckoutService {
@@ -40,7 +46,12 @@ export class DomainCheckoutService {
private applicationService: ApplicationService,
private storeCheckoutService: StoreCheckoutService,
private orderCheckoutService: OrderCheckoutService,
private availabilityService: DomainAvailabilityService
private availabilityService: DomainAvailabilityService,
private _shoppingCartService: StoreCheckoutShoppingCartService,
private _paymentService: StoreCheckoutPaymentService,
private _buyerService: StoreCheckoutBuyerService,
private _payerService: StoreCheckoutPayerService,
private _branchService: StoreCheckoutBranchService
) {}
//#region shoppingcart
@@ -53,8 +64,8 @@ export class DomainCheckoutService {
return false;
} else if (cart && _latest) {
_latest = false;
this.storeCheckoutService
.StoreCheckoutGetShoppingCart({
this._shoppingCartService
.StoreCheckoutShoppingCartGetShoppingCart({
shoppingCartId: cart.id,
})
.pipe(
@@ -77,7 +88,7 @@ export class DomainCheckoutService {
}
createShoppingCart({ processId }: { processId: number }): Observable<ShoppingCartDTO> {
return this.storeCheckoutService.StoreCheckoutCreateShoppingCart().pipe(
return this._shoppingCartService.StoreCheckoutShoppingCartCreateShoppingCart().pipe(
map((response) => response.result),
tap((shoppingCart) =>
this.store.dispatch(
@@ -94,8 +105,8 @@ export class DomainCheckoutService {
return this.getShoppingCart({ processId }).pipe(
first(),
mergeMap((cart) =>
this.storeCheckoutService
.StoreCheckoutAddItemToShoppingCart({
this._shoppingCartService
.StoreCheckoutShoppingCartAddItemToShoppingCart({
items,
shoppingCartId: cart.id,
})
@@ -125,8 +136,8 @@ export class DomainCheckoutService {
return this.getShoppingCart({ processId }).pipe(
first(),
mergeMap((shoppingCart) =>
this.storeCheckoutService
.StoreCheckoutSetLogisticianOnDestinationsByBuyer({
this._shoppingCartService
.StoreCheckoutShoppingCartSetLogisticianOnDestinationsByBuyer({
shoppingCartId: shoppingCart?.id,
payload: { customerFeatures },
})
@@ -139,7 +150,7 @@ export class DomainCheckoutService {
return this.getShoppingCart({ processId }).pipe(
first(),
mergeMap((cart) =>
this.storeCheckoutService.StoreCheckoutCanAddDestination({
this._shoppingCartService.StoreCheckoutShoppingCartCanAddDestination({
shoppingCartId: cart.id,
payload: destinationDTO,
})
@@ -166,8 +177,8 @@ export class DomainCheckoutService {
first(),
withLatestFrom(this.store.select(DomainCheckoutSelectors.selectCustomerFeaturesByProcessId, { processId })),
mergeMap(([shoppingCart, customerFeatures]) =>
this.storeCheckoutService
.StoreCheckoutCanAddItem({
this._shoppingCartService
.StoreCheckoutShoppingCartCanAddItem({
shoppingCartId: shoppingCart?.id,
payload: {
customerFeatures,
@@ -199,8 +210,8 @@ export class DomainCheckoutService {
orderType,
};
});
return this.storeCheckoutService
.StoreCheckoutCanAddItems({
return this._shoppingCartService
.StoreCheckoutShoppingCartCanAddItems({
shoppingCartId: shoppingCart.id,
payload,
})
@@ -222,7 +233,7 @@ export class DomainCheckoutService {
shoppingCartItemId: number;
availability: AvailabilityDTO;
}) {
return this.storeCheckoutService.StoreCheckoutUpdateShoppingCartItemAvailability({
return this._shoppingCartService.StoreCheckoutShoppingCartUpdateShoppingCartItemAvailability({
shoppingCartId,
shoppingCartItemId,
availability,
@@ -241,8 +252,8 @@ export class DomainCheckoutService {
return this.getShoppingCart({ processId }).pipe(
first(),
mergeMap((shoppingCart) =>
this.storeCheckoutService
.StoreCheckoutUpdateShoppingCartItem({
this._shoppingCartService
.StoreCheckoutShoppingCartUpdateShoppingCartItem({
shoppingCartId: shoppingCart.id,
shoppingCartItemId,
values: update,
@@ -318,8 +329,8 @@ export class DomainCheckoutService {
return this.getCheckout({ processId }).pipe(
first(),
mergeMap((checkout) =>
this.storeCheckoutService
.StoreCheckoutGetCheckoutPayment({
this._paymentService
.StoreCheckoutPaymentGetCheckoutPayment({
checkoutId: checkout.id,
})
.pipe(map((response) => response.result))
@@ -335,8 +346,8 @@ export class DomainCheckoutService {
return this.getCheckout({ processId }).pipe(
first(),
mergeMap((checkout) =>
this.storeCheckoutService
.StoreCheckoutSetPaymentType({
this._paymentService
.StoreCheckoutPaymentSetPaymentType({
checkoutId: checkout?.id,
paymentType,
})
@@ -352,8 +363,8 @@ export class DomainCheckoutService {
return this.getCheckout({ processId }).pipe(
first(),
mergeMap((checkout) =>
this.storeCheckoutService
.StoreCheckoutSetBuyer({
this._buyerService
.StoreCheckoutBuyerSetBuyerPOST({
checkoutId: checkout?.id,
buyerDTO: buyer,
})
@@ -369,8 +380,8 @@ export class DomainCheckoutService {
return this.getCheckout({ processId }).pipe(
first(),
mergeMap((checkout) =>
this.storeCheckoutService
.StoreCheckoutSetPayer({
this._payerService
.StoreCheckoutPayerSetPayerPOST({
checkoutId: checkout?.id,
payerDTO: payer,
})
@@ -389,7 +400,7 @@ export class DomainCheckoutService {
mergeMap((cart) =>
concat(
...cart.items.map((item) =>
this.storeCheckoutService.StoreCheckoutUpdateShoppingCartItem({
this._shoppingCartService.StoreCheckoutShoppingCartUpdateShoppingCartItem({
shoppingCartId: cart.id,
shoppingCartItemId: item.id,
values: { specialComment },
@@ -650,7 +661,7 @@ export class DomainCheckoutService {
first(),
mergeMap((checkout) =>
this.orderCheckoutService
.OrderCheckoutCreateOrder({
.OrderCheckoutCreateOrderPOST({
checkoutId: checkout.id,
})
.pipe(
@@ -734,8 +745,8 @@ export class DomainCheckoutService {
return this.getShoppingCart({ processId }).pipe(
first(),
mergeMap((shoppingCart) =>
this.storeCheckoutService
.StoreCheckoutCanAddBuyer({
this._shoppingCartService
.StoreCheckoutShoppingCartCanAddBuyer({
shoppingCartId: shoppingCart.id,
payload: { customerFeatures },
})
@@ -771,35 +782,39 @@ export class DomainCheckoutService {
return this.canSetCustomer({ processId, customerFeatures: undefined }).pipe(
map((res) => {
let setableTypes: { [key: string]: boolean } = {
store: true,
guest: true,
webshop: true,
b2b: true,
store: false,
guest: false,
webshop: false,
b2b: false,
};
if (Object.keys(res.filter).length === 0) {
return setableTypes;
}
res.create?.options?.values?.forEach((option) => {
setableTypes[option.value] = option.enabled !== false;
});
const customerTypes = res.filter?.customertype?.split(';') || [];
const customerAttributes = res.filter?.customerattributes?.split(';') || [];
// if (Object.keys(res.filter).length === 0) {
// return setableTypes;
// }
const typesAndAttributes = [...customerTypes, ...customerAttributes];
if (typesAndAttributes.includes('webshop') && !typesAndAttributes.includes('!guest')) {
typesAndAttributes.push('guest');
}
// const customerTypes = res.filter?.customertype?.split(';') || [];
// const customerAttributes = res.filter?.customerattributes?.split(';') || [];
for (const key in setableTypes) {
if (Object.prototype.hasOwnProperty.call(setableTypes, key)) {
if (typesAndAttributes.includes(key)) {
setableTypes[key] = true;
} else if (typesAndAttributes.includes(`!${key}`)) {
setableTypes[key] = false;
} else {
setableTypes[key] = false;
}
}
}
// const typesAndAttributes = [...customerTypes, ...customerAttributes];
// if (typesAndAttributes.includes('webshop') && !typesAndAttributes.includes('!guest')) {
// typesAndAttributes.push('guest');
// }
// for (const key in setableTypes) {
// if (Object.prototype.hasOwnProperty.call(setableTypes, key)) {
// if (typesAndAttributes.includes(key)) {
// setableTypes[key] = true;
// } else if (typesAndAttributes.includes(`!${key}`)) {
// setableTypes[key] = false;
// } else {
// setableTypes[key] = false;
// }
// }
// }
return setableTypes;
})
@@ -808,8 +823,8 @@ export class DomainCheckoutService {
@memorize()
getBranches(): Observable<BranchDTO[]> {
return this.storeCheckoutService
.StoreCheckoutGetBranches({
return this._branchService
.StoreCheckoutBranchGetBranches({
take: 999,
})
.pipe(
@@ -828,10 +843,6 @@ export class DomainCheckoutService {
.pipe(map((response) => response.result));
}
setCustomerFeatures({ processId, customerFeatures }: { processId: number; customerFeatures: { [key: string]: string } }) {
this.store.dispatch(DomainCheckoutActions.setCustomerFeatures({ processId, customerFeatures }));
}
setOlaErrors({ processId, errorIds }: { processId: number; errorIds: number[] }) {
this.store.dispatch(
DomainCheckoutActions.setOlaError({
@@ -857,6 +868,14 @@ export class DomainCheckoutService {
this.store.dispatch(DomainCheckoutActions.removeProcess({ processId }));
}
setCustomer({ processId, customerDto }: { processId: number; customerDto: CustomerDTO }) {
this.store.dispatch(DomainCheckoutActions.setCustomer({ processId, customer: customerDto }));
}
getCustomer({ processId }: { processId: number }): Observable<CustomerDTO> {
return this.store.select(DomainCheckoutSelectors.selectCustomerByProcessId, { processId });
}
setPayer({ processId, payer }: { processId: number; payer: PayerDTO }) {
this.store.dispatch(DomainCheckoutActions.setPayer({ processId, payer }));
}
@@ -877,6 +896,14 @@ export class DomainCheckoutService {
return this.store.select(DomainCheckoutSelectors.selectOrders);
}
updateOrderItem(item: DisplayOrderItemDTO) {
this.store.dispatch(DomainCheckoutActions.updateOrderItem({ item }));
}
removeAllOrders() {
this.store.dispatch(DomainCheckoutActions.removeAllOrders());
}
setSpecialComment({ processId, agentComment }: { processId: number; agentComment: string }) {
this.store.dispatch(DomainCheckoutActions.setSpecialComment({ processId, agentComment }));
}

View File

@@ -1,11 +1,12 @@
import { BuyerDTO, CheckoutDTO, NotificationChannel, PayerDTO, ShippingAddressDTO, ShoppingCartDTO } from '@swagger/checkout';
import { CustomerDTO } from '@swagger/crm';
import { DisplayOrderDTO } from '@swagger/oms';
export interface CheckoutEntity {
processId: number;
checkout: CheckoutDTO;
shoppingCart: ShoppingCartDTO;
customerFeatures: { [key: string]: string };
customer: CustomerDTO;
payer: PayerDTO;
buyer: BuyerDTO;
shippingAddress: ShippingAddressDTO;

View File

@@ -8,7 +8,8 @@ import {
BuyerDTO,
PayerDTO,
} from '@swagger/checkout';
import { DisplayOrderDTO } from '@swagger/oms';
import { CustomerDTO } from '@swagger/crm';
import { DisplayOrderDTO, DisplayOrderItemDTO } from '@swagger/oms';
const prefix = '[DOMAIN-CHECKOUT]';
@@ -38,11 +39,6 @@ export const setCheckoutDestination = createAction(
props<{ processId: number; destination: DestinationDTO }>()
);
export const setCustomerFeatures = createAction(
`${prefix} Set Customer Features`,
props<{ processId: number; customerFeatures: { [key: string]: string } }>()
);
export const setShippingAddress = createAction(
`${prefix} Set Shipping Address`,
props<{ processId: number; shippingAddress: ShippingAddressDTO }>()
@@ -52,6 +48,10 @@ export const removeProcess = createAction(`${prefix} Remove Process`, props<{ pr
export const setOrders = createAction(`${prefix} Add Orders`, props<{ orders: DisplayOrderDTO[] }>());
export const updateOrderItem = createAction(`${prefix} Update Orders`, props<{ item: DisplayOrderItemDTO }>());
export const removeAllOrders = createAction(`${prefix} Remove All Orders`);
export const setBuyer = createAction(`${prefix} Set Buyer`, props<{ processId: number; buyer: BuyerDTO }>());
export const setPayer = createAction(`${prefix} Set Payer`, props<{ processId: number; payer: PayerDTO }>());
@@ -59,3 +59,5 @@ export const setPayer = createAction(`${prefix} Set Payer`, props<{ processId: n
export const setSpecialComment = createAction(`${prefix} Set Agent Comment`, props<{ processId: number; agentComment: string }>());
export const setOlaError = createAction(`${prefix} Set Ola Error`, props<{ processId: number; olaErrorIds: number[] }>());
export const setCustomer = createAction(`${prefix} Set Customer`, props<{ processId: number; customer: CustomerDTO }>());

View File

@@ -46,11 +46,6 @@ const _domainCheckoutReducer = createReducer(
};
return storeCheckoutAdapter.setOne(entity, s);
}),
on(DomainCheckoutActions.setCustomerFeatures, (s, { processId, customerFeatures }) => {
const entity = getOrCreateCheckoutEntity({ processId, entities: s.entities });
entity.customerFeatures = customerFeatures;
return storeCheckoutAdapter.setOne(entity, s);
}),
on(DomainCheckoutActions.setShippingAddress, (s, { processId, shippingAddress }) => {
const entity = getOrCreateCheckoutEntity({ processId, entities: s.entities });
entity.shippingAddress = shippingAddress;
@@ -72,11 +67,39 @@ const _domainCheckoutReducer = createReducer(
return storeCheckoutAdapter.setOne(entity, s);
}),
on(DomainCheckoutActions.removeProcess, (s, { processId }) => storeCheckoutAdapter.removeOne(processId, s)),
on(DomainCheckoutActions.setOrders, (s, { orders }) => ({ ...s, orders })),
on(DomainCheckoutActions.setOrders, (s, { orders }) => ({ ...s, orders: [...s.orders, ...orders] })),
on(DomainCheckoutActions.updateOrderItem, (s, { item }) => {
const orders = [...s.orders];
const orderToUpdate = orders?.find((order) => order.items?.find((i) => i.id === item?.id));
const orderToUpdateIndex = orders?.indexOf(orderToUpdate);
const orderItemToUpdate = orderToUpdate?.items?.find((i) => i.id === item?.id);
const orderItemToUpdateIndex = orderToUpdate?.items?.indexOf(orderItemToUpdate);
const items = [...orderToUpdate?.items];
items[orderItemToUpdateIndex] = item;
orders[orderToUpdateIndex] = {
...orderToUpdate,
items: [...items],
};
return { ...s, orders: [...orders] };
}),
on(DomainCheckoutActions.removeAllOrders, (s) => ({
...s,
orders: [],
})),
on(DomainCheckoutActions.setOlaError, (s, { processId, olaErrorIds }) => {
const entity = getOrCreateCheckoutEntity({ processId, entities: s.entities });
entity.olaErrorIds = olaErrorIds;
return storeCheckoutAdapter.setOne(entity, s);
}),
on(DomainCheckoutActions.setCustomer, (s, { processId, customer }) => {
const entity = getOrCreateCheckoutEntity({ processId, entities: s.entities });
entity.customer = customer;
return storeCheckoutAdapter.setOne(entity, s);
})
);
@@ -92,7 +115,6 @@ function getOrCreateCheckoutEntity({ entities, processId }: { entities: Dictiona
processId,
checkout: undefined,
shoppingCart: undefined,
customerFeatures: undefined,
shippingAddress: undefined,
orders: [],
payer: undefined,
@@ -100,6 +122,7 @@ function getOrCreateCheckoutEntity({ entities, processId }: { entities: Dictiona
specialComment: '',
notificationChannels: 0,
olaErrorIds: [],
customer: undefined,
};
}

View File

@@ -1,5 +1,6 @@
import { Dictionary } from '@ngrx/entity';
import { createSelector } from '@ngrx/store';
import { CustomerDTO } from '@swagger/crm';
import { CheckoutEntity } from './defs/checkout.entity';
import { storeCheckoutAdapter, storeFeatureSelector } from './domain-checkout.state';
@@ -22,7 +23,7 @@ export const selectCheckoutByProcessId = createSelector(
export const selectCustomerFeaturesByProcessId = createSelector(
selectEntities,
(entities: Dictionary<CheckoutEntity>, { processId }: { processId: number }) => entities[processId]?.customerFeatures
(entities: Dictionary<CheckoutEntity>, { processId }: { processId: number }) => getCusomterFeatures(entities[processId]?.customer)
);
export const selectShippingAddressByProcessId = createSelector(
@@ -61,3 +62,19 @@ export const selectOlaErrorsByProcessId = createSelector(
selectEntities,
(entities: Dictionary<CheckoutEntity>, { processId }: { processId: number }) => entities[processId]?.olaErrorIds
);
export const selectCustomerByProcessId = createSelector(
selectEntities,
(entities: Dictionary<CheckoutEntity>, { processId }: { processId: number }) => entities[processId]?.customer
);
function getCusomterFeatures(custoemr: CustomerDTO): { [key: string]: string } {
const customerFeatures = custoemr?.features ?? [];
const features: { [key: string]: string } = {};
for (const feature of customerFeatures) {
features[feature.key] = feature.key;
}
return features;
}

View File

@@ -5,11 +5,7 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

View File

@@ -3,7 +3,6 @@
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"declarationMap": true,
"target": "es2015",
"declaration": true,
"inlineSources": true,
"types": [],

View File

@@ -4,6 +4,6 @@
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"compilationMode": "partial"
}
}

View File

@@ -1,21 +1,26 @@
import { Injectable } from '@angular/core';
import {
AddressDTO,
AddressService,
AssignedPayerDTO,
AutocompleteDTO,
CommunicationDetailsDTO,
CountryDTO,
CountryService,
CustomerDTO,
CustomerInfoDTO,
CustomerService,
HistoryDTO,
InputDTO,
KeyValueDTOOfStringAndString,
ListResponseArgsOfCustomerInfoDTO,
LoyaltyCardService,
NotificationChannel,
PayerDTO,
PayerService,
ResponseArgsOfHistoryDTO,
ResponseArgsOfIEnumerableOfBonusCardInfoDTO,
ShippingAddressDTO,
ShippingAddressService,
} from '@swagger/crm';
import { isArray } from '@utils/common';
import { PagedResult, Result } from 'apps/domain/defs/src/public-api';
@@ -24,7 +29,14 @@ import { catchError, map, mergeMap, retry } from 'rxjs/operators';
@Injectable({ providedIn: 'root' })
export class CrmCustomerService {
constructor(private customerService: CustomerService, private payerService: PayerService) {}
constructor(
private customerService: CustomerService,
private payerService: PayerService,
private addressService: AddressService,
private countryService: CountryService,
private shippingAddressService: ShippingAddressService,
private loyaltyCardService: LoyaltyCardService
) {}
complete(queryString: string, filter?: { [key: string]: string }): Observable<Result<AutocompleteDTO[]>> {
return this.customerService.CustomerCustomerAutocomplete({
@@ -66,10 +78,6 @@ export class CrmCustomerService {
return this.customerService.CustomerGetAssignedPayersByCustomerId(params);
}
getFilters(): Observable<Result<InputDTO[]>> {
return this.customerService.CustomerQueryCustomerFilter();
}
/* @internal */
getNotificationChannelForCommunicationDetails({
communicationDetails,
@@ -96,12 +104,23 @@ export class CrmCustomerService {
return this.customerService.CustomerPatchCustomer({ customerId, customer: { ...customer, notificationChannels } });
}
createB2BCustomer(customer: CustomerDTO) {
createB2BCustomer(customer: CustomerDTO): Promise<Result<CustomerDTO>> {
const notificationChannels = this.getNotificationChannelForCommunicationDetails({
communicationDetails: customer?.communicationDetails,
});
return this.customerService.CustomerCreateCustomer({ ...customer, customerType: 16, notificationChannels });
const payload: CustomerDTO = { ...customer, customerType: 16, notificationChannels };
payload.shippingAddresses = payload.shippingAddresses ?? [];
payload.payers = payload.payers ?? [];
return this.customerService
.CustomerCreateCustomer({
customer: payload,
modifiers: [{ key: 'b2b', group: 'customertype' }],
})
.toPromise();
}
createOnlineCustomer(customer: CustomerDTO): Observable<Result<CustomerDTO>> {
@@ -148,63 +167,253 @@ export class CrmCustomerService {
];
}
return this.customerService.CustomerCreateOnlineCustomer({ ...payload, notificationChannels });
const p4mUser = customer.features.find((f) => f.key === 'p4mUser')?.value;
const modifiers: KeyValueDTOOfStringAndString[] = [{ key: 'webshop', group: 'customertype' }];
if (p4mUser) {
modifiers.push({ key: 'add-loyalty-card', value: p4mUser });
}
return this.customerService.CustomerCreateCustomer({
customer: { ...payload, notificationChannels },
modifiers,
});
}
createGuestCustomer(customer: CustomerDTO): Observable<Result<CustomerDTO>> {
mapCustomerToPayer(customer: CustomerDTO): PayerDTO {
return {
address: customer.address,
communicationDetails: customer.communicationDetails,
firstName: customer.firstName,
lastName: customer.lastName,
organisation: customer.organisation,
title: customer.title,
payerType: 1,
gender: customer.gender,
};
}
mapCustomerToShippingAddress(customer: CustomerDTO): ShippingAddressDTO {
return {
address: customer.address,
communicationDetails: customer.communicationDetails,
firstName: customer.firstName,
gender: customer.gender,
lastName: customer.lastName,
organisation: customer.organisation,
title: customer.title,
type: 1,
};
}
async updateToOnlineCustomer(customer: CustomerDTO): Promise<Result<CustomerDTO>> {
const payload: CustomerDTO = { shippingAddresses: [], payers: [], ...customer, customerType: 8, hasOnlineAccount: true };
const notificationChannels = this.getNotificationChannelForCommunicationDetails({
communicationDetails: payload?.communicationDetails,
});
const shippingAddressesToAdd = payload.shippingAddresses?.filter((sa) => !sa.id)?.map((m) => m.data) ?? [];
payload.shippingAddresses = payload.shippingAddresses?.filter((sa) => !!sa.id) ?? [];
if (payload.shippingAddresses.length === 0) {
shippingAddressesToAdd.unshift(this.mapCustomerToShippingAddress(payload));
}
const payersToAdd = payload.payers?.filter((p) => !p.assignedToCustomer)?.map((p) => p.payer?.data) ?? [];
payload.payers = payload.payers?.filter((p) => !!p.assignedToCustomer) ?? [];
if (payload.payers.length === 0) {
payersToAdd.unshift({
...this.mapCustomerToPayer(payload),
payerType: payload.customerType,
});
}
const modifiers: KeyValueDTOOfStringAndString[] = [{ key: 'webshop', group: 'customertype' }];
const res = await this.customerService
.CustomerUpdateCustomer({
customerId: customer.id,
payload: {
modifiers,
customer: { ...payload, notificationChannels },
},
})
.toPromise();
for (let shippingAddress of shippingAddressesToAdd) {
await this.createShippingAddress(res.result.id, shippingAddress, true);
}
for (let payer of payersToAdd) {
await this.createPayer(res.result.id, payer, true);
}
return res;
}
async updateToP4MOnlineCustomer(customer: CustomerDTO): Promise<Result<CustomerDTO>> {
const shippingAddressesToAdd = customer.shippingAddresses?.filter((sa) => !sa.id)?.map((m) => m.data) ?? [];
customer.shippingAddresses = customer.shippingAddresses?.filter((sa) => !!sa.id) ?? [];
if (customer.shippingAddresses.length === 0) {
shippingAddressesToAdd.unshift(this.mapCustomerToShippingAddress(customer));
}
const payersToAdd = customer.payers?.filter((p) => !p.assignedToCustomer)?.map((p) => p.payer?.data) ?? [];
customer.payers = customer.payers?.filter((p) => !!p.assignedToCustomer) ?? [];
if (customer.payers.length === 0) {
payersToAdd.unshift({
...this.mapCustomerToPayer(customer),
payerType: customer.customerType,
});
}
const p4mUser = customer.features.find((f) => f.key === 'p4mUser')?.value;
const modifiers: KeyValueDTOOfStringAndString[] = [{ key: 'webshop', group: 'customertype' }];
if (p4mUser) {
modifiers.push({ key: 'add-loyalty-card', value: p4mUser });
}
const res = await this.customerService
.CustomerUpdateCustomer({
customerId: customer.id,
payload: {
customer,
modifiers,
},
})
.toPromise();
for (let shippingAddress of shippingAddressesToAdd) {
await this.createShippingAddress(res.result.id, shippingAddress, true);
}
for (let payer of payersToAdd) {
await this.createPayer(res.result.id, payer, true);
}
return res;
}
async updateStoreP4MToWebshopP4M(customer: CustomerDTO): Promise<Result<CustomerDTO>> {
const shippingAddressesToAdd = customer.shippingAddresses?.filter((sa) => !sa.id)?.map((m) => m.data) ?? [];
customer.shippingAddresses = customer.shippingAddresses?.filter((sa) => !!sa.id) ?? [];
if (customer.shippingAddresses.length === 0) {
shippingAddressesToAdd.unshift(this.mapCustomerToShippingAddress(customer));
}
const payersToAdd = customer.payers?.filter((p) => !p.assignedToCustomer)?.map((p) => p.payer?.data) ?? [];
customer.payers = customer.payers?.filter((p) => !!p.assignedToCustomer) ?? [];
if (customer.payers.length === 0) {
payersToAdd.unshift({
...this.mapCustomerToPayer(customer),
payerType: customer.customerType,
});
}
const modifiers: KeyValueDTOOfStringAndString[] = [{ key: 'webshop', group: 'customertype' }];
const res = await this.customerService
.CustomerUpdateCustomer({
customerId: customer.id,
payload: {
customer,
modifiers,
},
})
.toPromise();
for (let shippingAddress of shippingAddressesToAdd) {
await this.createShippingAddress(res.result.id, shippingAddress, true);
}
for (let payer of payersToAdd) {
await this.createPayer(res.result.id, payer, true);
}
return res;
}
async createGuestCustomer(customer: CustomerDTO): Promise<Result<CustomerDTO>> {
const notificationChannels = this.getNotificationChannelForCommunicationDetails({
communicationDetails: customer?.communicationDetails,
});
const payload: CustomerDTO = { ...customer, customerType: 8, isGuestAccount: true, notificationChannels };
if (!(isArray(payload.shippingAddresses) && payload.shippingAddresses.length > 0)) {
payload.shippingAddresses = [
{
data: {
address: payload.address,
communicationDetails: payload.communicationDetails,
firstName: payload.firstName,
gender: payload.gender,
lastName: payload.lastName,
organisation: payload.organisation,
title: payload.title,
type: 1,
},
},
];
}
payload.shippingAddresses = customer.shippingAddresses ?? [];
if (!(isArray(payload.payers) && payload.payers.length > 0)) {
payload.payers = [
{
payer: {
data: {
address: payload.address,
communicationDetails: payload.communicationDetails,
firstName: payload.firstName,
gender: payload.gender,
lastName: payload.lastName,
organisation: payload.organisation,
title: payload.title,
payerType: payload.customerType,
},
},
},
];
}
payload.shippingAddresses.push({
data: this.mapCustomerToShippingAddress(customer),
});
return this.customerService.CustomerCreateOnlineCustomer(payload);
payload.payers = customer.payers ?? [];
payload.payers.push({
payer: {
data: {
...this.mapCustomerToPayer(customer),
payerType: payload.customerType,
},
},
});
const res = await this.customerService
.CustomerCreateCustomer({
customer: payload,
modifiers: [{ key: 'webshop', group: 'customertype' }],
})
.toPromise();
return res;
}
createBranchCustomer(customer: CustomerDTO): Observable<Result<CustomerDTO>> {
createStoreCustomer(customer: CustomerDTO): Observable<Result<CustomerDTO>> {
const notificationChannels = this.getNotificationChannelForCommunicationDetails({
communicationDetails: customer?.communicationDetails,
});
return this.customerService.CustomerCreateCustomer({ ...customer, customerType: 8, notificationChannels });
const p4mUser = customer.features.find((f) => f.key === 'p4mUser')?.value;
const modifiers: KeyValueDTOOfStringAndString[] = [{ key: 'store', group: 'customertype' }];
if (p4mUser) {
modifiers.push({ key: 'add-loyalty-card', value: p4mUser });
}
return this.customerService.CustomerCreateCustomer({
customer: { ...customer, customerType: 8, notificationChannels },
modifiers,
});
}
validateAddress(address: AddressDTO): Observable<Result<AddressDTO[]>> {
return this.customerService.CustomerValidateAddress(address);
return this.addressService.AddressValidateAddress(address);
}
getOnlineCustomerByEmail(email: string): Observable<CustomerInfoDTO | null> {
return this.getCustomers(email, {
take: 1,
filter: {
customertype: 'webshop',
},
}).pipe(
map((r) => {
if (r.hits === 1) {
return r.result[0];
} else {
return null;
}
}),
catchError((err) => [null])
);
}
private cachedCountriesFailed = false;
@@ -213,8 +422,8 @@ export class CrmCustomerService {
if (!this.cachedCountries || this.cachedCountriesFailed) {
this.cachedCountriesFailed = false;
this.cachedCountries = new ReplaySubject();
this.customerService
.CustomerGetCountries({})
this.countryService
.CountryGetCountries({})
.pipe(
retry(3),
catchError((err) => {
@@ -235,22 +444,28 @@ export class CrmCustomerService {
return this.customerService.CustomerEmailExists(email);
}
createPayer(customerId: number, payer: PayerDTO, isDefault?: boolean): Observable<[Result<PayerDTO>, Result<AssignedPayerDTO>]> {
return this.getCustomer(customerId).pipe(
mergeMap((customerResponse) =>
this.payerService
.PayerCreatePayer({ ...payer, payerType: customerResponse.result.customerType })
.pipe(
mergeMap((payerResponse) =>
this.customerService
.CustomerAddPayerReference({ customerId: customerId, payerId: payerResponse.result.id, isDefault: isDefault })
.pipe(
map((assigendPayerResponse) => [payerResponse, assigendPayerResponse] as [Result<PayerDTO>, Result<AssignedPayerDTO>])
)
checkLoyaltyCard({ loyaltyCardNumber, customerId }: { loyaltyCardNumber: string; customerId?: number }) {
return this.loyaltyCardService.LoyaltyCardCheckLoyaltyCard({ loyaltyCardNumber, customerId });
}
createPayer(customerId: number, payer: PayerDTO, isDefault?: boolean): Promise<[Result<PayerDTO>, Result<AssignedPayerDTO>]> {
return this.getCustomer(customerId)
.pipe(
mergeMap((customerResponse) =>
this.payerService
.PayerCreatePayer({ ...payer, payerType: customerResponse.result.customerType })
.pipe(
mergeMap((payerResponse) =>
this.customerService
.CustomerAddPayerReference({ customerId: customerId, payerId: payerResponse.result.id, isDefault: isDefault })
.pipe(
map((assigendPayerResponse) => [payerResponse, assigendPayerResponse] as [Result<PayerDTO>, Result<AssignedPayerDTO>])
)
)
)
)
)
)
);
.toPromise();
}
updatePayer(customerId: number, payerId: number, payer: PayerDTO, isDefault?: boolean): Observable<Result<PayerDTO>> {
@@ -263,11 +478,7 @@ export class CrmCustomerService {
return this.customerService.CustomerModifyPayerReference({ payerId, customerId, isDefault });
}
createShippingAddress(
customerId: number,
shippingAddress: ShippingAddressDTO,
isDefault?: boolean
): Observable<Result<ShippingAddressDTO>> {
createShippingAddress(customerId: number, shippingAddress: ShippingAddressDTO, isDefault?: boolean): Promise<Result<ShippingAddressDTO>> {
const data: ShippingAddressDTO = { ...shippingAddress };
if (isDefault) {
data.isDefault = new Date().toJSON();
@@ -275,7 +486,7 @@ export class CrmCustomerService {
delete data.isDefault;
}
return this.customerService.CustomerCreateShippingAddress({ customerId, shippingAddress: data });
return this.shippingAddressService.ShippingAddressCreateShippingAddress({ customerId, shippingAddress: data }).toPromise();
}
updateShippingAddress(
@@ -283,7 +494,7 @@ export class CrmCustomerService {
shippingAddressId: number,
shippingAddress: ShippingAddressDTO,
isDefault?: boolean
): Observable<Result<ShippingAddressDTO>> {
): Promise<Result<ShippingAddressDTO>> {
const data: ShippingAddressDTO = { ...shippingAddress };
if (isDefault) {
@@ -292,15 +503,17 @@ export class CrmCustomerService {
delete data.isDefault;
}
return this.customerService.CustomerUpdateShippingAddress({ shippingAddressId, shippingAddress: data, customerId });
return this.shippingAddressService
.ShippingAddressUpdateShippingAddress({ shippingAddressId, shippingAddress: data, customerId })
.toPromise();
}
getShippingAddress(shippingAddressId: number): Observable<Result<ShippingAddressDTO>> {
return this.customerService.CustomerGetShippingaddress(shippingAddressId);
return this.shippingAddressService.ShippingAddressGetShippingaddress(shippingAddressId);
}
getShippingAddresses(params: CustomerService.CustomerGetShippingAddressesParams): Observable<Result<ShippingAddressDTO[]>> {
return this.customerService.CustomerGetShippingAddresses(params);
getShippingAddresses(params: ShippingAddressService.ShippingAddressGetShippingAddressesParams): Observable<Result<ShippingAddressDTO[]>> {
return this.shippingAddressService.ShippingAddressGetShippingAddresses(params);
}
getPayer(payerId: number): Observable<Result<PayerDTO>> {
@@ -311,7 +524,7 @@ export class CrmCustomerService {
return this.customerService.CustomerGetBonuscards(customerId);
}
getCustomerHistory(customerId: number): Observable<ResponseArgsOfHistoryDTO> {
return this.customerService.CustomerGetCustomerHistory({ customerId });
getCustomerHistory(customerId: number): Observable<HistoryDTO[]> {
return this.customerService.CustomerGetCustomerHistory({ customerId }).pipe(map((response) => response?.result));
}
}

View File

@@ -5,11 +5,7 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

Some files were not shown because too many files have changed in this diff Show More