diff --git a/packages/drafts-realm/Company/9ad68df6-b27e-4164-8736-e9347ece4d1e.json b/packages/drafts-realm/Company/9ad68df6-b27e-4164-8736-e9347ece4d1e.json new file mode 100644 index 0000000000..ed27746b82 --- /dev/null +++ b/packages/drafts-realm/Company/9ad68df6-b27e-4164-8736-e9347ece4d1e.json @@ -0,0 +1,49 @@ +{ + "data": { + "type": "card", + "attributes": { + "name": "law bom bom", + "regstrationNumber": null, + "address": { + "streetAddress": null, + "city": null, + "region": null, + "postalCode": null, + "poBoxNumber": null, + "country": null + }, + "contactPerson": { + "salutation": null, + "firstName": null, + "lastName": null, + "address": { + "streetAddress": null, + "city": null, + "region": null, + "postalCode": null, + "poBoxNumber": null, + "country": null + }, + "phoneNumber": { + "country": null, + "area": null, + "number": null + }, + "email": { + "value": null + }, + "website": { + "value": null + } + }, + "description": null, + "thumbnailURL": null + }, + "meta": { + "adoptsFrom": { + "module": "../crm/account", + "name": "Company" + } + } + } +} \ No newline at end of file diff --git a/packages/drafts-realm/Company/b57e5ffd-b64f-4531-a7e4-5a1d0420e2bc.json b/packages/drafts-realm/Company/b57e5ffd-b64f-4531-a7e4-5a1d0420e2bc.json new file mode 100644 index 0000000000..4c3a90b69a --- /dev/null +++ b/packages/drafts-realm/Company/b57e5ffd-b64f-4531-a7e4-5a1d0420e2bc.json @@ -0,0 +1,49 @@ +{ + "data": { + "type": "card", + "attributes": { + "name": "Law Grocery", + "regstrationNumber": null, + "address": { + "streetAddress": null, + "city": null, + "region": null, + "postalCode": null, + "poBoxNumber": null, + "country": null + }, + "contactPerson": { + "salutation": null, + "firstName": null, + "lastName": null, + "address": { + "streetAddress": null, + "city": null, + "region": null, + "postalCode": null, + "poBoxNumber": null, + "country": null + }, + "phoneNumber": { + "country": null, + "area": null, + "number": null + }, + "email": { + "value": null + }, + "website": { + "value": null + } + }, + "description": null, + "thumbnailURL": null + }, + "meta": { + "adoptsFrom": { + "module": "../crm/account", + "name": "Company" + } + } + } +} \ No newline at end of file diff --git a/packages/drafts-realm/ContactForm/24fad614-e49b-44cf-9bf4-f9ead589ffa5.json b/packages/drafts-realm/ContactForm/24fad614-e49b-44cf-9bf4-f9ead589ffa5.json new file mode 100644 index 0000000000..aa735bf04e --- /dev/null +++ b/packages/drafts-realm/ContactForm/24fad614-e49b-44cf-9bf4-f9ead589ffa5.json @@ -0,0 +1,41 @@ +{ + "data": { + "type": "card", + "attributes": { + "user": { + "salutation": null, + "firstName": null, + "lastName": null + }, + "accountName": null, + "email": null, + "phone": null, + "fax": null, + "department": null, + "addressInfo": { + "address": null, + "zip": null, + "city": null, + "state": null, + "country": null, + "countryCode": null, + "stateCode": null + }, + "description": null, + "thumbnailURL": null + }, + "relationships": { + "owner": { + "links": { + "self": null + } + } + }, + "meta": { + "adoptsFrom": { + "module": "../contact-form", + "name": "ContactForm" + } + } + } +} \ No newline at end of file diff --git a/packages/drafts-realm/ContactForm/4530dcff-062d-4a69-911a-db32da501eab.json b/packages/drafts-realm/ContactForm/4530dcff-062d-4a69-911a-db32da501eab.json deleted file mode 100644 index 6a664ca1b4..0000000000 --- a/packages/drafts-realm/ContactForm/4530dcff-062d-4a69-911a-db32da501eab.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "data": { - "type": "card", - "attributes": { - "title": "Application of Job", - "name": { - "salutation": "Mr.", - "firstName": "Law", - "lastName": "Yung xxx" - }, - "email": "lorem@gmail.com", - "phone": "0103819999", - "fax": "+609092312", - "department": "IT", - "addressInfo": { - "address": "1 Chome-3-8 Hashiba Higashinocho", - "zip": "570-0031", - "city": "Moriguchi", - "state": "Ōsaka Prefecture", - "country": "Japan", - "countryCode": "JP", - "stateCode": "27" - }, - "description": null, - "thumbnailURL": null - }, - "meta": { - "adoptsFrom": { - "module": "../contact-form", - "name": "ContactForm" - } - } - } -} \ No newline at end of file diff --git a/packages/drafts-realm/CrmAccount/4802eeed-bec6-4d7a-8f05-6370866edd40.json b/packages/drafts-realm/CrmAccount/4802eeed-bec6-4d7a-8f05-6370866edd40.json index 40fadb7027..7d68816bda 100644 --- a/packages/drafts-realm/CrmAccount/4802eeed-bec6-4d7a-8f05-6370866edd40.json +++ b/packages/drafts-realm/CrmAccount/4802eeed-bec6-4d7a-8f05-6370866edd40.json @@ -53,7 +53,7 @@ }, "company": { "links": { - "self": null + "self": "../Company/9ad68df6-b27e-4164-8736-e9347ece4d1e" } } }, diff --git a/packages/drafts-realm/CrmAccount/a9289420-798a-49cf-b746-9aece2295d70.json b/packages/drafts-realm/CrmAccount/a9289420-798a-49cf-b746-9aece2295d70.json new file mode 100644 index 0000000000..7b7dbf337a --- /dev/null +++ b/packages/drafts-realm/CrmAccount/a9289420-798a-49cf-b746-9aece2295d70.json @@ -0,0 +1,67 @@ +{ + "data": { + "type": "card", + "attributes": { + "accountName": null, + "accountAlias": null, + "description": null, + "contactInformation": { + "salutation": null, + "firstName": null, + "lastName": null, + "address": { + "streetAddress": null, + "city": null, + "region": null, + "postalCode": null, + "poBoxNumber": null, + "country": null + }, + "phoneNumber": { + "country": null, + "area": null, + "number": null + }, + "email": { + "value": null + }, + "website": { + "value": null + } + }, + "billingAddress": { + "streetAddress": null, + "city": null, + "region": null, + "postalCode": null, + "poBoxNumber": null, + "country": null + }, + "numberOfEmployees": null, + "thumbnailURL": null + }, + "relationships": { + "owner": { + "links": { + "self": null + } + }, + "parentAccount": { + "links": { + "self": null + } + }, + "company": { + "links": { + "self": null + } + } + }, + "meta": { + "adoptsFrom": { + "module": "../crm/account", + "name": "CrmAccount" + } + } + } +} \ No newline at end of file diff --git a/packages/drafts-realm/LeadForm/ad388806-9aa7-485b-90ed-66331a6da6bb.json b/packages/drafts-realm/LeadForm/ad388806-9aa7-485b-90ed-66331a6da6bb.json new file mode 100644 index 0000000000..7b0b0cb350 --- /dev/null +++ b/packages/drafts-realm/LeadForm/ad388806-9aa7-485b-90ed-66331a6da6bb.json @@ -0,0 +1,52 @@ +{ + "data": { + "type": "card", + "attributes": { + "user": { + "salutation": "Mr.", + "firstName": "Law", + "lastName": "Yung Lum" + }, + "website": "law.com", + "description": null, + "leadStatus": "New", + "phone": "019999999999", + "email": "lawgrocery@g.com", + "addressInfo": { + "address": null, + "zip": null, + "city": null, + "state": null, + "country": null, + "countryCode": null, + "stateCode": null + }, + "noOfEmployees": 200, + "annualRevenue": { + "currency": "RM", + "totalAmount": 1200000 + }, + "leadSource": "Advertisement", + "industry": "Biotechnology", + "thumbnailURL": null + }, + "relationships": { + "company": { + "links": { + "self": "../Company/b57e5ffd-b64f-4531-a7e4-5a1d0420e2bc" + } + }, + "owner": { + "links": { + "self": "../MatrixUser/485ca453-b328-4e85-a761-b2fe7d145430" + } + } + }, + "meta": { + "adoptsFrom": { + "module": "../lead-form", + "name": "LeadForm" + } + } + } +} \ No newline at end of file diff --git a/packages/drafts-realm/MatrixUser/485ca453-b328-4e85-a761-b2fe7d145430.json b/packages/drafts-realm/MatrixUser/485ca453-b328-4e85-a761-b2fe7d145430.json new file mode 100644 index 0000000000..564a12e286 --- /dev/null +++ b/packages/drafts-realm/MatrixUser/485ca453-b328-4e85-a761-b2fe7d145430.json @@ -0,0 +1,19 @@ +{ + "data": { + "type": "card", + "attributes": { + "username": "Law Yung Lom", + "email": { + "value": "lawyunglom@gmail.com" + }, + "description": null, + "thumbnailURL": null + }, + "meta": { + "adoptsFrom": { + "module": "../matrix-user", + "name": "MatrixUser" + } + } + } +} \ No newline at end of file diff --git a/packages/drafts-realm/OpportunityForm/187ec912-522a-44dc-b17c-4fe19ac3066d.json b/packages/drafts-realm/OpportunityForm/187ec912-522a-44dc-b17c-4fe19ac3066d.json new file mode 100644 index 0000000000..925f6c3ba8 --- /dev/null +++ b/packages/drafts-realm/OpportunityForm/187ec912-522a-44dc-b17c-4fe19ac3066d.json @@ -0,0 +1,37 @@ +{ + "data": { + "type": "card", + "attributes": { + "opportunityName": null, + "accountName": null, + "closeDate": null, + "amount": { + "currency": null, + "totalAmount": null + }, + "description": null, + "stage": null, + "percentage": null, + "forecastCategory": null, + "thumbnailURL": null + }, + "relationships": { + "company": { + "links": { + "self": null + } + }, + "owner": { + "links": { + "self": null + } + } + }, + "meta": { + "adoptsFrom": { + "module": "../opportunity-form", + "name": "OpportunityForm" + } + } + } +} \ No newline at end of file diff --git a/packages/drafts-realm/OpportunityForm/37f6334a-02be-48db-a675-20409f8d5507.json b/packages/drafts-realm/OpportunityForm/37f6334a-02be-48db-a675-20409f8d5507.json deleted file mode 100644 index c8d7e1f929..0000000000 --- a/packages/drafts-realm/OpportunityForm/37f6334a-02be-48db-a675-20409f8d5507.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "data": { - "type": "card", - "attributes": { - "opportunityName": "Opportunity Name", - "closeDate": "2024-06-13", - "amount": { - "currency": "RM", - "totalAmount": 123131 - }, - "description": "This opportunity involves a partnership with Cardstack Malaysia to provide our Cloud Storage solution, which addresses their need for scalable, secure, and cost-effective data storage. This deal has the potential to significantly enhance their data management and accessibility.", - "stage": "Negotiation", - "percentage": 75, - "forecastCategory": "Best Case", - "title": null, - "thumbnailURL": null - }, - "relationships": { - "accountName": { - "links": { - "self": "../CrmAccount/4802eeed-bec6-4d7a-8f05-6370866edd40" - } - } - }, - "meta": { - "adoptsFrom": { - "module": "../opportunity-form", - "name": "OpportunityForm" - } - } - } -} \ No newline at end of file diff --git a/packages/drafts-realm/OpportunityForm/5ab75971-9227-4a3e-84cc-537d84587994.json b/packages/drafts-realm/OpportunityForm/5ab75971-9227-4a3e-84cc-537d84587994.json new file mode 100644 index 0000000000..475ec95994 --- /dev/null +++ b/packages/drafts-realm/OpportunityForm/5ab75971-9227-4a3e-84cc-537d84587994.json @@ -0,0 +1,36 @@ +{ + "data": { + "type": "card", + "attributes": { + "opportunityName": null, + "closeDate": null, + "amount": { + "currency": null, + "totalAmount": null + }, + "description": null, + "stage": null, + "percentage": null, + "forecastCategory": null, + "thumbnailURL": null + }, + "relationships": { + "accountName": { + "links": { + "self": null + } + }, + "company": { + "links": { + "self": null + } + } + }, + "meta": { + "adoptsFrom": { + "module": "../opportunity-form", + "name": "OpportunityForm" + } + } + } +} \ No newline at end of file diff --git a/packages/drafts-realm/OpportunityForm/bb174fbc-c07a-4e41-8851-0d624902bbd4.json b/packages/drafts-realm/OpportunityForm/bb174fbc-c07a-4e41-8851-0d624902bbd4.json new file mode 100644 index 0000000000..f4790b4a14 --- /dev/null +++ b/packages/drafts-realm/OpportunityForm/bb174fbc-c07a-4e41-8851-0d624902bbd4.json @@ -0,0 +1,36 @@ +{ + "data": { + "type": "card", + "attributes": { + "opportunityName": "Law Grocery", + "closeDate": null, + "amount": { + "currency": null, + "totalAmount": null + }, + "description": null, + "stage": null, + "percentage": null, + "forecastCategory": null, + "thumbnailURL": null + }, + "relationships": { + "accountName": { + "links": { + "self": null + } + }, + "company": { + "links": { + "self": "../Company/b57e5ffd-b64f-4531-a7e4-5a1d0420e2bc" + } + } + }, + "meta": { + "adoptsFrom": { + "module": "../opportunity-form", + "name": "OpportunityForm" + } + } + } +} \ No newline at end of file diff --git a/packages/drafts-realm/OpportunityForm/d4f9ef0b-d19a-461d-a6ed-5a6886e2004b.json b/packages/drafts-realm/OpportunityForm/d4f9ef0b-d19a-461d-a6ed-5a6886e2004b.json new file mode 100644 index 0000000000..2f823e2000 --- /dev/null +++ b/packages/drafts-realm/OpportunityForm/d4f9ef0b-d19a-461d-a6ed-5a6886e2004b.json @@ -0,0 +1,32 @@ +{ + "data": { + "type": "card", + "attributes": { + "opportunityName": "L", + "accountName": null, + "closeDate": null, + "amount": { + "currency": null, + "totalAmount": null + }, + "description": null, + "stage": null, + "percentage": null, + "forecastCategory": null, + "thumbnailURL": null + }, + "relationships": { + "company": { + "links": { + "self": null + } + } + }, + "meta": { + "adoptsFrom": { + "module": "../opportunity-form", + "name": "OpportunityForm" + } + } + } +} \ No newline at end of file diff --git a/packages/drafts-realm/SaleHub/236608d5-d07a-4006-bb3a-bad875503f4f.json b/packages/drafts-realm/SaleHub/236608d5-d07a-4006-bb3a-bad875503f4f.json new file mode 100644 index 0000000000..c6d659f3d0 --- /dev/null +++ b/packages/drafts-realm/SaleHub/236608d5-d07a-4006-bb3a-bad875503f4f.json @@ -0,0 +1,90 @@ +{ + "data": { + "type": "card", + "attributes": { + "targetPage": "Lead Form", + "scheduledTask": [ + { + "taskForm": { + "taskId": "0", + "subject": "task a", + "dueDate": "2024-07-06", + "comments": null, + "isCompleted": false + } + }, + { + "taskForm": { + "taskId": "1", + "subject": "task b", + "dueDate": "2024-07-05", + "comments": null, + "isCompleted": false + } + }, + { + "taskForm": { + "taskId": "2", + "subject": "task c", + "dueDate": "2024-06-06", + "comments": "testing", + "isCompleted": false + } + } + ], + "convertedStatus": "", + "isLeadFormConverted": false, + "title": null, + "description": null, + "thumbnailURL": null + }, + "relationships": { + "leadForm": { + "links": { + "self": "../LeadForm/ad388806-9aa7-485b-90ed-66331a6da6bb" + } + }, + "accountForm": { + "links": { + "self": "../CrmAccount/a9289420-798a-49cf-b746-9aece2295d70" + } + }, + "contactForm": { + "links": { + "self": "../ContactForm/24fad614-e49b-44cf-9bf4-f9ead589ffa5" + } + }, + "opportunityForm": { + "links": { + "self": "../OpportunityForm/187ec912-522a-44dc-b17c-4fe19ac3066d" + } + }, + "scheduledTask.0.taskForm.relatedTo": { + "links": { + "self": "http://localhost:4201/drafts/CardDef/7298c9c6-2964-41a0-87f7-42127a16e12b" + } + }, + "scheduledTask.1.taskForm.relatedTo": { + "links": { + "self": "http://localhost:4201/drafts/CrmAccount/4802eeed-bec6-4d7a-8f05-6370866edd40" + } + }, + "scheduledTask.2.taskForm.relatedTo": { + "links": { + "self": null + } + }, + "recordOwner": { + "links": { + "self": "../MatrixUser/485ca453-b328-4e85-a761-b2fe7d145430" + } + } + }, + "meta": { + "adoptsFrom": { + "module": "../sale-hub", + "name": "SaleHub" + } + } + } +} \ No newline at end of file diff --git a/packages/drafts-realm/contact-form.gts b/packages/drafts-realm/contact-form.gts index e7352b63f1..41f19d5cb8 100644 --- a/packages/drafts-realm/contact-form.gts +++ b/packages/drafts-realm/contact-form.gts @@ -1,30 +1,33 @@ import { UserName } from './user-name'; import { UserEmail } from './user-email'; import { AddressInfo } from './address-info'; -import { CardDef, field, contains } from 'https://cardstack.com/base/card-api'; +import { + CardDef, + field, + contains, + linksTo, +} from 'https://cardstack.com/base/card-api'; import { Component } from 'https://cardstack.com/base/card-api'; import StringField from 'https://cardstack.com/base/string'; import { FieldContainer, CardContainer } from '@cardstack/boxel-ui/components'; +import { MatrixUser } from './matrix-user'; class Isolated extends Component { - get hasTitleField() { - return this.args.model.title && this.args.model.title.length > 0; - } -