compnay select

This commit is contained in:
ctengiz
2024-03-25 23:09:30 +03:00
parent 18ff9ddbfd
commit 888d0800bb
18 changed files with 315 additions and 280 deletions

View File

@@ -1,6 +1,9 @@
package main
import (
"bordrobot/lib/company"
"bordrobot/lib/db"
"bordrobot/lib/dbsrv"
"embed"
"log"
"time"
@@ -21,6 +24,12 @@ var assets embed.FS
// logs any error that might occur.
func main() {
//Init SqLite database
err := db.InitDB(".")
if err != nil {
log.Fatal(err)
}
// Create a new Wails application by providing the necessary options.
// Variables 'Name' and 'Description' are for application metadata.
// 'Assets' configures the asset server with the 'FS' variable pointing to the frontend files.
@@ -30,8 +39,8 @@ func main() {
Name: "bordro-robotu",
Description: "A demo of using raw HTML & CSS",
Bind: []any{
&BotService{},
&LoginService{},
&company.Company{},
&dbsrv.Srv{},
},
Assets: application.AssetOptions{
Handler: application.AssetFileServerFS(assets),
@@ -70,7 +79,7 @@ func main() {
}
}()
// Run the application. This blocks until the application has been exited.
err := app.Run()
err = app.Run()
// If an error occurred while running the application, log it and exit.
if err != nil {