Karaka-Management / oms-Profile

Other
0 stars 0 forks source link

Find a way to hide some contact/address information for some modules #3

Open spl1nes opened 1 year ago

spl1nes commented 1 year ago

Some information are only meant for specific modules (e.g. private address, phone number e.g. HR module) The reason why this is difficult is that this information should not be part of the model table but in the relation (many-to-many). At the moment the information in the relation table is not used apart from the relations it self. A solution could be to specify a filter in the relation in the mapper. Empty = all relations, filter = only populate the model array with relations which match the filter.

spl1nes commented 1 year ago

Address and Contact are now part of the Admin module and the account. They have a module member variable which can be defined to indicate which module is responsible for that address/contact. This way you could filter all addresses/contacts which are not part of a certain module.

e.g. the Profile module only shows contacts and addresses, which have null or Profile as module defined.

It could be better to also create ContactType database table. This way modules could define their own module types instead of using the limited fixed contact types. A very good use case would be the billing address and delivery address as a special type. Alternative this needs to be hard coded as a address/contact type which is doable but will we really implement all types or will we always miss some?