-
Notifications
You must be signed in to change notification settings - Fork 19
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
O3-4250 (feat) Ability to add Cash Points and Payment modes via a UI #74
Conversation
} from '@carbon/react'; | ||
import { Add } from '@carbon/react/icons'; | ||
import { useTranslation } from 'react-i18next'; | ||
import axios from 'axios'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, if at all possible, use openmrsFetch instead of axios.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ibacher Absolutely
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ODORA0 just a few changes
name: data.name, | ||
uuid: data.uuid, | ||
location: { uuid: data.location }, | ||
const response = await openmrsFetch('/ws/rest/v1/billing/cashPoint', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could use restBaseUrl
otherthan completing the entire url
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -55,7 +53,7 @@ const PaymentModesConfig: React.FC = () => { | |||
|
|||
const fetchPaymentModes = useCallback(async () => { | |||
try { | |||
const response = await axios.get(`${baseUrl}/billing/paymentMode?v=full`); | |||
const response = await openmrsFetch('/ws/rest/v1/billing/paymentMode?v=full'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
await axios.post(`${baseUrl}/billing/paymentMode`, { | ||
name: data.name, | ||
description: data.description, | ||
const response = await openmrsFetch('/ws/rest/v1/billing/paymentMode', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -117,7 +132,9 @@ const PaymentModesConfig: React.FC = () => { | |||
if (!selectedPaymentMode) return; | |||
|
|||
try { | |||
await axios.delete(`${baseUrl}/billing/paymentMode/${selectedPaymentMode.uuid}`); | |||
await openmrsFetch(`/ws/rest/v1/billing/paymentMode/${selectedPaymentMode.uuid}`, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ODORA0 looks good
Requirements
For changes to apps
If applicable
Summary
Add UI functionality for creating billing settings during facility configuration
setting e.g. cash points and payment modes via tables
Screenshots
Screen.Recording.2024-12-11.at.12.42.26.mov
Related Issue
https://openmrs.atlassian.net/browse/O3-4250
Other
To do
and existing bill (support to be added to the backend first)