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

feature/1444 - Add ability to unamend an unmodified amendment #2136

Merged
merged 3 commits into from
Aug 23, 2024

Conversation

sasha-dresden
Copy link
Contributor

Issue FECFILE-1444
API PR PR1032

@@ -107,6 +108,28 @@ export class ReportListComponent extends TableListBaseComponent<Report> implemen
});
}

public confirmUnamend(report: Report): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not seeing a confirm dialog in the ticket. I think we need to leave this out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took out confirm.

.startUnamendment(report)
.pipe(take(1), takeUntil(this.destroy$))
.subscribe(() => {
this.loadTableItems({});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ticket references a toast message. Probably need to add:

    this.messageService.add({
      severity: 'success',
      summary: 'Successful',
      detail: 'Report Unamended',
      life: 3000,
    });

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in toast.

@@ -104,6 +104,10 @@ export class ReportService implements TableListService<Report> {
return this.apiService.post(`${this.apiEndpoint}/${report.id}/amend/`, {});
}

public startUnamendment(report: Report): Observable<string> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see we're following the pattern the amendment implementation set. What do you think of changing these two to promises?

public amend(report:Report): Promise<string> {
  return getFirstValueFrom(this.apiService.post(...))
 }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I just saw this one. Yea promises would make a lot more sense here.

Copy link

sonarcloud bot commented Aug 23, 2024

@toddlees toddlees merged commit ce8be9e into develop Aug 23, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants