SAP Spartacus OrganizationState
OrganizationState作為createSelector的第二個(gè)參數(shù),即projector,箭頭函數(shù)的輸入?yún)?shù)。
左邊的大寫字符串是常量:
b2bUser是在Management數(shù)據(jù)類型的基礎(chǔ)上,增添了三個(gè)新字段:
- approvers
- permissions
- userGroups
B2BUser的五個(gè)字段:
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;>;…
}
一個(gè)運(yùn)行時(shí)例子:
注意:雙層entities字段。id指向value.
更多Jerry的原創(chuàng)文章,盡在:“汪子熙”:
總結(jié)
以上是生活随笔為你收集整理的SAP Spartacus OrganizationState的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SAP Spartacus CMS Co
- 下一篇: SAP Commerce Cloud (