wip
This commit is contained in:
parent
99a4cc7b7a
commit
489fed7471
@ -55,7 +55,6 @@ func BarcodesHandler(storage storage.Storager) httprouter.Handle {
|
||||
// append barcode to holder
|
||||
Barcodes = append(Barcodes, *data)
|
||||
} else {
|
||||
|
||||
// get loading bed from string
|
||||
lb, ok := types.MapLoadingBed[evacuadores]
|
||||
// if loading bed not found
|
||||
|
@ -4,9 +4,7 @@ import (
|
||||
"net/http"
|
||||
"text/template"
|
||||
|
||||
"git.espin.casa/albert/cml04-falcon-ui/helper"
|
||||
"git.espin.casa/albert/cml04-falcon-ui/storage"
|
||||
"git.espin.casa/albert/cml04-falcon-ui/types"
|
||||
"github.com/julienschmidt/httprouter"
|
||||
)
|
||||
|
||||
@ -22,24 +20,24 @@ func BundleHandler(storage storage.Storager) httprouter.Handle {
|
||||
}
|
||||
}
|
||||
|
||||
if r.Method == http.MethodPost {
|
||||
// barcodes holder
|
||||
Bundles := []types.BundleData{}
|
||||
// parse form data from formulary
|
||||
if err := r.ParseForm(); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
// barcode
|
||||
codigo := r.FormValue("codigo")
|
||||
// date range
|
||||
fechas := r.FormValue("fechas")
|
||||
// get range dates
|
||||
inicio, final, err := helper.Dates(fechas)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
}
|
||||
// if r.Method == http.MethodPost {
|
||||
// // barcodes holder
|
||||
// Bundles := []types.BundleData{}
|
||||
// // parse form data from formulary
|
||||
// if err := r.ParseForm(); err != nil {
|
||||
// http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
// }
|
||||
// // barcode
|
||||
// codigo := r.FormValue("codigo")
|
||||
// // date range
|
||||
// fechas := r.FormValue("fechas")
|
||||
// // get range dates
|
||||
// inicio, final, err := helper.Dates(fechas)
|
||||
// if err != nil {
|
||||
// http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -29,3 +29,11 @@ type Barcode struct {
|
||||
UpdatedAt time.Time `json:"updatedat,omitempty"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"deletedat,omitempty"`
|
||||
}
|
||||
|
||||
// func (b *Barcode) FormatCreatedAt() string {
|
||||
// return b.CreatedAt.Format("02/01/2006 15:04:03")
|
||||
// }
|
||||
|
||||
// func (b *Barcode) FormatUpdateAt() string {
|
||||
// return b.UpdatedAt.Format("02/01/2006 15:04:03")
|
||||
// }
|
||||
|
Loading…
Reference in New Issue
Block a user