Documentation Index
Fetch the complete documentation index at: https://mintlify.com/raceliciouss/YUSEN-LIMO-WAREHOUSE/llms.txt
Use this file to discover all available pages before exploring further.
The Inbound & Outbound page (pages/inbound-outbound.html) is the primary data entry interface for warehouse operations. It handles two distinct workflows — receiving cargo into the warehouse and releasing cargo for dispatch — both accessible from a tabbed interface on the same page. All form data is written to Local Storage under the warehouseShipments key by saveStoredShipments(), which also fires the warehouse:data-updated event to update the dashboard and inventory views in real time.
Tabbed Interface
The page uses two tabs rendered inside .tabs-header > .tabs:
| Tab label | data-tab value | Content container |
|---|
| Inbound (Receive Cargo) | inbound | #inbound-content |
| Outbound (Release Cargo) | outbound | #outbound-content |
Clicking a tab adds the active class to that tab and its corresponding .tab-content div, and hides the other tab’s content. The active tab at page load is always Inbound.
The inbound form is divided into three sections.
These fields identify the shipment being received.
| Label | data-field | Type | Notes |
|---|
| Client | client | text | Name of the consignee or shipper |
| Destination | destination | text | Delivery destination |
| HAWB Number | hawb | text | House Air Waybill number; includes inline scan button |
| MAWB Number | mawb | text | Master Air Waybill number; includes inline scan button |
| Invoice / Markings | invoice | text | Commercial invoice number or cargo markings |
| Transaction Type | transactionType | select | Options: AFF Import, AFF Export, OFF Import, OFF Export |
These fields capture the logistics details of the inbound truck arrival.
| Label | data-field | Type | Notes |
|---|
| Date | date | date | Date of cargo receipt |
| Time | time | time | Time of cargo receipt |
| Received By | receivedBy | text | Name of the receiving warehouse staff |
| Plate No. | plateNo | text | Vehicle plate number of the delivery truck |
| Trucker | trucker | text | Trucking company name |
| Driver | driver | text | Driver’s full name |
| Cargo Condition | cargoCondition | text | Condition of cargo on arrival (e.g. Good, Damaged) |
| Warehouse Location | location | text | Internal warehouse bay or zone where cargo is stored |
The quantity section supports multiple rows, each containing:
| Label | data-field | Type | Notes |
|---|
| Quantity | quantity | number | Numeric count; minimum value 1 |
| Unit | unit | select | Options: PLT, CTN, SACK, PARCEL, BUNDLE, DRUM, PAIL, WOODEN CRATE, STEEL CRATE, ROLLS, CRATE, PCS, CASE, PKG |
Additional quantity rows are added by clicking + Add Another Quantity. Each row has a delete button (.btn-delete) to remove it. When a shipment is built, quantities across all rows are summed into qtyIn.
The outbound form mirrors the inbound layout but captures release-specific details. It also contains a Shipment Information section with the same client, destination, hawb, mawb, invoice, and transactionType fields so that outbound entries can be linked to the correct inbound reference.
| Label | data-field | Type | Notes |
|---|
| Date | date | date | Date of cargo release |
| Time | time | time | Time of cargo release |
| Released By | releasedBy | text | Name of the staff authorising the release |
| Plate No. | plateNo | text | Vehicle plate of the outbound truck |
| Trucker | trucker | text | Trucking company name |
| Driver | driver | text | Driver’s full name |
| Cargo Condition | cargoCondition | text | Condition of cargo on departure |
| Warehouse Location | location | text | Location from which cargo is being released |
The quantity section on the outbound form is identical in structure to the inbound form. Quantities entered here are accumulated into qtyOut when the record is aggregated.
Both the inbound and outbound forms include inline scan buttons (.inline-scan-btn) next to the HAWB Number and MAWB Number fields. Clicking any scan button:
- Opens
#scanModal, a full-screen camera overlay.
- Sets the scan context to the active tab’s form (
inbound-content or outbound-content).
- Starts
startQrScanner(), which uses navigator.mediaDevices.getUserMedia() and the jsQR library to decode QR codes from the live camera feed.
- On a successful decode,
normalizeShipmentPayload() maps the QR payload fields to the standard form field names, and populateShipmentForm() writes the values into the form using data-field selectors.
- Closing the modal with the Cancel button calls
stopQrScanner() and hides the overlay.
If the QR payload is plain text rather than JSON, the app treats the decoded string as a HAWB or MAWB value and populates the corresponding field directly.
Each form has a Save button (.save-shipment-btn). Clicking it triggers the following sequence:
buildShipmentRecord(form) reads all data-field inputs from the active form and constructs a shipment object.
validateShipmentRecord(shipment) checks that required fields are present; an alert is shown if validation fails.
- The new shipment is prepended to the existing array from
getStoredShipments() using shipments.unshift(shipment).
saveStoredShipments(shipments) writes the updated array to localStorage under the warehouseShipments key.
saveStoredShipments() dispatches new Event('warehouse:data-updated') on window, which triggers renderDashboardData(), refreshInventory(), and refreshActivity() on any open page.
- The form is cleared with
clearShipmentForm(form) and a toast confirmation is displayed.
Saved Shipment Record Structure
Each record written to warehouseShipments has the following shape:
{
"client": "ACME Corp",
"destination": "Manila",
"hawb": "HAWB-20240101-001",
"mawb": "MAWB-20240101-999",
"invoice": "INV-2024-0042",
"transactionType": "AFF Import",
"location": "Bay A-3",
"status": "RECEIVED",
"entryType": "inbound",
"savedAt": "2024-01-01T09:30:00.000Z",
"date": "2024-01-01",
"time": "09:30",
"receivedBy": "Juan Cruz",
"plateNo": "AAA 1234",
"trucker": "FastFreight Inc.",
"driver": "Pedro Santos",
"cargoCondition": "Good",
"quantity": "10",
"unit": "PLT",
"qtyIn": "10",
"qtyOut": "",
"releaseDate": "",
"releaseTime": "",
"releasePlate": "",
"releaseDriver": "",
"releaseQty": "",
"remarks": ""
}
For outbound records, entryType is set to "outbound", the qtyOut / releaseQty fields are populated, and the releaseDate, releaseTime, releasePlate, and releaseDriver fields carry the release details. The hawb and mawb fields on the outbound record must match the reference from the corresponding inbound record so that aggregateShipmentsByReference() groups them correctly.
Partial outbound support: You do not need to release an entire shipment in a single outbound entry. Each outbound save for the same HAWB or MAWB is preserved as a separate entry in the outboundDetails array after aggregation. qtyOutValue accumulates the sum of all outbound quantities for that reference, and the drawer in the Inventory page lists every release event in chronological order. This allows warehouses to process staged or split releases against a single inbound shipment.
No server-side duplicate validation: Because the system is fully client-side, there is no deduplication check on hawb or mawb at save time. Submitting the inbound form twice with the same HAWB will create two separate records in warehouseShipments, both of which will contribute to qtyInValue during aggregation, inflating the inventory count. Operators should verify that each HAWB or MAWB is entered only once per receiving event.