mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
Fix Build Error
This commit is contained in:
@@ -8,11 +8,9 @@ import {
|
||||
} from '@angular/core';
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { VATDTO } from '@swagger/oms';
|
||||
import {
|
||||
VatTypeToDisplayNamePipe,
|
||||
VatDtoToVatValuePipe,
|
||||
VatDtoToVatTypePipe,
|
||||
} from '../../pipes';
|
||||
import { VatTypeToDisplayNamePipe } from '../../pipes/vat-type-to-display-name.pipe';
|
||||
import { VatDtoToVatValuePipe } from '../../pipes/vat-dto-to-vat-value.pipe';
|
||||
import { VatDtoToVatTypePipe } from '../../pipes/vat-dto-to-vat-type.pipe';
|
||||
|
||||
@Component({
|
||||
selector: 'app-shelf-edit-order-item',
|
||||
@@ -35,7 +33,7 @@ export class ShelfEditOrderItemComponent implements OnInit, OnChanges {
|
||||
|
||||
ngOnChanges({ vatOptions }: SimpleChanges) {
|
||||
if (this.shouldSetVatOptions(vatOptions.currentValue)) {
|
||||
this.vatLabelPipe = new VatTypeToDisplayNamePipe(this.vatOptions);
|
||||
this.vatLabelPipe = new VatTypeToDisplayNamePipe();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,5 +7,4 @@ export * from './processing-status.pipe';
|
||||
export * from './shelf-pipes.module';
|
||||
export * from './vat-dto-to-vat-value.pipe';
|
||||
export * from './vat-dto-to-vat-type.pipe';
|
||||
export * from './vat-type-to-display-name.pipe';
|
||||
// end:ng42.barrel
|
||||
|
||||
@@ -13,23 +13,23 @@ import { VatDtoToVatTypePipe } from './vat-dto-to-vat-type.pipe';
|
||||
@NgModule({
|
||||
imports: [CommonModule],
|
||||
exports: [
|
||||
VatTypeToDisplayNamePipe,
|
||||
ProcessingStatusPipe,
|
||||
EnvironmentChannelPipe,
|
||||
GetExtendPickUpOptionsPipe,
|
||||
PickUpDateOptionsToDisplayValuesPipe,
|
||||
CreateImageSourceFromEanPipe,
|
||||
VatDtoToVatValuePipe,
|
||||
VatTypeToDisplayNamePipe,
|
||||
VatDtoToVatTypePipe,
|
||||
],
|
||||
declarations: [
|
||||
VatTypeToDisplayNamePipe,
|
||||
ProcessingStatusPipe,
|
||||
EnvironmentChannelPipe,
|
||||
GetExtendPickUpOptionsPipe,
|
||||
PickUpDateOptionsToDisplayValuesPipe,
|
||||
CreateImageSourceFromEanPipe,
|
||||
VatDtoToVatValuePipe,
|
||||
VatTypeToDisplayNamePipe,
|
||||
VatDtoToVatTypePipe,
|
||||
],
|
||||
providers: [],
|
||||
|
||||
@@ -6,15 +6,9 @@ import { VatDtoToVatValuePipe } from './vat-dto-to-vat-value.pipe';
|
||||
name: 'vatTypeToDisplayName',
|
||||
})
|
||||
export class VatTypeToDisplayNamePipe implements PipeTransform {
|
||||
vatOptions: VATDTO[];
|
||||
|
||||
constructor(vatOptions: VATDTO[]) {
|
||||
this.vatOptions = vatOptions;
|
||||
}
|
||||
|
||||
transform(vatType: number) {
|
||||
transform(vatType: number, vatOptions: VATDTO[]) {
|
||||
const match =
|
||||
this.vatOptions && this.vatOptions.find((vat) => vat.vatType === vatType);
|
||||
vatOptions && vatOptions.find((vat) => vat.vatType === vatType);
|
||||
if (match) {
|
||||
return new VatDtoToVatValuePipe().transform(match);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@ import {
|
||||
ShelfCustomerOrderComponent,
|
||||
ShelfOrderTagComponent,
|
||||
ShelfPartialCollectionModalComponent,
|
||||
OrderItemEditComponent,
|
||||
OrderOverviewEditComponent,
|
||||
} from './components';
|
||||
import { ShelfRoutingModule } from './shelf-routing.module';
|
||||
import { OrderStatusPipe } from '../../pipes/order-status.pipe';
|
||||
@@ -43,6 +45,8 @@ import { ShelfEditCompartmentModule } from './pages/shelf-edit-compartment';
|
||||
ShelfPartialCollectionModalComponent,
|
||||
OrderStatusPipe,
|
||||
OrderLoadingComponent,
|
||||
OrderItemEditComponent,
|
||||
OrderOverviewEditComponent,
|
||||
],
|
||||
exports: [ShelfOrderTagComponent],
|
||||
imports: [
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
</label>
|
||||
|
||||
<span class="selected isa-font-weight-bold">{{
|
||||
labelPipe ? labelPipe.transform(value) : value
|
||||
labelPipe ? labelPipe.transform(value, options) : value
|
||||
}}</span>
|
||||
<lib-icon
|
||||
class="isa-accordion-arrow"
|
||||
|
||||
@@ -23,7 +23,7 @@ import { UiDropdownComponent } from '@isa-ui/dropdown';
|
||||
],
|
||||
})
|
||||
export class UiSelectInputComponent implements ControlValueAccessor {
|
||||
@Input() options: string[] = [];
|
||||
@Input() public options: string[] = [];
|
||||
@Input() label = '';
|
||||
@Input() labelPipe: PipeTransform;
|
||||
@Input() optionsPipe: PipeTransform;
|
||||
@@ -48,7 +48,6 @@ export class UiSelectInputComponent implements ControlValueAccessor {
|
||||
? this.valuePipe.transform(selectedOption)
|
||||
: selectedOption;
|
||||
this.onChange(this.value);
|
||||
console.log({ value: this.value });
|
||||
dropdown.close();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user