[HIMA-945] updated library @isa/remission also installed new dependencies libraries @isa/print-api @isa/remi-api @isa/catsearch-api, Updated remission filter model from FilterOptionGroup to FilterOption

This commit is contained in:
Eraldo Hasanaj
2019-11-19 17:08:00 +01:00
parent 3b7946e145
commit 41af4ff656
23 changed files with 606 additions and 316 deletions

View File

@@ -62,7 +62,7 @@ const states = [
SupplierState,
BranchProcessState,
GoodsInState,
RemissionState,
RemissionState
];
export function _configInitializer(conf: ConfigService) {
@@ -106,48 +106,48 @@ export function _feedServiceEndpointProviderFactory(conf: ConfigService) {
NgCircleProgressModule.forRoot({
animation: true,
animationDuration: 300,
clockwise: true,
clockwise: true
}),
RemissionModule.forRoot({ useMock: true }),
RemissionModule.forRoot({ useMock: true })
],
providers: [
{
provide: APP_INITIALIZER,
useFactory: _configInitializer,
multi: true,
deps: [ConfigService],
deps: [ConfigService]
},
{
provide: CAT_SERVICE_ENDPOINT,
useFactory: _catServiceEndpointProviderFactory,
deps: [ConfigService],
deps: [ConfigService]
},
{
provide: CAT_AV_SERVICE_ENDPOINT,
useFactory: _catAvServiceEndpointProviderFactory,
deps: [ConfigService],
deps: [ConfigService]
},
{
provide: FEED_SERVICE_ENDPOINT,
useFactory: _feedServiceEndpointProviderFactory,
deps: [ConfigService],
deps: [ConfigService]
},
{
provide: HTTP_INTERCEPTORS,
useClass: SsoAuthorizationInterceptor,
multi: true,
multi: true
},
{
provide: HTTP_INTERCEPTORS,
useClass: HttpErrorHandlerInterceptor,
multi: true,
multi: true
},
DatePipe,
{
provide: ErrorHandler,
useClass: HimaSalesErrorHandler,
},
useClass: HimaSalesErrorHandler
}
],
bootstrap: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule {}

View File

