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

task/WP-7: Admin submissions filtering and date-sorting #151

Merged
merged 4 commits into from
May 8, 2023

Conversation

edmondsgarrett
Copy link
Contributor

Overview

Added filtering by status and date-sorting to admin submissions page to parallel user submissions page

Related

Changes

  • Added dropdown elements for filter and sort on page's template
  • Added JS scripts on template to pass selected filter and/or sort to page's view
  • Added sort and filter capability to view to modify data from url parameters
  • Added needed url patterns to accommodate both url parameters

Testing

  1. Replace line 25 of admin-submissions/views.py with the following:

    Snippet
     submission_content = [
     {
         'submission_id': None,
         'submitter_id': None,
         'file_name': None,
         'status': None,
         'outcome': None,
         'received_timestamp': None,
         'updated_at': None,
         'view_modal_content': None
     },
     {
         'submission_id': 2,
         'submitter_id': 1,
         'file_name': 'T_GLDNRLE_10000000_202303_202303.zip',
         'status': None,
         'outcome': 'failed',
         'received_timestamp': '2022-09-27T15:25:24.285442',
         'updated_at': '2022-09-27T15:25:24.285442',
         'view_modal_content': [
             {
                 'log_id': 3, 
                 'submission_id': 1, 
                 'file_type': 'ME', 
                 'validation_suite': 'eligibility_suite', 
                 'outcome': 'failed', 
                 'file_type_name': 'Member Eligibility'
             }
         ]
     },
     {
         'submission_id': 3,
         'submitter_id': 1,
         'file_name': 'T_GLDNRLE_10000000_202303_202303.zip',
         'status': 'complete',
         'outcome': 'failed',
         'received_timestamp': '2022-09-27T15:25:24.285442',
         'updated_at': '2022-09-27T15:25:24.285442',
         'view_modal_content': [
             {
                 'log_id': 5, 
                 'submission_id': 1, 
                 'file_type': 'PV', 
                 'validation_suite': 'provider_suite', 
                 'outcome': 'failed', 
                 'file_type_name': 'Provider'
             }
         ]
     },
     {
         'submission_id': 4,
         'submitter_id': 1,
         'file_name': 'T_GLDNRLE_10000000_202303_202303.zip',
         'status': 'complete',
         'outcome': 'failed',
         'received_timestamp': '2022-09-27T15:25:24.285442',
         'updated_at': '2022-09-27T15:25:24.285442',
         'view_modal_content': [
             {
                 'log_id': 2, 
                 'submission_id': 1, 
                 'file_type': '  ', 
                 'validation_suite': 'spark_medical_suite', 
                 'outcome': 'failed', 
                 'file_type_name': None
             }, 
             {
                 'log_id': 5, 
                 'submission_id': 1, 
                 'file_type': 'PV', 
                 'validation_suite': 'provider_suite', 
                 'outcome': 'failed', 
                 'file_type_name': 'Provider'
             }
         ]
     },
     {
         'submission_id': 5,
         'submitter_id': 1,
         'file_name': 'T_GLDNRLE_10000000_202303_202303.zip',
         'status': 'complete',
         'outcome': 'failed',
         'received_timestamp': '2022-11-27T15:25:24.285442',
         'updated_at': '2022-09-27T15:25:24.285442',
         'view_modal_content': [
             {
                 'log_id': 3, 
                 'submission_id': 1, 
                 'file_type': 'ME', 
                 'validation_suite': 'eligibility_suite', 
                 'outcome': 'failed', 
                 'file_type_name': 'Member Eligibility'
             }, 
             {
                 'log_id': 5, 
                 'submission_id': 1, 
                 'file_type': 'PV', 
                 'validation_suite': 'provider_suite', 
                 'outcome': 'failed', 
                 'file_type_name': 'Provider'
             }
         ]
     },
     {
         'submission_id': 6,
         'submitter_id': 1,
         'file_name': 'T_GLDNRLE_10000000_202303_202303.zip',
         'status': 'complete',
         'outcome': 'failed',
         'received_timestamp': '2012-09-27T15:25:24.285442',
         'updated_at': '2022-09-27T15:25:24.285442',
         'view_modal_content': [
             {
                 'log_id': 3, 
                 'submission_id': 1, 
                 'file_type': 'ME', 
                 'validation_suite': 'eligibility_suite', 
                 'outcome': 'failed', 
                 'file_type_name': 'Member Eligibility'
             }, 
             {
                 'log_id': 4, 
                 'submission_id': 1, 
                 'file_type': 'PC', 
                 'validation_suite': 'pharmacy_suite', 
                 'outcome': 'failed', 
                 'file_type_name': 'Pharmacy Claims'
             }
         ]
     },
     {
         'submission_id': 7,
         'submitter_id': 1,
         'file_name': 'T_GLDNRLE_10000000_202303_202303.zip',
         'status': 'complete',
         'outcome': 'failed',
         'received_timestamp': '2022-07-27T15:25:24.285442',
         'updated_at': '2022-09-27T15:25:24.285442',
         'view_modal_content': [
             {
                 'log_id': 3, 
                 'submission_id': 1, 
                 'file_type': 'ME', 
                 'validation_suite': 'eligibility_suite', 
                 'outcome': 'failed', 
                 'file_type_name': 'Member Eligibility'
             }
         ]
     },
     {
         'submission_id': 8,
         'submitter_id': 1,
         'file_name': 'T_GLDNRLE_10000000_202303_202303.zip',
         'status': 'complete',
         'outcome': 'failed',
         'received_timestamp': '2022-08-27T15:25:24.285442',
         'updated_at': '2022-09-27T15:25:24.285442',
         'view_modal_content': [
             {
                 'log_id': 3, 
                 'submission_id': 1, 
                 'file_type': 'ME', 
                 'validation_suite': 'eligibility_suite', 
                 'outcome': 'failed', 
                 'file_type_name': 'Member Eligibility'
             }, 
             {
                 'log_id': 4, 
                 'submission_id': 1, 
                 'file_type': 'PC', 
                 'validation_suite': 'pharmacy_suite', 
                 'outcome': 'failed', 
                 'file_type_name': 'Pharmacy Claims'
             }
         ]
     }
     ]  
    
  2. Test filter and sort separately for:

  • Accuracy: does the selected filter/sort show in the table?
  • Dropdown text: does the selected filter/sort show on the dropdown on page load?
  • Compatibility with paginator: does filter/sort persist when clicking through pages? (Change page size on line 224)
  1. After testing each, test that the 'Clear Options' button resets the table back to original state
  2. Now, test the filter and sort together for the same items above.

UI

Copy link
Contributor

@sophia-massie sophia-massie left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

Copy link
Member

@happycodemonkey happycodemonkey left a comment

Choose a reason for hiding this comment

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

This looks good to me!

Copy link
Contributor

@fnets fnets left a comment

Choose a reason for hiding this comment

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

lgtm

@fnets fnets merged commit bfb8d67 into main May 8, 2023
@fnets fnets deleted the task/WP-7--admin-submissions-touch-ups branch May 8, 2023 21:34
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.

4 participants