graph TD;
A[User Enters PNR] --> B{PNR Exists ?};
B -->|Yes| C[No Fetch];
B -->|No| D[Fetch Data from API];
D --> E[Store Data return status = 200 in Local Storage];
E --> F[Check Date Expired?];
F -->|Yes| G[Display PNR card in Past Trips];
F -->|No| H[Display PNR card in Coming Trips];
H --> I[User Clicks on PNR];
I --> L{is availabe in session Storage}
L --> |Yes| K[Display prev Fetched Data from Session storage];
L --> |No| J[Fetch Current clicked PNR Status];
J-->M[Store Fetched Data to session storage]