# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~
GET         /                               controllers.Application.index()
GET         /init                           controllers.Application.init()

# Link Persons
GET         /persons                        controllers.LinkPersonController.list(page: Int ?= 0, sortBy: String ?= "hhid_l", order ?= "asc", hhid_l ?= "", hhid_c ?= "", status ?= "", online ?= "", lastChange ?= "", sample ?= "", gip_1_2 ?= "", lieferung ?= "", liefDat ?= "", rekDat ?= "", beg1Datum ?= "", beg1Status05708 ?= "", beg2Datum ?= "", beg2Status05708 ?= "")
GET         /persons/modal/:id              controllers.LinkPersonController.getLinkDetails(id :Long)

# Cervis Persons
GET         /cervis/modal/hhid_c/:id        controllers.CervisPersonController.getDetailsByHhidC(id :String)
GET         /cervis/modal/giwi/:name        controllers.GiwiController.getByInvNr(name : String)
GET         /cervis/modal/note/:id          controllers.CervisPersonController.getNoteForm(id: String)
POST        /cervis/modal/note/             controllers.CervisPersonController.saveNote()
GET         /cervis/modal/attachment/:name  controllers.CervisPersonController.getAttachment(name: String)
POST        /cervis/modal/attachment        controllers.CervisPersonController.saveAttachment()


# SIM Bestand
GET         /simbestand                     controllers.SimBestandController.list(sortBy: String ?= "simId", order ?= "asc", simId: binders.LongParameter ?= null, provider: String ?= null, hhid_c: String ?= null, formerHhid_c: String ?= null, simNr: String ?= null, telNr: String ?= null, aktiviert: binders.DateParameter ?= null, endeVertrag: binders.DateParameter ?= null, kostenstelle: String ?= null, beiCervis: binders.BooleanParameter ?= null, aktiv: binders.BooleanParameter ?= null, terminatedMail: binders.DateParameter ?= null, terminatedTo: binders.DateParameter ?= null, terminationCanceled: binders.DateParameter ?= null, routerId: String ?= null, comment: String ?= null)
POST        /simbestand                     controllers.SimBestandController.save()
GET         /simbestand/modal/:id           controllers.SimBestandController.getSimDetails(id: Long)
GET         /simbestand/mail                controllers.SimBestandController.getMailForm(simId:Long, simNr: String, telNr: String)
POST        /simbestand/mail                controllers.SimBestandController.sendMail()

# Cervis Dokumentation
GET         /doku                           controllers.DokuController.list(sortBy: String ?= "eingangsTag", order ?= "desc", auftragId ?= null, hhid_c ?= null, eingangsTag ?= null, terminZeit ?= null, giwiId ?= null, internetanschluss ?= null, router ?= null, auftrag ?= null, status ?= null, letzteMeldung ?= null, erledigt ?= null, storniert ?= null, notizen ?= null, techniker ?= null, rechnungsnummer ?= null)

# GIWI
GET         /giwiBestand                    controllers.GiwiController.listBestand(sortBy: String ?= "name", order: String ?= "asc", inventarNr: String ?= null, name: String ?= null, hhid_c: String ?= null, beiCervis: String ?= null)
GET         /giwiInventarisierung           controllers.GiwiController.listInventarisierung(sortBy: String ?= "name", order: String ?= "asc", inventarNr: String ?= null, name: String ?= null, hhid_c: String ?= null, beiCervis: String ?= null)

# Reports
GET         /report/:id                     controllers.ReportController.show(id:Int)
GET         /report/participation/mail      controllers.ReportController.sendParticipationReport()
GET         /report/sim/mail                controllers.ReportController.sendSimReport()

# Import
GET         /import/link-wochenbericht      controllers.ExcelController.uploadLinkWochenbericht()
POST        /import/link-wochenbericht      controllers.ExcelController.parseLinkWochenbericht()
GET         /import/keytable                controllers.ExcelController.uploadKeyTable()
POST        /import/keytable                controllers.ExcelController.parseKeyTable()
GET         /import/simbestand              controllers.ExcelController.uploadSimBestand()
POST        /import/simbestand              controllers.ExcelController.parseSimBestand()
GET         /import/cervis-doku             controllers.ExcelController.uploadCervisDoku()
POST        /import/cervis-doku             controllers.ExcelController.parseCervisDoku()
GET         /import/giwibestand             controllers.ExcelController.uploadGiwiBestand()
POST        /import/giwibestand             controllers.ExcelController.parseGiwiBestand()
GET         /import/giwiinventarisierung    controllers.ExcelController.uploadGiwiInventarisierung()
POST        /import/giwiinventarisierung    controllers.ExcelController.parseGiwiInventarisierung()
GET         /import/rechnung                controllers.ExcelController.uploadRechnung()
POST        /import/rechnung                controllers.ExcelController.parseRechnung()


# Export
GET         /export/personen.csv            controllers.LinkPersonController.export(sortBy: String ?= "hhid_l", order ?= "asc", hhid_l ?= null, hhid_c ?= null, status ?= null, online ?= null, lastChange ?= null, sample ?= null, gip_1_2 ?= null, lieferung ?= null, liefDat ?= null, rekDat ?= null, beg1Datum ?= null, beg1Status05708 ?= null, beg2Datum ?= null, beg2Status05708 ?= null)
GET         /export/doku.csv                controllers.DokuController.export(sortBy: String ?= "auftragId", order ?= "asc", auftragId ?= null, hhid_c ?= null, eingangsTag ?= null, terminZeit ?= null, giwiId ?= null, internetanschluss ?= null, router ?= null, auftrag ?= null, status ?= null, letzteMeldung ?= null, erledigt ?= null, storniert ?= null, notizen ?= null, techniker ?= null, rechnungsnummer ?= null)
GET         /export/sim.csv                 controllers.SimBestandController.export(sortBy: String ?= "simId", order ?= "asc", simId: binders.LongParameter ?= null, provider: String ?= null, hhid_c: String ?= null, formerHhid_c: String ?= null, simNr: String ?= null, telNr: String ?= null, aktiviert: binders.DateParameter ?= null, endeVertrag: binders.DateParameter ?= null, kostenstelle: String ?= null, beiCervis: binders.BooleanParameter ?= null, aktiv: binders.BooleanParameter ?= null, terminatedMail: binders.DateParameter ?= null, terminatedTo: binders.DateParameter ?= null, terminationCanceled: binders.DateParameter ?= null, routerId: String ?= null, comment: String ?= null)

# Mails
GET         /mail                           controllers.MailController.showFetchMails()
POST        /mail                           controllers.MailController.fetchMails()

# User accounts
GET         /users                          controllers.UserController.list(s ?= "last_name", o ?= "asc")
GET         /users/create                   controllers.UserController.showCreate()
POST        /users/create                   controllers.UserController.save()
GET         /users/:id                      controllers.UserController.showEdit(id:Long)
POST        /users/:id                      controllers.UserController.update(id:Long)
POST        /users/:id/delete               controllers.UserController.delete(id:Long)

# Session and authentification
GET         /login                          controllers.SessionController.showLogin()
POST        /login                          controllers.SessionController.login()
GET         /logout                         controllers.SessionController.logout()

# Log Files
GET         /logs                           controllers.LogController.listLogFiles()
GET         /log/:file                      controllers.LogController.getLogFile(file:String)

# Demo data
GET         /generatedemodata               controllers.Application.createDemoData()

# Map static resources from the /public folder to the /assets URL path
GET         /public/*file                   controllers.Assets.at(path="/public", file)

