Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manually update GPS location of asset #922

Merged

Conversation

DonKoko
Copy link
Contributor

@DonKoko DonKoko commented Apr 23, 2024

General updates:

  • Added a component that requests geoLocation coordinates and manually creates a scan to record the current position
  • Update asset/actions-dropdown to have the 'Update GPS coordinates' action
  • Added a new migration that adds a flag called manuallyGenerated to Scan model
  • Updated useFetcherWithReset hook. Removed the spread of fetcher as it might cause issues
  • Updated the createScan service function to take latitude, longitude and manuallyGenerated props
  • Created endpoint /api/asset/scan which allows to create a scan for a certain asset, using a POST request

Front-end updates:

  • Updated Last position details header
  • Added row to display the source of data (manual or scan) including a explanation tooltip
  • updated parseScanData to also include manuallyGenerated

@DonKoko DonKoko linked an issue Apr 23, 2024 that may be closed by this pull request
DonKoko and others added 2 commits April 23, 2024 10:20
- Added a component that requests geoLocation coordinates and manually creates a scan to record the current position
- Update asset/actions-dropdown to have the 'Update GPS coordinates' action
- Added a new migration that adds a flag called manuallyGenerated to Scan model
- Updated useFetcherWithReset hook. Removed the spread of fetcher as it might cause issues
- Updated the createScan service function to take latitude, longitude and manuallyGenerated props
- Created endpoint /api/asset/scan which allows to create a scan for a certain asset, using a POST request
@DonKoko DonKoko changed the title making some adjustments to prep app for manually adding gps location Manually update GPS location of asset Apr 23, 2024
- Updated Last position details header
- Added row to display the source of data (manual or scan) including a explanation tooltip
- updated parseScanData to also include manuallyGenerated
@DonKoko
Copy link
Contributor Author

DonKoko commented Apr 23, 2024

@carlosvirreira @jurrejansen this is being deployed to testapp: https://github.com/Shelf-nu/shelf.nu/actions/runs/8798728248 and ready for testing

@jurrejansen
Copy link

jurrejansen commented Apr 23, 2024

@DonKoko Functionality wise I can't find anything. Just some front-end things.

  • Would be cool if we can consistently use containers for the icons in menu items. We're using a container of 20x20.

https://github.com/Shelf-nu/shelf.nu/assets/76112272/fcd3667f-d4d4-4532-a54f-a63ceefd4ee0
https://github.com/Shelf-nu/shelf.nu/assets/76112272/c86192a7-c367-486e-89c4-aa190913406c

@DonKoko
Copy link
Contributor Author

DonKoko commented Apr 23, 2024

Would be cool if we can consistently use containers for the icons in menu items. We're using a container of 20x20.

https://github.com/Shelf-nu/shelf.nu/assets/76112272/fcd3667f-d4d4-4532-a54f-a63ceefd4ee0
https://github.com/Shelf-nu/shelf.nu/assets/76112272/c86192a7-c367-486e-89c4-aa190913406c

This we should create a separate issue for so we can solve it properly and everywhere.

The other point is solved.

@DonKoko DonKoko merged commit b66d4ab into main Apr 24, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature request]: Allow to manually update asset GPS location
2 participants