Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community: chat with some preloaded data (fixes #7337) #7352

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
send the preload data from the community
  • Loading branch information
Mutugiii committed Nov 30, 2023
commit 7696983b7bda93aa8647e1a3843d1d74587ce611
2 changes: 1 addition & 1 deletion src/app/community/community.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h3 style="text-align: right; margin-right: 0.5rem;">
<planet-news-list [items]="news" [shareTarget]="shareTarget" (viewChange)="toggleShowButton($event)" [viewableId]="teamId"></planet-news-list>
</mat-tab>
<mat-tab i18n-label label="Community Advisor">
<planet-chat [showToolbar]="showChatToolbar"></planet-chat>
<planet-chat [dataPreload]="dataPreload" [showToolbar]="showChatToolbar"></planet-chat>
</mat-tab>
<mat-tab i18n-label label="Community Leaders">
<div class="card-grid">
Expand Down
2 changes: 2 additions & 0 deletions src/app/community/community.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export class CommunityComponent implements OnInit, OnDestroy {
deviceType: DeviceType;
deviceTypes = DeviceType;
showChatToolbar = false;
dataPreload: string;

constructor(
private dialog: MatDialog,
Expand Down Expand Up @@ -120,6 +121,7 @@ export class CommunityComponent implements OnInit, OnDestroy {
).subscribe(team => {
this.team = team;
this.servicesDescriptionLabel = this.team.description ? 'Edit' : 'Add';
this.dataPreload = this.team?.description
});
}

Expand Down