@colijnit/transaction 12.1.78 → 12.1.79
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/package.json +1 -1
- package/projects/transaction/package.json +1 -1
- package/projects/transaction/src/lib/component/transaction/style/_layout.scss +4 -4
- package/projects/transaction/src/lib/component/transaction/style/material.scss +0 -1
- package/projects/transaction/src/lib/component/transaction/transaction.component.ts +5 -4
- package/projects/transaction/src/lib/component/transaction/transaction.module.ts +29 -31
- package/projects/transaction/src/lib/component/transaction-line/transaction-order-delivery-line/service/transaction-order-delivery.service.ts +0 -59
- package/projects/transaction/src/lib/component/transaction-line/transaction-order-delivery-line/transaction-order-delivery-line.component.ts +6 -50
- package/projects/transaction/src/lib/component/transaction-line-statusbar/transaction-line-statusbar.component.ts +0 -2
- package/projects/transaction/src/lib/component/transaction-quick-access/transaction-quick-access-order-delivery/transaction-quick-access-order-delivery.component.ts +10 -60
- package/projects/transaction/src/lib/component/transaction-quick-access/transaction-quick-access-order-delivery/transaction-quick-access-order-delivery.module.ts +8 -10
- package/projects/transaction/src/lib/model/extended-transaction-line-view-model.ts +0 -1
- package/projects/transaction/src/lib/service/transaction-connector-adapter.service.ts +0 -63
- package/projects/transaction/src/lib/service/transaction-connector.service.ts +0 -25
- package/projects/transaction/src/lib/service/transaction-initializer.service.ts +1 -1
- package/projects/transaction/src/lib/service/transaction-mapping.service.ts +0 -27
- package/projects/transaction/src/lib/service/transaction.service.ts +0 -33
- package/src/app/app.component.ts +7 -2
- package/projects/transaction/src/lib/component/transaction-card/transaction-card/style/_layout.scss +0 -12
- package/projects/transaction/src/lib/component/transaction-card/transaction-card/style/_material-definition.scss +0 -0
- package/projects/transaction/src/lib/component/transaction-card/transaction-card/style/_theme.scss +0 -4
- package/projects/transaction/src/lib/component/transaction-card/transaction-card/style/material.scss +0 -7
- package/projects/transaction/src/lib/component/transaction-card/transaction-card/transaction-card.component.ts +0 -125
- package/projects/transaction/src/lib/component/transaction-card/transaction-card/transaction-card.module.ts +0 -28
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-footer/style/_layout.scss +0 -25
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-footer/style/_material-definition.scss +0 -0
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-footer/style/_theme.scss +0 -4
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-footer/style/material.scss +0 -4
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-footer/transaction-card-footer.component.ts +0 -59
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-footer/transaction-card-footer.module.ts +0 -24
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-header/style/_layout.scss +0 -66
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-header/style/_material-definition.scss +0 -0
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-header/style/_theme.scss +0 -4
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-header/style/material.scss +0 -4
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-header/transaction-card-header.component.ts +0 -68
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-header/transaction-card-header.module.ts +0 -31
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-purchase-overview/style/_layout.scss +0 -67
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-purchase-overview/style/_material-definition.scss +0 -0
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-purchase-overview/style/_theme.scss +0 -4
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-purchase-overview/style/material.scss +0 -4
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-purchase-overview/transaction-card-purchase-overview.component.ts +0 -64
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-purchase-overview/transaction-card-purchase-overview.module.ts +0 -44
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-sales-overview/style/_layout.scss +0 -4
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-sales-overview/style/_material-definition.scss +0 -0
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-sales-overview/style/_theme.scss +0 -4
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-sales-overview/style/material.scss +0 -4
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-sales-overview/transaction-card-sales-overview.component.ts +0 -21
- package/projects/transaction/src/lib/component/transaction-card/transaction-card-sales-overview/transaction-card-sales-overview.module.ts +0 -18
|
@@ -37,12 +37,6 @@ import {TransactionQuickAccessGoodsAllocationComponent} from "../component/trans
|
|
|
37
37
|
import {
|
|
38
38
|
TransactionQuickAccessPurchaseOrderOverviewComponent
|
|
39
39
|
} from "../component/transaction-quick-access/transaction-quick-access-purchase-order-overview/transaction-quick-access-purchase-order-overview.component";
|
|
40
|
-
import {
|
|
41
|
-
TransactionCardSalesOverviewComponent
|
|
42
|
-
} from "../component/transaction-card/transaction-card-sales-overview/transaction-card-sales-overview.component";
|
|
43
|
-
import {
|
|
44
|
-
TransactionCardPurchaseOverviewComponent
|
|
45
|
-
} from "../component/transaction-card/transaction-card-purchase-overview/transaction-card-purchase-overview.component";
|
|
46
40
|
|
|
47
41
|
@Injectable({
|
|
48
42
|
providedIn: "root"
|
|
@@ -98,12 +92,6 @@ export class TransactionMappingService {
|
|
|
98
92
|
[{type: TransactionKind.PurchaseOrder, category: TransactionTypeCategory.PurchaseOrderReceivedGoods}, TransactionReceiveGoodsLineComponent],
|
|
99
93
|
]);
|
|
100
94
|
|
|
101
|
-
private readonly _transactionCardComponent: Map<{type: TransactionKind, category: TransactionTypeCategory}, Type<TransactionLinesLineBaseComponent>> =
|
|
102
|
-
new Map<{type: TransactionKind; category: TransactionTypeCategory}, Type<TransactionLinesLineBaseComponent>>([
|
|
103
|
-
[{type: TransactionKind.SalesOrder, category: TransactionTypeCategory.SalesOrderOverview}, TransactionCardSalesOverviewComponent],
|
|
104
|
-
[{type: TransactionKind.PurchaseOrder, category: TransactionTypeCategory.PurchaseOrderOverview}, TransactionCardPurchaseOverviewComponent],
|
|
105
|
-
]);
|
|
106
|
-
|
|
107
95
|
private readonly _transactionFilterComponent: Map<{type: TransactionKind}, Type<TransactionFilterBaseComponent>> =
|
|
108
96
|
new Map<{type: TransactionKind}, Type<TransactionFilterBaseComponent>>([
|
|
109
97
|
[{type: TransactionKind.SalesOrder}, TransactionSalesOrderFilterComponent],
|
|
@@ -174,21 +162,6 @@ export class TransactionMappingService {
|
|
|
174
162
|
return entry;
|
|
175
163
|
}
|
|
176
164
|
|
|
177
|
-
public getTransactionCardComponent(type: TransactionKind, category: TransactionTypeCategory): Type<TransactionLinesLineBaseComponent> {
|
|
178
|
-
const key: {type: TransactionKind, category: TransactionTypeCategory} = {
|
|
179
|
-
type: type,
|
|
180
|
-
category: category
|
|
181
|
-
}
|
|
182
|
-
let entry: Type<TransactionLinesLineBaseComponent>;
|
|
183
|
-
this._transactionCardComponent.forEach((v, t) => {
|
|
184
|
-
if (t.type === key.type && t.category === key.category) {
|
|
185
|
-
entry = v;
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
})
|
|
189
|
-
return entry;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
165
|
public getTransactionFilterComponent(type: TransactionKind): Type<TransactionFilterBaseComponent> {
|
|
193
166
|
const key: {type: TransactionKind} = {
|
|
194
167
|
type: type}
|
|
@@ -65,9 +65,6 @@ import {CreateTransactionRequest} from "@colijnit/transactionapi/build/model/cre
|
|
|
65
65
|
import {RelationKind} from "@colijnit/articleapi/build/enum/relation-kind.enum";
|
|
66
66
|
import {PurchaseAdviceLine} from "@colijnit/transactionapi/build/model/purchase-advice-line.bo";
|
|
67
67
|
import {PurchaseAdviceFilters} from "@colijnit/transactionapi/build/model/purchase-advice-filters";
|
|
68
|
-
import {EmailDeliveryNoteRequest} from "@colijnit/transactionapi/build/model/email-delivery-note-request";
|
|
69
|
-
import {PdfDeliveryNoteRequest} from "@colijnit/transactionapi/build/model/pdf-delivery-note-request";
|
|
70
|
-
import {PrintDeliveryNoteRequest} from "@colijnit/transactionapi/build/model/print-delivery-note-request";
|
|
71
68
|
import {TransactionTypeCategory} from "../enum/transaction-type-category.enum";
|
|
72
69
|
|
|
73
70
|
type CreateTransactionFn = (request: CreateSalesOrderRequest | CreatePurchaseOrderRequest) => Promise<boolean>;
|
|
@@ -803,36 +800,6 @@ export class TransactionService extends PendingReasonService {
|
|
|
803
800
|
private _lockTransaction(transId: number, version: number): Promise<TransactionLockResult> {
|
|
804
801
|
return this.connector.lockTransactionById(transId, version);
|
|
805
802
|
}
|
|
806
|
-
public async emailDeliveryNote(emailDeliveryNoteRequest: EmailDeliveryNoteRequest): Promise<boolean> {
|
|
807
|
-
return await this.connector.emailDeliveryNote(emailDeliveryNoteRequest);
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
public async pdfDeliveryNote(pdfDeliveryNoteRequest: PdfDeliveryNoteRequest): Promise<boolean> {
|
|
811
|
-
return await this.connector.pdfDeliveryNote(pdfDeliveryNoteRequest);
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
public async printDeliveryNote(printDeliveryNoteRequest: PrintDeliveryNoteRequest): Promise<boolean> {
|
|
815
|
-
return await this.connector.printDeliveryNote(printDeliveryNoteRequest);
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
public async getDeliveryNoteDefaultSendMethod(relationId: number): Promise<number> {
|
|
819
|
-
return await this.connector.getDeliveryNoteDefaultSendMethod(relationId);
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
public async getDeliveryNoteEmailLayouts(transactionUUID: string): Promise<ReportLayoutSelectionEmail[]> {
|
|
823
|
-
return await this.connector.getDeliveryNoteEmailLayouts(transactionUUID);
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
public async getDeliveryNotePrintLayouts(transactionUUID: string): Promise<ReportLayoutSelectionPrint[]> {
|
|
827
|
-
return await this.connector.getDeliveryNotePrintLayouts(transactionUUID);
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
// private _cleanRelationBeforeSave(): void {
|
|
832
|
-
// ArrayUtils.RemoveElementsByFilter(this.currentTransaction.transactionInfo.relation.contactOptions, ((item: ContactOption) => {
|
|
833
|
-
// return isNill(item.value);
|
|
834
|
-
// }));
|
|
835
|
-
// }
|
|
836
803
|
|
|
837
804
|
private async _checkAndCreateTransaction(): Promise<void> {
|
|
838
805
|
if (!this.currentTransaction || !this.currentTransaction.transactionInfo || !this.currentTransaction.transactionInfo.transactionNr) {
|
package/src/app/app.component.ts
CHANGED
|
@@ -18,6 +18,7 @@ import {TransactionInfoResponse} from "@colijnit/transactionapi/build/model/tran
|
|
|
18
18
|
<button (click)="openCheckoutClick()">Open checkout</button>
|
|
19
19
|
<button (click)="closeCheckoutClick()">Close checkout</button>
|
|
20
20
|
<button (click)="addIPadAirClick()">Add ipadair</button>
|
|
21
|
+
<button (click)="addIPad3Click()">Add ipad3</button>
|
|
21
22
|
<button (click)="addWhiskeyClick()">Add whiskey</button>
|
|
22
23
|
<button (click)="addArticleClick()">Add Article</button>
|
|
23
24
|
<button (click)="addArticle2Click()">Add Article2</button>
|
|
@@ -66,7 +67,7 @@ import {TransactionInfoResponse} from "@colijnit/transactionapi/build/model/tran
|
|
|
66
67
|
111666 // empty created order
|
|
67
68
|
111667 // empty created order
|
|
68
69
|
-->
|
|
69
|
-
<app-transaction [transactionId]="
|
|
70
|
+
<app-transaction [transactionId]="103850">
|
|
70
71
|
</app-transaction>
|
|
71
72
|
</div>
|
|
72
73
|
|
|
@@ -76,7 +77,7 @@ import {TransactionInfoResponse} from "@colijnit/transactionapi/build/model/tran
|
|
|
76
77
|
110004
|
|
77
78
|
111677 empty created purchase order
|
|
78
79
|
-->
|
|
79
|
-
<co-transaction [transactionId]="
|
|
80
|
+
<co-transaction [transactionId]="111542">
|
|
80
81
|
</co-transaction>
|
|
81
82
|
</div>
|
|
82
83
|
|
|
@@ -189,6 +190,10 @@ export class AppComponent {
|
|
|
189
190
|
this._service.addArticle('ipadair');
|
|
190
191
|
}
|
|
191
192
|
|
|
193
|
+
public addIPad3Click(): void {
|
|
194
|
+
this._service.addArticle('1000113870');
|
|
195
|
+
}
|
|
196
|
+
|
|
192
197
|
public addWhiskeyClick(): void {
|
|
193
198
|
this._service.addArticle('1000567766');
|
|
194
199
|
}
|
|
File without changes
|
package/projects/transaction/src/lib/component/transaction-card/transaction-card/style/material.scss
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
@import "./_material-definition";
|
|
2
|
-
@import "./_layout";
|
|
3
|
-
@import "./_theme";
|
|
4
|
-
@import "../../transaction-card-footer/style/material";
|
|
5
|
-
@import "../../transaction-card-header/style/material";
|
|
6
|
-
@import "../../transaction-card-purchase-overview/style/material";
|
|
7
|
-
@import "../../transaction-card-sales-overview/style/material";
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ApplicationRef,
|
|
3
|
-
Component, ComponentFactoryResolver,
|
|
4
|
-
ElementRef, EmbeddedViewRef, EventEmitter,
|
|
5
|
-
HostBinding, Injector,
|
|
6
|
-
Input,
|
|
7
|
-
OnChanges,
|
|
8
|
-
Output, SimpleChanges, Type,
|
|
9
|
-
ViewChild,
|
|
10
|
-
ViewEncapsulation
|
|
11
|
-
} from "@angular/core";
|
|
12
|
-
import {TransactionKind} from "@colijnit/transactionapi/build/enum/transaction-kind.enum";
|
|
13
|
-
import {TransactionTypeCategory} from "../../../enum/transaction-type-category.enum";
|
|
14
|
-
import {TransactionLineInfo} from "@colijnit/transactionapi/build/model/transaction-line-info.bo";
|
|
15
|
-
import {ExtendedTransactionLineViewModel} from "../../../model/extended-transaction-line-view-model";
|
|
16
|
-
import {TransactionMappingService} from "../../../service/transaction-mapping.service";
|
|
17
|
-
import {TransactionLinesLineBaseComponent} from "../../core/base/transaction-lines-line-base.component";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
@Component({
|
|
21
|
-
selector: "co-transaction-card",
|
|
22
|
-
template: `
|
|
23
|
-
<div #transactionCard observeVisibility (visible)="lineVisible.next()"></div>
|
|
24
|
-
`,
|
|
25
|
-
encapsulation: ViewEncapsulation.None
|
|
26
|
-
})
|
|
27
|
-
export class TransactionCardComponent implements OnChanges {
|
|
28
|
-
@ViewChild('transactionCard', { read: ElementRef }) set container(content) {
|
|
29
|
-
if (content) {
|
|
30
|
-
this._transactionCardContainer = content;
|
|
31
|
-
this._prepareContent();
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@Input()
|
|
36
|
-
public set transactionType(value: TransactionKind) {
|
|
37
|
-
this._transactionType = value;
|
|
38
|
-
this._prepareContent();
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
public get transactionType(): TransactionKind {
|
|
42
|
-
return this._transactionType;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@Input()
|
|
46
|
-
public set activeCategory(value: TransactionTypeCategory) {
|
|
47
|
-
this._activeCategory = value;
|
|
48
|
-
this._prepareContent();
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
public get activeCategory(): TransactionTypeCategory {
|
|
52
|
-
return this._activeCategory;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@Input()
|
|
56
|
-
public selected: boolean;
|
|
57
|
-
|
|
58
|
-
@Input()
|
|
59
|
-
public line: TransactionLineInfo | ExtendedTransactionLineViewModel;
|
|
60
|
-
|
|
61
|
-
@Output()
|
|
62
|
-
public lineVisible: EventEmitter<void> = new EventEmitter<void>();
|
|
63
|
-
|
|
64
|
-
@HostBinding("class.co-transaction-card")
|
|
65
|
-
public showClass() {
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
private _transactionCardContainer: ElementRef;
|
|
70
|
-
private _transactionType: TransactionKind;
|
|
71
|
-
private _activeCategory: TransactionTypeCategory;
|
|
72
|
-
private _componentRef: any;
|
|
73
|
-
|
|
74
|
-
constructor(
|
|
75
|
-
private _mappingService: TransactionMappingService,
|
|
76
|
-
private _compFactoryResolver: ComponentFactoryResolver,
|
|
77
|
-
private appRef: ApplicationRef,
|
|
78
|
-
private injector: Injector
|
|
79
|
-
) { }
|
|
80
|
-
|
|
81
|
-
ngOnChanges(changes: SimpleChanges) {
|
|
82
|
-
this._prepareProps();
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
private _prepareContent(): void {
|
|
86
|
-
if (!this._transactionType || !this._activeCategory || !this._transactionCardContainer) {
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
const componentClass: Type<TransactionLinesLineBaseComponent> = this._mappingService.getTransactionCardComponent(this._transactionType, this._activeCategory);
|
|
90
|
-
|
|
91
|
-
if (this._componentRef) {
|
|
92
|
-
this._componentRef.destroy();
|
|
93
|
-
}
|
|
94
|
-
if (!componentClass) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
this._componentRef = this._compFactoryResolver
|
|
99
|
-
.resolveComponentFactory(componentClass)
|
|
100
|
-
.create(this.injector);
|
|
101
|
-
|
|
102
|
-
this.appRef.attachView(this._componentRef.hostView);
|
|
103
|
-
|
|
104
|
-
this._prepareProps();
|
|
105
|
-
|
|
106
|
-
const domElem = (this._componentRef.hostView as EmbeddedViewRef<any>)
|
|
107
|
-
.rootNodes[0] as HTMLElement;
|
|
108
|
-
|
|
109
|
-
this._transactionCardContainer.nativeElement.appendChild(domElem);
|
|
110
|
-
this._componentRef.onDestroy(() => {
|
|
111
|
-
this.appRef.detachView(this._componentRef.hostView);
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
private _prepareProps(): void {
|
|
116
|
-
if (this._componentRef) {
|
|
117
|
-
this._componentRef.instance.selected = this.selected;
|
|
118
|
-
this._componentRef.instance.line = this.line;
|
|
119
|
-
this._componentRef.instance.activeCategory = this.activeCategory;
|
|
120
|
-
this._componentRef.instance.lineVisible = this.lineVisible;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import {NgModule} from "@angular/core";
|
|
2
|
-
import {CommonModule} from "@angular/common";
|
|
3
|
-
import {TransactionCardComponent} from "./transaction-card.component";
|
|
4
|
-
import {ObserveVisibilityModule} from "@colijnit/corecomponents_v12";
|
|
5
|
-
import {
|
|
6
|
-
TransactionCardPurchaseOverviewModule
|
|
7
|
-
} from "../transaction-card-purchase-overview/transaction-card-purchase-overview.module";
|
|
8
|
-
import {
|
|
9
|
-
TransactionCardSalesOverviewModule
|
|
10
|
-
} from "../transaction-card-sales-overview/transaction-card-sales-overview.module";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
@NgModule({
|
|
14
|
-
imports: [
|
|
15
|
-
CommonModule,
|
|
16
|
-
ObserveVisibilityModule,
|
|
17
|
-
TransactionCardPurchaseOverviewModule,
|
|
18
|
-
TransactionCardSalesOverviewModule
|
|
19
|
-
],
|
|
20
|
-
declarations: [
|
|
21
|
-
TransactionCardComponent
|
|
22
|
-
],
|
|
23
|
-
exports: [
|
|
24
|
-
TransactionCardComponent
|
|
25
|
-
]
|
|
26
|
-
})
|
|
27
|
-
export class TransactionCardModule {
|
|
28
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
@include export-module('cc-transaction-card-footer-layout') {
|
|
2
|
-
.co-transaction-card-footer {
|
|
3
|
-
|
|
4
|
-
.transaction-card-footer-wrapper {
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
justify-content: space-between;
|
|
8
|
-
margin-top: 5px;
|
|
9
|
-
|
|
10
|
-
.expand-wrapper {
|
|
11
|
-
display: flex;
|
|
12
|
-
align-items: center;
|
|
13
|
-
co-icon {
|
|
14
|
-
width: 18px;
|
|
15
|
-
height: 18px;
|
|
16
|
-
margin-right: 15px;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.co-transaction-line-statusbar co-statusbar .co-statusbar-wrapper {
|
|
21
|
-
justify-content: center;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
File without changes
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import {Component, EventEmitter, HostBinding, Input, Output, ViewEncapsulation} from "@angular/core";
|
|
2
|
-
import {TransactionLineInfo} from "@colijnit/transactionapi/build/model/transaction-line-info.bo";
|
|
3
|
-
import {TransactionService} from "../../../service/transaction.service";
|
|
4
|
-
import {TransactionTypeCategory} from "../../../enum/transaction-type-category.enum";
|
|
5
|
-
import {Icon} from "../../../enum/icon.enum";
|
|
6
|
-
import {IconCacheService} from "../../../service/icon-cache.service";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: "co-transaction-card-footer",
|
|
11
|
-
template: `
|
|
12
|
-
<div class="transaction-card-footer-wrapper">
|
|
13
|
-
<div class="expand-wrapper" (click)="expandClicked.next()">
|
|
14
|
-
<co-icon [iconData]="expanded ? iconCacheService.getIcon(icons.TriangleUp) : iconCacheService.getIcon(icons.TriangleDown) "></co-icon>
|
|
15
|
-
<span class="expand-text" [textContent]="!expanded ? ('SHOW_MORE' | localize) : ('SHOW_LESS' | localize)"></span>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="date-or-delivery-method-container">
|
|
18
|
-
<span class="transaction-card-date" *ngIf="expanded" [textContent]="transactionLine.deliveryDate | date : 'd-MM-yyyy'"></span>
|
|
19
|
-
<div *ngIf="!expanded" class="delivery-method-preview">
|
|
20
|
-
<span [textContent]="transactionLine.deliveryMethodDescription"></span>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
<co-transaction-line-statusbar
|
|
24
|
-
class="status-bar-wrapper"
|
|
25
|
-
[transaction]="transactionLine"
|
|
26
|
-
[transactionKind]="transactionService.currentTransaction.transactionInfo.transactionKind"
|
|
27
|
-
[transactionTypeCategory]="transactionTypeCategory"
|
|
28
|
-
></co-transaction-line-statusbar>
|
|
29
|
-
</div>
|
|
30
|
-
`,
|
|
31
|
-
encapsulation: ViewEncapsulation.None
|
|
32
|
-
})
|
|
33
|
-
export class TransactionCardFooterComponent {
|
|
34
|
-
public readonly icons: typeof Icon = Icon;
|
|
35
|
-
|
|
36
|
-
@Input()
|
|
37
|
-
public transactionLine: TransactionLineInfo;
|
|
38
|
-
|
|
39
|
-
@Input()
|
|
40
|
-
public transactionTypeCategory: TransactionTypeCategory;
|
|
41
|
-
|
|
42
|
-
@Input()
|
|
43
|
-
public expanded: boolean = false;
|
|
44
|
-
|
|
45
|
-
@Output()
|
|
46
|
-
public expandClicked: EventEmitter<void> = new EventEmitter<void>();
|
|
47
|
-
|
|
48
|
-
@HostBinding("class.co-transaction-card-footer")
|
|
49
|
-
public showClass() {
|
|
50
|
-
return true;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
constructor(
|
|
54
|
-
public iconCacheService: IconCacheService,
|
|
55
|
-
public transactionService: TransactionService
|
|
56
|
-
) { }
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import {NgModule} from "@angular/core";
|
|
2
|
-
import {CommonModule} from "@angular/common";
|
|
3
|
-
import {TransactionCardFooterComponent} from "./transaction-card-footer.component";
|
|
4
|
-
import {IconModule} from "@colijnit/corecomponents_v12";
|
|
5
|
-
import {PipeModule} from "../../../pipe/pipe.module";
|
|
6
|
-
import {TransactionLineStatusbarModule} from "../../transaction-line-statusbar/transaction-line-statusbar.module";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@NgModule({
|
|
10
|
-
imports: [
|
|
11
|
-
CommonModule,
|
|
12
|
-
IconModule,
|
|
13
|
-
PipeModule,
|
|
14
|
-
TransactionLineStatusbarModule
|
|
15
|
-
],
|
|
16
|
-
declarations: [
|
|
17
|
-
TransactionCardFooterComponent
|
|
18
|
-
],
|
|
19
|
-
exports: [
|
|
20
|
-
TransactionCardFooterComponent
|
|
21
|
-
]
|
|
22
|
-
})
|
|
23
|
-
export class TransactionCardFooterModule {
|
|
24
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
@include export-module('cc-transaction-card-header-layout') {
|
|
2
|
-
.co-transaction-card-header {
|
|
3
|
-
display: flex;
|
|
4
|
-
justify-content: space-between;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
|
|
7
|
-
.transaction-card-header-wrapper {
|
|
8
|
-
display: flex;
|
|
9
|
-
height: 30px;
|
|
10
|
-
column-gap: 10px;
|
|
11
|
-
justify-content: space-between;
|
|
12
|
-
align-items: center;
|
|
13
|
-
margin-bottom: 5px;
|
|
14
|
-
|
|
15
|
-
.card-header-start-wrapper {
|
|
16
|
-
display: flex;
|
|
17
|
-
height: inherit;
|
|
18
|
-
width: auto;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.card-header-end-wrapper {
|
|
22
|
-
display: flex;
|
|
23
|
-
height: inherit;
|
|
24
|
-
grid-column-gap: 10px;
|
|
25
|
-
column-gap: 10px;
|
|
26
|
-
justify-content: space-between;
|
|
27
|
-
align-items: center;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.co-image-display {
|
|
31
|
-
width: inherit;
|
|
32
|
-
height: inherit;
|
|
33
|
-
max-width: 70px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.transaction-card-header-title-wrapper {
|
|
37
|
-
display: flex;
|
|
38
|
-
align-items: center;
|
|
39
|
-
column-gap: 10px;
|
|
40
|
-
|
|
41
|
-
co-icon {
|
|
42
|
-
width: 18px;
|
|
43
|
-
height: 18px;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.transaction-card-description {
|
|
48
|
-
font-weight: bold;
|
|
49
|
-
co-input-text {
|
|
50
|
-
height: auto;
|
|
51
|
-
input {
|
|
52
|
-
margin-top: 0;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.transaction-card-expanded-wrapper {
|
|
59
|
-
|
|
60
|
-
.article-text {
|
|
61
|
-
margin-bottom: 12px;
|
|
62
|
-
max-width: 70%;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
File without changes
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import {Component, EventEmitter, HostBinding, Input, ViewEncapsulation} from "@angular/core";
|
|
2
|
-
import {TransactionLineInfo} from "@colijnit/transactionapi/build/model/transaction-line-info.bo";
|
|
3
|
-
import {IconCacheService} from "../../../service/icon-cache.service";
|
|
4
|
-
import {Icon} from "../../../enum/icon.enum";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
selector: "co-transaction-card-header",
|
|
9
|
-
template: `
|
|
10
|
-
<div class="transaction-card-header-wrapper">
|
|
11
|
-
<div class="card-header-start-wrapper">
|
|
12
|
-
<co-input-checkbox *ngIf="showCheckbox"></co-input-checkbox>
|
|
13
|
-
<co-image-display *ngIf="!showCheckbox && !expanded"></co-image-display>
|
|
14
|
-
<div class="transaction-card-header-title-wrapper">
|
|
15
|
-
<co-transaction-line-description class="transaction-card-description"
|
|
16
|
-
[transactionLine]="transactionLine"
|
|
17
|
-
[defaultEditMode]="false"
|
|
18
|
-
[showLabel]="false"
|
|
19
|
-
></co-transaction-line-description>
|
|
20
|
-
<co-icon class="delete-icon" [iconData]="iconCacheService.getIcon(icons.TrashCanLight)"
|
|
21
|
-
(click)="deleteTransactionLineClick()"></co-icon>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
<div class="card-header-end-wrapper">
|
|
25
|
-
<co-image-display *ngIf="expanded"></co-image-display>
|
|
26
|
-
<span class="transaction-card-date" *ngIf="!expanded" [textContent]="transactionLine.deliveryDate | date : 'd-MM-yyyy'"></span>
|
|
27
|
-
<ng-content></ng-content>
|
|
28
|
-
<co-transaction-line-action-buttons *ngIf="showActionButtons"></co-transaction-line-action-buttons>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<div class="transaction-card-expanded-wrapper" *ngIf="expanded">
|
|
33
|
-
<div class="article-text" *ngFor="let text of transactionLine.articleTestAsArray">
|
|
34
|
-
<span [innerHTML]="text | safeHtml"></span>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
`,
|
|
38
|
-
encapsulation: ViewEncapsulation.None
|
|
39
|
-
})
|
|
40
|
-
export class TransactionCardHeaderComponent {
|
|
41
|
-
public readonly icons: typeof Icon = Icon;
|
|
42
|
-
|
|
43
|
-
@Input()
|
|
44
|
-
public transactionLine: TransactionLineInfo
|
|
45
|
-
|
|
46
|
-
@Input()
|
|
47
|
-
public showCheckbox: boolean = false;
|
|
48
|
-
|
|
49
|
-
@Input()
|
|
50
|
-
public showActionButtons: boolean = false;
|
|
51
|
-
|
|
52
|
-
@Input()
|
|
53
|
-
public expanded: boolean = false;
|
|
54
|
-
|
|
55
|
-
@HostBinding("class.co-transaction-card-header")
|
|
56
|
-
public showClass() {
|
|
57
|
-
return true;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
constructor(
|
|
61
|
-
public iconCacheService: IconCacheService,
|
|
62
|
-
) { }
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
public deleteTransactionLineClick(): void {
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import {NgModule} from "@angular/core";
|
|
2
|
-
import {CommonModule} from "@angular/common";
|
|
3
|
-
import {TransactionCardHeaderComponent} from "./transaction-card-header.component";
|
|
4
|
-
import {
|
|
5
|
-
TransactionLineActionButtonsModule
|
|
6
|
-
} from "../../transaction-line-action-buttons/transaction-line-action-buttons.module";
|
|
7
|
-
import {CoreModule} from "../../core/core.module";
|
|
8
|
-
import {TransactionLineDescriptionModule} from "../../transaction-line-fields/transaction-line-description.module";
|
|
9
|
-
import {IconModule, InputCheckboxModule} from "@colijnit/corecomponents_v12";
|
|
10
|
-
import {PipeModule} from "../../../pipe/pipe.module";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
@NgModule({
|
|
14
|
-
imports: [
|
|
15
|
-
CommonModule,
|
|
16
|
-
TransactionLineActionButtonsModule,
|
|
17
|
-
CoreModule,
|
|
18
|
-
TransactionLineDescriptionModule,
|
|
19
|
-
IconModule,
|
|
20
|
-
PipeModule,
|
|
21
|
-
InputCheckboxModule
|
|
22
|
-
],
|
|
23
|
-
declarations: [
|
|
24
|
-
TransactionCardHeaderComponent
|
|
25
|
-
],
|
|
26
|
-
exports: [
|
|
27
|
-
TransactionCardHeaderComponent
|
|
28
|
-
]
|
|
29
|
-
})
|
|
30
|
-
export class TransactionCardHeaderModule {
|
|
31
|
-
}
|