@@ -56,6 +56,7 @@ public function fieldsForIndex(NovaRequest $request)
56
56
public function fields (Request $ request )
57
57
{
58
58
return array_filter ([
59
+ Text::make ('Number ' , 'reference_number ' )->exceptOnForms (),
59
60
Enum::make ('ContactStatus ' , function (\Tipoff \Forms \Models \Contact $ contact ) {
60
61
return $ contact ->getContactStatus ();
61
62
})->attach (ContactStatus::class),
@@ -67,10 +68,12 @@ public function fields(Request $request)
67
68
FormType::EMPLOYMENT => 'Employment ' ,
68
69
])->required ()->hideWhenUpdating (),
69
70
nova ('location ' ) ? BelongsTo::make ('Location ' , 'location ' , nova ('location ' ))->required ()->hideWhenUpdating () : null ,
71
+ Text::make ('First Name ' , 'first_name ' )->hideWhenUpdating (),
72
+ Text::make ('Last Name ' , 'last_name ' )->hideWhenUpdating (),
70
73
nova ('user ' ) ? BelongsTo::make ('User ' , 'user ' , nova ('user ' ))->required ()->hideWhenUpdating () : null ,
71
- // PhoneNumber::make('Phone')->format('###-###-####')->disableValidation()->useMaskPlaceholder()->linkOnDetail()->hideWhenUpdating(),
72
74
nova ('email_address ' ) ? BelongsTo::make ('Email Address ' , 'email_address ' , nova ('email_address ' ))->sortable () : null ,
73
- Textarea::make ('Message ' )->rows (3 )->alwaysShow ()->nullable ()->hideWhenUpdating (),
75
+ nova ('phone ' ) ? BelongsTo::make ('Phone ' , 'phone ' , nova ('phone ' ))->sortable () : null ,
76
+ Text::make ('Company Name ' )->nullable ()->hideWhenUpdating (),
74
77
75
78
new Panel ('Submission Details ' , $ this ->submissionFields ()),
76
79
@@ -81,20 +84,19 @@ public function fields(Request $request)
81
84
protected function submissionFields ()
82
85
{
83
86
return [
84
- Text ::make ('Number ' , ' reference_number ' )->exceptOnForms (),
87
+ Textarea ::make ('Message ' )->rows ( 3 )-> alwaysShow ()-> nullable ()-> hideWhenUpdating (),
85
88
Number::make ('Participants ' , 'fields->participants ' )->nullable ()->hideWhenUpdating (),
86
89
Date::make ('Requested Date ' , 'fields->requested_date ' )->nullable ()->hideWhenUpdating (),
87
90
Text::make ('Requested Time ' , 'fields->requested_time ' )->nullable ()->hideWhenUpdating (),
88
- Text::make ('Company Name ' )->nullable ()->hideWhenUpdating (),
89
91
];
90
92
}
91
93
92
94
protected function dataFields (): array
93
95
{
94
- return [
95
- ID :: make (),
96
- DateTime:: make ( ' Created At ' )-> exceptOnForms (),
97
- DateTime:: make ( ' Updated At ' )-> exceptOnForms (),
98
- ] ;
96
+ return array_merge (
97
+ parent :: dataFields (),
98
+ $ this -> creatorDataFields (),
99
+ $ this -> updaterDataFields (),
100
+ ) ;
99
101
}
100
102
}
0 commit comments