4
4
FieldDef ,
5
5
contains ,
6
6
field ,
7
+ linksTo ,
7
8
} from ' https://cardstack.com/base/card-api' ;
8
9
import StringField from ' https://cardstack.com/base/string' ;
9
10
import NumberField from ' https://cardstack.com/base/number' ;
@@ -17,6 +18,7 @@ import { tracked } from '@glimmer/tracking';
17
18
import { action } from ' @ember/object' ;
18
19
import { BoxelInput } from ' @cardstack/boxel-ui/components' ;
19
20
import { CurrencyAmount } from ' ./currency-amount' ;
21
+ import { MatrixUser } from ' ./matrix-user' ;
20
22
21
23
interface CategorySignature {
22
24
name: string ;
@@ -53,6 +55,10 @@ class IsolatedSecForLeadForm extends Component<typeof LeadForm> {
53
55
<label >Lead Status: </label >
54
56
<@ fields.leadStatus />
55
57
</div >
58
+ <div class =' field-input' >
59
+ <label >Lead Owner: </label >
60
+ <@ fields.leadOwner />
61
+ </div >
56
62
<div class =' field-input-column description' >
57
63
<label >Description: </label >
58
64
<@ fields.description />
@@ -178,6 +184,9 @@ class ViewSecForLeadForm extends Component<typeof LeadForm> {
178
184
<FieldContainer @ tag =' label' @ label =' Lead Status' @ vertical ={{ true }} >
179
185
<@ fields.leadStatus @ format =' edit' />
180
186
</FieldContainer >
187
+ <FieldContainer @ tag =' label' @ label =' Lead Owner' @ vertical ={{ true }} >
188
+ <@ fields.leadOwner />
189
+ </FieldContainer >
181
190
</div >
182
191
</section >
183
192
@@ -385,6 +394,10 @@ class EditSecFoLeadForm extends Component<typeof LeadForm> {
385
394
</BoxelSelect >
386
395
</FieldContainer >
387
396
397
+ <FieldContainer @ tag =' label' @ label =' Lead Owner' @ vertical ={{ true }} >
398
+ <@ fields.leadOwner />
399
+ </FieldContainer >
400
+
388
401
<FieldContainer @ tag =' label' @ label =' Phone' @ vertical ={{ true }} >
389
402
<@ fields.phone />
390
403
</FieldContainer >
@@ -473,6 +486,7 @@ export class LeadFormField extends FieldDef {
473
486
@field leadStatus = contains (StringField , {
474
487
description: ` Lead Status ` ,
475
488
});
489
+ @field leadOwner = linksTo (MatrixUser );
476
490
@field phone = contains (StringField , {
477
491
description: ` User's phone number ` ,
478
492
});
@@ -522,6 +536,7 @@ export class LeadForm extends CardDef {
522
536
@field leadStatus = contains (StringField , {
523
537
description: ` Lead Status ` ,
524
538
});
539
+ @field leadOwner = linksTo (MatrixUser );
525
540
@field phone = contains (StringField , {
526
541
description: ` User's phone number ` ,
527
542
});
0 commit comments