fixed
This commit is contained in:
parent
645929ae4e
commit
696d2214d3
|
|
@ -56,7 +56,6 @@ public function saveDownloads()
|
|||
$this->project->startDownload($date);
|
||||
});
|
||||
|
||||
|
||||
$this->showDownloadModal = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,10 @@ private function resetFormData()
|
|||
public function render()
|
||||
{
|
||||
return view('livewire.projects.mailing-manager', [
|
||||
'mailings' => $this->project->mailings()->orderBy('created_at', 'desc')->paginate(10, pageName: 'mailingPage'),
|
||||
'mailings' => $this->project
|
||||
->mailings()
|
||||
->orderBy('created_at', 'desc')
|
||||
->paginate(10, pageName: 'mailingPage'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,12 @@
|
|||
use App\Jobs\ProjectMosiacGeneratorJob;
|
||||
use App\Models\Project;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
class MosaicManager extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
public $project;
|
||||
|
||||
public $formData = [
|
||||
|
|
@ -23,7 +26,10 @@ public function mount(Project $project) {
|
|||
public function render()
|
||||
{
|
||||
return view('livewire.projects.mosaic-manager', [
|
||||
'downloads' => $this->project
|
||||
'mosaics' => $this->project->mosaics()
|
||||
->orderBy('year','desc')
|
||||
->orderBy('week', 'desc')
|
||||
->paginate(10, pageName: 'mosaicPage')
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,9 +7,12 @@
|
|||
use App\Models\ProjectReport;
|
||||
use App\Rules\AllMosaicsPresentRule;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
class ReportManager extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
public $formData = [];
|
||||
public $project_id;
|
||||
|
||||
|
|
@ -30,8 +33,12 @@ public function mount(Project $project)
|
|||
|
||||
public function render()
|
||||
{
|
||||
$project = Project::find($this->project_id);
|
||||
return view('livewire.projects.report-manager')->with(compact('project'));
|
||||
$reports = Project::find($this->project_id)
|
||||
->reports()
|
||||
->orderBy('year', 'desc')
|
||||
->orderBy('week', 'desc')
|
||||
->paginate(10, pageName: 'reportPage');
|
||||
return view('livewire.projects.report-manager')->with(compact('reports'));
|
||||
}
|
||||
|
||||
private function resetFormData()
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@ class="block rounded-md bg-indigo-600 px-3 py-2 text-center text-sm font-semibol
|
|||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 lg:pl-8">
|
||||
Name
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||
Year-Week
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||
Status
|
||||
</th>
|
||||
|
|
@ -35,20 +38,30 @@ class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 lg
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200 bg-white">
|
||||
@foreach($project->mosaics()->orderBy('year','desc')->orderBy('week', 'desc')->get() as $mosaic)
|
||||
@foreach($mosaics as $mosaic)
|
||||
<tr>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8">{{ $project->name }}</td>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||
{{ $mosaic->name }}-{{ $mosaic->week}}
|
||||
</td>
|
||||
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6 lg:pr-8">
|
||||
<x-badge :status="$mosaic->status"></x-badge>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8">{{ $mosaic->name }}</td>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||
{{ $mosaic->year }}-{{ $mosaic->week}}
|
||||
</td>
|
||||
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-left text-sm font-medium sm:pr-6 lg:pr-8">
|
||||
<x-badge :status="$mosaic->status"></x-badge>
|
||||
</td>
|
||||
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6 lg:pr-8">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="pt-4 flex justify-between items-center">
|
||||
<div class="text-gray-700 text-sm">
|
||||
Results: {{ \Illuminate\Support\Number::format($mosaics->total()) }}
|
||||
</div>
|
||||
|
||||
{{ $mosaics->links('livewire.pagination') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -37,12 +37,19 @@ class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 lg
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200 bg-white">
|
||||
@foreach($project->reports()->orderBy('year', 'desc')->orderBy('week', 'desc')->get() as $report)
|
||||
@foreach($reports as $report)
|
||||
<livewire:project.report-row :$report :key="$report->id"/>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="pt-4 flex justify-between items-center">
|
||||
<div class="text-gray-700 text-sm">
|
||||
Results: {{ \Illuminate\Support\Number::format($reports->total()) }}
|
||||
</div>
|
||||
|
||||
{{ $reports->links('livewire.pagination') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue