Skip to content

Commit 98e8b21

Browse files
authored
Merge pull request #2184 from cardstack/CS-8016-crm-app-to-seed-realm
CS-8016 promote CRM app to seed realm
2 parents 02cb447 + 9bf65e6 commit 98e8b21

File tree

108 files changed

+11567
-737
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+11567
-737
lines changed

packages/experiments-realm/DealEvent/60cf6fcf-10ec-4d04-b6a8-e409679ccc0a.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"relationships": {
1515
"assignee": {
1616
"links": {
17-
"self": null
17+
"self": "../Representative/880c1d41-2563-43da-999d-ef577fa3eac9"
1818
}
1919
}
2020
},

packages/experiments-realm/author.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { cn, not } from '@cardstack/boxel-ui/helpers';
2222
import { setBackgroundImage } from './components/layout';
2323
import { ContactLinkField } from './fields/contact-link';
2424
import { BlogApp } from './blog-app';
25-
import { EmailField } from './email';
25+
import { EmailField } from './fields/email';
2626

2727
class AuthorContactLink extends ContactLinkField {
2828
static values = [

packages/experiments-realm/blog-category.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
import StringField from 'https://cardstack.com/base/string';
99
import { BlogApp as BlogAppCard } from './blog-app';
1010
import { htmlSafe } from '@ember/template';
11-
import { ColorField } from './color';
11+
import { ColorField } from './fields/color';
1212
import { cssVar, getContrastColor } from '@cardstack/boxel-ui/helpers';
1313

1414
export const categoryStyle = (category: Partial<BlogCategory>) => {

packages/experiments-realm/crm/account.gts

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
StringField,
1313
} from 'https://cardstack.com/base/card-api';
1414
import { FieldContainer } from '@cardstack/boxel-ui/components';
15-
import { Address as AddressField } from '../address';
15+
import { Address as AddressField } from '../fields/address';
1616
import { Company } from './company';
1717
import { Contact } from './contact';
1818
import { CrmApp } from '../crm-app';
@@ -22,7 +22,7 @@ import SummaryGridContainer from '../components/summary-grid-container';
2222
import BuildingIcon from '@cardstack/boxel-icons/building';
2323
import ChartBarPopular from '@cardstack/boxel-icons/chart-bar-popular';
2424
import AccountHeader from '../components/account-header';
25-
import { WebsiteField } from '../website';
25+
import { WebsiteField } from '../fields/website';
2626
import TrendingUp from '@cardstack/boxel-icons/trending-up';
2727
import ContactIcon from '@cardstack/boxel-icons/contact';
2828
import {

packages/experiments-realm/crm/company.gts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import StringField from 'https://cardstack.com/base/string';
22
import NumberField from 'https://cardstack.com/base/number';
3-
import { WebsiteField } from '../website';
4-
import { Address } from '../address';
3+
import { WebsiteField } from '../fields/website';
4+
import { Address } from '../fields/address';
55
import EntityDisplayWithIcon from '../components/entity-icon-display';
66
import { CrmApp } from '../crm-app';
77

packages/experiments-realm/crm/contact-status-tag.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import ContactIcon from '@cardstack/boxel-icons/contact';
1010

1111
import { StatusPill } from '../components/status-pill';
1212

13-
import { ColorField } from '../color';
13+
import { ColorField } from '../fields/color';
1414

1515
export class StatusTagField extends FieldDef {
1616
static icon = ContactIcon;

packages/experiments-realm/crm/contact.gts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import EntityDisplayWithThumbnail from '../components/entity-thumbnail-display';
2020
import { CrmApp } from '../crm-app';
2121
import { Company } from './company';
2222
import { StatusTagField } from './contact-status-tag';
23-
import { ContactPhoneNumber } from '../phone-number';
24-
import { EmailField } from '../email';
23+
import { ContactPhoneNumber } from '../fields/phone-number';
24+
import { EmailField } from '../fields/email';
2525
import { ContactLinkField } from '../fields/contact-link';
2626

2727
export class SocialLinkField extends ContactLinkField {

packages/experiments-realm/crm/deal-event.gts

+17-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
import { contains, field } from 'https://cardstack.com/base/card-api';
2-
import { Event } from '../event';
1+
import {
2+
contains,
3+
field,
4+
CardDef,
5+
linksTo,
6+
} from 'https://cardstack.com/base/card-api';
7+
import { Representative } from '../crm/representative';
38
import { Component } from 'https://cardstack.com/base/card-api';
49
import StringField from 'https://cardstack.com/base/string';
510
import NumberField from 'https://cardstack.com/base/number';
11+
import DateTimeField from 'https://cardstack.com/base/datetime';
12+
import TextAreaField from 'https://cardstack.com/base/text-area';
613
import { FieldContainer, BoxelSelect } from '@cardstack/boxel-ui/components';
714
import CalendarPlus from '@cardstack/boxel-icons/calendar-plus';
815
import { tracked } from '@glimmer/tracking';
@@ -207,11 +214,18 @@ class EditTemplate extends Component<typeof DealEvent> {
207214
}
208215

209216
// @ts-ignore
210-
export class DealEvent extends Event {
217+
export class DealEvent extends CardDef {
211218
static displayName = 'Deal Event';
212219
static icon = CalendarPlus;
213220

214221
@field attendees = contains(NumberField);
222+
@field subject = contains(StringField);
223+
@field location = contains(StringField);
224+
@field assignee = linksTo(() => Representative);
225+
@field startDateTime = contains(DateTimeField);
226+
@field endDateTime = contains(DateTimeField);
227+
@field eventType = contains(StringField);
228+
@field description = contains(TextAreaField);
215229

216230
@field title = contains(StringField, {
217231
computeVia(this: DealEvent) {

packages/experiments-realm/crm/deal-priority.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from 'https://cardstack.com/base/card-api';
88
import NumberField from 'https://cardstack.com/base/number';
99

10-
import { ColorField } from '../color';
10+
import { ColorField } from '../fields/color';
1111

1212
import { BoxelSelect } from '@cardstack/boxel-ui/components';
1313

packages/experiments-realm/crm/deal-status.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import NumberField from 'https://cardstack.com/base/number';
99

1010
import EntityDisplayWithIcon from '../components/entity-icon-display';
1111

12-
import { ColorField } from '../color';
12+
import { ColorField } from '../fields/color';
1313

1414
import FilterSearch from '@cardstack/boxel-icons/filter-search';
1515
import FilePen from '@cardstack/boxel-icons/file-pen';

packages/experiments-realm/crm/deal.gts

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ import CrmProgressBar from '../components/crm-progress-bar';
2828
import EntityDisplayWithIcon from '../components/entity-icon-display';
2929
import { Account } from './account';
3030
import { action } from '@ember/object';
31-
import { PercentageField } from '../percentage';
31+
import { PercentageField } from '../fields/percentage';
3232
import MarkdownField from 'https://cardstack.com/base/markdown';
33-
import { Address as AddressField } from '../address';
34-
import { WebsiteField } from '../website';
33+
import { Address as AddressField } from '../fields/address';
34+
import { WebsiteField } from '../fields/website';
3535
import { Contact } from './contact';
3636
import { ContactRow } from '../components/contact-row';
3737
import Users from '@cardstack/boxel-icons/users';

packages/experiments-realm/crm/urgency-tag.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { tracked } from '@glimmer/tracking';
1111
import { action } from '@ember/object';
1212
import { BoxelSelect } from '@cardstack/boxel-ui/components';
1313

14-
import { ColorField } from '../color';
14+
import { ColorField } from '../fields/color';
1515
import { StatusPill } from '../components/status-pill';
1616

1717
import ClockExclamation from '@cardstack/boxel-icons/clock-exclamation';

packages/experiments-realm/experiments_fields_preview.gts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { FeaturedImageField } from './fields/featured-image';
22
import { ContactLinkField } from './fields/contact-link';
3-
import { EmailField } from './email';
4-
import { PhoneField } from './phone-number';
5-
import { UrlField } from './url';
6-
import { WebsiteField } from './website';
7-
import { Address as AddressField } from './address';
8-
import { PercentageField } from './percentage';
3+
import { EmailField } from './fields/email';
4+
import { PhoneField } from './fields/phone-number';
5+
import { UrlField } from './fields/url';
6+
import { WebsiteField } from './fields/website';
7+
import { Address as AddressField } from './fields/address';
8+
import { PercentageField } from './fields/percentage';
99
import { CurrencyField } from './fields/currency';
1010
import { AmountWithCurrency as AmountWithCurrencyField } from './fields/amount-with-currency';
1111
import { StatusTagField } from './crm/contact-status-tag';

packages/experiments-realm/address.gts packages/experiments-realm/fields/address.gts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import {
55
FieldDef,
66
} from 'https://cardstack.com/base/card-api';
77
import StringField from 'https://cardstack.com/base/string';
8-
import { CountryField } from './country';
8+
import { CountryField } from '../country';
99
import MapPinIcon from '@cardstack/boxel-icons/map-pin';
10-
import EntityDisplayWithIcon from './components/entity-icon-display';
10+
import EntityDisplayWithIcon from '../components/entity-icon-display';
1111

1212
function getAddressRows(
1313
addressLine1: string | undefined,

packages/experiments-realm/fields/contact-link.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import Email from '@cardstack/boxel-icons/mail';
1717
import Link from '@cardstack/boxel-icons/link';
1818
import Phone from '@cardstack/boxel-icons/phone';
1919

20-
import { UrlField } from '../url';
20+
import { UrlField } from './url';
2121

2222
export interface ContactLink {
2323
type: 'email' | 'tel' | 'link' | string;

packages/experiments-realm/email.gts packages/experiments-realm/fields/email.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import MailIcon from '@cardstack/boxel-icons/mail';
1515
import { debounce } from 'lodash';
1616
import { tracked } from '@glimmer/tracking';
1717
import { action } from '@ember/object';
18-
import EntityDisplayWithIcon from './components/entity-icon-display';
18+
import EntityDisplayWithIcon from '../components/entity-icon-display';
1919

2020
// We use simple regex here to validate common email formats
2121
// This is definitely NOT a full email validation

packages/experiments-realm/fields/featured-image.gts

+3-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { ImageSizeField } from 'https://cardstack.com/base/base64-image';
1212
import { FieldContainer } from '@cardstack/boxel-ui/components';
1313
import { FailureBordered } from '@cardstack/boxel-ui/icons';
1414
import PhotoIcon from '@cardstack/boxel-icons/photo';
15-
import { UrlField } from '../url';
15+
import { UrlField } from './url';
1616
import { setBackgroundImage } from '../components/layout';
1717

1818
function cssForFeaturedImage({
@@ -178,11 +178,8 @@ export class FeaturedImageField extends FieldDef {
178178
-12px 0,
179179
0 0,
180180
0 12px;
181-
background-image: linear-gradient(
182-
45deg,
183-
var(--boxel-300) 25%,
184-
transparent 25%
185-
),
181+
background-image:
182+
linear-gradient(45deg, var(--boxel-300) 25%, transparent 25%),
186183
linear-gradient(-45deg, var(--boxel-300) 25%, transparent 25%),
187184
linear-gradient(45deg, transparent 75%, var(--boxel-300) 75%),
188185
linear-gradient(-45deg, transparent 75%, var(--boxel-300) 75%);

packages/experiments-realm/phone-number.gts packages/experiments-realm/fields/phone-number.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
import { PhoneInput, Pill } from '@cardstack/boxel-ui/components';
99
import { RadioInput } from '@cardstack/boxel-ui/components';
1010
import NumberField from 'https://cardstack.com/base/number';
11-
import EntityDisplayWithIcon from './components/entity-icon-display';
11+
import EntityDisplayWithIcon from '../components/entity-icon-display';
1212

1313
import { tracked } from '@glimmer/tracking';
1414
import { fn } from '@ember/helper';
File renamed without changes.

packages/experiments-realm/website.gts packages/experiments-realm/fields/website.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import WorldWwwIcon from '@cardstack/boxel-icons/world-www';
22
import { UrlField } from './url';
33
import { Component } from 'https://cardstack.com/base/card-api';
4-
import EntityDisplayWithIcon from './components/entity-icon-display';
4+
import EntityDisplayWithIcon from '../components/entity-icon-display';
55

66
const domainWithPath = (urlString: string | null) => {
77
if (!urlString) {

packages/experiments-realm/map.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from 'https://cardstack.com/base/card-api';
88
import { Component } from 'https://cardstack.com/base/card-api';
99
import MapIcon from '@cardstack/boxel-icons/map';
10-
import { Address } from './address';
10+
import { Address } from './fields/address';
1111

1212
function or(value: number | undefined, defaultValue: number) {
1313
return value || defaultValue;

packages/experiments-realm/person.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import BooleanCard from 'https://cardstack.com/base/boolean';
99
import StringCard from 'https://cardstack.com/base/string';
1010
import { Pet } from './pet';
1111
import { GridContainer } from '@cardstack/boxel-ui/components';
12-
import { Address } from './address';
12+
import { Address } from './fields/address';
1313
import { Trips } from './trips';
1414
import UserSquareRoundedIcon from '@cardstack/boxel-icons/user-square-rounded';
1515

packages/experiments-realm/tag.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from 'https://cardstack.com/base/card-api';
88
import TagIcon from '@cardstack/boxel-icons/tag';
99
import { Pill } from '@cardstack/boxel-ui/components';
10-
import { ColorField } from './color';
10+
import { ColorField } from './fields/color';
1111

1212
export class Tag extends CardDef {
1313
static displayName = 'Tag';

packages/experiments-realm/task.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import Calendar from '@cardstack/boxel-icons/calendar';
3131
import { Pill } from '@cardstack/boxel-ui/components';
3232
import { CheckMark } from '@cardstack/boxel-ui/icons';
3333
import { Todo } from './todo';
34-
import { ColorField } from './color';
34+
import { ColorField } from './fields/color';
3535

3636
export class TaskStatusEdit extends Component<typeof TaskStatusField> {
3737
@tracked label: string | undefined = this.args.model.label;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"data": {
3+
"type": "card",
4+
"attributes": {
5+
"shippingAddress": {
6+
"addressLine1": "456 Pine Street",
7+
"addressLine2": null,
8+
"city": "Seattle",
9+
"state": "WA",
10+
"postalCode": "98101",
11+
"country": {
12+
"name": "United States",
13+
"code": "US"
14+
},
15+
"poBoxNumber": null
16+
},
17+
"billingAddress": {
18+
"addressLine1": "456 Pine Street",
19+
"addressLine2": null,
20+
"city": "Seattle",
21+
"state": "WA",
22+
"postalCode": "98101",
23+
"country": {
24+
"name": "United States",
25+
"code": "US"
26+
},
27+
"poBoxNumber": null
28+
},
29+
"urgencyTag": {
30+
"index": 3,
31+
"label": "Expiring Soon",
32+
"foregroundColor": "#FBC02D",
33+
"backgroundColor": "#FFF9C4"
34+
},
35+
"description": "Current client with website and social media package expiring in 30 days",
36+
"thumbnailURL": null
37+
},
38+
"relationships": {
39+
"crmApp": {
40+
"links": {
41+
"self": "../CrmApp/4e73712d-2a31-4ffe-9c22-d3de277257a6"
42+
}
43+
},
44+
"company": {
45+
"links": {
46+
"self": "../Company/141f3e15-cfd5-4b61-bd4c-37ea31dbeeab"
47+
}
48+
},
49+
"primaryContact": {
50+
"links": {
51+
"self": "../Customer/1274acf3-5b66-4373-89a2-fe8106c3d586"
52+
}
53+
},
54+
"contacts": {
55+
"links": {
56+
"self": null
57+
}
58+
}
59+
},
60+
"meta": {
61+
"adoptsFrom": {
62+
"module": "../crm/account",
63+
"name": "Account"
64+
}
65+
}
66+
}
67+
}

0 commit comments

Comments
 (0)