@dangl/angular-ava 1.2.1-beta0002 → 1.2.2-beta0002
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/fesm2022/dangl-angular-ava.mjs +360 -143
- package/fesm2022/dangl-angular-ava.mjs.map +1 -1
- package/lib/ava-tree/components/ava-tree/ava-tree.component.d.ts +2 -3
- package/lib/ava-tree/components/list-structure/list-structure.component.d.ts +1 -1
- package/lib/ava-tree/components/table-structure/table-structure.component.d.ts +2 -2
- package/lib/ava-tree/components/tree-item/tree-item.component.d.ts +2 -2
- package/lib/ava-tree/components/tree-node/tree-node.component.d.ts +1 -1
- package/lib/ava-tree/directives/save-changing-view.directive.d.ts +1 -1
- package/lib/ava-tree/services/configuration-tree.service.d.ts +6 -5
- package/lib/invoice/components/invoice-display/invoice-display.component.d.ts +1 -1
- package/lib/invoice/components/invoice-documents/invoice-documents.component.d.ts +3 -3
- package/lib/invoice/services/configuration-invoice.service.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AsyncPipe, NgTemplateOutlet, NgClass, DecimalPipe, CurrencyPipe, DatePipe, PercentPipe } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Injectable, inject, Directive, Input, HostListener, Pipe, Component, ViewChild, ViewChildren, EventEmitter, ChangeDetectorRef, ViewEncapsulation, ChangeDetectionStrategy, Self, Output, input } from '@angular/core';
|
|
3
|
+
import { Injectable, inject, Directive, Input, HostListener, Pipe, Component, ViewChild, ViewChildren, EventEmitter, ChangeDetectorRef, ViewEncapsulation, ChangeDetectionStrategy, Self, Output, DestroyRef, input } from '@angular/core';
|
|
4
4
|
import * as i11 from '@angular/forms';
|
|
5
5
|
import { FormsModule } from '@angular/forms';
|
|
6
6
|
import * as i7 from '@angular/material/button';
|
|
@@ -13,18 +13,16 @@ import * as i12 from '@angular/material/input';
|
|
|
13
13
|
import { MatInputModule } from '@angular/material/input';
|
|
14
14
|
import * as i10 from '@angular/material/tooltip';
|
|
15
15
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
16
|
-
import { ReplaySubject, of,
|
|
16
|
+
import { BehaviorSubject, map, distinctUntilChanged, ReplaySubject, of, Subject, takeUntil, combineLatestWith, take, switchMap, debounceTime, filter, tap, fromEvent, skip } from 'rxjs';
|
|
17
17
|
import * as i4 from '@angular/material/checkbox';
|
|
18
18
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
19
|
-
import * as i2 from 'projects/angular-ava/src/lib/ava-tree/services/configuration-tree.service';
|
|
20
|
-
import { ConfigurationTreeService } from 'projects/angular-ava/src/lib/ava-tree/services/configuration-tree.service';
|
|
21
19
|
import * as i4$1 from '@angular/material/table';
|
|
22
20
|
import { MatTableModule } from '@angular/material/table';
|
|
23
21
|
import * as i2$1 from '@angular/material/divider';
|
|
24
22
|
import { MatDividerModule } from '@angular/material/divider';
|
|
25
|
-
import {
|
|
26
|
-
import * as
|
|
27
|
-
import {
|
|
23
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
24
|
+
import * as i2 from '@angular/material/expansion';
|
|
25
|
+
import { MatExpansionModule } from '@angular/material/expansion';
|
|
28
26
|
|
|
29
27
|
//----------------------
|
|
30
28
|
// <auto-generated>
|
|
@@ -241,14 +239,118 @@ var ModeViewType;
|
|
|
241
239
|
|
|
242
240
|
// This file is automatically generated as part of the build process
|
|
243
241
|
const version = {
|
|
244
|
-
version: "1.2.
|
|
245
|
-
commitInfo: "Branch.develop.Sha.
|
|
242
|
+
version: "1.2.2-beta0002",
|
|
243
|
+
commitInfo: "Branch.develop.Sha.b2b1d5dc5c641526a58144500f04598785073464",
|
|
246
244
|
commitDate: "2025-01-16",
|
|
247
|
-
commitHash: "
|
|
248
|
-
informationalVersion: "1.2.
|
|
249
|
-
buildDateUtc: new Date(Date.UTC(2025, 0, 16,
|
|
245
|
+
commitHash: "b2b1d5dc5c641526a58144500f04598785073464",
|
|
246
|
+
informationalVersion: "1.2.2-beta.2+Branch.develop.Sha.b2b1d5dc5c641526a58144500f04598785073464",
|
|
247
|
+
buildDateUtc: new Date(Date.UTC(2025, 0, 16, 14, 41, 6))
|
|
250
248
|
};
|
|
251
249
|
|
|
250
|
+
const DEFAULT_TEXT_WORDS = {
|
|
251
|
+
textSearch: 'Search',
|
|
252
|
+
textNothing: 'Nothing',
|
|
253
|
+
textNothingFiltered: 'No Filter',
|
|
254
|
+
textAll: 'All',
|
|
255
|
+
tooltipAllOpen: 'Expand all',
|
|
256
|
+
tooltipAllClose: 'Collapse all',
|
|
257
|
+
tooltipAllAdd: 'Add all',
|
|
258
|
+
tooltipAllRemove: 'Remove all',
|
|
259
|
+
defaultNameNoteText: 'Note Text',
|
|
260
|
+
defaultNameDescription: 'Description',
|
|
261
|
+
defaultNameGroup: 'Group',
|
|
262
|
+
defaultNamePosition: 'Position'
|
|
263
|
+
};
|
|
264
|
+
const germanTextsAva = {
|
|
265
|
+
textSearch: 'Suche',
|
|
266
|
+
textNothing: 'Nichts',
|
|
267
|
+
textNothingFiltered: 'Kein Filter',
|
|
268
|
+
textAll: 'Alle',
|
|
269
|
+
tooltipAllOpen: 'Alle aufklappen',
|
|
270
|
+
tooltipAllClose: 'Alle zuklappen',
|
|
271
|
+
tooltipAllAdd: 'Alle hinzufügen',
|
|
272
|
+
tooltipAllRemove: 'Alle entfernen',
|
|
273
|
+
defaultNameNoteText: 'Hinweis',
|
|
274
|
+
defaultNameDescription: 'Beschreibung',
|
|
275
|
+
defaultNameGroup: 'Gruppe',
|
|
276
|
+
defaultNamePosition: 'Position'
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
class ConfigurationTreeService {
|
|
280
|
+
constructor() {
|
|
281
|
+
this._textWords = { ...DEFAULT_TEXT_WORDS };
|
|
282
|
+
this._indent = '20px';
|
|
283
|
+
this._functionView = [];
|
|
284
|
+
this._selectedColor = '';
|
|
285
|
+
this._allowDblClick = true;
|
|
286
|
+
this._mouseAwareKeyboardControl = true;
|
|
287
|
+
this._addTableColumns = [];
|
|
288
|
+
this._isSelectionMode = false;
|
|
289
|
+
this._initiallySelectedElements = [];
|
|
290
|
+
this._customKeyboardOperationConfig = null;
|
|
291
|
+
this._listFilterFunc = [];
|
|
292
|
+
this.treeConfigSource = new BehaviorSubject(this.getDefaultConfiguration());
|
|
293
|
+
this.treeConfig$ = this.treeConfigSource.asObservable();
|
|
294
|
+
}
|
|
295
|
+
setTreeConfig(value) {
|
|
296
|
+
this.treeConfigSource.next(value);
|
|
297
|
+
}
|
|
298
|
+
getCurrentTreeConfig() {
|
|
299
|
+
return this.treeConfigSource.getValue();
|
|
300
|
+
}
|
|
301
|
+
getTextWordsFromConfig() {
|
|
302
|
+
return this.treeConfig$.pipe(map((config) => {
|
|
303
|
+
const configTextWords = config?.textWords === 'en' ? DEFAULT_TEXT_WORDS : config?.textWords === 'de' ? germanTextsAva : config?.textWords;
|
|
304
|
+
return { ...this._textWords, ...configTextWords };
|
|
305
|
+
}), distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)));
|
|
306
|
+
}
|
|
307
|
+
getIndentFromConfig() {
|
|
308
|
+
return this.treeConfig$.pipe(map((config) => config?.indent || ''), distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)));
|
|
309
|
+
}
|
|
310
|
+
getFunctionViewFromConfig() {
|
|
311
|
+
return this.treeConfig$.pipe(map((config) => config?.functionView || []), distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)));
|
|
312
|
+
}
|
|
313
|
+
getSelectedColorFromConfig() {
|
|
314
|
+
return this.treeConfig$.pipe(map((config) => config?.selectedColor || ''), distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)));
|
|
315
|
+
}
|
|
316
|
+
getAllowDblClickFromConfig() {
|
|
317
|
+
return this.treeConfig$.pipe(map((config) => config?.allowDblClick || false), distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)));
|
|
318
|
+
}
|
|
319
|
+
getAddTableColumnsFromConfig() {
|
|
320
|
+
return this.treeConfig$.pipe(map((config) => config?.addTableColumns || []), distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)));
|
|
321
|
+
}
|
|
322
|
+
getIsSelectionModeFromConfig() {
|
|
323
|
+
return this.treeConfig$.pipe(map((config) => config?.isSelectionMode || false), distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)));
|
|
324
|
+
}
|
|
325
|
+
getInitiallySelectedElementsViewFromConfig() {
|
|
326
|
+
return this.treeConfig$.pipe(map((config) => config?.initiallySelectedElements || []), distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)));
|
|
327
|
+
}
|
|
328
|
+
getMouseAwareKeyboardControlFromConfig() {
|
|
329
|
+
return this.treeConfig$.pipe(map((config) => config?.mouseAwareKeyboardControl || false), distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)));
|
|
330
|
+
}
|
|
331
|
+
getCustomKeyboardOperationConfigFromConfig() {
|
|
332
|
+
return this.treeConfig$.pipe(map((config) => config?.customKeyboardOperationConfig || null), distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)));
|
|
333
|
+
}
|
|
334
|
+
getListFilterFuncFromConfig() {
|
|
335
|
+
return this.treeConfig$.pipe(map((config) => config?.listFilterFunc || []), distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)));
|
|
336
|
+
}
|
|
337
|
+
getDefaultConfiguration() {
|
|
338
|
+
return {
|
|
339
|
+
textWords: this._textWords,
|
|
340
|
+
indent: this._indent,
|
|
341
|
+
functionView: this._functionView,
|
|
342
|
+
selectedColor: this._selectedColor,
|
|
343
|
+
allowDblClick: this._allowDblClick,
|
|
344
|
+
addTableColumns: this._addTableColumns,
|
|
345
|
+
isSelectionMode: this._isSelectionMode,
|
|
346
|
+
initiallySelectedElements: this._initiallySelectedElements,
|
|
347
|
+
mouseAwareKeyboardControl: this._mouseAwareKeyboardControl,
|
|
348
|
+
customKeyboardOperationConfig: this._customKeyboardOperationConfig,
|
|
349
|
+
listFilterFunc: this._listFilterFunc
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
252
354
|
class ExpandParentGroupService {
|
|
253
355
|
constructor() { }
|
|
254
356
|
expandParentGroups(element, flatElements, expansionState) {
|
|
@@ -304,35 +406,6 @@ const DEFAULT_FILTERS = [
|
|
|
304
406
|
}
|
|
305
407
|
];
|
|
306
408
|
|
|
307
|
-
const DEFAULT_TEXT_WORDS = {
|
|
308
|
-
textSearch: 'Search',
|
|
309
|
-
textNothing: 'Nothing',
|
|
310
|
-
textNothingFiltered: 'No Filter',
|
|
311
|
-
textAll: 'All',
|
|
312
|
-
tooltipAllOpen: 'Expand all',
|
|
313
|
-
tooltipAllClose: 'Collapse all',
|
|
314
|
-
tooltipAllAdd: 'Add all',
|
|
315
|
-
tooltipAllRemove: 'Remove all',
|
|
316
|
-
defaultNameNoteText: 'Note Text',
|
|
317
|
-
defaultNameDescription: 'Description',
|
|
318
|
-
defaultNameGroup: 'Group',
|
|
319
|
-
defaultNamePosition: 'Position'
|
|
320
|
-
};
|
|
321
|
-
const germanTextsAva = {
|
|
322
|
-
textSearch: 'Suche',
|
|
323
|
-
textNothing: 'Nichts',
|
|
324
|
-
textNothingFiltered: 'Kein Filter',
|
|
325
|
-
textAll: 'Alle',
|
|
326
|
-
tooltipAllOpen: 'Alle aufklappen',
|
|
327
|
-
tooltipAllClose: 'Alle zuklappen',
|
|
328
|
-
tooltipAllAdd: 'Alle hinzufügen',
|
|
329
|
-
tooltipAllRemove: 'Alle entfernen',
|
|
330
|
-
defaultNameNoteText: 'Hinweis',
|
|
331
|
-
defaultNameDescription: 'Beschreibung',
|
|
332
|
-
defaultNameGroup: 'Gruppe',
|
|
333
|
-
defaultNamePosition: 'Position'
|
|
334
|
-
};
|
|
335
|
-
|
|
336
409
|
const defaults = {
|
|
337
410
|
doubleClickTimeoutInMilliseconds: 300
|
|
338
411
|
};
|
|
@@ -891,7 +964,7 @@ class SaveChangingViewDirective {
|
|
|
891
964
|
}
|
|
892
965
|
return null;
|
|
893
966
|
}
|
|
894
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: SaveChangingViewDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: FlatElementsService }, { token:
|
|
967
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: SaveChangingViewDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: FlatElementsService }, { token: ConfigurationTreeService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
895
968
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.1", type: SaveChangingViewDirective, isStandalone: true, selector: "[saveChangingView]", inputs: { saveChangingView: "saveChangingView" }, ngImport: i0 }); }
|
|
896
969
|
}
|
|
897
970
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: SaveChangingViewDirective, decorators: [{
|
|
@@ -899,7 +972,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
899
972
|
args: [{
|
|
900
973
|
selector: '[saveChangingView]'
|
|
901
974
|
}]
|
|
902
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: FlatElementsService }, { type:
|
|
975
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: FlatElementsService }, { type: ConfigurationTreeService }], propDecorators: { saveChangingView: [{
|
|
903
976
|
type: Input
|
|
904
977
|
}] } });
|
|
905
978
|
|
|
@@ -1071,7 +1144,7 @@ class TreeItemComponent {
|
|
|
1071
1144
|
changeSelecting(element, isSelected) {
|
|
1072
1145
|
this.treeNodeSelectionService.changeSelecting(isSelected, element.id);
|
|
1073
1146
|
}
|
|
1074
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: TreeItemComponent, deps: [{ token: SelectElementService }, { token: TreeNodeSelectionService }, { token: i0.ChangeDetectorRef }, { token:
|
|
1147
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: TreeItemComponent, deps: [{ token: SelectElementService }, { token: TreeNodeSelectionService }, { token: i0.ChangeDetectorRef }, { token: ConfigurationTreeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1075
1148
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: TreeItemComponent, isStandalone: true, selector: "ava-tree-item", inputs: { element: "element", expansionState: "expansionState", isSelect: "isSelect", backgroundColor: "backgroundColor" }, viewQueries: [{ propertyName: "textElement", first: true, predicate: ["textItem"], descendants: true }], ngImport: i0, template: "@if (element) {\n <div\n (click)=\"select()\"\n (dblclick)=\"dblSelect()\"\n (contextmenu)=\"openContextMenu($event)\"\n class=\"ava-tree-item\"\n [id]=\"element.id\"\n >\n <mat-icon\n class=\"ava-tree-item__icon\"\n saveChangingView=\"icon\"\n [id]=\"element.id\"\n >{{ element | elementIconName }}</mat-icon\n >\n @if (!isSelectionMode) {\n <div\n #textItem\n class=\"ava-tree-item__text\"\n [class.choose]=\"!isSelectionMode && element.id === preselectedElement?.id\"\n [id]=\"element.id\"\n saveChangingView=\"text\"\n [class.select]=\"isSelect\"\n [style.backgroundColor]=\"backgroundColor\"\n >\n <ng-container [ngTemplateOutlet]=\"text\"></ng-container>\n </div>\n }\n @if (isSelectionMode) {\n <mat-checkbox\n class=\"ava-tree-item__checkbox\"\n color=\"primary\"\n [indeterminate]=\"checkedElements[element.id].indeterminate\"\n [(ngModel)]=\"checkedElements[element.id].checked\"\n (ngModelChange)=\"changeSelecting(element, $event)\"\n (click)=\"$event.stopPropagation()\"\n >\n <div\n class=\"ava-tree-item__text\"\n saveChangingView=\"text\"\n [id]=\"element.id\"\n >\n <ng-container [ngTemplateOutlet]=\"text\"></ng-container>\n </div>\n </mat-checkbox>\n }\n </div>\n}\n\n<ng-template #text>\n @if (textWords$ | async; as textWords) {\n @if (element.elementTypeDiscriminator === 'ServiceSpecificationGroupDto' || element.elementTypeDiscriminator === 'PositionDto') {\n <ng-container> {{ element | elementItemNumber }} - {{ element | elementText: textWords }} </ng-container>\n } @else {\n <ng-container>{{ element | elementText: textWords }}</ng-container>\n }\n }\n</ng-template>\n", styles: ["::ng-deep .ava-tree-item__checkbox .mdc-form-field .mdc-checkbox{padding:0;flex:0 0 16px;width:16px;height:16px}::ng-deep .ava-tree-item__checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__native-control{width:100%;height:100%}::ng-deep .ava-tree-item__checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:0!important}::ng-deep .ava-tree-item__checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__background{top:0;left:0;width:100%;height:100%}::ng-deep .ava-tree-item__checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff!important}::ng-deep .ava-tree-item__checkbox .mdc-form-field>label{line-height:24px;padding-left:8px;-webkit-user-select:none;user-select:none}::ng-deep .ava-tree-item__checkbox .mat-mdc-checkbox-touch-target{width:16px!important;height:16px!important}.ava-tree-item{display:flex;align-items:center}.ava-tree-item__icon,.ava-tree-item__checkbox{flex-shrink:0}.ava-tree-item__text{flex-grow:1;-webkit-user-select:none;user-select:none;white-space:nowrap;display:flex;align-items:center;min-height:24px}.ava-tree-item__text.choose{color:red!important}.ava-tree-item__text{background-color:#fefefe}.select{background-color:var(--mdc-filled-text-field-caret-color);color:#fff}\n"], dependencies: [{ kind: "directive", type: SaveChangingViewDirective, selector: "[saveChangingView]", inputs: ["saveChangingView"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: ElementItemNumberPipe, name: "elementItemNumber" }, { kind: "pipe", type: ElementTextPipe, name: "elementText" }, { kind: "pipe", type: ElementIconNamePipe, name: "elementIconName" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i4.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i11.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
1076
1149
|
}
|
|
1077
1150
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: TreeItemComponent, decorators: [{
|
|
@@ -1087,7 +1160,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
1087
1160
|
FormsModule,
|
|
1088
1161
|
MatIconModule
|
|
1089
1162
|
], template: "@if (element) {\n <div\n (click)=\"select()\"\n (dblclick)=\"dblSelect()\"\n (contextmenu)=\"openContextMenu($event)\"\n class=\"ava-tree-item\"\n [id]=\"element.id\"\n >\n <mat-icon\n class=\"ava-tree-item__icon\"\n saveChangingView=\"icon\"\n [id]=\"element.id\"\n >{{ element | elementIconName }}</mat-icon\n >\n @if (!isSelectionMode) {\n <div\n #textItem\n class=\"ava-tree-item__text\"\n [class.choose]=\"!isSelectionMode && element.id === preselectedElement?.id\"\n [id]=\"element.id\"\n saveChangingView=\"text\"\n [class.select]=\"isSelect\"\n [style.backgroundColor]=\"backgroundColor\"\n >\n <ng-container [ngTemplateOutlet]=\"text\"></ng-container>\n </div>\n }\n @if (isSelectionMode) {\n <mat-checkbox\n class=\"ava-tree-item__checkbox\"\n color=\"primary\"\n [indeterminate]=\"checkedElements[element.id].indeterminate\"\n [(ngModel)]=\"checkedElements[element.id].checked\"\n (ngModelChange)=\"changeSelecting(element, $event)\"\n (click)=\"$event.stopPropagation()\"\n >\n <div\n class=\"ava-tree-item__text\"\n saveChangingView=\"text\"\n [id]=\"element.id\"\n >\n <ng-container [ngTemplateOutlet]=\"text\"></ng-container>\n </div>\n </mat-checkbox>\n }\n </div>\n}\n\n<ng-template #text>\n @if (textWords$ | async; as textWords) {\n @if (element.elementTypeDiscriminator === 'ServiceSpecificationGroupDto' || element.elementTypeDiscriminator === 'PositionDto') {\n <ng-container> {{ element | elementItemNumber }} - {{ element | elementText: textWords }} </ng-container>\n } @else {\n <ng-container>{{ element | elementText: textWords }}</ng-container>\n }\n }\n</ng-template>\n", styles: ["::ng-deep .ava-tree-item__checkbox .mdc-form-field .mdc-checkbox{padding:0;flex:0 0 16px;width:16px;height:16px}::ng-deep .ava-tree-item__checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__native-control{width:100%;height:100%}::ng-deep .ava-tree-item__checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:0!important}::ng-deep .ava-tree-item__checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__background{top:0;left:0;width:100%;height:100%}::ng-deep .ava-tree-item__checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff!important}::ng-deep .ava-tree-item__checkbox .mdc-form-field>label{line-height:24px;padding-left:8px;-webkit-user-select:none;user-select:none}::ng-deep .ava-tree-item__checkbox .mat-mdc-checkbox-touch-target{width:16px!important;height:16px!important}.ava-tree-item{display:flex;align-items:center}.ava-tree-item__icon,.ava-tree-item__checkbox{flex-shrink:0}.ava-tree-item__text{flex-grow:1;-webkit-user-select:none;user-select:none;white-space:nowrap;display:flex;align-items:center;min-height:24px}.ava-tree-item__text.choose{color:red!important}.ava-tree-item__text{background-color:#fefefe}.select{background-color:var(--mdc-filled-text-field-caret-color);color:#fff}\n"] }]
|
|
1090
|
-
}], ctorParameters: () => [{ type: SelectElementService }, { type: TreeNodeSelectionService }, { type: i0.ChangeDetectorRef }, { type:
|
|
1163
|
+
}], ctorParameters: () => [{ type: SelectElementService }, { type: TreeNodeSelectionService }, { type: i0.ChangeDetectorRef }, { type: ConfigurationTreeService }], propDecorators: { element: [{
|
|
1091
1164
|
type: Input
|
|
1092
1165
|
}], expansionState: [{
|
|
1093
1166
|
type: Input
|
|
@@ -1125,13 +1198,13 @@ class ListStructureComponent {
|
|
|
1125
1198
|
this.$destroy.next(true);
|
|
1126
1199
|
this.$destroy.complete();
|
|
1127
1200
|
}
|
|
1128
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: ListStructureComponent, deps: [{ token: SelectElementService }, { token:
|
|
1201
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: ListStructureComponent, deps: [{ token: SelectElementService }, { token: ConfigurationTreeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1129
1202
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: ListStructureComponent, isStandalone: true, selector: "ava-list-structure", inputs: { filteredElementList: "filteredElementList" }, viewQueries: [{ propertyName: "templates", predicate: ["hoverTooltipElement"], descendants: true }], ngImport: i0, template: "@for (element of filteredElementList; track element.id) {\n <ng-container>\n <div\n [class.select]=\"!isSelectionMode && element.id === selectedElement?.id\"\n [style.backgroundColor]=\"!isSelectionMode && element.id === selectedElement?.id ? (selectedColor$ | async) : ''\"\n [id]=\"'hover-element-id-' + element.id\"\n [avaHoverEffect]=\"avaItem\"\n >\n <ava-tree-item\n #avaItem\n [element]=\"element\"\n [isSelect]=\"!isSelectionMode && element.id === selectedElement?.id\"\n [backgroundColor]=\"!isSelectionMode && element.id === selectedElement?.id ? (selectedColor$ | async) : ''\"\n ></ava-tree-item>\n </div>\n </ng-container>\n}\n", styles: [".select{background-color:var(--mdc-filled-text-field-caret-color);color:#fff}.select *{color:#fff}\n"], dependencies: [{ kind: "component", type: TreeItemComponent, selector: "ava-tree-item", inputs: ["element", "expansionState", "isSelect", "backgroundColor"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: HoverEffectDirective, selector: "[avaHoverEffect]", inputs: ["avaHoverEffect"] }] }); }
|
|
1130
1203
|
}
|
|
1131
1204
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: ListStructureComponent, decorators: [{
|
|
1132
1205
|
type: Component,
|
|
1133
1206
|
args: [{ selector: 'ava-list-structure', imports: [TreeItemComponent, AsyncPipe, HoverEffectDirective], template: "@for (element of filteredElementList; track element.id) {\n <ng-container>\n <div\n [class.select]=\"!isSelectionMode && element.id === selectedElement?.id\"\n [style.backgroundColor]=\"!isSelectionMode && element.id === selectedElement?.id ? (selectedColor$ | async) : ''\"\n [id]=\"'hover-element-id-' + element.id\"\n [avaHoverEffect]=\"avaItem\"\n >\n <ava-tree-item\n #avaItem\n [element]=\"element\"\n [isSelect]=\"!isSelectionMode && element.id === selectedElement?.id\"\n [backgroundColor]=\"!isSelectionMode && element.id === selectedElement?.id ? (selectedColor$ | async) : ''\"\n ></ava-tree-item>\n </div>\n </ng-container>\n}\n", styles: [".select{background-color:var(--mdc-filled-text-field-caret-color);color:#fff}.select *{color:#fff}\n"] }]
|
|
1134
|
-
}], ctorParameters: () => [{ type: SelectElementService }, { type:
|
|
1207
|
+
}], ctorParameters: () => [{ type: SelectElementService }, { type: ConfigurationTreeService }], propDecorators: { filteredElementList: [{
|
|
1135
1208
|
type: Input
|
|
1136
1209
|
}], templates: [{
|
|
1137
1210
|
type: ViewChildren,
|
|
@@ -1242,7 +1315,7 @@ class TableStructureComponent {
|
|
|
1242
1315
|
this.displayedColumns = [...columns];
|
|
1243
1316
|
});
|
|
1244
1317
|
}
|
|
1245
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: TableStructureComponent, deps: [{ token: SelectElementService }, { token: TreeNodeSelectionService }, { token: i0.ChangeDetectorRef }, { token:
|
|
1318
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: TableStructureComponent, deps: [{ token: SelectElementService }, { token: TreeNodeSelectionService }, { token: i0.ChangeDetectorRef }, { token: ConfigurationTreeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1246
1319
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: TableStructureComponent, isStandalone: true, selector: "ava-table-structure", inputs: { filteredElementList: "filteredElementList" }, ngImport: i0, template: "<table\n mat-table\n [dataSource]=\"filteredElementList\"\n>\n <ng-container matColumnDef=\"icon\">\n <th\n mat-header-cell\n *matHeaderCellDef\n ></th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"table-cell-small-width\"\n >\n <mat-icon\n class=\"icon-element\"\n saveChangingView=\"icon\"\n [id]=\"row.id\"\n >\n {{ row | elementIconName }}\n </mat-icon>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"checkbox\">\n <th\n mat-header-cell\n *matHeaderCellDef\n ></th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n class=\"table-cell-small-width\"\n >\n <mat-checkbox\n class=\"checkbox\"\n color=\"primary\"\n [indeterminate]=\"checkedElements[element.id].indeterminate\"\n [(ngModel)]=\"checkedElements[element.id].checked\"\n (ngModelChange)=\"changeSelecting(element, $event)\"\n (click)=\"$event.stopPropagation()\"\n >\n </mat-checkbox>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"itemNumber\">\n <th\n mat-header-cell\n *matHeaderCellDef\n >\n OZ\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n [style.width.ch]=\"row?.itemNumber?.stringRepresentation.length\"\n >\n <div\n class=\"text-element\"\n saveChangingView=\"text\"\n [id]=\"row.id\"\n >\n {{ row | elementItemNumber }}\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"text\">\n <th\n mat-header-cell\n *matHeaderCellDef\n >\n Text\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"table-text\"\n >\n @if (textWords$ | async; as textWords) {\n <div\n class=\"text-element\"\n saveChangingView=\"text\"\n [id]=\"row.id\"\n >\n {{ row | elementText: textWords }}\n </div>\n }\n </td>\n </ng-container>\n @for (oneColumn of addTableColumns$ | async; track oneColumn.name) {\n <ng-container>\n <ng-container matColumnDef=\"{{ oneColumn.name }}\">\n <th\n mat-header-cell\n *matHeaderCellDef\n >\n {{ oneColumn.title }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n >\n <div\n [style.textAlign]=\"oneColumn.align\"\n saveChangingView=\"text\"\n [id]=\"row.id\"\n >\n {{ !oneColumn.numberFormat ? row[oneColumn.name] : (row[oneColumn.name] | number: oneColumn.numberFormat) }}\n </div>\n </td>\n </ng-container>\n </ng-container>\n }\n\n <tr\n mat-header-row\n *matHeaderRowDef=\"displayedColumns; sticky: true\"\n class=\"mat-header-row\"\n ></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n (click)=\"select(row)\"\n (dblclick)=\"dblSelect(row)\"\n (contextmenu)=\"openContextMenu($event, row)\"\n [ngClass]=\"{\n choose: !isSelectionMode && row.id === preselectedElement?.id,\n select: !isSelectionMode && row.id === selectedElement?.id,\n }\"\n [style.background]=\"!isSelectionMode && row.id === selectedElement?.id ? (selectedColor$ | async) : ''\"\n [id]=\"row.id\"\n ></tr>\n</table>\n", styles: ["table{width:100%}table tr.mat-mdc-row,table tr.mat-mdc-header-row{height:24px}table tr input{box-sizing:border-box;padding:0 3px;outline:none;border:none;height:20px;width:calc(100% - 2px)}table tr input:focus{background:#fff!important}table tr .right{text-align:right}table tr td,table tr th{border-right:1px solid #777;border-bottom:1px solid #777;padding:0}table tr td:first-child,table tr th:first-child{border-left:1px solid #777}table tr td.min-width,table tr th.min-width{width:12ch;min-width:12ch}table tr td div,table tr th div{padding:0 3px}table tr th{border-top:1px solid #777;padding:0 3px}.table-text{overflow-x:hidden;position:relative}.table-text div{position:absolute;top:50%;left:0;white-space:nowrap;transform:translateY(-50%)}.select{background:var(--mdc-filled-text-field-caret-color);color:#fff}.select *{color:#fff}.choose div{color:red!important}::ng-deep .checkbox .mdc-form-field .mdc-checkbox{padding:0;flex:0 0 16px;width:16px;height:16px}::ng-deep .checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__native-control{width:100%;height:100%}::ng-deep .checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:0!important}::ng-deep .checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__background{top:0;left:0;width:100%;height:100%}::ng-deep .checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff!important}::ng-deep .checkbox .mdc-form-field>label{line-height:24px;padding-left:8px;-webkit-user-select:none;user-select:none}.text-element{-webkit-user-select:none;user-select:none}.table-cell-small-width{width:24px;min-width:24px;position:relative;text-align:center}.table-cell-small-width .icon-element{position:absolute;top:0;left:0}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: ElementTextPipe, name: "elementText" }, { kind: "pipe", type: ElementItemNumberPipe, name: "elementItemNumber" }, { kind: "pipe", type: ElementIconNamePipe, name: "elementIconName" }, { kind: "pipe", type: DecimalPipe, name: "number" }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i4$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i4.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i11.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: SaveChangingViewDirective, selector: "[saveChangingView]", inputs: ["saveChangingView"] }] }); }
|
|
1247
1320
|
}
|
|
1248
1321
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: TableStructureComponent, decorators: [{
|
|
@@ -1260,7 +1333,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
1260
1333
|
FormsModule,
|
|
1261
1334
|
SaveChangingViewDirective
|
|
1262
1335
|
], template: "<table\n mat-table\n [dataSource]=\"filteredElementList\"\n>\n <ng-container matColumnDef=\"icon\">\n <th\n mat-header-cell\n *matHeaderCellDef\n ></th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"table-cell-small-width\"\n >\n <mat-icon\n class=\"icon-element\"\n saveChangingView=\"icon\"\n [id]=\"row.id\"\n >\n {{ row | elementIconName }}\n </mat-icon>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"checkbox\">\n <th\n mat-header-cell\n *matHeaderCellDef\n ></th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n class=\"table-cell-small-width\"\n >\n <mat-checkbox\n class=\"checkbox\"\n color=\"primary\"\n [indeterminate]=\"checkedElements[element.id].indeterminate\"\n [(ngModel)]=\"checkedElements[element.id].checked\"\n (ngModelChange)=\"changeSelecting(element, $event)\"\n (click)=\"$event.stopPropagation()\"\n >\n </mat-checkbox>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"itemNumber\">\n <th\n mat-header-cell\n *matHeaderCellDef\n >\n OZ\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n [style.width.ch]=\"row?.itemNumber?.stringRepresentation.length\"\n >\n <div\n class=\"text-element\"\n saveChangingView=\"text\"\n [id]=\"row.id\"\n >\n {{ row | elementItemNumber }}\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"text\">\n <th\n mat-header-cell\n *matHeaderCellDef\n >\n Text\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"table-text\"\n >\n @if (textWords$ | async; as textWords) {\n <div\n class=\"text-element\"\n saveChangingView=\"text\"\n [id]=\"row.id\"\n >\n {{ row | elementText: textWords }}\n </div>\n }\n </td>\n </ng-container>\n @for (oneColumn of addTableColumns$ | async; track oneColumn.name) {\n <ng-container>\n <ng-container matColumnDef=\"{{ oneColumn.name }}\">\n <th\n mat-header-cell\n *matHeaderCellDef\n >\n {{ oneColumn.title }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n >\n <div\n [style.textAlign]=\"oneColumn.align\"\n saveChangingView=\"text\"\n [id]=\"row.id\"\n >\n {{ !oneColumn.numberFormat ? row[oneColumn.name] : (row[oneColumn.name] | number: oneColumn.numberFormat) }}\n </div>\n </td>\n </ng-container>\n </ng-container>\n }\n\n <tr\n mat-header-row\n *matHeaderRowDef=\"displayedColumns; sticky: true\"\n class=\"mat-header-row\"\n ></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n (click)=\"select(row)\"\n (dblclick)=\"dblSelect(row)\"\n (contextmenu)=\"openContextMenu($event, row)\"\n [ngClass]=\"{\n choose: !isSelectionMode && row.id === preselectedElement?.id,\n select: !isSelectionMode && row.id === selectedElement?.id,\n }\"\n [style.background]=\"!isSelectionMode && row.id === selectedElement?.id ? (selectedColor$ | async) : ''\"\n [id]=\"row.id\"\n ></tr>\n</table>\n", styles: ["table{width:100%}table tr.mat-mdc-row,table tr.mat-mdc-header-row{height:24px}table tr input{box-sizing:border-box;padding:0 3px;outline:none;border:none;height:20px;width:calc(100% - 2px)}table tr input:focus{background:#fff!important}table tr .right{text-align:right}table tr td,table tr th{border-right:1px solid #777;border-bottom:1px solid #777;padding:0}table tr td:first-child,table tr th:first-child{border-left:1px solid #777}table tr td.min-width,table tr th.min-width{width:12ch;min-width:12ch}table tr td div,table tr th div{padding:0 3px}table tr th{border-top:1px solid #777;padding:0 3px}.table-text{overflow-x:hidden;position:relative}.table-text div{position:absolute;top:50%;left:0;white-space:nowrap;transform:translateY(-50%)}.select{background:var(--mdc-filled-text-field-caret-color);color:#fff}.select *{color:#fff}.choose div{color:red!important}::ng-deep .checkbox .mdc-form-field .mdc-checkbox{padding:0;flex:0 0 16px;width:16px;height:16px}::ng-deep .checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__native-control{width:100%;height:100%}::ng-deep .checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:0!important}::ng-deep .checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__background{top:0;left:0;width:100%;height:100%}::ng-deep .checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff!important}::ng-deep .checkbox .mdc-form-field>label{line-height:24px;padding-left:8px;-webkit-user-select:none;user-select:none}.text-element{-webkit-user-select:none;user-select:none}.table-cell-small-width{width:24px;min-width:24px;position:relative;text-align:center}.table-cell-small-width .icon-element{position:absolute;top:0;left:0}\n"] }]
|
|
1263
|
-
}], ctorParameters: () => [{ type: SelectElementService }, { type: TreeNodeSelectionService }, { type: i0.ChangeDetectorRef }, { type:
|
|
1336
|
+
}], ctorParameters: () => [{ type: SelectElementService }, { type: TreeNodeSelectionService }, { type: i0.ChangeDetectorRef }, { type: ConfigurationTreeService }], propDecorators: { filteredElementList: [{
|
|
1264
1337
|
type: Input
|
|
1265
1338
|
}] } });
|
|
1266
1339
|
|
|
@@ -1312,13 +1385,13 @@ class TreeNodeComponent {
|
|
|
1312
1385
|
expand(element) {
|
|
1313
1386
|
this.expansionState[element.id] = !this.expansionState[element.id];
|
|
1314
1387
|
}
|
|
1315
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: TreeNodeComponent, deps: [{ token: SelectElementService }, { token:
|
|
1388
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: TreeNodeComponent, deps: [{ token: SelectElementService }, { token: ConfigurationTreeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1316
1389
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: TreeNodeComponent, isStandalone: true, selector: "ava-tree-node", inputs: { elementList: "elementList", expansionState: "expansionState" }, ngImport: i0, template: "@for (element of elementList; track element.id) {\n <ng-container>\n <div\n [id]=\"'hover-element-id-' + element.id\"\n class=\"tree-node-wrapper\"\n [class.select]=\"!isSelectionMode && element.id === selectedElement?.id\"\n [style.backgroundColor]=\"!isSelectionMode && element.id === selectedElement?.id ? (selectedColor$ | async) : ''\"\n [avaHoverEffect]=\"avaItem\"\n >\n <div class=\"tree-node-wrapper__content\">\n @if (element.elementTypeDiscriminator === 'ServiceSpecificationGroupDto') {\n <mat-icon\n matRipple\n (click)=\"expand(element)\"\n class=\"tree-node__icon\"\n >\n {{ expansionState[element.id] ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n } @else {\n <mat-icon></mat-icon>\n }\n\n <ava-tree-item\n #avaItem\n [element]=\"element\"\n [expansionState]=\"expansionState\"\n [isSelect]=\"!isSelectionMode && element.id === selectedElement?.id\"\n [backgroundColor]=\"!isSelectionMode && element.id === selectedElement?.id ? (selectedColor$ | async) : ''\"\n ></ava-tree-item>\n </div>\n </div>\n @if (element.elementTypeDiscriminator === 'ServiceSpecificationGroupDto' && expansionState[element.id]) {\n <div [style.paddingLeft]=\"indent$ | async\">\n <ava-tree-node\n [elementList]=\"element | groupChildElements\"\n [expansionState]=\"expansionState\"\n ></ava-tree-node>\n </div>\n }\n </ng-container>\n}\n", styles: [".tree-node-wrapper{display:flex;align-items:center}.tree-node-wrapper__content{flex:1 0 100%;display:flex}.tree-node__icon{flex-shrink:0}.select{background-color:var(--mdc-filled-text-field-caret-color);color:#fff}.select *{color:#fff}\n"], dependencies: [{ kind: "component", type: TreeNodeComponent, selector: "ava-tree-node", inputs: ["elementList", "expansionState"] }, { kind: "component", type: TreeItemComponent, selector: "ava-tree-item", inputs: ["element", "expansionState", "isSelect", "backgroundColor"] }, { kind: "pipe", type: GroupChildElementsPipe, name: "groupChildElements" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: HoverEffectDirective, selector: "[avaHoverEffect]", inputs: ["avaHoverEffect"] }] }); }
|
|
1317
1390
|
}
|
|
1318
1391
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: TreeNodeComponent, decorators: [{
|
|
1319
1392
|
type: Component,
|
|
1320
1393
|
args: [{ selector: 'ava-tree-node', imports: [TreeItemComponent, GroupChildElementsPipe, MatIconModule, AsyncPipe, HoverEffectDirective], template: "@for (element of elementList; track element.id) {\n <ng-container>\n <div\n [id]=\"'hover-element-id-' + element.id\"\n class=\"tree-node-wrapper\"\n [class.select]=\"!isSelectionMode && element.id === selectedElement?.id\"\n [style.backgroundColor]=\"!isSelectionMode && element.id === selectedElement?.id ? (selectedColor$ | async) : ''\"\n [avaHoverEffect]=\"avaItem\"\n >\n <div class=\"tree-node-wrapper__content\">\n @if (element.elementTypeDiscriminator === 'ServiceSpecificationGroupDto') {\n <mat-icon\n matRipple\n (click)=\"expand(element)\"\n class=\"tree-node__icon\"\n >\n {{ expansionState[element.id] ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n } @else {\n <mat-icon></mat-icon>\n }\n\n <ava-tree-item\n #avaItem\n [element]=\"element\"\n [expansionState]=\"expansionState\"\n [isSelect]=\"!isSelectionMode && element.id === selectedElement?.id\"\n [backgroundColor]=\"!isSelectionMode && element.id === selectedElement?.id ? (selectedColor$ | async) : ''\"\n ></ava-tree-item>\n </div>\n </div>\n @if (element.elementTypeDiscriminator === 'ServiceSpecificationGroupDto' && expansionState[element.id]) {\n <div [style.paddingLeft]=\"indent$ | async\">\n <ava-tree-node\n [elementList]=\"element | groupChildElements\"\n [expansionState]=\"expansionState\"\n ></ava-tree-node>\n </div>\n }\n </ng-container>\n}\n", styles: [".tree-node-wrapper{display:flex;align-items:center}.tree-node-wrapper__content{flex:1 0 100%;display:flex}.tree-node__icon{flex-shrink:0}.select{background-color:var(--mdc-filled-text-field-caret-color);color:#fff}.select *{color:#fff}\n"] }]
|
|
1321
|
-
}], ctorParameters: () => [{ type: SelectElementService }, { type:
|
|
1394
|
+
}], ctorParameters: () => [{ type: SelectElementService }, { type: ConfigurationTreeService }], propDecorators: { elementList: [{
|
|
1322
1395
|
type: Input
|
|
1323
1396
|
}], expansionState: [{
|
|
1324
1397
|
type: Input
|
|
@@ -1723,7 +1796,7 @@ class AvaTreeComponent {
|
|
|
1723
1796
|
}
|
|
1724
1797
|
});
|
|
1725
1798
|
}
|
|
1726
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: AvaTreeComponent, deps: [{ token: FlatElementsService, self: true }, { token: SelectElementService, self: true }, { token: TreeNodeSelectionService, self: true }, { token: ExpandParentGroupService, self: true }, { token: KeyboardOperationService, self: true }, { token: i0.NgZone }, { token:
|
|
1799
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: AvaTreeComponent, deps: [{ token: FlatElementsService, self: true }, { token: SelectElementService, self: true }, { token: TreeNodeSelectionService, self: true }, { token: ExpandParentGroupService, self: true }, { token: KeyboardOperationService, self: true }, { token: i0.NgZone }, { token: ConfigurationTreeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1727
1800
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: AvaTreeComponent, isStandalone: true, selector: "ava-tree", inputs: { project: "project", expansionState: "expansionState", selectedNodeId: "selectedNodeId", modeView: "modeView", config: "config" }, outputs: { selectClick: "selectClick", selectDblClick: "selectDblClick", contextMenuEvent: "contextMenuEvent", selectedElementsChanged: "selectedElementsChanged" }, providers: [
|
|
1728
1801
|
FlatElementsService,
|
|
1729
1802
|
SelectElementService,
|
|
@@ -1764,7 +1837,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
1764
1837
|
type: Self
|
|
1765
1838
|
}] }, { type: KeyboardOperationService, decorators: [{
|
|
1766
1839
|
type: Self
|
|
1767
|
-
}] }, { type: i0.NgZone }, { type:
|
|
1840
|
+
}] }, { type: i0.NgZone }, { type: ConfigurationTreeService }], propDecorators: { project: [{
|
|
1768
1841
|
type: Input
|
|
1769
1842
|
}], expansionState: [{
|
|
1770
1843
|
type: Input
|
|
@@ -1793,96 +1866,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
1793
1866
|
args: ['avaTreeFilterInput']
|
|
1794
1867
|
}] } });
|
|
1795
1868
|
|
|
1796
|
-
class InvoiceDisplayComponent {
|
|
1797
|
-
/**
|
|
1798
|
-
* You can supply a map of strings to be used for the text in the tree. This allows you to translate
|
|
1799
|
-
* the text in the tree to other languages.
|
|
1800
|
-
* {
|
|
1801
|
-
* invoiceTitle: string;
|
|
1802
|
-
* vatId: string;
|
|
1803
|
-
* detailsInvoiceNumber: string;
|
|
1804
|
-
* detailsInvoiceDate: string;
|
|
1805
|
-
* detailsPaymentDueDate: string;
|
|
1806
|
-
* detailsCurrencyCode: string;
|
|
1807
|
-
* detailsPaymentTerms: string;
|
|
1808
|
-
* referencesTopic: string;
|
|
1809
|
-
* referencesBuyerReference: string;
|
|
1810
|
-
* referencesProjectReference: string;
|
|
1811
|
-
* referencesContractReference: string;
|
|
1812
|
-
* referencesPurchaseOrderReference: string;
|
|
1813
|
-
* referencesSalesOrderReference: string;
|
|
1814
|
-
* referencesReceivingAdviceReference: string;
|
|
1815
|
-
* referencesDispatchAdviceReference: string;
|
|
1816
|
-
* referencesTenderOrLotReference: string;
|
|
1817
|
-
* referencesInvoicedObjectIdentifier: string;
|
|
1818
|
-
* tableHeadDescription: string;
|
|
1819
|
-
* tableHeadQuantity: string;
|
|
1820
|
-
* tableHeadUnit: string;
|
|
1821
|
-
* tableHeadNetPrice: string;
|
|
1822
|
-
* tableHeadNetAmount: string;
|
|
1823
|
-
* totalsTopic: string;
|
|
1824
|
-
* totalsTotalNet: string;
|
|
1825
|
-
* totalsTotalAllowances: string;
|
|
1826
|
-
* totalsTotalCharges: string;
|
|
1827
|
-
* totalsTotalAfterDeductions: string;
|
|
1828
|
-
* totalsTotalVatAmount: string;
|
|
1829
|
-
* totalsTotalGross: string;
|
|
1830
|
-
* totalsAlreadyPaidTotal: string;
|
|
1831
|
-
* totalsTotalToBePaid: string;
|
|
1832
|
-
* instructionsTopic: string;
|
|
1833
|
-
* instructionsAccountIdentifier: string;
|
|
1834
|
-
* instructionsAccountName: string;
|
|
1835
|
-
* instructionsServiceProviderIdentifier: string;
|
|
1836
|
-
* notesTopic: string;
|
|
1837
|
-
* attachmentsHeading: string;
|
|
1838
|
-
* attachmentsName: string;
|
|
1839
|
-
* attachmentsDescription: string;
|
|
1840
|
-
* attachmentsUrl: string;
|
|
1841
|
-
* attachmentsDataSize: string;
|
|
1842
|
-
* attachmentsMimeType: string;
|
|
1843
|
-
* attachmentsFileName: string;
|
|
1844
|
-
* attachmentsDownloadButton: string;
|
|
1845
|
-
*
|
|
1846
|
-
* }
|
|
1847
|
-
*/
|
|
1848
|
-
set config(configObject) {
|
|
1849
|
-
if (this.configurationInvoiceService.getCurrentInvoiceConfig()) {
|
|
1850
|
-
const config = { ...this.configurationInvoiceService.getCurrentInvoiceConfig(), ...configObject };
|
|
1851
|
-
this.configurationInvoiceService.setInvoiceConfig(config);
|
|
1852
|
-
}
|
|
1853
|
-
}
|
|
1854
|
-
constructor(configurationInvoiceService) {
|
|
1855
|
-
this.configurationInvoiceService = configurationInvoiceService;
|
|
1856
|
-
// TODO remove type any after TODO under will be resolved
|
|
1857
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1858
|
-
this.invoice = input.required();
|
|
1859
|
-
this.textWords$ = this.configurationInvoiceService.getTextWordsFromConfig();
|
|
1860
|
-
/**TODO: For setting invoice instead:
|
|
1861
|
-
* <ava-invoice-display id="invoice"></ava-invoice-display>
|
|
1862
|
-
* invoice = document.getElementById('invoice');
|
|
1863
|
-
* invoice.invoice = INVOICE;
|
|
1864
|
-
* we should pass value to global window variable
|
|
1865
|
-
* window['InvoiceGlobalVariable'] = INVOICE;
|
|
1866
|
-
* Temporary solution until the problem of setting the value for InputSignal is solved. See this PR https://github.com/angular/angular/pull/55067
|
|
1867
|
-
*/
|
|
1868
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1869
|
-
if (window['InvoiceGlobalVariable']) {
|
|
1870
|
-
this.invoice = () => {
|
|
1871
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1872
|
-
return window['InvoiceGlobalVariable'];
|
|
1873
|
-
};
|
|
1874
|
-
}
|
|
1875
|
-
}
|
|
1876
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: InvoiceDisplayComponent, deps: [{ token: i1.ConfigurationInvoiceService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1877
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: InvoiceDisplayComponent, isStandalone: true, selector: "ava-invoice-display", inputs: { invoice: { classPropertyName: "invoice", publicName: "invoice", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: false, isRequired: false, transformFunction: null } }, providers: [ConfigurationInvoiceService], ngImport: i0, template: "@if (textWords$ | async; as textWords) {\n <div class=\"invoice-container\">\n <!-- Seller and Buyer Information -->\n <h1 class=\"invoice-title\">{{ textWords.invoiceTitle }}</h1>\n <header class=\"invoice-header\">\n <div class=\"buyer-info\">\n <h2 class=\"header-title\">{{ textWords.invoiceBuyerTitle }}</h2>\n <p>\n <strong>{{ invoice().buyer?.name }}</strong>\n </p>\n <p>{{ invoice().buyer?.address }}</p>\n <p>{{ invoice().buyer?.city }}, {{ invoice().buyer?.zipCode }}</p>\n <p>{{ invoice().buyer?.countryCode }}</p>\n @if (invoice().buyer?.vatId) {\n <p>\n <strong>{{ textWords.vatId }}: </strong>\n <span>{{ invoice().buyer?.vatId }}</span>\n </p>\n }\n <mat-divider></mat-divider>\n @if (invoice().buyer?.contactPersonName) {\n <p>\n <strong>{{ textWords.contactPersonName }}: </strong>\n <span>{{ invoice().buyer?.contactPersonName }}</span>\n </p>\n }\n @if (invoice().buyer?.contactPersonPhone) {\n <p>\n <strong>{{ textWords.contactPersonPhone }}: </strong>\n <span>{{ invoice().buyer?.contactPersonPhone }}</span>\n </p>\n }\n @if (invoice().buyer?.contactPersonEmail) {\n <p>\n <strong>{{ textWords.contactPersonEmail }}: </strong>\n <span>{{ invoice().buyer?.contactPersonEmail }}</span>\n </p>\n }\n </div>\n <div class=\"invoice-details\">\n <h2 [class.header]=\"textWords.invoiceBuyerTitle.trim() || textWords.invoiceSellerTitle.trim()\"></h2>\n @if (invoice().invoiceNumber) {\n <p>\n <strong>{{ textWords.detailsInvoiceNumber }}: </strong>\n <span>{{ invoice().invoiceNumber }}</span>\n </p>\n }\n @if (invoice().invoiceDate) {\n <p>\n <strong>{{ textWords.detailsInvoiceDate }}: </strong>\n <span>{{ invoice().invoiceDate | date: 'dd.MM.yyyy' }}</span>\n </p>\n }\n @if (invoice().paymentDueDate) {\n <p>\n <strong>{{ textWords.detailsPaymentDueDate }}: </strong>\n <span>{{ invoice().paymentDueDate | date: 'dd.MM.yyyy' }}</span>\n </p>\n }\n @if (invoice().currencyCode) {\n <p>\n <strong>{{ textWords.detailsCurrencyCode }}: </strong>\n <span>{{ invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().paymentTerms) {\n <p>\n <strong>{{ textWords.detailsPaymentTerms }}: </strong>\n <span>{{ invoice().paymentTerms }}</span>\n </p>\n }\n </div>\n <div class=\"seller-info\">\n <h2 class=\"header-title\">{{ textWords.invoiceSellerTitle }}</h2>\n <p>\n <strong>{{ invoice().seller?.name }}</strong>\n </p>\n <p>{{ invoice().seller?.address }}</p>\n <p>{{ invoice().seller?.city }}, {{ invoice().seller?.zipCode }}</p>\n <p>{{ invoice().seller?.countryCode }}</p>\n @if (invoice().seller?.vatId) {\n <p>\n <strong>{{ textWords.vatId }}: </strong>\n <span>{{ invoice().seller?.vatId }}</span>\n </p>\n }\n <mat-divider></mat-divider>\n @if (invoice().seller?.contactPersonName) {\n <p>\n <strong>{{ textWords.contactPersonName }}: </strong>\n <span>{{ invoice().seller?.contactPersonName }}</span>\n </p>\n }\n @if (invoice().seller?.contactPersonPhone) {\n <p>\n <strong>{{ textWords.contactPersonPhone }}: </strong>\n <span>{{ invoice().seller?.contactPersonPhone }}</span>\n </p>\n }\n @if (invoice().seller?.contactPersonEmail) {\n <p>\n <strong>{{ textWords.contactPersonEmail }}: </strong>\n <span>{{ invoice().seller?.contactPersonEmail }}</span>\n </p>\n }\n </div>\n </header>\n <mat-divider></mat-divider>\n <div class=\"invoice-info\">\n <section class=\"invoice-references\">\n @if (textWords.referencesTopic) {\n <h2 class=\"info-title\">{{ textWords.referencesTopic }}</h2>\n }\n @if (invoice().references?.buyerReference) {\n <p>\n <strong>{{ textWords.referencesBuyerReference }}: </strong>\n <span>{{ invoice().references?.buyerReference }}</span>\n </p>\n }\n @if (invoice().references?.projectReference) {\n <p>\n <strong>{{ textWords.referencesProjectReference }}: </strong>\n <span>{{ invoice().references?.projectReference }}</span>\n </p>\n }\n @if (invoice().references?.contractReference) {\n <p>\n <strong>{{ textWords.referencesContractReference }}: </strong>\n <span>{{ invoice().references?.contractReference }}</span>\n </p>\n }\n @if (invoice().references?.purchaseOrderReference) {\n <p>\n <strong>{{ textWords.referencesPurchaseOrderReference }}: </strong>\n <span>{{ invoice().references?.purchaseOrderReference }}</span>\n </p>\n }\n @if (invoice().references?.salesOrderReference) {\n <p>\n <strong>{{ textWords.referencesSalesOrderReference }}: </strong>\n <span>{{ invoice().references?.salesOrderReference }}</span>\n </p>\n }\n @if (invoice().references?.receivingAdviceReference) {\n <p>\n <strong>{{ textWords.referencesReceivingAdviceReference }}: </strong>\n <span>{{ invoice().references?.receivingAdviceReference }}</span>\n </p>\n }\n @if (invoice().references?.dispatchAdviceReference) {\n <p>\n <strong>{{ textWords.referencesDispatchAdviceReference }}: </strong>\n <span> {{ invoice().references?.dispatchAdviceReference }}</span>\n </p>\n }\n @if (invoice().references?.tenderOrLotReference) {\n <p>\n <strong>{{ textWords.referencesTenderOrLotReference }}: </strong>\n <span>{{ invoice().references?.tenderOrLotReference }}</span>\n </p>\n }\n @if (invoice().references?.invoicedObjectIdentifier) {\n <p>\n <strong>{{ textWords.referencesInvoicedObjectIdentifier }}: </strong>\n <span>{{ invoice().references?.invoicedObjectIdentifier }}</span>\n </p>\n }\n </section>\n @if (invoice().deliveryInformation) {\n <section class=\"invoice-delivery\">\n <h2 class=\"info-title\">{{ textWords.deliveryInformationTitle }}</h2>\n\n @if (invoice().deliveryInformation?.deliverToName) {\n <p>\n <strong>{{ textWords.deliverToName }}: </strong>\n <span>{{ invoice().deliveryInformation?.deliverToName }}</span>\n </p>\n }\n @if (invoice().deliveryInformation?.deliverToLocationIdentifier) {\n <p>\n <strong>{{ textWords.deliverToLocationIdentifier }}: </strong>\n <span>{{ invoice().deliveryInformation?.deliverToLocationIdentifier }}</span>\n </p>\n }\n @if (invoice().deliveryInformation?.deliveryDate) {\n <p>\n <strong>{{ textWords.deliveryDate }}: </strong>\n <span>{{ invoice().deliveryInformation?.deliveryDate | date: 'shortDate' }}</span>\n </p>\n }\n @if (invoice().deliveryInformation?.deliveryAddress) {\n <p>\n <strong>{{ textWords.deliveryAddress }}: </strong>\n <span>\n @if (invoice().deliveryInformation?.deliveryAddress?.address) {\n <p>{{ invoice().deliveryInformation?.deliveryAddress?.address }}</p>\n }\n @if (invoice().deliveryInformation?.deliveryAddress?.city) {\n <span>{{ invoice().deliveryInformation?.deliveryAddress?.city }},</span>\n }\n @if (invoice().deliveryInformation?.deliveryAddress?.zipCode) {\n <span>{{ invoice().deliveryInformation?.deliveryAddress?.zipCode }}</span>\n }\n @if (invoice().deliveryInformation?.deliveryAddress?.countryCode) {\n <p>{{ invoice().deliveryInformation?.deliveryAddress?.countryCode }}</p>\n }\n </span>\n </p>\n }\n </section>\n }\n </div>\n\n <table class=\"invoice-table\">\n <thead>\n <tr>\n <th>#</th>\n <th>{{ textWords.tableHeadDescription }}</th>\n <th>{{ textWords.tableHeadQuantity }}</th>\n <th>{{ textWords.tableHeadUnit }}</th>\n <th>{{ textWords.tableHeadNetPrice }}</th>\n <th>{{ textWords.tableHeadNetAmount }}</th>\n <th>{{ textWords.vat }}</th>\n </tr>\n </thead>\n <tbody>\n @for (item of invoice().lineItems; track item; let i = $index) {\n <tr>\n <td>{{ i + 1 }}</td>\n <td>{{ item.itemInformation?.description }}</td>\n <td>{{ item.quantity }}</td>\n <td>{{ item.unitCode }}</td>\n <td class=\"currency-table-cell\">{{ item.priceDetails?.netPrice | currency: invoice().currencyCode }}</td>\n <td class=\"currency-table-cell\">{{ item.netAmount | currency: invoice().currencyCode }}</td>\n <td class=\"currency-table-cell\">{{ item.vatInformation[0]?.vatRate | percent: '1.0-2' }}</td>\n </tr>\n }\n </tbody>\n </table>\n\n <div class=\"addition-info\">\n <section class=\"invoice-totals\">\n <h2 class=\"info-title\">{{ textWords.totalsTopic }}</h2>\n\n @if (invoice().totals?.totalNet) {\n <p>\n <strong>{{ textWords.totalsTotalNet }}: </strong>\n <span>{{ invoice().totals?.totalNet | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalAllowances) {\n <p>\n <strong>{{ textWords.totalsTotalAllowances }}: </strong>\n <span> {{ invoice().totals?.totalAllowances | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalCharges) {\n <p>\n <strong>{{ textWords.totalsTotalCharges }}: </strong>\n <span> {{ invoice().totals?.totalCharges | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalAfterDeductions) {\n <p>\n <strong>{{ textWords.totalsTotalAfterDeductions }}: </strong>\n <span>{{ invoice().totals?.totalAfterDeductions | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalVatAmount) {\n <p>\n <strong>{{ textWords.totalsTotalVatAmount }}: </strong>\n <span>{{ invoice().totals?.totalVatAmount | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalGross) {\n <p>\n <strong>{{ textWords.totalsTotalGross }}: </strong>\n <span> {{ invoice().totals?.totalGross | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.alreadyPaidTotal) {\n <p>\n <strong>{{ textWords.totalsAlreadyPaidTotal }}: </strong>\n <span>{{ invoice().totals?.alreadyPaidTotal | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalToBePaid) {\n <p class=\"total\">\n <strong>{{ textWords.totalsTotalToBePaid }}: </strong>\n <strong> {{ invoice().totals?.totalToBePaid | currency: invoice().currencyCode }}</strong>\n </p>\n }\n </section>\n <section class=\"taxes\">\n <h2 class=\"info-title\">{{ textWords.taxesHeading }}</h2>\n <table class=\"tax-report-table\">\n <thead>\n <tr>\n <th>{{ textWords.vat }}</th>\n <th>{{ textWords.totalsTotalNet }}</th>\n <th>{{ textWords.totalsTotalVatAmount }}</th>\n </tr>\n </thead>\n <tbody>\n @for (tax of invoice().vatBreakdown; track tax.taxRate) {\n <tr>\n <td class=\"currency-table-cell\">\n @if (tax.taxRate) {\n <span>{{ tax.taxRate | percent: '1.0-2' }}</span>\n }\n </td>\n <td class=\"currency-table-cell\">\n @if (tax.netTaxableAmount) {\n <span>{{ tax.netTaxableAmount | currency: invoice().currencyCode }}</span>\n }\n </td>\n <td class=\"currency-table-cell\">\n @if (tax.vatAmount) {\n <span>{{ tax.vatAmount | currency: invoice().currencyCode }}</span>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n </section>\n\n <section class=\"payment-instructions\">\n <h2 class=\"info-title\">{{ textWords.instructionsTopic }}</h2>\n @if (invoice().paymentInstructions?.description) {\n <p>{{ invoice().paymentInstructions?.description }}</p>\n }\n @for (means of invoice().paymentInstructions?.paymentMeans; track means) {\n <div>\n @if (means.accountIdentifier) {\n <p>\n <strong>{{ textWords.instructionsAccountIdentifier }}: </strong>\n <span>{{ means.accountIdentifier }}</span>\n </p>\n }\n @if (means.accountName) {\n <p>\n <strong>{{ textWords.instructionsAccountName }}: </strong>\n <span>{{ means.accountName }}</span>\n </p>\n }\n @if (means.serviceProviderIdentifier) {\n <p>\n <strong>{{ textWords.instructionsServiceProviderIdentifier }}: </strong>\n <span>{{ means.serviceProviderIdentifier }}</span>\n </p>\n }\n </div>\n }\n </section>\n </div>\n\n <section class=\"invoice-notes\">\n <h2>{{ textWords.notesTopic }}</h2>\n @for (note of invoice().invoiceNotes; track note) {\n <div>\n @if (note?.shortText) {\n <p>\n <strong>{{ note?.shortText }}</strong>\n </p>\n }\n @if (note?.longText) {\n <p>{{ note?.longText }}</p>\n }\n </div>\n }\n </section>\n @if (invoice().documents?.length) {\n <section class=\"invoice-attachments\">\n <ava-invoice-documents [documents]=\"invoice().documents\"></ava-invoice-documents>\n </section>\n }\n </div>\n}\n", styles: [".invoice-container{width:100%;max-width:800px;margin:auto;font-family:Arial,sans-serif;line-height:1.5}.invoice-header{display:flex;justify-content:space-between;margin-bottom:20px}.invoice-header .header{height:32px}.invoice-header .header-title{background:var(--color-primary);color:#fff;text-align:center}.seller-info,.buyer-info,.invoice-details{width:30%}.seller-info,.invoice-delivery,.payment-instructions{text-align:right}.currency-table-cell{text-align:right!important}.invoice-title{font-size:48px;margin:20px 0}.invoice-references,.invoice-totals,.payment-instructions,.invoice-notes,.taxes,.invoice-delivery{margin:20px 0}.invoice-table{width:100%;border-collapse:collapse;margin:20px 0}.invoice-table th,.invoice-table td{border:1px solid #000;padding:8px;text-align:left}.invoice-table th{background-color:var(--color-primary)}.invoice-totals p,.payment-instructions p,.invoice-notes p{margin:5px 0}h2{font-size:18px;margin-bottom:10px}.addition-info{display:flex;justify-content:space-between;gap:10px}.total{background-color:var(--color-primary);color:#fff;padding:5px;border-radius:5px}th{color:#fff;text-wrap:nowrap}.invoice-attachments{padding-bottom:15px}.invoice-info{display:flex;justify-content:space-between;margin-bottom:20px}.info-title{border-bottom:2px solid var(--color-primary);text-align:center}.tax-report-table{width:100%;border-collapse:collapse;margin-top:10px}.tax-report-table th,.tax-report-table td{padding:12px;text-align:center;border:1px solid #ddd}.tax-report-table th{background-color:var(--color-primary);color:#fff;font-weight:700;border:1px solid #000}.tax-report-table td{font-size:14px;color:#333;border:1px solid #000}\n"], dependencies: [{ kind: "pipe", type: CurrencyPipe, name: "currency" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: PercentPipe, name: "percent" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i2$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: InvoiceDocumentsComponent, selector: "ava-invoice-documents", inputs: ["documents"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1878
|
-
}
|
|
1879
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: InvoiceDisplayComponent, decorators: [{
|
|
1880
|
-
type: Component,
|
|
1881
|
-
args: [{ selector: 'ava-invoice-display', imports: [CurrencyPipe, DatePipe, PercentPipe, AsyncPipe, MatDividerModule, InvoiceDocumentsComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [ConfigurationInvoiceService], template: "@if (textWords$ | async; as textWords) {\n <div class=\"invoice-container\">\n <!-- Seller and Buyer Information -->\n <h1 class=\"invoice-title\">{{ textWords.invoiceTitle }}</h1>\n <header class=\"invoice-header\">\n <div class=\"buyer-info\">\n <h2 class=\"header-title\">{{ textWords.invoiceBuyerTitle }}</h2>\n <p>\n <strong>{{ invoice().buyer?.name }}</strong>\n </p>\n <p>{{ invoice().buyer?.address }}</p>\n <p>{{ invoice().buyer?.city }}, {{ invoice().buyer?.zipCode }}</p>\n <p>{{ invoice().buyer?.countryCode }}</p>\n @if (invoice().buyer?.vatId) {\n <p>\n <strong>{{ textWords.vatId }}: </strong>\n <span>{{ invoice().buyer?.vatId }}</span>\n </p>\n }\n <mat-divider></mat-divider>\n @if (invoice().buyer?.contactPersonName) {\n <p>\n <strong>{{ textWords.contactPersonName }}: </strong>\n <span>{{ invoice().buyer?.contactPersonName }}</span>\n </p>\n }\n @if (invoice().buyer?.contactPersonPhone) {\n <p>\n <strong>{{ textWords.contactPersonPhone }}: </strong>\n <span>{{ invoice().buyer?.contactPersonPhone }}</span>\n </p>\n }\n @if (invoice().buyer?.contactPersonEmail) {\n <p>\n <strong>{{ textWords.contactPersonEmail }}: </strong>\n <span>{{ invoice().buyer?.contactPersonEmail }}</span>\n </p>\n }\n </div>\n <div class=\"invoice-details\">\n <h2 [class.header]=\"textWords.invoiceBuyerTitle.trim() || textWords.invoiceSellerTitle.trim()\"></h2>\n @if (invoice().invoiceNumber) {\n <p>\n <strong>{{ textWords.detailsInvoiceNumber }}: </strong>\n <span>{{ invoice().invoiceNumber }}</span>\n </p>\n }\n @if (invoice().invoiceDate) {\n <p>\n <strong>{{ textWords.detailsInvoiceDate }}: </strong>\n <span>{{ invoice().invoiceDate | date: 'dd.MM.yyyy' }}</span>\n </p>\n }\n @if (invoice().paymentDueDate) {\n <p>\n <strong>{{ textWords.detailsPaymentDueDate }}: </strong>\n <span>{{ invoice().paymentDueDate | date: 'dd.MM.yyyy' }}</span>\n </p>\n }\n @if (invoice().currencyCode) {\n <p>\n <strong>{{ textWords.detailsCurrencyCode }}: </strong>\n <span>{{ invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().paymentTerms) {\n <p>\n <strong>{{ textWords.detailsPaymentTerms }}: </strong>\n <span>{{ invoice().paymentTerms }}</span>\n </p>\n }\n </div>\n <div class=\"seller-info\">\n <h2 class=\"header-title\">{{ textWords.invoiceSellerTitle }}</h2>\n <p>\n <strong>{{ invoice().seller?.name }}</strong>\n </p>\n <p>{{ invoice().seller?.address }}</p>\n <p>{{ invoice().seller?.city }}, {{ invoice().seller?.zipCode }}</p>\n <p>{{ invoice().seller?.countryCode }}</p>\n @if (invoice().seller?.vatId) {\n <p>\n <strong>{{ textWords.vatId }}: </strong>\n <span>{{ invoice().seller?.vatId }}</span>\n </p>\n }\n <mat-divider></mat-divider>\n @if (invoice().seller?.contactPersonName) {\n <p>\n <strong>{{ textWords.contactPersonName }}: </strong>\n <span>{{ invoice().seller?.contactPersonName }}</span>\n </p>\n }\n @if (invoice().seller?.contactPersonPhone) {\n <p>\n <strong>{{ textWords.contactPersonPhone }}: </strong>\n <span>{{ invoice().seller?.contactPersonPhone }}</span>\n </p>\n }\n @if (invoice().seller?.contactPersonEmail) {\n <p>\n <strong>{{ textWords.contactPersonEmail }}: </strong>\n <span>{{ invoice().seller?.contactPersonEmail }}</span>\n </p>\n }\n </div>\n </header>\n <mat-divider></mat-divider>\n <div class=\"invoice-info\">\n <section class=\"invoice-references\">\n @if (textWords.referencesTopic) {\n <h2 class=\"info-title\">{{ textWords.referencesTopic }}</h2>\n }\n @if (invoice().references?.buyerReference) {\n <p>\n <strong>{{ textWords.referencesBuyerReference }}: </strong>\n <span>{{ invoice().references?.buyerReference }}</span>\n </p>\n }\n @if (invoice().references?.projectReference) {\n <p>\n <strong>{{ textWords.referencesProjectReference }}: </strong>\n <span>{{ invoice().references?.projectReference }}</span>\n </p>\n }\n @if (invoice().references?.contractReference) {\n <p>\n <strong>{{ textWords.referencesContractReference }}: </strong>\n <span>{{ invoice().references?.contractReference }}</span>\n </p>\n }\n @if (invoice().references?.purchaseOrderReference) {\n <p>\n <strong>{{ textWords.referencesPurchaseOrderReference }}: </strong>\n <span>{{ invoice().references?.purchaseOrderReference }}</span>\n </p>\n }\n @if (invoice().references?.salesOrderReference) {\n <p>\n <strong>{{ textWords.referencesSalesOrderReference }}: </strong>\n <span>{{ invoice().references?.salesOrderReference }}</span>\n </p>\n }\n @if (invoice().references?.receivingAdviceReference) {\n <p>\n <strong>{{ textWords.referencesReceivingAdviceReference }}: </strong>\n <span>{{ invoice().references?.receivingAdviceReference }}</span>\n </p>\n }\n @if (invoice().references?.dispatchAdviceReference) {\n <p>\n <strong>{{ textWords.referencesDispatchAdviceReference }}: </strong>\n <span> {{ invoice().references?.dispatchAdviceReference }}</span>\n </p>\n }\n @if (invoice().references?.tenderOrLotReference) {\n <p>\n <strong>{{ textWords.referencesTenderOrLotReference }}: </strong>\n <span>{{ invoice().references?.tenderOrLotReference }}</span>\n </p>\n }\n @if (invoice().references?.invoicedObjectIdentifier) {\n <p>\n <strong>{{ textWords.referencesInvoicedObjectIdentifier }}: </strong>\n <span>{{ invoice().references?.invoicedObjectIdentifier }}</span>\n </p>\n }\n </section>\n @if (invoice().deliveryInformation) {\n <section class=\"invoice-delivery\">\n <h2 class=\"info-title\">{{ textWords.deliveryInformationTitle }}</h2>\n\n @if (invoice().deliveryInformation?.deliverToName) {\n <p>\n <strong>{{ textWords.deliverToName }}: </strong>\n <span>{{ invoice().deliveryInformation?.deliverToName }}</span>\n </p>\n }\n @if (invoice().deliveryInformation?.deliverToLocationIdentifier) {\n <p>\n <strong>{{ textWords.deliverToLocationIdentifier }}: </strong>\n <span>{{ invoice().deliveryInformation?.deliverToLocationIdentifier }}</span>\n </p>\n }\n @if (invoice().deliveryInformation?.deliveryDate) {\n <p>\n <strong>{{ textWords.deliveryDate }}: </strong>\n <span>{{ invoice().deliveryInformation?.deliveryDate | date: 'shortDate' }}</span>\n </p>\n }\n @if (invoice().deliveryInformation?.deliveryAddress) {\n <p>\n <strong>{{ textWords.deliveryAddress }}: </strong>\n <span>\n @if (invoice().deliveryInformation?.deliveryAddress?.address) {\n <p>{{ invoice().deliveryInformation?.deliveryAddress?.address }}</p>\n }\n @if (invoice().deliveryInformation?.deliveryAddress?.city) {\n <span>{{ invoice().deliveryInformation?.deliveryAddress?.city }},</span>\n }\n @if (invoice().deliveryInformation?.deliveryAddress?.zipCode) {\n <span>{{ invoice().deliveryInformation?.deliveryAddress?.zipCode }}</span>\n }\n @if (invoice().deliveryInformation?.deliveryAddress?.countryCode) {\n <p>{{ invoice().deliveryInformation?.deliveryAddress?.countryCode }}</p>\n }\n </span>\n </p>\n }\n </section>\n }\n </div>\n\n <table class=\"invoice-table\">\n <thead>\n <tr>\n <th>#</th>\n <th>{{ textWords.tableHeadDescription }}</th>\n <th>{{ textWords.tableHeadQuantity }}</th>\n <th>{{ textWords.tableHeadUnit }}</th>\n <th>{{ textWords.tableHeadNetPrice }}</th>\n <th>{{ textWords.tableHeadNetAmount }}</th>\n <th>{{ textWords.vat }}</th>\n </tr>\n </thead>\n <tbody>\n @for (item of invoice().lineItems; track item; let i = $index) {\n <tr>\n <td>{{ i + 1 }}</td>\n <td>{{ item.itemInformation?.description }}</td>\n <td>{{ item.quantity }}</td>\n <td>{{ item.unitCode }}</td>\n <td class=\"currency-table-cell\">{{ item.priceDetails?.netPrice | currency: invoice().currencyCode }}</td>\n <td class=\"currency-table-cell\">{{ item.netAmount | currency: invoice().currencyCode }}</td>\n <td class=\"currency-table-cell\">{{ item.vatInformation[0]?.vatRate | percent: '1.0-2' }}</td>\n </tr>\n }\n </tbody>\n </table>\n\n <div class=\"addition-info\">\n <section class=\"invoice-totals\">\n <h2 class=\"info-title\">{{ textWords.totalsTopic }}</h2>\n\n @if (invoice().totals?.totalNet) {\n <p>\n <strong>{{ textWords.totalsTotalNet }}: </strong>\n <span>{{ invoice().totals?.totalNet | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalAllowances) {\n <p>\n <strong>{{ textWords.totalsTotalAllowances }}: </strong>\n <span> {{ invoice().totals?.totalAllowances | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalCharges) {\n <p>\n <strong>{{ textWords.totalsTotalCharges }}: </strong>\n <span> {{ invoice().totals?.totalCharges | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalAfterDeductions) {\n <p>\n <strong>{{ textWords.totalsTotalAfterDeductions }}: </strong>\n <span>{{ invoice().totals?.totalAfterDeductions | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalVatAmount) {\n <p>\n <strong>{{ textWords.totalsTotalVatAmount }}: </strong>\n <span>{{ invoice().totals?.totalVatAmount | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalGross) {\n <p>\n <strong>{{ textWords.totalsTotalGross }}: </strong>\n <span> {{ invoice().totals?.totalGross | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.alreadyPaidTotal) {\n <p>\n <strong>{{ textWords.totalsAlreadyPaidTotal }}: </strong>\n <span>{{ invoice().totals?.alreadyPaidTotal | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalToBePaid) {\n <p class=\"total\">\n <strong>{{ textWords.totalsTotalToBePaid }}: </strong>\n <strong> {{ invoice().totals?.totalToBePaid | currency: invoice().currencyCode }}</strong>\n </p>\n }\n </section>\n <section class=\"taxes\">\n <h2 class=\"info-title\">{{ textWords.taxesHeading }}</h2>\n <table class=\"tax-report-table\">\n <thead>\n <tr>\n <th>{{ textWords.vat }}</th>\n <th>{{ textWords.totalsTotalNet }}</th>\n <th>{{ textWords.totalsTotalVatAmount }}</th>\n </tr>\n </thead>\n <tbody>\n @for (tax of invoice().vatBreakdown; track tax.taxRate) {\n <tr>\n <td class=\"currency-table-cell\">\n @if (tax.taxRate) {\n <span>{{ tax.taxRate | percent: '1.0-2' }}</span>\n }\n </td>\n <td class=\"currency-table-cell\">\n @if (tax.netTaxableAmount) {\n <span>{{ tax.netTaxableAmount | currency: invoice().currencyCode }}</span>\n }\n </td>\n <td class=\"currency-table-cell\">\n @if (tax.vatAmount) {\n <span>{{ tax.vatAmount | currency: invoice().currencyCode }}</span>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n </section>\n\n <section class=\"payment-instructions\">\n <h2 class=\"info-title\">{{ textWords.instructionsTopic }}</h2>\n @if (invoice().paymentInstructions?.description) {\n <p>{{ invoice().paymentInstructions?.description }}</p>\n }\n @for (means of invoice().paymentInstructions?.paymentMeans; track means) {\n <div>\n @if (means.accountIdentifier) {\n <p>\n <strong>{{ textWords.instructionsAccountIdentifier }}: </strong>\n <span>{{ means.accountIdentifier }}</span>\n </p>\n }\n @if (means.accountName) {\n <p>\n <strong>{{ textWords.instructionsAccountName }}: </strong>\n <span>{{ means.accountName }}</span>\n </p>\n }\n @if (means.serviceProviderIdentifier) {\n <p>\n <strong>{{ textWords.instructionsServiceProviderIdentifier }}: </strong>\n <span>{{ means.serviceProviderIdentifier }}</span>\n </p>\n }\n </div>\n }\n </section>\n </div>\n\n <section class=\"invoice-notes\">\n <h2>{{ textWords.notesTopic }}</h2>\n @for (note of invoice().invoiceNotes; track note) {\n <div>\n @if (note?.shortText) {\n <p>\n <strong>{{ note?.shortText }}</strong>\n </p>\n }\n @if (note?.longText) {\n <p>{{ note?.longText }}</p>\n }\n </div>\n }\n </section>\n @if (invoice().documents?.length) {\n <section class=\"invoice-attachments\">\n <ava-invoice-documents [documents]=\"invoice().documents\"></ava-invoice-documents>\n </section>\n }\n </div>\n}\n", styles: [".invoice-container{width:100%;max-width:800px;margin:auto;font-family:Arial,sans-serif;line-height:1.5}.invoice-header{display:flex;justify-content:space-between;margin-bottom:20px}.invoice-header .header{height:32px}.invoice-header .header-title{background:var(--color-primary);color:#fff;text-align:center}.seller-info,.buyer-info,.invoice-details{width:30%}.seller-info,.invoice-delivery,.payment-instructions{text-align:right}.currency-table-cell{text-align:right!important}.invoice-title{font-size:48px;margin:20px 0}.invoice-references,.invoice-totals,.payment-instructions,.invoice-notes,.taxes,.invoice-delivery{margin:20px 0}.invoice-table{width:100%;border-collapse:collapse;margin:20px 0}.invoice-table th,.invoice-table td{border:1px solid #000;padding:8px;text-align:left}.invoice-table th{background-color:var(--color-primary)}.invoice-totals p,.payment-instructions p,.invoice-notes p{margin:5px 0}h2{font-size:18px;margin-bottom:10px}.addition-info{display:flex;justify-content:space-between;gap:10px}.total{background-color:var(--color-primary);color:#fff;padding:5px;border-radius:5px}th{color:#fff;text-wrap:nowrap}.invoice-attachments{padding-bottom:15px}.invoice-info{display:flex;justify-content:space-between;margin-bottom:20px}.info-title{border-bottom:2px solid var(--color-primary);text-align:center}.tax-report-table{width:100%;border-collapse:collapse;margin-top:10px}.tax-report-table th,.tax-report-table td{padding:12px;text-align:center;border:1px solid #ddd}.tax-report-table th{background-color:var(--color-primary);color:#fff;font-weight:700;border:1px solid #000}.tax-report-table td{font-size:14px;color:#333;border:1px solid #000}\n"] }]
|
|
1882
|
-
}], ctorParameters: () => [{ type: i1.ConfigurationInvoiceService }], propDecorators: { config: [{
|
|
1883
|
-
type: Input
|
|
1884
|
-
}] } });
|
|
1885
|
-
|
|
1886
1869
|
const DEFAULT_TEXT_WORD_INVOICE = {
|
|
1887
1870
|
invoiceTitle: 'Invoice',
|
|
1888
1871
|
invoiceBuyerTitle: 'Receiver',
|
|
@@ -2002,6 +1985,47 @@ const germanTextsInvoice = {
|
|
|
2002
1985
|
taxesHeading: 'Steuer'
|
|
2003
1986
|
};
|
|
2004
1987
|
|
|
1988
|
+
class ConfigurationInvoiceService {
|
|
1989
|
+
constructor() {
|
|
1990
|
+
this._textWords = null;
|
|
1991
|
+
this._pdfViewEnabled = false;
|
|
1992
|
+
this._language = 'en';
|
|
1993
|
+
this.invoiceConfigSource = new BehaviorSubject(this.getDefaultInvoiceConfiguration());
|
|
1994
|
+
this.invoiceConfig$ = this.invoiceConfigSource.asObservable();
|
|
1995
|
+
this.getLanguageFromConfig()
|
|
1996
|
+
.pipe(skip(1), take(1))
|
|
1997
|
+
.subscribe((language) => {
|
|
1998
|
+
this._textWords = this.getDefaulTextWords(language);
|
|
1999
|
+
this.setInvoiceConfig({ textWords: this._textWords, ...this.getCurrentInvoiceConfig() });
|
|
2000
|
+
});
|
|
2001
|
+
}
|
|
2002
|
+
setInvoiceConfig(value) {
|
|
2003
|
+
this.invoiceConfigSource.next(value);
|
|
2004
|
+
}
|
|
2005
|
+
getCurrentInvoiceConfig() {
|
|
2006
|
+
return this.invoiceConfigSource.getValue();
|
|
2007
|
+
}
|
|
2008
|
+
getTextWordsFromConfig() {
|
|
2009
|
+
return this.invoiceConfig$.pipe(map((config) => config?.textWords || null), map((textWords) => (textWords === null ? this._textWords : { ...this._textWords, ...textWords })), distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)));
|
|
2010
|
+
}
|
|
2011
|
+
getPdfViewEnabledFromConfig() {
|
|
2012
|
+
return this.invoiceConfig$.pipe(map((config) => (config === null ? false : config.pdfViewEnabled || false)), distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)));
|
|
2013
|
+
}
|
|
2014
|
+
getLanguageFromConfig() {
|
|
2015
|
+
return this.invoiceConfig$.pipe(map((c) => c.language || 'en'));
|
|
2016
|
+
}
|
|
2017
|
+
getDefaultInvoiceConfiguration() {
|
|
2018
|
+
return {
|
|
2019
|
+
textWords: null,
|
|
2020
|
+
pdfViewEnabled: this._pdfViewEnabled,
|
|
2021
|
+
language: this._language
|
|
2022
|
+
};
|
|
2023
|
+
}
|
|
2024
|
+
getDefaulTextWords(language) {
|
|
2025
|
+
return language === 'en' ? { ...DEFAULT_TEXT_WORD_INVOICE } : { ...germanTextsInvoice };
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
|
|
2005
2029
|
/** Type of the invoice */
|
|
2006
2030
|
var InvoiceType;
|
|
2007
2031
|
(function (InvoiceType) {
|
|
@@ -2047,6 +2071,199 @@ var SourceType;
|
|
|
2047
2071
|
SourceType[SourceType["Cii"] = 2] = "Cii";
|
|
2048
2072
|
})(SourceType || (SourceType = {}));
|
|
2049
2073
|
|
|
2074
|
+
class InvoiceAttachmentMimeTypePipe {
|
|
2075
|
+
transform(attachmentMimeType) {
|
|
2076
|
+
switch (attachmentMimeType) {
|
|
2077
|
+
case AttachmentMimeType.Pdf:
|
|
2078
|
+
return 'PDF';
|
|
2079
|
+
case AttachmentMimeType.Png:
|
|
2080
|
+
return 'PNG';
|
|
2081
|
+
case AttachmentMimeType.Jpeg:
|
|
2082
|
+
return 'JPEG';
|
|
2083
|
+
case AttachmentMimeType.Csv:
|
|
2084
|
+
return 'CSV';
|
|
2085
|
+
case AttachmentMimeType.Excel:
|
|
2086
|
+
return 'Excel';
|
|
2087
|
+
case AttachmentMimeType.OpenOfficeSpreadsheet:
|
|
2088
|
+
return 'Open Office Spreadsheet';
|
|
2089
|
+
case AttachmentMimeType.Unknown:
|
|
2090
|
+
default:
|
|
2091
|
+
return 'Unknown';
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: InvoiceAttachmentMimeTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
2095
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.1", ngImport: i0, type: InvoiceAttachmentMimeTypePipe, isStandalone: true, name: "invoiceAttachmentMimeType" }); }
|
|
2096
|
+
}
|
|
2097
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: InvoiceAttachmentMimeTypePipe, decorators: [{
|
|
2098
|
+
type: Pipe,
|
|
2099
|
+
args: [{
|
|
2100
|
+
name: 'invoiceAttachmentMimeType',
|
|
2101
|
+
standalone: true
|
|
2102
|
+
}]
|
|
2103
|
+
}] });
|
|
2104
|
+
|
|
2105
|
+
class InvoiceDocumentsComponent {
|
|
2106
|
+
constructor(configurationInvoiceService) {
|
|
2107
|
+
this.configurationInvoiceService = configurationInvoiceService;
|
|
2108
|
+
this.documents = [];
|
|
2109
|
+
this.documentsPanel = null;
|
|
2110
|
+
this.destroyRef = inject(DestroyRef);
|
|
2111
|
+
this.textWords$ = this.configurationInvoiceService.getTextWordsFromConfig();
|
|
2112
|
+
this.pdfViewEnabled = false;
|
|
2113
|
+
}
|
|
2114
|
+
ngOnInit() {
|
|
2115
|
+
this.configurationInvoiceService
|
|
2116
|
+
.getPdfViewEnabledFromConfig()
|
|
2117
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
2118
|
+
.subscribe((pdfViewEnabled) => {
|
|
2119
|
+
this.pdfViewEnabled = pdfViewEnabled;
|
|
2120
|
+
});
|
|
2121
|
+
}
|
|
2122
|
+
ngAfterViewInit() {
|
|
2123
|
+
if (this.documentsPanel && this.pdfViewEnabled) {
|
|
2124
|
+
// In a static PDF view, we always want to open the documents panel
|
|
2125
|
+
this.documentsPanel.open();
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
download(documentValue) {
|
|
2129
|
+
if (documentValue.documentBase64) {
|
|
2130
|
+
this.downloadAny(documentValue);
|
|
2131
|
+
}
|
|
2132
|
+
else {
|
|
2133
|
+
this.downloadLink(documentValue);
|
|
2134
|
+
}
|
|
2135
|
+
}
|
|
2136
|
+
downloadAny(documentValue) {
|
|
2137
|
+
if (documentValue.documentBase64) {
|
|
2138
|
+
const byteCharacters = atob(documentValue.documentBase64);
|
|
2139
|
+
const byteNumbers = new Array(byteCharacters.length);
|
|
2140
|
+
for (let i = 0; i < byteCharacters.length; i++) {
|
|
2141
|
+
byteNumbers[i] = byteCharacters.charCodeAt(i);
|
|
2142
|
+
}
|
|
2143
|
+
const byteArray = new Uint8Array(byteNumbers);
|
|
2144
|
+
const blob = new Blob([byteArray], { type: 'application/octet-stream' });
|
|
2145
|
+
this.saveAs(blob, documentValue.fileName);
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
async downloadLink(documentValue) {
|
|
2149
|
+
try {
|
|
2150
|
+
const response = await fetch(documentValue.externalDocumentUrl);
|
|
2151
|
+
const blob = await response.blob();
|
|
2152
|
+
this.saveAs(blob, documentValue.fileName);
|
|
2153
|
+
}
|
|
2154
|
+
catch (error) {
|
|
2155
|
+
console.error(error);
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
saveAs(blob, fileName) {
|
|
2159
|
+
const link = document.createElement('a');
|
|
2160
|
+
link.href = URL.createObjectURL(blob);
|
|
2161
|
+
link.download = fileName;
|
|
2162
|
+
link.click();
|
|
2163
|
+
}
|
|
2164
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: InvoiceDocumentsComponent, deps: [{ token: ConfigurationInvoiceService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2165
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: InvoiceDocumentsComponent, isStandalone: true, selector: "ava-invoice-documents", inputs: { documents: "documents" }, viewQueries: [{ propertyName: "documentsPanel", first: true, predicate: ["documentsPanel"], descendants: true }], ngImport: i0, template: "@if (textWords$ | async; as textWords) {\n <mat-accordion>\n <mat-expansion-panel\n [hideToggle]=\"pdfViewEnabled\"\n #documentsPanel\n >\n <mat-expansion-panel-header>\n <mat-panel-title>\n {{ textWords.attachmentsHeading }}\n </mat-panel-title>\n </mat-expansion-panel-header>\n @for (document of documents; track document.documentReference) {\n <div class=\"document\">\n @if (document.documentReference) {\n <div>\n <strong>{{ textWords.attachmentsName }}: </strong>\n <span>{{ document.documentReference }}</span>\n </div>\n }\n @if (document.description) {\n <div>\n <strong>{{ textWords.attachmentsDescription }}: </strong>\n <span>{{ document.description }}</span>\n </div>\n }\n @if (document.externalDocumentUrl) {\n <div>\n <strong>{{ textWords.attachmentsUrl }}: </strong>\n <span>{{ document.externalDocumentUrl }}</span>\n </div>\n } @else if (document.documentBase64) {\n <div>\n <strong>{{ textWords.attachmentsDataSize }}: </strong>\n <span>{{ document.documentBase64.length }}</span>\n </div>\n\n @if (document.documentMimeType) {\n <div>\n <strong>{{ textWords.attachmentsMimeType }}: </strong>\n <span>{{ document.documentMimeType | invoiceAttachmentMimeType }}</span>\n </div>\n }\n }\n @if (document.fileName) {\n <div>\n <strong>{{ textWords.attachmentsFileName }}: </strong>\n <span>{{ document.fileName }}</span>\n </div>\n }\n @if (!pdfViewEnabled) {\n <button\n mat-raised-button\n color=\"primary\"\n (click)=\"download(document)\"\n [disabled]=\"!document.externalDocumentUrl && !document.documentBase64\"\n >\n {{ textWords.attachmentsDownloadButton }}\n </button>\n }\n </div>\n }\n </mat-expansion-panel>\n </mat-accordion>\n}\n", styles: [".document{padding-bottom:15px}\n"], dependencies: [{ kind: "ngmodule", type: MatExpansionModule }, { kind: "directive", type: i2.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i2.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i2.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i2.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "pipe", type: InvoiceAttachmentMimeTypePipe, name: "invoiceAttachmentMimeType" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2166
|
+
}
|
|
2167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: InvoiceDocumentsComponent, decorators: [{
|
|
2168
|
+
type: Component,
|
|
2169
|
+
args: [{ selector: 'ava-invoice-documents', imports: [MatExpansionModule, MatButtonModule, InvoiceAttachmentMimeTypePipe, AsyncPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (textWords$ | async; as textWords) {\n <mat-accordion>\n <mat-expansion-panel\n [hideToggle]=\"pdfViewEnabled\"\n #documentsPanel\n >\n <mat-expansion-panel-header>\n <mat-panel-title>\n {{ textWords.attachmentsHeading }}\n </mat-panel-title>\n </mat-expansion-panel-header>\n @for (document of documents; track document.documentReference) {\n <div class=\"document\">\n @if (document.documentReference) {\n <div>\n <strong>{{ textWords.attachmentsName }}: </strong>\n <span>{{ document.documentReference }}</span>\n </div>\n }\n @if (document.description) {\n <div>\n <strong>{{ textWords.attachmentsDescription }}: </strong>\n <span>{{ document.description }}</span>\n </div>\n }\n @if (document.externalDocumentUrl) {\n <div>\n <strong>{{ textWords.attachmentsUrl }}: </strong>\n <span>{{ document.externalDocumentUrl }}</span>\n </div>\n } @else if (document.documentBase64) {\n <div>\n <strong>{{ textWords.attachmentsDataSize }}: </strong>\n <span>{{ document.documentBase64.length }}</span>\n </div>\n\n @if (document.documentMimeType) {\n <div>\n <strong>{{ textWords.attachmentsMimeType }}: </strong>\n <span>{{ document.documentMimeType | invoiceAttachmentMimeType }}</span>\n </div>\n }\n }\n @if (document.fileName) {\n <div>\n <strong>{{ textWords.attachmentsFileName }}: </strong>\n <span>{{ document.fileName }}</span>\n </div>\n }\n @if (!pdfViewEnabled) {\n <button\n mat-raised-button\n color=\"primary\"\n (click)=\"download(document)\"\n [disabled]=\"!document.externalDocumentUrl && !document.documentBase64\"\n >\n {{ textWords.attachmentsDownloadButton }}\n </button>\n }\n </div>\n }\n </mat-expansion-panel>\n </mat-accordion>\n}\n", styles: [".document{padding-bottom:15px}\n"] }]
|
|
2170
|
+
}], ctorParameters: () => [{ type: ConfigurationInvoiceService }], propDecorators: { documents: [{
|
|
2171
|
+
type: Input
|
|
2172
|
+
}], documentsPanel: [{
|
|
2173
|
+
type: ViewChild,
|
|
2174
|
+
args: ['documentsPanel']
|
|
2175
|
+
}] } });
|
|
2176
|
+
|
|
2177
|
+
class InvoiceDisplayComponent {
|
|
2178
|
+
/**
|
|
2179
|
+
* You can supply a map of strings to be used for the text in the tree. This allows you to translate
|
|
2180
|
+
* the text in the tree to other languages.
|
|
2181
|
+
* {
|
|
2182
|
+
* invoiceTitle: string;
|
|
2183
|
+
* vatId: string;
|
|
2184
|
+
* detailsInvoiceNumber: string;
|
|
2185
|
+
* detailsInvoiceDate: string;
|
|
2186
|
+
* detailsPaymentDueDate: string;
|
|
2187
|
+
* detailsCurrencyCode: string;
|
|
2188
|
+
* detailsPaymentTerms: string;
|
|
2189
|
+
* referencesTopic: string;
|
|
2190
|
+
* referencesBuyerReference: string;
|
|
2191
|
+
* referencesProjectReference: string;
|
|
2192
|
+
* referencesContractReference: string;
|
|
2193
|
+
* referencesPurchaseOrderReference: string;
|
|
2194
|
+
* referencesSalesOrderReference: string;
|
|
2195
|
+
* referencesReceivingAdviceReference: string;
|
|
2196
|
+
* referencesDispatchAdviceReference: string;
|
|
2197
|
+
* referencesTenderOrLotReference: string;
|
|
2198
|
+
* referencesInvoicedObjectIdentifier: string;
|
|
2199
|
+
* tableHeadDescription: string;
|
|
2200
|
+
* tableHeadQuantity: string;
|
|
2201
|
+
* tableHeadUnit: string;
|
|
2202
|
+
* tableHeadNetPrice: string;
|
|
2203
|
+
* tableHeadNetAmount: string;
|
|
2204
|
+
* totalsTopic: string;
|
|
2205
|
+
* totalsTotalNet: string;
|
|
2206
|
+
* totalsTotalAllowances: string;
|
|
2207
|
+
* totalsTotalCharges: string;
|
|
2208
|
+
* totalsTotalAfterDeductions: string;
|
|
2209
|
+
* totalsTotalVatAmount: string;
|
|
2210
|
+
* totalsTotalGross: string;
|
|
2211
|
+
* totalsAlreadyPaidTotal: string;
|
|
2212
|
+
* totalsTotalToBePaid: string;
|
|
2213
|
+
* instructionsTopic: string;
|
|
2214
|
+
* instructionsAccountIdentifier: string;
|
|
2215
|
+
* instructionsAccountName: string;
|
|
2216
|
+
* instructionsServiceProviderIdentifier: string;
|
|
2217
|
+
* notesTopic: string;
|
|
2218
|
+
* attachmentsHeading: string;
|
|
2219
|
+
* attachmentsName: string;
|
|
2220
|
+
* attachmentsDescription: string;
|
|
2221
|
+
* attachmentsUrl: string;
|
|
2222
|
+
* attachmentsDataSize: string;
|
|
2223
|
+
* attachmentsMimeType: string;
|
|
2224
|
+
* attachmentsFileName: string;
|
|
2225
|
+
* attachmentsDownloadButton: string;
|
|
2226
|
+
*
|
|
2227
|
+
* }
|
|
2228
|
+
*/
|
|
2229
|
+
set config(configObject) {
|
|
2230
|
+
if (this.configurationInvoiceService.getCurrentInvoiceConfig()) {
|
|
2231
|
+
const config = { ...this.configurationInvoiceService.getCurrentInvoiceConfig(), ...configObject };
|
|
2232
|
+
this.configurationInvoiceService.setInvoiceConfig(config);
|
|
2233
|
+
}
|
|
2234
|
+
}
|
|
2235
|
+
constructor(configurationInvoiceService) {
|
|
2236
|
+
this.configurationInvoiceService = configurationInvoiceService;
|
|
2237
|
+
// TODO remove type any after TODO under will be resolved
|
|
2238
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2239
|
+
this.invoice = input.required();
|
|
2240
|
+
this.textWords$ = this.configurationInvoiceService.getTextWordsFromConfig();
|
|
2241
|
+
/**TODO: For setting invoice instead:
|
|
2242
|
+
* <ava-invoice-display id="invoice"></ava-invoice-display>
|
|
2243
|
+
* invoice = document.getElementById('invoice');
|
|
2244
|
+
* invoice.invoice = INVOICE;
|
|
2245
|
+
* we should pass value to global window variable
|
|
2246
|
+
* window['InvoiceGlobalVariable'] = INVOICE;
|
|
2247
|
+
* Temporary solution until the problem of setting the value for InputSignal is solved. See this PR https://github.com/angular/angular/pull/55067
|
|
2248
|
+
*/
|
|
2249
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2250
|
+
if (window['InvoiceGlobalVariable']) {
|
|
2251
|
+
this.invoice = () => {
|
|
2252
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2253
|
+
return window['InvoiceGlobalVariable'];
|
|
2254
|
+
};
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2257
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: InvoiceDisplayComponent, deps: [{ token: ConfigurationInvoiceService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2258
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: InvoiceDisplayComponent, isStandalone: true, selector: "ava-invoice-display", inputs: { invoice: { classPropertyName: "invoice", publicName: "invoice", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: false, isRequired: false, transformFunction: null } }, providers: [ConfigurationInvoiceService], ngImport: i0, template: "@if (textWords$ | async; as textWords) {\n <div class=\"invoice-container\">\n <!-- Seller and Buyer Information -->\n <h1 class=\"invoice-title\">{{ textWords.invoiceTitle }}</h1>\n <header class=\"invoice-header\">\n <div class=\"buyer-info\">\n <h2 class=\"header-title\">{{ textWords.invoiceBuyerTitle }}</h2>\n <p>\n <strong>{{ invoice().buyer?.name }}</strong>\n </p>\n <p>{{ invoice().buyer?.address }}</p>\n <p>{{ invoice().buyer?.city }}, {{ invoice().buyer?.zipCode }}</p>\n <p>{{ invoice().buyer?.countryCode }}</p>\n @if (invoice().buyer?.vatId) {\n <p>\n <strong>{{ textWords.vatId }}: </strong>\n <span>{{ invoice().buyer?.vatId }}</span>\n </p>\n }\n <mat-divider></mat-divider>\n @if (invoice().buyer?.contactPersonName) {\n <p>\n <strong>{{ textWords.contactPersonName }}: </strong>\n <span>{{ invoice().buyer?.contactPersonName }}</span>\n </p>\n }\n @if (invoice().buyer?.contactPersonPhone) {\n <p>\n <strong>{{ textWords.contactPersonPhone }}: </strong>\n <span>{{ invoice().buyer?.contactPersonPhone }}</span>\n </p>\n }\n @if (invoice().buyer?.contactPersonEmail) {\n <p>\n <strong>{{ textWords.contactPersonEmail }}: </strong>\n <span>{{ invoice().buyer?.contactPersonEmail }}</span>\n </p>\n }\n </div>\n <div class=\"invoice-details\">\n <h2 [class.header]=\"textWords.invoiceBuyerTitle.trim() || textWords.invoiceSellerTitle.trim()\"></h2>\n @if (invoice().invoiceNumber) {\n <p>\n <strong>{{ textWords.detailsInvoiceNumber }}: </strong>\n <span>{{ invoice().invoiceNumber }}</span>\n </p>\n }\n @if (invoice().invoiceDate) {\n <p>\n <strong>{{ textWords.detailsInvoiceDate }}: </strong>\n <span>{{ invoice().invoiceDate | date: 'dd.MM.yyyy' }}</span>\n </p>\n }\n @if (invoice().paymentDueDate) {\n <p>\n <strong>{{ textWords.detailsPaymentDueDate }}: </strong>\n <span>{{ invoice().paymentDueDate | date: 'dd.MM.yyyy' }}</span>\n </p>\n }\n @if (invoice().currencyCode) {\n <p>\n <strong>{{ textWords.detailsCurrencyCode }}: </strong>\n <span>{{ invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().paymentTerms) {\n <p>\n <strong>{{ textWords.detailsPaymentTerms }}: </strong>\n <span>{{ invoice().paymentTerms }}</span>\n </p>\n }\n </div>\n <div class=\"seller-info\">\n <h2 class=\"header-title\">{{ textWords.invoiceSellerTitle }}</h2>\n <p>\n <strong>{{ invoice().seller?.name }}</strong>\n </p>\n <p>{{ invoice().seller?.address }}</p>\n <p>{{ invoice().seller?.city }}, {{ invoice().seller?.zipCode }}</p>\n <p>{{ invoice().seller?.countryCode }}</p>\n @if (invoice().seller?.vatId) {\n <p>\n <strong>{{ textWords.vatId }}: </strong>\n <span>{{ invoice().seller?.vatId }}</span>\n </p>\n }\n <mat-divider></mat-divider>\n @if (invoice().seller?.contactPersonName) {\n <p>\n <strong>{{ textWords.contactPersonName }}: </strong>\n <span>{{ invoice().seller?.contactPersonName }}</span>\n </p>\n }\n @if (invoice().seller?.contactPersonPhone) {\n <p>\n <strong>{{ textWords.contactPersonPhone }}: </strong>\n <span>{{ invoice().seller?.contactPersonPhone }}</span>\n </p>\n }\n @if (invoice().seller?.contactPersonEmail) {\n <p>\n <strong>{{ textWords.contactPersonEmail }}: </strong>\n <span>{{ invoice().seller?.contactPersonEmail }}</span>\n </p>\n }\n </div>\n </header>\n <mat-divider></mat-divider>\n <div class=\"invoice-info\">\n <section class=\"invoice-references\">\n @if (textWords.referencesTopic) {\n <h2 class=\"info-title\">{{ textWords.referencesTopic }}</h2>\n }\n @if (invoice().references?.buyerReference) {\n <p>\n <strong>{{ textWords.referencesBuyerReference }}: </strong>\n <span>{{ invoice().references?.buyerReference }}</span>\n </p>\n }\n @if (invoice().references?.projectReference) {\n <p>\n <strong>{{ textWords.referencesProjectReference }}: </strong>\n <span>{{ invoice().references?.projectReference }}</span>\n </p>\n }\n @if (invoice().references?.contractReference) {\n <p>\n <strong>{{ textWords.referencesContractReference }}: </strong>\n <span>{{ invoice().references?.contractReference }}</span>\n </p>\n }\n @if (invoice().references?.purchaseOrderReference) {\n <p>\n <strong>{{ textWords.referencesPurchaseOrderReference }}: </strong>\n <span>{{ invoice().references?.purchaseOrderReference }}</span>\n </p>\n }\n @if (invoice().references?.salesOrderReference) {\n <p>\n <strong>{{ textWords.referencesSalesOrderReference }}: </strong>\n <span>{{ invoice().references?.salesOrderReference }}</span>\n </p>\n }\n @if (invoice().references?.receivingAdviceReference) {\n <p>\n <strong>{{ textWords.referencesReceivingAdviceReference }}: </strong>\n <span>{{ invoice().references?.receivingAdviceReference }}</span>\n </p>\n }\n @if (invoice().references?.dispatchAdviceReference) {\n <p>\n <strong>{{ textWords.referencesDispatchAdviceReference }}: </strong>\n <span> {{ invoice().references?.dispatchAdviceReference }}</span>\n </p>\n }\n @if (invoice().references?.tenderOrLotReference) {\n <p>\n <strong>{{ textWords.referencesTenderOrLotReference }}: </strong>\n <span>{{ invoice().references?.tenderOrLotReference }}</span>\n </p>\n }\n @if (invoice().references?.invoicedObjectIdentifier) {\n <p>\n <strong>{{ textWords.referencesInvoicedObjectIdentifier }}: </strong>\n <span>{{ invoice().references?.invoicedObjectIdentifier }}</span>\n </p>\n }\n </section>\n @if (invoice().deliveryInformation) {\n <section class=\"invoice-delivery\">\n <h2 class=\"info-title\">{{ textWords.deliveryInformationTitle }}</h2>\n\n @if (invoice().deliveryInformation?.deliverToName) {\n <p>\n <strong>{{ textWords.deliverToName }}: </strong>\n <span>{{ invoice().deliveryInformation?.deliverToName }}</span>\n </p>\n }\n @if (invoice().deliveryInformation?.deliverToLocationIdentifier) {\n <p>\n <strong>{{ textWords.deliverToLocationIdentifier }}: </strong>\n <span>{{ invoice().deliveryInformation?.deliverToLocationIdentifier }}</span>\n </p>\n }\n @if (invoice().deliveryInformation?.deliveryDate) {\n <p>\n <strong>{{ textWords.deliveryDate }}: </strong>\n <span>{{ invoice().deliveryInformation?.deliveryDate | date: 'shortDate' }}</span>\n </p>\n }\n @if (invoice().deliveryInformation?.deliveryAddress) {\n <p>\n <strong>{{ textWords.deliveryAddress }}: </strong>\n <span>\n @if (invoice().deliveryInformation?.deliveryAddress?.address) {\n <p>{{ invoice().deliveryInformation?.deliveryAddress?.address }}</p>\n }\n @if (invoice().deliveryInformation?.deliveryAddress?.city) {\n <span>{{ invoice().deliveryInformation?.deliveryAddress?.city }},</span>\n }\n @if (invoice().deliveryInformation?.deliveryAddress?.zipCode) {\n <span>{{ invoice().deliveryInformation?.deliveryAddress?.zipCode }}</span>\n }\n @if (invoice().deliveryInformation?.deliveryAddress?.countryCode) {\n <p>{{ invoice().deliveryInformation?.deliveryAddress?.countryCode }}</p>\n }\n </span>\n </p>\n }\n </section>\n }\n </div>\n\n <table class=\"invoice-table\">\n <thead>\n <tr>\n <th>#</th>\n <th>{{ textWords.tableHeadDescription }}</th>\n <th>{{ textWords.tableHeadQuantity }}</th>\n <th>{{ textWords.tableHeadUnit }}</th>\n <th>{{ textWords.tableHeadNetPrice }}</th>\n <th>{{ textWords.tableHeadNetAmount }}</th>\n <th>{{ textWords.vat }}</th>\n </tr>\n </thead>\n <tbody>\n @for (item of invoice().lineItems; track item; let i = $index) {\n <tr>\n <td>{{ i + 1 }}</td>\n <td>{{ item.itemInformation?.description }}</td>\n <td>{{ item.quantity }}</td>\n <td>{{ item.unitCode }}</td>\n <td class=\"currency-table-cell\">{{ item.priceDetails?.netPrice | currency: invoice().currencyCode }}</td>\n <td class=\"currency-table-cell\">{{ item.netAmount | currency: invoice().currencyCode }}</td>\n <td class=\"currency-table-cell\">{{ item.vatInformation[0]?.vatRate | percent: '1.0-2' }}</td>\n </tr>\n }\n </tbody>\n </table>\n\n <div class=\"addition-info\">\n <section class=\"invoice-totals\">\n <h2 class=\"info-title\">{{ textWords.totalsTopic }}</h2>\n\n @if (invoice().totals?.totalNet) {\n <p>\n <strong>{{ textWords.totalsTotalNet }}: </strong>\n <span>{{ invoice().totals?.totalNet | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalAllowances) {\n <p>\n <strong>{{ textWords.totalsTotalAllowances }}: </strong>\n <span> {{ invoice().totals?.totalAllowances | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalCharges) {\n <p>\n <strong>{{ textWords.totalsTotalCharges }}: </strong>\n <span> {{ invoice().totals?.totalCharges | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalAfterDeductions) {\n <p>\n <strong>{{ textWords.totalsTotalAfterDeductions }}: </strong>\n <span>{{ invoice().totals?.totalAfterDeductions | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalVatAmount) {\n <p>\n <strong>{{ textWords.totalsTotalVatAmount }}: </strong>\n <span>{{ invoice().totals?.totalVatAmount | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalGross) {\n <p>\n <strong>{{ textWords.totalsTotalGross }}: </strong>\n <span> {{ invoice().totals?.totalGross | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.alreadyPaidTotal) {\n <p>\n <strong>{{ textWords.totalsAlreadyPaidTotal }}: </strong>\n <span>{{ invoice().totals?.alreadyPaidTotal | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalToBePaid) {\n <p class=\"total\">\n <strong>{{ textWords.totalsTotalToBePaid }}: </strong>\n <strong> {{ invoice().totals?.totalToBePaid | currency: invoice().currencyCode }}</strong>\n </p>\n }\n </section>\n <section class=\"taxes\">\n <h2 class=\"info-title\">{{ textWords.taxesHeading }}</h2>\n <table class=\"tax-report-table\">\n <thead>\n <tr>\n <th>{{ textWords.vat }}</th>\n <th>{{ textWords.totalsTotalNet }}</th>\n <th>{{ textWords.totalsTotalVatAmount }}</th>\n </tr>\n </thead>\n <tbody>\n @for (tax of invoice().vatBreakdown; track tax.taxRate) {\n <tr>\n <td class=\"currency-table-cell\">\n @if (tax.taxRate) {\n <span>{{ tax.taxRate | percent: '1.0-2' }}</span>\n }\n </td>\n <td class=\"currency-table-cell\">\n @if (tax.netTaxableAmount) {\n <span>{{ tax.netTaxableAmount | currency: invoice().currencyCode }}</span>\n }\n </td>\n <td class=\"currency-table-cell\">\n @if (tax.vatAmount) {\n <span>{{ tax.vatAmount | currency: invoice().currencyCode }}</span>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n </section>\n\n <section class=\"payment-instructions\">\n <h2 class=\"info-title\">{{ textWords.instructionsTopic }}</h2>\n @if (invoice().paymentInstructions?.description) {\n <p>{{ invoice().paymentInstructions?.description }}</p>\n }\n @for (means of invoice().paymentInstructions?.paymentMeans; track means) {\n <div>\n @if (means.accountIdentifier) {\n <p>\n <strong>{{ textWords.instructionsAccountIdentifier }}: </strong>\n <span>{{ means.accountIdentifier }}</span>\n </p>\n }\n @if (means.accountName) {\n <p>\n <strong>{{ textWords.instructionsAccountName }}: </strong>\n <span>{{ means.accountName }}</span>\n </p>\n }\n @if (means.serviceProviderIdentifier) {\n <p>\n <strong>{{ textWords.instructionsServiceProviderIdentifier }}: </strong>\n <span>{{ means.serviceProviderIdentifier }}</span>\n </p>\n }\n </div>\n }\n </section>\n </div>\n\n <section class=\"invoice-notes\">\n <h2>{{ textWords.notesTopic }}</h2>\n @for (note of invoice().invoiceNotes; track note) {\n <div>\n @if (note?.shortText) {\n <p>\n <strong>{{ note?.shortText }}</strong>\n </p>\n }\n @if (note?.longText) {\n <p>{{ note?.longText }}</p>\n }\n </div>\n }\n </section>\n @if (invoice().documents?.length) {\n <section class=\"invoice-attachments\">\n <ava-invoice-documents [documents]=\"invoice().documents\"></ava-invoice-documents>\n </section>\n }\n </div>\n}\n", styles: [".invoice-container{width:100%;max-width:800px;margin:auto;font-family:Arial,sans-serif;line-height:1.5}.invoice-header{display:flex;justify-content:space-between;margin-bottom:20px}.invoice-header .header{height:32px}.invoice-header .header-title{background:var(--color-primary);color:#fff;text-align:center}.seller-info,.buyer-info,.invoice-details{width:30%}.seller-info,.invoice-delivery,.payment-instructions{text-align:right}.currency-table-cell{text-align:right!important}.invoice-title{font-size:48px;margin:20px 0}.invoice-references,.invoice-totals,.payment-instructions,.invoice-notes,.taxes,.invoice-delivery{margin:20px 0}.invoice-table{width:100%;border-collapse:collapse;margin:20px 0}.invoice-table th,.invoice-table td{border:1px solid #000;padding:8px;text-align:left}.invoice-table th{background-color:var(--color-primary)}.invoice-totals p,.payment-instructions p,.invoice-notes p{margin:5px 0}h2{font-size:18px;margin-bottom:10px}.addition-info{display:flex;justify-content:space-between;gap:10px}.total{background-color:var(--color-primary);color:#fff;padding:5px;border-radius:5px}th{color:#fff;text-wrap:nowrap}.invoice-attachments{padding-bottom:15px}.invoice-info{display:flex;justify-content:space-between;margin-bottom:20px}.info-title{border-bottom:2px solid var(--color-primary);text-align:center}.tax-report-table{width:100%;border-collapse:collapse;margin-top:10px}.tax-report-table th,.tax-report-table td{padding:12px;text-align:center;border:1px solid #ddd}.tax-report-table th{background-color:var(--color-primary);color:#fff;font-weight:700;border:1px solid #000}.tax-report-table td{font-size:14px;color:#333;border:1px solid #000}\n"], dependencies: [{ kind: "pipe", type: CurrencyPipe, name: "currency" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: PercentPipe, name: "percent" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i2$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: InvoiceDocumentsComponent, selector: "ava-invoice-documents", inputs: ["documents"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2259
|
+
}
|
|
2260
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: InvoiceDisplayComponent, decorators: [{
|
|
2261
|
+
type: Component,
|
|
2262
|
+
args: [{ selector: 'ava-invoice-display', imports: [CurrencyPipe, DatePipe, PercentPipe, AsyncPipe, MatDividerModule, InvoiceDocumentsComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [ConfigurationInvoiceService], template: "@if (textWords$ | async; as textWords) {\n <div class=\"invoice-container\">\n <!-- Seller and Buyer Information -->\n <h1 class=\"invoice-title\">{{ textWords.invoiceTitle }}</h1>\n <header class=\"invoice-header\">\n <div class=\"buyer-info\">\n <h2 class=\"header-title\">{{ textWords.invoiceBuyerTitle }}</h2>\n <p>\n <strong>{{ invoice().buyer?.name }}</strong>\n </p>\n <p>{{ invoice().buyer?.address }}</p>\n <p>{{ invoice().buyer?.city }}, {{ invoice().buyer?.zipCode }}</p>\n <p>{{ invoice().buyer?.countryCode }}</p>\n @if (invoice().buyer?.vatId) {\n <p>\n <strong>{{ textWords.vatId }}: </strong>\n <span>{{ invoice().buyer?.vatId }}</span>\n </p>\n }\n <mat-divider></mat-divider>\n @if (invoice().buyer?.contactPersonName) {\n <p>\n <strong>{{ textWords.contactPersonName }}: </strong>\n <span>{{ invoice().buyer?.contactPersonName }}</span>\n </p>\n }\n @if (invoice().buyer?.contactPersonPhone) {\n <p>\n <strong>{{ textWords.contactPersonPhone }}: </strong>\n <span>{{ invoice().buyer?.contactPersonPhone }}</span>\n </p>\n }\n @if (invoice().buyer?.contactPersonEmail) {\n <p>\n <strong>{{ textWords.contactPersonEmail }}: </strong>\n <span>{{ invoice().buyer?.contactPersonEmail }}</span>\n </p>\n }\n </div>\n <div class=\"invoice-details\">\n <h2 [class.header]=\"textWords.invoiceBuyerTitle.trim() || textWords.invoiceSellerTitle.trim()\"></h2>\n @if (invoice().invoiceNumber) {\n <p>\n <strong>{{ textWords.detailsInvoiceNumber }}: </strong>\n <span>{{ invoice().invoiceNumber }}</span>\n </p>\n }\n @if (invoice().invoiceDate) {\n <p>\n <strong>{{ textWords.detailsInvoiceDate }}: </strong>\n <span>{{ invoice().invoiceDate | date: 'dd.MM.yyyy' }}</span>\n </p>\n }\n @if (invoice().paymentDueDate) {\n <p>\n <strong>{{ textWords.detailsPaymentDueDate }}: </strong>\n <span>{{ invoice().paymentDueDate | date: 'dd.MM.yyyy' }}</span>\n </p>\n }\n @if (invoice().currencyCode) {\n <p>\n <strong>{{ textWords.detailsCurrencyCode }}: </strong>\n <span>{{ invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().paymentTerms) {\n <p>\n <strong>{{ textWords.detailsPaymentTerms }}: </strong>\n <span>{{ invoice().paymentTerms }}</span>\n </p>\n }\n </div>\n <div class=\"seller-info\">\n <h2 class=\"header-title\">{{ textWords.invoiceSellerTitle }}</h2>\n <p>\n <strong>{{ invoice().seller?.name }}</strong>\n </p>\n <p>{{ invoice().seller?.address }}</p>\n <p>{{ invoice().seller?.city }}, {{ invoice().seller?.zipCode }}</p>\n <p>{{ invoice().seller?.countryCode }}</p>\n @if (invoice().seller?.vatId) {\n <p>\n <strong>{{ textWords.vatId }}: </strong>\n <span>{{ invoice().seller?.vatId }}</span>\n </p>\n }\n <mat-divider></mat-divider>\n @if (invoice().seller?.contactPersonName) {\n <p>\n <strong>{{ textWords.contactPersonName }}: </strong>\n <span>{{ invoice().seller?.contactPersonName }}</span>\n </p>\n }\n @if (invoice().seller?.contactPersonPhone) {\n <p>\n <strong>{{ textWords.contactPersonPhone }}: </strong>\n <span>{{ invoice().seller?.contactPersonPhone }}</span>\n </p>\n }\n @if (invoice().seller?.contactPersonEmail) {\n <p>\n <strong>{{ textWords.contactPersonEmail }}: </strong>\n <span>{{ invoice().seller?.contactPersonEmail }}</span>\n </p>\n }\n </div>\n </header>\n <mat-divider></mat-divider>\n <div class=\"invoice-info\">\n <section class=\"invoice-references\">\n @if (textWords.referencesTopic) {\n <h2 class=\"info-title\">{{ textWords.referencesTopic }}</h2>\n }\n @if (invoice().references?.buyerReference) {\n <p>\n <strong>{{ textWords.referencesBuyerReference }}: </strong>\n <span>{{ invoice().references?.buyerReference }}</span>\n </p>\n }\n @if (invoice().references?.projectReference) {\n <p>\n <strong>{{ textWords.referencesProjectReference }}: </strong>\n <span>{{ invoice().references?.projectReference }}</span>\n </p>\n }\n @if (invoice().references?.contractReference) {\n <p>\n <strong>{{ textWords.referencesContractReference }}: </strong>\n <span>{{ invoice().references?.contractReference }}</span>\n </p>\n }\n @if (invoice().references?.purchaseOrderReference) {\n <p>\n <strong>{{ textWords.referencesPurchaseOrderReference }}: </strong>\n <span>{{ invoice().references?.purchaseOrderReference }}</span>\n </p>\n }\n @if (invoice().references?.salesOrderReference) {\n <p>\n <strong>{{ textWords.referencesSalesOrderReference }}: </strong>\n <span>{{ invoice().references?.salesOrderReference }}</span>\n </p>\n }\n @if (invoice().references?.receivingAdviceReference) {\n <p>\n <strong>{{ textWords.referencesReceivingAdviceReference }}: </strong>\n <span>{{ invoice().references?.receivingAdviceReference }}</span>\n </p>\n }\n @if (invoice().references?.dispatchAdviceReference) {\n <p>\n <strong>{{ textWords.referencesDispatchAdviceReference }}: </strong>\n <span> {{ invoice().references?.dispatchAdviceReference }}</span>\n </p>\n }\n @if (invoice().references?.tenderOrLotReference) {\n <p>\n <strong>{{ textWords.referencesTenderOrLotReference }}: </strong>\n <span>{{ invoice().references?.tenderOrLotReference }}</span>\n </p>\n }\n @if (invoice().references?.invoicedObjectIdentifier) {\n <p>\n <strong>{{ textWords.referencesInvoicedObjectIdentifier }}: </strong>\n <span>{{ invoice().references?.invoicedObjectIdentifier }}</span>\n </p>\n }\n </section>\n @if (invoice().deliveryInformation) {\n <section class=\"invoice-delivery\">\n <h2 class=\"info-title\">{{ textWords.deliveryInformationTitle }}</h2>\n\n @if (invoice().deliveryInformation?.deliverToName) {\n <p>\n <strong>{{ textWords.deliverToName }}: </strong>\n <span>{{ invoice().deliveryInformation?.deliverToName }}</span>\n </p>\n }\n @if (invoice().deliveryInformation?.deliverToLocationIdentifier) {\n <p>\n <strong>{{ textWords.deliverToLocationIdentifier }}: </strong>\n <span>{{ invoice().deliveryInformation?.deliverToLocationIdentifier }}</span>\n </p>\n }\n @if (invoice().deliveryInformation?.deliveryDate) {\n <p>\n <strong>{{ textWords.deliveryDate }}: </strong>\n <span>{{ invoice().deliveryInformation?.deliveryDate | date: 'shortDate' }}</span>\n </p>\n }\n @if (invoice().deliveryInformation?.deliveryAddress) {\n <p>\n <strong>{{ textWords.deliveryAddress }}: </strong>\n <span>\n @if (invoice().deliveryInformation?.deliveryAddress?.address) {\n <p>{{ invoice().deliveryInformation?.deliveryAddress?.address }}</p>\n }\n @if (invoice().deliveryInformation?.deliveryAddress?.city) {\n <span>{{ invoice().deliveryInformation?.deliveryAddress?.city }},</span>\n }\n @if (invoice().deliveryInformation?.deliveryAddress?.zipCode) {\n <span>{{ invoice().deliveryInformation?.deliveryAddress?.zipCode }}</span>\n }\n @if (invoice().deliveryInformation?.deliveryAddress?.countryCode) {\n <p>{{ invoice().deliveryInformation?.deliveryAddress?.countryCode }}</p>\n }\n </span>\n </p>\n }\n </section>\n }\n </div>\n\n <table class=\"invoice-table\">\n <thead>\n <tr>\n <th>#</th>\n <th>{{ textWords.tableHeadDescription }}</th>\n <th>{{ textWords.tableHeadQuantity }}</th>\n <th>{{ textWords.tableHeadUnit }}</th>\n <th>{{ textWords.tableHeadNetPrice }}</th>\n <th>{{ textWords.tableHeadNetAmount }}</th>\n <th>{{ textWords.vat }}</th>\n </tr>\n </thead>\n <tbody>\n @for (item of invoice().lineItems; track item; let i = $index) {\n <tr>\n <td>{{ i + 1 }}</td>\n <td>{{ item.itemInformation?.description }}</td>\n <td>{{ item.quantity }}</td>\n <td>{{ item.unitCode }}</td>\n <td class=\"currency-table-cell\">{{ item.priceDetails?.netPrice | currency: invoice().currencyCode }}</td>\n <td class=\"currency-table-cell\">{{ item.netAmount | currency: invoice().currencyCode }}</td>\n <td class=\"currency-table-cell\">{{ item.vatInformation[0]?.vatRate | percent: '1.0-2' }}</td>\n </tr>\n }\n </tbody>\n </table>\n\n <div class=\"addition-info\">\n <section class=\"invoice-totals\">\n <h2 class=\"info-title\">{{ textWords.totalsTopic }}</h2>\n\n @if (invoice().totals?.totalNet) {\n <p>\n <strong>{{ textWords.totalsTotalNet }}: </strong>\n <span>{{ invoice().totals?.totalNet | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalAllowances) {\n <p>\n <strong>{{ textWords.totalsTotalAllowances }}: </strong>\n <span> {{ invoice().totals?.totalAllowances | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalCharges) {\n <p>\n <strong>{{ textWords.totalsTotalCharges }}: </strong>\n <span> {{ invoice().totals?.totalCharges | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalAfterDeductions) {\n <p>\n <strong>{{ textWords.totalsTotalAfterDeductions }}: </strong>\n <span>{{ invoice().totals?.totalAfterDeductions | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalVatAmount) {\n <p>\n <strong>{{ textWords.totalsTotalVatAmount }}: </strong>\n <span>{{ invoice().totals?.totalVatAmount | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalGross) {\n <p>\n <strong>{{ textWords.totalsTotalGross }}: </strong>\n <span> {{ invoice().totals?.totalGross | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.alreadyPaidTotal) {\n <p>\n <strong>{{ textWords.totalsAlreadyPaidTotal }}: </strong>\n <span>{{ invoice().totals?.alreadyPaidTotal | currency: invoice().currencyCode }}</span>\n </p>\n }\n @if (invoice().totals?.totalToBePaid) {\n <p class=\"total\">\n <strong>{{ textWords.totalsTotalToBePaid }}: </strong>\n <strong> {{ invoice().totals?.totalToBePaid | currency: invoice().currencyCode }}</strong>\n </p>\n }\n </section>\n <section class=\"taxes\">\n <h2 class=\"info-title\">{{ textWords.taxesHeading }}</h2>\n <table class=\"tax-report-table\">\n <thead>\n <tr>\n <th>{{ textWords.vat }}</th>\n <th>{{ textWords.totalsTotalNet }}</th>\n <th>{{ textWords.totalsTotalVatAmount }}</th>\n </tr>\n </thead>\n <tbody>\n @for (tax of invoice().vatBreakdown; track tax.taxRate) {\n <tr>\n <td class=\"currency-table-cell\">\n @if (tax.taxRate) {\n <span>{{ tax.taxRate | percent: '1.0-2' }}</span>\n }\n </td>\n <td class=\"currency-table-cell\">\n @if (tax.netTaxableAmount) {\n <span>{{ tax.netTaxableAmount | currency: invoice().currencyCode }}</span>\n }\n </td>\n <td class=\"currency-table-cell\">\n @if (tax.vatAmount) {\n <span>{{ tax.vatAmount | currency: invoice().currencyCode }}</span>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n </section>\n\n <section class=\"payment-instructions\">\n <h2 class=\"info-title\">{{ textWords.instructionsTopic }}</h2>\n @if (invoice().paymentInstructions?.description) {\n <p>{{ invoice().paymentInstructions?.description }}</p>\n }\n @for (means of invoice().paymentInstructions?.paymentMeans; track means) {\n <div>\n @if (means.accountIdentifier) {\n <p>\n <strong>{{ textWords.instructionsAccountIdentifier }}: </strong>\n <span>{{ means.accountIdentifier }}</span>\n </p>\n }\n @if (means.accountName) {\n <p>\n <strong>{{ textWords.instructionsAccountName }}: </strong>\n <span>{{ means.accountName }}</span>\n </p>\n }\n @if (means.serviceProviderIdentifier) {\n <p>\n <strong>{{ textWords.instructionsServiceProviderIdentifier }}: </strong>\n <span>{{ means.serviceProviderIdentifier }}</span>\n </p>\n }\n </div>\n }\n </section>\n </div>\n\n <section class=\"invoice-notes\">\n <h2>{{ textWords.notesTopic }}</h2>\n @for (note of invoice().invoiceNotes; track note) {\n <div>\n @if (note?.shortText) {\n <p>\n <strong>{{ note?.shortText }}</strong>\n </p>\n }\n @if (note?.longText) {\n <p>{{ note?.longText }}</p>\n }\n </div>\n }\n </section>\n @if (invoice().documents?.length) {\n <section class=\"invoice-attachments\">\n <ava-invoice-documents [documents]=\"invoice().documents\"></ava-invoice-documents>\n </section>\n }\n </div>\n}\n", styles: [".invoice-container{width:100%;max-width:800px;margin:auto;font-family:Arial,sans-serif;line-height:1.5}.invoice-header{display:flex;justify-content:space-between;margin-bottom:20px}.invoice-header .header{height:32px}.invoice-header .header-title{background:var(--color-primary);color:#fff;text-align:center}.seller-info,.buyer-info,.invoice-details{width:30%}.seller-info,.invoice-delivery,.payment-instructions{text-align:right}.currency-table-cell{text-align:right!important}.invoice-title{font-size:48px;margin:20px 0}.invoice-references,.invoice-totals,.payment-instructions,.invoice-notes,.taxes,.invoice-delivery{margin:20px 0}.invoice-table{width:100%;border-collapse:collapse;margin:20px 0}.invoice-table th,.invoice-table td{border:1px solid #000;padding:8px;text-align:left}.invoice-table th{background-color:var(--color-primary)}.invoice-totals p,.payment-instructions p,.invoice-notes p{margin:5px 0}h2{font-size:18px;margin-bottom:10px}.addition-info{display:flex;justify-content:space-between;gap:10px}.total{background-color:var(--color-primary);color:#fff;padding:5px;border-radius:5px}th{color:#fff;text-wrap:nowrap}.invoice-attachments{padding-bottom:15px}.invoice-info{display:flex;justify-content:space-between;margin-bottom:20px}.info-title{border-bottom:2px solid var(--color-primary);text-align:center}.tax-report-table{width:100%;border-collapse:collapse;margin-top:10px}.tax-report-table th,.tax-report-table td{padding:12px;text-align:center;border:1px solid #ddd}.tax-report-table th{background-color:var(--color-primary);color:#fff;font-weight:700;border:1px solid #000}.tax-report-table td{font-size:14px;color:#333;border:1px solid #000}\n"] }]
|
|
2263
|
+
}], ctorParameters: () => [{ type: ConfigurationInvoiceService }], propDecorators: { config: [{
|
|
2264
|
+
type: Input
|
|
2265
|
+
}] } });
|
|
2266
|
+
|
|
2050
2267
|
/*
|
|
2051
2268
|
* Public API Surface of angular-ava
|
|
2052
2269
|
*/
|