Skip to content

Commit 8ef9f07

Browse files
committed
updates
1 parent bf8811e commit 8ef9f07

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

components/suitedash/actions/create-company/create-company.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default {
4545
createPrimaryContactIfNotExists: {
4646
type: "boolean",
4747
label: "Create Primary Contact If Not Exists",
48-
description: "Create a Primary Contact with all provided data if the email does not exists. Default: `true`",
48+
description: "Create a Primary Contact with all provided data if the email does not exist. Default: `true`",
4949
optional: true,
5050
default: true,
5151
},
@@ -67,7 +67,7 @@ export default {
6767
first_name: this.firstName,
6868
last_name: this.lastName,
6969
email: this.email,
70-
send_welcome_email: this.send_welcome_email,
70+
send_welcome_email: this.sendWelcomeEmail,
7171
create_primary_contact_if_not_exists: this.createPrimaryContactIfNotExists,
7272
prevent_individual_mode: this.preventIndividualMode,
7373
},

components/suitedash/sources/new-company/new-company.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ export default {
1414
return this.suitedash.listCompanies;
1515
},
1616
getSummary(company) {
17-
return `New Company: ${company.name}`;
17+
if (!company || typeof company !== "object") {
18+
return "New Company: Unknown";
19+
}
20+
const name = company.name || "Unnamed";
21+
return `New Company: ${name}`;
1822
},
1923
},
2024
};

components/suitedash/sources/new-contact/new-contact.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ export default {
1414
return this.suitedash.listContacts;
1515
},
1616
getSummary(contact) {
17-
return `New Contact: ${contact.first_name} ${contact.last_name}`;
17+
const firstName = contact.first_name || "";
18+
const lastName = contact.last_name || "";
19+
const fullName = [
20+
firstName,
21+
lastName,
22+
].filter(Boolean).join(" ") || "Unknown";
23+
return `New Contact: ${fullName}`;
1824
},
1925
},
2026
};

components/suitedash/suitedash.app.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export default {
111111
for (const item of data) {
112112
yield item;
113113
}
114-
hasMore = params.page === pagination.totalPages;
114+
hasMore = params.page < pagination.totalPages;
115115
params.page++;
116116
} while (hasMore);
117117
},

0 commit comments

Comments
 (0)