refactor rpa func signature
This commit is contained in:
@@ -123,7 +123,7 @@ const upload = function () {
|
||||
}
|
||||
|
||||
const doRpa = function () {
|
||||
Rpa(Math.trunc(ld.month), Math.trunc(ld.year)).catch(err => console.log(err))
|
||||
Rpa(ld.companyID, ld.month, ld.year).catch(err => console.log(err))
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -41,7 +41,10 @@ func (s *Srv) UploadExcel() string {
|
||||
return file
|
||||
}
|
||||
|
||||
func (s *Srv) Rpa(month float64, year float64) error {
|
||||
func (s *Srv) Rpa(companyName string, month float64, year float64) error {
|
||||
//todo: readb company details by name
|
||||
//todo: save xls to application folder as /name/year/month.xlsx
|
||||
|
||||
//wails nümerik değerleri float gönderiyor.. int gönderimi araştırılmalı
|
||||
slog.Debug("inputs", "year", year, "month", month)
|
||||
|
||||
@@ -65,6 +68,9 @@ func (s *Srv) Rpa(month float64, year float64) error {
|
||||
return err
|
||||
}
|
||||
for _, row := range cols {
|
||||
//todo: process excel and do data input
|
||||
|
||||
//todo: inform user about process and errors
|
||||
run.APP.Events.Emit(&application.WailsEvent{
|
||||
Name: "logProcess",
|
||||
Data: row[1],
|
||||
|
||||
Reference in New Issue
Block a user