diff --git a/opentech/static_src/src/app/src/components/FullScreenLoadingPanel/styles.scss b/opentech/static_src/src/app/src/components/FullScreenLoadingPanel/styles.scss index 6b07ea07363de008686d02d4cd71372b6e859929..83d45f74caf53adb31732cddf005bbb432419439 100644 --- a/opentech/static_src/src/app/src/components/FullScreenLoadingPanel/styles.scss +++ b/opentech/static_src/src/app/src/components/FullScreenLoadingPanel/styles.scss @@ -4,6 +4,10 @@ left: 0; right: 0; bottom: 0; - top: var(--header-admin-height); + top: 0; z-index: 30; + + @include media-query(laptop-short) { + top: var(--header-admin-height); + } } diff --git a/opentech/static_src/src/app/src/components/GroupedListing/styles.scss b/opentech/static_src/src/app/src/components/GroupedListing/styles.scss index a7721d242f024784d1ce331da6908a7e007b97a2..db881d048ddc84149bf98a527dde386dd036aba3 100644 --- a/opentech/static_src/src/app/src/components/GroupedListing/styles.scss +++ b/opentech/static_src/src/app/src/components/GroupedListing/styles.scss @@ -1,9 +1,16 @@ .grouped-listing { - height: calc(100vh - var(--header-admin-height)); - + height: 100vh; display: flex; flex-direction: column; + @include media-query(tablet-landscape) { + height: calc(100vh - var(--header-admin-height)); + } + + @include media-query(laptop-short) { + height: 100vh; + } + &__dropdown { @include submission-list-item; height: $listing-header-height; diff --git a/opentech/static_src/src/app/src/components/Listing/style.scss b/opentech/static_src/src/app/src/components/Listing/style.scss index 04c9dde7bd58dffeb47ed1ed9e2e0017143641be..a55970b210f10f581f15dc0b3fb76ba1d459eab8 100644 --- a/opentech/static_src/src/app/src/components/Listing/style.scss +++ b/opentech/static_src/src/app/src/components/Listing/style.scss @@ -1,5 +1,5 @@ .listing { - overflow-y: scroll; + overflow-y: overlay; flex-grow: 3; @include target-ie11 { diff --git a/opentech/static_src/src/app/src/components/SubmissionDisplay/styles.scss b/opentech/static_src/src/app/src/components/SubmissionDisplay/styles.scss index 7ad72c885e015d6c5ce5f0fd1eba44d70f5db652..fd9cee4344330e9c523aa1d9cdcc3ce57c20bdd6 100644 --- a/opentech/static_src/src/app/src/components/SubmissionDisplay/styles.scss +++ b/opentech/static_src/src/app/src/components/SubmissionDisplay/styles.scss @@ -1,4 +1,13 @@ .application-display { - @include column-scrolling; + height: 100vh; + overflow-y: scroll; padding: 20px; + + @include media-query(tablet-landscape) { + height: calc(100vh - var(--header-admin-height) - #{$listing-header-height}); + } + + @include media-query(laptop-short) { + height: calc(100vh - #{$listing-header-height}); + } } diff --git a/opentech/static_src/src/app/src/components/Tabber/styles.scss b/opentech/static_src/src/app/src/components/Tabber/styles.scss index 9eb77e0362dcf3dc8910c59e087bcd34a09d9c76..bbb0652a76a4736bfaf93c76235a72a57ef3ecaa 100644 --- a/opentech/static_src/src/app/src/components/Tabber/styles.scss +++ b/opentech/static_src/src/app/src/components/Tabber/styles.scss @@ -54,6 +54,14 @@ .tab { display: flex; flex-direction: column; - height: calc(100vh - var(--header-admin-height) - #{$listing-header-height}); overflow-y: auto; + height: calc(100vh - #{$listing-header-height}); + + @include media-query(tablet-landscape) { + height: calc(100vh - var(--header-admin-height) - #{$listing-header-height}); + } + + @include media-query(laptop-short) { + height: calc(100vh - #{$listing-header-height}); + } } diff --git a/opentech/static_src/src/app/src/containers/ByRoundListing.js b/opentech/static_src/src/app/src/containers/ByRoundListing.js index e9aaebf1a01c572f974340cda1a4852998c6a425..e9d1778f64b742a3b74f09c4ecde5e96577d234b 100644 --- a/opentech/static_src/src/app/src/containers/ByRoundListing.js +++ b/opentech/static_src/src/app/src/containers/ByRoundListing.js @@ -58,8 +58,9 @@ class ByRoundListing extends React.Component { prepareOrder = () => { const { isLoading, rounds, submissions } = this.props; - if (isLoading) + if (isLoading || Object.entries(rounds).length === 0) { return [] + } return submissions.sort((a, b) => a.id - b.id ) .map(submission => submission.round) .filter((round, index, arr) => arr.indexOf(round) === index) diff --git a/opentech/static_src/src/app/src/containers/ByStatusListing.js b/opentech/static_src/src/app/src/containers/ByStatusListing.js index 3f2b7f683dc2703b7138ec186f954f940dfab6c0..573090c9877cf299dcf9da650f294f8ecda6ac69 100644 --- a/opentech/static_src/src/app/src/containers/ByStatusListing.js +++ b/opentech/static_src/src/app/src/containers/ByStatusListing.js @@ -53,7 +53,7 @@ class ByStatusListing extends React.Component { } prepareOrder(round) { - if ( !round ) { return []} + if ( !round || !round.workflow) { return []} const slugify = value => value.toLowerCase().replace(/\s/g, '-') const workflow = round.workflow const order = workflow.reduce((accumulator, {display, value}, idx) => { diff --git a/opentech/static_src/src/app/src/containers/CurrentSubmissionDisplay.js b/opentech/static_src/src/app/src/containers/CurrentSubmissionDisplay.js index 246514a8125164534e93b2c491f715c68028923a..20e3607bfc955ad5958002d2e0fe289404b11d43 100644 --- a/opentech/static_src/src/app/src/containers/CurrentSubmissionDisplay.js +++ b/opentech/static_src/src/app/src/containers/CurrentSubmissionDisplay.js @@ -9,6 +9,7 @@ import { getCurrentSubmissionID, } from '@selectors/submissions' import SubmissionDisplay from '@components/SubmissionDisplay'; +import LoadingPanel from '@components/LoadingPanel' import MessagesList from '@components/MessagesList' import MessageBar from '@components/MessageBar' @@ -66,7 +67,7 @@ const CurrentSubmissionDisplay = props => { } if ( !localSubmission ) { - return <p>Loading</p> + return <LoadingPanel /> } const renderUpdatedMessage = () =>{ diff --git a/opentech/static_src/src/app/src/redux/actions/submissions.js b/opentech/static_src/src/app/src/redux/actions/submissions.js index 6ba68106ae1e4bfdc73ab228d762e359b6d56a0a..e5e05f18d3673b289900ec023431bb00bf2d2e1b 100644 --- a/opentech/static_src/src/app/src/redux/actions/submissions.js +++ b/opentech/static_src/src/app/src/redux/actions/submissions.js @@ -63,10 +63,14 @@ export const FAIL_EXECUTING_SUBMISSION_ACTION = 'FAIL_EXECUTING_SUBMISSION_ACTIO // Notes export const ADD_NOTE_FOR_SUBMISSION = 'ADD_NOTE_FOR_SUBMISSION'; -export const setCurrentSubmissionRound = id => ({ - type: SET_CURRENT_SUBMISSION_ROUND, - id, -}); +export const setCurrentSubmissionRound = (id) => (dispatch) => { + dispatch({ + type: SET_CURRENT_SUBMISSION_ROUND, + id, + }); + + return dispatch(loadCurrentRoundSubmissions()); +}; export const loadSubmissionFromURL = (params) => (dispatch, getState) => { @@ -202,10 +206,12 @@ export const setCurrentStatuses = (statuses) => (dispatch) => { throw new Error("Statuses have to be an array of statuses"); } - return dispatch({ + dispatch({ type: SET_CURRENT_STATUSES, statuses, }); + + return dispatch(loadSubmissionsForCurrentStatus()); }; diff --git a/opentech/static_src/src/app/src/redux/reducers/rounds.js b/opentech/static_src/src/app/src/redux/reducers/rounds.js index fd7117a1978323b9fbd9b384497ddbf92746ae20..b57da6cfb11196c9b390f269e167a7cb66da61ce 100644 --- a/opentech/static_src/src/app/src/redux/reducers/rounds.js +++ b/opentech/static_src/src/app/src/redux/reducers/rounds.js @@ -39,7 +39,7 @@ function submissions(state=submissionsDefaultState, action) { } -function round(state={id: null, submissions: submissionsDefaultState, isFetching: false, workflow: []}, action) { +function round(state={id: null, submissions: submissionsDefaultState, isFetching: false}, action) { switch(action.type) { case UPDATE_SUBMISSIONS_BY_ROUND: case FAIL_LOADING_SUBMISSIONS_BY_ROUND: diff --git a/opentech/static_src/src/app/src/redux/reducers/statuses.js b/opentech/static_src/src/app/src/redux/reducers/statuses.js index 107f40721ed14563c23f100a83f19e0a9bb989e9..2ca81052f274ba34b316f205309feb1bcc52732b 100644 --- a/opentech/static_src/src/app/src/redux/reducers/statuses.js +++ b/opentech/static_src/src/app/src/redux/reducers/statuses.js @@ -47,7 +47,7 @@ function submissionsByStatuses(state = {}, action) { } -function statusFetchingState(state = {isFetching: true, isError: false}, action) { +function statusFetchingState(state = {isFetching: false, isError: false}, action) { switch (action.type) { case FAIL_LOADING_BY_STATUSES: return {