File tree 2 files changed +19
-7
lines changed
2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ class Prospect extends Model
12
12
protected $ fillable = [];
13
13
protected $ table = 'prospects ' ;
14
14
15
+ protected $ casts = [
16
+ 'proposal_sent_date ' => 'datetime:Y-m-d ' ,
17
+ ];
18
+
15
19
public function pocUser ()
16
20
{
17
21
return $ this ->belongsTo (User::class, 'poc_user_id ' );
@@ -41,14 +45,13 @@ public function getProspectDisplayName()
41
45
public function getFormattedBudgetAttribute ()
42
46
{
43
47
$ budget = (string ) $ this ->budget ;
44
- $ currency = $ this ->currency ;
45
48
46
49
// if currency is less than one thousand
47
50
if (strlen ($ budget ) <= 3 ) {
48
51
return $ budget ;
49
52
}
50
53
51
- $ numberFormat = $ currency == 'INR ' ? 'en_IN ' : 'en_US ' ;
54
+ $ numberFormat = $ this -> currency == 'INR ' ? 'en_IN ' : 'en_US ' ;
52
55
$ formatter = new \NumberFormatter ($ numberFormat , \NumberFormatter::DECIMAL );
53
56
$ formattedBudget = $ formatter ->format ($ budget );
54
57
Original file line number Diff line number Diff line change 46
46
<a href =" {{ route (' prospect.show' , $prospect -> id ) } }" class =" text-decoration-none" >
47
47
{{ $prospect -> project_name ?? $prospect -> organization_name } }
48
48
</a >
49
- <br >
50
- <span class =" text-secondary fz-14" >
51
- {{ $prospect -> organization_name ?? $prospect -> client -> name } }
52
- </span >
49
+ <div >
50
+ @if ($prospect -> customer_type == ' new' )
51
+ <span class =" w-10 h-10 rounded-circle bg-theme-warning d-inline-block" data-toggle =" tooltip"
52
+ data-placement =" top"
53
+ title =" New Customer" ></span >
54
+ @endif
55
+ <span class =" text-secondary fz-14" >
56
+ {{ $prospect -> organization_name ?? $prospect -> client -> name } }
57
+ </span >
58
+ </div >
53
59
</div >
54
60
</td >
55
61
<td class =" w-10p" >
58
64
data-placement =" top" title =" {{ $prospect -> pocUser -> name ?? ' ' } }" />
59
65
</td >
60
66
<td class =" w-20p" >
61
- <span >{{ $prospect -> getFormattedDate ($prospect -> proposal_sent_date ) } } </span >
67
+ <div >{{ $prospect -> getFormattedDate ($prospect -> proposal_sent_date ) } } </div >
68
+ @if ($prospect -> proposal_sent_date )
69
+ <div class =" fz-14 {{ $prospect -> proposal_sent_date -> lt (now ()-> subMonths (3 )) ? ' text-danger' : ' text-secondary' } }" >{{ $prospect -> proposal_sent_date -> diffForHumans () } } </div >
70
+ @endif
62
71
</td >
63
72
<td class =" w-25p" >
64
73
<span >
You can’t perform that action at this time.
0 commit comments