Skip to content
Snippets Groups Projects
Commit d9238e97 authored by Marlène SIMONDANT's avatar Marlène SIMONDANT
Browse files

Fusionner closingComment et processingComment

parent dd6847a0
No related branches found
No related tags found
1 merge request!983feat(dashboard) : create dashboard !
Checking pipeline status
......@@ -269,7 +269,7 @@
[opened]="isModalOpenned"
[title]="'Clôturer un accompagnement'"
[validateDisabled]="isValidateDisabled"
(closed)="closeOrientation($event)"
(closed)="closeOrientation($event, isClosed)"
>
<div class="modalContent emphasized">
{{ orientation.personOriented.name }} {{ orientation.personOriented.surname | uppercase }}
......@@ -287,7 +287,7 @@
<div>
<label for="comment">Commentaires <span class="optional">(facultatifs)</span></label>
<app-textarea #comment id="comment" [value]="orientation.closingComment" />
<app-textarea #comment id="comment" [value]="orientation.processingComment" />
</div>
</div>
</app-modal>
......@@ -27,7 +27,7 @@ export class OrientationDetailsComponent implements OnInit {
public isModalOpenned = false;
public userProfile: User;
public from: string;
public closingComment = '';
public processingComment = '';
public selectedStatus = '';
public isClosed: boolean;
......@@ -61,15 +61,15 @@ export class OrientationDetailsComponent implements OnInit {
this.isModalOpenned = true;
}
public closeOrientation(event): void {
public closeOrientation(event, isClosed): void {
if (event) {
const comment = this.commentTextarea?.value || '';
const sanitizedComment = this.sanitizer.sanitize(SecurityContext.HTML, comment);
this.patchOrientation({
status: this.selectedStatus,
action: null,
closingComment: sanitizedComment,
closingDate: new Date(),
processing: sanitizedComment,
closingDate: isClosed ? null : new Date(),
modifiedBy: this.userProfile._id,
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment