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 a5e74ce..b4a4afb 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 @@ -45,21 +45,28 @@ data-action="edit" (click)="openModalEditPosting(post)"> -
-
-
-

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

-

{{ comment.ownerName }}

-
-
-

{{ comment.message }}

+
+
+
+
+

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

+

{{ comment.ownerName }}

+
+
+

{{ comment.message }}

+
+
-
+ + {{ 'basic.hide-comments' | translate }} + {{ 'basic.show-comments' | translate }} + {{'basic.comment-it' | translate}}
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 c448922..f5b295b 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 @@ -35,6 +35,7 @@ export class ContactsDetailComponent implements OnInit, AfterViewInit { protected postsPageEvent: PageEvent; protected postsPageSize: number; protected postsPageIndex: number; + protected commentsVisibility: Map; protected modalOptions: NgbModalOptions = { centered: true @@ -62,6 +63,7 @@ export class ContactsDetailComponent implements OnInit, AfterViewInit { this.postsPageEvent = new PageEvent(); this.postsPageSize = 10; this.postsPageIndex = 0; + this.commentsVisibility = new Map(); } ngOnInit() { @@ -98,6 +100,11 @@ export class ContactsDetailComponent implements OnInit, AfterViewInit { data => { this.posts = data["hydra:member"]; this.postsLength = Number(data["hydra:totalItems"]); + this.posts.forEach(posts => { + if (posts.id) { + this.commentsVisibility.set(posts.id, false); + } + }); } ); } @@ -169,4 +176,11 @@ export class ContactsDetailComponent implements OnInit, AfterViewInit { } }); } + + showComments(post: PostJsonld) { + if (post.id) { + const currentVisibility = this.commentsVisibility.get(post.id); + this.commentsVisibility.set(post.id, !currentVisibility); + } + } } diff --git a/matsen-tool/src/app/home/home.component.html b/matsen-tool/src/app/home/home.component.html index 66cf6bb..abb1f0d 100644 --- a/matsen-tool/src/app/home/home.component.html +++ b/matsen-tool/src/app/home/home.component.html @@ -104,11 +104,11 @@
- - {{ 'basic.hide-comments' | translate }} - {{ 'basic.show-comments' | translate }} - + + {{ 'basic.hide-comments' | translate }} + {{ 'basic.show-comments' | translate }} + {{'basic.comment-it' | translate}}
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 71aa81b..05f737f 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 @@ -193,21 +193,28 @@ data-action="edit" (click)="openModalEditPosting(post)">
-
-
-
-

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

-

{{ comment.ownerName }}

-
-
-

{{ comment.message }}

+
+
+
+
+

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

+

{{ comment.ownerName }}

+
+
+

{{ comment.message }}

+
+
-
+ + {{ 'basic.hide-comments' | translate }} + {{ 'basic.show-comments' | translate }} + {{ 'basic.comment-it' | translate }}
diff --git a/matsen-tool/src/app/partners/partners-detail/partners-detail.component.ts b/matsen-tool/src/app/partners/partners-detail/partners-detail.component.ts index 5691f46..fbe099b 100644 --- a/matsen-tool/src/app/partners/partners-detail/partners-detail.component.ts +++ b/matsen-tool/src/app/partners/partners-detail/partners-detail.component.ts @@ -64,6 +64,7 @@ export class PartnersDetailComponent implements OnInit, AfterViewInit { protected tasksPageIndex: number; protected taskNotesVisibility: Map; + protected commentsVisibility: Map; protected postsSub: Subscription; protected posts: Array; @@ -124,6 +125,7 @@ export class PartnersDetailComponent implements OnInit, AfterViewInit { this.postsPageEvent = new PageEvent(); this.postsPageSize = 10; this.postsPageIndex = 0; + this.commentsVisibility = new Map(); } ngOnInit() { @@ -178,6 +180,11 @@ export class PartnersDetailComponent implements OnInit, AfterViewInit { data => { this.posts = data["hydra:member"]; this.postsLength = Number(data["hydra:totalItems"]); + this.posts.forEach(posts => { + if (posts.id) { + this.commentsVisibility.set(posts.id, false); + } + }); } ); } @@ -360,6 +367,13 @@ export class PartnersDetailComponent implements OnInit, AfterViewInit { } } + showComments(post: PostJsonld) { + if (post.id) { + const currentVisibility = this.commentsVisibility.get(post.id); + this.commentsVisibility.set(post.id, !currentVisibility); + } + } + getPartnerFollowedStatus() { this.partnerFollowSub = this.partnerFollowService.partnerFollowsGetCollection( 1, diff --git a/matsen-tool/src/assets/scss/_sales.scss b/matsen-tool/src/assets/scss/_sales.scss index 1acb8d3..b1ff5cd 100644 --- a/matsen-tool/src/assets/scss/_sales.scss +++ b/matsen-tool/src/assets/scss/_sales.scss @@ -16,13 +16,13 @@ } } .sales-summary-turnover { - background: rgb(179,208,47); - background: linear-gradient(109deg, rgba(179,208,47,1) 0%, rgba(64,208,70,1) 36%, rgba(44,181,91,1) 100%); - } - .sales-summary-profit { background: rgb(45,209,159); background: linear-gradient(109deg, rgba(45,209,159,1) 0%, rgba(64,208,203,1) 36%, rgba(44,138,181,1) 100%); } + .sales-summary-profit { + background: rgb(179,208,47); + background: linear-gradient(109deg, rgba(179,208,47,1) 0%, rgba(64,208,70,1) 36%, rgba(44,181,91,1) 100%); + } } @keyframes expand {