mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-20 13:29:37 +02:00
feat: add num_cities field to RegionSerializer, update RegionCard to display city count, and enhance CSRF token handling
This commit is contained in:
parent
abe870506f
commit
22790ae7c0
6 changed files with 30 additions and 7 deletions
|
@ -54,7 +54,14 @@
|
|||
>
|
||||
<div class="card-body">
|
||||
<h2 class="card-title overflow-ellipsis">{region.name}</h2>
|
||||
<p>{region.id}</p>
|
||||
<div>
|
||||
<div class="badge badge-primary">
|
||||
<p>{region.id}</p>
|
||||
</div>
|
||||
<div class="badge badge-neutral-300">
|
||||
<p>{region.num_cities} {$t('worldtravel.cities')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-actions justify-end">
|
||||
<!-- <button class="btn btn-info" on:click={moreInfo}>More Info</button> -->
|
||||
{#if !visited}
|
||||
|
@ -65,9 +72,11 @@
|
|||
{#if visited}
|
||||
<button class="btn btn-warning" on:click={removeVisit}>{$t('adventures.remove')}</button>
|
||||
{/if}
|
||||
<button class="btn btn-neutral-300" on:click={goToCity}
|
||||
>{$t('worldtravel.view_cities')}</button
|
||||
>
|
||||
{#if region.num_cities > 0}
|
||||
<button class="btn btn-neutral-300" on:click={goToCity}
|
||||
>{$t('worldtravel.view_cities')}</button
|
||||
>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue