Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
basic
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xrm
basic
Commits
4c3ff245
Commit
4c3ff245
authored
4 years ago
by
Sebastian Listl
Browse files
Options
Downloads
Patches
Plain Diff
#1063116 EmployeeRole contentProcess changed
parent
b2763c23
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
entity/EmployeeRole_entity/EmployeeRole_entity.aod
+1
-0
1 addition, 0 deletions
entity/EmployeeRole_entity/EmployeeRole_entity.aod
entity/EmployeeRole_entity/recordcontainers/jdito/contentProcess.js
+12
-25
12 additions, 25 deletions
...loyeeRole_entity/recordcontainers/jdito/contentProcess.js
with
13 additions
and
25 deletions
entity/EmployeeRole_entity/EmployeeRole_entity.aod
+
1
−
0
View file @
4c3ff245
...
...
@@ -74,6 +74,7 @@
<jDitoRecordContainer>
<name>
jdito
</name>
<jDitoRecordAlias>
Data_alias
</jDitoRecordAlias>
<isSortable
v=
"true"
/>
<contentProcess>
%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/contentProcess.js
</contentProcess>
<onInsert>
%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/onInsert.js
</onInsert>
<onUpdate>
%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/onUpdate.js
</onUpdate>
...
...
This diff is collapsed.
Click to expand it.
entity/EmployeeRole_entity/recordcontainers/jdito/contentProcess.js
+
12
−
25
View file @
4c3ff245
import
(
"
Util_lib
"
);
import
(
"
system.result
"
);
import
(
"
system.vars
"
);
import
(
"
system.tools
"
);
var
roles
=
[];
var
singleRole
=
[];
var
userTitle
=
vars
.
exists
(
"
$param.UserTitle_param
"
)
&&
vars
.
get
(
"
$param.UserTitle_param
"
);
var
allRoles
=
tools
.
getAllRoles
();
...
...
@@ -24,33 +24,20 @@ if (userTitle && tools.existUsers(userTitle))
},
existsObj
);
}
var
ids
=
vars
.
get
(
"
$local.idvalues
"
);
if
(
ids
!=
null
)
var
id
value
s
=
vars
.
get
(
"
$local.idvalues
"
);
if
(
!
Utils
.
isNullOrEmpty
(
idvalues
)
)
{
roles
=
roles
.
filter
(
function
(
role
)
{
for
(
let
i
=
0
;
i
<
ids
.
length
;
i
++
)
{
if
(
role
[
0
]
==
ids
[
i
])
return
true
;
}
return
ids
[
i
];
return
idvalues
.
includes
(
role
[
0
]);
});
}
if
(
roles
==
undefined
||
roles
.
length
>
0
)
result
.
object
(
roles
);
else
var
sortOrder
=
vars
.
get
(
"
$local.order
"
);
if
(
sortOrder
&&
"
ROLE.displayValue
"
in
sortOrder
)
{
var
currentRole
=
vars
.
get
(
"
$field.ROLE
"
)
roles
=
roles
.
filter
(
function
(
role
)
{
for
(
let
i
=
0
;
i
<
ids
.
length
;
i
++
)
{
if
(
role
[
0
]
==
currentRole
)
return
true
;
}
return
vars
.
get
(
"
$field.ROLE
"
);
});
singleRole
[
0
]
=
[
currentRole
.
toUpperCase
(),
currentRole
.
toUpperCase
(),
allRoles
[
currentRole
][
0
],
"
Role
"
];
result
.
object
(
singleRole
)
}
\ No newline at end of file
ArrayUtils
.
sort2d
(
roles
,
2
,
sortOrder
[
"
ROLE.displayValue
"
]
===
"
UP
"
);
}
result
.
object
(
roles
);
This diff is collapsed.
Click to expand it.
Sebastian Listl
@s.listl
mentioned in commit
a1a543f3
·
4 years ago
mentioned in commit
a1a543f3
mentioned in commit a1a543f3f63e0a29a14a37a3beed3aa6ae3b986f
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment