Task #19892
openClearing - Air Clearing Document Management Section
0%
Description
In Air Clearing, users need to keep supporting documents together with the clearing file.
These documents may be received from:
- Customer
- Airline
- Overseas agent
- Customs broker
- Internal operations team
Examples of documents:
- MAWB copy
- HAWB copy
- Commercial invoice
- Packing list
- Bill of Entry
- Customs clearance documents
- Delivery order
- Permits
- Certificates
- Correspondence or supporting proof
The Documents section should follow the same concept as the existing Ocean Clearing module, but documents must be saved against the Air Clearing File.
Screen Section¶
Section Name: Documents
The Documents section should appear after the Sales section and before the Activity Log section on the Air Clearing Add/Update screen.
Screen Layout¶
The Documents section must include:
- Upload Document button
- Document grid/list
- View/Download action
- Delete action
- Empty grid message when no document exists
If no document exists, display: "No documents found."
or use the same wording currently used in Ocean Clearing.
Document Grid Columns¶
The grid should follow the same structure as Ocean Clearing where possible.
| Column | Description |
|---|---|
| File Name | Name of uploaded file |
| File Type | File extension/type detected from uploaded file |
| Uploaded Date | Date/time of upload |
| Uploaded By | User who uploaded the file |
| Action | View/download/delete where applicable |
Upload Document Behaviour¶
1 – Display Documents Section¶
The system must display the Documents section inside the Air Clearing Add/Update screen.
2 – Upload Document Button¶
The section must contain a button:
Upload Document
When clicked:
- The system opens the standard file selector.
- The user selects a document from their computer.
- The user clicks Open.
- The system uploads the selected document.
- The document is displayed in the Documents grid.
3 – File Selection Behaviour¶
The upload should follow the same behaviour as Ocean Clearing.
If Ocean Clearing allows only one file at a time:
- Air Clearing should also allow one file at a time.
If Ocean Clearing allows multiple file selection:
- Air Clearing should support the same.
If the user opens the file selector and clicks Cancel:
- No document should be uploaded.
- No error message is required unless existing Ocean Clearing behaviour displays one.
4 – File Type Detection¶
The system must automatically determine the file type from the uploaded file extension.
Examples:
| Uploaded File | File Type Displayed |
|---|---|
| invoice.pdf | |
| packinglist.xlsx | XLSX |
| hawbcopy.jpg | JPG |
| email.msg | MSG |
| document.docx | DOCX |
5 – Supported File Types¶
The system should use the same supported file type rules as the existing Ocean Clearing module.
The actual allowed file types should follow existing MFreight/Ocean Clearing upload configuration.
Dev team, Please add the allowed file types that can be uploaded as per the ocean module in the comments section for the testing team.
6 – File Size Validation¶
The system must validate the file size based on the existing MFreight/Ocean Clearing upload rules.
If the file exceeds the allowed size, display:
File size exceeds the allowed limit.
Dev team, Please add the max. file size that can be uploaded as per the ocean module in the comments section for the testing team.
7 – Link Document to Air Clearing File¶
Every uploaded document must be linked to the current Air Clearing File ID.
Documents uploaded under Air Clearing must not be linked to or mixed with Ocean Clearing documents.
8 – View / Download Document¶
The user should be able to view or download an uploaded document.
9 – Delete Document¶
If Ocean Clearing supports document deletion, Air Clearing should also support deletion using the same rules.
When the user deletes a document:
- The system asks for confirmation.
- If confirmed, the document is deleted or soft-deleted based on existing Ocean behaviour.
- The document is removed from the grid.
- Activity Log is updated.
Suggested confirmation message:
Are you sure you want to delete this document?
10 – Duplicate File Name¶
If a document with the same file name already exists for the same Air Clearing File, the system should follow the same behaviour as Ocean Clearing.
Recommended behaviour:
- Allow upload because the internal file ID will be unique; or
- Warn the user before upload.
Suggested warning message:
A document with the same file name already exists. Do you want to continue?
12 – Read-only Behaviour by Air Clearing Status¶
Document actions must respect the Air Clearing File status.
When the file is Closed or Cancelled:
- Upload Document button should be disabled or hidden.
- Delete action should be disabled or hidden.
- View/download should remain available.
13 – Activity Log for Document Upload¶
When a document is uploaded successfully, the system must create an Activity Log entry at the bottom of the Air Clearing page.
Suggested log:
<username> uploaded document <FILE_NAME> for Air Clearing File <CLEARING_REF>
14 – Activity Log for Document Delete¶
When a document is deleted successfully, the system must create an Activity Log entry.
Suggested log:
<username> deleted document <FILE_NAME> from Air Clearing File <CLEARING_REF>
Acceptance Criteria¶
1 – Display Documents Section¶
Given I open an Air Clearing File,
When the page loads,
Then the system should display the Documents section.
2 – Empty Document Grid¶
Given no document exists for the Air Clearing File,
When the Documents section loads,
Then the system should display:
No documents found.
or the same wording used in Ocean Clearing.
3 – Upload Document Button Opens File Selector¶
Given I am in the Documents section,
When I click Upload Document,
Then the system should open the standard file selector.
4 – Upload Valid Document¶
Given the file selector is opened,
When I select a valid file and click Open,
Then the system should upload the file and display it in the Documents grid.
5 – Cancel File Selection¶
Given the file selector is opened,
When I click Cancel without selecting a file,
Then the system should close the file selector and no document should be uploaded.
6 – File Type Auto-detected¶
Given I upload a document,
When the upload is completed,
Then the system should automatically detect and display the File Type from the file extension.
7 – Document Linked to Current Air Clearing File¶
Given I upload a document in an Air Clearing File,
When the upload is completed,
Then the document should be linked only to the current Air Clearing File.
8 – Invalid File Type¶
Given I select a file type that is not allowed,
When I try to upload the file,
Then the system should prevent upload and display:
This file type is not allowed.
9 – File Size Validation¶
Given I select a file that exceeds the allowed size,
When I try to upload the file,
Then the system should prevent upload and display:
File size exceeds the allowed limit.
10– View / Download Document¶
Given a document has been uploaded,
When I click the view/download action,
Then the system should open or download the document according to existing Ocean Clearing behaviour.
11 – Delete Document¶
Given a document exists and deletion is allowed,
When I click delete and confirm the action,
Then the system should delete the document and remove it from the grid.
12– Closed File Restriction¶
Given the Air Clearing File is Closed,
When I open the Documents section,
Then Upload and Delete actions should be disabled or hidden, but View/Download should remain available.
13 – Cancelled File Restriction¶
Given the Air Clearing File is Cancelled,
When I open the Documents section,
Then Upload and Delete actions should be disabled or hidden, but View/Download should remain available.
14 – Activity Log for Upload¶
Given a document is uploaded successfully,
When the upload is completed,
Then the system should record the upload action in the Activity Log section.
15 – Activity Log for Delete¶
Given a document is deleted successfully,
When the delete is completed,
Then the system should record the delete action in the Activity Log section.
GitLab Sync Log
[]