Skip to content

Commit

Permalink
problem: can't change problem parent
Browse files Browse the repository at this point in the history
  • Loading branch information
gsovereignty committed Jan 23, 2024
1 parent 77bd256 commit 5c25105
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/components/novoproblems/ProblemView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@
Tab,
Tabs,
Tag,
TextInput,
Tile,
UnorderedList
} from "carbon-components-svelte";
import { Category, Chat, Lightning, XAxis, YAxis } from "carbon-icons-svelte";
import { Category, Chat, Edit, Lightning, XAxis, YAxis } from "carbon-icons-svelte";
import { derived } from "svelte/store";
import { rootProblem } from "../../settings";
import CommentUser from "../comments/CommentUser.svelte";
Expand Down Expand Up @@ -157,7 +158,7 @@
}
);
function PublishModification() {
function PublishModification() {no
PublishProblem(problem, getParents(problem)!)
.then((e) => {
console.log(e);
Expand All @@ -167,6 +168,9 @@
throw new Error(x);
});
}
let newParent = ""
let edit = false;
</script>

<!-- <Breadcrumb noTrailingSlash>
Expand Down Expand Up @@ -389,7 +393,12 @@
}`
);
}}><YAxis /> {parent.Title}</span
>
>{#if $currentUserCanModify}<Button on:click={()=>{edit=true}} kind="ghost" icon={Edit}></Button>{/if}
{#if edit} <TextInput bind:value={newParent} /><Button on:click={()=>{
problem.Parents = new Set()
problem.Parents.add(newParent)
PublishModification()
}}>Go</Button>{/if}

<!-- <Tag style="display:inline-block;float:right;" size="sm"
><ParentChild />{p.Children.size}</Tag> -->
Expand Down

0 comments on commit 5c25105

Please sign in to comment.