-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add comment and discussion module to record page
feat: add comment and discussion module to record page css ajouts
- Loading branch information
Romuald Caplier
committed
Apr 15, 2024
1 parent
70a9dc1
commit 0fa7b34
Showing
46 changed files
with
1,260 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
85 changes: 85 additions & 0 deletions
85
apps/datahub/src/app/record/record-user-feedbacks/record-user-feedbacks.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<div | ||
id="userFeedbacks" | ||
class="flex flex-row justify-between mb-11" | ||
> | ||
<p | ||
class="font-title text-[28px] text-title font-medium" | ||
translate | ||
> | ||
record.metadata.userFeedbacks | ||
</p> | ||
<div> | ||
<gn-ui-dropdown-selector | ||
[title]="'record.metadata.userFeedbacks.sortSelector.label' | translate" | ||
(selectValue)="changerTri($event)" | ||
[choices]="sortingStrategyList" | ||
[selected]="selectedSortingStrategy$ | async" | ||
> | ||
</gn-ui-dropdown-selector> | ||
</div> | ||
</div> | ||
|
||
<ng-container *ngIf="isAllUserFeedbackLoading else userFeedbacksSection"> | ||
<div class="flex justify-center h-[300px] pt-[145px]"> | ||
<gn-ui-spinning-loader></gn-ui-spinning-loader> | ||
</div> | ||
</ng-container> | ||
|
||
<ng-template | ||
#userFeedbacksSection | ||
> | ||
<div | ||
class="m-6 flex flex-col h-auto w-full" | ||
> | ||
<div class="flex flex-row items-center w-full h-auto pr-6"> | ||
<mat-icon class="material-symbols-outlined grow-0">edit</mat-icon> | ||
<gn-ui-text-area | ||
[(value)]="newComment" | ||
[disabled]="isAddUserFeedbackLoading" | ||
(valueChange)="onNewCommentValueChange()" | ||
(keyup.control.enter)="publishNewComment()" | ||
[placeholder]="'record.metadata.userFeedbacks.newComment.placeholder' | translate" | ||
class="grow ml-3 leading-10" | ||
extraClass="bg-transparent border-0 placeholder-primary-darker text-primary-darker" | ||
></gn-ui-text-area> | ||
<div | ||
*ngIf="!isNewCommentEmpty" | ||
id="new-comment-buttons" | ||
class="flex flex-row justify-end p-2" | ||
> | ||
<gn-ui-button | ||
[disabled]="isAddUserFeedbackLoading" | ||
[type]="'outline'" | ||
(buttonClick)="publishNewComment()" | ||
title="Publish" | ||
extraClass="!p-[0.5em] text-primary-darker border-primary-darker" | ||
> | ||
<span translate *ngIf="!isAddUserFeedbackLoading"> | ||
record.metadata.userFeedbacks.publishButton | ||
</span> | ||
<ng-container *ngIf="isAddUserFeedbackLoading"> | ||
<div class="flex justify-center w-full"> | ||
<gn-ui-spinning-loader></gn-ui-spinning-loader> | ||
</div> | ||
</ng-container> | ||
</gn-ui-button> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div *ngIf="userFeedbacksParents"> | ||
<div | ||
class="mb-4 w-full" | ||
*ngFor="let userFeedbackParent of userFeedbacksParents" | ||
> | ||
<gn-ui-user-feedback-item | ||
[userFeedbackParent]="userFeedbackParent" | ||
[userFeedBacksAnswers]="userFeedBacksAnswers.get(userFeedbackParent.uuid)" | ||
[isActiveUserEditor]="isActiveUserEditor" | ||
[activeUser]="activeUser" | ||
[isAddUserFeedbackLoading]="isAddUserFeedbackLoading" | ||
(newUserFeedbackAnswer)="onNewUserFeedbackAnswer($event)" | ||
></gn-ui-user-feedback-item> | ||
</div> | ||
</div> | ||
</ng-template> |
24 changes: 24 additions & 0 deletions
24
apps/datahub/src/app/record/record-user-feedbacks/record-user-feedbacks.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing' | ||
|
||
import { RecordUserFeedbacksComponent } from './record-user-feedbacks.component' | ||
|
||
describe('RelatedRecordsComponent', () => { | ||
let component: RecordUserFeedbacksComponent | ||
let fixture: ComponentFixture<RecordUserFeedbacksComponent> | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [RecordUserFeedbacksComponent], | ||
}).compileComponents() | ||
}) | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(RecordUserFeedbacksComponent) | ||
component = fixture.componentInstance | ||
fixture.detectChanges() | ||
}) | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy() | ||
}) | ||
}) |
Oops, something went wrong.