SAP Spartacus OrganizationState

OrganizationState作为createSelector的第二个参数,即projector,箭头函数的输入参数。

左边的大写字符串是常量:


b2bUser是在Management数据类型的基础上,增添了三个新字段:

  • approvers
  • permissions
  • userGroups

B2BUser的五个字段:

Management:



1
export interface B2BUserManagement extends Management

export interface Management extends StateUtils.EntityListState {}

StateUtils.EntityListState

export interface EntityListState {
list: EntityLoaderState;
entities: EntityLoaderState;
}

export interface EntityListState {
list: EntityLoaderState;
entities: EntityState<LoaderState>;
}

export interface EntityListState {
list: EntityLoaderState;
entities: EntityState<LoaderState>;
}

export interface EntityListState {
list: EntityLoaderState;
entities: EntityState<loading?: boolean;
error?: boolean;
success?: boolean;
value?: B2BUser;>;
}

export interface EntityListState {
list: EntityLoaderState;
entities: EntityState<loading?: boolean;
error?: boolean;
success?: boolean;
value?: B2BUser;>;
}

export interface EntityListState {
list: EntityLoaderState;
entities: id1: <loading?: boolean;
error?: boolean;
success?: boolean;
value?: B2BUser;>;
id2: <loading?: boolean;
error?: boolean;
success?: boolean;
value?: B2BUser;>;…
}

export interface EntityListState {
list: EntityLoaderState<ids: string[];
pagination?: PaginationModel;
sorts?: SortModel[];>;
entities: id1: <loading?: boolean;
error?: boolean;
success?: boolean;
value?: B2BUser;>;
id2: <loading?: boolean;
error?: boolean;
success?: boolean;
value?: B2BUser;>;…
}

一个运行时例子:

注意:双层entities字段。id指向value.

更多Jerry的原创文章,尽在:“汪子熙”:

汪子熙 CSDN认证博客专家 前端框架 Node.js SAP
Jerry Wang,2007 年从电子科技大学计算机专业硕士毕业后加入 SAP 成都研究院工作至今。Jerry 是 SAP 社区导师,SAP 中国技术大使。14 多年的 SAP 产品开发生涯,Jerry 曾经先后参与 SAP Business ByDesign,SAP CRM,SAP Cloud for Customer,SAP S/4HANA,SAP Commerce Cloud(电商云)等标准产品的研发工作。
©️2020 CSDN 皮肤主题: 博客之星2020 设计师:CY__ 返回首页
实付 49.90元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值