@@ -48,6 +48,9 @@ import { DealEvent } from './deal-event';
48
48
import { DealStatus } from ' ./deal-status' ;
49
49
import { DealPriority } from ' ./deal-priority' ;
50
50
import { CrmApp } from ' ../crm-app' ;
51
+ import MapPin from ' @cardstack/boxel-icons/map-pin' ;
52
+ import Calendar from ' @cardstack/boxel-icons/calendar' ;
53
+ import UsersGroup from ' @cardstack/boxel-icons/users-group' ;
51
54
52
55
interface DealSizeSummary {
53
56
summary: string ;
@@ -102,6 +105,9 @@ class EditTemplate extends Component<typeof Deal> {
102
105
<FieldContainer @ label =' CRM App' >
103
106
<@ fields.crmApp />
104
107
</FieldContainer >
108
+ <FieldContainer @ label =' Logo URL' >
109
+ <@ fields.thumbnailURL />
110
+ </FieldContainer >
105
111
</div >
106
112
<style scoped >
107
113
.deal-form {
@@ -117,19 +123,36 @@ class EditTemplate extends Component<typeof Deal> {
117
123
class IsolatedTemplate extends Component <typeof Deal > {
118
124
get logoURL() {
119
125
// We default to account thumbnail
120
- return (
121
- this . args . model . thumbnailURL ?? this .args .model . account ? .thumbnailURL
122
- ) ;
126
+ return this . args . model ?. thumbnailURL ?. length
127
+ ? this .args .model .thumbnailURL
128
+ : this . args . model . account ?. thumbnailURL ;
123
129
}
124
130
get primaryContactName() {
125
131
return this .args .model .account ?.primaryContact ?.name ;
126
132
}
127
133
128
- get hasCompanyInfo() {
129
- return (
130
- this .args .model ?.account ?.website ||
131
- this .args .model ?.account ?.headquartersAddress
132
- );
134
+ get hasDealEventInfo() {
135
+ return this .args .model ?.event ;
136
+ }
137
+
138
+ get eventLocation() {
139
+ return this .args .model ?.event ?.location ?.length
140
+ ? this .args .model .event .location
141
+ : ' -' ;
142
+ }
143
+
144
+ get eventDate() {
145
+ return this .args .model ?.event ?.eventDate
146
+ ? this .args .model .event .eventDate
147
+ : ' -' ;
148
+ }
149
+
150
+ get eventAttendees() {
151
+ const attendees = this .args .model ?.event ?.attendees ;
152
+ const attendeesString = attendees
153
+ ? attendees .toString () + ' Expected Attendees'
154
+ : ' -' ;
155
+ return attendeesString ;
133
156
}
134
157
135
158
get hasValueBreakdown() {
@@ -467,26 +490,41 @@ class IsolatedTemplate extends Component<typeof Deal> {
467
490
<SummaryGridContainer class =' task-summary-grid' >
468
491
<SummaryCard class =' info-card' >
469
492
<: title >
470
- <h3 class =' info-card-title' >Company Info</h3 >
493
+ <h3 class =' info-card-title' >Deal Info</h3 >
471
494
</: title >
472
495
<: icon >
473
496
<World class =' header-icon' />
474
497
</: icon >
475
498
<: content >
476
- {{#if this . hasCompanyInfo }}
477
- <@ fields.headquartersAddress @ format =' atom' />
478
- <@ fields.website @ format =' atom' />
499
+ {{#if this . hasDealEventInfo }}
500
+ <EntityDisplayWithIcon @ title ={{this .eventLocation }} >
501
+ <: icon >
502
+ <MapPin class =' info-icon' />
503
+ </: icon >
504
+ </EntityDisplayWithIcon >
505
+
506
+ <EntityDisplayWithIcon @ title ={{this .eventDate }} >
507
+ <: icon >
508
+ <Calendar class =' info-icon' />
509
+ </: icon >
510
+ </EntityDisplayWithIcon >
511
+
512
+ <EntityDisplayWithIcon @ title ={{this .eventAttendees }} >
513
+ <: icon >
514
+ <UsersGroup class =' info-icon' />
515
+ </: icon >
516
+ </EntityDisplayWithIcon >
479
517
{{else }}
480
518
<div class =' default-value' >
481
- Missing Company Info
519
+ Missing Deal Info
482
520
</div >
483
521
{{/if }}
484
522
</: content >
485
523
</SummaryCard >
486
524
487
525
<SummaryCard class =' info-card' >
488
526
<: title >
489
- <h3 class =' info-card-title' >Stakeholders</h3 >
527
+ <h3 class =' info-card-title' >Key Stakeholders</h3 >
490
528
</: title >
491
529
<: icon >
492
530
<Users class =' header-icon' />
@@ -660,9 +698,6 @@ class IsolatedTemplate extends Component<typeof Deal> {
660
698
letter-spacing : var (--boxel-lsp-xxs );
661
699
align-self : flex-start ;
662
700
}
663
- .summary-highlight {
664
- font : 600 var (--boxel-font-lg );
665
- }
666
701
.description {
667
702
color : var (--boxel-450 );
668
703
font : var (--boxel-font-sm );
@@ -753,22 +788,16 @@ class IsolatedTemplate extends Component<typeof Deal> {
753
788
754
789
class FittedTemplate extends Component <typeof Deal > {
755
790
get logoURL() {
756
- return (
757
- this .args .model .thumbnailURL ?? this .args .model .account ?.thumbnailURL
758
- );
791
+ // We default to account thumbnail
792
+ return this .args .model ?.thumbnailURL ?.length
793
+ ? this .args .model .thumbnailURL
794
+ : this .args .model .account ?.thumbnailURL ;
759
795
}
760
796
761
797
get primaryContactName() {
762
798
return this .args .model .account ?.primaryContact ?.name ;
763
799
}
764
800
765
- get hasCompanyInfo() {
766
- return (
767
- this .args .model ?.account ?.website ||
768
- this .args .model ?.account ?.headquartersAddress
769
- );
770
- }
771
-
772
801
get hasValueBreakdown() {
773
802
return (
774
803
this .args .model .valueBreakdown &&
0 commit comments