diff --git a/OTRS-Watch.xcodeproj/project.xcworkspace/xcuserdata/linnemann.xcuserdatad/UserInterfaceState.xcuserstate b/OTRS-Watch.xcodeproj/project.xcworkspace/xcuserdata/linnemann.xcuserdatad/UserInterfaceState.xcuserstate index bf87149..fdd5423 100644 Binary files a/OTRS-Watch.xcodeproj/project.xcworkspace/xcuserdata/linnemann.xcuserdatad/UserInterfaceState.xcuserstate and b/OTRS-Watch.xcodeproj/project.xcworkspace/xcuserdata/linnemann.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/OTRS-Watch/Base.lproj/Main.storyboard b/OTRS-Watch/Base.lproj/Main.storyboard index 0c77db2..58500d8 100644 --- a/OTRS-Watch/Base.lproj/Main.storyboard +++ b/OTRS-Watch/Base.lproj/Main.storyboard @@ -911,6 +911,9 @@ + + + diff --git a/OTRS-Watch/Constants.swift b/OTRS-Watch/Constants.swift index a91c1ef..032cdaa 100644 --- a/OTRS-Watch/Constants.swift +++ b/OTRS-Watch/Constants.swift @@ -12,6 +12,7 @@ struct Constants { struct SERVICE { static let URL = "http://saeweb01.sae.intra/web/ws/v1/user/permission/" + static let URL_TICKET = "http://saeotrs01.sae.intra/otrs/index.pl?Action=AgentTicketZoom;TicketID=" } struct USER_SETTINGS { diff --git a/OTRS-Watch/ViewController.swift b/OTRS-Watch/ViewController.swift index c655382..ec9bec0 100644 --- a/OTRS-Watch/ViewController.swift +++ b/OTRS-Watch/ViewController.swift @@ -81,6 +81,14 @@ class ViewController: NSViewController { // MARK: Actions + @IBAction func otrsListDoubleClickAction(_ sender: NSTableView) { + let ticketID = OTRS.sharedInstance.ticketDictionary[sender.clickedRow].id + + if let url = URL(string: "\(Constants.SERVICE.URL_TICKET)\(ticketID)"), NSWorkspace.shared().open(url) { + print("🖥 Going to open ticket #\(ticketID)") + } + } + @IBAction func saveSettingsAction(_ sender: NSButton) { UserDefaults.standard.setValue(txtUsername.stringValue, forKey: Constants.USER_SETTINGS.CREDENTIALS.USER)