File tree 1 file changed +13
-8
lines changed
web/src/routes/[projectId]/result
1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change 24
24
message: {res .message }
25
25
{:else }
26
26
{@const result = res .data }
27
+ {@const matches = Object .entries (result .participantsOnEachRole )}
27
28
<div class =" hm-block" >
28
29
<h2 class ="text-xl" >{result .projectName }</h2 >
29
30
<p >{result .projectDesc }</p >
30
31
</div >
31
- {#each Object .entries (result .participantsOnEachRole ) as [_roleId, role]}
32
- <div class =" hm-block" >
33
- <h2 class ="text-xl" >{role .role_name }</h2 >
34
- {#each role .participants as participant }
35
- <p >{participant .participant_name } さん</p >
36
- {/each }
37
- </div >
38
- {/each }
32
+ {#if matches .length }
33
+ {#each matches as [_roleId, role]}
34
+ <div class =" hm-block" >
35
+ <h2 class ="text-xl" >{role .role_name }</h2 >
36
+ {#each role .participants as participant }
37
+ <p >{participant .participant_name } さん</p >
38
+ {/each }
39
+ </div >
40
+ {/each }
41
+ {:else }
42
+ 役職のある人はいません。
43
+ {/if }
39
44
{/if }
40
45
{/await }
41
46
<div class =" flex justify-end" >
You can’t perform that action at this time.
0 commit comments