Card Requisite
This commit is contained in:
@@ -127,6 +127,14 @@ class CardResource extends Resource
|
|||||||
->modalContent(fn (Card $record): View => CardBalanceRepository::make()->showCardBalance($record))
|
->modalContent(fn (Card $record): View => CardBalanceRepository::make()->showCardBalance($record))
|
||||||
->modalFooterActions([]),
|
->modalFooterActions([]),
|
||||||
|
|
||||||
|
Action::make('card_balance')
|
||||||
|
->label(__('Card requisite'))
|
||||||
|
->icon('heroicon-m-document-text')
|
||||||
|
->requiresConfirmation()
|
||||||
|
->modal()
|
||||||
|
->modalContent(fn (Card $record): View => CardBalanceRepository::make()->showCardBalance($record))
|
||||||
|
->modalFooterActions([]),
|
||||||
|
|
||||||
EditAction::make()
|
EditAction::make()
|
||||||
->label(''),
|
->label(''),
|
||||||
DeleteAction::make()
|
DeleteAction::make()
|
||||||
|
|||||||
64
app/Modules/CardRequisite/CardRequisiteModule.php
Normal file
64
app/Modules/CardRequisite/CardRequisiteModule.php
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Modules\CardRequisite;
|
||||||
|
|
||||||
|
use App\Modules\Makeable;
|
||||||
|
use App\Modules\ModuleContract;
|
||||||
|
|
||||||
|
class CardRequisiteModule implements ModuleContract
|
||||||
|
{
|
||||||
|
use Makeable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module is enabled
|
||||||
|
*/
|
||||||
|
protected bool $enabled = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if is module enabled
|
||||||
|
*/
|
||||||
|
public function isEnabled(): bool
|
||||||
|
{
|
||||||
|
return $this->enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disable module
|
||||||
|
*/
|
||||||
|
public function disable(): void
|
||||||
|
{
|
||||||
|
$this->enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable module
|
||||||
|
*/
|
||||||
|
public function enable(): void
|
||||||
|
{
|
||||||
|
$this->enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if module has a filament resource
|
||||||
|
*/
|
||||||
|
public function hasFilamentResource(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get module composer requirements
|
||||||
|
*/
|
||||||
|
public function getComposerRequirements(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get module composer suggestions
|
||||||
|
*/
|
||||||
|
public function getComposerSuggestions(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Modules\CardRequisite\Repositories;
|
||||||
|
|
||||||
|
use App\Modules\CardRequisite\Models\CardRequisite;
|
||||||
|
use App\Modules\Makeable;
|
||||||
|
|
||||||
|
class CardRequisiteRepository
|
||||||
|
{
|
||||||
|
use Makeable;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -41,6 +41,8 @@ class SmsRepository
|
|||||||
return $res->getBody();
|
return $res->getBody();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
Log::error($e);
|
Log::error($e);
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user