From 2792d25305dc8b10f48bd07233d42fc6e24ca393 Mon Sep 17 00:00:00 2001 From: mehm8128 Date: Fri, 26 Apr 2024 18:02:43 +0900 Subject: [PATCH] =?UTF-8?q?=E7=94=B3=E8=AB=8B=E8=A9=B3=E7=B4=B0=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=81=AE=E4=B8=8A=E3=81=A8=E5=8F=B3=E3=81=AE?= =?UTF-8?q?=E8=A6=8B=E3=81=9F=E7=9B=AE=E3=82=92=E3=81=84=E3=81=84=E6=84=9F?= =?UTF-8?q?=E3=81=98=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../requestDetail/RequestAmount.vue | 4 +- src/components/requestDetail/RequestGroup.vue | 52 +++--------- src/components/requestDetail/RequestLogs.vue | 1 + .../requestDetail/RequestSidebar.vue | 15 ++++ src/components/requestDetail/RequestTags.vue | 44 ++--------- .../requestDetail/RequestTarget.vue | 32 ++++++++ .../requestDetail/RequestTargets.vue | 60 +++----------- src/components/shared/TagsGroup.vue | 27 +++---- src/pages/RequestDetailPage.vue | 79 ++++--------------- 9 files changed, 110 insertions(+), 204 deletions(-) create mode 100644 src/components/requestDetail/RequestSidebar.vue create mode 100644 src/components/requestDetail/RequestTarget.vue diff --git a/src/components/requestDetail/RequestAmount.vue b/src/components/requestDetail/RequestAmount.vue index 297088c8..c6c26d1a 100644 --- a/src/components/requestDetail/RequestAmount.vue +++ b/src/components/requestDetail/RequestAmount.vue @@ -14,7 +14,7 @@ const totalAmount = computed( diff --git a/src/components/requestDetail/RequestGroup.vue b/src/components/requestDetail/RequestGroup.vue index e6d635d2..7378a132 100644 --- a/src/components/requestDetail/RequestGroup.vue +++ b/src/components/requestDetail/RequestGroup.vue @@ -1,63 +1,33 @@ diff --git a/src/components/requestDetail/RequestLogs.vue b/src/components/requestDetail/RequestLogs.vue index 2adc0919..3ef74036 100644 --- a/src/components/requestDetail/RequestLogs.vue +++ b/src/components/requestDetail/RequestLogs.vue @@ -50,6 +50,7 @@ const logs = computed((): Log[] => { + diff --git a/src/components/requestDetail/RequestSidebar.vue b/src/components/requestDetail/RequestSidebar.vue new file mode 100644 index 00000000..c12709d6 --- /dev/null +++ b/src/components/requestDetail/RequestSidebar.vue @@ -0,0 +1,15 @@ + + + diff --git a/src/components/requestDetail/RequestTags.vue b/src/components/requestDetail/RequestTags.vue index c5b91309..ecd5ba1f 100644 --- a/src/components/requestDetail/RequestTags.vue +++ b/src/components/requestDetail/RequestTags.vue @@ -5,54 +5,26 @@ import { useRequestDetailStore } from '/@/stores/requestDetail' import { useUserStore } from '/@/stores/user' import EditButton from '/@/components/shared/EditButton.vue' -import InputSelectTagWithCreation from '/@/components/shared/InputSelectTagWithCreation.vue' -import SimpleButton from '/@/components/shared/SimpleButton.vue' import TagsGroup from '/@/components/shared/TagsGroup.vue' -import type { EditMode } from '/@/pages/composables/useRequestDetail' - -interface Props { - isEditMode: boolean -} - -const props = defineProps() -const emit = defineEmits<{ - (e: 'changeEditMode', value: EditMode): void -}>() const userStore = useUserStore() const requestDetailStore = useRequestDetailStore() const { isRequestCreator } = requestDetailStore -const { request, editedValue } = storeToRefs(requestDetailStore) +const { request } = storeToRefs(requestDetailStore) const { me } = storeToRefs(userStore) const hasAuthority = isRequestCreator(me.value) - -const handleComplete = () => { - emit('changeEditMode', '') -} diff --git a/src/components/requestDetail/RequestTarget.vue b/src/components/requestDetail/RequestTarget.vue new file mode 100644 index 00000000..15e25c39 --- /dev/null +++ b/src/components/requestDetail/RequestTarget.vue @@ -0,0 +1,32 @@ + + + diff --git a/src/components/requestDetail/RequestTargets.vue b/src/components/requestDetail/RequestTargets.vue index c128a312..acba514c 100644 --- a/src/components/requestDetail/RequestTargets.vue +++ b/src/components/requestDetail/RequestTargets.vue @@ -1,68 +1,32 @@ diff --git a/src/components/shared/TagsGroup.vue b/src/components/shared/TagsGroup.vue index 86947102..d3945f55 100644 --- a/src/components/shared/TagsGroup.vue +++ b/src/components/shared/TagsGroup.vue @@ -3,26 +3,23 @@ import type { Tag } from '/@/features/tag/model' interface Props { tags: Tag[] - limit?: number //1-indexedでlimitを指定 + limit?: number } -const props = withDefaults(defineProps(), { limit: 20 }) +const props = withDefaults(defineProps(), { limit: 4 }) -const slicedTags = props.tags.slice( - 0, - !(props.tags.length > props.limit) ? props.tags.length : props.limit -) +const slicedTags = props.tags.slice(0, props.limit) const tagToolTip = props.tags.map(tag => tag.name).join(', ') diff --git a/src/pages/RequestDetailPage.vue b/src/pages/RequestDetailPage.vue index b5ddc4ad..b6b80961 100644 --- a/src/pages/RequestDetailPage.vue +++ b/src/pages/RequestDetailPage.vue @@ -1,5 +1,4 @@ - -