From 245a7c43604c36c48dd53cea6dede8db97cf8450 Mon Sep 17 00:00:00 2001 From: Florian Eisenmenger Date: Thu, 28 Mar 2024 16:07:35 +0100 Subject: [PATCH] bugfixes --- .../contacts-detail/contacts-detail.component.html | 4 ++-- .../contacts-detail/contacts-detail.component.ts | 3 ++- matsen-tool/src/app/documents/documents.component.ts | 4 +++- .../new-document/new-document.component.html | 2 +- matsen-tool/src/app/home/home.component.html | 2 +- matsen-tool/src/app/home/home.component.ts | 3 ++- .../partners-detail/partners-detail.component.html | 6 +++--- .../postings/new-comment/new-comment.component.html | 2 +- .../postings/new-posting/new-posting.component.html | 2 +- .../src/app/sales/new-sale/new-sale.component.html | 2 +- .../sales/sales-detail/sales-detail.component.html | 12 ++++++------ .../app/sales/sales-detail/sales-detail.component.ts | 9 +++++++-- .../tasks/new-task-note/new-task-note.component.html | 2 +- .../src/app/tasks/new-task/new-task.component.html | 2 +- matsen-tool/src/app/tasks/tasks.component.html | 4 ++-- matsen-tool/src/app/tasks/tasks.component.ts | 3 ++- 16 files changed, 36 insertions(+), 26 deletions(-) diff --git a/matsen-tool/src/app/contacts/contacts-detail/contacts-detail.component.html b/matsen-tool/src/app/contacts/contacts-detail/contacts-detail.component.html index d3f9d06..fda3e4d 100644 --- a/matsen-tool/src/app/contacts/contacts-detail/contacts-detail.component.html +++ b/matsen-tool/src/app/contacts/contacts-detail/contacts-detail.component.html @@ -39,7 +39,7 @@

{{ post.headline }}

-

{{ post.message }}

+

@@ -53,7 +53,7 @@

{{ comment.ownerName }}

-

{{ comment.message }}

+

