Skip to content

Commit

Permalink
Integrate fitted card with crm layout (#1851)
Browse files Browse the repository at this point in the history
* integrate fitted crm

* change tab refs

* more follow-up

* fix

* Delete packages/experiments-realm/crm/crm-cards.gts
  • Loading branch information
tintinthong authored Nov 28, 2024
1 parent 46748ec commit 7c91768
Show file tree
Hide file tree
Showing 14 changed files with 194 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"tabId": "Contact",
"ref": {
"name": "Contact",
"module": "crm/crm-cards"
"module": "crm/contact"
},
"isTable": false
},
Expand All @@ -17,7 +17,7 @@
"tabId": "Deal",
"ref": {
"name": "Deal",
"module": "crm/crm-cards"
"module": "crm/deal"
},
"isTable": false
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"data": {
"type": "card",
"attributes": {
"name": null,
"primaryEmail": null,
"secondaryEmail": null,
"phoneMobile": {
"country": null,
"area": null,
"phoneNumber": null
},
"phoneOffice": {
"country": null,
"area": null,
"phoneNumber": null
},
"socialLinks": {
"twitterURL": null,
"linkedInURL": null
},
"status": {
"index": null,
"label": null
},
"description": null,
"thumbnailURL": null
},
"relationships": {
"company": {
"links": {
"self": null
}
}
},
"meta": {
"adoptsFrom": {
"module": "../crm/customer",
"name": "Customer"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"data": {
"type": "card",
"attributes": {
"name": null,
"primaryEmail": null,
"secondaryEmail": null,
"phoneMobile": {
"country": null,
"area": null,
"phoneNumber": null
},
"phoneOffice": {
"country": null,
"area": null,
"phoneNumber": null
},
"socialLinks": {
"twitterURL": null,
"linkedInURL": null
},
"status": {
"index": null,
"label": null
},
"description": null,
"thumbnailURL": null
},
"relationships": {
"company": {
"links": {
"self": null
}
}
},
"meta": {
"adoptsFrom": {
"module": "../crm/customer",
"name": "Customer"
}
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
},
"meta": {
"adoptsFrom": {
"module": "../crm/crm-cards",
"module": "../crm/deal",
"name": "Deal"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@
"data": {
"type": "card",
"attributes": {
"type": {
"index": null,
"label": null
},
"title": null,
"description": null,
"thumbnailURL": null
},
"meta": {
"adoptsFrom": {
"module": "../crm/crm-cards",
"name": "Lead"
"module": "../crm/deal",
"name": "Deal"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"data": {
"type": "card",
"attributes": {
"name": null,
"primaryEmail": null,
"secondaryEmail": null,
"phoneMobile": {
"country": null,
"area": null,
"phoneNumber": null
},
"phoneOffice": {
"country": null,
"area": null,
"phoneNumber": null
},
"socialLinks": {
"twitterURL": null,
"linkedInURL": null
},
"status": {
"index": null,
"label": null
},
"description": null,
"thumbnailURL": null
},
"relationships": {
"company": {
"links": {
"self": null
}
}
},
"meta": {
"adoptsFrom": {
"module": "../crm/lead",
"name": "Lead"
}
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"data": {
"type": "card",
"attributes": {
"name": null,
"primaryEmail": null,
"secondaryEmail": null,
"phoneMobile": {
"country": null,
"area": null,
"phoneNumber": null
},
"phoneOffice": {
"country": null,
"area": null,
"phoneNumber": null
},
"socialLinks": {
"twitterURL": null,
"linkedInURL": null
},
"status": {
"index": null,
"label": null
},
"description": null,
"thumbnailURL": null
},
"relationships": {
"company": {
"links": {
"self": null
}
}
},
"meta": {
"adoptsFrom": {
"module": "../crm/lead",
"name": "Lead"
}
}
}
}
2 changes: 1 addition & 1 deletion packages/experiments-realm/crm/contact.gts
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ class FittedTemplate extends Component<typeof Contact> {
}

export class Contact extends CardDef {
static displayName = 'Contact';
static displayName = 'CRM Contact';
@field name = contains(StringField);
@field primaryEmail = contains(StringField);
@field secondaryEmail = contains(StringField);
Expand Down
25 changes: 0 additions & 25 deletions packages/experiments-realm/crm/crm-cards.gts

This file was deleted.

5 changes: 5 additions & 0 deletions packages/experiments-realm/crm/customer.gts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Contact } from './contact';

export class Customer extends Contact {
static displayName = 'CRM Customer';
}
5 changes: 5 additions & 0 deletions packages/experiments-realm/crm/deal.gts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { CardDef } from 'https://cardstack.com/base/card-api';

export class Deal extends CardDef {
static displayName = 'CRM Deal';
}
5 changes: 5 additions & 0 deletions packages/experiments-realm/crm/lead.gts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Contact } from './contact';

export class Lead extends Contact {
static displayName = 'CRM Lead';
}

0 comments on commit 7c91768

Please sign in to comment.