1. Introduction
The Principal JSON Upload screen allows users to upload specific JSON files containing principal-related data into the system. It provides a mechanism to track these uploads, initiate data processing from the uploaded files, and view the status and results of the processing.
2. Accessing the Screen
You can typically access this screen through the application's navigation menu, likely under an "Integration" or "Data Upload" section. The direct path for this screen is /integration/principal-json-upload
. You must be logged in to access this page.
3. Screen Layout
The screen is divided into the following main sections:
- Toolbar: Located at the top, containing:
- Page Title: Displays the name of the screen (e.g., "Principal JSON Upload").
- Info Icon: (Optional) Provides more details about the page's purpose or links to help resources. Represented by
<mat-icon>info</mat-icon>
. - Home Button: Navigates you back to the main dashboard. Represented by
<mat-icon>home</mat-icon>
. - Disabled Buttons: "New Page" (
<mat-icon>add</mat-icon>
) and "Save Page" (<mat-icon>save</mat-icon>
) buttons are present but currently disabled and not functional on this screen.
- File Upload Area: Below the toolbar, this section allows you to select and upload your JSON file.
- Upload History Table: The main part of the screen displays a list of previously uploaded JSON files and their status.
4. Features and How to Use
4.1. Uploading a Principal JSON File
- Choose File: Click the "Choose Principal Json File" button (with the paperclip icon:
<mat-icon>attach_file</mat-icon>
). This will open your computer's file browser. - Select File: Navigate to and select the
.json
file you wish to upload.- Important: Ensure the file size is less than 4MB. If the file is too large, you will receive an error message, and the file won't be selected.
- Confirm Selection: Once selected, the name of the file will appear next to "Selected File:".
- Upload: Click the "Upload JSON" button (with the cloud upload icon:
<mat-icon>cloud_upload</mat-icon>
). - Feedback:
- A temporary message "Uploading file. Please wait..." will appear.
- Upon completion, you'll see a success message ("File uploaded successfully") or a failure message ("File upload failed. Please try again").
- Table Update: If the upload is successful, a new entry representing this file will appear at the top of the Upload History Table with the status "UPLOADED".
4.2. Understanding the Upload History Table
This table lists all the Principal JSON files that have been uploaded. Each row represents one upload attempt.
- Doc No.: A unique identifier for the upload batch. Clicking this link will open/download the originally uploaded JSON file.
- Uploaded By: The user who uploaded the file.
- Uploaded Date: The date and time when the file was uploaded.
- Status: The current processing status of the file:
UPLOADED
: The file has been successfully uploaded but not yet processed.PROCESSING
: The system is currently reading and processing the data from the JSON file.COMPLETED
: The system has finished processing the file successfully.ERROR
: An error occurred during the processing stage.- (Other potential statuses might exist depending on the backend logic)
- Upld. Count: The total number of records/items found within the uploaded JSON file intended for processing.
- Succ. Count: The number of records/items that were successfully processed from the file.
- Err. Count: The number of records/items that resulted in an error during processing.
- Read Json: An action button to initiate the data processing.
- View: An action button to view detailed results or errors for the upload.
4.3. Processing an Uploaded File ("Read JSON")
Once a file has the status "UPLOADED", you can trigger the system to read and process the data within it.
- Locate Row: Find the row in the table corresponding to the file you want to process (it should have the status "UPLOADED").
- Click Button: Click the "Read JSON" button (green button with a page search icon:
<mat-icon>find_in_page</mat-icon>
) in that row.- Note: This button will be disabled (greyed out) if the status is not "UPLOADED".
- Feedback: A temporary message "Saving json info in database. Please wait..." will appear.
- Status Update: Once the processing starts or completes, the table will refresh. The Status, Upld. Count, Succ. Count, and Err. Count columns for that row will be updated based on the outcome of the processing. You will also receive a success or error message indicating the result of initiating the process.
4.4. Viewing Upload Details and Errors
After a file has been uploaded (and potentially processed), you can view more details about its contents or any errors encountered.
- Locate Row: Find the row in the table for the upload you are interested in.
- Click Button: Click the "View" button in that row.
- If the status is not
ERROR
, the button will be green with a visibility icon (<mat-icon>visibility</mat-icon>
). - If the status is
ERROR
, the button will be red with an error icon (<mat-icon>error_outline</mat-icon>
).
- If the status is not
- Navigate: Clicking this button will navigate you to the "Principal JSON Status Manifest" screen (
/integration/principal-jsonstatus-manifest/:code
), displaying detailed information (successful records, error details, etc.) for that specific upload batch (identified by its Doc No./ID).
5. Navigation
- Go Home: Click the "Home" icon (
<mat-icon>home</mat-icon>
) in the toolbar to return to the application's main dashboard.