Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Genesys Website
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
32
Issues
32
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Genesys PGR
Genesys Website
Commits
6733323d
Commit
6733323d
authored
Oct 22, 2020
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugs
parent
5a200cee
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
10 deletions
+6
-10
workspaces/ui-express/src/actions/navigation.ts
workspaces/ui-express/src/actions/navigation.ts
+1
-1
workspaces/ui-express/src/institutes/ui/DisplayPage.tsx
workspaces/ui-express/src/institutes/ui/DisplayPage.tsx
+3
-3
workspaces/ui-express/src/ui/App.tsx
workspaces/ui-express/src/ui/App.tsx
+2
-6
No files found.
workspaces/ui-express/src/actions/navigation.ts
View file @
6733323d
...
@@ -3,7 +3,7 @@ import { stringify } from 'query-string';
...
@@ -3,7 +3,7 @@ import { stringify } from 'query-string';
const
IN_BROWSER
=
typeof
window
!==
'
undefined
'
;
const
IN_BROWSER
=
typeof
window
!==
'
undefined
'
;
export
function
navigateTo
(
path
:
string
,
query
?:
object
)
{
export
function
navigateTo
(
path
:
string
,
query
?:
Record
<
string
,
string
|
number
|
boolean
>
)
{
return
(
dispatch
,
getState
)
=>
{
return
(
dispatch
,
getState
)
=>
{
if
(
!
IN_BROWSER
)
{
if
(
!
IN_BROWSER
)
{
console
.
log
(
'
Not navigating anywhere while on the server!
'
);
console
.
log
(
'
Not navigating anywhere while on the server!
'
);
...
...
workspaces/ui-express/src/institutes/ui/DisplayPage.tsx
View file @
6733323d
...
@@ -168,8 +168,8 @@ class DisplayPage extends React.Component<IDisplayPageProps, any> {
...
@@ -168,8 +168,8 @@ class DisplayPage extends React.Component<IDisplayPageProps, any> {
public
componentDidUpdate
(
prevProps
:
Readonly
<
IDisplayPageProps
>
):
void
{
public
componentDidUpdate
(
prevProps
:
Readonly
<
IDisplayPageProps
>
):
void
{
const
{
code
:
oldCode
}
=
prevProps
;
const
{
code
:
oldCode
}
=
prevProps
;
const
{
code
,
loadInstitute
,
institute
}
=
this
.
props
;
const
{
loading
,
code
,
loadInstitute
,
institute
}
=
this
.
props
;
if
(
code
&&
(
!
institute
||
code
!==
institute
.
details
.
code
)
||
code
!==
oldCode
)
{
if
(
code
&&
!
loading
&&
(
!
institute
||
code
!==
institute
.
details
.
code
)
||
code
!==
oldCode
)
{
loadInstitute
(
code
);
loadInstitute
(
code
);
}
}
}
}
...
@@ -182,7 +182,7 @@ class DisplayPage extends React.Component<IDisplayPageProps, any> {
...
@@ -182,7 +182,7 @@ class DisplayPage extends React.Component<IDisplayPageProps, any> {
let
cropNameOverview
;
let
cropNameOverview
;
let
taxonomyGenusOverview
;
let
taxonomyGenusOverview
;
let
taxonomyGenusSpeciesOverview
;
let
taxonomyGenusSpeciesOverview
;
if
(
!
loading
)
{
if
(
!
loading
&&
institute
)
{
const
cropShortNameKey
=
'
crop.shortName
'
;
const
cropShortNameKey
=
'
crop.shortName
'
;
cropShortNameOverview
=
institute
.
overview
[
cropShortNameKey
];
cropShortNameOverview
=
institute
.
overview
[
cropShortNameKey
];
const
cropNameKey
=
'
cropName
'
;
const
cropNameKey
=
'
cropName
'
;
...
...
workspaces/ui-express/src/ui/App.tsx
View file @
6733323d
...
@@ -7,7 +7,7 @@ import { updateHistory } from 'actions/history';
...
@@ -7,7 +7,7 @@ import { updateHistory } from 'actions/history';
import
{
loadCrops
}
from
'
crop/actions/public
'
;
import
{
loadCrops
}
from
'
crop/actions/public
'
;
import
{
initMyList
}
from
'
list/actions/public
'
;
import
{
initMyList
}
from
'
list/actions/public
'
;
import
{
initMyMaps
}
from
'
accessions/actions/public
'
;
import
{
initMyMaps
}
from
'
accessions/actions/public
'
;
import
{
checkSoftwareVersion
,
serverInfoRequest
}
from
'
actions/serverInfo
'
;
import
{
serverInfoRequest
}
from
'
actions/serverInfo
'
;
import
{
loadIso3Decodings
,
refreshIso3Decodings
}
from
'
geo/actions/public
'
;
import
{
loadIso3Decodings
,
refreshIso3Decodings
}
from
'
geo/actions/public
'
;
import
{
withRouter
}
from
'
react-router-dom
'
;
import
{
withRouter
}
from
'
react-router-dom
'
;
...
@@ -34,7 +34,6 @@ interface IAppProps extends React.ClassAttributes<any>, WithTranslation {
...
@@ -34,7 +34,6 @@ interface IAppProps extends React.ClassAttributes<any>, WithTranslation {
loadIso3Decodings
:
(
lang
:
string
)
=>
void
;
loadIso3Decodings
:
(
lang
:
string
)
=>
void
;
serverInfo
:
any
;
serverInfo
:
any
;
serverInfoRequest
:
any
;
serverInfoRequest
:
any
;
checkSoftwareVersion
:
any
;
initMyMaps
:
any
;
initMyMaps
:
any
;
refreshIso3Decodings
:
(
lang
:
string
)
=>
void
;
refreshIso3Decodings
:
(
lang
:
string
)
=>
void
;
lang
:
string
;
lang
:
string
;
...
@@ -47,7 +46,7 @@ class App extends React.Component<IAppProps, any> {
...
@@ -47,7 +46,7 @@ class App extends React.Component<IAppProps, any> {
}
}
public
componentDidMount
()
{
public
componentDidMount
()
{
const
{
initMyList
,
checkSoftwareVersion
,
initMyMaps
,
refreshIso3Decodings
,
lang
}
=
this
.
props
;
const
{
initMyList
,
initMyMaps
,
refreshIso3Decodings
,
lang
}
=
this
.
props
;
const
{
crops
,
loadCrops
,
serverInfo
,
serverInfoRequest
}
=
this
.
props
;
const
{
crops
,
loadCrops
,
serverInfo
,
serverInfoRequest
}
=
this
.
props
;
if
(
!
crops
||
crops
.
length
===
0
)
{
if
(
!
crops
||
crops
.
length
===
0
)
{
loadCrops
();
loadCrops
();
...
@@ -60,8 +59,6 @@ class App extends React.Component<IAppProps, any> {
...
@@ -60,8 +59,6 @@ class App extends React.Component<IAppProps, any> {
initMyList
();
initMyList
();
initMyMaps
();
initMyMaps
();
refreshIso3Decodings
(
lang
);
refreshIso3Decodings
(
lang
);
console
.
log
(
'
Loading software version
'
);
checkSoftwareVersion
();
}
}
public
componentDidUpdate
(
prevProps
:
IAppProps
)
{
public
componentDidUpdate
(
prevProps
:
IAppProps
)
{
...
@@ -114,7 +111,6 @@ const mapDispatchToProps = (dispatch) => bindActionCreators({
...
@@ -114,7 +111,6 @@ const mapDispatchToProps = (dispatch) => bindActionCreators({
loadCrops
,
loadCrops
,
initMyList
,
initMyList
,
serverInfoRequest
,
serverInfoRequest
,
checkSoftwareVersion
,
loadIso3Decodings
,
loadIso3Decodings
,
initMyMaps
,
initMyMaps
,
refreshIso3Decodings
,
refreshIso3Decodings
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment