Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/request page のデザインを調整 #190

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e02cf7b
✨ フィルターを一時的に削除
reiroop Jun 17, 2024
1f924e8
🎨 cssのmargin/padding周りの整理
reiroop Jun 17, 2024
eb8ada8
🎨 PaginationBarのmargin topを削除
reiroop Jun 17, 2024
c4553da
✨ 申請一覧、申請を作成の位置を調整
reiroop Jun 17, 2024
173d27c
💄 feat: RequestItemに外側のpaddingを追加
reiroop Jun 28, 2024
6e90d1a
💄 feat: ユーザーアイコンをRequestItemに追加
reiroop Jun 29, 2024
0d51698
Merge branch 'main' into feat/request_page
reiroop Jun 29, 2024
5c56f87
🎨 fix: request.createdBy のメソッド名の変更に対応
reiroop Jun 29, 2024
8e6fb5c
💄 feat: 金額のフォントやサイズを調整
reiroop Jun 29, 2024
262ca91
💄 feat: ユーザーアイコン・ユーザー名のUIを改善
reiroop Jun 29, 2024
b59aa7d
💄 feat: RequestItem の右側に縦の gap を追加
reiroop Jun 29, 2024
c1950af
feat: RequestPageの横のmarginをautoに
reiroop Aug 20, 2024
9efa78b
💄 refactor: TagsGroup.vueのレスポンシブ対応
reiroop Aug 22, 2024
4d584e7
💄 refactor: TagsGroup.vueのレスポンシブ対応
reiroop Aug 23, 2024
9a47567
💄 refactor: RequestItem.vueのレスポンシブ対応
reiroop Aug 28, 2024
297bfb0
💄 fix: RequestItem.vueのStatusChipの右のgapを調整
reiroop Aug 28, 2024
b16a491
Merge branch 'main' into feat/request_page
reiroop Aug 28, 2024
23fba99
💄 refactor: RequestsPageの左右に空白を追加
reiroop Aug 28, 2024
ce2ba5f
refactor: Update UserIcon size in RequestItem.vue
reiroop Sep 7, 2024
069c31c
Merge branch 'main' into feat/request_page
reiroop Sep 23, 2024
bd37bf7
Merge branch 'main' into feat/request_page
reiroop Sep 24, 2024
e8ce69e
Merge branch 'main' into feat/request_page
reiroop Sep 24, 2024
34ee49b
Merge branch 'main' into feat/request_page
reiroop Sep 24, 2024
bb1b295
Merge branch 'main' into feat/request_page
reiroop Sep 24, 2024
fc1c413
💄 fix: アイコンサイズを修正、paddingをレスポンシブに
reiroop Sep 27, 2024
002fec0
💄 feat: 横方向のpadding, gapをレスポンシブに
reiroop Sep 28, 2024
b52424e
Merge branch 'main' into feat/request_page
reiroop Sep 28, 2024
da9ea33
Merge branch 'main' into feat/request_page
reiroop Nov 1, 2024
9290595
run npm i
reiroop Nov 1, 2024
4f3b0a9
run npm audit fix --force
reiroop Nov 1, 2024
7a2cdbd
run npm audit fix --force
reiroop Nov 1, 2024
c004b07
💄 feat: UserIcon.vueが円形になっていなかった問題を修正、RequestsPage.vueでホバー時に正常に背景色が変わ…
reiroop Nov 1, 2024
7df08f0
💄 fix: StatusChip.vueを円形に
reiroop Nov 1, 2024
51be5dc
Merge branch 'main' into feat/request_page
reiroop Nov 2, 2024
7a30e70
Merge branch 'main' into feat/request_page
reiroop Nov 5, 2024
d88de14
Merge branch 'main' into feat/request_page
reiroop Nov 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 21 additions & 13 deletions src/components/requests/RequestItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { formatDate } from '/@/lib/date'
import StatusChip from '/@/components/shared/StatusChip.vue'
import TagsGroup from '/@/components/shared/TagsGroup.vue'
import type { Request } from '/@/features/request/model'
import UserIcon from '/@/components/shared/UserIcon.vue'

