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 44 @if ($showForm )
55 <form wire:submit.prevent =" upload" id =" inputUploadForm" >
66 @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...
99 </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
1015 </form >
1116 <hr />
1217 @endif
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ public function boot(SettingService $settingService)
2424 public function mount ($ model )
2525 {
2626 $ this ->model = $ model ;
27- $ this ->getActivities ();
2827 }
2928
3029 public function getActivities ()
@@ -50,6 +49,7 @@ public function getActivities()
5049
5150 public function render ()
5251 {
52+ $ this ->getActivities ();
5353 return view ('laravel-crm::livewire.activities ' );
5454 }
5555}
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ class LiveCalls extends Component
2525
2626 protected $ listeners = [
2727 'addCallActivity ' => 'addCallOn ' ,
28- 'callDeleted ' => 'getCalls ' ,
29- 'callCompleted ' => 'getCalls ' ,
28+ 'callDeleted ' => '$refresh ' ,
29+ 'callCompleted ' => '$refresh ' ,
3030 ];
3131
3232 public function boot (SettingService $ settingService )
@@ -37,7 +37,6 @@ public function boot(SettingService $settingService)
3737 public function mount ($ model )
3838 {
3939 $ this ->model = $ model ;
40- $ this ->getCalls ();
4140
4241 if (! $ this ->calls || ($ this ->calls && $ this ->calls ->count () < 1 )) {
4342 $ this ->showForm = true ;
@@ -134,12 +133,11 @@ private function resetFields()
134133 $ this ->dispatchBrowserEvent ('callFieldsReset ' );
135134
136135 $ this ->addCallToggle ();
137-
138- $ this ->getCalls ();
139136 }
140137
141138 public function render ()
142139 {
140+ $ this ->getCalls ();
143141 return view ('laravel-crm::livewire.calls ' );
144142 }
145143}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class LiveFiles extends Component
2323
2424 protected $ listeners = [
2525 'addFileActivity ' => 'addFileOn ' ,
26- 'fileDeleted ' => 'getFiles ' ,
26+ 'fileDeleted ' => '$refresh ' ,
2727 ];
2828
2929 public function boot (SettingService $ settingService )
@@ -35,7 +35,6 @@ public function mount($model)
3535 {
3636 $ this ->model = $ model ;
3737 $ this ->random = rand ();
38- $ this ->getFiles ();
3938
4039 if (! $ this ->files || ($ this ->files && $ this ->files ->count () < 1 )) {
4140 $ this ->showForm = true ;
@@ -115,11 +114,11 @@ private function resetFields()
115114 {
116115 $ this ->reset ('file ' );
117116 $ this ->random = rand ();
118- $ this ->getFiles ();
119117 }
120118
121119 public function render ()
122120 {
121+ $ this ->getFiles ();
123122 return view ('laravel-crm::livewire.files ' );
124123 }
125124}
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ class LiveLunches extends Component
2525
2626 protected $ listeners = [
2727 'addLunchActivity ' => 'addLunchOn ' ,
28- 'lunchDeleted ' => 'getLunches ' ,
29- 'lunchCompleted ' => 'getLunches ' ,
28+ 'lunchDeleted ' => '$refresh ' ,
29+ 'lunchCompleted ' => '$refresh ' ,
3030 ];
3131
3232 public function boot (SettingService $ settingService )
@@ -37,7 +37,6 @@ public function boot(SettingService $settingService)
3737 public function mount ($ model )
3838 {
3939 $ this ->model = $ model ;
40- $ this ->getLunches ();
4140
4241 if (! $ this ->lunches || ($ this ->lunches && $ this ->lunches ->count () < 1 )) {
4342 $ this ->showForm = true ;
@@ -134,12 +133,11 @@ private function resetFields()
134133 $ this ->dispatchBrowserEvent ('lunchFieldsReset ' );
135134
136135 $ this ->addLunchToggle ();
137-
138- $ this ->getLunches ();
139136 }
140137
141138 public function render ()
142139 {
140+ $ this ->getLunches ();
143141 return view ('laravel-crm::livewire.lunches ' );
144142 }
145143}
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ class LiveMeetings extends Component
2525
2626 protected $ listeners = [
2727 'addMeetingActivity ' => 'addMeetingOn ' ,
28- 'meetingDeleted ' => 'getMeetings ' ,
29- 'meetingCompleted ' => 'getMeetings ' ,
28+ 'meetingDeleted ' => '$refresh ' ,
29+ 'meetingCompleted ' => '$refresh ' ,
3030 ];
3131
3232 public function boot (SettingService $ settingService )
@@ -37,7 +37,6 @@ public function boot(SettingService $settingService)
3737 public function mount ($ model )
3838 {
3939 $ this ->model = $ model ;
40- $ this ->getMeetings ();
4140
4241 if (! $ this ->meetings || ($ this ->meetings && $ this ->meetings ->count () < 1 )) {
4342 $ this ->showForm = true ;
@@ -134,12 +133,11 @@ private function resetFields()
134133 $ this ->dispatchBrowserEvent ('meetingFieldsReset ' );
135134
136135 $ this ->addMeetingToggle ();
137-
138- $ this ->getMeetings ();
139136 }
140137
141138 public function render ()
142139 {
140+ $ this ->getMeetings ();
143141 return view ('laravel-crm::livewire.meetings ' );
144142 }
145143}
Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ class LiveNotes extends Component
2222
2323 protected $ listeners = [
2424 'addNoteActivity ' => 'addNoteOn ' ,
25- 'noteDeleted ' => 'getNotes ' ,
26- 'notePinned ' => 'getNotes ' ,
27- 'noteUnpinned ' => 'getNotes ' ,
25+ 'noteDeleted ' => '$refresh ' ,
26+ 'notePinned ' => '$refresh ' ,
27+ 'noteUnpinned ' => '$refresh ' ,
2828 ];
2929
3030 public function boot (SettingService $ settingService )
@@ -36,7 +36,6 @@ public function mount($model, $pinned = false)
3636 {
3737 $ this ->model = $ model ;
3838 $ this ->pinned = $ pinned ;
39- $ this ->getNotes ();
4039
4140 if (! $ this ->notes || ($ this ->notes && $ this ->notes ->count () < 1 )) {
4241 $ this ->showForm = true ;
@@ -117,11 +116,12 @@ public function addNoteOn()
117116 private function resetFields ()
118117 {
119118 $ this ->reset ('content ' , 'noted_at ' );
120- $ this -> getNotes ();
119+
121120 }
122121
123122 public function render ()
124123 {
124+ $ this ->getNotes ();
125125 return view ('laravel-crm::livewire.notes ' );
126126 }
127127}
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ class LiveTasks extends Component
2121
2222 protected $ listeners = [
2323 'addTaskActivity ' => 'addTaskOn ' ,
24- 'taskDeleted ' => 'getTasks ' ,
25- 'taskCompleted ' => 'getTasks ' ,
24+ 'taskDeleted ' => '$refresh ' ,
25+ 'taskCompleted ' => '$refresh ' ,
2626 ];
2727
2828 public function boot (SettingService $ settingService )
@@ -33,7 +33,6 @@ public function boot(SettingService $settingService)
3333 public function mount ($ model )
3434 {
3535 $ this ->model = $ model ;
36- $ this ->getTasks ();
3736
3837 if (! $ this ->tasks || ($ this ->tasks && $ this ->tasks ->count () < 1 )) {
3938 $ this ->showForm = true ;
@@ -114,11 +113,11 @@ public function addTaskOn()
114113 private function resetFields ()
115114 {
116115 $ this ->reset ('name ' , 'description ' , 'due_at ' );
117- $ this ->getTasks ();
118116 }
119117
120118 public function render ()
121119 {
120+ $ this ->getTasks ();
122121 return view ('laravel-crm::livewire.tasks ' );
123122 }
124123}
You can’t perform that action at this time.
0 commit comments