Skip to content

Commit

Permalink
bugs fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
manusiakemos committed Jan 23, 2025
1 parent 88faa19 commit a0f0e36
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
18 changes: 9 additions & 9 deletions src/Console/stubs/livewire-modal.stub
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ use WireUi\Traits\WireUiActions;

class {@className}Page extends Component
{
use WireUiActions;

protected $listeners = ['create', 'edit'];
protected {@className}Repository ${@classNameLower}Repository;

public mixed $myFile = null;

use WireUiActions;
public mixed $myFile = null;
public bool $updateMode = false;
public array ${@classNameLower} = {@generatedProps};
public bool $showModalForm = false;
Expand All @@ -36,11 +36,6 @@ class {@className}Page extends Component
public function render(): Factory|View|Application
{
return view('livewire.{@classNameSlug}.{@classNameSlug}-page');
}

public function setOptions()
{

}

public function save(): void
Expand All @@ -57,7 +52,7 @@ class {@className}Page extends Component
public function create(): void
{
$this->reset(['{@classNameLower}', 'updateMode', 'myFile']);
$this->setOptions();
// $this->setOptions();
$this->showModalForm = true;
}

Expand Down Expand Up @@ -119,4 +114,9 @@ class {@className}Page extends Component
$this->dispatch('refreshDt', false);
$this->reset(['{@classNameLower}', 'updateMode']);
}

public function setOptions()
{

}
}
4 changes: 3 additions & 1 deletion src/Console/stubs/nav.stub
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
@if(\Illuminate\Support\Facades\Route::has('{@classNameSlug}'))
<x-atoms.navigation-item session-active="{@classNameSlug}" link="{{ route('{@classNameSlug}') }}">
<x-slot name="icon">
<x-atoms.icon d=""/>
<x-atoms.remixicon>
{{--svg here--}}
</x-atoms.remixicon>
</x-slot>
{@classNameSpace}
</x-atoms.navigation-item>
Expand Down
4 changes: 1 addition & 3 deletions src/Console/stubs/page-modal.stub
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,5 @@


@push('scripts')
@push('scripts')
<x-atoms.default-script page-name="{@classNameSlug}" />
@endpush
<x-atoms.default-script page-name="{@classNameSlug}" />
@endpush
1 change: 1 addition & 0 deletions src/Console/stubs/table-class.stub
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class {@className}Table extends DataTableComponent
$this->setPrimaryKey("{@primaryKey}")
->setUseHeaderAsFooterEnabled()
->setPerPageAccepted([10, 25, 50])
->setDefaultSort('created_at', 'desc')
->setThAttributes(function (Column $column) {
if ($column->getTitle() == 'Action') {
return [
Expand Down

0 comments on commit a0f0e36

Please sign in to comment.