39 lines
832 B
Plaintext
39 lines
832 B
Plaintext
package components
|
|
|
|
import "github.com/LazyBachelor/LazyPM/pkg/web/components/base"
|
|
|
|
type AssigneeFormProps struct {
|
|
PatchAction string
|
|
Assignee string
|
|
}
|
|
|
|
templ AssigneeForm(props AssigneeFormProps) {
|
|
<form
|
|
hx-patch={ props.PatchAction }
|
|
hx-swap="innerHTML"
|
|
>
|
|
<div class="form-control">
|
|
<label class="label cursor-pointer justify-start gap-2">
|
|
<input
|
|
type="checkbox"
|
|
name="assign_me"
|
|
value="me"
|
|
class="checkbox checkbox-primary"
|
|
if props.Assignee == "Me" {
|
|
checked
|
|
}
|
|
/>
|
|
<span class="label-text">Assign this issue to me</span>
|
|
</label>
|
|
if props.Assignee != "" {
|
|
<p class="text-xs mt-1 opacity-70">
|
|
Current assignee: { props.Assignee }
|
|
</p>
|
|
}
|
|
</div>
|
|
<button class="btn btn-primary mt-4" type="submit">
|
|
Update Assignee
|
|
</button>
|
|
</form>
|
|
}
|