feat: add archive item options (#122)

Add archive option feature. Archived items can only be seen on the items page when including archived is selected. Archived items are excluded from the count and from other views
This commit is contained in:
Hayden 2022-10-31 23:30:42 -08:00 committed by GitHub
parent c722495fdd
commit a886fa86ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 325 additions and 38 deletions

View file

@ -11,6 +11,7 @@ import {
import { AttachmentTypes, PaginationResult } from "../types/non-generated";
export type ItemsQuery = {
includeArchived?: boolean;
page?: number;
pageSize?: number;
locations?: string[];

View file

@ -63,6 +63,7 @@ export interface ItemField {
}
export interface ItemOut {
archived: boolean;
attachments: ItemAttachment[];
children: ItemSummary[];
createdAt: Date;
@ -107,6 +108,7 @@ export interface ItemOut {
}
export interface ItemSummary {
archived: boolean;
createdAt: Date;
description: string;
id: string;
@ -121,6 +123,7 @@ export interface ItemSummary {
}
export interface ItemUpdate {
archived: boolean;
description: string;
fields: ItemField[];
id: string;