Skip to content

Commit

Permalink
add. order notes in pending lab orders table (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
abinaya-u authored Nov 6, 2023
1 parent b4915b6 commit fc70c67
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/__mocks__/pendingLabOrders.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const mockPendingLabOrdersResponse: LabOrdersFetchResponse = {
provider: 'Super Man',
providerUuid: '1',
fulfillerStatus: null,
commentToFulfiller: null,
},
{
concept: {
Expand All @@ -23,6 +24,7 @@ export const mockPendingLabOrdersResponse: LabOrdersFetchResponse = {
provider: 'Super Man',
providerUuid: '2',
fulfillerStatus: null,
commentToFulfiller: null,
},
{
concept: {
Expand All @@ -34,6 +36,7 @@ export const mockPendingLabOrdersResponse: LabOrdersFetchResponse = {
provider: 'Super Man',
providerUuid: '2',
fulfillerStatus: null,
commentToFulfiller: null,
},
{
concept: {
Expand All @@ -45,6 +48,7 @@ export const mockPendingLabOrdersResponse: LabOrdersFetchResponse = {
provider: 'Super Man',
providerUuid: '2',
fulfillerStatus: null,
commentToFulfiller: null,
},
],
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ describe('Paginated Table', () => {
testName: 'Routine Blood',
date: 'April 19, 2022',
orderedBy: 'Test Orderer',
orderNotes : "sample notes"
},
],
goTo: jest.fn(),
Expand Down Expand Up @@ -83,6 +84,9 @@ describe('Paginated Table', () => {
expect(
screen.getByRole('cell', {name: 'Routine Blood'}),
).toBeInTheDocument()
expect(
screen.getByRole('cell', {name: 'sample notes'}),
).toBeInTheDocument()
expect(
screen.getAllByRole('checkbox', {
name: /select row/i,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
TableHead,
TableHeader,
TableRow,
TableSelectAll,
TableSelectRow,
TableSelectRowProps,
} from 'carbon-components-react'
Expand Down Expand Up @@ -74,6 +73,7 @@ const PendingLabOrdersTable = ({
orderedBy: pendingLabOrderRow.provider,
providerUuid: pendingLabOrderRow.providerUuid,
conceptUuid: pendingLabOrderRow.concept.uuid,
orderNotes: pendingLabOrderRow.commentToFulfiller,
}
})
}
Expand Down
1 change: 1 addition & 0 deletions src/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export interface LabOrders {
provider: string
providerUuid: string
fulfillerStatus: string
commentToFulfiller: string
}

interface Concept {
Expand Down
4 changes: 4 additions & 0 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ export const headers = [
key: 'orderedBy',
header: 'Ordered By',
},
{
key : 'orderNotes',
header : 'Order Notes'
}
]

export const reportHeaders = [
Expand Down

0 comments on commit fc70c67

Please sign in to comment.