ciyidogan commited on
Commit
bb05395
·
verified ·
1 Parent(s): 9e04b5d

Update flare-ui/src/app/dialogs/version-edit-dialog/version-edit-dialog.component.ts

Browse files
flare-ui/src/app/dialogs/version-edit-dialog/version-edit-dialog.component.ts CHANGED
@@ -749,11 +749,25 @@ export default class VersionEditDialogComponent implements OnInit {
749
  }
750
  }
751
 
752
- compareVersions() {
753
- // TODO: Implement version comparison
754
- this.snackBar.open('Version comparison coming soon', 'Close', { duration: 3000 });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
755
  }
756
-
757
  close() {
758
  this.dialogRef.close(true);
759
  }
 
749
  }
750
  }
751
 
752
+ async compareVersions() {
753
+ if (this.versions.length < 2) {
754
+ this.snackBar.open('Need at least 2 versions to compare', 'Close', { duration: 3000 });
755
+ return;
756
+ }
757
+
758
+ const { default: VersionCompareDialogComponent } = await import('../version-compare-dialog/version-compare-dialog.component');
759
+
760
+ this.dialog.open(VersionCompareDialogComponent, {
761
+ width: '90vw',
762
+ maxWidth: '1000px',
763
+ maxHeight: '80vh',
764
+ data: {
765
+ versions: this.versions,
766
+ selectedVersion: this.selectedVersion
767
+ }
768
+ });
769
  }
770
+
771
  close() {
772
  this.dialogRef.close(true);
773
  }