Skip to content

Commit 4623e26

Browse files
author
lucas
committedJun 27, 2024
remove leadConvertedForm
1 parent 27e4cf5 commit 4623e26

File tree

3 files changed

+211
-99
lines changed

3 files changed

+211
-99
lines changed
 

‎packages/drafts-realm/SaleHub/bcbf2e7d-16ad-41e0-95a4-03dc988809e5.json

+74-11
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,55 @@
3232
"leadSource": "Advertisement",
3333
"industry": "Agriculture"
3434
},
35+
"accountForm": {
36+
"accountName": "Mr. Law Bom Bom",
37+
"accountAlias": null,
38+
"description": null,
39+
"contactInformation": {
40+
"salutation": "Mr.",
41+
"firstName": "Law",
42+
"lastName": "Bom Bom",
43+
"address": {
44+
"streetAddress": null,
45+
"city": null,
46+
"region": null,
47+
"postalCode": null,
48+
"poBoxNumber": null,
49+
"country": null
50+
},
51+
"phoneNumber": {
52+
"country": null,
53+
"area": null,
54+
"number": null
55+
},
56+
"email": {
57+
"value": null
58+
},
59+
"website": {
60+
"value": null
61+
}
62+
},
63+
"billingAddress": {
64+
"streetAddress": null,
65+
"city": null,
66+
"region": null,
67+
"postalCode": null,
68+
"poBoxNumber": null,
69+
"country": null
70+
},
71+
"numberOfEmployees": null
72+
},
3573
"contactForm": {
74+
"title": null,
3675
"name": {
3776
"salutation": "Mr.",
3877
"firstName": "Law",
3978
"lastName": "Bom Bom"
4079
},
41-
"company": null,
42-
"title": null,
43-
"website": null,
44-
"description": null,
45-
"leadStatus": null,
46-
"phone": null,
4780
"email": null,
81+
"phone": null,
82+
"fax": null,
83+
"department": null,
4884
"addressInfo": {
4985
"address": null,
5086
"zip": null,
@@ -53,20 +89,47 @@
5389
"country": null,
5490
"countryCode": null,
5591
"stateCode": null
56-
},
57-
"noOfEmployees": null,
58-
"annualRevenue": {
92+
}
93+
},
94+
"opportunityForm": {
95+
"opportunityName": null,
96+
"closeDate": null,
97+
"amount": {
5998
"currency": null,
6099
"totalAmount": null
61100
},
62-
"leadSource": null,
63-
"industry": null
101+
"description": null,
102+
"stage": null,
103+
"percentage": null,
104+
"forecastCategory": null
64105
},
65106
"scheduledTask": [],
66107
"title": null,
67108
"description": null,
68109
"thumbnailURL": null
69110
},
111+
"relationships": {
112+
"accountForm.owner": {
113+
"links": {
114+
"self": null
115+
}
116+
},
117+
"accountForm.parentAccount": {
118+
"links": {
119+
"self": null
120+
}
121+
},
122+
"accountForm.company": {
123+
"links": {
124+
"self": null
125+
}
126+
},
127+
"opportunityForm.accountName": {
128+
"links": {
129+
"self": null
130+
}
131+
}
132+
},
70133
"meta": {
71134
"adoptsFrom": {
72135
"module": "../sale-hub",

‎packages/drafts-realm/crm/account.gts

+32
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
CardDef,
55
linksTo,
66
Component,
7+
FieldDef,
78
} from 'https://cardstack.com/base/card-api';
89

910
import NumberField from 'https://cardstack.com/base/number';
@@ -33,6 +34,37 @@ export class Company extends CardDef {
3334
};
3435
}
3536

37+
export class CrmAccountField extends FieldDef {
38+
static displayName = 'Crm Account';
39+
@field owner = linksTo(MatrixUser);
40+
@field accountName = contains(StringField);
41+
@field accountAlias = contains(StringField);
42+
@field description = contains(StringField);
43+
@field contactInformation = contains(Contact);
44+
@field billingAddress = contains(Address);
45+
@field shippingAddress = contains(Address, {
46+
computeVia: function (this: CrmAccount) {
47+
return this.billingAddress;
48+
},
49+
});
50+
@field numberOfEmployees = contains(NumberField);
51+
@field parentAccount = linksTo(() => CrmAccount);
52+
@field company = linksTo(Company);
53+
@field title = contains(StringField, {
54+
computeVia: function (this: CrmAccount) {
55+
return this.accountName;
56+
},
57+
});
58+
59+
static embedded = class Embedded extends Component<typeof this> {
60+
<template>
61+
<GridContainer>
62+
<h3><@fields.accountName /></h3>
63+
</GridContainer>
64+
</template>
65+
};
66+
}
67+
3668
export class CrmAccount extends CardDef {
3769
static displayName = 'Crm Account';
3870
@field owner = linksTo(MatrixUser);

0 commit comments

Comments
 (0)