fix selectRegistration filter
This commit is contained in:
parent
4d9cfb9ada
commit
757141661a
@ -355,7 +355,7 @@ const gibddReactions: IReactionEffect[] = [
|
||||
typePTS,
|
||||
}) => {
|
||||
calculationStore.setFilter('selectRegistration', options =>
|
||||
options.filter((x, i) => {
|
||||
options.filter(x => {
|
||||
if (!(x.evo_whom_register === objectRegistration)) {
|
||||
return false;
|
||||
}
|
||||
@ -379,13 +379,21 @@ const gibddReactions: IReactionEffect[] = [
|
||||
}
|
||||
|
||||
if (
|
||||
(x.evo_accountid &&
|
||||
(!objectRegionRegistration.accounts ||
|
||||
objectRegionRegistration.accounts.length === 0)) ||
|
||||
objectRegionRegistration.accounts
|
||||
.map(r => r.accountid)
|
||||
.includes(x.evo_accountid) === false
|
||||
objectRegionRegistration.accounts &&
|
||||
objectRegionRegistration.accounts.length > 0
|
||||
) {
|
||||
// 1
|
||||
if (!x.evo_accountid) {
|
||||
return false;
|
||||
}
|
||||
// 4
|
||||
return objectRegionRegistration.accounts
|
||||
.map(r => r.accountid)
|
||||
.includes(x.evo_accountid);
|
||||
}
|
||||
|
||||
//3
|
||||
if (x.evo_accountid) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user