Kaynağa Gözat

refactoring

master
Daniel 1 yıl önce
ebeveyn
işleme
a7c38868da
76 değiştirilmiş dosya ile 1023 ekleme ve 1021 silme
  1. +1
    -1
      matsen-tool/openapi.json
  2. +184
    -60
      matsen-tool/openapi.yaml
  3. +4
    -4
      matsen-tool/src/app/_components/layout/two-column/two-column.component.html
  4. +1
    -1
      matsen-tool/src/app/_components/toggle/toggle.component.html
  5. +6
    -0
      matsen-tool/src/app/_components/toggle/toggle.component.ts
  6. +6
    -0
      matsen-tool/src/app/_forms/apiForms.ts
  7. +17
    -0
      matsen-tool/src/app/_guards/admin.guard.spec.ts
  8. +12
    -0
      matsen-tool/src/app/_guards/admin.guard.ts
  9. +17
    -0
      matsen-tool/src/app/_guards/sales.guard.spec.ts
  10. +13
    -0
      matsen-tool/src/app/_guards/sales.guard.ts
  11. +17
    -0
      matsen-tool/src/app/_guards/user.guard.spec.ts
  12. +13
    -0
      matsen-tool/src/app/_guards/user.guard.ts
  13. +0
    -24
      matsen-tool/src/app/_helpers/auth.guard.ts
  14. +1
    -2
      matsen-tool/src/app/_helpers/index.ts
  15. +6
    -0
      matsen-tool/src/app/_helpers/role.ts
  16. +12
    -0
      matsen-tool/src/app/_services/account.service.ts
  17. +1
    -1
      matsen-tool/src/app/_views/contacts/contact-list/contact-list.component.ts
  18. +1
    -1
      matsen-tool/src/app/_views/contacts/contacts-detail/contacts-detail.component.html
  19. +1
    -1
      matsen-tool/src/app/_views/contacts/contacts-detail/contacts-detail.component.ts
  20. +3
    -11
      matsen-tool/src/app/_views/home/home.component.html
  21. +0
    -3
      matsen-tool/src/app/_views/home/home.component.ts
  22. +67
    -3
      matsen-tool/src/app/_views/partners/partner-list/partner-list.component.ts
  23. +16
    -15
      matsen-tool/src/app/_views/partners/partners-detail/partners-detail.component.html
  24. +24
    -42
      matsen-tool/src/app/_views/partners/partners-detail/partners-detail.component.ts
  25. +2
    -0
      matsen-tool/src/app/_views/posts/post-list/post-list.component.html
  26. +0
    -4
      matsen-tool/src/app/_views/posts/post-list/post-list.component.ts
  27. +63
    -4
      matsen-tool/src/app/_views/products/product-list/product-list.component.ts
  28. +24
    -1
      matsen-tool/src/app/_views/products/products-detail/products-detail.component.html
  29. +35
    -40
      matsen-tool/src/app/_views/products/products-detail/products-detail.component.ts
  30. +2
    -14
      matsen-tool/src/app/_views/profile/profile.component.html
  31. +3
    -16
      matsen-tool/src/app/_views/profile/profile.component.ts
  32. +1
    -1
      matsen-tool/src/app/_views/sales/sale-list/sale-list.component.ts
  33. +26
    -12
      matsen-tool/src/app/_views/sales/sale-summary/sale-summary.component.ts
  34. +1
    -1
      matsen-tool/src/app/_views/sales/sales-detail/sales-detail.component.html
  35. +9
    -43
      matsen-tool/src/app/_views/sales/sales-detail/sales-detail.component.ts
  36. +73
    -0
      matsen-tool/src/app/_views/user/user-detail/user-detail.component.html
  37. +0
    -0
      matsen-tool/src/app/_views/user/user-detail/user-detail.component.scss
  38. +23
    -0
      matsen-tool/src/app/_views/user/user-detail/user-detail.component.spec.ts
  39. +79
    -0
      matsen-tool/src/app/_views/user/user-detail/user-detail.component.ts
  40. +0
    -0
      matsen-tool/src/app/_views/user/users.component.html
  41. +0
    -0
      matsen-tool/src/app/_views/user/users.component.scss
  42. +5
    -5
      matsen-tool/src/app/_views/user/users.component.spec.ts
  43. +4
    -4
      matsen-tool/src/app/_views/user/users.component.ts
  44. +26
    -17
      matsen-tool/src/app/app-routing.module.ts
  45. +5
    -3
      matsen-tool/src/app/app.module.ts
  46. +0
    -440
      matsen-tool/src/app/core/api/v1/api/media.service.ts
  47. +16
    -4
      matsen-tool/src/app/core/api/v1/api/partnerFollow.service.ts
  48. +16
    -4
      matsen-tool/src/app/core/api/v1/api/partnerProduct.service.ts
  49. +79
    -0
      matsen-tool/src/app/core/api/v1/api/saleSummary.service.ts
  50. +9
    -4
      matsen-tool/src/app/core/api/v1/api/userProduct.service.ts
  51. +0
    -23
      matsen-tool/src/app/core/api/v1/model/apiMediaGetCollection200Response.ts
  52. +0
    -22
      matsen-tool/src/app/core/api/v1/model/apiMediaGetCollection200Response1.ts
  53. +0
    -23
      matsen-tool/src/app/core/api/v1/model/apiMediasGetCollection200Response.ts
  54. +0
    -22
      matsen-tool/src/app/core/api/v1/model/apiMediasGetCollection200Response1.ts
  55. +0
    -20
      matsen-tool/src/app/core/api/v1/model/documentDocumentObjectRead.ts
  56. +0
    -22
      matsen-tool/src/app/core/api/v1/model/documentJsonhalDocumentObjectRead.ts
  57. +0
    -24
      matsen-tool/src/app/core/api/v1/model/documentJsonldDocumentObjectRead.ts
  58. +0
    -22
      matsen-tool/src/app/core/api/v1/model/mediaJsonhalMediaObjectRead.ts
  59. +0
    -24
      matsen-tool/src/app/core/api/v1/model/mediaJsonldMediaObjectRead.ts
  60. +0
    -20
      matsen-tool/src/app/core/api/v1/model/mediaMediaObjectRead.ts
  61. +5
    -1
      matsen-tool/src/app/core/api/v1/model/partnerFollow.ts
  62. +5
    -1
      matsen-tool/src/app/core/api/v1/model/partnerFollowJsonhal.ts
  63. +5
    -1
      matsen-tool/src/app/core/api/v1/model/partnerFollowJsonld.ts
  64. +1
    -1
      matsen-tool/src/app/core/api/v1/model/partnerJsonhal.ts
  65. +10
    -2
      matsen-tool/src/app/core/api/v1/model/partnerProduct.ts
  66. +10
    -2
      matsen-tool/src/app/core/api/v1/model/partnerProductJsonhal.ts
  67. +10
    -2
      matsen-tool/src/app/core/api/v1/model/partnerProductJsonld.ts
  68. +11
    -0
      matsen-tool/src/app/core/api/v1/model/post.ts
  69. +11
    -0
      matsen-tool/src/app/core/api/v1/model/postJsonhal.ts
  70. +11
    -0
      matsen-tool/src/app/core/api/v1/model/postJsonld.ts
  71. +1
    -0
      matsen-tool/src/app/core/api/v1/model/saleSummary.ts
  72. +1
    -0
      matsen-tool/src/app/core/api/v1/model/saleSummaryJsonhal.ts
  73. +3
    -0
      matsen-tool/src/app/core/api/v1/model/saleSummaryJsonld.ts
  74. +5
    -1
      matsen-tool/src/app/core/api/v1/model/userProduct.ts
  75. +5
    -1
      matsen-tool/src/app/core/api/v1/model/userProductJsonhal.ts
  76. +5
    -1
      matsen-tool/src/app/core/api/v1/model/userProductJsonld.ts

+ 1
- 1
matsen-tool/openapi.json
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 184
- 60
matsen-tool/openapi.yaml Dosyayı Görüntüle

@@ -1398,6 +1398,32 @@ paths:
style: form
explode: true
allowReserved: false
-
name: partner.type
in: query
description: ''
required: false
deprecated: false
allowEmptyValue: true
schema:
type: string
style: form
explode: false
allowReserved: false
-
name: 'partner.type[]'
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_partner_follows_post
@@ -1645,6 +1671,32 @@ paths:
style: form
explode: false
allowReserved: false
-
name: partner.type
in: query
description: ''
required: false
deprecated: false
allowEmptyValue: true
schema:
type: string
style: form
explode: false
allowReserved: false
-
name: 'partner.type[]'
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_partner_products_post
@@ -2692,6 +2744,46 @@ paths:
allowReserved: false
deprecated: false
parameters: []
'/api/sale_summaries/{userId}':
get:
operationId: api_sale_summaries_userId_get
tags:
- SaleSummary
responses:
200:
description: 'SaleSummary resource'
content:
application/ld+json:
schema:
$ref: '#/components/schemas/SaleSummary.jsonld'
application/json:
schema:
$ref: '#/components/schemas/SaleSummary'
text/html:
schema:
$ref: '#/components/schemas/SaleSummary'
application/hal+json:
schema:
$ref: '#/components/schemas/SaleSummary.jsonhal'
404:
description: 'Resource not found'
summary: 'Retrieves a SaleSummary resource.'
description: 'Retrieves a SaleSummary resource.'
parameters:
-
name: userId
in: path
description: 'SaleSummary identifier'
required: true
deprecated: false
allowEmptyValue: false
schema:
type: string
style: simple
explode: false
allowReserved: false
deprecated: false
parameters: []
/api/sales:
get:
operationId: api_sales_get_collection
@@ -3595,6 +3687,21 @@ paths:
style: form
explode: true
allowReserved: false
-
name: 'order[product.name]'
in: query
description: ''
required: false
deprecated: false
allowEmptyValue: true
schema:
type: string
enum:
- asc
- desc
style: form
explode: false
allowReserved: false
deprecated: false
post:
operationId: api_user_products_post
@@ -5162,11 +5269,8 @@ components:
- string
- 'null'
partner:
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
description: '?PartnerApi'
$ref: '#/components/schemas/Partner'
partnerName:
readOnly: true
type:
@@ -5214,11 +5318,8 @@ components:
- string
- 'null'
partner:
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
description: '?PartnerApi'
$ref: '#/components/schemas/Partner.jsonhal'
partnerName:
readOnly: true
type:
@@ -5280,11 +5381,8 @@ components:
- string
- 'null'
partner:
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
description: '?PartnerApi'
$ref: '#/components/schemas/Partner.jsonld'
partnerName:
readOnly: true
type:
@@ -5314,22 +5412,16 @@ components:
- product
properties:
partner:
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
description: '?PartnerApi'
$ref: '#/components/schemas/Partner'
partnerName:
readOnly: true
type:
- string
- 'null'
product:
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
description: '?ProductApi'
$ref: '#/components/schemas/Product'
productName:
readOnly: true
type:
@@ -5359,22 +5451,16 @@ components:
type: string
format: iri-reference
partner:
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
description: '?PartnerApi'
$ref: '#/components/schemas/Partner.jsonhal'
partnerName:
readOnly: true
type:
- string
- 'null'
product:
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
description: '?ProductApi'
$ref: '#/components/schemas/Product.jsonhal'
productName:
readOnly: true
type:
@@ -5418,22 +5504,16 @@ components:
readOnly: true
type: string
partner:
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
description: '?PartnerApi'
$ref: '#/components/schemas/Partner.jsonld'
partnerName:
readOnly: true
type:
- string
- 'null'
product:
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
description: '?ProductApi'
$ref: '#/components/schemas/Product.jsonld'
productName:
readOnly: true
type:
@@ -5484,6 +5564,16 @@ components:
type:
- string
- 'null'
partnerType:
readOnly: true
type:
- string
- 'null'
enum:
- customer
- supplier
- service
- null
product:
type:
- string
@@ -5623,6 +5713,16 @@ components:
type:
- string
- 'null'
partnerType:
readOnly: true
type:
- string
- 'null'
enum:
- customer
- supplier
- service
- null
product:
type:
- string
@@ -5769,6 +5869,16 @@ components:
type:
- string
- 'null'
partnerType:
readOnly: true
type:
- string
- 'null'
enum:
- customer
- supplier
- service
- null
product:
type:
- string
@@ -6276,6 +6386,8 @@ components:
description: ''
deprecated: false
properties:
userId:
type: integer
owner:
type:
- string
@@ -6308,6 +6420,8 @@ components:
href:
type: string
format: iri-reference
userId:
type: integer
owner:
type:
- string
@@ -6337,6 +6451,25 @@ components:
'@type':
readOnly: true
type: string
'@context':
readOnly: true
oneOf:
-
type: string
-
type: object
properties:
'@vocab':
type: string
hydra:
type: string
enum: ['http://www.w3.org/ns/hydra/core#']
required:
- '@vocab'
- hydra
additionalProperties: true
userId:
type: integer
owner:
type:
- string
@@ -7027,11 +7160,8 @@ components:
- string
- 'null'
product:
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
description: '?ProductApi'
$ref: '#/components/schemas/Product'
productName:
readOnly: true
type:
@@ -7079,11 +7209,8 @@ components:
- string
- 'null'
product:
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
description: '?ProductApi'
$ref: '#/components/schemas/Product.jsonhal'
productName:
readOnly: true
type:
@@ -7145,11 +7272,8 @@ components:
- string
- 'null'
product:
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
description: '?ProductApi'
$ref: '#/components/schemas/Product.jsonld'
productName:
readOnly: true
type:


