File tree Expand file tree Collapse file tree 8 files changed +27
-30
lines changed Expand file tree Collapse file tree 8 files changed +27
-30
lines changed Original file line number Diff line number Diff line change 4
4
@if ($showForm )
5
5
<form wire:submit.prevent =" upload" id =" inputUploadForm" >
6
6
@include (' laravel-crm::livewire.components.partials.file.form-fields' )
7
- <div class = " form-group " >
8
- < button type = " submit " class = " btn btn-primary " > {{ ucfirst ( __ ( ' laravel-crm::lang.upload ' )) } } </ button >
7
+ <div wire:loading >
8
+ Processing file...
9
9
</div >
10
+ @if ($file )
11
+ <div class =" form-group" >
12
+ <button type =" submit" class =" btn btn-primary" >{{ ucfirst (__ (' laravel-crm::lang.upload' )) } } </button >
13
+ </div >
14
+ @endif
10
15
</form >
11
16
<hr />
12
17
@endif
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ public function boot(SettingService $settingService)
24
24
public function mount ($ model )
25
25
{
26
26
$ this ->model = $ model ;
27
- $ this ->getActivities ();
28
27
}
29
28
30
29
public function getActivities ()
@@ -50,6 +49,7 @@ public function getActivities()
50
49
51
50
public function render ()
52
51
{
52
+ $ this ->getActivities ();
53
53
return view ('laravel-crm::livewire.activities ' );
54
54
}
55
55
}
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ class LiveCalls extends Component
25
25
26
26
protected $ listeners = [
27
27
'addCallActivity ' => 'addCallOn ' ,
28
- 'callDeleted ' => 'getCalls ' ,
29
- 'callCompleted ' => 'getCalls ' ,
28
+ 'callDeleted ' => '$refresh ' ,
29
+ 'callCompleted ' => '$refresh ' ,
30
30
];
31
31
32
32
public function boot (SettingService $ settingService )
@@ -37,7 +37,6 @@ public function boot(SettingService $settingService)
37
37
public function mount ($ model )
38
38
{
39
39
$ this ->model = $ model ;
40
- $ this ->getCalls ();
41
40
42
41
if (! $ this ->calls || ($ this ->calls && $ this ->calls ->count () < 1 )) {
43
42
$ this ->showForm = true ;
@@ -134,12 +133,11 @@ private function resetFields()
134
133
$ this ->dispatchBrowserEvent ('callFieldsReset ' );
135
134
136
135
$ this ->addCallToggle ();
137
-
138
- $ this ->getCalls ();
139
136
}
140
137
141
138
public function render ()
142
139
{
140
+ $ this ->getCalls ();
143
141
return view ('laravel-crm::livewire.calls ' );
144
142
}
145
143
}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class LiveFiles extends Component
23
23
24
24
protected $ listeners = [
25
25
'addFileActivity ' => 'addFileOn ' ,
26
- 'fileDeleted ' => 'getFiles ' ,
26
+ 'fileDeleted ' => '$refresh ' ,
27
27
];
28
28
29
29
public function boot (SettingService $ settingService )
@@ -35,7 +35,6 @@ public function mount($model)
35
35
{
36
36
$ this ->model = $ model ;
37
37
$ this ->random = rand ();
38
- $ this ->getFiles ();
39
38
40
39
if (! $ this ->files || ($ this ->files && $ this ->files ->count () < 1 )) {
41
40
$ this ->showForm = true ;
@@ -115,11 +114,11 @@ private function resetFields()
115
114
{
116
115
$ this ->reset ('file ' );
117
116
$ this ->random = rand ();
118
- $ this ->getFiles ();
119
117
}
120
118
121
119
public function render ()
122
120
{
121
+ $ this ->getFiles ();
123
122
return view ('laravel-crm::livewire.files ' );
124
123
}
125
124
}
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ class LiveLunches extends Component
25
25
26
26
protected $ listeners = [
27
27
'addLunchActivity ' => 'addLunchOn ' ,
28
- 'lunchDeleted ' => 'getLunches ' ,
29
- 'lunchCompleted ' => 'getLunches ' ,
28
+ 'lunchDeleted ' => '$refresh ' ,
29
+ 'lunchCompleted ' => '$refresh ' ,
30
30
];
31
31
32
32
public function boot (SettingService $ settingService )
@@ -37,7 +37,6 @@ public function boot(SettingService $settingService)
37
37
public function mount ($ model )
38
38
{
39
39
$ this ->model = $ model ;
40
- $ this ->getLunches ();
41
40
42
41
if (! $ this ->lunches || ($ this ->lunches && $ this ->lunches ->count () < 1 )) {
43
42
$ this ->showForm = true ;
@@ -134,12 +133,11 @@ private function resetFields()
134
133
$ this ->dispatchBrowserEvent ('lunchFieldsReset ' );
135
134
136
135
$ this ->addLunchToggle ();
137
-
138
- $ this ->getLunches ();
139
136
}
140
137
141
138
public function render ()
142
139
{
140
+ $ this ->getLunches ();
143
141
return view ('laravel-crm::livewire.lunches ' );
144
142
}
145
143
}
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ class LiveMeetings extends Component
25
25
26
26
protected $ listeners = [
27
27
'addMeetingActivity ' => 'addMeetingOn ' ,
28
- 'meetingDeleted ' => 'getMeetings ' ,
29
- 'meetingCompleted ' => 'getMeetings ' ,
28
+ 'meetingDeleted ' => '$refresh ' ,
29
+ 'meetingCompleted ' => '$refresh ' ,
30
30
];
31
31
32
32
public function boot (SettingService $ settingService )
@@ -37,7 +37,6 @@ public function boot(SettingService $settingService)
37
37
public function mount ($ model )
38
38
{
39
39
$ this ->model = $ model ;
40
- $ this ->getMeetings ();
41
40
42
41
if (! $ this ->meetings || ($ this ->meetings && $ this ->meetings ->count () < 1 )) {
43
42
$ this ->showForm = true ;
@@ -134,12 +133,11 @@ private function resetFields()
134
133
$ this ->dispatchBrowserEvent ('meetingFieldsReset ' );
135
134
136
135
$ this ->addMeetingToggle ();
137
-
138
- $ this ->getMeetings ();
139
136
}
140
137
141
138
public function render ()
142
139
{
140
+ $ this ->getMeetings ();
143
141
return view ('laravel-crm::livewire.meetings ' );
144
142
}
145
143
}
Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ class LiveNotes extends Component
22
22
23
23
protected $ listeners = [
24
24
'addNoteActivity ' => 'addNoteOn ' ,
25
- 'noteDeleted ' => 'getNotes ' ,
26
- 'notePinned ' => 'getNotes ' ,
27
- 'noteUnpinned ' => 'getNotes ' ,
25
+ 'noteDeleted ' => '$refresh ' ,
26
+ 'notePinned ' => '$refresh ' ,
27
+ 'noteUnpinned ' => '$refresh ' ,
28
28
];
29
29
30
30
public function boot (SettingService $ settingService )
@@ -36,7 +36,6 @@ public function mount($model, $pinned = false)
36
36
{
37
37
$ this ->model = $ model ;
38
38
$ this ->pinned = $ pinned ;
39
- $ this ->getNotes ();
40
39
41
40
if (! $ this ->notes || ($ this ->notes && $ this ->notes ->count () < 1 )) {
42
41
$ this ->showForm = true ;
@@ -117,11 +116,12 @@ public function addNoteOn()
117
116
private function resetFields ()
118
117
{
119
118
$ this ->reset ('content ' , 'noted_at ' );
120
- $ this -> getNotes ();
119
+
121
120
}
122
121
123
122
public function render ()
124
123
{
124
+ $ this ->getNotes ();
125
125
return view ('laravel-crm::livewire.notes ' );
126
126
}
127
127
}
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ class LiveTasks extends Component
21
21
22
22
protected $ listeners = [
23
23
'addTaskActivity ' => 'addTaskOn ' ,
24
- 'taskDeleted ' => 'getTasks ' ,
25
- 'taskCompleted ' => 'getTasks ' ,
24
+ 'taskDeleted ' => '$refresh ' ,
25
+ 'taskCompleted ' => '$refresh ' ,
26
26
];
27
27
28
28
public function boot (SettingService $ settingService )
@@ -33,7 +33,6 @@ public function boot(SettingService $settingService)
33
33
public function mount ($ model )
34
34
{
35
35
$ this ->model = $ model ;
36
- $ this ->getTasks ();
37
36
38
37
if (! $ this ->tasks || ($ this ->tasks && $ this ->tasks ->count () < 1 )) {
39
38
$ this ->showForm = true ;
@@ -114,11 +113,11 @@ public function addTaskOn()
114
113
private function resetFields ()
115
114
{
116
115
$ this ->reset ('name ' , 'description ' , 'due_at ' );
117
- $ this ->getTasks ();
118
116
}
119
117
120
118
public function render ()
121
119
{
120
+ $ this ->getTasks ();
122
121
return view ('laravel-crm::livewire.tasks ' );
123
122
}
124
123
}
You can’t perform that action at this time.
0 commit comments