diff --git a/README.md b/README.md index bc9eb53..b246205 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Simple app to tracking work time. It uses [TeamWork API](https://developer.teamw - [x] search tasks - [x] modify description of timers - [x] display total duration of current timers -- [ ] recent tasks - allows to quick run timer on the recent tasks (e.g. from the last week) +- [x] recent tasks - allows to quick run timer on the recent tasks (e.g. from the last week) ## Challenges CORS - if you want to use this application directly in your browser, you must enable cross-origin requests. The easiest way to do this is to build your proxy server. I used [CORS Anywhere](https://github.com/Rob--W/cors-anywhere) project. My proxy server is on heroku and is available [here](https://time-tracker-cors-anywhere.herokuapp.com/). diff --git a/package.json b/package.json index 55af7e7..9ffebff 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "core-js": "^3.6.4", "date-fns": "^2.12.0", "lodash.debounce": "^4.0.8", + "lodash.uniqby": "^4.7.0", "register-service-worker": "^1.6.2", "vue": "^2.6.11", "vue-router": "^3.1.5", diff --git a/src/components/RecentTasks.vue b/src/components/RecentTasks.vue new file mode 100644 index 0000000..3ac85fa --- /dev/null +++ b/src/components/RecentTasks.vue @@ -0,0 +1,70 @@ + + + + + diff --git a/src/services/time.js b/src/services/time.js deleted file mode 100644 index fe98b10..0000000 --- a/src/services/time.js +++ /dev/null @@ -1,13 +0,0 @@ -import request, { METHODS } from "./request"; - -export function allTimeEntries() { - return request({ - url: `/projects/api/v3/time.json`, - method: METHODS.GET, - params: { - include: "projects,tasks,tasks.tasklists,tasks.parentTasks", - pageSize: 1000, - orderMode: "desc" - } - }); -} diff --git a/src/services/timeTracking.js b/src/services/timeTracking.js index 2ab041c..1137dc1 100644 --- a/src/services/timeTracking.js +++ b/src/services/timeTracking.js @@ -53,3 +53,15 @@ export function remove({ id }) { method: METHODS.DELETE }); } + +export function allTimeEntries() { + return request({ + url: `/projects/api/v3/time.json`, + method: METHODS.GET, + params: { + include: "projects,tasks,tasks.tasklists,tasks.parentTasks", + pageSize: 1000, + orderMode: "desc" + } + }); +} diff --git a/src/styles/main.scss b/src/styles/main.scss index 435ea3e..13603b7 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -34,4 +34,12 @@ $dropdown-content-max-height: 75vh; // Import Bulma and Buefy styles @import "~bulma"; -@import "~buefy/src/scss/buefy"; \ No newline at end of file +@import "~buefy/src/scss/buefy"; + +.fullscreen-modal { + .modal-close { + &:before, &:after{ + background: $black; + } + } +} \ No newline at end of file diff --git a/src/views/Tracker.vue b/src/views/Tracker.vue index 0fd32b8..fdacb00 100644 --- a/src/views/Tracker.vue +++ b/src/views/Tracker.vue @@ -15,16 +15,22 @@