Skip to content

Commit 99ffed6

Browse files
authored
Merge pull request #141 from traPtitech/refactor/files-structure
chore : utilityディレクトリの整理
2 parents 72c9938 + 159eb0a commit 99ffed6

File tree

16 files changed

+19
-18
lines changed

16 files changed

+19
-18
lines changed

src/components/event/EventDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { computed } from 'vue'
33
import MarkdownPreview from '@/components/markdown/MarkdownPreview.vue'
44
import UserIcon from '@/components/generic/UserIcon.vue'
5-
import { getTimeStringNoPad } from '@/utility/date'
5+
import { getTimeStringNoPad } from '@/utils/date'
66
import type { components } from '@/api/schema'
77
import { useCampStore } from '@/store'
88
import { useRoute } from 'vue-router'

src/components/event/EventEditor.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { apiClient } from '@/api/apiClient'
88
import { useCampStore, useUserStore } from '@/store'
99
import { useRoute } from 'vue-router'
1010
import type { components } from '@/api/schema'
11-
import { dateToText, dateDiffInDaysJST, getJSTDate } from '@/utility/date'
12-
import { EVENT_COLORS } from '@/utility/eventColors'
11+
import { dateToText, dateDiffInDaysJST, getJSTDate } from '@/utils/date'
12+
import { EVENT_COLORS } from '@/components/event/utils/eventColors'
1313
import { useMutation, useQueryClient } from '@tanstack/vue-query'
1414
1515
import { qk } from '@/api/queries/keys'

src/components/event/EventEditorSettings.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<script setup lang="ts">
22
import { ref, computed, watch, onMounted } from 'vue'
3-
import { getDayStringNoPad } from '@/utility/date'
3+
import { getDayStringNoPad } from '@/utils/date'
44
import EventTimePick from './EventTimePick.vue'
55
import EventDeleteDialog from './EventDeleteDialog.vue'
66
import type { components } from '@/api/schema'
77
import { apiClient } from '@/api/apiClient'
88
import UserIcon from '@/components/generic/UserIcon.vue'
9-
import { EVENT_COLORS } from '@/utility/eventColors'
9+
import { EVENT_COLORS } from '@/components/event/utils/eventColors'
1010
1111
type DurationEvent = components['schemas']['DurationEventResponse']
1212
type Camp = components['schemas']['CampResponse']

src/components/event/ScheduleContent.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<script setup lang="ts">
22
import { computed, ref } from 'vue'
3-
import { getDayStringNoPad } from '@/utility/date'
4-
import { getLayout } from '@/utility/eventLayout'
3+
import { getDayStringNoPad } from '@/utils/date'
4+
import { getLayout } from '@/components/event/utils/eventLayout'
55
import EventBlock from '@/components/event/EventBlock.vue'
66
import type { components } from '@/api/schema'
7-
import type { EventGroup, DurationEventPos } from '@/utility/eventGrid'
7+
import type { EventGroup, DurationEventPos } from '@/components/event/utils/eventGrid'
88
import EventEditor from './EventEditor.vue'
99
import ScheduleRow from './ScheduleRow.vue'
1010

src/components/event/ScheduleRow.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
22
import EventDialog from './EventDialog.vue'
3-
import type { GridRow } from '@/utility/eventGrid'
4-
import { getTimeStringNoPad } from '@/utility/date'
3+
import type { GridRow } from '@/components/event/utils/eventGrid'
4+
import { getTimeStringNoPad } from '@/utils/date'
55
import { computed } from 'vue'
66
77
const props = defineProps<{
File renamed without changes.

src/utility/eventGrid.ts renamed to src/components/event/utils/eventGrid.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { components } from '@/api/schema'
2-
import { getStartTime, getEndTime } from '@/utility/eventLib'
2+
import { getStartTime, getEndTime } from '@/components/event/utils/eventLib'
33

44
type MomentEvent = components['schemas']['MomentEventResponse']
55
type DurationEvent = components['schemas']['DurationEventResponse']

src/utility/eventLayout.ts renamed to src/components/event/utils/eventLayout.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { components } from '@/api/schema'
2-
import { DayEventGrid, type EventGroup } from '@/utility/eventGrid'
3-
import { getStartTime, getEndTime } from '@/utility/eventLib'
4-
import { getJSTDate } from '@/utility/date'
2+
import { DayEventGrid, type EventGroup } from '@/components/event/utils/eventGrid'
3+
import { getStartTime, getEndTime } from '@/components/event/utils/eventLib'
4+
import { getJSTDate } from '@/utils/date'
55

66
type Camp = components['schemas']['CampResponse']
77
type MomentEvent = components['schemas']['MomentEventResponse']

src/utility/eventLib.ts renamed to src/components/event/utils/eventLib.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ export const getStartTime = (event: CampEvent) => {
1010
export const getEndTime = (event: CampEvent) => {
1111
return event.type === 'moment' ? new Date(event.time) : new Date(event.timeEnd)
1212
}
13+

src/components/information/QuestionGroupEditor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import QuestionEditField from '@/components/information/QuestionEditField.vue'
44
import MarkdownPreview from '@/components/markdown/MarkdownPreview.vue'
55
import AnswersDialog from '@/components/information/AnswersDialog.vue'
66
import { computed } from 'vue'
7-
import { getDayString } from '@/utility/date'
7+
import { getDayString } from '@/utils/date'
88
99
type QuestionGroup = components['schemas']['QuestionGroupResponse']
1010
type Question = components['schemas']['QuestionResponse']

0 commit comments

Comments
 (0)