WebVella/WebVella-ERP

Optimization -> unify all fields meta

Closed this issue · 1 comments

In order to decrease the view json size and remove redundant information, we may introduce the new idea. The case is when in the view or list are used same fields from the same entity multiple times. This case happens when there is a view with many N:N relations that are item to self, and also when in the record view - we use subviews in the sidebar from the same entity. What we can do as an idea:

in the record view json:

  1. create new property in the meta object called => fields.
  2. In meta.fields create unified object properties for each field by following this convention:
    • field from the same entity has the property name "field_name"
    • field from another entity has the property name "$entity_name$field_name
  3. in the current field meta -> in the sidebar item or in the column item, instead of the whole "meta" object, include just -> "metaName" (similar to the already present dataName). this will serve as a way to get the real meta info when needed

This is very general change and usually fix problems related to incorrect entity design. So we drop it.