xv-webcomponents 1.24.10 → 1.24.11-qa.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/_vars-FOITtI6f.js +71 -0
- package/dist/cjs/xv-accordion-v2_50.cjs.entry.js +13 -8
- package/dist/cjs/xv-header-next.cjs.entry.js +6 -8
- package/dist/collection/components/xv-header/_vars.js +41 -0
- package/dist/collection/components/xv-header/xv-header.js +6 -7
- package/dist/collection/components/xv-header-next/xv-header-next.js +6 -7
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +7 -0
- package/dist/esm/_vars-CS4ouQ2K.js +65 -0
- package/dist/esm/xv-accordion-v2_50.entry.js +13 -8
- package/dist/esm/xv-header-next.entry.js +6 -8
- package/dist/types/components/xv-header/_vars.d.ts +23 -0
- package/dist/types/components/xv-overflow-menu/xv-overflow-menu.d.ts +1 -0
- package/dist/xv-webcomponents/p-0002421f.entry.js +1 -0
- package/dist/xv-webcomponents/p-01d6444c.entry.js +8 -0
- package/dist/xv-webcomponents/p-CS4ouQ2K.js +1 -0
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/_vars-DMytunQw.js +0 -26
- package/dist/esm/_vars-CDEU4jkD.js +0 -23
- package/dist/xv-webcomponents/p-51664dbf.entry.js +0 -1
- package/dist/xv-webcomponents/p-CDEU4jkD.js +0 -1
- package/dist/xv-webcomponents/p-b6eb6373.entry.js +0 -8
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.SIZE_VAR = void 0;
|
|
4
|
+
(function (SIZE_VAR) {
|
|
5
|
+
SIZE_VAR["XS"] = "xs";
|
|
6
|
+
SIZE_VAR["SM"] = "sm";
|
|
7
|
+
SIZE_VAR["MD"] = "md";
|
|
8
|
+
SIZE_VAR["LG"] = "lg";
|
|
9
|
+
SIZE_VAR["XL"] = "xl";
|
|
10
|
+
})(exports.SIZE_VAR || (exports.SIZE_VAR = {}));
|
|
11
|
+
exports.XV_SORT_DIR = void 0;
|
|
12
|
+
(function (XV_SORT_DIR) {
|
|
13
|
+
XV_SORT_DIR["ASC"] = "asc";
|
|
14
|
+
XV_SORT_DIR["DESC"] = "desc";
|
|
15
|
+
XV_SORT_DIR["NONE"] = "none";
|
|
16
|
+
})(exports.XV_SORT_DIR || (exports.XV_SORT_DIR = {}));
|
|
17
|
+
|
|
18
|
+
const OverflowMenuVariant = {
|
|
19
|
+
DEFAULT: '',
|
|
20
|
+
GHOST: 'ghost',
|
|
21
|
+
};
|
|
22
|
+
/** Tag used to discover menu items (roving keyboard navigation, size mirroring). */
|
|
23
|
+
const OverflowMenuItemSelector = 'xv-overflow-menu-v2-item';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Status of a draft-invoice notification, mirroring the platform's
|
|
27
|
+
* `InvoiceNotificationPayloadStatus` (Xv.Domain/Notifications/Payloads).
|
|
28
|
+
*
|
|
29
|
+
* The numeric values are the wire format: `/de-de/api/notifications/list` serializes the
|
|
30
|
+
* enum by ordinal, so these MUST stay in sync with the backend. The header used to compare
|
|
31
|
+
* `status === 1` while treating it as a failure, so a draft invoice that had been generated
|
|
32
|
+
* was shown with the error icon and the text "ist ausstehend" (MAR-15569).
|
|
33
|
+
*/
|
|
34
|
+
var InvoiceNotificationStatus;
|
|
35
|
+
(function (InvoiceNotificationStatus) {
|
|
36
|
+
InvoiceNotificationStatus[InvoiceNotificationStatus["PENDING"] = 0] = "PENDING";
|
|
37
|
+
InvoiceNotificationStatus[InvoiceNotificationStatus["COMPLETED"] = 1] = "COMPLETED";
|
|
38
|
+
InvoiceNotificationStatus[InvoiceNotificationStatus["FAILED"] = 2] = "FAILED";
|
|
39
|
+
})(InvoiceNotificationStatus || (InvoiceNotificationStatus = {}));
|
|
40
|
+
/** Bell label per status. German only — this component carries no i18n layer. */
|
|
41
|
+
const INVOICE_NOTIFICATION_STATUS_TEXT = {
|
|
42
|
+
[InvoiceNotificationStatus.PENDING]: 'ausstehend',
|
|
43
|
+
[InvoiceNotificationStatus.COMPLETED]: 'generiert',
|
|
44
|
+
[InvoiceNotificationStatus.FAILED]: 'fehlgeschlagen',
|
|
45
|
+
};
|
|
46
|
+
/** Font Awesome icon per status. */
|
|
47
|
+
const INVOICE_NOTIFICATION_STATUS_ICON = {
|
|
48
|
+
[InvoiceNotificationStatus.PENDING]: 'fa-clock',
|
|
49
|
+
[InvoiceNotificationStatus.COMPLETED]: 'fa-check-circle',
|
|
50
|
+
[InvoiceNotificationStatus.FAILED]: 'fa-times-circle',
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Falls back to PENDING for an unknown value so a new backend status renders as
|
|
54
|
+
* "waiting" rather than silently claiming success or failure.
|
|
55
|
+
*/
|
|
56
|
+
function invoiceNotificationStatusOf(status) {
|
|
57
|
+
switch (status) {
|
|
58
|
+
case InvoiceNotificationStatus.COMPLETED:
|
|
59
|
+
return InvoiceNotificationStatus.COMPLETED;
|
|
60
|
+
case InvoiceNotificationStatus.FAILED:
|
|
61
|
+
return InvoiceNotificationStatus.FAILED;
|
|
62
|
+
default:
|
|
63
|
+
return InvoiceNotificationStatus.PENDING;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
exports.INVOICE_NOTIFICATION_STATUS_ICON = INVOICE_NOTIFICATION_STATUS_ICON;
|
|
68
|
+
exports.INVOICE_NOTIFICATION_STATUS_TEXT = INVOICE_NOTIFICATION_STATUS_TEXT;
|
|
69
|
+
exports.OverflowMenuItemSelector = OverflowMenuItemSelector;
|
|
70
|
+
exports.OverflowMenuVariant = OverflowMenuVariant;
|
|
71
|
+
exports.invoiceNotificationStatusOf = invoiceNotificationStatusOf;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var index$1 = require('./index-DpLAFt0R.js');
|
|
4
4
|
var index$2 = require('./index-Cb30DBqk.js');
|
|
5
|
-
var _vars = require('./_vars-
|
|
5
|
+
var _vars = require('./_vars-FOITtI6f.js');
|
|
6
6
|
|
|
7
7
|
const xvAccordionCss = () => `:host{display:block}`;
|
|
8
8
|
|
|
@@ -82670,12 +82670,10 @@ const XvHeader = class {
|
|
|
82670
82670
|
var _a;
|
|
82671
82671
|
if (!((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a.IsManager))
|
|
82672
82672
|
return null;
|
|
82673
|
-
return (index$1.h("li", { class: "notifications" }, index$1.h("xv-overflow-menu-v2", { position: "right", size: _vars.SIZE_VAR.MD }, index$1.h("span", { slot: "trigger", class: "fa-stack" }, index$1.h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (index$1.h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) =>
|
|
82674
|
-
|
|
82675
|
-
|
|
82676
|
-
|
|
82677
|
-
'fa-circle': notification.status && notification.status !== 1,
|
|
82678
|
-
} }), index$1.h("div", { class: "notifications-item-body" }, index$1.h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ausstehend"), index$1.h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))))))));
|
|
82673
|
+
return (index$1.h("li", { class: "notifications" }, index$1.h("xv-overflow-menu-v2", { position: "right", size: _vars.SIZE_VAR.MD }, index$1.h("span", { slot: "trigger", class: "fa-stack" }, index$1.h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (index$1.h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) => {
|
|
82674
|
+
const status = _vars.invoiceNotificationStatusOf(notification.status);
|
|
82675
|
+
return (index$1.h("xv-overflow-menu-v2-item", { value: notification.id, variant: _vars.OverflowMenuVariant.GHOST, disabled: notification.isRead, clickable: false }, index$1.h("div", { class: "notifications-item" }, index$1.h("i", { class: { far: true, [_vars.INVOICE_NOTIFICATION_STATUS_ICON[status]]: true } }), index$1.h("div", { class: "notifications-item-body" }, index$1.h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ", _vars.INVOICE_NOTIFICATION_STATUS_TEXT[status]), index$1.h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))));
|
|
82676
|
+
}))));
|
|
82679
82677
|
}
|
|
82680
82678
|
_renderAccount() {
|
|
82681
82679
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
@@ -82700,7 +82698,7 @@ const XvHeader = class {
|
|
|
82700
82698
|
render() {
|
|
82701
82699
|
var _a, _b, _c, _d, _e;
|
|
82702
82700
|
const isXvBrand = (((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a['WhitelabelName']) || 'Xv') === 'Xv';
|
|
82703
|
-
return (index$1.h("header", { key: '
|
|
82701
|
+
return (index$1.h("header", { key: 'c1dadf87ee5ac86371189f3c5326fdcbcfb9a486', class: "header" }, index$1.h("div", { key: '939c81c9e543c9987a8ad2910a2be103db1a5081', class: "header-wrapper" }, index$1.h("div", { key: 'f7322ff8b33db4e3f9974228f7fdc34aaf3da8a4', class: "xv-container" }, index$1.h("div", { key: '3ee4de80cfcc4239b12b0ab52908ea0e7d34aaab', class: "header-top" }, index$1.h("div", { key: '8eeada6b815392eafa3b06ad724ad931d3814235', class: "header-top--left" }, index$1.h("xv-button-v2", { key: '6718cbb3b0d486290d6e3d287f92aafe3059a773', class: "menu-btn", variant: "ghost", onClick: this.toggleMobMenu }, index$1.h("i", { key: '5c291e5f78889fd90b18457b171ef873f05ac92b', slot: "icon-left", class: { 'fa': true, 'fa-times': this.mobMenuOpen, 'fa-bars': !this.mobMenuOpen } })), this.metaNav && (index$1.h("a", { key: '3786b0153c70e32ed6e0fd888041f5f1371352dd', href: `${window.location.origin}/` }, index$1.h("picture", { key: 'b8e3315601275b5e37521bdfc8d68279774eb790' }, index$1.h("source", { key: '447e77d0b63478f5cc6a4947536dfeb75de0957c', srcSet: ((_b = this.metaNav) === null || _b === void 0 ? void 0 : _b.LogoUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo.svg', media: "(min-width: 990px)" }), index$1.h("img", { key: '75c5a3c7b5181a4ee7ca7daf010ed4283a901aba', src: ((_c = this.metaNav) === null || _c === void 0 ? void 0 : _c.LogoSmallUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo-small.svg', onError: this.logoFallback, loading: "lazy", alt: "Crossvertise" })))), this.orgUnit && (index$1.h("xv-link-v2", { key: '46caa5be0cc5ef85d70527fbe3cf5d410abd9cab', class: "header-top--orgUnit", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), index$1.h("ul", { key: 'cc0c800101e159c3ae6a887cc56c912ba12df29c', class: "header-top--right" }, this._renderSearch(), this._renderImpersonationInfo(), !((_d = this.metaNav) === null || _d === void 0 ? void 0 : _d.IsManager) && isXvBrand && (index$1.h("li", { key: '540fab8968f832d078d77febcac4f9d23b686888' }, index$1.h("xv-link-v2", { key: '7c59f497dc272169b5d6de4d5caf5758bd82fed0', variant: "ghost", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, index$1.h("xv-button-v2", { key: '0692e42a64c68979f0886566ccdca46a38ec21cd', variant: "ghost", size: _vars.SIZE_VAR.MD }, index$1.h("i", { key: '45dacc89068ff5af15a4f73c1c627ec5b71bab7f', class: "header-icon far fa-envelope" }), index$1.h("span", { key: 'a995848018fb4c251dd992c8a8458671ed57bb5a', class: "header-label xv-body-02" }, "Kontakt"))))), this._renderNotifications(), this._renderAccount(), !((_e = this.metaNav) === null || _e === void 0 ? void 0 : _e.IsManager) && isXvBrand && (index$1.h("li", { key: 'd7a86b909929af0126eef781321bf14cd07f8b09' }, index$1.h("xv-link-v2", { key: 'a9b9bc5c7e2496bcb36e1b1e30afe6183173ddd9', variant: "ghost", href: "https://help.crossvertise.com" }, index$1.h("xv-button-v2", { key: '5a943f49cfb73ec9a19368cf2ea5aef2f8c6194f', variant: "ghost", size: _vars.SIZE_VAR.MD }, index$1.h("i", { key: '0d892d7ed7a6a3777c3180a5101df8029e7fedf2', class: "header-icon far fa-question-circle" }), index$1.h("span", { key: 'd2ac5acb478b819eef302bfbb008294ffbd4706b', class: "header-label xv-body-02" }, "Hilfe"))))), this._renderShoppingCart()))), index$1.h("div", { key: '12b4d4b721f3987f69bb8c2024cf00a541dedb09', class: "header-wrapper--bg" }, index$1.h("div", { key: '029bb783f3204dccee6da34e7546944cc00331bc', class: "xv-container" }, index$1.h("xv-mega-menu", { key: '1542e98a5cde254587138abf550d9744f022c93a', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu })))), index$1.h("xv-login-modal", { key: '80ad843540761ab1aa41cb12a697736ea5c4fbe2', visible: this.showLoginModal, onClose: () => this.showLoginModal = false })));
|
|
82704
82702
|
}
|
|
82705
82703
|
get el() { return index$1.getElement(this); }
|
|
82706
82704
|
};
|
|
@@ -83420,6 +83418,13 @@ const XvOverflowMenu = class {
|
|
|
83420
83418
|
const button = (index$1.h("button", { class: { btn: true, open: this.open }, onClick: this.onOpenToggle, disabled: this.disabled, "aria-haspopup": "menu", "aria-expanded": this.open ? 'true' : 'false', ref: (el) => (this.triggerButtonEl = el) }, index$1.h("slot", { name: "trigger" }, index$1.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 128 512" }, index$1.h("path", { d: "M64 368a48 48 0 1 0 0 96 48 48 0 1 0 0-96zm0-160a48 48 0 1 0 0 96 48 48 0 1 0 0-96zM112 96A48 48 0 1 0 16 96a48 48 0 1 0 96 0z" })))));
|
|
83421
83419
|
return (index$1.h(index$1.Host, { class: "xv-overflow-menu", size: this.size }, this.tooltip ? index$1.h("xv-tooltip-v2", { message: this.tooltip }, button) : button, list));
|
|
83422
83420
|
}
|
|
83421
|
+
// Moving the host in the DOM — a framework reordering a list, say — disconnects and reconnects
|
|
83422
|
+
// it, and the disconnect tears the anchor listener down. componentDidLoad does not run a second
|
|
83423
|
+
// time, so without this the menu stays dead. Safe on the first mount: addEventListener discards
|
|
83424
|
+
// a duplicate of the same handler, and setupAnchor is a no-op until anchor is set.
|
|
83425
|
+
connectedCallback() {
|
|
83426
|
+
this.setupAnchor();
|
|
83427
|
+
}
|
|
83423
83428
|
componentDidLoad() {
|
|
83424
83429
|
this.setupAnchor();
|
|
83425
83430
|
this.syncOpenState();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DpLAFt0R.js');
|
|
4
|
-
var _vars = require('./_vars-
|
|
4
|
+
var _vars = require('./_vars-FOITtI6f.js');
|
|
5
5
|
var index$1 = require('./index-Cb30DBqk.js');
|
|
6
6
|
|
|
7
7
|
const userMagnifyingGlassRegularFullSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NDAgNjQwIj48IS0tIUZvbnQgQXdlc29tZSBQcm8gNy4xLjAgYnkgQGZvbnRhd2Vzb21lIC0gaHR0cHM6Ly9mb250YXdlc29tZS5jb20gTGljZW5zZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tL2xpY2Vuc2UgKENvbW1lcmNpYWwgTGljZW5zZSkgQ29weXJpZ2h0IDIwMjUgRm9udGljb25zLCBJbmMuLS0+PHBhdGggZD0iTTE3Ni41IDE5MkMxNzYuNSAxNDcuOCAyMTIuMyAxMTIgMjU2LjUgMTEyQzMwMC43IDExMiAzMzYuNSAxNDcuOCAzMzYuNSAxOTJDMzM2LjUgMjM2LjIgMzAwLjcgMjcyIDI1Ni41IDI3MkMyMTIuMyAyNzIgMTc2LjUgMjM2LjIgMTc2LjUgMTkyek0zODQuNSAxOTJDMzg0LjUgMTIxLjMgMzI3LjIgNjQgMjU2LjUgNjRDMTg1LjggNjQgMTI4LjUgMTIxLjMgMTI4LjUgMTkyQzEyOC41IDI2Mi43IDE4NS44IDMyMCAyNTYuNSAzMjBDMzI3LjIgMzIwIDM4NC41IDI2Mi43IDM4NC41IDE5MnpNODAuNSA1NDRDODAuNSA0NzMuMyAxMzcuOCA0MTYgMjA4LjUgNDE2TDI4OC43IDQxNkMyODkuNSAzOTkuMiAyOTIuNyAzODMuMSAyOTguMSAzNjhMMjA4LjUgMzY4QzExMS4zIDM2OCAzMi41IDQ0Ni44IDMyLjUgNTQ0TDMyLjUgNTUyQzMyLjUgNTY1LjMgNDMuMiA1NzYgNTYuNSA1NzZDNjkuOCA1NzYgODAuNSA1NjUuMyA4MC41IDU1Mkw4MC41IDU0NHpNNDU2LjUgMzUyQzQ5Ni4zIDM1MiA1MjguNSAzODQuMiA1MjguNSA0MjRDNTI4LjUgNDYzLjggNDk2LjMgNDk2IDQ1Ni41IDQ5NkM0MTYuNyA0OTYgMzg0LjUgNDYzLjggMzg0LjUgNDI0QzM4NC41IDM4NC4yIDQxNi43IDM1MiA0NTYuNSAzNTJ6TTQ1Ni41IDU0NEM0ODAuOSA1NDQgNTAzLjYgNTM2LjcgNTIyLjYgNTI0LjJMNTgzLjUgNTg1LjFDNTkyLjkgNTk0LjUgNjA4LjEgNTk0LjUgNjE3LjQgNTg1LjFDNjI2LjcgNTc1LjcgNjI2LjggNTYwLjUgNjE3LjQgNTUxLjJMNTU2LjUgNDkwLjNDNTY5LjEgNDcxLjMgNTc2LjQgNDQ4LjUgNTc2LjQgNDI0QzU3Ni40IDM1Ny43IDUyMi43IDMwNCA0NTYuNCAzMDRDMzkwLjEgMzA0IDMzNi40IDM1Ny43IDMzNi40IDQyNEMzMzYuNCA0OTAuMyAzOTAuMSA1NDQgNDU2LjQgNTQ0eiIvPjwvc3ZnPg==';
|
|
@@ -175,12 +175,10 @@ const XvHeaderNext = class {
|
|
|
175
175
|
var _a;
|
|
176
176
|
if (!((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a.IsManager))
|
|
177
177
|
return null;
|
|
178
|
-
return (index.h("li", { class: "notifications" }, index.h("xv-overflow-menu-v2", { position: "right", size: _vars.SIZE_VAR.MD }, index.h("span", { slot: "trigger", class: "fa-stack" }, index.h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (index.h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) =>
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
'fa-circle': notification.status && notification.status !== 1,
|
|
183
|
-
} }), index.h("div", { class: "notifications-item-body" }, index.h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ausstehend"), index.h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))))))));
|
|
178
|
+
return (index.h("li", { class: "notifications" }, index.h("xv-overflow-menu-v2", { position: "right", size: _vars.SIZE_VAR.MD }, index.h("span", { slot: "trigger", class: "fa-stack" }, index.h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (index.h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) => {
|
|
179
|
+
const status = _vars.invoiceNotificationStatusOf(notification.status);
|
|
180
|
+
return (index.h("xv-overflow-menu-v2-item", { value: notification.id, variant: _vars.OverflowMenuVariant.GHOST, disabled: notification.isRead, clickable: false }, index.h("div", { class: "notifications-item" }, index.h("i", { class: { far: true, [_vars.INVOICE_NOTIFICATION_STATUS_ICON[status]]: true } }), index.h("div", { class: "notifications-item-body" }, index.h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ", _vars.INVOICE_NOTIFICATION_STATUS_TEXT[status]), index.h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))));
|
|
181
|
+
}))));
|
|
184
182
|
}
|
|
185
183
|
_renderAccount() {
|
|
186
184
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
@@ -199,7 +197,7 @@ const XvHeaderNext = class {
|
|
|
199
197
|
render() {
|
|
200
198
|
var _a, _b, _c, _d, _e;
|
|
201
199
|
const isXvBrand = (((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a['WhitelabelName']) || 'Xv') === 'Xv';
|
|
202
|
-
return (index.h("header", { key: '
|
|
200
|
+
return (index.h("header", { key: '13a9d3cc028a97c7c4d3db96c40e58cffa1fe33a', class: "header" }, index.h("div", { key: 'bc3da59737a300efcbbce9234b750a16c2c96ce3', class: "header-wrapper" }, index.h("div", { key: '294a3ab110a7bf53b2bed24db1b1a56a8ec66dcb', class: "xv-container" }, index.h("div", { key: '99fbcdaa2c4e72eb8661f8b8034e616bf99c1bc5', class: "header-top" }, index.h("div", { key: '1e703aa885c9462f06d44fdd9756f42b08e96241', class: "header-top--left" }, index.h("xv-button-v2", { key: 'f867ffe85b45e67b55ea30ce8bfa1da0352f1edc', class: "menu-btn", variant: "ghost", onClick: this.toggleMobMenu }, index.h("i", { key: 'f048441a12346222ac24df76f91bc03b6096bea2', slot: "icon-left", class: { 'fa': true, 'fa-times': this.mobMenuOpen, 'fa-bars': !this.mobMenuOpen } })), this.metaNav && (index.h("a", { key: '5fe60ea6eb240c62fd831e835ad89dad555b0edb', href: `${window.location.origin}/` }, index.h("picture", { key: '060830e01a97d6b7192202f719ca42c94d9075ff' }, index.h("source", { key: '5d1f714cb70131c2634d552e22305b78afb755bd', srcSet: ((_b = this.metaNav) === null || _b === void 0 ? void 0 : _b.LogoUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo.svg', media: "(min-width: 990px)" }), index.h("img", { key: '90334b422808e153718dd43dd7404c23e0e69692', src: ((_c = this.metaNav) === null || _c === void 0 ? void 0 : _c.LogoSmallUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo-small.svg', onError: this.logoFallback, loading: "lazy", alt: "Crossvertise" })))), this.orgUnit && (index.h("xv-link-v2", { key: '6cce595ce435c6fb05d74ee8ecd3ee58cc788f90', class: "header-top--orgUnit", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), index.h("ul", { key: '6284fdfc7a99ab5a8194f13f55f5cccf47427d65', class: "header-top--right" }, this._renderLocaleSwitcher(), this._renderSearch(), this._renderImpersonationInfo(), !((_d = this.metaNav) === null || _d === void 0 ? void 0 : _d.IsManager) && isXvBrand && (index.h("li", { key: 'da5bd80e9d475358a16052e62c56fb6d4aa3370c' }, index.h("xv-link-v2", { key: '3096b8531e471537d5a16910456fcb6fe5de8af8', variant: "ghost", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, index.h("xv-button-v2", { key: '4b1fa5e374d05f183a0fb39adec0b779cecd17e1', variant: "ghost", size: _vars.SIZE_VAR.MD }, index.h("i", { key: 'bb69f452fabd750451b993acbda13fda6e8f3da9', class: "header-icon far fa-envelope" }), index.h("span", { key: '62e89c597ae9b1cc77329fa36dd32f65d4e79511', class: "header-label xv-body-02" }, "Kontakt"))))), this._renderNotifications(), this._renderAccount(), !((_e = this.metaNav) === null || _e === void 0 ? void 0 : _e.IsManager) && isXvBrand && (index.h("li", { key: 'fc3cdac26fa33bcbd027d1605934e40e832fafd5' }, index.h("xv-link-v2", { key: 'fd1303e606ebfe4ca8944f2685e5b2f616fdcc47', variant: "ghost", href: "https://help.crossvertise.com" }, index.h("xv-button-v2", { key: '41f5daa4d30d7bed6ed032563a600036b4e230bd', variant: "ghost", size: _vars.SIZE_VAR.MD }, index.h("i", { key: '764c0abede96b262c562832a6bbebee70484c326', class: "header-icon far fa-question-circle" }), index.h("span", { key: 'c69623c9fbb3110998b9a3a80cff3cc404d1de60', class: "header-label xv-body-02" }, "Hilfe"))))), this._renderShoppingCart()))), index.h("div", { key: 'e6936d829410b2b7c7801ce388c71f9817d88fca', class: "header-wrapper--bg" }, index.h("div", { key: '674d7d606828838f6ad17a5eb274bed488ecb323', class: "xv-container" }, index.h("xv-mega-menu-next", { key: '18ceb4546630a258b04097ddaf16bb10bdf2a8fa', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu, menuData: this.menuData })))), index.h("xv-login-modal", { key: 'a3404b9ad678f5d5c0efd687788631e828574e2d', visible: this.showLoginModal, onClose: () => this.showLoginModal = false })));
|
|
203
201
|
}
|
|
204
202
|
get el() { return index.getElement(this); }
|
|
205
203
|
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Status of a draft-invoice notification, mirroring the platform's
|
|
3
|
+
* `InvoiceNotificationPayloadStatus` (Xv.Domain/Notifications/Payloads).
|
|
4
|
+
*
|
|
5
|
+
* The numeric values are the wire format: `/de-de/api/notifications/list` serializes the
|
|
6
|
+
* enum by ordinal, so these MUST stay in sync with the backend. The header used to compare
|
|
7
|
+
* `status === 1` while treating it as a failure, so a draft invoice that had been generated
|
|
8
|
+
* was shown with the error icon and the text "ist ausstehend" (MAR-15569).
|
|
9
|
+
*/
|
|
10
|
+
export var InvoiceNotificationStatus;
|
|
11
|
+
(function (InvoiceNotificationStatus) {
|
|
12
|
+
InvoiceNotificationStatus[InvoiceNotificationStatus["PENDING"] = 0] = "PENDING";
|
|
13
|
+
InvoiceNotificationStatus[InvoiceNotificationStatus["COMPLETED"] = 1] = "COMPLETED";
|
|
14
|
+
InvoiceNotificationStatus[InvoiceNotificationStatus["FAILED"] = 2] = "FAILED";
|
|
15
|
+
})(InvoiceNotificationStatus || (InvoiceNotificationStatus = {}));
|
|
16
|
+
/** Bell label per status. German only — this component carries no i18n layer. */
|
|
17
|
+
export const INVOICE_NOTIFICATION_STATUS_TEXT = {
|
|
18
|
+
[InvoiceNotificationStatus.PENDING]: 'ausstehend',
|
|
19
|
+
[InvoiceNotificationStatus.COMPLETED]: 'generiert',
|
|
20
|
+
[InvoiceNotificationStatus.FAILED]: 'fehlgeschlagen',
|
|
21
|
+
};
|
|
22
|
+
/** Font Awesome icon per status. */
|
|
23
|
+
export const INVOICE_NOTIFICATION_STATUS_ICON = {
|
|
24
|
+
[InvoiceNotificationStatus.PENDING]: 'fa-clock',
|
|
25
|
+
[InvoiceNotificationStatus.COMPLETED]: 'fa-check-circle',
|
|
26
|
+
[InvoiceNotificationStatus.FAILED]: 'fa-times-circle',
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Falls back to PENDING for an unknown value so a new backend status renders as
|
|
30
|
+
* "waiting" rather than silently claiming success or failure.
|
|
31
|
+
*/
|
|
32
|
+
export function invoiceNotificationStatusOf(status) {
|
|
33
|
+
switch (status) {
|
|
34
|
+
case InvoiceNotificationStatus.COMPLETED:
|
|
35
|
+
return InvoiceNotificationStatus.COMPLETED;
|
|
36
|
+
case InvoiceNotificationStatus.FAILED:
|
|
37
|
+
return InvoiceNotificationStatus.FAILED;
|
|
38
|
+
default:
|
|
39
|
+
return InvoiceNotificationStatus.PENDING;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -2,6 +2,7 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import { SIZE_VAR } from "../../types/enum";
|
|
3
3
|
import { api, debounce, getBaseUrl, getMetaNav } from "../../utils/utils";
|
|
4
4
|
import { OverflowMenuVariant } from "../xv-overflow-menu/_vars";
|
|
5
|
+
import { INVOICE_NOTIFICATION_STATUS_ICON, INVOICE_NOTIFICATION_STATUS_TEXT, invoiceNotificationStatusOf, } from "./_vars";
|
|
5
6
|
import UserSearchIcon from "./user-magnifying-glass-regular-full.svg";
|
|
6
7
|
export class XvHeader {
|
|
7
8
|
constructor() {
|
|
@@ -143,12 +144,10 @@ export class XvHeader {
|
|
|
143
144
|
var _a;
|
|
144
145
|
if (!((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a.IsManager))
|
|
145
146
|
return null;
|
|
146
|
-
return (h("li", { class: "notifications" }, h("xv-overflow-menu-v2", { position: "right", size: SIZE_VAR.MD }, h("span", { slot: "trigger", class: "fa-stack" }, h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) =>
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
'fa-circle': notification.status && notification.status !== 1,
|
|
151
|
-
} }), h("div", { class: "notifications-item-body" }, h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ausstehend"), h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))))))));
|
|
147
|
+
return (h("li", { class: "notifications" }, h("xv-overflow-menu-v2", { position: "right", size: SIZE_VAR.MD }, h("span", { slot: "trigger", class: "fa-stack" }, h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) => {
|
|
148
|
+
const status = invoiceNotificationStatusOf(notification.status);
|
|
149
|
+
return (h("xv-overflow-menu-v2-item", { value: notification.id, variant: OverflowMenuVariant.GHOST, disabled: notification.isRead, clickable: false }, h("div", { class: "notifications-item" }, h("i", { class: { far: true, [INVOICE_NOTIFICATION_STATUS_ICON[status]]: true } }), h("div", { class: "notifications-item-body" }, h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ", INVOICE_NOTIFICATION_STATUS_TEXT[status]), h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))));
|
|
150
|
+
}))));
|
|
152
151
|
}
|
|
153
152
|
_renderAccount() {
|
|
154
153
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
@@ -173,7 +172,7 @@ export class XvHeader {
|
|
|
173
172
|
render() {
|
|
174
173
|
var _a, _b, _c, _d, _e;
|
|
175
174
|
const isXvBrand = (((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a['WhitelabelName']) || 'Xv') === 'Xv';
|
|
176
|
-
return (h("header", { key: '
|
|
175
|
+
return (h("header", { key: 'c1dadf87ee5ac86371189f3c5326fdcbcfb9a486', class: "header" }, h("div", { key: '939c81c9e543c9987a8ad2910a2be103db1a5081', class: "header-wrapper" }, h("div", { key: 'f7322ff8b33db4e3f9974228f7fdc34aaf3da8a4', class: "xv-container" }, h("div", { key: '3ee4de80cfcc4239b12b0ab52908ea0e7d34aaab', class: "header-top" }, h("div", { key: '8eeada6b815392eafa3b06ad724ad931d3814235', class: "header-top--left" }, h("xv-button-v2", { key: '6718cbb3b0d486290d6e3d287f92aafe3059a773', class: "menu-btn", variant: "ghost", onClick: this.toggleMobMenu }, h("i", { key: '5c291e5f78889fd90b18457b171ef873f05ac92b', slot: "icon-left", class: { 'fa': true, 'fa-times': this.mobMenuOpen, 'fa-bars': !this.mobMenuOpen } })), this.metaNav && (h("a", { key: '3786b0153c70e32ed6e0fd888041f5f1371352dd', href: `${window.location.origin}/` }, h("picture", { key: 'b8e3315601275b5e37521bdfc8d68279774eb790' }, h("source", { key: '447e77d0b63478f5cc6a4947536dfeb75de0957c', srcSet: ((_b = this.metaNav) === null || _b === void 0 ? void 0 : _b.LogoUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo.svg', media: "(min-width: 990px)" }), h("img", { key: '75c5a3c7b5181a4ee7ca7daf010ed4283a901aba', src: ((_c = this.metaNav) === null || _c === void 0 ? void 0 : _c.LogoSmallUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo-small.svg', onError: this.logoFallback, loading: "lazy", alt: "Crossvertise" })))), this.orgUnit && (h("xv-link-v2", { key: '46caa5be0cc5ef85d70527fbe3cf5d410abd9cab', class: "header-top--orgUnit", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), h("ul", { key: 'cc0c800101e159c3ae6a887cc56c912ba12df29c', class: "header-top--right" }, this._renderSearch(), this._renderImpersonationInfo(), !((_d = this.metaNav) === null || _d === void 0 ? void 0 : _d.IsManager) && isXvBrand && (h("li", { key: '540fab8968f832d078d77febcac4f9d23b686888' }, h("xv-link-v2", { key: '7c59f497dc272169b5d6de4d5caf5758bd82fed0', variant: "ghost", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, h("xv-button-v2", { key: '0692e42a64c68979f0886566ccdca46a38ec21cd', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: '45dacc89068ff5af15a4f73c1c627ec5b71bab7f', class: "header-icon far fa-envelope" }), h("span", { key: 'a995848018fb4c251dd992c8a8458671ed57bb5a', class: "header-label xv-body-02" }, "Kontakt"))))), this._renderNotifications(), this._renderAccount(), !((_e = this.metaNav) === null || _e === void 0 ? void 0 : _e.IsManager) && isXvBrand && (h("li", { key: 'd7a86b909929af0126eef781321bf14cd07f8b09' }, h("xv-link-v2", { key: 'a9b9bc5c7e2496bcb36e1b1e30afe6183173ddd9', variant: "ghost", href: "https://help.crossvertise.com" }, h("xv-button-v2", { key: '5a943f49cfb73ec9a19368cf2ea5aef2f8c6194f', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: '0d892d7ed7a6a3777c3180a5101df8029e7fedf2', class: "header-icon far fa-question-circle" }), h("span", { key: 'd2ac5acb478b819eef302bfbb008294ffbd4706b', class: "header-label xv-body-02" }, "Hilfe"))))), this._renderShoppingCart()))), h("div", { key: '12b4d4b721f3987f69bb8c2024cf00a541dedb09', class: "header-wrapper--bg" }, h("div", { key: '029bb783f3204dccee6da34e7546944cc00331bc', class: "xv-container" }, h("xv-mega-menu", { key: '1542e98a5cde254587138abf550d9744f022c93a', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu })))), h("xv-login-modal", { key: '80ad843540761ab1aa41cb12a697736ea5c4fbe2', visible: this.showLoginModal, onClose: () => this.showLoginModal = false })));
|
|
177
176
|
}
|
|
178
177
|
static get is() { return "xv-header"; }
|
|
179
178
|
static get originalStyleUrls() {
|
|
@@ -2,6 +2,7 @@ import { h, Fragment } from "@stencil/core";
|
|
|
2
2
|
import { SIZE_VAR } from "../../types/enum";
|
|
3
3
|
import { api, debounce, getBaseUrl, getMetaNav } from "../../utils/utils";
|
|
4
4
|
import { OverflowMenuVariant } from "../xv-overflow-menu/_vars";
|
|
5
|
+
import { INVOICE_NOTIFICATION_STATUS_ICON, INVOICE_NOTIFICATION_STATUS_TEXT, invoiceNotificationStatusOf, } from "../xv-header/_vars";
|
|
5
6
|
import UserSearchIcon from "./user-magnifying-glass-regular-full.svg";
|
|
6
7
|
/**
|
|
7
8
|
* Drop-in successor of `xv-header` for the new headless CMS.
|
|
@@ -181,12 +182,10 @@ export class XvHeaderNext {
|
|
|
181
182
|
var _a;
|
|
182
183
|
if (!((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a.IsManager))
|
|
183
184
|
return null;
|
|
184
|
-
return (h("li", { class: "notifications" }, h("xv-overflow-menu-v2", { position: "right", size: SIZE_VAR.MD }, h("span", { slot: "trigger", class: "fa-stack" }, h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) =>
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
'fa-circle': notification.status && notification.status !== 1,
|
|
189
|
-
} }), h("div", { class: "notifications-item-body" }, h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ausstehend"), h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))))))));
|
|
185
|
+
return (h("li", { class: "notifications" }, h("xv-overflow-menu-v2", { position: "right", size: SIZE_VAR.MD }, h("span", { slot: "trigger", class: "fa-stack" }, h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) => {
|
|
186
|
+
const status = invoiceNotificationStatusOf(notification.status);
|
|
187
|
+
return (h("xv-overflow-menu-v2-item", { value: notification.id, variant: OverflowMenuVariant.GHOST, disabled: notification.isRead, clickable: false }, h("div", { class: "notifications-item" }, h("i", { class: { far: true, [INVOICE_NOTIFICATION_STATUS_ICON[status]]: true } }), h("div", { class: "notifications-item-body" }, h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ", INVOICE_NOTIFICATION_STATUS_TEXT[status]), h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))));
|
|
188
|
+
}))));
|
|
190
189
|
}
|
|
191
190
|
_renderAccount() {
|
|
192
191
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
@@ -205,7 +204,7 @@ export class XvHeaderNext {
|
|
|
205
204
|
render() {
|
|
206
205
|
var _a, _b, _c, _d, _e;
|
|
207
206
|
const isXvBrand = (((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a['WhitelabelName']) || 'Xv') === 'Xv';
|
|
208
|
-
return (h("header", { key: '
|
|
207
|
+
return (h("header", { key: '13a9d3cc028a97c7c4d3db96c40e58cffa1fe33a', class: "header" }, h("div", { key: 'bc3da59737a300efcbbce9234b750a16c2c96ce3', class: "header-wrapper" }, h("div", { key: '294a3ab110a7bf53b2bed24db1b1a56a8ec66dcb', class: "xv-container" }, h("div", { key: '99fbcdaa2c4e72eb8661f8b8034e616bf99c1bc5', class: "header-top" }, h("div", { key: '1e703aa885c9462f06d44fdd9756f42b08e96241', class: "header-top--left" }, h("xv-button-v2", { key: 'f867ffe85b45e67b55ea30ce8bfa1da0352f1edc', class: "menu-btn", variant: "ghost", onClick: this.toggleMobMenu }, h("i", { key: 'f048441a12346222ac24df76f91bc03b6096bea2', slot: "icon-left", class: { 'fa': true, 'fa-times': this.mobMenuOpen, 'fa-bars': !this.mobMenuOpen } })), this.metaNav && (h("a", { key: '5fe60ea6eb240c62fd831e835ad89dad555b0edb', href: `${window.location.origin}/` }, h("picture", { key: '060830e01a97d6b7192202f719ca42c94d9075ff' }, h("source", { key: '5d1f714cb70131c2634d552e22305b78afb755bd', srcSet: ((_b = this.metaNav) === null || _b === void 0 ? void 0 : _b.LogoUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo.svg', media: "(min-width: 990px)" }), h("img", { key: '90334b422808e153718dd43dd7404c23e0e69692', src: ((_c = this.metaNav) === null || _c === void 0 ? void 0 : _c.LogoSmallUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo-small.svg', onError: this.logoFallback, loading: "lazy", alt: "Crossvertise" })))), this.orgUnit && (h("xv-link-v2", { key: '6cce595ce435c6fb05d74ee8ecd3ee58cc788f90', class: "header-top--orgUnit", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), h("ul", { key: '6284fdfc7a99ab5a8194f13f55f5cccf47427d65', class: "header-top--right" }, this._renderLocaleSwitcher(), this._renderSearch(), this._renderImpersonationInfo(), !((_d = this.metaNav) === null || _d === void 0 ? void 0 : _d.IsManager) && isXvBrand && (h("li", { key: 'da5bd80e9d475358a16052e62c56fb6d4aa3370c' }, h("xv-link-v2", { key: '3096b8531e471537d5a16910456fcb6fe5de8af8', variant: "ghost", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, h("xv-button-v2", { key: '4b1fa5e374d05f183a0fb39adec0b779cecd17e1', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: 'bb69f452fabd750451b993acbda13fda6e8f3da9', class: "header-icon far fa-envelope" }), h("span", { key: '62e89c597ae9b1cc77329fa36dd32f65d4e79511', class: "header-label xv-body-02" }, "Kontakt"))))), this._renderNotifications(), this._renderAccount(), !((_e = this.metaNav) === null || _e === void 0 ? void 0 : _e.IsManager) && isXvBrand && (h("li", { key: 'fc3cdac26fa33bcbd027d1605934e40e832fafd5' }, h("xv-link-v2", { key: 'fd1303e606ebfe4ca8944f2685e5b2f616fdcc47', variant: "ghost", href: "https://help.crossvertise.com" }, h("xv-button-v2", { key: '41f5daa4d30d7bed6ed032563a600036b4e230bd', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: '764c0abede96b262c562832a6bbebee70484c326', class: "header-icon far fa-question-circle" }), h("span", { key: 'c69623c9fbb3110998b9a3a80cff3cc404d1de60', class: "header-label xv-body-02" }, "Hilfe"))))), this._renderShoppingCart()))), h("div", { key: 'e6936d829410b2b7c7801ce388c71f9817d88fca', class: "header-wrapper--bg" }, h("div", { key: '674d7d606828838f6ad17a5eb274bed488ecb323', class: "xv-container" }, h("xv-mega-menu-next", { key: '18ceb4546630a258b04097ddaf16bb10bdf2a8fa', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu, menuData: this.menuData })))), h("xv-login-modal", { key: 'a3404b9ad678f5d5c0efd687788631e828574e2d', visible: this.showLoginModal, onClose: () => this.showLoginModal = false })));
|
|
209
208
|
}
|
|
210
209
|
static get is() { return "xv-header-next"; }
|
|
211
210
|
static get originalStyleUrls() {
|
|
@@ -278,6 +278,13 @@ export class XvOverflowMenu {
|
|
|
278
278
|
const button = (h("button", { class: { btn: true, open: this.open }, onClick: this.onOpenToggle, disabled: this.disabled, "aria-haspopup": "menu", "aria-expanded": this.open ? 'true' : 'false', ref: (el) => (this.triggerButtonEl = el) }, h("slot", { name: "trigger" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 128 512" }, h("path", { d: "M64 368a48 48 0 1 0 0 96 48 48 0 1 0 0-96zm0-160a48 48 0 1 0 0 96 48 48 0 1 0 0-96zM112 96A48 48 0 1 0 16 96a48 48 0 1 0 96 0z" })))));
|
|
279
279
|
return (h(Host, { class: "xv-overflow-menu", size: this.size }, this.tooltip ? h("xv-tooltip-v2", { message: this.tooltip }, button) : button, list));
|
|
280
280
|
}
|
|
281
|
+
// Moving the host in the DOM — a framework reordering a list, say — disconnects and reconnects
|
|
282
|
+
// it, and the disconnect tears the anchor listener down. componentDidLoad does not run a second
|
|
283
|
+
// time, so without this the menu stays dead. Safe on the first mount: addEventListener discards
|
|
284
|
+
// a duplicate of the same handler, and setupAnchor is a no-op until anchor is set.
|
|
285
|
+
connectedCallback() {
|
|
286
|
+
this.setupAnchor();
|
|
287
|
+
}
|
|
281
288
|
componentDidLoad() {
|
|
282
289
|
this.setupAnchor();
|
|
283
290
|
this.syncOpenState();
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
var SIZE_VAR;
|
|
2
|
+
(function (SIZE_VAR) {
|
|
3
|
+
SIZE_VAR["XS"] = "xs";
|
|
4
|
+
SIZE_VAR["SM"] = "sm";
|
|
5
|
+
SIZE_VAR["MD"] = "md";
|
|
6
|
+
SIZE_VAR["LG"] = "lg";
|
|
7
|
+
SIZE_VAR["XL"] = "xl";
|
|
8
|
+
})(SIZE_VAR || (SIZE_VAR = {}));
|
|
9
|
+
var XV_SORT_DIR;
|
|
10
|
+
(function (XV_SORT_DIR) {
|
|
11
|
+
XV_SORT_DIR["ASC"] = "asc";
|
|
12
|
+
XV_SORT_DIR["DESC"] = "desc";
|
|
13
|
+
XV_SORT_DIR["NONE"] = "none";
|
|
14
|
+
})(XV_SORT_DIR || (XV_SORT_DIR = {}));
|
|
15
|
+
|
|
16
|
+
const OverflowMenuVariant = {
|
|
17
|
+
DEFAULT: '',
|
|
18
|
+
GHOST: 'ghost',
|
|
19
|
+
};
|
|
20
|
+
/** Tag used to discover menu items (roving keyboard navigation, size mirroring). */
|
|
21
|
+
const OverflowMenuItemSelector = 'xv-overflow-menu-v2-item';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Status of a draft-invoice notification, mirroring the platform's
|
|
25
|
+
* `InvoiceNotificationPayloadStatus` (Xv.Domain/Notifications/Payloads).
|
|
26
|
+
*
|
|
27
|
+
* The numeric values are the wire format: `/de-de/api/notifications/list` serializes the
|
|
28
|
+
* enum by ordinal, so these MUST stay in sync with the backend. The header used to compare
|
|
29
|
+
* `status === 1` while treating it as a failure, so a draft invoice that had been generated
|
|
30
|
+
* was shown with the error icon and the text "ist ausstehend" (MAR-15569).
|
|
31
|
+
*/
|
|
32
|
+
var InvoiceNotificationStatus;
|
|
33
|
+
(function (InvoiceNotificationStatus) {
|
|
34
|
+
InvoiceNotificationStatus[InvoiceNotificationStatus["PENDING"] = 0] = "PENDING";
|
|
35
|
+
InvoiceNotificationStatus[InvoiceNotificationStatus["COMPLETED"] = 1] = "COMPLETED";
|
|
36
|
+
InvoiceNotificationStatus[InvoiceNotificationStatus["FAILED"] = 2] = "FAILED";
|
|
37
|
+
})(InvoiceNotificationStatus || (InvoiceNotificationStatus = {}));
|
|
38
|
+
/** Bell label per status. German only — this component carries no i18n layer. */
|
|
39
|
+
const INVOICE_NOTIFICATION_STATUS_TEXT = {
|
|
40
|
+
[InvoiceNotificationStatus.PENDING]: 'ausstehend',
|
|
41
|
+
[InvoiceNotificationStatus.COMPLETED]: 'generiert',
|
|
42
|
+
[InvoiceNotificationStatus.FAILED]: 'fehlgeschlagen',
|
|
43
|
+
};
|
|
44
|
+
/** Font Awesome icon per status. */
|
|
45
|
+
const INVOICE_NOTIFICATION_STATUS_ICON = {
|
|
46
|
+
[InvoiceNotificationStatus.PENDING]: 'fa-clock',
|
|
47
|
+
[InvoiceNotificationStatus.COMPLETED]: 'fa-check-circle',
|
|
48
|
+
[InvoiceNotificationStatus.FAILED]: 'fa-times-circle',
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Falls back to PENDING for an unknown value so a new backend status renders as
|
|
52
|
+
* "waiting" rather than silently claiming success or failure.
|
|
53
|
+
*/
|
|
54
|
+
function invoiceNotificationStatusOf(status) {
|
|
55
|
+
switch (status) {
|
|
56
|
+
case InvoiceNotificationStatus.COMPLETED:
|
|
57
|
+
return InvoiceNotificationStatus.COMPLETED;
|
|
58
|
+
case InvoiceNotificationStatus.FAILED:
|
|
59
|
+
return InvoiceNotificationStatus.FAILED;
|
|
60
|
+
default:
|
|
61
|
+
return InvoiceNotificationStatus.PENDING;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export { INVOICE_NOTIFICATION_STATUS_ICON as I, OverflowMenuVariant as O, SIZE_VAR as S, XV_SORT_DIR as X, INVOICE_NOTIFICATION_STATUS_TEXT as a, OverflowMenuItemSelector as b, invoiceNotificationStatusOf as i };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement, F as Fragment } from './index-DmxA2ysB.js';
|
|
2
2
|
import { u as uidGenerator, f as forEach, r as resolveFieldMessage, s as setAttr, c as resolveWhitelabel, a as api, g as getMetaNav, b as getBaseUrl, d as debounce$1 } from './index-CQm2sRKT.js';
|
|
3
|
-
import { S as SIZE_VAR, X as XV_SORT_DIR, O as OverflowMenuVariant, a as OverflowMenuItemSelector } from './_vars-
|
|
3
|
+
import { S as SIZE_VAR, X as XV_SORT_DIR, O as OverflowMenuVariant, I as INVOICE_NOTIFICATION_STATUS_ICON, a as INVOICE_NOTIFICATION_STATUS_TEXT, i as invoiceNotificationStatusOf, b as OverflowMenuItemSelector } from './_vars-CS4ouQ2K.js';
|
|
4
4
|
|
|
5
5
|
const xvAccordionCss = () => `:host{display:block}`;
|
|
6
6
|
|
|
@@ -82668,12 +82668,10 @@ const XvHeader = class {
|
|
|
82668
82668
|
var _a;
|
|
82669
82669
|
if (!((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a.IsManager))
|
|
82670
82670
|
return null;
|
|
82671
|
-
return (h("li", { class: "notifications" }, h("xv-overflow-menu-v2", { position: "right", size: SIZE_VAR.MD }, h("span", { slot: "trigger", class: "fa-stack" }, h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) =>
|
|
82672
|
-
|
|
82673
|
-
|
|
82674
|
-
|
|
82675
|
-
'fa-circle': notification.status && notification.status !== 1,
|
|
82676
|
-
} }), h("div", { class: "notifications-item-body" }, h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ausstehend"), h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))))))));
|
|
82671
|
+
return (h("li", { class: "notifications" }, h("xv-overflow-menu-v2", { position: "right", size: SIZE_VAR.MD }, h("span", { slot: "trigger", class: "fa-stack" }, h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) => {
|
|
82672
|
+
const status = invoiceNotificationStatusOf(notification.status);
|
|
82673
|
+
return (h("xv-overflow-menu-v2-item", { value: notification.id, variant: OverflowMenuVariant.GHOST, disabled: notification.isRead, clickable: false }, h("div", { class: "notifications-item" }, h("i", { class: { far: true, [INVOICE_NOTIFICATION_STATUS_ICON[status]]: true } }), h("div", { class: "notifications-item-body" }, h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ", INVOICE_NOTIFICATION_STATUS_TEXT[status]), h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))));
|
|
82674
|
+
}))));
|
|
82677
82675
|
}
|
|
82678
82676
|
_renderAccount() {
|
|
82679
82677
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
@@ -82698,7 +82696,7 @@ const XvHeader = class {
|
|
|
82698
82696
|
render() {
|
|
82699
82697
|
var _a, _b, _c, _d, _e;
|
|
82700
82698
|
const isXvBrand = (((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a['WhitelabelName']) || 'Xv') === 'Xv';
|
|
82701
|
-
return (h("header", { key: '
|
|
82699
|
+
return (h("header", { key: 'c1dadf87ee5ac86371189f3c5326fdcbcfb9a486', class: "header" }, h("div", { key: '939c81c9e543c9987a8ad2910a2be103db1a5081', class: "header-wrapper" }, h("div", { key: 'f7322ff8b33db4e3f9974228f7fdc34aaf3da8a4', class: "xv-container" }, h("div", { key: '3ee4de80cfcc4239b12b0ab52908ea0e7d34aaab', class: "header-top" }, h("div", { key: '8eeada6b815392eafa3b06ad724ad931d3814235', class: "header-top--left" }, h("xv-button-v2", { key: '6718cbb3b0d486290d6e3d287f92aafe3059a773', class: "menu-btn", variant: "ghost", onClick: this.toggleMobMenu }, h("i", { key: '5c291e5f78889fd90b18457b171ef873f05ac92b', slot: "icon-left", class: { 'fa': true, 'fa-times': this.mobMenuOpen, 'fa-bars': !this.mobMenuOpen } })), this.metaNav && (h("a", { key: '3786b0153c70e32ed6e0fd888041f5f1371352dd', href: `${window.location.origin}/` }, h("picture", { key: 'b8e3315601275b5e37521bdfc8d68279774eb790' }, h("source", { key: '447e77d0b63478f5cc6a4947536dfeb75de0957c', srcSet: ((_b = this.metaNav) === null || _b === void 0 ? void 0 : _b.LogoUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo.svg', media: "(min-width: 990px)" }), h("img", { key: '75c5a3c7b5181a4ee7ca7daf010ed4283a901aba', src: ((_c = this.metaNav) === null || _c === void 0 ? void 0 : _c.LogoSmallUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo-small.svg', onError: this.logoFallback, loading: "lazy", alt: "Crossvertise" })))), this.orgUnit && (h("xv-link-v2", { key: '46caa5be0cc5ef85d70527fbe3cf5d410abd9cab', class: "header-top--orgUnit", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), h("ul", { key: 'cc0c800101e159c3ae6a887cc56c912ba12df29c', class: "header-top--right" }, this._renderSearch(), this._renderImpersonationInfo(), !((_d = this.metaNav) === null || _d === void 0 ? void 0 : _d.IsManager) && isXvBrand && (h("li", { key: '540fab8968f832d078d77febcac4f9d23b686888' }, h("xv-link-v2", { key: '7c59f497dc272169b5d6de4d5caf5758bd82fed0', variant: "ghost", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, h("xv-button-v2", { key: '0692e42a64c68979f0886566ccdca46a38ec21cd', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: '45dacc89068ff5af15a4f73c1c627ec5b71bab7f', class: "header-icon far fa-envelope" }), h("span", { key: 'a995848018fb4c251dd992c8a8458671ed57bb5a', class: "header-label xv-body-02" }, "Kontakt"))))), this._renderNotifications(), this._renderAccount(), !((_e = this.metaNav) === null || _e === void 0 ? void 0 : _e.IsManager) && isXvBrand && (h("li", { key: 'd7a86b909929af0126eef781321bf14cd07f8b09' }, h("xv-link-v2", { key: 'a9b9bc5c7e2496bcb36e1b1e30afe6183173ddd9', variant: "ghost", href: "https://help.crossvertise.com" }, h("xv-button-v2", { key: '5a943f49cfb73ec9a19368cf2ea5aef2f8c6194f', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: '0d892d7ed7a6a3777c3180a5101df8029e7fedf2', class: "header-icon far fa-question-circle" }), h("span", { key: 'd2ac5acb478b819eef302bfbb008294ffbd4706b', class: "header-label xv-body-02" }, "Hilfe"))))), this._renderShoppingCart()))), h("div", { key: '12b4d4b721f3987f69bb8c2024cf00a541dedb09', class: "header-wrapper--bg" }, h("div", { key: '029bb783f3204dccee6da34e7546944cc00331bc', class: "xv-container" }, h("xv-mega-menu", { key: '1542e98a5cde254587138abf550d9744f022c93a', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu })))), h("xv-login-modal", { key: '80ad843540761ab1aa41cb12a697736ea5c4fbe2', visible: this.showLoginModal, onClose: () => this.showLoginModal = false })));
|
|
82702
82700
|
}
|
|
82703
82701
|
get el() { return getElement(this); }
|
|
82704
82702
|
};
|
|
@@ -83418,6 +83416,13 @@ const XvOverflowMenu = class {
|
|
|
83418
83416
|
const button = (h("button", { class: { btn: true, open: this.open }, onClick: this.onOpenToggle, disabled: this.disabled, "aria-haspopup": "menu", "aria-expanded": this.open ? 'true' : 'false', ref: (el) => (this.triggerButtonEl = el) }, h("slot", { name: "trigger" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 128 512" }, h("path", { d: "M64 368a48 48 0 1 0 0 96 48 48 0 1 0 0-96zm0-160a48 48 0 1 0 0 96 48 48 0 1 0 0-96zM112 96A48 48 0 1 0 16 96a48 48 0 1 0 96 0z" })))));
|
|
83419
83417
|
return (h(Host, { class: "xv-overflow-menu", size: this.size }, this.tooltip ? h("xv-tooltip-v2", { message: this.tooltip }, button) : button, list));
|
|
83420
83418
|
}
|
|
83419
|
+
// Moving the host in the DOM — a framework reordering a list, say — disconnects and reconnects
|
|
83420
|
+
// it, and the disconnect tears the anchor listener down. componentDidLoad does not run a second
|
|
83421
|
+
// time, so without this the menu stays dead. Safe on the first mount: addEventListener discards
|
|
83422
|
+
// a duplicate of the same handler, and setupAnchor is a no-op until anchor is set.
|
|
83423
|
+
connectedCallback() {
|
|
83424
|
+
this.setupAnchor();
|
|
83425
|
+
}
|
|
83421
83426
|
componentDidLoad() {
|
|
83422
83427
|
this.setupAnchor();
|
|
83423
83428
|
this.syncOpenState();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, a as getElement } from './index-DmxA2ysB.js';
|
|
2
|
-
import { S as SIZE_VAR, O as OverflowMenuVariant } from './_vars-
|
|
2
|
+
import { S as SIZE_VAR, O as OverflowMenuVariant, I as INVOICE_NOTIFICATION_STATUS_ICON, a as INVOICE_NOTIFICATION_STATUS_TEXT, i as invoiceNotificationStatusOf } from './_vars-CS4ouQ2K.js';
|
|
3
3
|
import { a as api, g as getMetaNav, b as getBaseUrl, d as debounce } from './index-CQm2sRKT.js';
|
|
4
4
|
|
|
5
5
|
const userMagnifyingGlassRegularFullSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NDAgNjQwIj48IS0tIUZvbnQgQXdlc29tZSBQcm8gNy4xLjAgYnkgQGZvbnRhd2Vzb21lIC0gaHR0cHM6Ly9mb250YXdlc29tZS5jb20gTGljZW5zZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tL2xpY2Vuc2UgKENvbW1lcmNpYWwgTGljZW5zZSkgQ29weXJpZ2h0IDIwMjUgRm9udGljb25zLCBJbmMuLS0+PHBhdGggZD0iTTE3Ni41IDE5MkMxNzYuNSAxNDcuOCAyMTIuMyAxMTIgMjU2LjUgMTEyQzMwMC43IDExMiAzMzYuNSAxNDcuOCAzMzYuNSAxOTJDMzM2LjUgMjM2LjIgMzAwLjcgMjcyIDI1Ni41IDI3MkMyMTIuMyAyNzIgMTc2LjUgMjM2LjIgMTc2LjUgMTkyek0zODQuNSAxOTJDMzg0LjUgMTIxLjMgMzI3LjIgNjQgMjU2LjUgNjRDMTg1LjggNjQgMTI4LjUgMTIxLjMgMTI4LjUgMTkyQzEyOC41IDI2Mi43IDE4NS44IDMyMCAyNTYuNSAzMjBDMzI3LjIgMzIwIDM4NC41IDI2Mi43IDM4NC41IDE5MnpNODAuNSA1NDRDODAuNSA0NzMuMyAxMzcuOCA0MTYgMjA4LjUgNDE2TDI4OC43IDQxNkMyODkuNSAzOTkuMiAyOTIuNyAzODMuMSAyOTguMSAzNjhMMjA4LjUgMzY4QzExMS4zIDM2OCAzMi41IDQ0Ni44IDMyLjUgNTQ0TDMyLjUgNTUyQzMyLjUgNTY1LjMgNDMuMiA1NzYgNTYuNSA1NzZDNjkuOCA1NzYgODAuNSA1NjUuMyA4MC41IDU1Mkw4MC41IDU0NHpNNDU2LjUgMzUyQzQ5Ni4zIDM1MiA1MjguNSAzODQuMiA1MjguNSA0MjRDNTI4LjUgNDYzLjggNDk2LjMgNDk2IDQ1Ni41IDQ5NkM0MTYuNyA0OTYgMzg0LjUgNDYzLjggMzg0LjUgNDI0QzM4NC41IDM4NC4yIDQxNi43IDM1MiA0NTYuNSAzNTJ6TTQ1Ni41IDU0NEM0ODAuOSA1NDQgNTAzLjYgNTM2LjcgNTIyLjYgNTI0LjJMNTgzLjUgNTg1LjFDNTkyLjkgNTk0LjUgNjA4LjEgNTk0LjUgNjE3LjQgNTg1LjFDNjI2LjcgNTc1LjcgNjI2LjggNTYwLjUgNjE3LjQgNTUxLjJMNTU2LjUgNDkwLjNDNTY5LjEgNDcxLjMgNTc2LjQgNDQ4LjUgNTc2LjQgNDI0QzU3Ni40IDM1Ny43IDUyMi43IDMwNCA0NTYuNCAzMDRDMzkwLjEgMzA0IDMzNi40IDM1Ny43IDMzNi40IDQyNEMzMzYuNCA0OTAuMyAzOTAuMSA1NDQgNDU2LjQgNTQ0eiIvPjwvc3ZnPg==';
|
|
@@ -173,12 +173,10 @@ const XvHeaderNext = class {
|
|
|
173
173
|
var _a;
|
|
174
174
|
if (!((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a.IsManager))
|
|
175
175
|
return null;
|
|
176
|
-
return (h("li", { class: "notifications" }, h("xv-overflow-menu-v2", { position: "right", size: SIZE_VAR.MD }, h("span", { slot: "trigger", class: "fa-stack" }, h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) =>
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
'fa-circle': notification.status && notification.status !== 1,
|
|
181
|
-
} }), h("div", { class: "notifications-item-body" }, h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ausstehend"), h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))))))));
|
|
176
|
+
return (h("li", { class: "notifications" }, h("xv-overflow-menu-v2", { position: "right", size: SIZE_VAR.MD }, h("span", { slot: "trigger", class: "fa-stack" }, h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) => {
|
|
177
|
+
const status = invoiceNotificationStatusOf(notification.status);
|
|
178
|
+
return (h("xv-overflow-menu-v2-item", { value: notification.id, variant: OverflowMenuVariant.GHOST, disabled: notification.isRead, clickable: false }, h("div", { class: "notifications-item" }, h("i", { class: { far: true, [INVOICE_NOTIFICATION_STATUS_ICON[status]]: true } }), h("div", { class: "notifications-item-body" }, h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ", INVOICE_NOTIFICATION_STATUS_TEXT[status]), h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))));
|
|
179
|
+
}))));
|
|
182
180
|
}
|
|
183
181
|
_renderAccount() {
|
|
184
182
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
@@ -197,7 +195,7 @@ const XvHeaderNext = class {
|
|
|
197
195
|
render() {
|
|
198
196
|
var _a, _b, _c, _d, _e;
|
|
199
197
|
const isXvBrand = (((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a['WhitelabelName']) || 'Xv') === 'Xv';
|
|
200
|
-
return (h("header", { key: '
|
|
198
|
+
return (h("header", { key: '13a9d3cc028a97c7c4d3db96c40e58cffa1fe33a', class: "header" }, h("div", { key: 'bc3da59737a300efcbbce9234b750a16c2c96ce3', class: "header-wrapper" }, h("div", { key: '294a3ab110a7bf53b2bed24db1b1a56a8ec66dcb', class: "xv-container" }, h("div", { key: '99fbcdaa2c4e72eb8661f8b8034e616bf99c1bc5', class: "header-top" }, h("div", { key: '1e703aa885c9462f06d44fdd9756f42b08e96241', class: "header-top--left" }, h("xv-button-v2", { key: 'f867ffe85b45e67b55ea30ce8bfa1da0352f1edc', class: "menu-btn", variant: "ghost", onClick: this.toggleMobMenu }, h("i", { key: 'f048441a12346222ac24df76f91bc03b6096bea2', slot: "icon-left", class: { 'fa': true, 'fa-times': this.mobMenuOpen, 'fa-bars': !this.mobMenuOpen } })), this.metaNav && (h("a", { key: '5fe60ea6eb240c62fd831e835ad89dad555b0edb', href: `${window.location.origin}/` }, h("picture", { key: '060830e01a97d6b7192202f719ca42c94d9075ff' }, h("source", { key: '5d1f714cb70131c2634d552e22305b78afb755bd', srcSet: ((_b = this.metaNav) === null || _b === void 0 ? void 0 : _b.LogoUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo.svg', media: "(min-width: 990px)" }), h("img", { key: '90334b422808e153718dd43dd7404c23e0e69692', src: ((_c = this.metaNav) === null || _c === void 0 ? void 0 : _c.LogoSmallUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo-small.svg', onError: this.logoFallback, loading: "lazy", alt: "Crossvertise" })))), this.orgUnit && (h("xv-link-v2", { key: '6cce595ce435c6fb05d74ee8ecd3ee58cc788f90', class: "header-top--orgUnit", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), h("ul", { key: '6284fdfc7a99ab5a8194f13f55f5cccf47427d65', class: "header-top--right" }, this._renderLocaleSwitcher(), this._renderSearch(), this._renderImpersonationInfo(), !((_d = this.metaNav) === null || _d === void 0 ? void 0 : _d.IsManager) && isXvBrand && (h("li", { key: 'da5bd80e9d475358a16052e62c56fb6d4aa3370c' }, h("xv-link-v2", { key: '3096b8531e471537d5a16910456fcb6fe5de8af8', variant: "ghost", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, h("xv-button-v2", { key: '4b1fa5e374d05f183a0fb39adec0b779cecd17e1', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: 'bb69f452fabd750451b993acbda13fda6e8f3da9', class: "header-icon far fa-envelope" }), h("span", { key: '62e89c597ae9b1cc77329fa36dd32f65d4e79511', class: "header-label xv-body-02" }, "Kontakt"))))), this._renderNotifications(), this._renderAccount(), !((_e = this.metaNav) === null || _e === void 0 ? void 0 : _e.IsManager) && isXvBrand && (h("li", { key: 'fc3cdac26fa33bcbd027d1605934e40e832fafd5' }, h("xv-link-v2", { key: 'fd1303e606ebfe4ca8944f2685e5b2f616fdcc47', variant: "ghost", href: "https://help.crossvertise.com" }, h("xv-button-v2", { key: '41f5daa4d30d7bed6ed032563a600036b4e230bd', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: '764c0abede96b262c562832a6bbebee70484c326', class: "header-icon far fa-question-circle" }), h("span", { key: 'c69623c9fbb3110998b9a3a80cff3cc404d1de60', class: "header-label xv-body-02" }, "Hilfe"))))), this._renderShoppingCart()))), h("div", { key: 'e6936d829410b2b7c7801ce388c71f9817d88fca', class: "header-wrapper--bg" }, h("div", { key: '674d7d606828838f6ad17a5eb274bed488ecb323', class: "xv-container" }, h("xv-mega-menu-next", { key: '18ceb4546630a258b04097ddaf16bb10bdf2a8fa', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu, menuData: this.menuData })))), h("xv-login-modal", { key: 'a3404b9ad678f5d5c0efd687788631e828574e2d', visible: this.showLoginModal, onClose: () => this.showLoginModal = false })));
|
|
201
199
|
}
|
|
202
200
|
get el() { return getElement(this); }
|
|
203
201
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Status of a draft-invoice notification, mirroring the platform's
|
|
3
|
+
* `InvoiceNotificationPayloadStatus` (Xv.Domain/Notifications/Payloads).
|
|
4
|
+
*
|
|
5
|
+
* The numeric values are the wire format: `/de-de/api/notifications/list` serializes the
|
|
6
|
+
* enum by ordinal, so these MUST stay in sync with the backend. The header used to compare
|
|
7
|
+
* `status === 1` while treating it as a failure, so a draft invoice that had been generated
|
|
8
|
+
* was shown with the error icon and the text "ist ausstehend" (MAR-15569).
|
|
9
|
+
*/
|
|
10
|
+
export declare enum InvoiceNotificationStatus {
|
|
11
|
+
PENDING = 0,
|
|
12
|
+
COMPLETED = 1,
|
|
13
|
+
FAILED = 2
|
|
14
|
+
}
|
|
15
|
+
/** Bell label per status. German only — this component carries no i18n layer. */
|
|
16
|
+
export declare const INVOICE_NOTIFICATION_STATUS_TEXT: Record<InvoiceNotificationStatus, string>;
|
|
17
|
+
/** Font Awesome icon per status. */
|
|
18
|
+
export declare const INVOICE_NOTIFICATION_STATUS_ICON: Record<InvoiceNotificationStatus, string>;
|
|
19
|
+
/**
|
|
20
|
+
* Falls back to PENDING for an unknown value so a new backend status renders as
|
|
21
|
+
* "waiting" rather than silently claiming success or failure.
|
|
22
|
+
*/
|
|
23
|
+
export declare function invoiceNotificationStatusOf(status: number | null | undefined): InvoiceNotificationStatus;
|