Select first the project with tracked hours
This commit is contained in:
parent
1aecaec925
commit
198b92f914
@ -6,8 +6,8 @@
|
|||||||
- run `yarn start:chrome` or `yarn start:firefox` (`yarn start` is an alias for `yarn start:chrome`)
|
- run `yarn start:chrome` or `yarn start:firefox` (`yarn start` is an alias for `yarn start:chrome`)
|
||||||
- load extension into browser:
|
- load extension into browser:
|
||||||
- Chrome: visit `chrome://extensions` and load unpacked extension from `build/chrome`
|
- Chrome: visit `chrome://extensions` and load unpacked extension from `build/chrome`
|
||||||
- Firefox: visit `about:debugging` and load temporary Add-on from `build/firefox`
|
- Firefox: visit `about:debugging` and load temporary Add-on from `build/firefox/manifest.json`
|
||||||
- reload browser extension after change
|
- the browser should automatically pick up your changes but from time to time it may be useful to reload the extension
|
||||||
|
|
||||||
## Production Build
|
## Production Build
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ import UnknownError from "components/Errors/UnknownError"
|
|||||||
import Header from "./shared/Header"
|
import Header from "./shared/Header"
|
||||||
import { head } from "lodash"
|
import { head } from "lodash"
|
||||||
import TimeInputParser from "utils/TimeInputParser"
|
import TimeInputParser from "utils/TimeInputParser"
|
||||||
|
import {get} from "lodash/fp";
|
||||||
|
|
||||||
@observer
|
@observer
|
||||||
class App extends Component {
|
class App extends Component {
|
||||||
@ -68,11 +69,12 @@ class App extends Component {
|
|||||||
|
|
||||||
@computed get project() {
|
@computed get project() {
|
||||||
const { service, projects, lastProjectId } = this.props
|
const { service, projects, lastProjectId } = this.props
|
||||||
|
|
||||||
return (
|
return (
|
||||||
findProjectByValue(this.changeset.assignment_id)(projects) ||
|
findProjectByValue(this.changeset.assignment_id)(projects) ||
|
||||||
findProjectByIdentifier(service?.projectId)(projects) ||
|
|
||||||
findProjectByValue(Number(lastProjectId))(projects) ||
|
findProjectByValue(Number(lastProjectId))(projects) ||
|
||||||
head(projects)
|
findProjectByIdentifier(service?.projectId)(projects) ||
|
||||||
|
head(projects.flatMap(get("options")))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user