Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ export class FileUploadComponent implements OnInit, OnDestroy {
if (this.control) {
this.control.setValue(this.innerValue);
this.control.markAsTouched();
this.control.markAsDirty();
}
this.triggerSave();
}
Expand Down Expand Up @@ -279,6 +280,10 @@ export class FileUploadComponent implements OnInit, OnDestroy {
if (this.control && !this.control.pristine) {
this.innerValue = this.control.value;
this.comment = this.control.value?.comment ?? this.review.comment;
// restore uploadedFile from saved file data so template shows file after pagination
if (this.innerValue?.file?.url) {
this.uploadedFile = { ...this.innerValue.file, cdnUrl: this.innerValue.file.url } as TusFileResponse;
}
} else {
this.innerValue = {
answer: this.review.answer,
Expand All @@ -291,6 +296,10 @@ export class FileUploadComponent implements OnInit, OnDestroy {
if ((this.submissionStatus === 'in progress') && (this.doAssessment)) {
if (this.control && !this.control.pristine) {
this.innerValue = this.control.value;
// restore uploadedFile from saved file data so template shows file after pagination
if (this.innerValue?.url) {
this.uploadedFile = { ...this.innerValue, cdnUrl: this.innerValue.url } as TusFileResponse;
}
} else {
this.innerValue = this.submission?.answer;
}
Expand Down
Loading