Go to file
Thom Werring 53e2f73f73 Added flowchart for tracking call 2024-03-24 14:25:00 +01:00
.husky Chore: Enabled autoformat code on commit 2024-03-23 13:27:25 +01:00
e2e-tests Chore: Renamed test directory to e2e-tests for added clarity 2024-03-23 14:09:33 +01:00
src Chore: Renamed module to keep filenames consistent 2024-03-23 20:49:52 +01:00
tech-assignment-data@b753a440a9 Added data samples as submodule to project 2024-03-23 15:03:06 +01:00
.dockerignore Feature: dockerized the project 2024-03-23 20:48:10 +01:00
.eslintrc.js Chore: updated multiple default packages to latest version 2024-03-23 14:19:45 +01:00
.gitignore Chore: Ignored database directory 2024-03-23 20:47:33 +01:00
.gitmodules Added data samples as submodule to project 2024-03-23 15:03:06 +01:00
.prettierrc Initial commit 2024-03-23 13:23:59 +01:00
Dockerfile Feature: dockerized the project 2024-03-23 20:48:10 +01:00
README.md Added flowchart for tracking call 2024-03-24 14:25:00 +01:00
docker-compose.yml Feature: dockerized the project 2024-03-23 20:48:10 +01:00
nest-cli.json Initial commit 2024-03-23 13:23:59 +01:00
package-lock.json Chore: updated multiple default packages to latest version 2024-03-23 14:19:45 +01:00
package.json Chore: Renamed module to keep filenames consistent 2024-03-23 20:49:52 +01:00
tsconfig.build.json Chore: Renamed test directory to e2e-tests for added clarity 2024-03-23 14:09:33 +01:00
tsconfig.json Chore: Finetuned tsconfig 2024-03-23 14:06:03 +01:00

README.md

flowchart TD
    receiveTracking(["Receive Tracking"])
    findContainerAndShipment["SELECT container JOIN Shipment"]
    updateShipment[/Update shipment\]
    isArrivingSoon{{"Is arrival estimate between now and now + 24h?"}}
    hasArrived{{"Is arrival estimate <=now?"}}
    isDelayed{{Is arrival estimate > original arrival + 24h?}}
    sendNotification[/Send notification\]

    
    receiveTracking -- "`
    **Tracking data**
carrierName:**string**
destinationUnLoCode:**string**
departureDate:**string[_datetime_]**
arrivalDateEstimate:**string[_datetime_]**
containerNumber:**string**
`" -->  findContainerAndShipment
    findContainerAndShipment --> |WHERE containers.containerNumber = :trackingData.containerNumber| updateShipment
    updateShipment --> isArrivingSoon & hasArrived & isDelayed
    isDelayed -->|set delayed flag| sendNotification
    hasArrived  --> |set has arrived flag| sendNotification
    isArrivingSoon -->|set is arriving soon flag| sendNotification
    
%%    isArrivingSoon -->|yes| sendArriveSoon
flowchart
    getShipments([Get all shipments])