diff --git a/frontend/src/api/cards.ts b/frontend/src/api/cards.ts index d2f4522..fd70cb9 100644 --- a/frontend/src/api/cards.ts +++ b/frontend/src/api/cards.ts @@ -26,10 +26,27 @@ export async function newCardApi(projectId: number): Promise { } export async function deleteCardApi(cardID: number): Promise { - const response = await api.delete(`/v2/cards/${cardID}`); + const response = await api.delete(`/v1/cards/${cardID}`); if (response.status !== status.NoContent) { processError(response, 'Failed to delete card'); return Promise.reject(); } } + +export async function updateCardTagApi( + cardID: number, + tagID: number, + option_id: number, + value: string +): Promise { + const response = await api.put(`/v1/cards/${cardID}/tags/${tagID}`, { + option_id: option_id, + value: value + }); + + if (response.status !== status.NoContent) { + processError(response, 'Failed to update card tag'); + return Promise.reject(); + } +} diff --git a/frontend/src/components/card.svelte b/frontend/src/components/card.svelte index 716d3cc..6745d04 100644 --- a/frontend/src/components/card.svelte +++ b/frontend/src/components/card.svelte @@ -1,16 +1,18 @@ +
currentDraggedCard.set(card)} on:click={() => ($currentModalCard = card.id)} role="button" on:keydown={(e) => { diff --git a/frontend/src/components/column.svelte b/frontend/src/components/column.svelte index 1fbc267..efca83b 100644 --- a/frontend/src/components/column.svelte +++ b/frontend/src/components/column.svelte @@ -1,15 +1,76 @@ -
-

{title}

+
{ + e.preventDefault(); + }} +> +

{option.value}

    - {#each cards as card} + {#each columnCards as card} {/each}
@@ -21,7 +82,8 @@ } .column { - width: 200px; margin: 0 10px; + width: 200px; + height: 100%; } diff --git a/frontend/src/components/project.svelte b/frontend/src/components/project.svelte index fd75df6..3bcf9f6 100644 --- a/frontend/src/components/project.svelte +++ b/frontend/src/components/project.svelte @@ -1,11 +1,10 @@