fix dem bugs
This commit is contained in:
@@ -242,10 +242,11 @@
|
||||
showTodoModal = true;
|
||||
}
|
||||
|
||||
function openCreateChore() {
|
||||
assignModal = { t: null as any, memberId: members[0]?.id || '' };
|
||||
function openCreateChore(memberId = '') {
|
||||
const target = memberId || members[0]?.id || '';
|
||||
assignModal = { t: null as any, memberId: target };
|
||||
assignStep = 1;
|
||||
assignTarget = 'member';
|
||||
assignTarget = target ? 'member' : 'shared';
|
||||
assignName = '';
|
||||
assignDescription = '';
|
||||
assignColor = '';
|
||||
@@ -390,12 +391,14 @@
|
||||
{/if}
|
||||
|
||||
<CardGrid stackTablet>
|
||||
<!-- Templates Section (at top, like bonuses) -->
|
||||
<Card cols={3}>
|
||||
<!-- Templates Section (at top, like bonuses). Desktop only — dragging
|
||||
needs pointer precision; below desktop each member card gets its own
|
||||
"Create a chore" button instead. -->
|
||||
<Card cols={3} class="chores-templates-card">
|
||||
<div class="template-section">
|
||||
<div class="template-header">
|
||||
<h3>Templates — Drag to assign</h3>
|
||||
<button class="add-inline" onclick={openCreateChore}>+ Create a chore</button>
|
||||
<button class="add-inline" onclick={() => openCreateChore()}>+ Create a chore</button>
|
||||
</div>
|
||||
<div class="template-list">
|
||||
{#each templates as t}
|
||||
@@ -607,6 +610,9 @@
|
||||
{#if assignedForMember(m.id).length === 0}
|
||||
<p class="empty">Drop a chore here</p>
|
||||
{/if}
|
||||
<button class="add-inline accordion-add" onclick={() => openCreateChore(m.id)}
|
||||
>+ Create a chore</button
|
||||
>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -690,6 +696,9 @@
|
||||
{:else}
|
||||
<p class="empty">Drop a chore here</p>
|
||||
{/each}
|
||||
<button class="add-inline accordion-add" onclick={() => openCreateChore('')}
|
||||
>+ Create a chore</button
|
||||
>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -1193,6 +1202,12 @@
|
||||
.template-list .card.template {
|
||||
width: 100%;
|
||||
}
|
||||
/* Below desktop there's no drag-and-drop — hide the templates strip
|
||||
(each member/shared card carries its own Create button instead).
|
||||
:global because the class lives on the Card component's root. */
|
||||
:global(.chores-templates-card) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
/* ── Kanban (3 columns, scrolls via Card scrollX) ── */
|
||||
.kanban {
|
||||
@@ -1266,6 +1281,7 @@
|
||||
.add-inline:hover {
|
||||
border-color: #6366f1;
|
||||
background: #eef2ff;
|
||||
color: #4338ca;
|
||||
}
|
||||
|
||||
.card {
|
||||
|
||||
Reference in New Issue
Block a user