Merged PR 405: #1222 - WA // Zahlart anzeigen

#1222 - WA // Zahlart anzeigen
This commit is contained in:
Lorenz Hilpert
2020-11-11 10:33:12 +00:00
4 changed files with 58 additions and 77 deletions

View File

@@ -2,30 +2,20 @@
<div class="product-image">
<img
class="thumbnail"
src="https://produktbilder.ihugendubel.de/{{
orderItemListItem?.product.ean
}}.jpg?showDummy=true"
src="https://produktbilder.ihugendubel.de/{{ orderItemListItem?.product.ean }}.jpg?showDummy=true"
alt="item.product.name"
/>
</div>
<div class="product-details isa-flex-fill isa-flex isa-flex-row">
<div class="isa-flex-fill">
<h4 class="product-name">
{{
[
orderItemListItem?.product?.contributors,
orderItemListItem?.product?.name
] | title
}}
{{ [orderItemListItem?.product?.contributors, orderItemListItem?.product?.name] | title }}
</h4>
<h4 class="isa-mb-6 isa-mt-12">Bestellung</h4>
<div class="detail">
<div class="name">Format</div>
<div class="value isa-flex isa-justify-content-center">
<lib-icon
class="isa-mr-5 isa-mt-1"
name="Icon_{{ orderItemListItem?.product?.format }}"
></lib-icon>
<lib-icon class="isa-mr-5 isa-mt-1" name="Icon_{{ orderItemListItem?.product?.format }}"></lib-icon>
<span>{{ orderItemListItem?.product?.formatDetail }}</span>
</div>
</div>
@@ -53,11 +43,7 @@
#quantityDropdown
[value]="orderItemListItem.quantity"
[(ngModel)]="orderItemListItem.quantity"
(ngModelChange)="
quantityChange.emit($event);
quantityDropdown.close();
verifyErrors($event)
"
(ngModelChange)="quantityChange.emit($event); quantityDropdown.close(); verifyErrors($event)"
>
<button
appUiDropdownItem
@@ -68,25 +54,14 @@
>
{{ val }}
</button>
<button
appUiDropdownItem
class="isa-btn isa-text-left isa-p-16"
*ngIf="moreThan10"
(click)="enableInput()"
>
<button appUiDropdownItem class="isa-btn isa-text-left isa-p-16" *ngIf="moreThan10" (click)="enableInput()">
10+
</button>
</app-ui-dropdown>
<input
(blur)="
closeInputQuantity(+quantityInput.value);
quantityDropdown.selectValue(+quantityInput.value)
"
(keyup.enter)="
closeInputQuantity(+quantityInput.value);
quantityDropdown.selectValue(+quantityInput.value)
"
(blur)="closeInputQuantity(+quantityInput.value); quantityDropdown.selectValue(+quantityInput.value)"
(keyup.enter)="closeInputQuantity(+quantityInput.value); quantityDropdown.selectValue(+quantityInput.value)"
class="quantity-input"
[class.hidden]="!inputQuantity"
#quantityInput
@@ -126,9 +101,7 @@
</div>
<div class="detail">
<div class="name">Meldenummer</div>
<div class="value">
{{ orderItemListItem?.ssc }} - {{ orderItemListItem?.sscText }}
</div>
<div class="value">{{ orderItemListItem?.ssc }} - {{ orderItemListItem?.sscText }}</div>
</div>
<div class="detail">
<div class="name">MwSt</div>
@@ -142,14 +115,17 @@
{{ orderItemListItem.paymentProcessing || '-' }}
</div>
</div>
<div class="detail">
<div class="name">Zahlungsart</div>
<div class="value">
{{ orderItemListItem.paymentType | paymentType }}
</div>
</div>
<ng-container *ngIf="orderItemListItem.receipts">
<h4 class="isa-mb-6 isa-mt-20">
{{ orderItemListItem.receipts.length > 1 ? 'Belege' : 'Beleg' }}
</h4>
<div
*ngFor="let receipt of orderItemListItem.receipts"
class="isa-mb-10"
>
<div *ngFor="let receipt of orderItemListItem.receipts" class="isa-mb-10">
<div class="detail">
<div class="name">Belegnummer</div>
<div class="value">
@@ -159,10 +135,7 @@
<div class="detail">
<div class="name">Erstellt am</div>
<div class="value">
{{
(receipt.printedDate | date: 'dd.MM.yy | HH:mm') + ' Uhr' ||
'-'
}}
{{ (receipt.printedDate | date: 'dd.MM.yy | HH:mm') + ' Uhr' || '-' }}
</div>
</div>
<div class="detail">
@@ -179,45 +152,24 @@
</div>
</div>
</ng-container>
<button
class="isa-btn isa-btn-default isa-p-0 isa-flex isa-align-items-center isa-mt-11"
(click)="more = false"
>
<lib-icon
name="Arrow_back"
height="15px"
class="isa-flex isa-mr-5"
></lib-icon>
<button class="isa-btn isa-btn-default isa-p-0 isa-flex isa-align-items-center isa-mt-11" (click)="more = false">
<lib-icon name="Arrow_back" height="15px" class="isa-flex isa-mr-5"></lib-icon>
<strong>Weniger</strong>
</button>
</ng-container>
</div>
<div
class="isa-flex isa-flex-direction-column isa-justify-content-flex-end isa-text-right"
>
<div class="isa-flex isa-flex-direction-column isa-justify-content-flex-end isa-text-right">
<div class="isa-flex-fill"></div>
<div *ngIf="selectable">
<label class="checkbox-wrapper">
<input
type="checkbox"
[ngModel]="selected"
(ngModelChange)="selectedChange($event)"
/>
<input type="checkbox" [ngModel]="selected" (ngModelChange)="selectedChange($event)" />
<span class="checkmark"></span>
</label>
</div>
<div class="isa-flex-fill"></div>
<button
class="isa-btn isa-btn-default isa-p-0 isa-flex isa-align-items-center"
(click)="more = true"
*ngIf="!more"
>
<button class="isa-btn isa-btn-default isa-p-0 isa-flex isa-align-items-center" (click)="more = true" *ngIf="!more">
<strong>Mehr</strong>
<lib-icon
name="Arrow_More"
height="15px"
class="isa-flex isa-ml-5"
></lib-icon>
<lib-icon name="Arrow_More" height="15px" class="isa-flex isa-ml-5"></lib-icon>
</button>
</div>
</div>