@@ -1,5 +1,5 @@
import { Component, OnInit, Input, Output, EventEmitter, OnDestroy } from '@angular/core';
import { Filter, FilterOptionGroup, FilterOption, RemissionService } from '@isa/remission';
import { Filter, FilterOption } from '@isa/remission';
import { fadeInAnimation } from '../../animations/fadeIn.animation';
import { growShrinkAnimation } from '../../animations/grow-shrink.animation';
import { RemissionResourceType } from '../../models/remission-resource-type.model';
@@ -15,7 +15,7 @@ import { RemissionHelperService } from '../../services/remission-helper.service'
selector: 'app-remission-filter-item',
templateUrl: './remission-filter-item.component.html',
styleUrls: ['./remission-filter-item.component.scss'],
animations: [fadeInAnimation, growShrinkAnimation],
animations: [fadeInAnimation, growShrinkAnimation]
})
export class RemissionFilterItemComponent implements OnInit, OnDestroy {
@Input() filter: Filter;
@@ -108,7 +108,7 @@ export class RemissionFilterItemComponent implements OnInit, OnDestroy {
}
uncheckGroupOfOption(option: FilterOption) {
const groups = this.filter.options as FilterOptionGroup[];
const groups = this.filter.options as FilterOption[];
groups.forEach(gr => {
const containsOption = gr.options.findIndex(op => op.id === option.id) !== -1;
if (containsOption) {
@@ -126,7 +126,7 @@ export class RemissionFilterItemComponent implements OnInit, OnDestroy {
this.hasGrouping = this.isInstanceOfFilterOpionsGroups(f.options);
}
isInstanceOfFilterOpionsGroups(object: any[]): object is FilterOptionGroup[] {
isInstanceOfFilterOpionsGroups(object: any[]): object is FilterOption[] {
return 'options' in object[0];
}
@@ -240,7 +240,7 @@ export class RemissionFilterItemComponent implements OnInit, OnDestroy {
}
selectGroupOfOptions(group: string) {
const filterGroup = (this.filter.options as FilterOptionGroup[]).find(t => t.name === group);
const filterGroup = (this.filter.options as FilterOption[]).find(t => t.name === group);
const options = filterGroup.options;
let allSelected = true;
options.forEach(op => {
@@ -255,7 +255,7 @@ export class RemissionFilterItemComponent implements OnInit, OnDestroy {
}
selectAllOptionsOfGroup(group: string) {
const filterGroup = (this.filter.options as FilterOptionGroup[]).find(t => t.name === group);
const filterGroup = (this.filter.options as FilterOption[]).find(t => t.name === group);
const options = filterGroup.options;
options.forEach(op => {
const isSelected = this.selectedOptions.findIndex(o => o.id === op.id) !== -1;
@@ -266,7 +266,7 @@ export class RemissionFilterItemComponent implements OnInit, OnDestroy {
}
unSelectAllOptionsOfGroup(group: string) {
const filterGroup = (this.filter.options as FilterOptionGroup[]).find(t => t.name === group);
const filterGroup = (this.filter.options as FilterOption[]).find(t => t.name === group);
const options = filterGroup.options;
options.forEach(op => {
const isSelected = this.selectedOptions.findIndex(o => o.id === op.id) !== -1;

View File

@@ -157,3 +157,11 @@ export { BranchQueryTokenDTO } from './models/branch-query-token-dto';
export { KeyValuePairOfEntityDTOContainerOfCheckoutItemDTOAndNullableOfDecimal } from './models/key-value-pair-of-entity-dtocontainer-of-checkout-item-dtoand-nullable-of-decimal';
export { ResponseArgsOfPaymentDTO } from './models/response-args-of-payment-dto';
export { ResponseArgsOfIEnumerableOfAvailabilityDTO } from './models/response-args-of-ienumerable-of-availability-dto';
export { ListResponseArgsOfVATDTO } from './models/list-response-args-of-vatdto';
export { ResponseArgsOfIEnumerableOfVATDTO } from './models/response-args-of-ienumerable-of-vatdto';
export { VATDTO } from './models/vatdto';
export { EntityDTOOfVATDTOAndIVAT } from './models/entity-dtoof-vatdtoand-ivat';
export { ResponseArgsOfVATDTO } from './models/response-args-of-vatdto';
export { ListResponseArgsOfLogisticianDTO } from './models/list-response-args-of-logistician-dto';
export { ResponseArgsOfIEnumerableOfLogisticianDTO } from './models/response-args-of-ienumerable-of-logistician-dto';
export { ResponseArgsOfLogisticianDTO } from './models/response-args-of-logistician-dto';

View File

@@ -1,2 +1,2 @@
/* tslint:disable */
export type AllergeneType = 0 | 1 | 2 | 4 | 6 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 1536 | 2048 | 6144 | 10240 | 18432 | 34816 | 67584 | 133120 | 264192 | 526336 | 1048576 | 3145728 | 5242880 | 9437184 | 17825792 | 34603008 | 68157440 | 135266304 | 268435456 | 805306368 | 1342177280 | 2415919104 | 4563402752 | 8858370048 | 17448304640 | 34628173824 | 68987912192;
export type AllergeneType = 0 | 1 | 2 | 4 | 6 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 1536 | 2048 | 6144 | 10240 | 18432 | 34816 | 67584 | 133120 | 264192 | 526336 | 1048576 | 3145728 | 5242880 | 9437184 | 17825792 | 34603008 | 68157440 | 135266304 | 268435456 | 805306368 | 1342177280 | 2415919104 | 4563402752 | 8858370048 | 17448304640 | 34628173824 | 68987912192 | 137438953472;

View File

@@ -17,4 +17,5 @@ export interface AvailabilityDTO {
shopItem?: EntityDTOContainerOfShopItemDTO;
supplier?: EntityDTOContainerOfSupplierDTO;
supplierProductNumber?: string;
requestReference?: string;
}

View File

@@ -0,0 +1,4 @@
/* tslint:disable */
import { EntityDTO } from './entity-dto';
export interface EntityDTOOfVATDTOAndIVAT extends EntityDTO {
}

View File

@@ -1,15 +1,15 @@
/* tslint:disable */
import { EntityDTOOfFileDTOAndIFile } from './entity-dtoof-file-dtoand-ifile';
import { EntityDTOContainerOfTenantDTO } from './entity-dtocontainer-of-tenant-dto';
export interface FileDTO extends EntityDTOOfFileDTOAndIFile {
name?: string;
type?: string;
path?: string;
content?: string;
mime?: string;
hash?: string;
size?: number;
subtitle?: string;
copyright?: string;
tenant?: EntityDTOContainerOfTenantDTO;
locale?: string;
license?: string;
sort?: number;
}

View File

@@ -29,6 +29,8 @@ export interface ItemDTO extends EntityDTOOfItemDTOAndIItem {
manufacturingCosts?: number;
size?: SizeOfString;
weight?: WeightOfAvoirdupois;
netWeight?: WeightOfAvoirdupois;
weightOfPackaging?: WeightOfAvoirdupois;
itemType: ItemType;
edition?: string;
serial?: string;

View File

@@ -0,0 +1,8 @@
/* tslint:disable */
import { ResponseArgsOfIEnumerableOfLogisticianDTO } from './response-args-of-ienumerable-of-logistician-dto';
export interface ListResponseArgsOfLogisticianDTO extends ResponseArgsOfIEnumerableOfLogisticianDTO {
skip?: number;
take?: number;
completed?: boolean;
hits?: number;
}

View File

@@ -0,0 +1,8 @@
/* tslint:disable */
import { ResponseArgsOfIEnumerableOfVATDTO } from './response-args-of-ienumerable-of-vatdto';
export interface ListResponseArgsOfVATDTO extends ResponseArgsOfIEnumerableOfVATDTO {
skip?: number;
take?: number;
completed?: boolean;
hits?: number;
}

View File

@@ -0,0 +1,6 @@
/* tslint:disable */
import { ResponseArgs } from './response-args';
import { LogisticianDTO } from './logistician-dto';
export interface ResponseArgsOfIEnumerableOfLogisticianDTO extends ResponseArgs {
result?: Array<LogisticianDTO>;
}

View File

@@ -0,0 +1,6 @@
/* tslint:disable */
import { ResponseArgs } from './response-args';
import { VATDTO } from './vatdto';
export interface ResponseArgsOfIEnumerableOfVATDTO extends ResponseArgs {
result?: Array<VATDTO>;
}

View File

@@ -0,0 +1,6 @@
/* tslint:disable */
import { ResponseArgs } from './response-args';
import { LogisticianDTO } from './logistician-dto';
export interface ResponseArgsOfLogisticianDTO extends ResponseArgs {
result?: LogisticianDTO;
}

View File

@@ -0,0 +1,6 @@
/* tslint:disable */
import { ResponseArgs } from './response-args';
import { VATDTO } from './vatdto';
export interface ResponseArgsOfVATDTO extends ResponseArgs {
result?: VATDTO;
}

View File

@@ -0,0 +1,12 @@
/* tslint:disable */
import { EntityDTOOfVATDTOAndIVAT } from './entity-dtoof-vatdtoand-ivat';
import { EntityDTOContainerOfCountryDTO } from './entity-dtocontainer-of-country-dto';
import { VATType } from './vattype';
export interface VATDTO extends EntityDTOOfVATDTOAndIVAT {
name?: string;
value?: number;
country?: EntityDTOContainerOfCountryDTO;
vatType: VATType;
start?: string;
stop?: string;
}

View File

File diff suppressed because it is too large Load Diff

View File

@@ -137,6 +137,9 @@ export { CountryDTO } from './models/country-dto';
export { EntityDTOOfCountryDTOAndIReadOnlyCountry } from './models/entity-dtoof-country-dtoand-iread-only-country';
export { EntityDTOOfVATDTOAndIVAT } from './models/entity-dtoof-vatdtoand-ivat';
export { ResponseArgsOfVATDTO } from './models/response-args-of-vatdto';
export { ListResponseArgsOfLogisticianDTO } from './models/list-response-args-of-logistician-dto';
export { ResponseArgsOfIEnumerableOfLogisticianDTO } from './models/response-args-of-ienumerable-of-logistician-dto';
export { ResponseArgsOfLogisticianDTO } from './models/response-args-of-logistician-dto';
export { ResponseArgsOfIEnumerableOfReceiptListItemDTO } from './models/response-args-of-ienumerable-of-receipt-list-item-dto';
export { ReceiptListItemDTO } from './models/receipt-list-item-dto';
export { ReceiptType } from './models/receipt-type';

View File

@@ -0,0 +1,8 @@
/* tslint:disable */
import { ResponseArgsOfIEnumerableOfLogisticianDTO } from './response-args-of-ienumerable-of-logistician-dto';
export interface ListResponseArgsOfLogisticianDTO extends ResponseArgsOfIEnumerableOfLogisticianDTO {
skip?: number;
take?: number;
completed?: boolean;
hits?: number;
}

View File

@@ -0,0 +1,6 @@
/* tslint:disable */
import { ResponseArgs } from './response-args';
import { LogisticianDTO } from './logistician-dto';
export interface ResponseArgsOfIEnumerableOfLogisticianDTO extends ResponseArgs {
result?: Array<LogisticianDTO>;
}

View File

@@ -0,0 +1,6 @@
/* tslint:disable */
import { ResponseArgs } from './response-args';
import { LogisticianDTO } from './logistician-dto';
export interface ResponseArgsOfLogisticianDTO extends ResponseArgs {
result?: LogisticianDTO;
}

View File

@@ -32,6 +32,8 @@ import { ListResponseArgsOfSupplierDTO } from '../models/list-response-args-of-s
import { ResponseArgsOfSupplierDTO } from '../models/response-args-of-supplier-dto';
import { ListResponseArgsOfVATDTO } from '../models/list-response-args-of-vatdto';
import { ResponseArgsOfVATDTO } from '../models/response-args-of-vatdto';
import { ListResponseArgsOfLogisticianDTO } from '../models/list-response-args-of-logistician-dto';
import { ResponseArgsOfLogisticianDTO } from '../models/response-args-of-logistician-dto';
@Injectable({
providedIn: 'root',
})
@@ -68,6 +70,8 @@ class OrderService extends __BaseService {
static readonly OrderGetSupplierPath = '/order/supplier/{supplierId}';
static readonly OrderGetVATsPath = '/order/vat';
static readonly OrderGetVATPath = '/order/vat/{vatId}';
static readonly OrderGetLogisticiansPath = '/order/logistician';
static readonly OrderGetLogisticianByIdPath = '/order/logistician/{logisticianId}';
constructor(
config: __Configuration,
@@ -1363,6 +1367,83 @@ class OrderService extends __BaseService {
__map(_r => _r.body as ResponseArgsOfVATDTO)
);
}
/**
* @param params The `OrderService.OrderGetLogisticiansParams` containing the following parameters:
*
* - `take`:
*
* - `skip`:
*/
OrderGetLogisticiansResponse(params: OrderService.OrderGetLogisticiansParams): __Observable<__StrictHttpResponse<ListResponseArgsOfLogisticianDTO>> {
let __params = this.newParams();
let __headers = new HttpHeaders();
let __body: any = null;
if (params.take != null) __params = __params.set('take', params.take.toString());
if (params.skip != null) __params = __params.set('skip', params.skip.toString());
let req = new HttpRequest<any>(
'GET',
this.rootUrl + `/order/logistician`,
__body,
{
headers: __headers,
params: __params,
responseType: 'json'
});
return this.http.request<any>(req).pipe(
__filter(_r => _r instanceof HttpResponse),
__map((_r) => {
return _r as __StrictHttpResponse<ListResponseArgsOfLogisticianDTO>;
})
);
}
/**
* @param params The `OrderService.OrderGetLogisticiansParams` containing the following parameters:
*
* - `take`:
*
* - `skip`:
*/
OrderGetLogisticians(params: OrderService.OrderGetLogisticiansParams): __Observable<ListResponseArgsOfLogisticianDTO> {
return this.OrderGetLogisticiansResponse(params).pipe(
__map(_r => _r.body as ListResponseArgsOfLogisticianDTO)
);
}
/**
* @param logisticianId undefined
*/
OrderGetLogisticianByIdResponse(logisticianId: number): __Observable<__StrictHttpResponse<ResponseArgsOfLogisticianDTO>> {
let __params = this.newParams();
let __headers = new HttpHeaders();
let __body: any = null;
let req = new HttpRequest<any>(
'GET',
this.rootUrl + `/order/logistician/${logisticianId}`,
__body,
{
headers: __headers,
params: __params,
responseType: 'json'
});
return this.http.request<any>(req).pipe(
__filter(_r => _r instanceof HttpResponse),
__map((_r) => {
return _r as __StrictHttpResponse<ResponseArgsOfLogisticianDTO>;
})
);
}
/**
* @param logisticianId undefined
*/
OrderGetLogisticianById(logisticianId: number): __Observable<ResponseArgsOfLogisticianDTO> {
return this.OrderGetLogisticianByIdResponse(logisticianId).pipe(
__map(_r => _r.body as ResponseArgsOfLogisticianDTO)
);
}
}
module OrderService {
@@ -1499,6 +1580,14 @@ module OrderService {
take?: null | number;
skip?: null | number;
}
/**
* Parameters for OrderGetLogisticians
*/
export interface OrderGetLogisticiansParams {
take?: null | number;
skip?: null | number;
}
}
export { OrderService }

74
package-lock.json generated
View File

@@ -1038,10 +1038,72 @@
}
}
},
"@cmf/catalog-api": {
"version": "0.1.4",
"resolved": "https://pkgs.dev.azure.com/hugendubel/_packaging/hugendubel/npm/registry/@cmf/catalog-api/-/catalog-api-0.1.4.tgz",
"integrity": "sha1-Zx/SX/5hVeKqQBWAxxfUFh8+9gk=",
"requires": {
"tslib": "^1.9.0"
}
},
"@cmf/core": {
"version": "0.1.4",
"resolved": "https://pkgs.dev.azure.com/hugendubel/_packaging/hugendubel/npm/registry/@cmf/core/-/core-0.1.4.tgz",
"integrity": "sha1-RE5rWb2Yz0aWKk+NmftqMXnAVPY=",
"requires": {
"tslib": "^1.9.0"
}
},
"@cmf/inventory-api": {
"version": "0.1.4",
"resolved": "https://pkgs.dev.azure.com/hugendubel/_packaging/hugendubel/npm/registry/@cmf/inventory-api/-/inventory-api-0.1.4.tgz",
"integrity": "sha1-7+svFOk3KYGD8lAWRosr40pBvQc=",
"requires": {
"tslib": "^1.9.0"
}
},
"@cmf/trade-api": {
"version": "0.1.4",
"resolved": "https://pkgs.dev.azure.com/hugendubel/_packaging/hugendubel/npm/registry/@cmf/trade-api/-/trade-api-0.1.4.tgz",
"integrity": "sha1-gNagHmzSwR+AwVGtoh2Y6uuICmM=",
"requires": {
"tslib": "^1.9.0"
}
},
"@isa/catsearch-api": {
"version": "0.0.16",
"resolved": "https://pkgs.dev.azure.com/hugendubel/_packaging/hugendubel/npm/registry/@isa/catsearch-api/-/catsearch-api-0.0.16.tgz",
"integrity": "sha1-5I5RmWChfTmvGeY89KKQdEHc/rc=",
"requires": {
"@cmf/catalog-api": "0.1.4",
"@cmf/core": "0.1.4",
"@cmf/trade-api": "0.1.4",
"tslib": "^1.9.0"
}
},
"@isa/print-api": {
"version": "0.0.16",
"resolved": "https://pkgs.dev.azure.com/hugendubel/_packaging/hugendubel/npm/registry/@isa/print-api/-/print-api-0.0.16.tgz",
"integrity": "sha1-ZhS9OFbpbzCGWvD0rjp8XrvMQW4=",
"requires": {
"tslib": "^1.9.0"
}
},
"@isa/remi-api": {
"version": "0.0.16",
"resolved": "https://pkgs.dev.azure.com/hugendubel/_packaging/hugendubel/npm/registry/@isa/remi-api/-/remi-api-0.0.16.tgz",
"integrity": "sha1-zU+3oCUFOSU4WOm+gc1VH1DcgXM=",
"requires": {
"@cmf/core": "0.1.4",
"@cmf/inventory-api": "0.1.4",
"@cmf/trade-api": "0.1.4",
"tslib": "^1.9.0"
}
},
"@isa/remission": {
"version": "0.1.3",
"resolved": "https://pkgs.dev.azure.com/hugendubel/_packaging/hugendubel/npm/registry/@isa/remission/-/remission-0.1.3.tgz",
"integrity": "sha1-MV/31xguLjI50s62R0/APgaMEQQ=",
"version": "0.1.4",
"resolved": "https://pkgs.dev.azure.com/hugendubel/_packaging/hugendubel/npm/registry/@isa/remission/-/remission-0.1.4.tgz",
"integrity": "sha1-jFD3OM74V7E+8UKhAwao4IE3XMQ=",
"requires": {
"deep-equal": "^1.1.0",
"tslib": "^1.9.0",
@@ -1049,9 +1111,9 @@
},
"dependencies": {
"deep-equal": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.0.tgz",
"integrity": "sha512-ZbfWJq/wN1Z273o7mUSjILYqehAktR2NVoSrOukDkU9kg2v/Uv89yU4Cvz8seJeAmtN5oqiefKq8FPuXOboqLw==",
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz",
"integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==",
"requires": {
"is-arguments": "^1.0.4",
"is-date-object": "^1.0.1",

View File

@@ -31,7 +31,10 @@
"@angular/pwa": "^0.13.4",
"@angular/router": "~7.2.12",
"@angular/service-worker": "~7.2.12",
"@isa/remission": "^0.1.3",
"@isa/catsearch-api": "0.0.16",
"@isa/print-api": "0.0.16",
"@isa/remi-api": "0.0.16",
"@isa/remission": "^0.1.4",
"@ngxs/store": "^3.4.1",
"@types/faker": "^4.1.5",
"@zxing/ngx-scanner": "^1.3.0",