ranjith-dev #319
@@ -56,7 +56,7 @@ class LocatorInvoiceValidationResource extends Resource
|
|||||||
->options(function (callable $get) {
|
->options(function (callable $get) {
|
||||||
$userHas = Filament::auth()->user()->plant_id;
|
$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'))
|
->disabled(fn (Get $get) => $get('invoice_number'))
|
||||||
->required()
|
->required()
|
||||||
@@ -498,7 +498,7 @@ class LocatorInvoiceValidationResource extends Resource
|
|||||||
->options(function (callable $get) {
|
->options(function (callable $get) {
|
||||||
$userHas = Filament::auth()->user()->plant_id;
|
$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')
|
->label('Select Plant')
|
||||||
->required()
|
->required()
|
||||||
@@ -534,8 +534,7 @@ class LocatorInvoiceValidationResource extends Resource
|
|||||||
// $invoiceNumber = trim(str_replace('.xlsx', '', $originalName));
|
// $invoiceNumber = trim(str_replace('.xlsx', '', $originalName));
|
||||||
// $originalNameOnly = pathinfo($originalName, PATHINFO_FILENAME);
|
// $originalNameOnly = pathinfo($originalName, PATHINFO_FILENAME);
|
||||||
|
|
||||||
$folderPath = Configuration::where('c_name', 'INVOICE_FOLDER_PATH')
|
$folderPath = 'ExportDispatch'; // Configuration::where('c_name', 'INVOICE_FOLDER_PATH')->value('c_value');
|
||||||
->value('c_value');
|
|
||||||
|
|
||||||
$fullFolderPath = "uploads/$folderPath";
|
$fullFolderPath = "uploads/$folderPath";
|
||||||
|
|
||||||
@@ -708,7 +707,7 @@ class LocatorInvoiceValidationResource extends Resource
|
|||||||
->options(function (callable $get) {
|
->options(function (callable $get) {
|
||||||
$userHas = Filament::auth()->user()->plant_id;
|
$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()
|
->reactive()
|
||||||
->afterStateUpdated(function ($state, callable $set, callable $get): void {
|
->afterStateUpdated(function ($state, callable $set, callable $get): void {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,7 @@ class AdminSeeder extends Seeder
|
|||||||
*/
|
*/
|
||||||
public function run(): void
|
public function run(): void
|
||||||
{
|
{
|
||||||
//updateOrCreate
|
// updateOrCreate
|
||||||
$user1 = User::updateOrCreate(
|
$user1 = User::updateOrCreate(
|
||||||
// Unique identifier
|
// Unique identifier
|
||||||
['email' => 'admin@cripumps.com'],
|
['email' => 'admin@cripumps.com'],
|
||||||
@@ -21,9 +21,9 @@ class AdminSeeder extends Seeder
|
|||||||
// Data to update/create
|
// Data to update/create
|
||||||
[
|
[
|
||||||
'name' => 'Admin',
|
'name' => 'Admin',
|
||||||
'password' => Hash::make('jOtHi$9000'),
|
'password' => Hash::make('jOtHi#9000'),
|
||||||
'updated_at' => now(),
|
'updated_at' => now(),
|
||||||
'created_at' => now()
|
'created_at' => now(),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
// $user1 = User::firstOrCreate([
|
// $user1 = User::firstOrCreate([
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace Database\Seeders;
|
namespace Database\Seeders;
|
||||||
|
|
||||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
use Spatie\Permission\Models\Permission;
|
use Spatie\Permission\Models\Permission;
|
||||||
|
|
||||||
@@ -26,14 +25,14 @@ class PermissionSeeder extends Seeder
|
|||||||
'edit roles',
|
'edit roles',
|
||||||
'delete roles',
|
'delete roles',
|
||||||
'restore roles',
|
'restore roles',
|
||||||
'force-delete roles'
|
'force-delete roles',
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($permissions as $permission) {
|
foreach ($permissions as $permission) {
|
||||||
Permission::updateOrCreate(['name' => $permission]); //firstOrCreate
|
Permission::updateOrCreate(['name' => $permission]); // firstOrCreate
|
||||||
}
|
}
|
||||||
|
|
||||||
//Master and Transaction Pages
|
// Master and Transaction Pages
|
||||||
Permission::updateOrCreate(['name' => 'view import user']);
|
Permission::updateOrCreate(['name' => 'view import user']);
|
||||||
Permission::updateOrCreate(['name' => 'view export user']);
|
Permission::updateOrCreate(['name' => 'view export user']);
|
||||||
|
|
||||||
@@ -142,9 +141,9 @@ class PermissionSeeder extends Seeder
|
|||||||
Permission::updateOrCreate(['name' => 'view import sticker mapping master']);
|
Permission::updateOrCreate(['name' => 'view import sticker mapping master']);
|
||||||
Permission::updateOrCreate(['name' => 'view export sticker mapping master']);
|
Permission::updateOrCreate(['name' => 'view export sticker mapping master']);
|
||||||
|
|
||||||
//Dashboard Permissions
|
// Dashboard Permissions
|
||||||
Permission::updateOrCreate(['name' => 'view invoice dashboard']); //invoice dashboard
|
Permission::updateOrCreate(['name' => 'view invoice dashboard']); // invoice dashboard
|
||||||
Permission::updateOrCreate(['name' => 'view production hourly count dashboard']); //hourly production
|
Permission::updateOrCreate(['name' => 'view production hourly count dashboard']); // hourly production
|
||||||
Permission::updateOrCreate(['name' => 'view production line count dashboard']);
|
Permission::updateOrCreate(['name' => 'view production line count dashboard']);
|
||||||
Permission::updateOrCreate(['name' => 'view production order count dashboard']);
|
Permission::updateOrCreate(['name' => 'view production order count dashboard']);
|
||||||
Permission::updateOrCreate(['name' => 'view production line stop count dashboard']);
|
Permission::updateOrCreate(['name' => 'view production line stop count dashboard']);
|
||||||
@@ -156,13 +155,14 @@ class PermissionSeeder extends Seeder
|
|||||||
Permission::updateOrCreate(['name' => 'view ems trend line analysis dashboard']);
|
Permission::updateOrCreate(['name' => 'view ems trend line analysis dashboard']);
|
||||||
Permission::updateOrCreate(['name' => 'view ems trend chart analysis dashboard']);
|
Permission::updateOrCreate(['name' => 'view ems trend chart analysis dashboard']);
|
||||||
|
|
||||||
//Send To Sap Permissions
|
// Send To Sap Permissions
|
||||||
Permission::updateOrCreate(['name' => 'view quality data send to sap']);
|
Permission::updateOrCreate(['name' => 'view quality data send to sap']);
|
||||||
Permission::updateOrCreate(['name' => 'view production data send to sap']);
|
Permission::updateOrCreate(['name' => 'view production data send to sap']);
|
||||||
Permission::updateOrCreate(['name' => 'create production sticker reject reason page']);
|
Permission::updateOrCreate(['name' => 'create production sticker reject reason page']);
|
||||||
Permission::updateOrCreate(['name' => 'create web capture page']);
|
Permission::updateOrCreate(['name' => 'create web capture page']);
|
||||||
|
|
||||||
Permission::updateOrCreate(['name' => 'view invoice pending reason']);
|
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 import invoice out validation']);
|
||||||
Permission::updateOrCreate(['name' => 'view export 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 import invoice in transit']);
|
||||||
Permission::updateOrCreate(['name' => 'view export 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
|
public function run(): void
|
||||||
{
|
{
|
||||||
$user1 = User::updateOrCreate(
|
$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'],
|
['email' => 'dhanabalan.saravanan@cripumps.com'],
|
||||||
[
|
[
|
||||||
'name' => 'Dhanabalan S',
|
'name' => 'Dhanabalan S',
|
||||||
@@ -21,18 +32,18 @@ class UserSeeder extends Seeder
|
|||||||
'created_at' => now(),
|
'created_at' => now(),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
$user1->assignRole('Super Admin');
|
$user2->assignRole('Super Admin');
|
||||||
|
|
||||||
$user2 = User::updateOrCreate(
|
$user3 = User::updateOrCreate(
|
||||||
['email' => 'ranjith.bala@cripumps.com'],
|
['email' => 'ranjith.bala@cripumps.com'],
|
||||||
[
|
[
|
||||||
'name' => 'Ranjith B',
|
'name' => 'Ranjith B',
|
||||||
'password' => bcrypt('Ranjii$5503'),
|
'password' => bcrypt('RAS00334@12'),
|
||||||
'updated_at' => now(),
|
'updated_at' => now(),
|
||||||
'created_at' => now(),
|
'created_at' => now(),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
$user2->assignRole('Super Admin');
|
$user3->assignRole('Super Admin');
|
||||||
// User::factory()->count(5)->create();
|
// User::factory()->count(5)->create();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user