CMQuah / hrms_frontend_claim-service

HRMS fork repo for claim-service's frontend
0 stars 0 forks source link

When checking whether table exist the p.Table is lower case #13

Closed CMQuah closed 1 year ago

CMQuah commented 1 year ago

image

Issue could be in all leave.config.*.go

CMQuah commented 1 year ago

Mistakenly assume that Limitation is used

Error in helpersConfigTable.go in leave-service image

CMQuah commented 1 year ago
package handlers

// getTableNameDB returns the name of the config table as label in the DB
func getTableNameDB(ct string) string {
    var dbTable string
    switch ct {
    case "Limitation":
        dbTable = "CONFIG_LIMITATION"
    case "Calculation":
        dbTable = "CONFIG_CALCULATION_METHOD"
    // case "Status": //Require verify ... not shown on UI
    //  dbTable = "CONFIG_STATUS"
    // case "Gender": //Require verify ... not shown on UI
    //  dbTable = "CONFIG_GENDER"
    default:
        dbTable = ""
    }

    return dbTable
}

and for update

image

CMQuah commented 1 year ago

Done