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
3abcd8da
Commit
3abcd8da
authored
4 years ago
by
Johannes Goderbauer
Browse files
Options
Downloads
Patches
Plain Diff
Organisation: aroundLocation was calculated in new/edit mode
parent
3dc4842b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
entity/Organisation_entity/entityfields/openaroundlocation/stateProcess.js
+17
-14
17 additions, 14 deletions
...on_entity/entityfields/openaroundlocation/stateProcess.js
with
17 additions
and
14 deletions
entity/Organisation_entity/entityfields/openaroundlocation/stateProcess.js
+
17
−
14
View file @
3abcd8da
...
...
@@ -3,21 +3,24 @@ import("system.neon");
import
(
"
system.vars
"
);
import
(
"
system.entities
"
);
//use read entity since the lat and lon fields are not loaded by default since they are not needed otherwise
var
rowConfig
=
entities
.
createConfigForLoadingRows
()
.
fields
([
"
STANDARD_LAT
"
,
"
STANDARD_LON
"
])
.
entity
(
vars
.
get
(
"
$sys.currententityname
"
))
.
uid
(
vars
.
get
(
"
$sys.uid
"
));
var
row
=
entities
.
getRow
(
rowConfig
);
var
recordState
=
vars
.
get
(
"
$sys.operatingstate
"
);
var
res
=
neon
.
COMPONENTSTATE_DISABLED
;
var
uid
=
vars
.
get
(
"
$sys.uid
"
);
if
(
recordState
!=
neon
.
OPERATINGSTATE_NEW
&&
recordState
!=
neon
.
OPERATINGSTATE_EDIT
&&
uid
)
{
//use read entity since the lat and lon fields are not loaded by default since they are not needed otherwise
var
rowConfig
=
entities
.
createConfigForLoadingRows
()
.
fields
([
"
STANDARD_LAT
"
,
"
STANDARD_LON
"
])
.
entity
(
vars
.
get
(
"
$sys.currententityname
"
))
.
uid
(
uid
);
var
row
=
entities
.
getRow
(
rowConfig
);
var
lat
=
row
[
"
STANDARD_LAT
"
];
var
lon
=
row
[
"
STANDARD_LON
"
];
var
lat
=
row
[
"
STANDARD_LAT
"
];
var
lon
=
row
[
"
STANDARD_LON
"
];
if
(
lat
&&
lon
)
res
=
neon
.
COMPONENTSTATE_AUTO
;
}
var
res
;
if
(
lat
&&
lon
)
res
=
neon
.
COMPONENTSTATE_AUTO
;
else
res
=
neon
.
COMPONENTSTATE_DISABLED
;
result
.
string
(
res
);
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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