Procházet zdrojové kódy

dit und dat

master
Daniel před 1 rokem
rodič
revize
51d56e1283
11 změnil soubory, kde provedl 96 přidání a 28 odebrání
  1. +1
    -1
      matsen-tool/openapi.json
  2. +28
    -2
      matsen-tool/openapi.yaml
  3. +11
    -3
      matsen-tool/src/app/_views/documents/document-list/document-list.component.html
  4. +6
    -1
      matsen-tool/src/app/_views/partners/partners-detail/partners-detail.component.html
  5. +3
    -0
      matsen-tool/src/app/_views/partners/partners-detail/partners-detail.component.ts
  6. +6
    -1
      matsen-tool/src/app/_views/products/products-detail/products-detail.component.html
  7. +3
    -0
      matsen-tool/src/app/_views/products/products-detail/products-detail.component.ts
  8. +8
    -2
      matsen-tool/src/app/_views/sales/sale-list/sale-list.component.ts
  9. +7
    -7
      matsen-tool/src/app/core/api/v1/api/partnerProduct.service.ts
  10. +7
    -7
      matsen-tool/src/app/core/api/v1/api/product.service.ts
  11. +16
    -4
      matsen-tool/src/app/core/api/v1/api/sale.service.ts

+ 1
- 1
matsen-tool/openapi.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 28
- 2
matsen-tool/openapi.yaml Zobrazit soubor

@@ -1824,7 +1824,7 @@ paths:
explode: true
allowReserved: false
-
name: productPartnerUnassigned
name: excludeContactId
in: query
description: ''
required: false
@@ -2658,7 +2658,7 @@ paths:
explode: false
allowReserved: false
-
name: partnerIdUnassigned
name: excludePartnerId
in: query
description: ''
required: false
@@ -3057,6 +3057,32 @@ paths:
style: form
explode: true
allowReserved: false
-
name: product
in: query
description: ''
required: false
deprecated: false
allowEmptyValue: true
schema:
type: string
style: form
explode: false
allowReserved: false
-
name: 'product[]'
in: query
description: ''
required: false
deprecated: false
allowEmptyValue: true
schema:
type: array
items:
type: string
style: form
explode: true
allowReserved: false
deprecated: false
post:
operationId: api_sales_post


+ 11
- 3
matsen-tool/src/app/_views/documents/document-list/document-list.component.html Zobrazit soubor

@@ -41,7 +41,11 @@
<th mat-header-cell *matHeaderCellDef>
{{ 'overview.partner' | translate }}
</th>
<td mat-cell *matCellDef="let element">{{ element.partnerName }}
<td mat-cell *matCellDef="let element">
<ng-container *ngIf="element.partner !== undefined">
<a [routerLink]="['/customer', appHelperService.extractId(element.partner.id)]">{{ element.partner.name }}</a>
</ng-container>

</td>
</ng-container>

@@ -49,7 +53,10 @@
<th mat-header-cell *matHeaderCellDef>
{{ 'overview.product' | translate }}
</th>
<td mat-cell *matCellDef="let element">{{ element.productName }}
<td mat-cell *matCellDef="let element">
<ng-container *ngIf="element.product !== undefined">
<a [routerLink]="['/product', appHelperService.extractId(element.product.id)]">{{ element.product.name }}</a>
</ng-container>
</td>
</ng-container>

@@ -67,7 +74,8 @@
sortActionDescription="{{ 'overview.sort' | translate }}: {{ 'overview.createdBy' | translate }}">
{{ 'overview.createdBy' | translate }}
</th>
<td mat-cell *matCellDef="let element">{{ element.createdByName }}
<td mat-cell *matCellDef="let element">
<a [routerLink]="['/user', appHelperService.extractId(element.createdBy.id)]">{{ element.createdBy.fullName }}</a>
</td>
</ng-container>



+ 6
- 1
matsen-tool/src/app/_views/partners/partners-detail/partners-detail.component.html Zobrazit soubor

@@ -70,7 +70,6 @@
[partner]="partner">
</app-task-list>
</app-toggle>

<app-toggle #togglePosts [headline]="'basic.posts' | translate">
<app-post-list *ngIf="togglePosts.isOpened" #postListComponent
[partner]="partner"
@@ -79,3 +78,9 @@
>
</app-post-list>
</app-toggle>
<app-toggle #toggleSales [headline]="'basic.sales' | translate">
<app-sale-list *ngIf="toggleSales.isOpened" #salesListComponent
[partner]="partner"
>
</app-sale-list>
</app-toggle>

+ 3
- 0
matsen-tool/src/app/_views/partners/partners-detail/partners-detail.component.ts Zobrazit soubor

@@ -15,6 +15,7 @@ import {PostListComponent} from "@app/_views/posts/post-list/post-list.component
import {ContactListComponent} from "@app/_views/contacts/contact-list/contact-list.component";
import {TaskListComponent} from "@app/_views/tasks/task-list/task-list.component";
import {ProductListComponent} from "@app/_views/products/product-list/product-list.component";
import {SaleListComponent} from "@app/_views/sales/sale-list/sale-list.component";

@Component({
selector: 'app-partners-detail',
@@ -31,6 +32,8 @@ export class PartnersDetailComponent implements OnInit, AfterViewInit {
@ViewChild("taskListComponent", { static: false }) taskListComponent!: TaskListComponent;
@ViewChild("togglePosts", { static: true }) togglePosts!: ToggleComponent;
@ViewChild("postListComponent", { static: false }) postsComponent!: PostListComponent;
@ViewChild("toggleSales", { static: true }) toggleSales!: ToggleComponent;
@ViewChild("salesListComponent", { static: false }) salesListComponent!: SaleListComponent;

protected user: User | null;



+ 6
- 1
matsen-tool/src/app/_views/products/products-detail/products-detail.component.html Zobrazit soubor

@@ -51,11 +51,16 @@
>
</app-partner-list>
</app-toggle>

<app-toggle #toggleServices [headline]="'basic.service' | translate">
<app-partner-list *ngIf="toggleServices.isOpened" #servicesListComponent
[product]="product"
[partnerType]="'service'"
>
</app-partner-list>
</app-toggle>
<app-toggle #toggleSales [headline]="'basic.sales' | translate">
<app-sale-list *ngIf="toggleSales.isOpened" #salesListComponent
[product]="product"
>
</app-sale-list>
</app-toggle>

+ 3
- 0
matsen-tool/src/app/_views/products/products-detail/products-detail.component.ts Zobrazit soubor

@@ -17,6 +17,7 @@ import {AppHelperService} from "@app/_helpers/app-helper.service";
import {NewSaleComponent} from "@app/_views/sales/new-sale/new-sale.component";
import {ToggleComponent} from "@app/_components/toggle/toggle.component";
import {PartnerListComponent} from "@app/_views/partners/partner-list/partner-list.component";
import {SaleListComponent} from "@app/_views/sales/sale-list/sale-list.component";

@Component({
selector: 'app-products-detail',
@@ -31,6 +32,8 @@ export class ProductsDetailComponent implements OnInit, AfterViewInit {
@ViewChild("suppliersListComponent", { static: false }) suppliersListComponent!: PartnerListComponent;
@ViewChild("toggleServices", { static: true }) toggleServices!: ToggleComponent;
@ViewChild("servicesListComponent", { static: false }) servicesListComponent!: PartnerListComponent;
@ViewChild("toggleSales", { static: true }) toggleSales!: ToggleComponent;
@ViewChild("salesListComponent", { static: false }) salesListComponent!: SaleListComponent;

protected readonly environment = environment;



+ 8
- 2
matsen-tool/src/app/_views/sales/sale-list/sale-list.component.ts Zobrazit soubor

@@ -1,6 +1,6 @@
import {AfterViewInit, Component, Input, OnInit, ViewChild} from '@angular/core';
import {Subscription} from "rxjs";
import {SaleJsonld, SaleService, SaleSummaryJsonld, UserJsonld} from "@app/core/api/v1";
import {PartnerJsonld, ProductJsonld, SaleJsonld, SaleService, SaleSummaryJsonld, UserJsonld} from "@app/core/api/v1";
import {TranslateService} from "@ngx-translate/core";
import {Router} from "@angular/router";
import {AppHelperService} from "@app/_helpers/app-helper.service";
@@ -19,6 +19,8 @@ import {AccountService} from "@app/_services";
export class SaleListComponent implements OnInit, AfterViewInit {

@Input() public user!: UserJsonld;
@Input() public product!: ProductJsonld;
@Input() public partner!: PartnerJsonld;
@ViewChild(MatSort) sort;
@ViewChild("pagingComponent", { static: false }) pagingComponent!: PagingComponent;

@@ -57,7 +59,11 @@ export class SaleListComponent implements OnInit, AfterViewInit {
this.salesSub = this.saleService.salesGetCollection(
this.pagingComponent.getPageIndex(),
this.pagingComponent.getPageSize(),
this.user !== undefined ? this.user.id : undefined
this.user !== undefined ? this.user.id : undefined,
undefined,
this.partner !== undefined ? this.partner.id : undefined,
undefined,
this.product !== undefined ? this.product.id : undefined,
).subscribe(
data => {
this.sales = data["hydra:member"];


+ 7
- 7
matsen-tool/src/app/core/api/v1/api/partnerProduct.service.ts Zobrazit soubor

@@ -112,14 +112,14 @@ export class PartnerProductService {
* @param productName
* @param partnerType
* @param partnerType2
* @param productPartnerUnassigned
* @param excludeContactId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public partnerProductsGetCollection(page?: number, itemsPerPage?: number, partner?: string, partner2?: Array<string>, partnerName?: string, product?: string, product2?: Array<string>, productName?: string, partnerType?: string, partnerType2?: Array<string>, productPartnerUnassigned?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiPartnerProductsGetCollection200Response>;
public partnerProductsGetCollection(page?: number, itemsPerPage?: number, partner?: string, partner2?: Array<string>, partnerName?: string, product?: string, product2?: Array<string>, productName?: string, partnerType?: string, partnerType2?: Array<string>, productPartnerUnassigned?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiPartnerProductsGetCollection200Response>>;
public partnerProductsGetCollection(page?: number, itemsPerPage?: number, partner?: string, partner2?: Array<string>, partnerName?: string, product?: string, product2?: Array<string>, productName?: string, partnerType?: string, partnerType2?: Array<string>, productPartnerUnassigned?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiPartnerProductsGetCollection200Response>>;
public partnerProductsGetCollection(page?: number, itemsPerPage?: number, partner?: string, partner2?: Array<string>, partnerName?: string, product?: string, product2?: Array<string>, productName?: string, partnerType?: string, partnerType2?: Array<string>, productPartnerUnassigned?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
public partnerProductsGetCollection(page?: number, itemsPerPage?: number, partner?: string, partner2?: Array<string>, partnerName?: string, product?: string, product2?: Array<string>, productName?: string, partnerType?: string, partnerType2?: Array<string>, excludeContactId?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiPartnerProductsGetCollection200Response>;
public partnerProductsGetCollection(page?: number, itemsPerPage?: number, partner?: string, partner2?: Array<string>, partnerName?: string, product?: string, product2?: Array<string>, productName?: string, partnerType?: string, partnerType2?: Array<string>, excludeContactId?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiPartnerProductsGetCollection200Response>>;
public partnerProductsGetCollection(page?: number, itemsPerPage?: number, partner?: string, partner2?: Array<string>, partnerName?: string, product?: string, product2?: Array<string>, productName?: string, partnerType?: string, partnerType2?: Array<string>, excludeContactId?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiPartnerProductsGetCollection200Response>>;
public partnerProductsGetCollection(page?: number, itemsPerPage?: number, partner?: string, partner2?: Array<string>, partnerName?: string, product?: string, product2?: Array<string>, productName?: string, partnerType?: string, partnerType2?: Array<string>, excludeContactId?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {

let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (page !== undefined && page !== null) {
@@ -168,9 +168,9 @@ export class PartnerProductService {
<any>element, 'partner.type[]');
})
}
if (productPartnerUnassigned !== undefined && productPartnerUnassigned !== null) {
if (excludeContactId !== undefined && excludeContactId !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>productPartnerUnassigned, 'productPartnerUnassigned');
<any>excludeContactId, 'excludeContactId');
}

let localVarHeaders = this.defaultHeaders;


+ 7
- 7
matsen-tool/src/app/core/api/v1/api/product.service.ts Zobrazit soubor

@@ -105,15 +105,15 @@ export class ProductService {
* @param page The collection page number
* @param itemsPerPage The number of items per page
* @param name
* @param partnerIdUnassigned
* @param excludePartnerId
* @param orderName
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public productsGetCollection(page?: number, itemsPerPage?: number, name?: string, partnerIdUnassigned?: string, orderName?: 'asc' | 'desc', observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiProductsGetCollection200Response>;
public productsGetCollection(page?: number, itemsPerPage?: number, name?: string, partnerIdUnassigned?: string, orderName?: 'asc' | 'desc', observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiProductsGetCollection200Response>>;
public productsGetCollection(page?: number, itemsPerPage?: number, name?: string, partnerIdUnassigned?: string, orderName?: 'asc' | 'desc', observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiProductsGetCollection200Response>>;
public productsGetCollection(page?: number, itemsPerPage?: number, name?: string, partnerIdUnassigned?: string, orderName?: 'asc' | 'desc', observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
public productsGetCollection(page?: number, itemsPerPage?: number, name?: string, excludePartnerId?: string, orderName?: 'asc' | 'desc', observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiProductsGetCollection200Response>;
public productsGetCollection(page?: number, itemsPerPage?: number, name?: string, excludePartnerId?: string, orderName?: 'asc' | 'desc', observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiProductsGetCollection200Response>>;
public productsGetCollection(page?: number, itemsPerPage?: number, name?: string, excludePartnerId?: string, orderName?: 'asc' | 'desc', observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiProductsGetCollection200Response>>;
public productsGetCollection(page?: number, itemsPerPage?: number, name?: string, excludePartnerId?: string, orderName?: 'asc' | 'desc', observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {

let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (page !== undefined && page !== null) {
@@ -128,9 +128,9 @@ export class ProductService {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>name, 'name');
}
if (partnerIdUnassigned !== undefined && partnerIdUnassigned !== null) {
if (excludePartnerId !== undefined && excludePartnerId !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>partnerIdUnassigned, 'partnerIdUnassigned');
<any>excludePartnerId, 'excludePartnerId');
}
if (orderName !== undefined && orderName !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,


+ 16
- 4
matsen-tool/src/app/core/api/v1/api/sale.service.ts Zobrazit soubor

@@ -108,13 +108,15 @@ export class SaleService {
* @param owner2
* @param partner
* @param partner2
* @param product
* @param product2
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public salesGetCollection(page?: number, itemsPerPage?: number, owner?: string, owner2?: Array<string>, partner?: string, partner2?: Array<string>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiSalesGetCollection200Response>;
public salesGetCollection(page?: number, itemsPerPage?: number, owner?: string, owner2?: Array<string>, partner?: string, partner2?: Array<string>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiSalesGetCollection200Response>>;
public salesGetCollection(page?: number, itemsPerPage?: number, owner?: string, owner2?: Array<string>, partner?: string, partner2?: Array<string>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiSalesGetCollection200Response>>;
public salesGetCollection(page?: number, itemsPerPage?: number, owner?: string, owner2?: Array<string>, partner?: string, partner2?: Array<string>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
public salesGetCollection(page?: number, itemsPerPage?: number, owner?: string, owner2?: Array<string>, partner?: string, partner2?: Array<string>, product?: string, product2?: Array<string>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiSalesGetCollection200Response>;
public salesGetCollection(page?: number, itemsPerPage?: number, owner?: string, owner2?: Array<string>, partner?: string, partner2?: Array<string>, product?: string, product2?: Array<string>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiSalesGetCollection200Response>>;
public salesGetCollection(page?: number, itemsPerPage?: number, owner?: string, owner2?: Array<string>, partner?: string, partner2?: Array<string>, product?: string, product2?: Array<string>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiSalesGetCollection200Response>>;
public salesGetCollection(page?: number, itemsPerPage?: number, owner?: string, owner2?: Array<string>, partner?: string, partner2?: Array<string>, product?: string, product2?: Array<string>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {

let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (page !== undefined && page !== null) {
@@ -145,6 +147,16 @@ export class SaleService {
<any>element, 'partner[]');
})
}
if (product !== undefined && product !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>product, 'product');
}
if (product2) {
product2.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>element, 'product[]');
})
}

let localVarHeaders = this.defaultHeaders;



Načítá se…
Zrušit
Uložit