[Done] Mail scheduled sync with db.
This commit is contained in:
parent
43dd3c5e09
commit
4348a28033
|
|
@ -24,6 +24,7 @@ class Project extends Model
|
|||
'mail_subject',
|
||||
'mail_frequency',
|
||||
'mail_day',
|
||||
'mail_scheduled',
|
||||
'download_path',
|
||||
'pivot_json_path',
|
||||
'span_json_path',
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
<span class="inline-flex items-center rounded-md {{ $this->getColorClasses() }} px-1.5 py-0.5 text-xs font-medium"
|
||||
@if($this->type)
|
||||
x-init="Echo.private(`{{$this->type}}.@js($this->id)`).listen('Project{{ucfirst($this->type)}}Status', (e) => {
|
||||
console.log(e.project{{ucfirst($this->type)}}.status);
|
||||
if(e.project{{ucfirst($this->type)}}.status){
|
||||
$wire.setStatus(e.project{{ucfirst($this->type)}}.status);
|
||||
console.log('update pending message');
|
||||
$wire.refreshPendingMessage();
|
||||
}
|
||||
});"
|
||||
|
|
|
|||
|
|
@ -79,7 +79,8 @@ class="flex flex-col md:w-2/3"
|
|||
</div>
|
||||
</div>
|
||||
<label class="inline-flex items-center cursor-pointer gap-4">
|
||||
<input x-ref="subject" type="checkbox" class="sr-only peer" @click="showMail = $el.checked" x-init="$el.checked = showMail">
|
||||
<input x-ref="subject" type="checkbox" class="sr-only peer" wire:model="formData.mail_scheduled" @click="showMail = $el.checked" x-init="$el.checked = showMail">
|
||||
{{-- TODO doesn't save mail_scheduled in DB--}}
|
||||
<div class="relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-indigo-300 dark:peer-focus:ring-indigo-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-indigo-600"></div>
|
||||
</label>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue