feat (orders): add guard if parents are done, cant create child
This commit is contained in:
@@ -120,7 +120,6 @@ func SetRoutes() http.Handler {
|
||||
hc.RegCrud(r, "/v1/prescription-item", prescriptionitem.O)
|
||||
hc.RegCrud(r, "/v1/device-order-item", deviceorderitem.O)
|
||||
hc.RegCrud(r, "/v1/material-order-item", materialorderitem.O)
|
||||
hc.RegCrud(r, "/v1/mcu-order-sub-item", mcuordersubitem.O)
|
||||
hk.GroupRoutes("/v1/mcu-order", r, hk.MapHandlerFunc{
|
||||
"GET /": mcuorder.O.GetList,
|
||||
"GET /{id}": mcuorder.O.GetDetail,
|
||||
@@ -136,8 +135,17 @@ func SetRoutes() http.Handler {
|
||||
"POST /": mcuorderitem.O.Create,
|
||||
"PATCH /{id}": mcuorderitem.O.Update,
|
||||
"DELETE /{id}": mcuorderitem.O.Delete,
|
||||
"PATCH /{id}/complete": mcuorderitem.O.Complete,
|
||||
"PATCH /{id}/set-schedule": mcuorderitem.O.SetSchedule,
|
||||
})
|
||||
hk.GroupRoutes("/v1/mcu-order-sub-item", r, hk.MapHandlerFunc{
|
||||
"GET /": mcuordersubitem.O.GetList,
|
||||
"GET /{id}": mcuordersubitem.O.GetDetail,
|
||||
"POST /": mcuordersubitem.O.Create,
|
||||
"PATCH /{id}": mcuordersubitem.O.Update,
|
||||
"DELETE /{id}": mcuordersubitem.O.Delete,
|
||||
"PATCH /{id}/complete": mcuordersubitem.O.Complete,
|
||||
})
|
||||
hk.GroupRoutes("/v1/encounter", r, hk.MapHandlerFunc{
|
||||
"GET /": encounter.O.GetList,
|
||||
"GET /{id}": encounter.O.GetDetail,
|
||||
|
||||
Reference in New Issue
Block a user