feat: archive a project instead of deleting it
The owner archives a finished project (archiveProject, POST
/projects/{project}/archive) and brings it back (unarchive). While
archived it stays readable, managers still read its rules and webhooks,
but no command changes it: contributing and managing checks refuse with
422, votes and public proposals too, and automations do not run. The web
shows a read-only notice on every page of it (with «Desarchivar» for the
owner), hides what edits, marks it on the home page and lists it last.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -693,6 +693,32 @@ function idFrom(name: string): string {
|
||||
}
|
||||
|
||||
@if (facade.isOwner() && facade.project(); as project) {
|
||||
<section
|
||||
class="ts-panel ts-block ts-visibility"
|
||||
aria-labelledby="archive-title"
|
||||
>
|
||||
<div>
|
||||
<h3 id="archive-title">Archivar el proyecto</h3>
|
||||
<p class="ts-muted">
|
||||
@if (project.archivedAt) {
|
||||
Archivado: se puede ver todo, pero nadie puede cambiar nada
|
||||
hasta que lo desarchives.
|
||||
} @else {
|
||||
Para un proyecto terminado: queda todo a la vista (tablero,
|
||||
tickets, historia, estadísticas) y en solo lectura. Se puede
|
||||
desarchivar cuando quieras.
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="ts-secondary"
|
||||
(click)="facade.setArchived(!project.archivedAt)"
|
||||
>
|
||||
{{ project.archivedAt ? 'Desarchivar' : 'Archivar' }}
|
||||
</button>
|
||||
</section>
|
||||
|
||||
<section
|
||||
class="ts-panel ts-block ts-danger"
|
||||
aria-labelledby="danger-title"
|
||||
|
||||
Reference in New Issue
Block a user