diff --git a/matsen-tool/src/app/contacts/contacts-detail/contacts-detail.component.ts b/matsen-tool/src/app/contacts/contacts-detail/contacts-detail.component.ts index 895d0f2..d749a78 100644 --- a/matsen-tool/src/app/contacts/contacts-detail/contacts-detail.component.ts +++ b/matsen-tool/src/app/contacts/contacts-detail/contacts-detail.component.ts @@ -46,7 +46,8 @@ export class ContactsDetailComponent implements OnInit, AfterViewInit { private accountService: AccountService, private route: ActivatedRoute, private postService: PostService, - private modalService: NgbModal + private modalService: NgbModal, + protected apiConverter: ApiConverter ) { this.user = this.accountService.userValue; diff --git a/matsen-tool/src/app/documents/documents.component.ts b/matsen-tool/src/app/documents/documents.component.ts index 71e1d64..602df31 100644 --- a/matsen-tool/src/app/documents/documents.component.ts +++ b/matsen-tool/src/app/documents/documents.component.ts @@ -12,6 +12,7 @@ import {NewDocumentComponent} from "@app/documents/new-document/new-document.com import {TranslateModule} from "@ngx-translate/core"; import {ModalStatus} from "@app/_helpers/modal.states"; import {NewCommentComponent} from "@app/postings/new-comment/new-comment.component"; +import {ApiConverter} from "@app/_helpers/api.converter"; @Component({ selector: 'app-documents', @@ -41,7 +42,8 @@ export class DocumentsComponent { constructor( private router: Router, private modalService: NgbModal, - private documentService: DocumentService + private documentService: DocumentService, + protected apiConverter: ApiConverter ) { this.sort = new MatSort(); this.displayedColumns = ['pos', 'name', 'description', 'partnerName', 'productName', 'createdAt', 'createdByName', 'download', 'edit']; diff --git a/matsen-tool/src/app/documents/new-document/new-document.component.html b/matsen-tool/src/app/documents/new-document/new-document.component.html index 8673075..1e3433a 100644 --- a/matsen-tool/src/app/documents/new-document/new-document.component.html +++ b/matsen-tool/src/app/documents/new-document/new-document.component.html @@ -9,7 +9,7 @@
- +
diff --git a/matsen-tool/src/app/home/home.component.html b/matsen-tool/src/app/home/home.component.html index 368c90f..55d4e42 100644 --- a/matsen-tool/src/app/home/home.component.html +++ b/matsen-tool/src/app/home/home.component.html @@ -80,7 +80,7 @@
-

{{task.description}}

+

Zugewiesen an: {{task.assignedToName}}

diff --git a/matsen-tool/src/app/home/home.component.ts b/matsen-tool/src/app/home/home.component.ts index e77bcf6..2ae2dba 100644 --- a/matsen-tool/src/app/home/home.component.ts +++ b/matsen-tool/src/app/home/home.component.ts @@ -57,7 +57,8 @@ export class HomeComponent implements OnInit, AfterViewInit { private accountService: AccountService, private postService: PostService, private userService: UserService, - private taskService: TaskService + private taskService: TaskService, + protected apiConverter: ApiConverter ) { this.user = this.accountService.userValue; // this.accountService.user.subscribe(x => this.user = x); diff --git a/matsen-tool/src/app/partners/partners-detail/partners-detail.component.html b/matsen-tool/src/app/partners/partners-detail/partners-detail.component.html index 074ed3e..c88c2aa 100644 --- a/matsen-tool/src/app/partners/partners-detail/partners-detail.component.html +++ b/matsen-tool/src/app/partners/partners-detail/partners-detail.component.html @@ -108,7 +108,7 @@
-

{{ task.description }}

+

Zugewiesen an: {{ task.assignedToName }}

@@ -168,7 +168,7 @@

{{ post.headline }}

-

{{ post.message }}

+

{{ comment.ownerName }}

-

{{ comment.message }}

+

diff --git a/matsen-tool/src/app/postings/new-comment/new-comment.component.html b/matsen-tool/src/app/postings/new-comment/new-comment.component.html index e99e7f9..f812585 100644 --- a/matsen-tool/src/app/postings/new-comment/new-comment.component.html +++ b/matsen-tool/src/app/postings/new-comment/new-comment.component.html @@ -4,7 +4,7 @@
- +
{{'form.comment' | translate}} {{'form.mandatory' | translate}}.
diff --git a/matsen-tool/src/app/postings/new-posting/new-posting.component.html b/matsen-tool/src/app/postings/new-posting/new-posting.component.html index 86e9210..e27dca9 100644 --- a/matsen-tool/src/app/postings/new-posting/new-posting.component.html +++ b/matsen-tool/src/app/postings/new-posting/new-posting.component.html @@ -12,7 +12,7 @@
- +
{{'form.message' | translate}} {{'form.mandatory' | translate}}.
diff --git a/matsen-tool/src/app/sales/new-sale/new-sale.component.html b/matsen-tool/src/app/sales/new-sale/new-sale.component.html index ad100d2..2e42519 100644 --- a/matsen-tool/src/app/sales/new-sale/new-sale.component.html +++ b/matsen-tool/src/app/sales/new-sale/new-sale.component.html @@ -33,7 +33,7 @@
- +
diff --git a/matsen-tool/src/app/sales/sales-detail/sales-detail.component.html b/matsen-tool/src/app/sales/sales-detail/sales-detail.component.html index aa0415a..e0ab762 100644 --- a/matsen-tool/src/app/sales/sales-detail/sales-detail.component.html +++ b/matsen-tool/src/app/sales/sales-detail/sales-detail.component.html @@ -13,11 +13,11 @@
{{'overview.profit' | translate}}:
{{ sale.profit }}
{{'overview.comment' | translate}}:
-
{{ sale.comment }}
+
-
@@ -33,12 +33,12 @@
-

{{ post.createdAt | date:'dd.MM.YYYY HH:mm' }}

+

{{ post.createdAt | date:'dd.MM.YYYY' }}

{{ post.ownerName }}

{{ post.headline }}

-

{{ post.message }}

+

@@ -48,11 +48,11 @@
-

{{ comment.createdAt | date:'dd.MM.YYYY HH:mm' }}

+

{{ comment.createdAt | date:'dd.MM.YYYY' }}

{{ comment.ownerName }}

-

{{ comment.message }}

+

diff --git a/matsen-tool/src/app/sales/sales-detail/sales-detail.component.ts b/matsen-tool/src/app/sales/sales-detail/sales-detail.component.ts index 97fd280..fb6d289 100644 --- a/matsen-tool/src/app/sales/sales-detail/sales-detail.component.ts +++ b/matsen-tool/src/app/sales/sales-detail/sales-detail.component.ts @@ -12,6 +12,7 @@ import {NewCommentComponent} from "@app/postings/new-comment/new-comment.compone import {NewContactComponent} from "@app/contacts/new-contact/new-contact.component"; import {NewSaleComponent} from "@app/sales/new-sale/new-sale.component"; import {ActivatedRoute} from "@angular/router"; +import {ApiConverter} from "@app/_helpers/api.converter"; @Component({ selector: 'app-sales-detail', @@ -45,7 +46,8 @@ export class SalesDetailComponent implements OnInit, AfterViewInit { private saleService: SaleService, private route: ActivatedRoute, private postService: PostService, - private modalService: NgbModal + private modalService: NgbModal, + protected apiConverter: ApiConverter ) { this.user = this.accountService.userValue; @@ -82,6 +84,7 @@ export class SalesDetailComponent implements OnInit, AfterViewInit { ).subscribe( data => { this.sale = data; + this.getPostsData(); } ); } @@ -96,10 +99,12 @@ export class SalesDetailComponent implements OnInit, AfterViewInit { undefined, this.id, undefined, - false + undefined, + true ).subscribe( data => { this.posts = data["hydra:member"]; + console.log(this.posts); this.postsLength = Number(data["hydra:totalItems"]); this.posts.forEach(posts => { if (posts.id) { diff --git a/matsen-tool/src/app/tasks/new-task-note/new-task-note.component.html b/matsen-tool/src/app/tasks/new-task-note/new-task-note.component.html index 99eed1c..6479903 100644 --- a/matsen-tool/src/app/tasks/new-task-note/new-task-note.component.html +++ b/matsen-tool/src/app/tasks/new-task-note/new-task-note.component.html @@ -4,7 +4,7 @@
- +
{{ 'form.comment' | translate }} {{ 'form.mandatory' | translate }}.
diff --git a/matsen-tool/src/app/tasks/new-task/new-task.component.html b/matsen-tool/src/app/tasks/new-task/new-task.component.html index f54c938..63cabfd 100644 --- a/matsen-tool/src/app/tasks/new-task/new-task.component.html +++ b/matsen-tool/src/app/tasks/new-task/new-task.component.html @@ -12,7 +12,7 @@
- +
{{ 'form.description' | translate }} {{ 'form.mandatory' | translate }}.
diff --git a/matsen-tool/src/app/tasks/tasks.component.html b/matsen-tool/src/app/tasks/tasks.component.html index db85167..14ea9fe 100644 --- a/matsen-tool/src/app/tasks/tasks.component.html +++ b/matsen-tool/src/app/tasks/tasks.component.html @@ -18,7 +18,7 @@
-

{{task.description}}

+

Zugewiesen an: {{task.assignedToName}}

@@ -33,7 +33,7 @@

{{ taskNote.ownerName }}

-

{{ taskNote.message }}

+

diff --git a/matsen-tool/src/app/tasks/tasks.component.ts b/matsen-tool/src/app/tasks/tasks.component.ts index 0eab2ec..c7b8bf8 100644 --- a/matsen-tool/src/app/tasks/tasks.component.ts +++ b/matsen-tool/src/app/tasks/tasks.component.ts @@ -39,7 +39,8 @@ export class TasksComponent implements OnInit, AfterViewInit { constructor( private modalService: NgbModal, private accountService: AccountService, - private taskService: TaskService + private taskService: TaskService, + protected apiConverter: ApiConverter ) { this.user = this.accountService.userValue;