+ 4
- 4
matsen-tool/src/app/_components/layout/two-column/two-column.component.html Dosyayı Görüntüle

@@ -23,28 +23,28 @@
</a>
</li>
<li class="nav-item mb-3">
<a class="card" routerLink="/products" routerLinkActive="active">
<a class="card" routerLink="/product" routerLinkActive="active">
<div class="card-body position-relative bi bi-droplet-fill">
<h3 class="position-absolute m-0">{{'basic.products' | translate}}</h3>
</div>
</a>
</li>
<li class="nav-item mb-3">
<a class="card" routerLink="/tasks" routerLinkActive="active">
<a class="card" routerLink="/task" routerLinkActive="active">
<div class="card-body position-relative bi bi-list-check">
<h3 class="position-absolute m-0">{{'basic.tasks' | translate}}</h3>
</div>
</a>
</li>
<li class="nav-item mb-3">
<a class="card" routerLink="/documents" routerLinkActive="active">
<a class="card" routerLink="/document" routerLinkActive="active">
<div class="card-body position-relative bi bi-journals">
<h3 class="position-absolute m-0">{{'basic.documents' | translate}}</h3>
</div>
</a>
</li>
<li class="nav-item mb-3">
<a class="card" routerLink="/sales" routerLinkActive="active">
<a class="card" routerLink="/sale" routerLinkActive="active">
<div class="card-body position-relative bi bi-journals">
<h3 class="position-absolute m-0">{{'basic.sales' | translate}}</h3>
</div>


+ 1
- 1
matsen-tool/src/app/_components/toggle/toggle.component.html Dosyayı Görüntüle

@@ -1,4 +1,4 @@
<div class="toggle-component">
<div class="toggle-component" (click)="openToggle()">
<div class="toggle collapsed" data-bs-toggle="collapse" [attr.data-bs-target]="'#collapse-' + toggleId"
aria-expanded="false">
<h2>{{ headline }}</h2>


+ 6
- 0
matsen-tool/src/app/_components/toggle/toggle.component.ts Dosyayı Görüntüle

@@ -9,8 +9,14 @@ import {ContactJsonld} from "@app/core/api/v1";
export class ToggleComponent {
@Input() public headline!: string;

public isOpened: boolean = false;
protected toggleId: string;

constructor() {
this.toggleId = uuidv4();
}

openToggle() {
this.isOpened = true;
}
}

+ 6
- 0
matsen-tool/src/app/_forms/apiForms.ts Dosyayı Görüntüle

