Skip to content

Commit

Permalink
[#5145] Fix only get first cron job and remove red color
Browse files Browse the repository at this point in the history
  • Loading branch information
ifirmawan committed Nov 9, 2022
1 parent 98e758a commit 77dab6d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions akvo/rsr/spa/app/modules/program/store/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ export default (state = [], action) => {
const _subContributors = cb?.contributors?.map((subCb) => {
// child contributor
const jobs = results?.filter((rs) => rs?.period === subCb?.periodId)
const firstJob = jobs?.shift() || {} // assuming the latest update is in first order.
const latestJob = jobs?.pop() || {}
return ({
...subCb,
job: firstJob
job: latestJob
})
})
const allStatus = uniq(_subContributors?.map((subC) => subC?.job?.status))?.filter((status) => status)
const job = parentJobs?.length
? parentJobs.shift()
? parentJobs.pop()
: getSummaryStatus(allStatus)
return ({
...cb,
Expand Down
4 changes: 2 additions & 2 deletions akvo/rsr/spa/app/modules/results-admin/TobeReported.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import SimpleMarkdown from 'simple-markdown'
import SVGInline from 'react-svg-inline'
import classNames from 'classnames'
import moment from 'moment'
import { isEmpty } from 'lodash'
import { isEmpty, orderBy } from 'lodash'
import { connect } from 'react-redux'

import './TobeReported.scss'
Expand Down Expand Up @@ -152,7 +152,7 @@ const TobeReported = ({
grid={{ column: 1 }}
itemLayout="vertical"
className="tobe-reported"
dataSource={updates}
dataSource={orderBy(updates, ['indicator.title'], ['asc'])}
renderItem={(item, ix) => {
const iKey = item?.id || `${item?.indicator?.id}0${ix}`
const updateClass = item?.statusDisplay?.toLowerCase()?.replace(/\s+/g, '-')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { useState } from 'react'
import { connect } from 'react-redux'
import { Icon, Collapse, notification, Typography, Row, Col } from 'antd'
import { useTranslation } from 'react-i18next'
import { cloneDeep, isEmpty } from 'lodash'
import { cloneDeep, isEmpty, orderBy } from 'lodash'
import classNames from 'classnames'
import SimpleMarkdown from 'simple-markdown'

Expand Down
4 changes: 2 additions & 2 deletions akvo/rsr/spa/app/utils/common.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
$primaryColor: #43998f;
$colors: #A278B5, rgb(182, 74, 106), #DB3056, #FF6464, #FFB99A, #CFB495, #8BBABB, #6C7B95, #32AFA9, #A4D4AE, #698474, #889E81, #839b60, #F8B195, #F67280, #C06C84, #6C5B7B, #6C7261, #E6A157, #EB8242, #C9753D, #e9a5cf, #ca80b1, #F0CF85, #381460, #933B5B, #FF6F5E, #40BFC1, #9ACEFF, #12CAD6, #0FABBC, #151965, #32407B, #515585, #46B5D1, #E9EA77, #FFD369, #a99260, #c38a6d, #d8d13e;
$colors: #560764, #905E96, #D58BDD, #FF99D7, #FFB99A, #CFB495, #8BBABB, #6C7B95, #32AFA9, #A4D4AE, #698474, #889E81, #839b60, #F8B195, #F67280, #C06C84, #6C5B7B, #6C7261, #E6A157, #EB8242, #C9753D, #e9a5cf, #ca80b1, #F0CF85, #381460, #933B5B, #FF6F5E, #40BFC1, #9ACEFF, #12CAD6, #0FABBC, #151965, #32407B, #515585, #46B5D1, #E9EA77, #FFD369, #a99260, #c38a6d, #d8d13e;
$g1colors: #8E936D, #598381, #177E89, #08605F, #75894a, #5C80BC, #4D5061, #30323D, #E8C547, #A2AD59;
$g2colors: #0c7b93, #00a8cc, #ddba01, #b0a160, #434e52, #5b8c85, #8d6e63, #ea9085, #92cad3, #6d9499;
$g3colors: #2c498b, #35619b, #3e78ab, #4891bb, #52aacb, #6abdd0, #8ecccc, #b4dbcb, #8ca26f;
$g4colors: #B40815, #CC0516, #EC1817, #F9532F, #FF9B58, #D62A0B;
$g4colors: #393E46, #6D9886, #F2E7D5, #062C30, #FF9B58, #05595B;
$submitted: rgb(24, 144, 255);
$error50: #FEF3F2;
$error700: #B42318;
Expand Down

0 comments on commit 77dab6d

Please sign in to comment.