ranjith-dev #319
@@ -56,7 +56,7 @@ class LocatorInvoiceValidationResource extends Resource
|
||||
->options(function (callable $get) {
|
||||
$userHas = Filament::auth()->user()->plant_id;
|
||||
|
||||
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::pluck('name', 'id')->toArray();
|
||||
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::orderBy('code')->pluck('name', 'id')->toArray();
|
||||
})
|
||||
->disabled(fn (Get $get) => $get('invoice_number'))
|
||||
->required()
|
||||
@@ -498,7 +498,7 @@ class LocatorInvoiceValidationResource extends Resource
|
||||
->options(function (callable $get) {
|
||||
$userHas = Filament::auth()->user()->plant_id;
|
||||
|
||||
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::pluck('name', 'id')->toArray();
|
||||
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::orderBy('code')->pluck('name', 'id')->toArray();
|
||||
})
|
||||
->label('Select Plant')
|
||||
->required()
|
||||
@@ -534,8 +534,7 @@ class LocatorInvoiceValidationResource extends Resource
|
||||
// $invoiceNumber = trim(str_replace('.xlsx', '', $originalName));
|
||||
// $originalNameOnly = pathinfo($originalName, PATHINFO_FILENAME);
|
||||
|
||||
$folderPath = Configuration::where('c_name', 'INVOICE_FOLDER_PATH')
|
||||
->value('c_value');
|
||||
$folderPath = 'ExportDispatch'; // Configuration::where('c_name', 'INVOICE_FOLDER_PATH')->value('c_value');
|
||||
|
||||
$fullFolderPath = "uploads/$folderPath";
|
||||
|
||||
@@ -708,7 +707,7 @@ class LocatorInvoiceValidationResource extends Resource
|
||||
->options(function (callable $get) {
|
||||
$userHas = Filament::auth()->user()->plant_id;
|
||||
|
||||
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::pluck('name', 'id')->toArray();
|
||||
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::orderBy('code')->pluck('name', 'id')->toArray();
|
||||
})
|
||||
->reactive()
|
||||
->afterStateUpdated(function ($state, callable $set, callable $get): void {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -21,9 +21,9 @@ class AdminSeeder extends Seeder
|
||||
// Data to update/create
|
||||
[
|
||||
'name' => 'Admin',
|
||||
'password' => Hash::make('jOtHi$9000'),
|
||||
'password' => Hash::make('jOtHi#9000'),
|
||||
'updated_at' => now(),
|
||||
'created_at' => now()
|
||||
'created_at' => now(),
|
||||
]
|
||||
);
|
||||
// $user1 = User::firstOrCreate([
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Spatie\Permission\Models\Permission;
|
||||
|
||||
@@ -26,7 +25,7 @@ class PermissionSeeder extends Seeder
|
||||
'edit roles',
|
||||
'delete roles',
|
||||
'restore roles',
|
||||
'force-delete roles'
|
||||
'force-delete roles',
|
||||
];
|
||||
|
||||
foreach ($permissions as $permission) {
|
||||
@@ -163,6 +162,7 @@ class PermissionSeeder extends Seeder
|
||||
Permission::updateOrCreate(['name' => 'create web capture page']);
|
||||
|
||||
Permission::updateOrCreate(['name' => 'view invoice pending reason']);
|
||||
Permission::updateOrCreate(['name' => 'view file manager page']);
|
||||
|
||||
Permission::updateOrCreate(['name' => 'view import invoice out validation']);
|
||||
Permission::updateOrCreate(['name' => 'view export invoice out validation']);
|
||||
@@ -181,5 +181,10 @@ class PermissionSeeder extends Seeder
|
||||
Permission::updateOrCreate(['name' => 'view import invoice in transit']);
|
||||
Permission::updateOrCreate(['name' => 'view export invoice in transit']);
|
||||
|
||||
Permission::updateOrCreate(['name' => 'view import request characteristic']);
|
||||
Permission::updateOrCreate(['name' => 'view export request characteristic']);
|
||||
|
||||
Permission::updateOrCreate(['name' => 'view import characteristic approver master']);
|
||||
Permission::updateOrCreate(['name' => 'view export characteristic approver master']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,17 @@ class UserSeeder extends Seeder
|
||||
public function run(): void
|
||||
{
|
||||
$user1 = User::updateOrCreate(
|
||||
['email' => 'RAS00332@cripumps.com'],
|
||||
[
|
||||
'name' => 'Jeithef Shibu C',
|
||||
'password' => bcrypt('ShIbu#123'),
|
||||
'updated_at' => now(),
|
||||
'created_at' => now(),
|
||||
]
|
||||
);
|
||||
$user1->assignRole('Super Admin');
|
||||
|
||||
$user2 = User::updateOrCreate(
|
||||
['email' => 'dhanabalan.saravanan@cripumps.com'],
|
||||
[
|
||||
'name' => 'Dhanabalan S',
|
||||
@@ -21,18 +32,18 @@ class UserSeeder extends Seeder
|
||||
'created_at' => now(),
|
||||
]
|
||||
);
|
||||
$user1->assignRole('Super Admin');
|
||||
$user2->assignRole('Super Admin');
|
||||
|
||||
$user2 = User::updateOrCreate(
|
||||
$user3 = User::updateOrCreate(
|
||||
['email' => 'ranjith.bala@cripumps.com'],
|
||||
[
|
||||
'name' => 'Ranjith B',
|
||||
'password' => bcrypt('Ranjii$5503'),
|
||||
'password' => bcrypt('RAS00334@12'),
|
||||
'updated_at' => now(),
|
||||
'created_at' => now(),
|
||||
]
|
||||
);
|
||||
$user2->assignRole('Super Admin');
|
||||
$user3->assignRole('Super Admin');
|
||||
// User::factory()->count(5)->create();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user