Initial commit for new repo
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m4s

This commit is contained in:
dhanabalan
2025-12-16 17:05:04 +05:30
commit 3f0d529640
862 changed files with 141157 additions and 0 deletions

View File

@@ -0,0 +1,80 @@
<?php
namespace App\Filament\Resources\LineResource\Pages;
use App\Filament\Resources\LineResource;
use Filament\Actions;
use Filament\Resources\Pages\CreateRecord;
use Illuminate\Validation\ValidationException;
class CreateLine extends CreateRecord
{
protected static string $resource = LineResource::class;
protected function getRedirectUrl(): string
{
return $this->getResource()::getUrl('create');
}
protected function beforeCreate(): void
{
$errors = [];
if (!empty($this->data['lPlantError'])) {
$errors['lPlantError'] = ['Fix the errors before submitting.'];
}
if (!empty($this->data['lNameError'])) {
$errors['lNameError'] = ['Fix the errors before submitting.'];
}
if (!empty($this->data['lTypeError'])) {
$errors['lTypeError'] = ['Fix the errors before submitting.'];
}
if (!empty($this->data['work_group1_id_error'])) {
$errors['work_group1_id_error'] = ['Fix the errors before submitting.'];
}
if (!empty($this->data['work_group2_id_error'])) {
$errors['work_group2_id_error'] = ['Fix the errors before submitting.'];
}
if (!empty($this->data['work_group3_id_error'])) {
$errors['work_group1_id_error'] = ['Fix the errors before submitting.'];
}
if (!empty($this->data['work_group4_id_error'])) {
$errors['work_group4_id_error'] = ['Fix the errors before submitting.'];
}
if (!empty($this->data['work_group5_id_error'])) {
$errors['work_group5_id_error'] = ['Fix the errors before submitting.'];
}
if (!empty($this->data['work_group6_id_error'])) {
$errors['work_group6_id_error'] = ['Fix the errors before submitting.'];
}
if (!empty($this->data['work_group7_id_error'])) {
$errors['work_group7_id_error'] = ['Fix the errors before submitting.'];
}
if (!empty($this->data['work_group8_id_error'])) {
$errors['work_group8_id_error'] = ['Fix the errors before submitting.'];
}
if (!empty($this->data['work_group9_id_error'])) {
$errors['work_group9_id_error'] = ['Fix the errors before submitting.'];
}
//..warranty
if (!empty($this->data['work_group10_id_error'])) {
$errors['work_group10_id_error'] = ['Fix the errors before submitting.'];
}
if (!empty($errors)) {
throw ValidationException::withMessages($errors);
}
}
}

View File

@@ -0,0 +1,22 @@
<?php
namespace App\Filament\Resources\LineResource\Pages;
use App\Filament\Resources\LineResource;
use Filament\Actions;
use Filament\Resources\Pages\EditRecord;
class EditLine extends EditRecord
{
protected static string $resource = LineResource::class;
protected function getHeaderActions(): array
{
return [
Actions\ViewAction::make(),
Actions\DeleteAction::make(),
Actions\ForceDeleteAction::make(),
Actions\RestoreAction::make(),
];
}
}

View File

@@ -0,0 +1,19 @@
<?php
namespace App\Filament\Resources\LineResource\Pages;
use App\Filament\Resources\LineResource;
use Filament\Actions;
use Filament\Resources\Pages\ListRecords;
class ListLines extends ListRecords
{
protected static string $resource = LineResource::class;
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
];
}
}

View File

@@ -0,0 +1,19 @@
<?php
namespace App\Filament\Resources\LineResource\Pages;
use App\Filament\Resources\LineResource;
use Filament\Actions;
use Filament\Resources\Pages\ViewRecord;
class ViewLine extends ViewRecord
{
protected static string $resource = LineResource::class;
protected function getHeaderActions(): array
{
return [
Actions\EditAction::make(),
];
}
}