trufi-association / trufi-core

Trufi - A Flutter app for Public Transportation
https://www.trufi-association.org
GNU General Public License v3.0
92 stars 45 forks source link

Feedback on Routes (Gustavo's idea) #657

Open ZihRah opened 1 year ago

ZihRah commented 1 year ago

A button will be added to report if there where any problems with the route. It will be placed at to parts: next to the itinerary and at the top of the app. After clicking on the button you'll be directed to a new window with options (Not available, changed & others). Below of the options is a text field: . Then you chose one of the options and fill in the text. At the end you send the text.

GustavoTCh commented 1 year ago

To create buttons in next pages.

WhatsApp Image 2023-01-28 at 3 32 34 PM WhatsApp Image 2023-01-28 at 3 30 56 PM

GustavoTCh commented 1 year ago

Data structure for reporting routes:

{
    "idDevice": "46948961561564",
    "transportCode": "sdsad",
    "typeRoute": "FULL_ROUTE-PARTIAL_ROUTE",
    "state": "NOT_AVAILABLE-CHANGED-OTHERS",
    "userLocation?": {
        "lat": 156156,
        "lng": -1561
    },
    "description?": ".....",
    "phone?": "+67 838444",
    "segment": {
        "start": {
            "lat": 156156,
            "lng": -1561
        },
        "end": {
            "lat": 156156,
            "lng": -1561
        }
    }
}
GustavoTCh commented 1 year ago

@ZihRah, @EOVN and I have a new idea for the FullRoute report.

To generate more specific data, it is possible to allow users to draw boxes on the map to further report errors on an entire route.

WhatsApp Image 2023-01-28 at 3 32 34 PM

GustavoTCh commented 1 year ago

Data structure for reporting routes(V2):

enum TYPEROUTE {
    FULL_ROUTE = 'FULL_ROUTE',
    PARTIAL_ROUTE = 'PARTIAL_ROUTE'
}

enum STATE {
    NOT_AVAILABLE = 'NOT_AVAILABLE',
    CHANGED = 'CHANGED',
    OTHERS = 'OTHERS'
}

type POSITION = {
    lat: number
    lng: number
}

type SEGMENT = {
    start: POSITION
    end: POSITION
}

type FeedBack = {
    _id?: string
    idDevice: string
    idEdition: string
    transportCode: string
    typeRoute: TYPEROUTE
    state: STATE
    userLocation?: POSITION
    description?: string
    phone?: string
    segment?: SEGMENT
    segments?: SEGMENT[]
}

type FeedBackId = {
    id?: string
}

export { FeedBack, FeedBackId };
ZihRah commented 8 months ago

Gustavo thinks about including the server Valhalla to match tracked or marked points to the map in an easy way.