Relational Interfaces Rework 🐰🕳️ (#12082)

* add basic util function for later use

* sketch up useRelationMultiple implementation

* update relation util and start reworking relational interfaces

* support filter in m2o

* start working on useRelationMultiple

* continue working on relational foundation

* finish basic use-relation-multiple composable

* get o2m pretty close to being finished

* finish up list-o2m

* replace old interfaces

* copy existing interface

* rewrite vue file

* highlight deleted items

* use Search instead of Get

* support selection on m2m

* finish up m2m

* replace old files

* update files interface

* fix permission checks

* fix styling

* add sketches to explain relations

* rewrite m2a interface

* add usage hint to use-relation-multiple

* update file interface to use new composable

* update file-image interface

* fix image not being shown

* revert names

* fix selection of existing items

* fix loading selected items

* in between commit

* update translations interface

* try using composable recursive

* try linear approach on value modeling

* finish rewriting list-o2m-tree-view interface

* revert api changes

* fix sorting for list-o2m-tree-view

* fix selected items in created array

* Add direct download option to files interface

* Fix linter warnings

* Weird that it's being difficult, but ok

* Cast existingItemCount to number at all times

* fix page gets set below 1

* align pagination to the right

* highlight deselecting row

* show min 1 skeleton loader

* only filter selected when item exists

* fix working on new items

* Fix linter warning

* fix deselecting selected items

* show different icon depending if icon is local

* add changes from #12611

* Add _some vs _none support to o2m

* finish filtering out selected items

* Use get instead of search request

* fix save and stay

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>

* fix adding items to m2o

* Fix linter warning

* Handle no-type better

* Clean up axios usage

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
This commit is contained in:
Nitwel
2022-04-14 22:57:17 +02:00
committed by GitHub
parent 1b9f7bf3bc
commit 3e1fce8968
29 changed files with 2940 additions and 3669 deletions

View File

@@ -11,6 +11,6 @@ export function getJSType(field: Field): string {
if (['boolean'].includes(field.type)) return 'boolean';
if (['time', 'timestamp', 'date', 'dateTime'].includes(field.type)) return 'string';
if (['json', 'csv'].includes(field.type)) return 'object';
if (field.type.startsWith('geometry')) return 'object';
if (field.type?.startsWith('geometry')) return 'object';
return 'undefined';
}