Daniel пре 1 година
родитељ
комит
f8c646e699
5 измењених фајлова са 30 додато и 9 уклоњено
  1. +11
    -3
      matsen-tool/src/app/_views/documents/document-list/document-list.component.ts
  2. +0
    -2
      matsen-tool/src/app/_views/partners/partner-list/partner-list.component.ts
  3. +6
    -0
      matsen-tool/src/app/_views/partners/partners-detail/partners-detail.component.html
  4. +3
    -0
      matsen-tool/src/app/_views/partners/partners-detail/partners-detail.component.ts
  5. +10
    -4
      matsen-tool/src/app/_views/products/products-detail/products-detail.component.html

+ 11
- 3
matsen-tool/src/app/_views/documents/document-list/document-list.component.ts Прегледај датотеку

@@ -1,5 +1,5 @@
import {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';
import {DocumentJsonld, DocumentService} from "@app/core/api/v1";
import {AfterViewInit, Component, Input, OnInit, ViewChild} from '@angular/core';
import {DocumentJsonld, DocumentService, PartnerJsonld, ProductJsonld} from "@app/core/api/v1";
import {AppHelperService} from "@app/_helpers/app-helper.service";
import {MatSort, Sort} from "@angular/material/sort";
import {Subscription} from "rxjs";
@@ -15,6 +15,8 @@ import {NewDocumentComponent} from "@app/_views/documents/new-document/new-docum
})
export class DocumentListComponent implements OnInit, AfterViewInit {

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

@@ -49,7 +51,13 @@ export class DocumentListComponent implements OnInit, AfterViewInit {
getData = () => {
this.documentsSub = this.documentService.documentsGetCollection(
this.pagingComponent.getPageIndex(),
this.pagingComponent.getPageSize()
this.pagingComponent.getPageSize(),
undefined,
undefined,
this.partner !== undefined ? this.partner.id : undefined,
undefined,
this.product !== undefined ? this.product.id : undefined

).subscribe(
data => {
this.documents = data["hydra:member"];


+ 0
- 2
matsen-tool/src/app/_views/partners/partner-list/partner-list.component.ts Прегледај датотеку

@@ -132,8 +132,6 @@ export class PartnerListComponent implements OnInit, AfterViewInit {
}

getPartnerProducts = (searchValue = undefined) => {
console.log(this.partnerType);
console.log(searchValue);
this.partnersSub = this.partnerProductService.partnerProductsGetCollection(
this.pagingComponent.getPageIndex(),
this.pagingComponent.getPageSize(),


+ 6
- 0
matsen-tool/src/app/_views/partners/partners-detail/partners-detail.component.html Прегледај датотеку

@@ -84,3 +84,9 @@
>
</app-sale-list>
</app-toggle>
<app-toggle #toggleDocuments [headline]="'basic.documents' | translate">
<app-document-list *ngIf="toggleDocuments.isOpened" #documentsListComponent
[partner]="partner"
>
</app-document-list>
</app-toggle>

+ 3
- 0
matsen-tool/src/app/_views/partners/partners-detail/partners-detail.component.ts Прегледај датотеку

@@ -16,6 +16,7 @@ import {ContactListComponent} from "@app/_views/contacts/contact-list/contact-li
import {TaskListComponent} from "@app/_views/tasks/task-list/task-list.component";
import {ProductListComponent} from "@app/_views/products/product-list/product-list.component";
import {SaleListComponent} from "@app/_views/sales/sale-list/sale-list.component";
import {DocumentListComponent} from "@app/_views/documents/document-list/document-list.component";

@Component({
selector: 'app-partners-detail',
@@ -34,6 +35,8 @@ export class PartnersDetailComponent implements OnInit, AfterViewInit {
@ViewChild("postListComponent", { static: false }) postsComponent!: PostListComponent;
@ViewChild("toggleSales", { static: true }) toggleSales!: ToggleComponent;
@ViewChild("salesListComponent", { static: false }) salesListComponent!: SaleListComponent;
@ViewChild("toggleDocuments", { static: true }) toggleDocuments!: ToggleComponent;
@ViewChild("documentsListComponent", { static: false }) documentsListComponent!: DocumentListComponent;

protected user: User | null;



+ 10
- 4
matsen-tool/src/app/_views/products/products-detail/products-detail.component.html Прегледај датотеку

@@ -19,10 +19,10 @@
</div>
<div class="col-12 col-sm-6 col-lg-4 has-image">
<img *ngIf="product.imageUrl !== null && product.imageUrl !== undefined"
src="{{product.imageUrl}}" width="247" height="94"
alt="{{product.name}}" title="{{product.name}}" />
src="{{product.imageUrl}}" width="247" height="94"
alt="{{product.name}}" title="{{product.name}}"/>
<img *ngIf="product.imageUrl === null || product.imageUrl === undefined"
src="/assets/images/icons/dummy-product.png" width="247" height="94" alt="" />
src="/assets/images/icons/dummy-product.png" width="247" height="94" alt=""/>
</div>
<span class="position-absolute bi p-2"
[class.bi-heart]="userProduct === null"
@@ -60,7 +60,13 @@
</app-toggle>
<app-toggle #toggleSales [headline]="'basic.sales' | translate">
<app-sale-list *ngIf="toggleSales.isOpened" #salesListComponent
[product]="product"
[product]="product"
>
</app-sale-list>
</app-toggle>
<app-toggle #toggleDocuments [headline]="'basic.documents' | translate">
<app-document-list *ngIf="toggleDocuments.isOpened" #documentsListComponent
[product]="product"
>
</app-document-list>
</app-toggle>

Loading…
Откажи
Сачувај