The Share Live Location feature allows users to generate and manage live location links from the Unit Tab. This guide explains how to configure the feature, generate live location links, and handle different link statuses.
- Introduce a new menu action titled "Share Location" in the Unit Tab.

- Clicking this action will open a popup displaying the "Links List", containing previously generated location-sharing links.
- Links List:
- Display all previously generated live location links .
- Create New Link Button:
- Add a button labeled "Create Live Location".

- Clicking the "Create Live Location" button will open a popup with options for live location duration:
- 15 minutes
- 1 hour
- 8 hours
- Custom (select a date and time)
- For the Custom option:
- Provide a schedule calendar to select a specific future date and time.
- Allow a maximum duration of 24 hours.
- Ensure only future dates and times can be selected.

- After selecting a duration, generate a unique live location link.
- Add functionality to copy the generated link to the clipboard with a single click.
- The generated link can be shared with anyone without requiring login credentials.
- Anyone with the link can access the live location tracking.
- When the generated link is accessed, redirect the user to the path:
/app/share/location/:id
.
- Active Link:
- Show real-time location tracking on a map.
- Display the following details:
- Unit Name: The name of the unit being tracked.
- Unit Location: The current location of the unit (latitude and longitude or formatted address).
- Link Validity: Indicate the duration for which the link is valid.
- Start Time: The time when the link became active.
- End Time: The time when the link will expire.
- Last Updated Time: The most recent timestamp when the unit's location was updated.

-
Upcoming Link:
- If the selected start time is in the future, display an upcoming link page with a message indicating the link's activation time and the Unit Name.

-
Expired Link:
- If the link has expired, display a link expired page with the following details:
- Unit Name and Last Known Location.
- Link Start and End Time.
- Display the location history for up to 30 minutes prior to expiration (if available).
- After 30 minutes post-expiration, display a generic link expired page without any additional details.
