Skip to content
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

Step 4: Pick Page Modal forms and improvements #297

Merged
merged 2 commits into from
Jun 9, 2018
Merged

Conversation

awalkowiak
Copy link
Collaborator

  • added Edit Pick modal form
  • added Adjust inventory modal form
  • added custom table for this step
  • added styling for crossed out rows
  • added temporary fix to font awesome

https://tickets.pih-emr.org/browse/OBPIH-876
https://tickets.pih-emr.org/browse/OBPIH-880
https://tickets.pih-emr.org/browse/OBPIH-894

- added Edit Pick modal form
- added Adjust inventory modal form
- added custom table for this step
- added styling for crossed out rows
- added temporary fix to font awesomes
@awalkowiak awalkowiak requested review from jmiranda, pmuchowski and kkaczmarczyk and removed request for pmuchowski June 8, 2018 15:55
@awalkowiak
Copy link
Collaborator Author

@jmiranda looks like our 'react' tests passed and the test that failed is one of unit tests (test_list_shouldContainTwoProducts).
cc: @pmuchowski @kkaczmarczyk

@jmiranda
Copy link
Member

jmiranda commented Jun 8, 2018

Thanks @awalkowiak. I'll take a look.

Copy link
Member

@jmiranda jmiranda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll approve this PR, but just wanted to give you a heads up on changes you may need to make in the future.

@@ -79,3 +79,6 @@ renderField.defaultProps = {
arrayField: false,
label: '',
};

export const generateKey = () =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is for the random unique number needed for the stock movement. I don't love that Jesse wants to generate this unique ID BEFORE we save it to the database. But if that's really required, we'll add a REST endpoint for you guys to generate the ID as there's some config / logic that needs to be taken into consideration. For now, this is fine, but start to think about mocking an API here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just for generating keys for rows in table - array field (eslint does not like using array indexes as keys). This key won't be send to backend and won't be visible to user at any point.

{
productCode: 1,
product: { code: 1, name: 'Advil 200mg' },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually we should keep this as productCode as that's what will be returned by the API. And note that it's a string, not an integer.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made this change, to have same approach as on mocks from previous steps. I also assumed, that once we will have API, then we will need to make some small adjustments. However this can be easily changed in future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. And yes I figured the same (re: small adjustments). I'm just keeping an eye out to make sure I don't add too much burden to that effort once the APIs are actually ready.

@jmiranda jmiranda merged commit 6a352e0 into develop Jun 9, 2018
@jmiranda jmiranda deleted the OBPIH-876,880,894 branch June 9, 2018 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants