Skip to content

Commit

Permalink
make overflow menu visible and save the editted billable service succ…
Browse files Browse the repository at this point in the history
…essfully
  • Loading branch information
lucyjemutai committed Oct 24, 2024
1 parent 28e1317 commit 7a1ba08
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/billable-services/billable-service.resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ export function useConceptsSearch(conceptToLookup: string) {
}

export const updateBillableService = (uuid: string, payload: any) => {
const url = `${apiBasePath}/billable-service/${uuid}`;
const url = `${apiBasePath}/billableService/${uuid}`;
return openmrsFetch(url, {
method: 'PUT',
method: 'POST',
body: JSON.stringify(payload),
headers: {
'Content-Type': 'application/json',
Expand Down
4 changes: 2 additions & 2 deletions src/billable-services/billable-services.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ const BillableServices = () => {
status: service.serviceStatus,
prices: '--',
actions: (
<TableCell className="cds--table-column-menu">
<TableCell>
<OverflowMenu size="sm" flipped>
<OverflowMenuItem
itemText={t('editBillableService', 'Edit billable service')}
itemText={t('editBillableService', 'Edit Billable Service')}
onClick={() => handleEditService(service)}
/>
</OverflowMenu>
Expand Down
11 changes: 11 additions & 0 deletions src/billable-services/billable-services.scss
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,14 @@
display: grid;
grid-template-columns: 16rem 1fr;
}

.always-visible-overflow-menu {
.cds--overflow-menu {
opacity: 1 !important;
visibility: visible !important;
}

.cds--overflow-menu-options__btn {
display: block !important;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const AddBillableService: React.FC<{ editingService?: any; onClose: () => void }
serviceType: billableServicePayload.serviceType.uuid,
servicePrices: data.payment.map((payment) => ({
paymentMode: payment.paymentMode,
price: payment.price,
price: parseFloat(payment.price),
})),
serviceStatus: 'ENABLED',
concept: selectedConcept?.uuid,
Expand Down

0 comments on commit 7a1ba08

Please sign in to comment.