File tree 2 files changed +11
-18
lines changed
web/src/routes/[projectId]
2 files changed +11
-18
lines changed Original file line number Diff line number Diff line change 195
195
プロジェクトの読み込みに失敗しました
196
196
{/await }
197
197
</div >
198
- {#await data .participants }
198
+ {#await Promise . all ([ data .project , data . participants ]) }
199
199
<span >
200
200
<span class =" loading loading-xl loading-bars" ></span >
201
- 提出した人を読込中 ...
201
+ 読込中 ...
202
202
</span >
203
- {:then participants }
203
+ {:then [ project , participants ] }
204
204
<ul class =" list bg-base-100 rounded-box shadow-md" >
205
205
<li class =" p-4 pb-2 text-xs opacity-60 tracking-wide" >提出した人</li >
206
206
211
211
>
212
212
提出者がいません
213
213
</div >
214
- {#each participants as participant }
215
- {#if participant .roles_count !== null }
216
- <div class =" text-xs opacity-60 list-col-grow border-b-base-200" >
217
- {participant .roles_count } roles
218
- </div >
219
- {/if }
220
- {#if participant .is_admin }
221
- <span class =" badge badge-soft badge-info" > admin! </span >
222
- {/if }
223
- {/each }
224
214
</li >
225
215
{:else }
226
216
{#each participants as participant }
227
217
<li class =" list-row" >
228
- <div
229
- class =" text-xs font-semibold opacity-60 list-col-grow border-b-base-200"
230
- >
218
+ <div class =" text-xs font-semibold opacity-60 border-b-base-200" >
231
219
{participant .name }
232
220
</div >
221
+ <div class =" text-xs opacity-60 list-col-grow border-b-base-200" >
222
+ {#if ! project .ok || project .data .project .multiple_roles }
223
+ wants {participant .roles_count } roles
224
+ {/if }
225
+ </div >
233
226
{#if participant .is_admin }
234
- <span class =" badge badge-soft badge-info" > admin! </span >
227
+ <span class =" badge badge-soft badge-info" > 管理者 </span >
235
228
{/if }
236
229
</li >
237
230
{/each }
Original file line number Diff line number Diff line change 12
12
13
13
// TODO: ローディング中の UI を追加
14
14
let participantName = $state <string >(data .prev ?.name ?? " " );
15
- let rolesCount = $state <number >(data .prev ?.roles_count ?? 1 );
15
+ let rolesCount = $state <number >(data .prev ?.roles_count || 1 ); // including 0
16
16
let ratings = $state (
17
17
data .roles .map ((role ) => {
18
18
const score = role .prev ?? undefined ;
You can’t perform that action at this time.
0 commit comments