forked from trent_larson/crowd-funder-for-time-pwa
fix the most recent contacts to show correctly on the gift details screen
This commit is contained in:
@@ -521,19 +521,10 @@ export default class EntityGrid extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Validate entities prop for people
|
// Validate entities prop for people
|
||||||
if (this.entityType === "people" && !this.entities) {
|
if (this.entityType === "people") {
|
||||||
logger.error(
|
if (!this.entities) {
|
||||||
"EntityGrid: entities prop is required when entityType is 'people'",
|
logger.error(
|
||||||
);
|
"EntityGrid: entities prop or allContacts prop is required when entityType is 'people'",
|
||||||
if (this.notify) {
|
|
||||||
this.notify(
|
|
||||||
{
|
|
||||||
group: "alert",
|
|
||||||
type: "danger",
|
|
||||||
title: "Error",
|
|
||||||
text: "Contacts data is required but not provided.",
|
|
||||||
},
|
|
||||||
TIMEOUTS.SHORT,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ export type ContactMethod = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type Contact = {
|
export type Contact = {
|
||||||
|
// id is a property in most contacts, but besides sorting from DB we don't need it
|
||||||
|
|
||||||
//
|
//
|
||||||
// When adding a property:
|
// When adding a property:
|
||||||
// - Consider whether it should be added when exporting & sharing contacts, eg. DataExportSection
|
// - Consider whether it should be added when exporting & sharing contacts, eg. DataExportSection
|
||||||
|
|||||||
@@ -428,10 +428,8 @@ export default class GiftedDetails extends Vue {
|
|||||||
const activeIdentity = await (this as any).$getActiveIdentity();
|
const activeIdentity = await (this as any).$getActiveIdentity();
|
||||||
this.activeDid = activeIdentity.activeDid || "";
|
this.activeDid = activeIdentity.activeDid || "";
|
||||||
|
|
||||||
const dbContacts = await this.$dbQuery("SELECT * FROM contacts");
|
this.allContacts = await this.$contactsByDateAdded();
|
||||||
this.allContacts = this.$mapQueryResultToValues(
|
|
||||||
dbContacts,
|
|
||||||
) as unknown as Contact[];
|
|
||||||
this.allMyDids = await retrieveAccountDids();
|
this.allMyDids = await retrieveAccountDids();
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
|||||||
Reference in New Issue
Block a user