interface Props {
request: Request
Expand All @@ -28,23 +29,30 @@ const totalAmount = computed(
</script>

<template>
<RouterLink class="flex p-2" :to="'/requests/' + request.id">
<div class="mx-2 flex items-center justify-center">
<RouterLink class="flex px-3 sm:px-6 py-4 gap-2 sm:gap-5" :to="'/requests/' + request.id">
<div class="flex items-start justify-center">
<StatusChip :status="request.status" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

status chip

  • 完全な丸になってなさそう
  • Figmaで中身塗りつぶさないやつ使ってるので、そっちの方がいいかもです
    image

</div>
<div class="flex-grow">
<span class="text-xl">{{ request.title }}</span>
<div class="mt-2">
<TagsGroup :tags="request.tags" />
<div class="flex flex-grow flex-wrap">
<div class="flex-grow">
<span class="text-xl">{{ request.title }}</span>
<div class="mt-2">
<TagsGroup :tags="request.tags" />
</div>
</div>
</div>
<div>
<div class="flex gap-4">
<span v-if="request.group"> グループ:{{ request.group.name }} </span>
<span>申請者:{{ userMap[request.createdBy] }}</span>
<span>申請日:{{ formattedDate }}</span>
<div class="flex flex-col gap-2">
<div class="flex items-center justify-end gap-x-4 flex-wrap">
<div class="flex items-center gap-1">
<UserIcon class="max-w-7" :name="userMap[request.createdBy]" />
reiroop marked this conversation as resolved.
Show resolved Hide resolved
<span>{{ userMap[request.createdBy] }}</span>
</div>
<span v-if="request.group"> {{ request.group.name }} </span>
<span>{{ formattedDate }}</span>
</div>
<div class="text-right font-bold font-sans text-2xl">
{{ totalAmount }}円
</div>
</div>
<div class="text-right text-3xl">{{ totalAmount }}円</div>
</div>
</RouterLink>
</template>
16 changes: 8 additions & 8 deletions src/components/shared/StatusChip.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<script lang="ts" setup>
import {
HandThumbUpIcon,
CheckCircleIcon,
ChevronDownIcon,
CloudArrowUpIcon,
ExclamationTriangleIcon,
XCircleIcon,
CheckCircleIcon,
ChevronDownIcon
} from '@heroicons/vue/24/solid'
import { computed } from 'vue'
HandThumbUpIcon,
XCircleIcon
} from '@heroicons/vue/24/solid';
import { computed } from 'vue';

import type { RequestStatus } from '/@/features/requestStatus/model'
import type { RequestStatus } from '/@/features/requestStatus/model';

interface Props {
status: RequestStatus
Expand Down Expand Up @@ -59,7 +59,7 @@ const backgroundColor = computed(() => (status: RequestStatus) => {

<template>
<div
:class="`inline flex items-center rounded-3xl px-3 py-2 gap-2 text-white ${backgroundColor(
:class="`inline flex items-center rounded-3xl px-2 py-2 gap-2 text-white ${backgroundColor(
status
)}${hasMenu ? ' cursor-pointer' : ''}`"
:title="statusToJpn(status)">
Expand Down
2 changes: 1 addition & 1 deletion src/components/shared/UserIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defineProps<{
<template>
<img
:alt="name"
class="rounded-1/2 h-full p-1"
class="rounded-full h-full p-1"
:src="`https://q.trap.jp/api/v3/public/icon/${name}`"
:title="name" />
</template>
55 changes: 27 additions & 28 deletions src/pages/RequestsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { useUserStore } from '/@/stores/user'

import { toPage } from '/@/lib/parseQueryParams'

import RequestFilters from '/@/components/requests/RequestFilters.vue'
import RequestItem from '/@/components/requests/RequestItem.vue'
import PaginationBar from '/@/components/shared/PaginationBar.vue'
import SimpleButton from '/@/components/shared/SimpleButton.vue'
Expand Down Expand Up @@ -60,35 +59,35 @@ watch(
</script>

<template>
<div class="min-w-[640px] mx-auto flex w-2/3 flex-col px-12 pt-8">
<div class="relative flex w-full items-center justify-center pb-8">
<h1 class="text-center text-3xl">申請一覧</h1>
<div class="absolute right-0">
<RouterLink to="/requests/new">
<SimpleButton font-size="lg" padding="md">
申請の新規作成
</SimpleButton>
</RouterLink>
<div class="max-w-6xl mx-auto p-3 sm:p-8 flex flex-col gap-7">
<div class="flex flex-col">
<div class="relative flex w-full items-center justify-start gap-7">
mehm8128 marked this conversation as resolved.
Show resolved Hide resolved
<h1 class="text-center text-3xl">申請一覧</h1>
<div>
<RouterLink to="/requests/new">
<SimpleButton font-size="lg" padding="md">
申請を作成
</SimpleButton>
</RouterLink>
</div>
</div>
</div>
</div>
<RequestFilters />
<div class="min-h-[480px]">
<div class="mx-auto mt-4 w-3/4 rounded-xl shadow">
<ul>
<li
v-for="request in sliceRequestsAt(page, 7)"
:key="request.id"
class="hover:bg-hover-secondary first:hover:rounded-t-xl last:hover:rounded-b-xl">
<RequestItem :request="request" />
</li>
</ul>
<div class="min-h-120">
<div class="mx-auto rounded-xl shadow">
<ul>
<li
v-for="request in sliceRequestsAt(page, 7)"
:key="request.id"
class="hover:bg-hover-secondary">
<RequestItem :request="request" />
</li>
</ul>
</div>
</div>
<PaginationBar
v-if="requests.length > 0"
:current-page="page"
path="/requests"
:total-pages="Math.ceil(requests.length / 7)" />
</div>
<PaginationBar
v-if="requests.length > 0"
class="mt-4"
:current-page="page"
path="/requests"
:total-pages="Math.ceil(requests.length / 7)" />
</template>