stan errors
This commit is contained in:
@@ -23,7 +23,7 @@ class TuitionPaymentOrderFieldsForDetail
|
||||
/**
|
||||
* Get fields for detail view
|
||||
*
|
||||
* @return array<int, Panel|\Laravel\Nova\Fields\Field|array<int, \Laravel\Nova\Fields\Field>>
|
||||
* @return array<int, \Laravel\Nova\Panel>
|
||||
*/
|
||||
public static function make(NovaTuitionPaymentOrder $resource): array
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Modules\TuitionPaymentOrder\Nova\Resources\Concerns;
|
||||
|
||||
use App\Modules\TuitionPaymentOrder\Nova\Resources\NovaTuitionPaymentOrder;
|
||||
use App\Nova\Resources\Branch\Branch;
|
||||
use App\Repos\Order\OrderRepo;
|
||||
use App\Repos\System\Settings\Location\RegionRepo;
|
||||
@@ -16,8 +17,10 @@ class TuitionPaymentOrderFieldsForIndex
|
||||
{
|
||||
/**
|
||||
* Loan Order fields for "create"
|
||||
*
|
||||
* @return array<int, \Laravel\Nova\Fields\Field>
|
||||
*/
|
||||
public static function make($resource): array
|
||||
public static function make(NovaTuitionPaymentOrder $resource): array
|
||||
{
|
||||
return [
|
||||
ID::make()->hide(),
|
||||
|
||||
@@ -24,9 +24,6 @@ use Laravel\Nova\Http\Requests\NovaRequest;
|
||||
use Nurmuhammet\NovaInputmask\NovaInputmask;
|
||||
use Outl1ne\NovaSimpleRepeatable\SimpleRepeatable;
|
||||
|
||||
/**
|
||||
* @template TModel of \App\Modules\TuitionPaymentOrder\Models\TuitionPaymentOrder
|
||||
*/
|
||||
class NovaTuitionPaymentOrder extends Resource
|
||||
{
|
||||
/**
|
||||
@@ -96,6 +93,8 @@ class NovaTuitionPaymentOrder extends Resource
|
||||
|
||||
/**
|
||||
* Get the fields for index.
|
||||
*
|
||||
* @return array<int, \Laravel\Nova\Fields\Field>
|
||||
*/
|
||||
public function fieldsForIndex(): array
|
||||
{
|
||||
@@ -104,6 +103,8 @@ class NovaTuitionPaymentOrder extends Resource
|
||||
|
||||
/**
|
||||
* Get the fields for detail
|
||||
*
|
||||
* @return array<int, \Laravel\Nova\Panel>
|
||||
*/
|
||||
public function fieldsForDetail(): array
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Modules\VisaMasterPaymentOrder\Nova\Resources\Concerns;
|
||||
|
||||
use App\Modules\VisaMasterPaymentOrder\Models\VisaMasterPaymentOrder;
|
||||
use App\Modules\VisaMasterPaymentOrder\Nova\Resources\NovaVisaMasterPaymentOrder;
|
||||
use App\Modules\VisaMasterPaymentOrder\Nova\Resources\NovaVisaMasterPaymentOrderItem;
|
||||
use App\Nova\Resources\Branch\Branch;
|
||||
use App\Nova\User;
|
||||
@@ -25,9 +26,9 @@ class VisaMasterPaymentOrderFieldsForDetail
|
||||
/**
|
||||
* Get fields for detail view
|
||||
*
|
||||
* @return array
|
||||
* @return array<int, \Laravel\Nova\Panel|\Laravel\Nova\Fields\Field>
|
||||
*/
|
||||
public static function make($resource): array
|
||||
public static function make(NovaVisaMasterPaymentOrder $resource): array
|
||||
{
|
||||
return [
|
||||
new Panel(__('Status'), [
|
||||
@@ -204,13 +205,16 @@ class VisaMasterPaymentOrderFieldsForDetail
|
||||
/**
|
||||
* Paid field
|
||||
*/
|
||||
public static function paidField($resource, $date = null)
|
||||
public static function paidField(NovaVisaMasterPaymentOrder $resource, ?string $date = null): string
|
||||
{
|
||||
$paid = false;
|
||||
$items = $resource->paymentItems;
|
||||
/** @var \App\Modules\VisaMasterPaymentOrder\Models\VisaMasterPaymentOrder */
|
||||
$model = $resource->model();
|
||||
|
||||
$items = $model->paymentItems;
|
||||
|
||||
$month = $date ?: date('m');
|
||||
|
||||
$paid = false;
|
||||
foreach ($items as $item) {
|
||||
if (boolval($item->paid)) {
|
||||
if ($item->created_at->format('m') == $month) {
|
||||
|
||||
@@ -33,9 +33,6 @@ use Nurmuhammet\NovaInputmask\NovaInputmask;
|
||||
use Outl1ne\NovaDetachedFilters\NovaDetachedFilters;
|
||||
use Outl1ne\NovaSimpleRepeatable\SimpleRepeatable;
|
||||
|
||||
/**
|
||||
* @template TModel of \App\Modules\VisaMasterPaymentOrder\Models\VisaMasterPaymentOrder
|
||||
*/
|
||||
class NovaVisaMasterPaymentOrder extends Resource
|
||||
{
|
||||
use VisaMasterAuth;
|
||||
|
||||
Reference in New Issue
Block a user