Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.

Commit

Permalink
Fix synchronize immediatelly
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Strnadek committed Nov 12, 2017
1 parent c27396b commit c8d28af
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
4 changes: 1 addition & 3 deletions app/components/TrackDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ class TrackDialog extends Component<Props, State> {
handleTracking = () => {
const currentTime = moment().unix();


const {
project,
issue,
Expand Down Expand Up @@ -234,7 +233,6 @@ class TrackDialog extends Component<Props, State> {
return true;
}


render() {
const projects: Array<{value: string, label: string}> = this.props.projects.toJSON();
const issues: Array<{value: number, label: string}> = [];
Expand Down Expand Up @@ -316,7 +314,7 @@ class TrackDialog extends Component<Props, State> {

<Checkbox label="Filter assigned to me" value={this.state.filterMine} id="assigned_to_id" onChange={this.assignedToChange} />

<Checkbox label="Sync immediately" value={this.state.syncNow} id="sync_now" onChange={this.syncNowChange} />
<Checkbox label="Synchronize immediately" value={this.state.syncNow} id="sync_now" onChange={this.syncNowChange} />

<div className={styles.tracking}>
<div className={styles.tracking_time}>
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "redmine-tracker",
"productName": "Redmine Tracker",
"version": "1.0.0-rc2",
"version": "1.0.0-rc3",
"description": "Redmine time tracker.",
"main": "./main.prod.js",
"author": {
Expand Down
15 changes: 7 additions & 8 deletions app/utils/IpcApiMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,17 +162,16 @@ export default class IpcApiMain {
let info = {};

// Fetch information from data
const entry = data.entry;
const endTime = data.endTime;
const entry = {
...data.entry,
endTime: data.endTime,
id: null
};

let id = null;

try {
id = await redmineClient.createEntry({
...entry,
endTime
});

id = await redmineClient.createEntry(entry);
info.id = id;
} catch (e) {
info = {
Expand All @@ -182,7 +181,7 @@ export default class IpcApiMain {

this
.store
.dispatch(stopEntry(endTime, id));
.dispatch(stopEntry(data.endTime, id));

IpcApiMain.sendToAll(actions.SYNC_CURRENT_ENTRY_RESPONSE, info);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "redmine-tracker",
"productName": "RedmineTracker",
"version": "1.0.0-rc2",
"version": "1.0.0-rc3",
"description": "Redmine time tracker.",
"author": {
"name": "Jan Strnadek",
Expand Down

0 comments on commit c8d28af

Please sign in to comment.