Skip to content

AC-626: Add Provider Dashboard#619

Merged
f4ww4z merged 1 commit intoopenmrs:masterfrom
deepakpsad:AC-626
Jul 21, 2019
Merged

AC-626: Add Provider Dashboard#619
f4ww4z merged 1 commit intoopenmrs:masterfrom
deepakpsad:AC-626

Conversation

@deepakpsad
Copy link
Contributor

@deepakpsad deepakpsad commented Jul 17, 2019

Description of what I changed

  • Added a provider dashboard
  • Created a placeholder fragment for Patient-Provider relationship
  • Created a placeholder fragment for Provider-Provider relationship

Issue I worked on

JIRA Issue: https://issues.openmrs.org/browse/AC-626

Checklist: I completed these to help reviewers :)

  • My pull request only contains ONE single commit
    (the number above, next to the 'Commits' tab is 1).
  • I have added tests to cover my changes. (If you refactored
    existing code that was well tested you do not have to add tests)
  • All new and existing tests passed.
  • My pull request is based on the latest changes of the master branch.

@codecov-io
Copy link

codecov-io commented Jul 17, 2019

Codecov Report

Merging #619 into master will increase coverage by 0.02%.
The diff coverage is 10.2%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #619      +/-   ##
==========================================
+ Coverage    14.3%   14.32%   +0.02%     
==========================================
  Files         196      202       +6     
  Lines        9104     9200      +96     
  Branches      785      790       +5     
==========================================
+ Hits         1302     1318      +16     
- Misses       7723     7801      +78     
- Partials       79       81       +2
Impacted Files Coverage Δ
...s/providerdashboard/ProviderDashboardActivity.java 0% <0%> (ø)
...oviderdashboard/ProviderDashboardPagerAdapter.java 0% <0%> (ø)
...gerdashboard/ProviderManagerDashboardFragment.java 0% <0%> (ø) ⬆️
...tientrelationship/PatientRelationshipFragment.java 0% <0%> (ø)
...agerdashboard/addprovider/AddProviderFragment.java 0% <0%> (ø) ⬆️
...s/providerdashboard/ProviderDashboardContract.java 0% <0%> (ø)
...d/ProviderManagerDashboardRecyclerViewAdapter.java 0% <0%> (ø) ⬆️
...iderrelationship/ProviderRelationshipFragment.java 0% <0%> (ø)
.../providerdashboard/ProviderDashboardPresenter.java 50% <50%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8f5fc67...a19115d. Read the comment docs.

Copy link
Collaborator

@f4ww4z f4ww4z left a comment

Choose a reason for hiding this comment

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

Thanks @deepak140596 , see my comments below.

super.onCreate(savedInstanceState);
setContentView(R.layout.activity_provider_dashboard);

provider = (Provider) (getIntent().getSerializableExtra(ApplicationConstants.BundleKeys.PROVIDER_ID_BUNDLE));
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be a Presenter code, not an activity one. You should use the presenter to get the provider from an intent.


@Override
public void onFailure() {

Copy link
Collaborator

Choose a reason for hiding this comment

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

Show an error toast here so the user knows, don't leave it empty.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The toast messages for different failures are present in the ProviderRepository class. These custom callbacks are for logic for updating views in case of failures. If I add a toast here, two toasts are show to the user back to back.

I provided toasts in the ProviderRepository because we can differentiate between different failed cases easily (network not connected or failed api callback).

Copy link
Collaborator

Choose a reason for hiding this comment

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

@deepak140596 Ok. In that case, can you show an indefinite Snackbar that says the connection failed, with a button to retry loading?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@f4ww4z , yes. I have added that. Please review it.

Copy link
Collaborator

@f4ww4z f4ww4z left a comment

Choose a reason for hiding this comment

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

Good work @deepak140596

@f4ww4z f4ww4z merged commit 222d206 into openmrs:master Jul 21, 2019
@deepakpsad deepakpsad deleted the AC-626 branch July 21, 2019 12:36
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.

3 participants