US-EPA-CAMD / easey-ui

Project Management repo for EPA Clean Air Markets Division (CAMD) Business Suite of applications
MIT License
0 stars 0 forks source link

Implement filter/sort for Account Info Data #754

Closed JanellC closed 3 years ago

JanellC commented 3 years ago

Original estimate: 40 PI 6 Estimate: 5

System Increment Definition of Ready (DoR) Before being accepted into a Program Increment each feature:

Feature Benefit

  1. Provide Account Info data via API so the API returns all data needed for the CAMPD Release

  2. Validate Account Info API parameters to ensure that the request is valid

  3. Provide front-end user interface to access Account Info data

Context

Refer to EASEY Out Production List

Account Information System Requirements

Questions

  1. Will owner/ operator and account number/ account name filter on buyer/ seller accounts? Answer: No. The search should be a contains search on all account name/numbers or all account owner/operators for the respective filter.

Assumptions

API Parameters

UI Parameters

Data Type Button/ drop down Required Single select Value: Emissions, Allowance, Compliance, default blank

Data Sub-Type Drop down Required Single Select Value: :Allowance Holdings, Allowance Transactions, Account Information, default blank

Program Drop down, default blank Optional Multi select Value: ARP, CSNOX, CSSO2G1, CSSO2G2, TXSO2, CAIRSO2, CAIRNOX, CSOSG1, CSOSG2, CSNOXOS, CAIROS, NBP, OTC (active/inactive allowance programs)

Account Type Drop down, default blank Optional Multi Select Value: Facility Account, Unit Account, General Account, Reserve Account, Surrender Account, ALL

Account

Account Number Dynamic search Search is a contains search on all account numbers Results are displayed in Account Name (Account Number) format Results populate in a list, parameters populates when a value is selected from the list (results list should stay at top of page/visible in current view, possible use pagination to keep window small) Search is not case sensitive

If no results are found, the system will indicate so. “No accounts match your search.” Multi select

Account Name Dynamic search Search is a contains search on all account names Results are displayed in Account Name (Account Number) format Results populate in a list, parameters populates when a value is selected from the list (results list should stay at top of page/visible in current view, possible use pagination to keep window small) Search is not case sensitive If no results are found, the system will indicate so. “No accounts match your search.” Multi select

Facility Facility ID Dynamic search Search is a contains search Results populate in a list, parameters populates when a value is selected from the list Results are displayed in Facility Name (ORIS Code) format If no results are found, the system will indicate so. “No facilities match your search.” Multi Select

Facility Name Dynamic search Search is a contains search Results are displayed in Facility Name (ORIS Code) Results populate in a list, parameters populates when a value is selected from the list (results list should stay at top of page/visible in current view, possible use pagination to keep window small) Search is not case sensitive If no results are found, the system will indicate so. “No facilities match your search.” Multi select

Owner Dynamic search contains search search on all owners

Results populate in a list, parameters populates when a value is selected from the list (results list should stay at top of page/visible in current view, possible use pagination to keep window small) Search is not case sensitive If no results are found, the system will indicate so. “No accounts match your search.” Multi select

Operator Dynamic search contains search search on all operators Results populate in a list, parameters populates when a value is selected from the list (results list should stay at top of page/visible in current view, possible use pagination to keep window small) Search is not case sensitive If no results are found, the system will indicate so. “No accounts match your search.” Multi select

State Dynamic search Search is a “begins with” search Results populate in a list, parameters populates when a value is selected from the list Results display the full state name (Texas, not TX) Multi Select

Change Criteria The user will have the ability to clear one, many, or all filter criteria If the user changes data type or sub data type, then:

If a user changes data type or sub data type, then filter criteria is cleared If the user chooses to clear one or more filter criteria before preview is selected, then the system clears the criteria from the filter and updates any remaining dependent criteria accordingly. If the user chooses to clear one or more filter criteria after preview is selected, then the system clears the criteria from the filter AND download is disabled until data is previewed.

Validations

Program:

  1. Validate that the value matches a valid program

Error Message: One or more < insert property > are not valid. Refer to the list of available < insert Property > for valid values [ placeholder for link to endpoint ] FV-100

Account Type:

  1. Validate that the value matches a valid account type Value: Facility Account, Unit Account, General Account, Reserve Account, Surrender Account, ALL (UI Only)

Error Message: Error Message: One or more < insert property > are not valid. Refer to the list of available < insert property > for valid values [ placeholder for link to endpoint ] FV-100

Account Number:

  1. Validate that the account number is 12 alphanumeric characters long

Error Message: Error Message: One or more < insert property > are not valid. Refer to the list of available < insert property > for valid values [ placeholder for link to endpoint ] FV-100

Facility (ORIS Code) :

  1. Validate that the format is correct:

positive integer (no negative numbers, not 0) whole numeric value (no letters or special characters) no more than 6 digits

Error Message: Error Message: One or more < insert property > are not valid. Refer to the list of available < insert property > for valid values [placeholder for link to endpoint] FV-100

Owner/Operator:

  1. No Validations

State:

  1. Validate that value matches a valid 2 letter postal abbreviation for at least 1 of the 50 states, PR, or DC

Error Message: One or more states are not valid. Use the two letter postal abbreviation (use TX, not Texas). FV-101

Data Preview/ Results:

When the system identifies at least one record that matches the criteria, then for each record the system will display the data below and ordered by PRG_CODE> ACCOUNT_NUMBER

ACCOUNT_NUMBER ACCOUNT_NAME PRG_CODE ACCOUNT_TYPE ORISPL_CODE UNITID OWN_DISPLAY OPR_DISPLAY* STATE EPA_REGION NERC_REGION

Data Labels

Refer to the CAMPD_DataLables_Allowance_5_12_2021 here

Results will display total record count (Viewing the first 100 of X records) Results in preview are limited to the first 100 records Results in preview will have a scroll functionality to show all columns/rows Results columns are are sortable in ascending and descending order (alphanumeric order) . Sort is limited to the original 100 results

File Selection Trigger: The user has at least one record that matches the search criteria, and has previewed the results The user has the option to select the file output in JSON or CSV format. CSV is the default file type API will provide the data in the requested format based on user selection in UI

Download Trigger: The user has selected a file output type When the user selects the option to download, the system creates a file in the format specified containing all records that match the parameters and downloads the file After a user has chosen to download data, then the system will display the preview of the downloaded results.

tlageman-epa commented 3 years ago

@JanellC to answer your questions above. No, buyer/seller is not applicable here. These are not transactions, this is data on every allowance account in each of the programs. The search should be a contains search on all account name/numbers or all account owner/operators for the respective filter.

JanellC commented 3 years ago

Completed core functionality. account information functions on the custom data download with end to end functionality. Removed tickets #2110, and #2089 and from this epic. The removed issues remain on the PI 6 backlog