@@ -286,6 +286,7 @@ export const postForm = new FormGroup({
ownerName: new FormControl(null, []),
partner: new FormControl(null, []),
partnerName: new FormControl(null, []),
partnerType: new FormControl(null, []),
product: new FormControl(null, []),
productName: new FormControl(null, []),
contact: new FormControl(null, []),
@@ -316,6 +317,7 @@ export const postJsonhalForm = new FormGroup({
ownerName: new FormControl(null, []),
partner: new FormControl(null, []),
partnerName: new FormControl(null, []),
partnerType: new FormControl(null, []),
product: new FormControl(null, []),
productName: new FormControl(null, []),
contact: new FormControl(null, []),
@@ -341,6 +343,7 @@ export const postJsonldForm = new FormGroup({
ownerName: new FormControl(null, []),
partner: new FormControl(null, []),
partnerName: new FormControl(null, []),
partnerType: new FormControl(null, []),
product: new FormControl(null, []),
productName: new FormControl(null, []),
contact: new FormControl(null, []),
@@ -439,6 +442,7 @@ export const saleJsonldForm = new FormGroup({
});

export const saleSummaryForm = new FormGroup({
userId: new FormControl(null, []),
owner: new FormControl(null, []),
ownerName: new FormControl(null, []),
turnover: new FormControl(null, []),
@@ -447,6 +451,7 @@ export const saleSummaryForm = new FormGroup({

export const saleSummaryJsonhalForm = new FormGroup({
_links: new FormControl(null, []),
userId: new FormControl(null, []),
owner: new FormControl(null, []),
ownerName: new FormControl(null, []),
turnover: new FormControl(null, []),
@@ -454,6 +459,7 @@ export const saleSummaryJsonhalForm = new FormGroup({
});

export const saleSummaryJsonldForm = new FormGroup({
userId: new FormControl(null, []),
owner: new FormControl(null, []),
ownerName: new FormControl(null, []),
turnover: new FormControl(null, []),


+ 17
- 0
matsen-tool/src/app/_guards/admin.guard.spec.ts Dosyayı Görüntüle

@@ -0,0 +1,17 @@
import { TestBed } from '@angular/core/testing';
import { CanActivateFn } from '@angular/router';

import { adminGuard } from './admin.guard';

describe('adminGuard', () => {
const executeGuard: CanActivateFn = (...guardParameters) =>
TestBed.runInInjectionContext(() => adminGuard(...guardParameters));

beforeEach(() => {
TestBed.configureTestingModule({});
});

it('should be created', () => {
expect(executeGuard).toBeTruthy();
});
});

+ 12
- 0
matsen-tool/src/app/_guards/admin.guard.ts Dosyayı Görüntüle

@@ -0,0 +1,12 @@
import {CanActivateFn, Router} from '@angular/router';
import {inject} from "@angular/core";
import {AccountService} from "@app/_services";

export const adminGuard: CanActivateFn = (route, state) => {
const accountService = inject(AccountService);
if (accountService.isLoggedIn() && accountService.isUserAdmin()) {
return true;
}
inject(Router).navigate(['/account/login'], { queryParams: { returnUrl: state.url }});
return false;
};

+ 17
- 0
matsen-tool/src/app/_guards/sales.guard.spec.ts Dosyayı Görüntüle

@@ -0,0 +1,17 @@
import { TestBed } from '@angular/core/testing';
import { CanActivateFn } from '@angular/router';

import { salesGuard } from './sales.guard';

describe('salesGuard', () => {
const executeGuard: CanActivateFn = (...guardParameters) =>
TestBed.runInInjectionContext(() => salesGuard(...guardParameters));

beforeEach(() => {
TestBed.configureTestingModule({});
});

it('should be created', () => {
expect(executeGuard).toBeTruthy();
});
});

+ 13
- 0
matsen-tool/src/app/_guards/sales.guard.ts Dosyayı Görüntüle

@@ -0,0 +1,13 @@
import {CanActivateFn, Router} from '@angular/router';
import {inject} from "@angular/core";
import {AccountService} from "@app/_services";
import {Role} from "@app/_helpers/role";

export const salesGuard: CanActivateFn = (route, state) => {
const accountService = inject(AccountService);
if (accountService.isLoggedIn() && accountService.userHasRole(Role.ROLE_ADMIN)) {
return true;
}
inject(Router).navigate(['/account/login'], { queryParams: { returnUrl: state.url }});
return false;
};

+ 17
- 0
matsen-tool/src/app/_guards/user.guard.spec.ts Dosyayı Görüntüle

@@ -0,0 +1,17 @@
import { TestBed } from '@angular/core/testing';
import { CanActivateFn } from '@angular/router';

import { userGuard } from './user.guard';

describe('userGuardGuard', () => {
const executeGuard: CanActivateFn = (...guardParameters) =>
TestBed.runInInjectionContext(() => userGuard(...guardParameters));

beforeEach(() => {
TestBed.configureTestingModule({});
});

it('should be created', () => {
expect(executeGuard).toBeTruthy();
});
});

+ 13
- 0
matsen-tool/src/app/_guards/user.guard.ts Dosyayı Görüntüle

@@ -0,0 +1,13 @@
import {CanActivateFn, Router} from '@angular/router';
import {inject} from "@angular/core";
import {AccountService} from "@app/_services";
import {Role} from "@app/_helpers/role";

export const userGuard: CanActivateFn = (route, state) => {
const accountService = inject(AccountService);
if (accountService.isLoggedIn() && accountService.userHasRole(Role.ROLE_USER)) {
return true;
}
inject(Router).navigate(['/account/login'], { queryParams: { returnUrl: state.url }});
return false;
};

+ 0
- 24
matsen-tool/src/app/_helpers/auth.guard.ts Dosyayı Görüntüle

@@ -1,24 +0,0 @@
import { Injectable } from '@angular/core';
import { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';

import { AccountService } from '@app/_services';

@Injectable({ providedIn: 'root' })
export class AuthGuard implements CanActivate {
constructor(
private router: Router,
private accountService: AccountService
) {}

canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
const user = this.accountService.userValue;
if (user) {
// authorised so return true
return true;
}

// not logged in so redirect to login page with the return url
this.router.navigate(['/account/login'], { queryParams: { returnUrl: state.url }});
return false;
}
}

+ 1
- 2
matsen-tool/src/app/_helpers/index.ts Dosyayı Görüntüle

@@ -1,3 +1,2 @@
export * from './auth.guard';
export * from './error.interceptor';
export * from './error.interceptor';
export * from './jwt.interceptor';

+ 6
- 0
matsen-tool/src/app/_helpers/role.ts Dosyayı Görüntüle

@@ -0,0 +1,6 @@

export class Role {
public static ROLE_ADMIN: string = 'ROLE_ADMIN';
public static ROLE_USER: string = 'ROLE_USER';
public static ROLE_SALES: string = 'ROLE_SALES';
}

+ 12
- 0
matsen-tool/src/app/_services/account.service.ts Dosyayı Görüntüle

@@ -9,6 +9,7 @@ import { User } from '@app/_models';

@Injectable({ providedIn: 'root' })
export class AccountService {

private userSubject: BehaviorSubject<User | null>;
public user: Observable<User | null>;

@@ -41,6 +42,10 @@ export class AccountService {
this.router.navigate(['/account/login']);
}

isLoggedIn() {
return this.userValue !== null;
}

isUserAdmin(): boolean {
if (this.userValue && this.userValue?.roles) {
return this.userValue?.roles?.includes('ROLE_ADMIN');
@@ -48,6 +53,13 @@ export class AccountService {
return false;
}

userHasRole(role: string): boolean {
if (this.userValue && this.userValue?.roles) {
return this.userValue?.roles?.includes(role);
}
return false;
}

register(user: User) {
return this.http.post(`${environment.apiUrl}/users/register`, user);
}


+ 1
- 1
matsen-tool/src/app/_views/contacts/contact-list/contact-list.component.ts Dosyayı Görüntüle

@@ -59,6 +59,6 @@ export class ContactListComponent implements OnInit, AfterViewInit {

navigateToContactDetails(element: any) {
const contact: ContactJsonld = element as ContactJsonld;
this.router.navigate(['/contacts', this.appHelperService.extractId(contact.id)]);
this.router.navigate(['/contact', this.appHelperService.extractId(contact.id)]);
}
}

+ 1
- 1
matsen-tool/src/app/_views/contacts/contacts-detail/contacts-detail.component.html Dosyayı Görüntüle

@@ -32,7 +32,7 @@
</div>
</div>
<app-toggle #togglePosts [headline]="'basic.posts' | translate">
<app-post-list *ngIf="contact" #postListComponent
<app-post-list *ngIf="togglePosts.isOpened" #postListComponent
[partner]="partner"
[contact]="contact"
></app-post-list>


+ 1
- 1
matsen-tool/src/app/_views/contacts/contacts-detail/contacts-detail.component.ts Dosyayı Görüntüle

@@ -20,7 +20,7 @@ import {ToggleComponent} from "@app/_components/toggle/toggle.component";
styleUrl: './contacts-detail.component.scss'
})
export class ContactsDetailComponent implements OnInit, AfterViewInit {
@ViewChild("togglePosts", { static: true }) togglePosts: ToggleComponent = new ToggleComponent();
@ViewChild("togglePosts", { static: true }) togglePosts!: ToggleComponent;
@ViewChild("postListComponent", { static: false }) postsComponent!: PostListComponent;

protected user: User | null;


+ 3
- 11
matsen-tool/src/app/_views/home/home.component.html Dosyayı Görüntüle

@@ -36,21 +36,21 @@
<div class="container mb-5">
<div class="row pt-4 pb-4 d-flex">
<div class="col d-flex">
<a class="card" routerLink="/products" routerLinkActive="active">
<a class="card" routerLink="/product" routerLinkActive="active">
<div class="card-body position-relative bi bi-droplet-fill">
<h3 class="position-absolute m-0">{{ 'basic.products' | translate }}</h3>
</div>
</a>
</div>
<div class="col d-flex">
<a class="card" routerLink="/tasks" routerLinkActive="active">
<a class="card" routerLink="/task" routerLinkActive="active">
<div class="card-body position-relative bi bi-list-check">
<h3 class="position-absolute m-0">{{ 'basic.tasks' | translate }}</h3>
</div>
</a>
</div>
<div class="col d-flex">
<a class="card" routerLink="/documents" routerLinkActive="active">
<a class="card" routerLink="/document" routerLinkActive="active">
<div class="card-body position-relative bi bi-journals">
<h3 class="position-absolute m-0">{{ 'basic.documents' | translate }}</h3>
</div>
@@ -59,12 +59,4 @@
</div>
</div>
</div>

<div class="container spt-container">
<app-toggle #toggleTasks [headline]="('user.my' | translate) + ' ' + ('basic.tasks' | translate)">
<app-task-list #taskListComponent
[user]="user?.userResource">
</app-task-list>
</app-toggle>
</div>
</div>

+ 0
- 3
matsen-tool/src/app/_views/home/home.component.ts Dosyayı Görüntüle

@@ -12,9 +12,6 @@ import {TaskListComponent} from "@app/_views/tasks/task-list/task-list.component
})
export class HomeComponent implements OnInit, AfterViewInit {

@ViewChild("toggleTasks", { static: true }) toggleTasks: ToggleComponent = new ToggleComponent();
@ViewChild("taskListComponent", { static: false }) taskListComponent!: TaskListComponent;

protected user: User | null;

constructor(


+ 67
- 3
matsen-tool/src/app/_views/partners/partner-list/partner-list.component.ts Dosyayı Görüntüle

@@ -3,7 +3,14 @@ import {PagingComponent} from "@app/_components/paging/paging.component";
import {AppHelperService} from "@app/_helpers/app-helper.service";
import {MatSort, Sort} from "@angular/material/sort";
import {Subscription} from "rxjs";
import {PartnerJsonld, PartnerService} from "@app/core/api/v1";
import {
PartnerFollowService,
PartnerJsonld,
PartnerProductService,
PartnerService,
ProductJsonld,
UserJsonld
} from "@app/core/api/v1";
import {OrderFilter} from "@app/_models/orderFilter";
import {ActivatedRoute, Router} from "@angular/router";
import {NgbModal} from "@ng-bootstrap/ng-bootstrap";
@@ -20,6 +27,8 @@ import TypeEnum = PartnerJsonld.PartnerTypeEnum;
})
export class PartnerListComponent implements OnInit, AfterViewInit {

@Input() public user!: UserJsonld;
@Input() public product!: ProductJsonld;
@Input("partnerType") partnerType!: string;
@ViewChild(MatSort) sort;
@ViewChild("pagingComponent", { static: false }) pagingComponent!: PagingComponent;
@@ -36,8 +45,9 @@ export class PartnerListComponent implements OnInit, AfterViewInit {
protected displayedColumns!: string[];

constructor(
private route: ActivatedRoute,
private partnerService: PartnerService,
private partnerFollowService: PartnerFollowService,
private partnerProductService: PartnerProductService,
private router: Router,
private translateService: TranslateService,
protected appHelperService: AppHelperService,
@@ -68,6 +78,16 @@ export class PartnerListComponent implements OnInit, AfterViewInit {
}

getData = () => {
if (this.user !== undefined) {
this.getUserPartnerData();
} else if (this.product !== undefined) {
this.getPartnerProducts();
} else {
this.getPartnerData();
}
}

getPartnerData = () => {
this.partnersSub = this.partnerService.partnersGetCollection(
this.pagingComponent.getPageIndex(),
this.pagingComponent.getPageSize(),
@@ -84,7 +104,51 @@ export class PartnerListComponent implements OnInit, AfterViewInit {
this.pagingComponent.dataLength = Number(data["hydra:totalItems"]);
}
);
// switch over this.dataType (customers, etc.)
}

getUserPartnerData = () => {
this.partnersSub = this.partnerFollowService.partnerFollowsGetCollection(
this.pagingComponent.getPageIndex(),
this.pagingComponent.getPageSize(),
undefined,
undefined,
this.user.id,
undefined,
this.partnerType
).subscribe(
data => {
let partnerFollows = data["hydra:member"];
this.partners = [];
partnerFollows.forEach(item => {
this.partners.push(item.partner);
});
this.dataSource = new MatTableDataSource<PartnerJsonld>(this.partners);
this.pagingComponent.dataLength = Number(data["hydra:totalItems"]);
}
);
}

getPartnerProducts = () => {
this.partnersSub = this.partnerProductService.partnerProductsGetCollection(
this.pagingComponent.getPageIndex(),
this.pagingComponent.getPageSize(),
undefined,
undefined,
this.product.id,
undefined,
undefined,
this.partnerType
).subscribe(
data => {
let partnerProducts = data["hydra:member"];
this.partners = [];
partnerProducts.forEach(item => {
this.partners.push(item.partner);
});
this.dataSource = new MatTableDataSource<PartnerJsonld>(this.partners);
this.pagingComponent.dataLength = Number(data["hydra:totalItems"]);
}
);
}

onSortChange = (sortState: Sort) => {


+ 16
- 15
matsen-tool/src/app/_views/partners/partners-detail/partners-detail.component.html Dosyayı Görüntüle

@@ -45,30 +45,31 @@
<p [innerHTML]="appHelperService.getSafeLongtext(partner.description)"></p>
</div>
</div>
<div class="card-body row" *ngIf="partnerProducts">
<div class="col-12">
<ul *ngFor="let partnerProduct of partnerProducts">
<li><a href="/products/{{this.appHelperService.extractId(partnerProduct.product)}}">{{partnerProduct.productName}}</a></li>
</ul>
</div>
</div>
</div>
</div>
<app-toggle #toggleProducts [headline]="'basic.products' | translate">
<app-product-list *ngIf="toggleProducts.isOpened" #productListComponent
[partner]="partner">
</app-product-list>
</app-toggle>

<app-toggle #toggleContacts [headline]="'basic.contacts' | translate">
<app-contact-list *ngIf="partner" #contactListComponent
[partner]="partner">
<app-contact-list *ngIf="toggleContacts.isOpened" #contactListComponent
[partner]="partner">
</app-contact-list>
</app-toggle>

<app-toggle #toggleTasks [headline]="'basic.tasks' | translate">
<app-task-list *ngIf="partner" #taskListComponent
[partner]="partner">
<app-task-list *ngIf="toggleTasks.isOpened" #taskListComponent
[partner]="partner">
</app-task-list>
</app-toggle>

<app-toggle #togglePosts [headline]="'basic.posts' | translate">
<app-post-list *ngIf="partner" #postListComponent
[partner]="partner"
[existsContact]="false"
[existsSale]="false">
<app-post-list *ngIf="togglePosts.isOpened" #postListComponent
[partner]="partner"
[existsContact]="false"
[existsSale]="false"
>
</app-post-list>
</app-toggle>

+ 24
- 42
matsen-tool/src/app/_views/partners/partners-detail/partners-detail.component.ts Dosyayı Görüntüle

@@ -1,10 +1,9 @@
import {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';
import {NgbModal, NgbModalOptions} from "@ng-bootstrap/ng-bootstrap";
import {ActivatedRoute, Router} from "@angular/router";
import {NgbModal} from "@ng-bootstrap/ng-bootstrap";
import {ActivatedRoute} from "@angular/router";
import {
PartnerFollowJsonld, PartnerFollowService,
PartnerJsonld, PartnerProductJsonld, PartnerProductService,
PartnerService
PartnerJsonld, PartnerService
} from "@app/core/api/v1";
import {Subscription} from "rxjs";
import {environment} from "@environments/environment";
@@ -17,6 +16,8 @@ import {ToggleComponent} from "@app/_components/toggle/toggle.component";
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 {NewTaskComponent} from "@app/_views/tasks/new-task/new-task.component";

@Component({
selector: 'app-partners-detail',
@@ -24,11 +25,14 @@ import {TaskListComponent} from "@app/_views/tasks/task-list/task-list.component
styleUrl: './partners-detail.component.scss'
})
export class PartnersDetailComponent implements OnInit, AfterViewInit {
@ViewChild("toggleContacts", { static: true }) toggleContacts: ToggleComponent = new ToggleComponent();

@ViewChild("toggleProducts", { static: true }) toggleProducts!: ToggleComponent;
@ViewChild("productListComponent", { static: false }) productsComponent!: ProductListComponent;
@ViewChild("toggleContacts", { static: true }) toggleContacts!: ToggleComponent;
@ViewChild("contactListComponent", { static: false }) contactsComponent!: ContactListComponent;
@ViewChild("toggleTasks", { static: true }) toggleTasks: ToggleComponent = new ToggleComponent();
@ViewChild("toggleTasks", { static: true }) toggleTasks!: ToggleComponent;
@ViewChild("taskListComponent", { static: false }) taskListComponent!: TaskListComponent;
@ViewChild("togglePosts", { static: true }) togglePosts: ToggleComponent = new ToggleComponent();
@ViewChild("togglePosts", { static: true }) togglePosts!: ToggleComponent;
@ViewChild("postListComponent", { static: false }) postsComponent!: PostListComponent;

protected user: User | null;
@@ -38,26 +42,19 @@ export class PartnersDetailComponent implements OnInit, AfterViewInit {

protected partnerDetailSub: Subscription;
protected partner!: PartnerJsonld;
protected partnerProductSub: Subscription;
protected partnerProducts: Array<PartnerProductJsonld>;
protected partnerFollowSub: Subscription;
protected partnerFollow: PartnerFollowJsonld | null;

constructor(
private router: Router,
private accountService: AccountService,
private modalService: NgbModal,
private route: ActivatedRoute,
private partnerService: PartnerService,
private partnerProductService: PartnerProductService,
private partnerFollowService: PartnerFollowService,
protected appHelperService: AppHelperService
) {
this.partnerDetailSub = new Subscription();

this.partnerProductSub = new Subscription();
this.partnerProducts = [];

this.partnerFollowSub = new Subscription();
this.partnerFollow = null;

@@ -68,47 +65,28 @@ export class PartnersDetailComponent implements OnInit, AfterViewInit {
this.route.params.subscribe(params => {
this.partnerId = params['id'];
});
this.getPartnerData();
this.getPartnerProducts();
this.getPartnerFollowedStatus();
this.getData();
}

ngAfterViewInit() {

}

getPartnerData() {
this.partnerDetailSub = this.partnerService.partnersIdGet(
this.partnerId
).subscribe(
data => {
this.partner = data;
}
);
getData = () => {
this.getPartnerData();
this.getPartnerFollowedStatus();
}

getPartnerProducts() {
this.partnerProductSub = this.partnerProductService.partnerProductsGetCollection(
1,
50,
getPartnerData = () => {
this.partnerDetailSub = this.partnerService.partnersIdGet(
this.partnerId
).subscribe(
data => {
this.partnerProducts = data["hydra:member"];
this.partner = data;
}
);
}

openModalEditPartner() {
const modalRef = this.modalService.open(NewPartnerComponent, this.appHelperService.getModalOptions());
modalRef.componentInstance.partner = this.partner;
modalRef.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
if (modalStatus === ModalStatus.Submitted) {
modalRef.dismiss();
this.getPartnerData();
}
});
}

getPartnerFollowedStatus() {
this.partnerFollowSub = this.partnerFollowService.partnerFollowsGetCollection(
1,
@@ -130,7 +108,7 @@ export class PartnersDetailComponent implements OnInit, AfterViewInit {
if (this.partnerFollow === null) {
this.partnerFollowSub = this.partnerFollowService.partnerFollowsPost(
{
partner: this.partner.id,
partner: this.partner,
contact: null,
partnerProduct: null
} as PartnerFollowJsonld
@@ -149,4 +127,8 @@ export class PartnersDetailComponent implements OnInit, AfterViewInit {
);
}
}

openModalEditPartner() {
this.appHelperService.openModal(NewPartnerComponent, { 'partner': this.partner }, this.getData);
}
}

+ 2
- 0
matsen-tool/src/app/_views/posts/post-list/post-list.component.html Dosyayı Görüntüle

@@ -9,6 +9,8 @@
<div class="card">
<div class="card-body">
<div class="d-flex justify-content-between align-items-center">
<h3 class="m-0"><a href="/{{post.partnerType}}/{{this.appHelperService.extractId(post.partner)}}">{{post.partnerName}}</a></h3>
<h3 class="m-0" *ngIf="post.contact"><a href="/contact/{{this.appHelperService.extractId(post.contact)}}">{{contact.firstName}} {{contact.lastName}}</a></h3>
<p>{{ post.createdAt | date:'dd.MM.YYYY' }}</p>
<p>{{ post.ownerName }}</p>
</div>


+ 0
- 4
matsen-tool/src/app/_views/posts/post-list/post-list.component.ts Dosyayı Görüntüle

@@ -38,13 +38,9 @@ export class PostListComponent implements OnInit, AfterViewInit {
protected partnerProducts: Array<PartnerProductJsonld>;
protected dataSource;
protected commentsVisibility: Map<string, boolean>;
protected modalOptions: NgbModalOptions = {
centered: true
};

constructor(
private postService: PostService,
private modalService: NgbModal,
protected appHelperService: AppHelperService
) {
this.postsSub = new Subscription();


+ 63
- 4
matsen-tool/src/app/_views/products/product-list/product-list.component.ts Dosyayı Görüntüle

@@ -1,8 +1,15 @@
import {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';
import {AfterViewInit, Component, Input, OnInit, ViewChild} from '@angular/core';
import {MatSort, Sort} from "@angular/material/sort";
import {PagingComponent} from "@app/_components/paging/paging.component";
import {Subscription} from "rxjs";
import {ProductJsonld, ProductService} from "@app/core/api/v1";
import {
PartnerJsonld,
PartnerProductService,
ProductJsonld,
ProductService,
UserJsonld,
UserProductService
} from "@app/core/api/v1";
import {Router} from "@angular/router";
import {AppHelperService} from "@app/_helpers/app-helper.service";
import {MatTableDataSource} from "@angular/material/table";
@@ -16,6 +23,8 @@ import {NewProductComponent} from "@app/_views/products/new-product/new-product.
})
export class ProductListComponent implements OnInit, AfterViewInit {

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

@@ -28,6 +37,8 @@ export class ProductListComponent implements OnInit, AfterViewInit {
constructor(
private router: Router,
private productService: ProductService,
private userProductService: UserProductService,
private partnerProductService: PartnerProductService,
protected appHelperService: AppHelperService,
) {
this.sort = new MatSort();
@@ -48,14 +59,62 @@ export class ProductListComponent implements OnInit, AfterViewInit {
}

getData = () => {
if (this.user !== undefined) {
this.getUserProducts();
} else if (this.partner !== undefined) {
this.getPartnerProducts();
} else {
this.getProducts();
}
}

getUserProducts = () => {
this.productsSub = this.userProductService.userProductsGetCollection(
this.pagingComponent.getPageIndex(),
this.pagingComponent.getPageSize(),
this.user.id,
).subscribe(
data => {
let userProducts = data["hydra:member"];
this.products = [];
userProducts.forEach(item => {
this.products.push(item.product);
})
this.pagingComponent.dataLength = Number(data["hydra:totalItems"]);
this.dataSource = new MatTableDataSource<ProductJsonld>(this.products);
}
);
}

getPartnerProducts = () => {
this.productsSub = this.partnerProductService.partnerProductsGetCollection(
this.pagingComponent.getPageIndex(),
this.pagingComponent.getPageSize(),
this.partner.id,
).subscribe(
data => {
console.log(data);
let partnerProducts = data["hydra:member"];
this.products = [];
partnerProducts.forEach(item => {
this.products.push(item.product);
})
console.log(this.products);
this.pagingComponent.dataLength = Number(data["hydra:totalItems"]);
this.dataSource = new MatTableDataSource<ProductJsonld>(this.products);
}
);
}

getProducts = () => {
this.productsSub = this.productService.productsGetCollection(
this.pagingComponent.getPageIndex(),
this.pagingComponent.getPageSize()
).subscribe(
data => {
this.products = data["hydra:member"];
this.dataSource = new MatTableDataSource<ProductJsonld>(this.products);
this.pagingComponent.dataLength = Number(data["hydra:totalItems"]);
this.dataSource = new MatTableDataSource<ProductJsonld>(this.products);
}
);
}
@@ -74,7 +133,7 @@ export class ProductListComponent implements OnInit, AfterViewInit {

navigateToProductDetails(element: any) {
const product: ProductJsonld = element as ProductJsonld;
this.router.navigate(['/products', this.appHelperService.extractId(product.id)]);
this.router.navigate(['/product', this.appHelperService.extractId(product.id)]);
}

openModalNewProduct() {


+ 24
- 1
matsen-tool/src/app/_views/products/products-detail/products-detail.component.html Dosyayı Görüntüle

@@ -33,4 +33,27 @@
(click)="openModalEditProduct()"></span>
</div>
</div>
</div>
</div>
<app-toggle #toggleCustomers [headline]="'basic.customer' | translate">
<app-partner-list *ngIf="toggleCustomers.isOpened" #customerListComponent
[product]="product"
[partnerType]="'customer'"
>
</app-partner-list>
</app-toggle>

<app-toggle #toggleSuppliers [headline]="'basic.supplier' | translate">
<app-partner-list *ngIf="toggleSuppliers.isOpened" #suppliersListComponent
[product]="product"
[partnerType]="'supplier'"
>
</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>

+ 35
- 40
matsen-tool/src/app/_views/products/products-detail/products-detail.component.ts Dosyayı Görüntüle

@@ -1,7 +1,7 @@
import {AfterViewInit, Component, OnInit} from '@angular/core';
import {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';
import {environment} from "@environments/environment";
import {ActivatedRoute} from "@angular/router";
import {Subscription} from "rxjs";
import {Subscription, switchMap} from "rxjs";
import {
ProductJsonld,
ProductService,
@@ -14,6 +14,9 @@ import {NewProductComponent} from "@app/_views/products/new-product/new-product.
import {User} from "@app/_models";
import {AccountService} from "@app/_services";
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";

@Component({
selector: 'app-products-detail',
@@ -21,28 +24,31 @@ import {AppHelperService} from "@app/_helpers/app-helper.service";
styleUrl: './products-detail.component.scss'
})
export class ProductsDetailComponent implements OnInit, AfterViewInit {

@ViewChild("toggleCustomers", { static: true }) toggleCustomers!: ToggleComponent;
@ViewChild("customerListComponent", { static: false }) customerListComponent!: PartnerListComponent;
@ViewChild("toggleSuppliers", { static: true }) toggleSuppliers!: ToggleComponent;
@ViewChild("suppliersListComponent", { static: false }) suppliersListComponent!: PartnerListComponent;
@ViewChild("toggleServices", { static: true }) toggleServices!: ToggleComponent;
@ViewChild("servicesListComponent", { static: false }) servicesListComponent!: PartnerListComponent;

protected readonly environment = environment;

protected id: string;
protected productId: string;
protected productDetailSub: Subscription;
protected product: ProductJsonld;
protected userProductSub: Subscription;
protected userProduct: UserProductJsonld | null;
protected user: User | null;

protected modalOptions: NgbModalOptions = {
centered: true
};

constructor(
private route: ActivatedRoute,
private accountService: AccountService,
private productService: ProductService,
private userProductService: UserProductService,
private modalService: NgbModal,
protected appHelperService: AppHelperService,
) {
this.id = "";
this.productId = "";
this.user = this.accountService.userValue;
this.productDetailSub = new Subscription();
this.product = {} as ProductJsonld;
@@ -53,10 +59,9 @@ export class ProductsDetailComponent implements OnInit, AfterViewInit {

ngOnInit() {
this.route.params.subscribe(params => {
this.id = params['id'];
this.productId = params['id'];
});
this.getProductData();
this.getUserProductStatus();
this.getData();

}

@@ -64,31 +69,28 @@ export class ProductsDetailComponent implements OnInit, AfterViewInit {

}

getProductData() {
getData = () => {
this.productDetailSub = this.productService.productsIdGet(
this.id
).subscribe(
data => {
this.productId
).pipe(
switchMap(data => {
this.product = data;
}
);
}

getUserProductStatus() {
this.userProductSub = this.userProductService.userProductsGetCollection(
1,
50,
this.user?.id,
undefined,
this.product.id
return this.userProductService.userProductsGetCollection(
1,
50,
this.user?.id,
undefined,
this.product.id
);
})
).subscribe(
data => {
let userProduct = data["hydra:member"];
userProductData => {
let userProduct = userProductData["hydra:member"];
if (userProduct.length > 0) {
this.userProduct = userProduct[0];
}
}
)
);
}

followProduct(event: any) {
@@ -96,7 +98,7 @@ export class ProductsDetailComponent implements OnInit, AfterViewInit {
this.userProductSub = this.userProductService.userProductsPost(
{
user: this.user?.id,
product: this.product.id,
product: this.product,
} as UserProductJsonld
).subscribe(
data => {
@@ -104,7 +106,7 @@ export class ProductsDetailComponent implements OnInit, AfterViewInit {
}
);
} else {
this.userProductSub = this.userProductService.userProductsIdDelete(
this.userProductSub = this.userProductService.userProductsIdDelete(
this.appHelperService.extractId(this.userProduct.id)
).subscribe(
data => {
@@ -115,13 +117,6 @@ export class ProductsDetailComponent implements OnInit, AfterViewInit {
}

openModalEditProduct() {
const modalRefProduct = this.modalService.open(NewProductComponent, this.appHelperService.getModalOptions());
modalRefProduct.componentInstance.product = this.product;
modalRefProduct.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
if (modalStatus === ModalStatus.Submitted) {
modalRefProduct.dismiss();
this.getProductData();
}
});
this.appHelperService.openModal(NewProductComponent, { 'product': this.product }, this.getData);
}
}

+ 2
- 14
matsen-tool/src/app/_views/profile/profile.component.html Dosyayı Görüntüle

@@ -1,15 +1,3 @@
<app-user
<app-user-detail
[user]="user"
></app-user>

<app-toggle #toggleTasks [headline]="('user.my' | translate) + ' ' + ('basic.tasks' | translate)">
<app-task-list #taskListComponent
[user]="user">
</app-task-list>
</app-toggle>

<app-toggle #toggleSales [headline]="('user.my' | translate) + ' ' + ('basic.sales' | translate)">
<app-sale-list #saleListComponent
[user]="user">
</app-sale-list>
</app-toggle>
></app-user-detail>

+ 3
- 16
matsen-tool/src/app/_views/profile/profile.component.ts Dosyayı Görüntüle

@@ -1,15 +1,7 @@
import {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';
import {User} from "@app/_models";
import {Router} from "@angular/router";
import {AccountService} from "@app/_services";
import {Subscription} from "rxjs";
import {PartnerJsonld, UserJsonld, UserService} from "@app/core/api/v1";
import {AppHelperService} from "@app/_helpers/app-helper.service";
import {PagingComponent} from "@app/_components/paging/paging.component";
import {UserComponent} from "@app/_views/user/user/user.component";
import {ToggleComponent} from "@app/_components/toggle/toggle.component";
import {TaskListComponent} from "@app/_views/tasks/task-list/task-list.component";
import {SaleListComponent} from "@app/_views/sales/sale-list/sale-list.component";
import {UserJsonld} from "@app/core/api/v1";
import {UserDetailComponent} from "@app/_views/user/user-detail/user-detail.component";

@Component({
selector: 'app-profile',
@@ -18,11 +10,7 @@ import {SaleListComponent} from "@app/_views/sales/sale-list/sale-list.component
})
export class ProfileComponent implements OnInit, AfterViewInit {

@ViewChild("userComponent", { static: false }) userComponent!: UserComponent;
@ViewChild("toggleTasks", { static: true }) toggleTasks: ToggleComponent = new ToggleComponent();
@ViewChild("taskListComponent", { static: false }) taskListComponent!: TaskListComponent;
@ViewChild("toggleSales", { static: true }) toggleSales: ToggleComponent = new ToggleComponent();
@ViewChild("saleListComponent", { static: false }) saleListComponent!: SaleListComponent;
@ViewChild("userDetailComponent", { static: false }) userDetailComponent!: UserDetailComponent;

protected user!: UserJsonld;

@@ -32,7 +20,6 @@ export class ProfileComponent implements OnInit, AfterViewInit {
if (this.accountService.userValue?.userResource) {
this.user = this.accountService.userValue?.userResource;
}

}

ngOnInit() {


+ 1
- 1
matsen-tool/src/app/_views/sales/sale-list/sale-list.component.ts Dosyayı Görüntüle

@@ -83,7 +83,7 @@ export class SaleListComponent implements OnInit, AfterViewInit {

navigateToSaleDetails(element: any) {
const sale: SaleJsonld = element as SaleJsonld;
this.router.navigate(['/sales', this.appHelperService.extractId(sale.id)]);
this.router.navigate(['/sale', this.appHelperService.extractId(sale.id)]);
}

openModalNewSale() {


+ 26
- 12
matsen-tool/src/app/_views/sales/sale-summary/sale-summary.component.ts Dosyayı Görüntüle

@@ -1,6 +1,7 @@
import {AfterViewInit, Component, Input, OnInit} from '@angular/core';
import {Subscription} from "rxjs";
import {SaleSummaryJsonld, SaleSummaryService, UserJsonld} from "@app/core/api/v1";
import {AppHelperService} from "@app/_helpers/app-helper.service";

@Component({
selector: 'app-sale-summary',
@@ -19,6 +20,7 @@ export class SaleSummaryComponent implements OnInit, AfterViewInit {

constructor(
private saleSummaryService: SaleSummaryService,
protected appHelperService: AppHelperService,
) {
this.salesSummarySub = new Subscription();
this.saleSummaries = [];
@@ -32,20 +34,32 @@ export class SaleSummaryComponent implements OnInit, AfterViewInit {
ngAfterViewInit(): void {
}



getData() {
this.salesSummarySub = this.saleSummaryService.saleSummariesGetCollection(
1,
50
).subscribe(
data => {
this.saleSummaries = data["hydra:member"];
if (this.saleSummaries.length > 0) {
this.saleSummaryMaxTurnover = Number(this.saleSummaries[0].turnover);
if (this.user !== undefined) {
console.log(this.user);
this.salesSummarySub = this.saleSummaryService.saleSummariesUserIdGet(
String(this.user?.id)
).subscribe(
data => {
this.saleSummaries = [data];
if (this.saleSummaries.length > 0) {
this.saleSummaryMaxTurnover = Number(this.saleSummaries[0].turnover);
}
}
}
)
)
} else {
this.salesSummarySub = this.saleSummaryService.saleSummariesGetCollection(
1,
50
).subscribe(
data => {
this.saleSummaries = data["hydra:member"];
if (this.saleSummaries.length > 0) {
this.saleSummaryMaxTurnover = Number(this.saleSummaries[0].turnover);
}
}
)
}
}

calculateWidthPercentage(turnover: number, maxTurnOver: number): number {


+ 1
- 1
matsen-tool/src/app/_views/sales/sales-detail/sales-detail.component.html Dosyayı Görüntüle

@@ -24,7 +24,7 @@
</div>

<app-toggle #togglePosts [headline]="'basic.posts' | translate">
<div class="spt-container">
<div *ngIf="togglePosts.isOpened" class="spt-container">
<div class="posts position-relative">
<button class="btn btn-primary toggle-btn" (click)="openModalNewPosting()">{{'basic.new-post' | translate}}</button>
<app-paging #pagingComponent


+ 9
- 43
matsen-tool/src/app/_views/sales/sales-detail/sales-detail.component.ts Dosyayı Görüntüle

@@ -12,6 +12,7 @@ import {NewSaleComponent} from "@app/_views/sales/new-sale/new-sale.component";
import {ActivatedRoute} from "@angular/router";
import {AppHelperService} from "@app/_helpers/app-helper.service";
import {PagingComponent} from "@app/_components/paging/paging.component";
import {NewTaskComponent} from "@app/_views/tasks/new-task/new-task.component";

@Component({
selector: 'app-sales-detail',
@@ -105,64 +106,29 @@ export class SalesDetailComponent implements OnInit, AfterViewInit {
}

openModalNewPosting() {
const modalRefPosting = this.modalService.open(NewPostComponent, this.appHelperService.getModalOptions());
let posting: PostJsonld = {} as PostJsonld;
posting.sale = this.sale.id ?? null;
posting.partner = this.sale.partner ?? null;
posting.product = this.sale.product ?? null;
modalRefPosting.componentInstance.posting = posting;
modalRefPosting.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
if (modalStatus === ModalStatus.Submitted) {
modalRefPosting.dismiss();
this.getPostsData();
}
});
this.appHelperService.openModal(NewPostComponent, { 'posting': posting }, this.getPostsData);
}

openModalEditPosting(post: PostJsonld) {
this.appHelperService.openModal(NewPostComponent, { 'posting': post }, this.getPostsData);
}

openModalNewComment(post: PostJsonld) {
const modalRefComment = this.modalService.open(NewCommentComponent, this.appHelperService.getModalOptions());
let comment: CommentJsonld = {} as CommentJsonld;
comment.post = post.id ?? null;
modalRefComment.componentInstance.comment = comment;
modalRefComment.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
if (modalStatus === ModalStatus.Submitted) {
modalRefComment.dismiss();
this.getPostsData();
}
});
}

openModalEditPosting(post: PostJsonld) {
const modalRefPostingEdit = this.modalService.open(NewPostComponent, this.appHelperService.getModalOptions());
modalRefPostingEdit.componentInstance.posting = post;
modalRefPostingEdit.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
if (modalStatus === ModalStatus.Submitted) {
modalRefPostingEdit.dismiss();
this.getPostsData();
}
});
this.appHelperService.openModal(NewCommentComponent, { 'comment': comment }, this.getPostsData);
}

openModalEditComment(comment: CommentJsonld) {
const modalRefComment = this.modalService.open(NewCommentComponent, this.appHelperService.getModalOptions());
modalRefComment.componentInstance.comment = comment;
modalRefComment.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
if (modalStatus === ModalStatus.Submitted) {
modalRefComment.dismiss();
this.getPostsData();
}
});
this.appHelperService.openModal(NewCommentComponent, { 'comment': comment }, this.getPostsData);
}

openModalEditSale() {
const modalRefSale = this.modalService.open(NewSaleComponent, this.appHelperService.getModalOptions());
modalRefSale.componentInstance.sale = this.sale;
modalRefSale.componentInstance.submit.subscribe((modalStatus: ModalStatus) => {
if (modalStatus === ModalStatus.Submitted) {
modalRefSale.dismiss();
this.getSaleData();
}
});
this.appHelperService.openModal(NewSaleComponent, { 'sale': this.sale }, this.getPostsData);
}

showComments(post: PostJsonld) {


+ 73
- 0
matsen-tool/src/app/_views/user/user-detail/user-detail.component.html Dosyayı Görüntüle

@@ -0,0 +1,73 @@
<div class="spt-container">
<div class="card">
<div class="card-body row">
<div class="col-4">
<h1>{{ user.firstName }} {{ user.lastName }}</h1>
<dl>
<dt>Email:</dt>
<dd>{{ user.email }}</dd>
</dl>
</div>
<div class="col-4">
<img *ngIf="user.imageUrl !== null && user.imageUrl !== undefined"
src="{{user.imageUrl}}" width="247" height="94"
alt="{{user.firstName}} {{user.lastName}}" title="{{user.firstName}} {{user.lastName}}" />
</div>
</div>
</div>
</div>

<app-toggle #togglePosts [headline]="(isCurrentUser ? (('user.my' | translate) + ' ') : '') + ('basic.posts' | translate)">
<app-post-list *ngIf="togglePosts.isOpened" #postListComponent
[user]="user"
>
</app-post-list>
</app-toggle>

<app-toggle #toggleTasks [headline]="(isCurrentUser ? (('user.my' | translate) + ' ') : '') + ('basic.tasks' | translate)">
<app-task-list *ngIf="toggleTasks.isOpened" #taskListComponent
[user]="user"
>
</app-task-list>
</app-toggle>

<app-toggle #toggleSales [headline]="(isCurrentUser ? (('user.my' | translate) + ' ') : '') + ('basic.sales' | translate)">
<app-sale-summary *ngIf="toggleSales.isOpened" #saleSummaryComponent
[user]="user"
>
</app-sale-summary>
<app-sale-list *ngIf="toggleSales.isOpened" #saleListComponent
[user]="user"
>
</app-sale-list>
</app-toggle>

<app-toggle #toggleProducts [headline]="(isCurrentUser ? (('user.my' | translate) + ' ') : '') + ('basic.products' | translate)">
<app-product-list *ngIf="toggleProducts.isOpened" #productListComponent
[user]="user">
</app-product-list>
</app-toggle>

<app-toggle #toggleCustomers [headline]="(isCurrentUser ? (('user.my' | translate) + ' ') : '') + ('basic.customer' | translate)">
<app-partner-list *ngIf="toggleCustomers.isOpened" #customerListComponent
[user]="user"
[partnerType]="'customer'"
>
</app-partner-list>
</app-toggle>

<app-toggle #toggleSuppliers [headline]="(isCurrentUser ? (('user.my' | translate) + ' ') : '') + ('basic.supplier' | translate)">
<app-partner-list *ngIf="toggleSuppliers.isOpened" #suppliersListComponent
[user]="user"
[partnerType]="'supplier'"
>
</app-partner-list>
</app-toggle>

<app-toggle #toggleServices [headline]="(isCurrentUser ? (('user.my' | translate) + ' ') : '') + ('basic.service' | translate)">
<app-partner-list *ngIf="toggleServices.isOpened" #servicesListComponent
[user]="user"
[partnerType]="'service'"
>
</app-partner-list>
</app-toggle>

matsen-tool/src/app/_views/user/user/user.component.scss → matsen-tool/src/app/_views/user/user-detail/user-detail.component.scss Dosyayı Görüntüle


+ 23
- 0
matsen-tool/src/app/_views/user/user-detail/user-detail.component.spec.ts Dosyayı Görüntüle

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { UserDetailComponent } from './user-detail.component';

describe('UserDetailComponent', () => {
let component: UserDetailComponent;
let fixture: ComponentFixture<UserDetailComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [UserDetailComponent]
})
.compileComponents();
fixture = TestBed.createComponent(UserDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 79
- 0
matsen-tool/src/app/_views/user/user-detail/user-detail.component.ts Dosyayı Görüntüle

@@ -0,0 +1,79 @@
import {AfterViewInit, Component, Input, OnInit, ViewChild} from '@angular/core';
import {UserJsonld, UserService} from "@app/core/api/v1";
import {Subscription} from "rxjs";
import {AccountService} from "@app/_services";
import {AppHelperService} from "@app/_helpers/app-helper.service";
import {UsersComponent} from "@app/_views/user/users.component";
import {ToggleComponent} from "@app/_components/toggle/toggle.component";
import {TaskListComponent} from "@app/_views/tasks/task-list/task-list.component";
import {SaleListComponent} from "@app/_views/sales/sale-list/sale-list.component";
import {ProductListComponent} from "@app/_views/products/product-list/product-list.component";
import {PartnerListComponent} from "@app/_views/partners/partner-list/partner-list.component";
import {PostListComponent} from "@app/_views/posts/post-list/post-list.component";
import {SaleSummaryComponent} from "@app/_views/sales/sale-summary/sale-summary.component";

@Component({
selector: 'app-user-detail',
templateUrl: './user-detail.component.html',
styleUrl: './user-detail.component.scss'
})
export class UserDetailComponent implements OnInit, AfterViewInit {
@Input() public user!: UserJsonld;

@ViewChild("togglePosts", { static: true }) togglePosts!: ToggleComponent;
@ViewChild("postListComponent", { static: false }) postsComponent!: PostListComponent;
@ViewChild("toggleTasks", { static: true }) toggleTasks!: ToggleComponent;
@ViewChild("taskListComponent", { static: false }) taskListComponent!: TaskListComponent;
@ViewChild("toggleSales", { static: true }) toggleSales!: ToggleComponent;
@ViewChild("saleSummaryComponent", { static: false }) saleSummaryComponent!: SaleSummaryComponent;
@ViewChild("saleListComponent", { static: false }) saleListComponent!: SaleListComponent;
@ViewChild("toggleProducts", { static: true }) toggleProducts!: ToggleComponent;
@ViewChild("productListComponent", { static: false }) productListComponent!: ProductListComponent;
@ViewChild("toggleCustomers", { static: true }) toggleCustomers!: ToggleComponent;
@ViewChild("customerListComponent", { static: false }) customerListComponent!: PartnerListComponent;
@ViewChild("toggleSuppliers", { static: true }) toggleSuppliers!: ToggleComponent;
@ViewChild("suppliersListComponent", { static: false }) suppliersListComponent!: PartnerListComponent;
@ViewChild("toggleServices", { static: true }) toggleServices!: ToggleComponent;
@ViewChild("servicesListComponent", { static: false }) servicesListComponent!: PartnerListComponent;

protected userSub: Subscription;
protected isCurrentUser: boolean;

constructor(
private accountService: AccountService,
private userService: UserService,
protected appHelperService: AppHelperService
) {
this.userSub = new Subscription();

this.isCurrentUser = false;
if (this.accountService.userValue?.userResource) {
let user = this.accountService.userValue?.userResource;
this.isCurrentUser = user?.id === user?.id;
}
}

ngOnInit() {

}

ngAfterViewInit(): void {
this.getData();
}

getData() {
console.log(this.user);
if (this.user === undefined) {
const user = this.accountService.userValue;
if (user?.id !== null && user?.id !== undefined) {
this.userSub = this.userService.usersIdGet(
this.appHelperService.extractId(user.id)
).subscribe(
data => {
this.user = data;
}
);
}
}
}
}

matsen-tool/src/app/_views/user/user/user.component.html → matsen-tool/src/app/_views/user/users.component.html Dosyayı Görüntüle


+ 0
- 0
matsen-tool/src/app/_views/user/users.component.scss Dosyayı Görüntüle


matsen-tool/src/app/_views/user/user/user.component.spec.ts → matsen-tool/src/app/_views/user/users.component.spec.ts Dosyayı Görüntüle

@@ -1,18 +1,18 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { UserComponent } from './user.component';
import { UsersComponent } from './users.component';

describe('UserComponent', () => {
let component: UserComponent;
let fixture: ComponentFixture<UserComponent>;
let component: UsersComponent;
let fixture: ComponentFixture<UsersComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [UserComponent]
declarations: [UsersComponent]
})
.compileComponents();
fixture = TestBed.createComponent(UserComponent);
fixture = TestBed.createComponent(UsersComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

matsen-tool/src/app/_views/user/user/user.component.ts → matsen-tool/src/app/_views/user/users.component.ts Dosyayı Görüntüle

@@ -5,11 +5,11 @@ import {AccountService} from "@app/_services";
import {AppHelperService} from "@app/_helpers/app-helper.service";

@Component({
selector: 'app-user',
templateUrl: './user.component.html',
styleUrl: './user.component.scss'
selector: 'app-users',
templateUrl: './users.component.html',
styleUrl: './users.component.scss'
})
export class UserComponent implements OnInit, AfterViewInit {
export class UsersComponent implements OnInit, AfterViewInit {

@Input() public user!: UserJsonld;
protected userSub: Subscription;

+ 26
- 17
matsen-tool/src/app/app-routing.module.ts Dosyayı Görüntüle

@@ -1,8 +1,6 @@
import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';

import {HomeComponent} from './_views/home';
import {AuthGuard} from './_helpers';
import {PartnersComponent} from "@app/_views/partners/partners.component";
import {TwoColumnComponent} from "@app/_components/layout/two-column/two-column.component";
import {PartnersDetailComponent} from "@app/_views/partners/partners-detail/partners-detail.component";
@@ -15,16 +13,19 @@ import {TasksComponent} from "@app/_views/tasks/tasks.component";
import {SalesComponent} from "@app/_views/sales/sales.component";
import {SalesDetailComponent} from "@app/_views/sales/sales-detail/sales-detail.component";
import {ProfileComponent} from "@app/_views/profile/profile.component";
import {UserDetailComponent} from "@app/_views/user/user-detail/user-detail.component";
import {userGuard} from "@app/_guards/user.guard";
import {adminGuard} from "@app/_guards/admin.guard";

const accountModule = () => import('@app/_views/account/account.module').then(x => x.AccountModule);

const routes: Routes = [
{path: '', component: HomeComponent, canActivate: [AuthGuard]},
{path: '', component: HomeComponent, canActivate: [userGuard]},
{path: 'account', loadChildren: accountModule},
{
path: 'customer',
component: TwoColumnComponent,
canActivate: [AuthGuard],
canActivate: [userGuard],
children: [
{path: '', component: PartnersComponent, data: {dataType: 'customer'}},
{path: ':id', component: PartnersDetailComponent, data: {dataType: 'customer-detail'}},
@@ -33,7 +34,7 @@ const routes: Routes = [
{
path: 'supplier',
component: TwoColumnComponent,
canActivate: [AuthGuard],
canActivate: [userGuard],
children: [
{path: '', component: PartnersComponent, data: {dataType: 'supplier'}},
{path: ':id', component: PartnersDetailComponent, data: {dataType: 'supplier-detail'}},
@@ -42,50 +43,50 @@ const routes: Routes = [
{
path: 'service',
component: TwoColumnComponent,
canActivate: [AuthGuard],
canActivate: [userGuard],
children: [
{path: '', component: PartnersComponent, data: {dataType: 'service'}},
{path: ':id', component: PartnersDetailComponent, data: {dataType: 'service-detail'}},
]
},
{
path: 'contacts',
path: 'contact',
component: TwoColumnComponent,
canActivate: [AuthGuard],
canActivate: [userGuard],
children: [
{path: '', component: ContactsComponent},
{path: ':id', component: ContactsDetailComponent},
]
},
{
path: 'products',
path: 'product',
component: TwoColumnComponent,
canActivate: [AuthGuard],
canActivate: [userGuard],
children: [
{path: '', component: ProductsComponent},
{path: ':id', component: ProductsDetailComponent},
]
},
{
path: 'tasks',
path: 'task',
component: TwoColumnComponent,
canActivate: [AuthGuard],
canActivate: [userGuard],
children: [
{path: '', component: TasksComponent},
]
},
{
path: 'documents',
path: 'document',
component: TwoColumnComponent,
canActivate: [AuthGuard],
canActivate: [userGuard],
children: [
{path: '', component: DocumentsComponent},
]
},
{
path: 'sales',
path: 'sale',
component: TwoColumnComponent,
canActivate: [AuthGuard],
canActivate: [userGuard],
children: [
{path: '', component: SalesComponent},
{path: ':id', component: SalesDetailComponent},
@@ -94,11 +95,19 @@ const routes: Routes = [
{
path: 'profile',
component: TwoColumnComponent,
canActivate: [AuthGuard],
canActivate: [userGuard],
children: [
{path: '', component: ProfileComponent},
]
},
{
path: 'user',
component: TwoColumnComponent,
canActivate: [userGuard, adminGuard],
children: [
{path: ':id', component: UserDetailComponent},
]
},
// otherwise redirect to home
{path: '**', redirectTo: ''}
];


+ 5
- 3
matsen-tool/src/app/app.module.ts Dosyayı Görüntüle

@@ -23,7 +23,6 @@ import {DocumentsComponent} from './_views/documents/documents.component';
import {PartnersComponent} from './_views/partners/partners.component';
import {PartnersDetailComponent} from './_views/partners/partners-detail/partners-detail.component';
import {NewContactComponent} from './_views/contacts/new-contact/new-contact.component';
import {ContactsComponent} from './_views/contacts/contacts.component';
import {ContactsDetailComponent} from './_views/contacts/contacts-detail/contacts-detail.component';
import {PropertyInterceptor} from "@app/_helpers/property.interceptor";
import {MatPaginatorModule} from "@angular/material/paginator";
@@ -59,7 +58,9 @@ import { ProductListComponent } from './_views/products/product-list/product-lis
import { DocumentListComponent } from './_views/documents/document-list/document-list.component';
import { SaleListComponent } from './_views/sales/sale-list/sale-list.component';
import { SaleSummaryComponent } from './_views/sales/sale-summary/sale-summary.component';
import { UserComponent } from './_views/user/user/user.component';
import { UsersComponent } from './_views/user/users.component';
import { UserDetailComponent } from './_views/user/user-detail/user-detail.component';


export function apiConfigFactory(): Configuration {
const params: ConfigurationParameters = {
@@ -140,7 +141,8 @@ export function HttpLoaderFactory(http: HttpClient) {
DocumentListComponent,
SaleListComponent,
SaleSummaryComponent,
UserComponent,
UsersComponent,
UserDetailComponent,
],
providers: [
{provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true},


+ 0
- 440
matsen-tool/src/app/core/api/v1/api/media.service.ts Dosyayı Görüntüle

@@ -1,440 +0,0 @@
/**
* Matsen API Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */

import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';

// @ts-ignore
import { ApiMediasGetCollection200Response } from '../model/apiMediasGetCollection200Response';
// @ts-ignore
import { ApiMediasGetCollection200Response1 } from '../model/apiMediasGetCollection200Response1';
// @ts-ignore
import { MediaJsonhalMediaObjectRead } from '../model/mediaJsonhalMediaObjectRead';
// @ts-ignore
import { MediaJsonldMediaObjectRead } from '../model/mediaJsonldMediaObjectRead';
// @ts-ignore
import { MediaMediaObjectRead } from '../model/mediaMediaObjectRead';

// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';



@Injectable({
providedIn: 'root'
})
export class MediaService {

protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;

constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
if (Array.isArray(basePath) && basePath.length > 0) {
basePath = basePath[0];
}

if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}

/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}

// @ts-ignore
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
} else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}

private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
if (value == null) {
return httpParams;
}

if (typeof value === "object") {
if (Array.isArray(value)) {
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
} else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
} else {
throw Error("key may not be null if value is Date");
}
} else {
Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
httpParams, value[k], key != null ? `${key}.${k}` : k));
}
} else if (key != null) {
httpParams = httpParams.append(key, value);
} else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}

/**
* Retrieves the collection of Media resources.
* Retrieves the collection of Media resources.
* @param page The collection page number
* @param itemsPerPage The number of items per page
* @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 mediasGetCollection(page?: number, itemsPerPage?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiMediasGetCollection200Response>;
public mediasGetCollection(page?: number, itemsPerPage?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiMediasGetCollection200Response>>;
public mediasGetCollection(page?: number, itemsPerPage?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiMediasGetCollection200Response>>;
public mediasGetCollection(page?: number, itemsPerPage?: number, 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) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>page, 'page');
}
if (itemsPerPage !== undefined && itemsPerPage !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>itemsPerPage, 'itemsPerPage');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json',
'application/json',
'text/html',
'application/hal+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/medias`;
return this.httpClient.request<ApiMediasGetCollection200Response>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Removes the Media resource.
* Removes the Media resource.
* @param id MediaObject identifier
* @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 mediasIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
public mediasIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
public mediasIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
public mediasIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling mediasIdDelete.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/medias/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Retrieves a Media resource.
* Retrieves a Media resource.
* @param id MediaObject identifier
* @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 mediasIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<MediaJsonldMediaObjectRead>;
public mediasIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<MediaJsonldMediaObjectRead>>;
public mediasIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<MediaJsonldMediaObjectRead>>;
public mediasIdGet(id: 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> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling mediasIdGet.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json',
'application/json',
'text/html',
'application/hal+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/medias/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<MediaJsonldMediaObjectRead>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Creates a Media resource.
* Creates a Media resource.
* @param file
* @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 mediasPost(file?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<MediaJsonldMediaObjectRead>;
public mediasPost(file?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<MediaJsonldMediaObjectRead>>;
public mediasPost(file?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<MediaJsonldMediaObjectRead>>;
public mediasPost(file?: Blob, 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 localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json',
'application/json',
'text/html',
'application/hal+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}

// to determine the Content-Type header
const consumes: string[] = [
'multipart/form-data'
];

const canConsumeForm = this.canConsumeForm(consumes);

let localVarFormParams: { append(param: string, value: any): any; };
let localVarUseForm = false;
let localVarConvertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data"
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
localVarUseForm = canConsumeForm;
if (localVarUseForm) {
localVarFormParams = new FormData();
} else {
localVarFormParams = new HttpParams({encoder: this.encoder});
}

if (file !== undefined) {
localVarFormParams = localVarFormParams.append('file', <any>file) as any || localVarFormParams;
}

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/medias`;
return this.httpClient.request<MediaJsonldMediaObjectRead>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

}

+ 16
- 4
matsen-tool/src/app/core/api/v1/api/partnerFollow.service.ts Dosyayı Görüntüle

@@ -108,13 +108,15 @@ export class PartnerFollowService {
* @param partner2
* @param user
* @param user2
* @param partnerType
* @param partnerType2
* @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 partnerFollowsGetCollection(page?: number, itemsPerPage?: number, partner?: string, partner2?: Array<string>, user?: string, user2?: Array<string>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiPartnerFollowsGetCollection200Response>;
public partnerFollowsGetCollection(page?: number, itemsPerPage?: number, partner?: string, partner2?: Array<string>, user?: string, user2?: Array<string>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiPartnerFollowsGetCollection200Response>>;
public partnerFollowsGetCollection(page?: number, itemsPerPage?: number, partner?: string, partner2?: Array<string>, user?: string, user2?: Array<string>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiPartnerFollowsGetCollection200Response>>;
public partnerFollowsGetCollection(page?: number, itemsPerPage?: number, partner?: string, partner2?: Array<string>, user?: string, user2?: 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 partnerFollowsGetCollection(page?: number, itemsPerPage?: number, partner?: string, partner2?: Array<string>, user?: string, user2?: Array<string>, partnerType?: string, partnerType2?: Array<string>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiPartnerFollowsGetCollection200Response>;
public partnerFollowsGetCollection(page?: number, itemsPerPage?: number, partner?: string, partner2?: Array<string>, user?: string, user2?: Array<string>, partnerType?: string, partnerType2?: Array<string>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiPartnerFollowsGetCollection200Response>>;
public partnerFollowsGetCollection(page?: number, itemsPerPage?: number, partner?: string, partner2?: Array<string>, user?: string, user2?: Array<string>, partnerType?: string, partnerType2?: Array<string>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiPartnerFollowsGetCollection200Response>>;
public partnerFollowsGetCollection(page?: number, itemsPerPage?: number, partner?: string, partner2?: Array<string>, user?: string, user2?: Array<string>, partnerType?: string, partnerType2?: 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 PartnerFollowService {
<any>element, 'user[]');
})
}
if (partnerType !== undefined && partnerType !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>partnerType, 'partner.type');
}
if (partnerType2) {
partnerType2.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>element, 'partner.type[]');
})
}

let localVarHeaders = this.defaultHeaders;



+ 16
- 4
matsen-tool/src/app/core/api/v1/api/partnerProduct.service.ts Dosyayı Görüntüle

@@ -109,13 +109,15 @@ export class PartnerProductService {
* @param product
* @param product2
* @param productName
* @param partnerType
* @param partnerType2
* @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>, product?: string, product2?: Array<string>, productName?: 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>, product?: string, product2?: Array<string>, productName?: 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>, product?: string, product2?: Array<string>, productName?: 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>, product?: string, product2?: Array<string>, productName?: 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>, product?: string, product2?: Array<string>, productName?: string, partnerType?: string, partnerType2?: Array<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>, product?: string, product2?: Array<string>, productName?: string, partnerType?: string, partnerType2?: Array<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>, product?: string, product2?: Array<string>, productName?: string, partnerType?: string, partnerType2?: Array<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>, product?: string, product2?: Array<string>, productName?: string, partnerType?: string, partnerType2?: 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) {
@@ -150,6 +152,16 @@ export class PartnerProductService {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>productName, 'product.name');
}
if (partnerType !== undefined && partnerType !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>partnerType, 'partner.type');
}
if (partnerType2) {
partnerType2.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>element, 'partner.type[]');
})
}

let localVarHeaders = this.defaultHeaders;



+ 79
- 0
matsen-tool/src/app/core/api/v1/api/saleSummary.service.ts Dosyayı Görüntüle

@@ -24,6 +24,10 @@ import { ApiSaleSummariesGetCollection200Response } from '../model/apiSaleSummar
import { ApiSaleSummariesGetCollection200Response1 } from '../model/apiSaleSummariesGetCollection200Response1';
// @ts-ignore
import { SaleSummary } from '../model/saleSummary';
// @ts-ignore
import { SaleSummaryJsonhal } from '../model/saleSummaryJsonhal';
// @ts-ignore
import { SaleSummaryJsonld } from '../model/saleSummaryJsonld';

// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
@@ -179,4 +183,79 @@ export class SaleSummaryService {
);
}

/**
* Retrieves a SaleSummary resource.
* Retrieves a SaleSummary resource.
* @param userId SaleSummary identifier
* @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 saleSummariesUserIdGet(userId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<SaleSummaryJsonld>;
public saleSummariesUserIdGet(userId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<SaleSummaryJsonld>>;
public saleSummariesUserIdGet(userId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<SaleSummaryJsonld>>;
public saleSummariesUserIdGet(userId: 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> {
if (userId === null || userId === undefined) {
throw new Error('Required parameter userId was null or undefined when calling saleSummariesUserIdGet.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json',
'application/json',
'text/html',
'application/hal+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/sale_summaries/${this.configuration.encodeParam({name: "userId", value: userId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<SaleSummaryJsonld>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

}

+ 9
- 4
matsen-tool/src/app/core/api/v1/api/userProduct.service.ts Dosyayı Görüntüle

@@ -108,13 +108,14 @@ export class UserProductService {
* @param user2
* @param product
* @param product2
* @param orderProductName
* @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 userProductsGetCollection(page?: number, itemsPerPage?: number, user?: string, user2?: 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<ApiUserProductsGetCollection200Response>;
public userProductsGetCollection(page?: number, itemsPerPage?: number, user?: string, user2?: 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<ApiUserProductsGetCollection200Response>>;
public userProductsGetCollection(page?: number, itemsPerPage?: number, user?: string, user2?: 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<ApiUserProductsGetCollection200Response>>;
public userProductsGetCollection(page?: number, itemsPerPage?: number, user?: string, user2?: 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> {
public userProductsGetCollection(page?: number, itemsPerPage?: number, user?: string, user2?: Array<string>, product?: string, product2?: Array<string>, orderProductName?: 'asc' | 'desc', observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiUserProductsGetCollection200Response>;
public userProductsGetCollection(page?: number, itemsPerPage?: number, user?: string, user2?: Array<string>, product?: string, product2?: Array<string>, orderProductName?: 'asc' | 'desc', observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiUserProductsGetCollection200Response>>;
public userProductsGetCollection(page?: number, itemsPerPage?: number, user?: string, user2?: Array<string>, product?: string, product2?: Array<string>, orderProductName?: 'asc' | 'desc', observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiUserProductsGetCollection200Response>>;
public userProductsGetCollection(page?: number, itemsPerPage?: number, user?: string, user2?: Array<string>, product?: string, product2?: Array<string>, orderProductName?: '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) {
@@ -145,6 +146,10 @@ export class UserProductService {
<any>element, 'product[]');
})
}
if (orderProductName !== undefined && orderProductName !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>orderProductName, 'order[product.name]');
}

let localVarHeaders = this.defaultHeaders;



+ 0
- 23
matsen-tool/src/app/core/api/v1/model/apiMediaGetCollection200Response.ts Dosyayı Görüntüle

@@ -1,23 +0,0 @@
/**
* Matsen API Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { MediaJsonldMediaObjectRead } from './mediaJsonldMediaObjectRead';
import { ApiCommentsGetCollection200ResponseHydraSearch } from './apiCommentsGetCollection200ResponseHydraSearch';
import { ApiCommentsGetCollection200ResponseHydraView } from './apiCommentsGetCollection200ResponseHydraView';


export interface ApiMediaGetCollection200Response {
'hydra:member': Array<MediaJsonldMediaObjectRead>;
'hydra:totalItems'?: number;
'hydra:view'?: ApiCommentsGetCollection200ResponseHydraView;
'hydra:search'?: ApiCommentsGetCollection200ResponseHydraSearch;
}


+ 0
- 22
matsen-tool/src/app/core/api/v1/model/apiMediaGetCollection200Response1.ts Dosyayı Görüntüle

@@ -1,22 +0,0 @@
/**
* Matsen API Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { MediaJsonhalMediaObjectRead } from './mediaJsonhalMediaObjectRead';
import { ApiCommentsGetCollection200Response1Links } from './apiCommentsGetCollection200Response1Links';


export interface ApiMediaGetCollection200Response1 {
_embedded: Array<MediaJsonhalMediaObjectRead>;
totalItems?: number;
itemsPerPage?: number;
_links: ApiCommentsGetCollection200Response1Links;
}


+ 0
- 23
matsen-tool/src/app/core/api/v1/model/apiMediasGetCollection200Response.ts Dosyayı Görüntüle

@@ -1,23 +0,0 @@
/**
* Matsen API Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { MediaJsonldMediaObjectRead } from './mediaJsonldMediaObjectRead';
import { ApiCommentsGetCollection200ResponseHydraSearch } from './apiCommentsGetCollection200ResponseHydraSearch';
import { ApiCommentsGetCollection200ResponseHydraView } from './apiCommentsGetCollection200ResponseHydraView';


export interface ApiMediasGetCollection200Response {
'hydra:member': Array<MediaJsonldMediaObjectRead>;
'hydra:totalItems'?: number;
'hydra:view'?: ApiCommentsGetCollection200ResponseHydraView;
'hydra:search'?: ApiCommentsGetCollection200ResponseHydraSearch;
}


+ 0
- 22
matsen-tool/src/app/core/api/v1/model/apiMediasGetCollection200Response1.ts Dosyayı Görüntüle

@@ -1,22 +0,0 @@
/**
* Matsen API Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { MediaJsonhalMediaObjectRead } from './mediaJsonhalMediaObjectRead';
import { ApiCommentsGetCollection200Response1Links } from './apiCommentsGetCollection200Response1Links';


export interface ApiMediasGetCollection200Response1 {
_embedded: Array<MediaJsonhalMediaObjectRead>;
totalItems?: number;
itemsPerPage?: number;
_links: ApiCommentsGetCollection200Response1Links;
}


+ 0
- 20
matsen-tool/src/app/core/api/v1/model/documentDocumentObjectRead.ts Dosyayı Görüntüle

@@ -1,20 +0,0 @@
/**
* Matsen API Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


/**
*
*/
export interface DocumentDocumentObjectRead {
contentUrl?: string | null;
}


+ 0
- 22
matsen-tool/src/app/core/api/v1/model/documentJsonhalDocumentObjectRead.ts Dosyayı Görüntüle

@@ -1,22 +0,0 @@
/**
* Matsen API Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { CommentJsonhalLinks } from './commentJsonhalLinks';


/**
*
*/
export interface DocumentJsonhalDocumentObjectRead {
_links?: CommentJsonhalLinks;
contentUrl?: string | null;
}


+ 0
- 24
matsen-tool/src/app/core/api/v1/model/documentJsonldDocumentObjectRead.ts Dosyayı Görüntüle

@@ -1,24 +0,0 @@
/**
* Matsen API Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { CommentJsonldContext } from './commentJsonldContext';


/**
*
*/
export interface DocumentJsonldDocumentObjectRead {
context?: CommentJsonldContext;
readonly id?: string;
readonly type?: string;
contentUrl?: string | null;
}


+ 0
- 22
matsen-tool/src/app/core/api/v1/model/mediaJsonhalMediaObjectRead.ts Dosyayı Görüntüle

@@ -1,22 +0,0 @@
/**
* Matsen API Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { CommentJsonhalLinks } from './commentJsonhalLinks';


/**
*
*/
export interface MediaJsonhalMediaObjectRead {
_links?: CommentJsonhalLinks;
contentUrl?: string | null;
}


+ 0
- 24
matsen-tool/src/app/core/api/v1/model/mediaJsonldMediaObjectRead.ts Dosyayı Görüntüle

@@ -1,24 +0,0 @@
/**
* Matsen API Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { CommentJsonldContext } from './commentJsonldContext';


/**
*
*/
export interface MediaJsonldMediaObjectRead {
context?: CommentJsonldContext;
readonly id?: string;
readonly type?: string;
contentUrl?: string | null;
}


+ 0
- 20
matsen-tool/src/app/core/api/v1/model/mediaMediaObjectRead.ts Dosyayı Görüntüle

@@ -1,20 +0,0 @@
/**
* Matsen API Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


/**
*
*/
export interface MediaMediaObjectRead {
contentUrl?: string | null;
}


+ 5
- 1
matsen-tool/src/app/core/api/v1/model/partnerFollow.ts Dosyayı Görüntüle

@@ -9,6 +9,7 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Partner } from './partner';


/**
@@ -17,7 +18,10 @@
export interface PartnerFollow {
readonly user?: string | null;
readonly userName?: string | null;
partner: string | null;
/**
* ?PartnerApi
*/
partner: Partner;
readonly partnerName?: string | null;
readonly createdAt?: string | null;
readonly owner?: string | null;


+ 5
- 1
matsen-tool/src/app/core/api/v1/model/partnerFollowJsonhal.ts Dosyayı Görüntüle

@@ -10,6 +10,7 @@
* Do not edit the class manually.
*/
import { CommentJsonhalLinks } from './commentJsonhalLinks';
import { PartnerJsonhal } from './partnerJsonhal';


/**
@@ -19,7 +20,10 @@ export interface PartnerFollowJsonhal {
_links?: CommentJsonhalLinks;
readonly user?: string | null;
readonly userName?: string | null;
partner: string | null;
/**
* ?PartnerApi
*/
partner: PartnerJsonhal;
readonly partnerName?: string | null;
readonly createdAt?: string | null;
readonly owner?: string | null;


+ 5
- 1
matsen-tool/src/app/core/api/v1/model/partnerFollowJsonld.ts Dosyayı Görüntüle

@@ -10,6 +10,7 @@
* Do not edit the class manually.
*/
import { CommentJsonldContext } from './commentJsonldContext';
import { PartnerJsonld } from './partnerJsonld';


/**
@@ -21,7 +22,10 @@ export interface PartnerFollowJsonld {
readonly type?: string;
readonly user?: string | null;
readonly userName?: string | null;
partner: string | null;
/**
* ?PartnerApi
*/
partner: PartnerJsonld;
readonly partnerName?: string | null;
readonly createdAt?: string | null;
readonly owner?: string | null;


+ 1
- 1
matsen-tool/src/app/core/api/v1/model/partnerJsonhal.ts Dosyayı Görüntüle

@@ -36,7 +36,7 @@ export interface PartnerJsonhal {
*/
posts?: Array<string>;
contacts?: Array<string>;
partnerProducts?: Array<string>;
readonly partnerProducts?: any | null;
}
export namespace PartnerJsonhal {
export type PartnerTypeEnum = 'customer' | 'supplier' | 'service';


+ 10
- 2
matsen-tool/src/app/core/api/v1/model/partnerProduct.ts Dosyayı Görüntüle

@@ -9,15 +9,23 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Product } from './product';
import { Partner } from './partner';


/**
*
*/
export interface PartnerProduct {
partner: string | null;
/**
* ?PartnerApi
*/
partner: Partner;
readonly partnerName?: string | null;
product: string | null;
/**
* ?ProductApi
*/
product: Product;
readonly productName?: string | null;
readonly createdAt?: string | null;
}


+ 10
- 2
matsen-tool/src/app/core/api/v1/model/partnerProductJsonhal.ts Dosyayı Görüntüle

@@ -10,6 +10,8 @@
* Do not edit the class manually.
*/
import { CommentJsonhalLinks } from './commentJsonhalLinks';
import { ProductJsonhal } from './productJsonhal';
import { PartnerJsonhal } from './partnerJsonhal';


/**
@@ -17,9 +19,15 @@ import { CommentJsonhalLinks } from './commentJsonhalLinks';
*/
export interface PartnerProductJsonhal {
_links?: CommentJsonhalLinks;
partner: string | null;
/**
* ?PartnerApi
*/
partner: PartnerJsonhal;
readonly partnerName?: string | null;
product: string | null;
/**
* ?ProductApi
*/
product: ProductJsonhal;
readonly productName?: string | null;
readonly createdAt?: string | null;
}


+ 10
- 2
matsen-tool/src/app/core/api/v1/model/partnerProductJsonld.ts Dosyayı Görüntüle

@@ -10,6 +10,8 @@
* Do not edit the class manually.
*/
import { CommentJsonldContext } from './commentJsonldContext';
import { ProductJsonld } from './productJsonld';
import { PartnerJsonld } from './partnerJsonld';


/**
@@ -19,9 +21,15 @@ export interface PartnerProductJsonld {
context?: CommentJsonldContext;
readonly id?: string;
readonly type?: string;
partner: string | null;
/**
* ?PartnerApi
*/
partner: PartnerJsonld;
readonly partnerName?: string | null;
product: string | null;
/**
* ?ProductApi
*/
product: ProductJsonld;
readonly productName?: string | null;
readonly createdAt?: string | null;
}


+ 11
- 0
matsen-tool/src/app/core/api/v1/model/post.ts Dosyayı Görüntüle

@@ -22,6 +22,7 @@ export interface Post {
readonly ownerName?: string | null;
partner?: string | null;
readonly partnerName?: string | null;
readonly partnerType?: Post.PartnerTypeEnum | null;
product?: string | null;
readonly productName?: string | null;
contact?: string | null;
@@ -32,4 +33,14 @@ export interface Post {
comments?: Array<Comment>;
readonly createdAt?: string | null;
}
export namespace Post {
export type PartnerTypeEnum = 'customer' | 'supplier' | 'service' | 'null';
export const PartnerTypeEnum = {
Customer: 'customer' as PartnerTypeEnum,
Supplier: 'supplier' as PartnerTypeEnum,
Service: 'service' as PartnerTypeEnum,
Null: 'null' as PartnerTypeEnum
};
}



+ 11
- 0
matsen-tool/src/app/core/api/v1/model/postJsonhal.ts Dosyayı Görüntüle

@@ -24,6 +24,7 @@ export interface PostJsonhal {
readonly ownerName?: string | null;
partner?: string | null;
readonly partnerName?: string | null;
readonly partnerType?: PostJsonhal.PartnerTypeEnum | null;
product?: string | null;
readonly productName?: string | null;
contact?: string | null;
@@ -34,4 +35,14 @@ export interface PostJsonhal {
comments?: Array<CommentJsonhal>;
readonly createdAt?: string | null;
}
export namespace PostJsonhal {
export type PartnerTypeEnum = 'customer' | 'supplier' | 'service' | 'null';
export const PartnerTypeEnum = {
Customer: 'customer' as PartnerTypeEnum,
Supplier: 'supplier' as PartnerTypeEnum,
Service: 'service' as PartnerTypeEnum,
Null: 'null' as PartnerTypeEnum
};
}



+ 11
- 0
matsen-tool/src/app/core/api/v1/model/postJsonld.ts Dosyayı Görüntüle

@@ -26,6 +26,7 @@ export interface PostJsonld {
readonly ownerName?: string | null;
partner?: string | null;
readonly partnerName?: string | null;
readonly partnerType?: PostJsonld.PartnerTypeEnum | null;
product?: string | null;
readonly productName?: string | null;
contact?: string | null;
@@ -36,4 +37,14 @@ export interface PostJsonld {
comments?: Array<CommentJsonld>;
readonly createdAt?: string | null;
}
export namespace PostJsonld {
export type PartnerTypeEnum = 'customer' | 'supplier' | 'service' | 'null';
export const PartnerTypeEnum = {
Customer: 'customer' as PartnerTypeEnum,
Supplier: 'supplier' as PartnerTypeEnum,
Service: 'service' as PartnerTypeEnum,
Null: 'null' as PartnerTypeEnum
};
}



+ 1
- 0
matsen-tool/src/app/core/api/v1/model/saleSummary.ts Dosyayı Görüntüle

@@ -15,6 +15,7 @@
*
*/
export interface SaleSummary {
userId?: number;
owner?: string | null;
ownerName?: string | null;
turnover?: number | null;


+ 1
- 0
matsen-tool/src/app/core/api/v1/model/saleSummaryJsonhal.ts Dosyayı Görüntüle

@@ -17,6 +17,7 @@ import { CommentJsonhalLinks } from './commentJsonhalLinks';
*/
export interface SaleSummaryJsonhal {
_links?: CommentJsonhalLinks;
userId?: number;
owner?: string | null;
ownerName?: string | null;
turnover?: number | null;


+ 3
- 0
matsen-tool/src/app/core/api/v1/model/saleSummaryJsonld.ts Dosyayı Görüntüle

@@ -9,6 +9,7 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { CommentJsonldContext } from './commentJsonldContext';


/**
@@ -17,6 +18,8 @@
export interface SaleSummaryJsonld {
readonly id?: string;
readonly type?: string;
context?: CommentJsonldContext;
userId?: number;
owner?: string | null;
ownerName?: string | null;
turnover?: number | null;


+ 5
- 1
matsen-tool/src/app/core/api/v1/model/userProduct.ts Dosyayı Görüntüle

@@ -9,6 +9,7 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Product } from './product';


/**
@@ -17,7 +18,10 @@
export interface UserProduct {
readonly user?: string | null;
readonly userName?: string | null;
product: string | null;
/**
* ?ProductApi
*/
product: Product;
readonly productName?: string | null;
readonly createdAt?: string | null;
readonly owner?: string | null;


+ 5
- 1
matsen-tool/src/app/core/api/v1/model/userProductJsonhal.ts Dosyayı Görüntüle

@@ -10,6 +10,7 @@
* Do not edit the class manually.
*/
import { CommentJsonhalLinks } from './commentJsonhalLinks';
import { ProductJsonhal } from './productJsonhal';


/**
@@ -19,7 +20,10 @@ export interface UserProductJsonhal {
_links?: CommentJsonhalLinks;
readonly user?: string | null;
readonly userName?: string | null;
product: string | null;
/**
* ?ProductApi
*/
product: ProductJsonhal;
readonly productName?: string | null;
readonly createdAt?: string | null;
readonly owner?: string | null;


+ 5
- 1
matsen-tool/src/app/core/api/v1/model/userProductJsonld.ts Dosyayı Görüntüle

@@ -10,6 +10,7 @@
* Do not edit the class manually.
*/
import { CommentJsonldContext } from './commentJsonldContext';
import { ProductJsonld } from './productJsonld';


/**
@@ -21,7 +22,10 @@ export interface UserProductJsonld {
readonly type?: string;
readonly user?: string | null;
readonly userName?: string | null;
product: string | null;
/**
* ?ProductApi
*/
product: ProductJsonld;
readonly productName?: string | null;
readonly createdAt?: string | null;
readonly owner?: string | null;


Yükleniyor…
İptal
Kaydet