added keys and types to the note api for adding and loading notes and chats

This commit is contained in:
csawatzky 2026-03-17 14:46:45 -06:00
parent a2ac900f3e
commit 63bba4f74e
11 changed files with 49 additions and 31 deletions

View file

@ -496,7 +496,7 @@ export default function Bin(props: Props) {
</Tabs>
<TabPanelMine value={value} index={0}>
<Box height={isMobile || displayMobile ? "80vh" : "90vh"} padding={2}>
<Chat objectKey={binID} type={pond.NoteType.NOTE_TYPE_BIN} />
<Chat parent={binID} parentType={"bin"} type={pond.NoteType.NOTE_TYPE_BIN} />
</Box>
</TabPanelMine>
<TabPanelMine value={value} index={1}>

View file

@ -281,7 +281,7 @@ export default function Contract() {
{contract.name()} - Notes
</Typography>
<Card style={{ padding: 10, marginTop: 15 }}>
<Chat objectKey={contract.key()} type={pond.NoteType.NOTE_TYPE_CONTRACT} />
<Chat parent={contract.key()} parentType={"contract"} type={pond.NoteType.NOTE_TYPE_CONTRACT} />
</Card>
</TabPanelMine>
</React.Fragment>
@ -316,7 +316,7 @@ export default function Contract() {
<Box padding={2}>
<Typography>Notes</Typography>
<Card style={{ padding: 10 }}>
<Chat objectKey={contract.key()} type={pond.NoteType.NOTE_TYPE_CONTRACT} />
<Chat parent={contract.key()} parentType={"contract"} type={pond.NoteType.NOTE_TYPE_CONTRACT} />
</Card>
</Box>
</Drawer>

View file

@ -400,7 +400,7 @@ export default function Gate(props: Props) {
<Box padding={2}>
<Typography>Notes</Typography>
<Card style={{ padding: 10 }}>
<Chat objectKey={gate.key} type={pond.NoteType.NOTE_TYPE_GATE} />
<Chat parent={gate.key} type={pond.NoteType.NOTE_TYPE_GATE} parentType={"gate"} />
</Card>
</Box>
</Drawer>
@ -465,7 +465,7 @@ export default function Gate(props: Props) {
{/* tab for notes on mobile and the map drawer */}
<TabPanelMine value={displayTab} index={1}>
<Card style={{ padding: 10 }}>
<Chat objectKey={gate.key} type={pond.NoteType.NOTE_TYPE_GATE} />
<Chat parent={gate.key} parentType={"gate"} type={pond.NoteType.NOTE_TYPE_GATE} />
</Card>
</TabPanelMine>
{/* drawer is for displaying notes on desktop */}

View file

@ -251,7 +251,7 @@ export default function TeamPage() {
<Grid2 container spacing={1}>
<Grid2 size={{ xs: 12, sm: 4 }}>
<Card className={ isMobile ? classes.cardMobile : classes.card }>
<Chat objectKey={team.key()} type={pond.NoteType.NOTE_TYPE_TEAM}/>
<Chat parent={team.key()} type={pond.NoteType.NOTE_TYPE_TEAM} parentType={"team"}/>
</Card>
</Grid2>
<Grid2 size={{ xs: 12, sm: 4 }}>