Moves editing into forms. Every doc has a page now. BUG: state not refreshed after mutation
This commit is contained in:
@@ -48,12 +48,32 @@ export type DocumentData<K extends string, V> = {
|
||||
export type Document = RecordModel & {
|
||||
id: DocumentId;
|
||||
campaign: CampaignId;
|
||||
data: {};
|
||||
data: {
|
||||
[K in DocumentType]?: unknown;
|
||||
};
|
||||
// These two are not in Pocketbase's types, but they seem to always be present
|
||||
created: ISO8601Date;
|
||||
updated: ISO8601Date;
|
||||
};
|
||||
|
||||
export type DocumentType =
|
||||
| "location"
|
||||
| "monster"
|
||||
| "npc"
|
||||
| "scene"
|
||||
| "secret"
|
||||
| "session"
|
||||
| "treasure";
|
||||
|
||||
export type AnyDocument =
|
||||
| Location
|
||||
| Monster
|
||||
| Npc
|
||||
| Scene
|
||||
| Secret
|
||||
| Session
|
||||
| Treasure;
|
||||
|
||||
/** Locations **/
|
||||
|
||||
export type Location = Document &
|
||||
|
||||
Reference in New Issue
Block a user