In qor admin, how do I disable the create button and disable update the selected item? I've tried, but I can only hide the Delete button in action for each record. Here is my code:
borrowerLog := a.adm.AddResource(&model.BorrowerHistoryLog{}, &admin.Config{Name: "Borrower Log", Menu: []string{"Borrower"}})
borrowerLog.IndexAttrs("-ID")
borrowerLog.Action(&admin.Action{
Name: "Delete",
Visible: func(record interface{}, context *admin.Context) bool {
return false
},
})
whitelist := a.adm.AddResource(&model.Whitelist{}, &admin.Config{Name: "Whitelist", Menu: []string{"Client"}})
whitelist.IndexAttrs("-ID"