-
Notifications
You must be signed in to change notification settings - Fork 49
(feat) O3-5121: Add ability to edit cashpoints #442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 16 commits
466c1d6
6fbd5f8
16aef2f
9dfb19b
360c4cf
2113069
9a93b0f
298cd00
a8dbb7c
0f12ea0
ff89adf
5e2e69e
e7acf06
513d9b5
6f4301a
a08ef64
cdfaadb
0a84825
4806d74
f1ce2ea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -6,6 +6,7 @@ import type { | |||||
| ConceptSearchResult, | ||||||
| CreateBillableServicePayload, | ||||||
| UpdateBillableServicePayload, | ||||||
| CashPointPayload, | ||||||
| } from '../types'; | ||||||
| import type { BillingConfig } from '../config-schema'; | ||||||
|
|
||||||
|
|
@@ -99,3 +100,23 @@ export const updateBillableService = (uuid: string, payload: UpdateBillableServi | |||||
| }, | ||||||
| }); | ||||||
| }; | ||||||
|
|
||||||
| export const createCashPoint = (payload: CashPointPayload) => { | ||||||
| return openmrsFetch(`${apiBasePath}cashPoint`, { | ||||||
| method: 'POST', | ||||||
| body: payload, | ||||||
| headers: { | ||||||
| 'Content-Type': 'application/json', | ||||||
| }, | ||||||
| }); | ||||||
| }; | ||||||
|
|
||||||
| export const updateCashPoint = (uuid: string, payload: CashPointPayload) => { | ||||||
abertnamanya marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| return openmrsFetch(`${apiBasePath}cashPoint/${uuid}`, { | ||||||
| method: 'POST', | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, it should be a PUT, but the endpoint does not seem to accept the request
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, that sounds like a bug. The controller in the backend might be misparsing main resource URLs. Could you have a look when you get some time, @wikumChamith? Let's keep it as a POST for now, @abertnamanya. |
||||||
| body: payload, | ||||||
| headers: { | ||||||
| 'Content-Type': 'application/json', | ||||||
| }, | ||||||
| }); | ||||||
| }; | ||||||
abertnamanya marked this conversation as resolved.
Show resolved
Hide resolved
abertnamanya marked this conversation as resolved.
Show resolved
Hide resolved
|
Uh oh!
There was an error while loading. Please reload this page.