diff --git a/packages/experiments-realm/crm-app.gts b/packages/experiments-realm/crm-app.gts index 12844a205c..cbe93db585 100644 --- a/packages/experiments-realm/crm-app.gts +++ b/packages/experiments-realm/crm-app.gts @@ -23,12 +23,7 @@ import { } from '@cardstack/boxel-ui/components'; import { IconPlus } from '@cardstack/boxel-ui/icons'; import { AppCard, Tab } from './app-card'; -import { - Query, - CardError, - SupportedMimeType, - codeRefWithAbsoluteURL, -} from '@cardstack/runtime-common'; +import { Query, CardError, SupportedMimeType } from '@cardstack/runtime-common'; import ContactIcon from '@cardstack/boxel-icons/contact'; import HeartHandshakeIcon from '@cardstack/boxel-icons/heart-handshake'; import TargetArrowIcon from '@cardstack/boxel-icons/target-arrow'; @@ -172,15 +167,6 @@ class CrmAppTemplate extends Component { return this.activeTab?.tabId ? this.activeTab.tabId.toLowerCase() : ''; } - get activeTabRef() { - if (!this.activeTab?.ref?.name || !this.activeTab.ref.module) { - return; - } - if (!this.currentRealm) { - return; - } - return codeRefWithAbsoluteURL(this.activeTab.ref, this.currentRealm); - } setTabs(tabs: Tab[]) { this.args.model.tabs = tabs ?? []; } @@ -463,7 +449,7 @@ class CrmAppTemplate extends Component { } export class CrmApp extends AppCard { - static displayName = 'Crm App'; + static displayName = 'CRM App'; static prefersWideFormat = true; static headerColor = '#4D3FE8'; static isolated = CrmAppTemplate; diff --git a/packages/experiments-realm/crm/deal.gts b/packages/experiments-realm/crm/deal.gts index 89b0ec1c11..908e1e469b 100644 --- a/packages/experiments-realm/crm/deal.gts +++ b/packages/experiments-realm/crm/deal.gts @@ -55,7 +55,6 @@ class IsolatedTemplate extends Component { ); } get primaryContactName() { - console.log(this.args.fields.account?.primaryContact); return this.args.model.account?.primaryContact?.name; } @@ -84,10 +83,6 @@ class IsolatedTemplate extends Component { return this.args.model[realmURL]!; } - get realmHref() { - return this.realmURL.href; - } - get realmHrefs() { return [this.realmURL?.href]; } @@ -96,7 +91,7 @@ class IsolatedTemplate extends Component { return { filter: { type: { - module: `${this.realmHref}crm/deal`, + module: new URL('./crm/deal', import.meta.url).href, name: 'Deal', }, }, @@ -116,14 +111,11 @@ class IsolatedTemplate extends Component { (acc, deal: Deal) => acc + deal.computedValue.amount, 0, ); - nonZeroDeals.map((d) => console.log(d.computedValue.amount)); - console.log('totalDealRevenue', totalDealRevenue); let avgDealSize = totalDealRevenue / nonZeroDeals.length; - console.log('avgDealSize', avgDealSize); + if (this.args.model.computedValue?.amount) { let percentDiff = (this.args.model.computedValue?.amount - avgDealSize) / avgDealSize; - console.log('percentDiff', percentDiff); let positive = percentDiff >= 0 ? true : false; let summary = `${percentDiff.toFixed(2)}% ${ positive ? 'above' : 'below'