Skip to content

Commit

Permalink
create representative (#2017)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaslyl authored Jan 8, 2025
1 parent b24ab77 commit 808e60a
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"data": {
"type": "card",
"attributes": {
"firstName": "Mary",
"lastName": "Hu Xin Ying",
"position": "Sale Associate",
"department": null,
"primaryEmail": "[email protected]",
"secondaryEmail": null,
"phoneMobile": {
"phoneNumber": {
"number": "201 222 1231",
"countryCode": null
},
"type": {
"index": 2,
"label": "Work",
"color": null,
"colorScheme": {
"foregroundColor": null,
"backgroundColor": null
}
}
},
"phoneOffice": {
"phoneNumber": {
"number": null,
"countryCode": null
},
"type": {
"index": null,
"label": null,
"color": null,
"colorScheme": {
"foregroundColor": null,
"backgroundColor": null
}
}
},
"socialLinks": [],
"description": null,
"thumbnailURL": null
},
"relationships": {
"company": {
"links": {
"self": null
}
}
},
"meta": {
"adoptsFrom": {
"module": "../crm/representative",
"name": "Representative"
}
}
}
}
19 changes: 19 additions & 0 deletions packages/experiments-realm/crm/representative.gts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { field, contains } from 'https://cardstack.com/base/card-api';
import { Contact } from './contact';
import PresentationAnalytics from '@cardstack/boxel-icons/presentation-analytics';
import { StatusTagField } from './contact';

export class Representative extends Contact {
static displayName = 'CRM Representative';
static icon = PresentationAnalytics;
@field statusTag = contains(StatusTagField, {
computeVia: function (this: Representative) {
return new StatusTagField({
index: 2,
label: 'Representative',
lightColor: '#7FDBDA',
darkColor: '#07BABA',
});
},
});
}

0 comments on commit 808e60a

Please sign in to comment.