From 808e60a4f43ae8d8b691955e55a46e2a0ff9842b Mon Sep 17 00:00:00 2001 From: Lucas Date: Thu, 9 Jan 2025 07:46:55 +0800 Subject: [PATCH] create representative (#2017) --- .../e0b16307-04bd-4e48-bdf8-517bb35b8119.json | 59 +++++++++++++++++++ .../experiments-realm/crm/representative.gts | 19 ++++++ 2 files changed, 78 insertions(+) create mode 100644 packages/experiments-realm/Representative/e0b16307-04bd-4e48-bdf8-517bb35b8119.json create mode 100644 packages/experiments-realm/crm/representative.gts diff --git a/packages/experiments-realm/Representative/e0b16307-04bd-4e48-bdf8-517bb35b8119.json b/packages/experiments-realm/Representative/e0b16307-04bd-4e48-bdf8-517bb35b8119.json new file mode 100644 index 0000000000..ac31e23a95 --- /dev/null +++ b/packages/experiments-realm/Representative/e0b16307-04bd-4e48-bdf8-517bb35b8119.json @@ -0,0 +1,59 @@ +{ + "data": { + "type": "card", + "attributes": { + "firstName": "Mary", + "lastName": "Hu Xin Ying", + "position": "Sale Associate", + "department": null, + "primaryEmail": "maryhu@gmail.com", + "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" + } + } + } +} diff --git a/packages/experiments-realm/crm/representative.gts b/packages/experiments-realm/crm/representative.gts new file mode 100644 index 0000000000..600ae45bac --- /dev/null +++ b/packages/experiments-realm/crm/representative.gts @@ -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', + }); + }, + }); +}