Skip to content

AbstractDetail should use Resolver data as is #37

@PowerKiKi

Description

@PowerKiKi

In NaturalAbstractDetail.ngOnInit I think we should simplify like so:

- this.data = merge({model: this.service.getConsolidatedForClient()}, data[this.key]);
- this.data = merge(this.data, omit(data, [this.key]));
+ this.data = data;

If my understanding is correct we try force default values on whatever is coming from the route. But the route is already populated with default value via NaturalAbstractModelService.resolve who called getConsolidatedForClient earlier. So our current code seems to be entirely redundant as long as we properly use revolvers.

So we should double-check that resolvers are used correctly in all our projects and simplify this code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions