Skip to content

Commit

Permalink
refactor: move dateHelperVCalendar.js from common to frontend
Browse files Browse the repository at this point in the history
That nobody has the idea to reuse it in pdf or print.
We only need to calculate a timestamp representing the DateTime
received in UTC as the same DateTime in the local timezone.
  • Loading branch information
BacLuc committed Dec 27, 2023
1 parent 4a16d35 commit 9337caf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions frontend/src/components/program/picasso/Picasso.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,7 @@ import { useDragAndDropNew } from './useDragAndDropNew.js'
import { useDragAndDropReminder } from './useDragAndDropReminder.js'
import { apiStore as api } from '@/plugins/store'
import mergeListeners from '@/helpers/mergeListeners.js'
import {
timestampToUtcString,
utcStringToTimestamp,
} from '@/common/helpers/dateHelperVCalendar.js'
import { timestampToUtcString, utcStringToTimestamp } from './dateHelperVCalendar.js'
import DayResponsibles from './DayResponsibles.vue'
import { ONE_DAY_IN_MILLISECONDS } from '@/helpers/vCalendarDragAndDrop.js'
import { errorToMultiLineToast } from '@/components/toast/toasts'
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/program/picasso/PicassoEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
import { ref, toRefs } from 'vue'
import DialogActivityEdit from '../DialogActivityEdit.vue'
import campCollaborationDisplayName from '@/common/helpers/campCollaborationDisplayName.js'
import { timestampToUtcString } from '@/common/helpers/dateHelperVCalendar.js'
import { timestampToUtcString } from './dateHelperVCalendar.js'
import { dateHelperUTCFormatted } from '@/mixins/dateHelperUTCFormatted.js'
import { scheduleEntryRoute } from '@/router.js'
import router from '@/router.js'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dayjs from './dayjs.js'
import dayjs from '@/common/helpers/dayjs.js'

// converts a timestamp (local timezone) into ISO String format (UTC timezone)
function timestampToUtcString(timestamp) {
Expand Down

0 comments on commit 9337caf

Please sign in to comment.