From ed6946aa8d8b92aa40a5723b6604b9b2f6ad8aee Mon Sep 17 00:00:00 2001
From: Jakob Junck <jakob.junck@gmail.com>
Date: Sun, 17 Nov 2024 23:00:59 +0100
Subject: [PATCH] first real commit: added an dummy button

---
 .../header-bar/header-bar.component.html        | 17 +++++++++++++++++
 .../header-bar/header-bar.component.ts          |  7 +++++++
 2 files changed, 24 insertions(+)

diff --git a/src/frontend/src/app/components/header-bar/header-bar.component.html b/src/frontend/src/app/components/header-bar/header-bar.component.html
index f06c630..ccf2013 100644
--- a/src/frontend/src/app/components/header-bar/header-bar.component.html
+++ b/src/frontend/src/app/components/header-bar/header-bar.component.html
@@ -23,6 +23,14 @@
           </div>
         </button>
       </li>
+      <li>
+        <button class="button align-bottom" (click)="importOCEL()">
+          <div>
+            <i class="bi bi-upload btn-icon"></i>
+            <span><b>Import</b> OCEL</span>
+          </div>
+        </button>
+      </li>
       <li>
         <button class="button align-bottom" (click)="importTreeFromPTML()">
           <div>
@@ -184,6 +192,15 @@
     accept=".xes"
   />
 
+  <!-- TODO: Change Accept Format -->
+  <input
+    #fileUploadOCEL
+    type="file"
+    class="d-none"
+    (change)="handleSelectedEventLogFile($event, false)"
+    accept=".xes"
+  />
+
   <input
     #fileUploadProcessTree
     type="file"
diff --git a/src/frontend/src/app/components/header-bar/header-bar.component.ts b/src/frontend/src/app/components/header-bar/header-bar.component.ts
index 28a6282..f9b3b1b 100644
--- a/src/frontend/src/app/components/header-bar/header-bar.component.ts
+++ b/src/frontend/src/app/components/header-bar/header-bar.component.ts
@@ -26,6 +26,7 @@ import { LogExportService } from 'src/app/services/logExportService/log-export.s
 })
 export class HeaderBarComponent implements OnDestroy {
   @ViewChild('fileUploadEventLog') fileUploadEventLog: ElementRef;
+  @ViewChild('fileUploadOCEL') fileUploadOCEL: ElementRef;
   @ViewChild('fileUploadProcessTree') fileUploadProcessTree: ElementRef;
   @ViewChild('fileUploadProject') fileUploadProject: ElementRef;
   @ViewChild('fileUploadEventLogRetry') fileUploadEventLogRetry: ElementRef;
@@ -73,6 +74,12 @@ export class HeaderBarComponent implements OnDestroy {
     this.fileUploadEventLog.nativeElement.click();
   }
 
+  //TODO: remove comments
+  importOCEL(): void {
+    console.log("We try to upload an OCEL, but nothing is yet implemented")
+    this.fileUploadOCEL.nativeElement.click();
+  }
+
   handleSelectedEventLogFile(e, isRetry = false): void {
     const fileList: FileList = e.target.files;
     if (fileList.length > 0) {
-- 
GitLab