Merge branch 'dev' of https://github.com/dikstub-rssa/simrs-be into feat/sync-setting-vanili

This commit is contained in:
vanilia
2025-11-28 12:23:34 +07:00
48 changed files with 1418 additions and 419 deletions

No files matched your search

@@ -43,9 +43,27 @@ func Checkout(input *e.Encounter) error {
return helper.DoJsonRequest(input, "PATCH", endpoint)
}
func Cancel(input *e.Encounter) error {
func UpdateStatus(input *e.Encounter) error {
prefixEndpoint := getPrefixEndpoint()
endpoint := fmt.Sprintf("%s/%v/cancel", prefixEndpoint, input.Id)
endpoint := fmt.Sprintf("%s/%v/update-status", prefixEndpoint, input.Id)
return helper.DoJsonRequest(input, "PATCH", endpoint)
}
func RequestSwitchUnit(input *e.Encounter) error {
prefixEndpoint := getPrefixEndpoint()
endpoint := fmt.Sprintf("%s/%v/req-switch-unit", prefixEndpoint, input.Id)
return helper.DoJsonRequest(input, "PATCH", endpoint)
}
func ApproveSwitchUnit(input *e.ApproveCancelUnitDto) error {
prefixEndpoint := getPrefixEndpoint()
endpoint := fmt.Sprintf("%s/%v/approve-switch-unit", prefixEndpoint, input.Id)
return helper.DoJsonRequest(input, "PATCH", endpoint)
}
func CancelSwitchUnit(input *e.ApproveCancelUnitDto) error {
prefixEndpoint := getPrefixEndpoint()
endpoint := fmt.Sprintf("%s/%v/cancel-switch-unit", prefixEndpoint, input.Id)
return helper.DoJsonRequest(input, "PATCH", endpoint)
}