Skip to content

Commit

Permalink
Merge pull request #158 from dtom90/develop
Browse files Browse the repository at this point in the history
AddIntervalDropdown Changes
  • Loading branch information
dtom90 committed Sep 24, 2020
2 parents d0b281c + 78554a7 commit d19ba4f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 19 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "devtrack",
"version": "0.9.1",
"version": "0.9.2",
"private": true,
"description": "An app for productive developers",
"author": {
Expand Down
16 changes: 5 additions & 11 deletions src/components/ActivityView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,12 @@
class="border"
>
<!-- Dropdown to add interval manually -->
<DropdownAddInterval
v-if="manualInput"
<AddIntervalDropdown
:task-id="taskId"
/>

<!-- Log -->
<div :id="manualInput ? 'task-log' : ''">
<div id="task-log">
<Log
v-for="([day, dayActivity]) in dailyActivity"
:key="day"
Expand All @@ -122,7 +121,7 @@
<script>
import Log from './Log'
import ActivityChart from './ActivityChart'
import DropdownAddInterval from './DropdownAddInterval'
import AddIntervalDropdown from './dropdowns/AddIntervalDropdown'
import { mapState, mapMutations } from 'vuex'
import time from '../lib/time'
Expand All @@ -131,7 +130,7 @@ export default {
components: {
ActivityChart,
DropdownAddInterval,
AddIntervalDropdown,
Log
},
Expand All @@ -150,10 +149,6 @@ export default {
type: String,
default: ''
},
manualInput: {
type: Boolean,
default: false
},
log: {
type: Array,
default: function () {
Expand Down Expand Up @@ -225,7 +220,7 @@ export default {
}
const dailyActivityArray = Object.entries(dailyActivity)
dailyActivityArray.sort(([day1, activity1], [day2, activity2]) => this.stringToMs(day2) - this.stringToMs(day1))
dailyActivityArray.sort(([day1], [day2]) => this.stringToMs(day2) - this.stringToMs(day1))
return dailyActivityArray
},
Expand Down Expand Up @@ -368,7 +363,6 @@ function weeklyChartData (that) {
font-weight: 500;
}
/*noinspection CssUnusedSymbol*/
#task-log {
margin-top: -38px;
}
Expand Down
1 change: 0 additions & 1 deletion src/components/SelectedTask.vue
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@
:task-id="task.id"
:element="task.name"
:log="task.log"
:manual-input="!task.completed"
/>
<br>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
>
<b-dropdown
ref="dropdown"
right
variant="light"
toggle-class="text-decoration-none"
no-caret
Expand Down Expand Up @@ -51,12 +52,12 @@

<script>
import { mapMutations } from 'vuex'
import time from '../lib/time'
import time from '../../lib/time'
import VueCtkDateTimePicker from 'vue-ctk-date-time-picker'
import 'vue-ctk-date-time-picker/dist/vue-ctk-date-time-picker.css'
export default {
name: 'DropdownAddInterval',
name: 'AddIntervalDropdown',
components: {
VueCtkDateTimePicker
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/AllActivityModal.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ describe('AllActivityModal', () => {
element: 'All Activity',
log,
id: 'allActivity',
taskId: null,
manualInput: false
taskId: null
})

})
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/SelectedTask.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ describe('SelectedTask', () => {
log: task.log,
id: 'taskActivity',
element: task.name,
manualInput: true,
taskId: task.id
})

Expand Down Expand Up @@ -135,7 +134,6 @@ describe('SelectedTask', () => {
log: task.log,
id: 'taskActivity',
element: task.name,
manualInput: false,
taskId: task.id
})

Expand Down

0 comments on commit d19ba4f

Please sign in to comment.