View File

@@ -0,0 +1,29 @@
import { Pipe, PipeTransform } from '@angular/core';
const paymentTypeNames = {
0: '',
1: 'bei Abholung',
2: 'Kostenfrei',
4: 'Bar',
8: 'Bankeinzug',
16: 'Einzugsermächtigung',
32: 'EC-Karte',
64: 'Kreditkarte',
128: 'Gegen Rechnung',
256: 'Vorauskasse',
512: 'Gutschein',
1024: 'Sammelrechnung',
2048: 'PayPal',
4069: 'InstantTransfer',
8192: 'PayOnDelivery',
16384: 'BonusCard',
};
@Pipe({
name: 'paymentType',
})
export class PaymentTypePipe implements PipeTransform {
transform(value: any, ...args: any[]): any {
return paymentTypeNames[value] || '-';
}
}

View File

@@ -10,10 +10,7 @@ import { VatDtoToVatValuePipe } from './vat-dto-to-vat-value.pipe';
import { VatTypeToDisplayNamePipe } from './vat-type-to-display-name.pipe';
import { VatDtoToVatTypePipe } from './vat-dto-to-vat-type.pipe';
import { VatTypePipe } from './vat-type.pipe';
import {
ProcessingStatusOptionsPipe,
ProcessingStatusOptionsKeyValuePipe,
} from './processing-status-options.pipe';
import { ProcessingStatusOptionsPipe, ProcessingStatusOptionsKeyValuePipe } from './processing-status-options.pipe';
import { TitlePipe } from './title.pipe';
import { SscToSscTextPipe } from './ssc-text.pipe';
import { ReceiptsToPaymentReceiptsPipe } from './receipts-to-payment-receipts.pipe';
@@ -21,6 +18,7 @@ import { ShowShelfTagsPipe } from './show-shelf-tags.pipe';
import { ShowPartialPickupPipe } from './show-partial-pickup.pipe';
import { ShowCompartmentCodePipe } from './show-compartment-code.pipe';
import { ShelfEditActionInProgressPipe } from './shelf-edit-action-in-progress.pipe';
import { PaymentTypePipe } from './payment-type.pipe';
@NgModule({
imports: [CommonModule],
@@ -43,6 +41,7 @@ import { ShelfEditActionInProgressPipe } from './shelf-edit-action-in-progress.p
ShowPartialPickupPipe,
ShowCompartmentCodePipe,
ShelfEditActionInProgressPipe,
PaymentTypePipe,
],
declarations: [
VatTypeToDisplayNamePipe,
@@ -63,6 +62,7 @@ import { ShelfEditActionInProgressPipe } from './shelf-edit-action-in-progress.p
ShowPartialPickupPipe,
ShowCompartmentCodePipe,
ShelfEditActionInProgressPipe,
PaymentTypePipe,
],
})
export class ShelfPipesModule {}

6
package-lock.json generated
View File

@@ -3262,7 +3262,7 @@
},
"@isa/catsearch-api": {
"version": "0.0.56",
"resolved": "https://pkgs.dev.azure.com/hugendubel/_packaging/hugendubel/npm/registry/@isa/catsearch-api/-/catsearch-api-0.0.56.tgz",
"resolved": "https://pkgs.dev.azure.com/hugendubel/_packaging/hugendubel@Local/npm/registry/@isa/catsearch-api/-/catsearch-api-0.0.56.tgz",
"integrity": "sha1-VQWugpfYeSER3UnIsYOQVtnd5FA=",
"requires": {
"tslib": "^1.9.0"
@@ -3270,7 +3270,7 @@
},
"@isa/print-api": {
"version": "0.0.56",
"resolved": "https://pkgs.dev.azure.com/hugendubel/_packaging/hugendubel/npm/registry/@isa/print-api/-/print-api-0.0.56.tgz",
"resolved": "https://pkgs.dev.azure.com/hugendubel/_packaging/hugendubel@Local/npm/registry/@isa/print-api/-/print-api-0.0.56.tgz",
"integrity": "sha1-8cSMtEczwDnSe/C8piozLDmVYMA=",
"requires": {
"tslib": "^1.9.0"
@@ -3278,7 +3278,7 @@
},
"@isa/remi-api": {
"version": "0.0.56",
"resolved": "https://pkgs.dev.azure.com/hugendubel/_packaging/hugendubel/npm/registry/@isa/remi-api/-/remi-api-0.0.56.tgz",
"resolved": "https://pkgs.dev.azure.com/hugendubel/_packaging/hugendubel@Local/npm/registry/@isa/remi-api/-/remi-api-0.0.56.tgz",
"integrity": "sha1-bQBbsKL7D+j+nrB26qIOaobBjmc=",
"requires": {
"tslib": "^1.9.0"