activities

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package activities handles the compliance activity register.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() modregistry.Module

func RequireActivityUpdateOwn

func RequireActivityUpdateOwn(q db.Querier, e *authz.Engine) func(http.Handler) http.Handler

RequireActivityUpdateOwn loads the activity and enforces update_own policy with participant context before handing control to the route handler.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(q db.Querier, engine *authz.Engine) *Handler

func (*Handler) Complete

func (h *Handler) Complete(w http.ResponseWriter, r *http.Request)

Complete marks an activity as completed, updates measure staleness, and auto-creates the next instance for recurring activities.

func (*Handler) Create

func (h *Handler) Create(w http.ResponseWriter, r *http.Request)

Create handles the activity creation form submission.

func (*Handler) Delete

func (h *Handler) Delete(w http.ResponseWriter, r *http.Request)

Delete removes an activity.

func (*Handler) Edit

func (h *Handler) Edit(w http.ResponseWriter, r *http.Request)

Edit renders the activity edit form.

func (*Handler) List

func (h *Handler) List(w http.ResponseWriter, r *http.Request)

List renders activities with server-side filtering and load-more pagination.

func (*Handler) New

func (h *Handler) New(w http.ResponseWriter, r *http.Request)

New renders the activity creation form.

func (*Handler) Reopen

func (h *Handler) Reopen(w http.ResponseWriter, r *http.Request)

Reopen resets a completed activity back to planned.

func (*Handler) Show

func (h *Handler) Show(w http.ResponseWriter, r *http.Request)

Show renders the activity detail page.

func (*Handler) StartProgress

func (h *Handler) StartProgress(w http.ResponseWriter, r *http.Request)

StartProgress moves an activity to in_progress.

func (*Handler) Update

func (h *Handler) Update(w http.ResponseWriter, r *http.Request)

Update handles the activity edit form submission.

Directories

Path Synopsis
templ: version: v0.3.1020
templ: version: v0.3.1020

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL