Show message history in contact review page.
Some checks failed
/ golint (push) Failing after 9s

This commit is contained in:
Eli Ribble 2026-05-23 01:33:25 +00:00
parent e8f899d098
commit 7eb0ad1221
No known key found for this signature in database
4 changed files with 30 additions and 27 deletions

View file

@ -78,28 +78,38 @@ export class Bounds {
}
export interface ContactOptions {
emails?: string[];
messages?: Message[];
name?: string;
phones?: Phone[];
uri?: string;
}
export class Contact {
emails: string[];
messages: Message[];
name: string;
phones: Phone[];
uri: string;
constructor(options?: ContactOptions) {
this.emails = options?.emails ?? [];
this.messages = options?.messages ?? [];
this.name = options?.name ?? "";
this.phones = options?.phones ?? [];
this.uri = options?.uri ?? "";
}
static fromJSON(json: ContactDTO): Contact {
return new Contact(json);
return new Contact({
emails: json.emails,
messages: json.messages.map((m: MessageDTO) => Message.fromJSON(m)),
name: json.name,
phones: json.phones,
uri: json.uri,
});
}
}
export interface ContactDTO {
name: string;
emails: string[];
messages: MessageDTO[];
name: string;
phones: Phone[];
uri: string;
}
@ -715,9 +725,9 @@ export interface Site {
leads: Lead[];
notes: string;
organization_id: number;
owner?: Contact;
owner?: ContactSimple;
parcel: Parcel;
resident?: Contact;
resident?: ContactSimple;
resident_owned: boolean;
tags: Map<string, string>;
version: number;
@ -725,7 +735,7 @@ export interface Site {
export interface ReviewTaskPool {
condition: string;
location: Location;
owner: Contact;
owner: ContactSimple;
site: Site;
}
export interface ReviewTask {