Skip to content

Commit

Permalink
issue #202: flowcharts
Browse files Browse the repository at this point in the history
  • Loading branch information
k-allagbe committed Jan 14, 2025
1 parent e929aeb commit 1f2d3b8
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions docs/label-data-confirmation/flowchart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Flowcharts

## Launch /label-data-confirmation

```mermaid
flowchart TD
Start([Start]) --> LabelDataConfirmation["/label-data-confirmation"]
LabelDataConfirmation --> ImagesCheck{"Images?"}
ImagesCheck -->|No| HomePage[Home]
ImagesCheck -->|Yes| LabelDataCheck{"Label Data?"}
LabelDataCheck -->|No| HomePage
LabelDataCheck -->|Yes| DisplayImages["Display Images"] --> DisplayLabelData["Display Label Data"] --> End([End])
HomePage --> End
```

## Click on Confirm button

```mermaid
flowchart TD
Start([Confirm Button Clicked]) --> CheckLabelDataConfirmed{"labelData.confirmed?"}
CheckLabelDataConfirmed -->|No| End([End])
CheckLabelDataConfirmed -->|Yes| CheckInspectionID{"labelData.inspection_id?"}
CheckInspectionID -->|No| TransformToLabelDataInput["Transform Label Data into LabelDataInput"] --> StartLoadingAnimationNoID["Start Loading Animation"] --> PostRequest["POST api/inspections with LabelDataInput"] --> RequestSuccess
CheckInspectionID -->|Yes| TransformLabelData["Transform Label Data into InspectionUpdate"] --> StartLoadingAnimationWithID["Start Loading Animation"] --> PutRequest["PUT api/inspections/<inspection_id> with InspectionUpdate"] --> RequestSuccess
RequestSuccess{"Request Success?"}
RequestSuccess -->|No| StopLoadingFailure["Stop Loading Animation"] --> DisplayFailureAlert["Display Failure Alert"] --> End
RequestSuccess -->|Yes| StopLoadingSuccess["Stop Loading Animation"] --> DisplaySuccessAlert["Display Success Alert"] --> HomePage[Home] --> End
```

## Click on Edit button

```mermaid
flowchart TD
Start([Edit Details Button Clicked]) --> CheckInspectionID{"labelData.inspection_id?"}
CheckInspectionID -->|No| NavigateToBase["Navigate to /label-data-validation"] --> End([End])
CheckInspectionID -->|Yes| NavigateToInspection["Navigate to /label-data-validation/<inspection_id>"] --> End
```

0 comments on commit 1f2d3b8

Please sign in to comment.