1669 Commits

Author SHA1 Message Date
Anton Tranelis
171f6a2b59
fix: prevent 'Cannot read properties of undefined (reading '0')' errors (#385)
- Add proper array length checks before accessing error.errors[0]
- Secure error handling in App.tsx for both map loading and layer loading
- Fix unsafe array access in mapApi.ts error handler
- Prevent crashes when error.errors is undefined or empty array

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-15 11:47:09 +02:00
Anton Tranelis
6d504fa2e3
cleanup item types (#386) 2025-09-15 11:45:55 +02:00
Anton Tranelis
c5232093dc
feat(lib): relation component (#387)
* Fix relations view

* extended relation component

* added backend fields

* bidirectional direction

* fix linting
2025-09-15 11:32:19 +02:00
a2b7c16133
refactor(backend): remove ocean nomad features from seed data (#382)
* removed ocean nomad specific collections

* removed vessel icon

* updated seeds

* added profilecomponentes to type

* added text to item

* improved sample data

* improved sample data

* improved sample data

* fix comment

---------

Co-authored-by: Anton Tranelis <mail@antontranelis.de>
2025-09-13 12:48:06 +02:00
Anton Tranelis
298876a269
fix(lib): fix user_created reset when updating other users profile marker (#380)
* fix user_created new set when updating other users profile marker

* fix same issue on different places

* fix linting

* fix tests
2025-09-12 21:50:33 +02:00
5de172e739
fix public role permissions (#381) 2025-09-12 15:47:46 +02:00
07c8154453
add trailing slash for VITE_API_URL example (#379)
Co-authored-by: Anton Tranelis <31516529+antontranelis@users.noreply.github.com>
2025-09-10 12:31:50 +02:00
6d0d346c6c
feat(docker): missing docker compose variables (#378)
* missing docker compose variables

* adjust array list according to production environment
2025-09-10 12:30:39 +02:00
3129171534
missing changes & fixes from oceannomads (#376) 2025-09-10 10:26:02 +00:00
756a2cdf64
refactor(backend): structural change to match directus-sync's default (#377)
* a small structural change to fit better with the default of directus-sync

* revert mage conflict
2025-09-10 12:20:51 +02:00
Anton Tranelis
79af6ed3f9
fix(backend): extended flows (#374)
* extended flows

* redeactivated flows

* Update flows.json

* fix id

* fix update_user operations

* fix flows
2025-09-09 19:38:02 +00:00
f8bf861e4e
feat(backend): directus data per project (#375)
* seed directus data as a whole per project, fix marker icon: user-outline

* rename deploy.sh back to seed.sh

* workflow to test the seed in the backend

* test workflow failure

* wait 3 seconds for all docker containers to be ready

* sleep 3 seconds not 3000

* mod permissions

* try sudo

* revert breaking change

* enforce exit status 0

* fix exit enforce

* test if failing seed files is related to the data folder

fix

* revert volume removal, create uploads folder

* also chmod
2025-09-08 22:22:50 +02:00
Anton Tranelis
a49590243a
adjust UserControl for external profiles and small item edits (#363) 2025-09-07 13:47:50 +02:00
Anton Tranelis
659efc0d5e
fix(lib): adjust index page for external profiles (#361)
* don't open internal profile, if item has external profile url

* refactor(backend): simplified icon config (#359)

* simplified icon config

* fixed linting

* fixed linting

* fix linting and searchControl

* adjust useSelectPosition

* adjust useSelectPosition

* fixed presets

* removed menuIcon artefacts

* fix example

* adjust icon size in addButton

* item index page is now not opening internal profile if external profile exist

* fix imports

* reset layer

* fix behaviour

* set map position to popup form
2025-09-07 13:42:29 +02:00
Copilot
a9004a47ea
fix(app): unlimited loading screen when backend is not reachable (#364)
* Initial plan

* Add error handling for unlimited loading screen bug

Co-authored-by: antontranelis <31516529+antontranelis@users.noreply.github.com>

* Complete fix for unlimited loading screen bug with proper state management

Co-authored-by: antontranelis <31516529+antontranelis@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: antontranelis <31516529+antontranelis@users.noreply.github.com>
2025-09-07 12:45:37 +02:00
dbb405fe7e
log sql file currently executed in seed (#360) 2025-09-05 23:36:29 +02:00
Anton Tranelis
879dbf1631
refactor(backend): simplified icon config (#359)
* simplified icon config

* fixed linting

* fixed linting

* fix linting and searchControl

* adjust useSelectPosition

* adjust useSelectPosition

* fixed presets

* removed menuIcon artefacts

* fix example

* adjust icon size in addButton
2025-09-05 22:26:26 +02:00
Anton Tranelis
8ec51d4490
optimized collection views (#358) 2025-09-04 18:38:53 +02:00
Anton Tranelis
cafffe88b4
change profile button target (#357) 2025-09-04 14:17:36 +02:00
Anton Tranelis
f0a6710dee
fix(backend): fixed oceannomads flows (#356)
* fixed oceannomads flows

* set ON flows to inactive
2025-09-04 14:09:51 +02:00
55f9bb514b
type event seed using flex layout (#355) 2025-09-04 14:01:37 +02:00
6793a33fac
delete ocean nomads specific data seeds (#354) 2025-09-03 18:14:53 +02:00
9812799868
corrected flow name, activate flows via script (#353) 2025-09-03 18:10:42 +02:00
6a8352bb32
adjust layer ids in flows for ocean nomads (#352) 2025-09-03 17:46:03 +02:00
97f50c2d9a
seed text+gallery type (#351) 2025-09-03 16:13:22 +02:00
31eb3ed000
feat(backend): item seeds (#349)
* add marker icons, images & seeds

* added sample items to the development environment

Co-authored-by: Anton Tranelis
<31516529+antontranelis@users.noreply.github.com>

* added ocean nomads layers

* added and restructured files

* added menu texts and removed place layer from sample map

---------

Co-authored-by: Anton Tranelis <31516529+antontranelis@users.noreply.github.com>
Co-authored-by: Anton Tranelis <mail@antontranelis.de>
2025-09-03 15:03:58 +02:00
e9f8f6e3ea
add marker icons, images & seeds (#348) 2025-09-02 19:31:02 +02:00
Anton Tranelis
75516b8c3a
fix(app): layer sort (#347)
* layer sort

* change dev port back to 5174
2025-09-02 14:11:07 +02:00
Anton Tranelis
02e5598266
fix(lib): login info box (#345)
* login info box

* fixed linting

* fix linting

---------

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
2025-09-02 09:56:15 +00:00
138874cef4
refactor(backend): sync collection with production (#346)
* sync collections & other settings with production

missing changes

* deactivated specific flows

---------

Co-authored-by: Anton Tranelis <mail@antontranelis.de>
2025-09-02 11:51:32 +02:00
Anton Tranelis
34136ac6c2
fix(backend): add backend fields (#344)
* added missing backend fields

* fix api stuff directus

---------

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
2025-08-27 17:18:31 +02:00
Anton Tranelis
71e192a60b
removed würdekompass admin role (#343) 2025-08-27 16:58:49 +02:00
Anton Tranelis
1aaabebc99
reinsert uuid to fix notifiations in backend (#342) 2025-08-27 13:20:46 +02:00
Anton Tranelis
94ec2e5576
fix popup button (#339) 2025-08-27 13:17:20 +02:00
Anton Tranelis
1b0b51e91a
fix behaviour of modal (#340) 2025-08-27 10:05:42 +02:00
Anton Tranelis
7e059d8deb
feat(app): added external profile url (#328)
* added external profile url

* switch port back to 5174

* fix linting

* chaneged target to _parent
2025-08-26 14:56:55 +02:00
Anton Tranelis
cb6737d370
feat(app): popup customizing (#333)
* small form edits

* fix linting

* custom button label

* more popup customizing

* reset dev port
2025-08-26 14:55:15 +02:00
Anton Tranelis
a599eddca6
feat(lib): add optional request password button to login page (#334)
* add optional request password button to login page

* fix linting

* fix linting

* added field to backend config
2025-08-26 14:43:31 +02:00
Anton Tranelis
1ef562cf3c
feat(lib): hide signup option (#329)
* hide signup option

* directus pull
2025-08-26 14:22:26 +02:00
0b77d95ae4
fix(backend): register role seed (#337)
* adjust seed structure to support multiple projects

* fix gitignore

* seed the role a user has when registered properly
2025-08-26 13:53:01 +02:00
9a19617906
refactor(app): parameterize admin role & enforce it to be set (#336)
* parameterize admin role & enforce it to be set

* fix lint

---------

Co-authored-by: Anton Tranelis <31516529+antontranelis@users.noreply.github.com>
2025-08-26 09:52:25 +00:00
d199d47730
feat(backend): seed multi project architecture (#327)
* rename manual folder to seed-manual

* adjust seed structure to support multiple projects

* add gitignore

---------

Co-authored-by: Anton Tranelis <31516529+antontranelis@users.noreply.github.com>
2025-08-26 11:46:06 +02:00
62777970fc
rename manual folder to seed-manual (#326) 2025-08-26 11:39:29 +02:00
af7f51efbd
refactor(backend): directus sync files (#325)
* update directus-extension-sync

* seed files via directus sync

* delete manual seed files & script
2025-08-26 11:24:02 +02:00
Anton Tranelis
fbe1eb9e0f
avatar-widget showing external image (#330) 2025-08-25 11:03:59 +02:00
2baabe7940 disable close on click outside in location update dialog 2025-08-20 19:02:08 +02:00
6fcdef0433 fix(lib): ensure user_created is preserved in all item operations
- Add user_created field to all item update operations to maintain proper user association
- Update useMyProfile hook to use direct computation instead of useMemo to avoid React hook queue issues
- Refactor UserControl to use useMyProfile hook for consistency
- Fix user_created handling in LocateControl, ItemFormPopup, useSelectPosition, and itemFunctions
- Add user parameter to linkItem, unlinkItem, and related functions with proper TypeScript signatures
- Update all function calls and tests to include user parameter
- Ensure proper null safety with user ?? undefined pattern

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-20 18:55:02 +02:00
Anton Tranelis
db423b26f3
fix(lib): fix tests for locateControl (#324)
* improved locate control

* fix(lib): clean up setTimeout and fix Chrome modal layout issue

- Add proper cleanup for setTimeout in LocateControl to prevent memory leaks
- Replace modal-open class with direct overflow style to fix Chrome scrollbar issue
- Add timeout reference tracking for better component unmount handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix linting

* set distance rule

* optimized locatecontrol

* working for new users without profile now

* test(lib): add comprehensive tests for LocateControl component

- Add 9 comprehensive unit tests covering all LocateControl functionality
- Test modal display logic for new and existing users
- Test profile creation and position updates
- Test navigation after successful operations
- Test error handling with proper toast notifications
- Mock all external dependencies (React Router, Leaflet, APIs)
- Verify dialog behavior prevents re-appearance after decline
- Include snapshot tests for UI consistency
- All tests pass with proper TypeScript typing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* removed unused code, add 1s delay

* updated tests

* fixed tests

* fix test for LocateControl

* fix linting

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-20 16:53:08 +02:00
Anton Tranelis
f7f758bb00
feat(lib): enhanced LocateControl (#308)
* improved locate control

* fix(lib): clean up setTimeout and fix Chrome modal layout issue

- Add proper cleanup for setTimeout in LocateControl to prevent memory leaks
- Replace modal-open class with direct overflow style to fix Chrome scrollbar issue
- Add timeout reference tracking for better component unmount handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix linting

* set distance rule

* optimized locatecontrol

* working for new users without profile now

* test(lib): add comprehensive tests for LocateControl component

- Add 9 comprehensive unit tests covering all LocateControl functionality
- Test modal display logic for new and existing users
- Test profile creation and position updates
- Test navigation after successful operations
- Test error handling with proper toast notifications
- Mock all external dependencies (React Router, Leaflet, APIs)
- Verify dialog behavior prevents re-appearance after decline
- Include snapshot tests for UI consistency
- All tests pass with proper TypeScript typing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* removed unused code, add 1s delay

* updated tests

* fixed tests

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-20 16:39:19 +02:00
Anton Tranelis
649efe551d
refactor(lib): implement server-response-first pattern (#322)
* use server response for local state updates

* fix formatting

* refactor: comprehensive server-response-first pattern implementation

## Major Changes

### LayerProps ID Required
- Made `LayerProps.id` required (was optional)
- All layers now guaranteed to have server-provided UUID
- Enables reliable layer ID mapping from server responses

### useSelectPosition Hook Refactored
- Added reusable `handleApiOperation` helper function
- Refactored `itemUpdatePosition`, `itemUpdateParent`, `linkItem`
- All functions now use server response + layer ID mapping
- Consistent error handling and toast management

### itemFunctions.ts Complete Refactor
- **submitNewItem**: Server response with layer mapping
- **linkItem**: Server response preserves layer object
- **unlinkItem**: Same pattern as linkItem
- **handleDelete**: Simplified error handling
- **onUpdateItem**: Complex function refactored for both update/create branches

### Benefits
-  Eliminates race conditions from manual state construction
-  Server response as single source of truth for all updates
-  Consistent error handling across all API operations
-  Items no longer disappear from map after updates
-  Type-safe layer ID mapping

### Testing
- Updated ItemFunctions.spec.tsx with new toast patterns
- Added required layer IDs to test objects
- All 19 tests passing (3 skipped)
- ESLint clean

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix linting

* fix: resolve TypeScript undefined data errors

- Add non-null assertions for result.data in conditional blocks
- TypeScript now properly recognizes data is defined after success check
- All linting and TypeScript errors resolved

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fixed examples

* remove unneccessary uuid generation

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-20 15:03:30 +02:00