Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/Imports/KodeArsipsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ public function __construct($tata_naskah_id)
{
$this->tata_naskah_id = $tata_naskah_id;
}

public function collection(Collection $rows)
{
foreach ($rows as $row) {
KodeArsip::updateOrCreate(
['detail' => $row['detail']],
[
'detail' =>$row['detail'],
'detail' => $row['detail'],
'tata_naskah_id' => $this->tata_naskah_id,
'kode' => $row['kode'],
'group' => $row['group'],
Expand Down
5 changes: 3 additions & 2 deletions app/Nova/KodeArsip.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@

namespace App\Nova;

use Illuminate\Http\Request;
use App\Nova\Filters\GroupArsip;
use Illuminate\Http\Request;
use Laravel\Nova\Fields\BelongsTo;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Http\Requests\NovaRequest;

class KodeArsip extends Resource
{
public static $with = ['tataNaskah'];

/**
* Get the label for the resource.
*
Expand Down Expand Up @@ -64,7 +65,7 @@ public function fields(NovaRequest $request)
->sortable()
->rules('required'),
BelongsTo::make('Tata Naskah')
->rules('required'),
->rules('required'),
];
}

Expand Down
3 changes: 2 additions & 1 deletion app/Nova/KodeNaskah.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

namespace App\Nova;

use Laravel\Nova\Fields\BelongsTo;
use Illuminate\Http\Request;
use Laravel\Nova\Fields\BelongsTo;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Http\Requests\NovaRequest;

class KodeNaskah extends Resource
{
public static $with = ['tataNaskah'];

/**
* Get the label for the resource.
*
Expand Down
1 change: 1 addition & 0 deletions app/Nova/MataAnggaran.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
class MataAnggaran extends Resource
{
public static $with = ['dipa'];

public static function label()
{
return 'Mata Anggaran Kegiatan';
Expand Down
19 changes: 10 additions & 9 deletions app/Nova/TataNaskah.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
class TataNaskah extends Resource
{
public static $with = ['kodeNaskah', 'kodeArsip'];

public static function label()
{
return 'Tata Naskah';
Expand Down Expand Up @@ -50,15 +51,15 @@ public static function label()
public function fields(NovaRequest $request)
{
return [
Text::make('Nomor', 'nomor')
->sortable()
->rules('required'),
Date::make('Tanggal', 'tanggal')
->sortable()
->displayUsing(fn ($tanggal) => Helper::terbilangTanggal($tanggal))
->rules('required'),
HasMany::make('Kode Naskah'),
HasMany::make('Kode Arsip'),
Text::make('Nomor', 'nomor')
->sortable()
->rules('required'),
Date::make('Tanggal', 'tanggal')
->sortable()
->displayUsing(fn ($tanggal) => Helper::terbilangTanggal($tanggal))
->rules('required'),
HasMany::make('Kode Naskah'),
HasMany::make('Kode Arsip'),
];
}

Expand Down
2 changes: 1 addition & 1 deletion app/Policies/KodeArsipPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class KodeArsipPolicy
{
/**
/**
* Determine whether the user can view any models.
*/
public function viewAny(): bool
Expand Down