25 Commits

Author SHA1 Message Date
dhanabalan
1ce7995105 removed inspection status column in production characteristic
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m15s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 58s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 2m4s
Laravel Pint / pint (pull_request) Successful in 2m59s
Laravel Larastan / larastan (pull_request) Failing after 4m20s
2026-07-13 14:03:27 +05:30
dhanabalan
d5cd1437fe Removed afterStateUpdated method in actions control
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 18s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Laravel Pint / pint (pull_request) Successful in 2m22s
Laravel Larastan / larastan (pull_request) Failing after 4m6s
2026-07-09 12:40:13 +05:30
dhanabalan
d4d101c5c9 Added searchable method for plant and work center and updated_by name on every change and deleted_at column added at the end and Enhance EquipmentMasterResource form
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 18s
Laravel Pint / pint (pull_request) Successful in 3m1s
Laravel Larastan / larastan (pull_request) Failing after 5m2s
2026-07-08 18:44:17 +05:30
dhanabalan
b8cb0aa237 Added number of person in visitor mail
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 20s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 1m45s
Laravel Larastan / larastan (pull_request) Failing after 3m17s
2026-07-08 16:18:22 +05:30
dhanabalan
eef42d9736 changed logic in pallet print controller
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Pint / pint (pull_request) Successful in 1m48s
Laravel Larastan / larastan (pull_request) Failing after 3m5s
2026-07-08 11:29:21 +05:30
dhanabalan
3316c11036 issue solved undefined column error in wire
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 23s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 25s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 19s
Laravel Pint / pint (pull_request) Successful in 1m56s
Laravel Larastan / larastan (pull_request) Failing after 3m9s
2026-07-08 11:20:24 +05:30
dhanabalan
bf22ef5af0 changed logic in wire pallet print
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 1m47s
Laravel Larastan / larastan (pull_request) Failing after 3m28s
2026-07-08 11:18:50 +05:30
dhanabalan
52868742c0 Added created by and updated by in customer po master page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 1m47s
Laravel Larastan / larastan (pull_request) Failing after 3m18s
2026-07-08 10:47:27 +05:30
dhanabalan
30175a71d3 Added id column for customer po page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 1m59s
Laravel Larastan / larastan (pull_request) Failing after 3m20s
2026-07-08 10:25:12 +05:30
dhanabalan
5fe8eeaeee Added plant code validation logic in resource page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 22s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 24s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 22s
Laravel Pint / pint (pull_request) Successful in 1m48s
Laravel Larastan / larastan (pull_request) Failing after 3m25s
2026-07-08 09:58:02 +05:30
dhanabalan
fa10ea14fe removed unwanted lines in create panel box validation
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Failing after 25s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 19s
Laravel Pint / pint (pull_request) Successful in 1m45s
Laravel Larastan / larastan (pull_request) Failing after 3m16s
2026-07-08 09:56:36 +05:30
dhanabalan
f0af6853ee Added updated logic in panel box validation
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 24s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 34s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 21s
Laravel Pint / pint (pull_request) Successful in 1m50s
Laravel Larastan / larastan (pull_request) Failing after 3m12s
2026-07-08 09:55:07 +05:30
dhanabalan
d213049fdd added one more validation in customer po master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 18s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 21s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 2m21s
Laravel Larastan / larastan (pull_request) Failing after 4m13s
2026-07-08 09:53:08 +05:30
dhanabalan
42e926f9c2 loaded pending pallet list against plant and customer po
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 19s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 2m38s
Laravel Larastan / larastan (pull_request) Failing after 5m8s
2026-07-07 12:39:29 +05:30
dhanabalan
140249e824 changed month logic in pallet print
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 1m52s
Laravel Larastan / larastan (pull_request) Failing after 3m27s
2026-07-07 09:22:33 +05:30
dhanabalan
5a77cdfdc2 Adjusted pdf column size in wire pallet pdf
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 1m48s
Laravel Larastan / larastan (pull_request) Failing after 3m6s
2026-07-07 09:09:10 +05:30
dhanabalan
015976dcb5 Updated length validation on approver master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 17s
Laravel Pint / pint (pull_request) Successful in 2m15s
Laravel Larastan / larastan (pull_request) Failing after 3m29s
2026-07-06 19:03:43 +05:30
dhanabalan
7627aa07fd changed item row size in wire pdf
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 24s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 29s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 25s
Laravel Pint / pint (pull_request) Failing after 1m45s
Laravel Larastan / larastan (pull_request) Failing after 3m23s
2026-07-06 17:14:33 +05:30
dhanabalan
aad961260a changed logic in wire pdf
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 16s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 2m0s
Laravel Larastan / larastan (pull_request) Failing after 3m54s
2026-07-06 17:12:26 +05:30
dhanabalan
305d28617b changed column size in wire pdf
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 18s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Larastan / larastan (pull_request) Failing after 1m51s
Laravel Pint / pint (pull_request) Failing after 1m45s
2026-07-06 17:09:33 +05:30
dhanabalan
851e753b74 adjusted size of the wire pallet pdf
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Pint / pint (pull_request) Successful in 2m9s
Laravel Larastan / larastan (pull_request) Failing after 4m18s
2026-07-06 17:04:28 +05:30
dhanabalan
c94688a794 added after state updated in wire master print page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 17s
Laravel Pint / pint (pull_request) Successful in 2m14s
Laravel Larastan / larastan (pull_request) Failing after 3m31s
2026-07-06 16:17:56 +05:30
dhanabalan
9db6227566 modified logic against customer po in create page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 2m49s
Laravel Larastan / larastan (pull_request) Failing after 4m34s
2026-07-06 16:12:00 +05:30
dhanabalan
d24b4f35f4 removed select item_id box in wire master packing resource page
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
2026-07-06 16:11:24 +05:30
dhanabalan
56656264c0 corrected logic pallet print controller
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 2m25s
Laravel Larastan / larastan (pull_request) Failing after 4m19s
2026-07-06 12:28:51 +05:30
14 changed files with 243 additions and 142 deletions

View File

@@ -39,8 +39,6 @@ class ProductionCharacteristicExporter extends Exporter
->label('OBSERVED VALUE'), ->label('OBSERVED VALUE'),
ExportColumn::make('status') ExportColumn::make('status')
->label('STATUS'), ->label('STATUS'),
ExportColumn::make('inspection_status')
->label('INSPECTION STATUS'),
ExportColumn::make('remark') ExportColumn::make('remark')
->label('REMARK'), ->label('REMARK'),
ExportColumn::make('created_at') ExportColumn::make('created_at')

View File

@@ -111,6 +111,13 @@ class CustomerPoMasterImporter extends Importer
$warnMsg[] = "Customer PO '{$this->data['customer_po']}' is already mapped to customer '{$existingPo->customer_name}'."; $warnMsg[] = "Customer PO '{$this->data['customer_po']}' is already mapped to customer '{$existingPo->customer_name}'.";
} }
$existingPoItem = CustomerPoMaster::where('plant_id', $plant->id)->where('item_id', $item->id)->where('customer_po', $this->data['customer_po'])->where('customer_name', $this->data['customer_name'])->first();
if ($existingPoItem)
{
$warnMsg[] = "Customer PO '{$this->data['customer_po']}' is already exist with item code '{$this->data['item']}' and customer name '{$this->data['customer_name']}'.";
}
// $user = User::where('name', $this->data['created_by'])->first(); // $user = User::where('name', $this->data['created_by'])->first();
// if (! $user) { // if (! $user) {
// $warnMsg[] = 'User not found'; // $warnMsg[] = 'User not found';

View File

@@ -80,7 +80,10 @@ class WireMasterPrint extends Page
return CustomerPoMaster::where('plant_id', $plantId)->distinct()->pluck('customer_po', 'customer_po'); //->pluck('customer_po', 'id'); ->distinct() return CustomerPoMaster::where('plant_id', $plantId)->distinct()->pluck('customer_po', 'customer_po'); //->pluck('customer_po', 'id'); ->distinct()
}) })
->required(), ->required()
->afterStateUpdated(function ($state, callable $set) {
$set('scan_pallet_no', null);
}),
Select::make('scan_pallet_no') Select::make('scan_pallet_no')
->label('Scan Pallet No') ->label('Scan Pallet No')
->reactive() ->reactive()

View File

@@ -6,25 +6,24 @@ use App\Filament\Exports\CharacteristicApproverMasterExporter;
use App\Filament\Imports\CharacteristicApproverMasterImporter; use App\Filament\Imports\CharacteristicApproverMasterImporter;
use App\Filament\Resources\CharacteristicApproverMasterResource\Pages; use App\Filament\Resources\CharacteristicApproverMasterResource\Pages;
use App\Models\CharacteristicApproverMaster; use App\Models\CharacteristicApproverMaster;
use App\Models\Item;
use App\Models\Machine; use App\Models\Machine;
use App\Models\Plant; use App\Models\Plant;
use Filament\Facades\Filament; use Filament\Facades\Filament;
use Filament\Forms; use Filament\Forms;
use Filament\Forms\Components\DateTimePicker;
use Filament\Forms\Components\Section; use Filament\Forms\Components\Section;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Form; use Filament\Forms\Form;
use Filament\Resources\Resource; use Filament\Resources\Resource;
use Filament\Tables; use Filament\Tables;
use Filament\Tables\Actions\ExportAction; use Filament\Tables\Actions\ExportAction;
use Filament\Tables\Actions\ImportAction; use Filament\Tables\Actions\ImportAction;
use Filament\Tables\Filters\Filter;
use Filament\Tables\Table; use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope; use Illuminate\Database\Eloquent\SoftDeletingScope;
use Illuminate\Validation\Rule; use Illuminate\Validation\Rule;
use Filament\Forms\Components\DateTimePicker;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Tables\Filters\Filter;
class CharacteristicApproverMasterResource extends Resource class CharacteristicApproverMasterResource extends Resource
{ {
@@ -34,6 +33,8 @@ class CharacteristicApproverMasterResource extends Resource
protected static ?string $navigationGroup = 'Laser Marking'; protected static ?string $navigationGroup = 'Laser Marking';
protected static ?int $navigationSort = 2;
public static function form(Form $form): Form public static function form(Form $form): Form
{ {
return $form return $form
@@ -224,7 +225,8 @@ class CharacteristicApproverMasterResource extends Resource
Forms\Components\TextInput::make('duration2') Forms\Components\TextInput::make('duration2')
->label('Duration (HH.MM)') ->label('Duration (HH.MM)')
->reactive() ->reactive()
->length(4) ->minLength(4)
->maxLength(5)
->regex('/^([0-9]|0[0-9]|1[0-9]|2[0-3])\.(0[0-9]|[1-5][0-9])$/') ->regex('/^([0-9]|0[0-9]|1[0-9]|2[0-3])\.(0[0-9]|[1-5][0-9])$/')
->validationMessages([ ->validationMessages([
'regex' => 'Duration must be HH.MM format (example: 00.00 - 23.59)', 'regex' => 'Duration must be HH.MM format (example: 00.00 - 23.59)',
@@ -256,7 +258,8 @@ class CharacteristicApproverMasterResource extends Resource
Forms\Components\TextInput::make('duration3') Forms\Components\TextInput::make('duration3')
->label('Duration (HH.MM)') ->label('Duration (HH.MM)')
->reactive() ->reactive()
->length(4) ->minLength(4)
->maxLength(5)
->regex('/^([0-9]|0[0-9]|1[0-9]|2[0-3])\.(0[0-9]|[1-5][0-9])$/') ->regex('/^([0-9]|0[0-9]|1[0-9]|2[0-3])\.(0[0-9]|[1-5][0-9])$/')
->validationMessages([ ->validationMessages([
'regex' => 'Duration must be HH.MM format (example: 00.00 - 23.59)', 'regex' => 'Duration must be HH.MM format (example: 00.00 - 23.59)',

View File

@@ -82,6 +82,13 @@ class CustomerPoMasterResource extends Resource
return ($currentPage - 1) * $perPage + $rowLoop->iteration; return ($currentPage - 1) * $perPage + $rowLoop->iteration;
}), }),
Tables\Columns\TextColumn::make('id')
->label('ID')
->numeric()
->alignCenter()
->sortable()
->searchable()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('plant.name') Tables\Columns\TextColumn::make('plant.name')
->label('Plant') ->label('Plant')
->alignCenter() ->alignCenter()
@@ -110,10 +117,18 @@ class CustomerPoMasterResource extends Resource
->dateTime() ->dateTime()
->sortable() ->sortable()
->toggleable(isToggledHiddenByDefault: true), ->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('created_by')
->label('Created By')
->sortable()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('updated_at') Tables\Columns\TextColumn::make('updated_at')
->dateTime() ->dateTime()
->sortable() ->sortable()
->toggleable(isToggledHiddenByDefault: true), ->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('updated_by')
->label('Updated By')
->sortable()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('deleted_at') Tables\Columns\TextColumn::make('deleted_at')
->dateTime() ->dateTime()
->sortable() ->sortable()

View File

@@ -12,6 +12,7 @@ use Filament\Facades\Filament;
use Filament\Forms; use Filament\Forms;
use Filament\Forms\Components\Actions\Action; use Filament\Forms\Components\Actions\Action;
use Filament\Forms\Form; use Filament\Forms\Form;
use Filament\Forms\Get;
use Filament\Notifications\Notification; use Filament\Notifications\Notification;
use Filament\Resources\Resource; use Filament\Resources\Resource;
use Filament\Tables; use Filament\Tables;
@@ -39,18 +40,32 @@ class EquipmentMasterResource extends Resource
return $form return $form
->schema([ ->schema([
Forms\Components\Select::make('plant_id') Forms\Components\Select::make('plant_id')
->label('Plant') ->label('Plant Name')
->reactive()
->relationship('plant', 'name') ->relationship('plant', 'name')
->required()
->searchable()
->reactive()
->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::orderBy('code')->pluck('name', 'id')->toArray(); return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::orderBy('code')->pluck('name', 'id')->toArray();
}) })
->required(), ->disabled(fn (Get $get) => ! empty($get('id')))
->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('machine_id', null);
$set('updated_by', Filament::auth()->user()?->name);
})
->default(function () {
$userHas = Filament::auth()->user()->plant_id;
return ($userHas && strlen($userHas) > 0) ? $userHas : optional(EquipmentMaster::latest()->first())->plant_id;
}),
Forms\Components\Select::make('machine_id') Forms\Components\Select::make('machine_id')
// ->relationship('machine', 'name') // ->relationship('machine', 'name')
->label('Work Center') ->label('Work Center')
->required()
->searchable()
->reactive() ->reactive()
->options(function (callable $get) { ->options(function (callable $get) {
$plantId = $get('plant_id'); $plantId = $get('plant_id');
@@ -60,15 +75,30 @@ class EquipmentMasterResource extends Resource
return \App\Models\Machine::where('plant_id', $plantId)->pluck('work_center', 'id'); return \App\Models\Machine::where('plant_id', $plantId)->pluck('work_center', 'id');
}) })
->required(), ->disabled(fn (Get $get) => ! empty($get('id')))
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\TextInput::make('name') Forms\Components\TextInput::make('name')
->label('Name'), ->label('Name')
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\TextInput::make('description') Forms\Components\TextInput::make('description')
->label('Description'), ->label('Description')
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\TextInput::make('make') Forms\Components\TextInput::make('make')
->label('Make'), ->label('Make')
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\TextInput::make('model') Forms\Components\TextInput::make('model')
->label('Model'), ->label('Model')
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\TextInput::make('equipment_number') Forms\Components\TextInput::make('equipment_number')
->label('Equipment Number') ->label('Equipment Number')
->reactive() ->reactive()
@@ -82,6 +112,8 @@ class EquipmentMasterResource extends Resource
]; ];
}) })
->afterStateUpdated(function ($state, callable $set) { ->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
if (! $state) { if (! $state) {
return; return;
} }
@@ -108,7 +140,10 @@ class EquipmentMasterResource extends Resource
// } // }
// }), // }),
Forms\Components\TextInput::make('instrument_serial_number') Forms\Components\TextInput::make('instrument_serial_number')
->label('Instrument Serial Number'), ->label('Instrument Serial Number')
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
// Forms\Components\DateTimePicker::make('calibrated_on') // Forms\Components\DateTimePicker::make('calibrated_on')
// ->label('Calibrated On') // ->label('Calibrated On')
// ->required(), // ->required(),
@@ -128,6 +163,7 @@ class EquipmentMasterResource extends Resource
$frequency = $get('frequency') ?? '1'; $frequency = $get('frequency') ?? '1';
$nextDate = self::calculateNextCalibrationDate($state, $frequency); $nextDate = self::calculateNextCalibrationDate($state, $frequency);
$set('next_calibration_date', $nextDate); $set('next_calibration_date', $nextDate);
$set('updated_by', Filament::auth()->user()?->name);
}), }),
// ->afterStateUpdated(function ($state, callable $get, callable $set) { // ->afterStateUpdated(function ($state, callable $get, callable $set) {
// $frequency = (int) $get('frequency'); // $frequency = (int) $get('frequency');
@@ -152,6 +188,7 @@ class EquipmentMasterResource extends Resource
$calibratedOn = $get('calibrated_on'); $calibratedOn = $get('calibrated_on');
$nextDate = self::calculateNextCalibrationDate($calibratedOn, $state); $nextDate = self::calculateNextCalibrationDate($calibratedOn, $state);
$set('next_calibration_date', $nextDate); $set('next_calibration_date', $nextDate);
$set('updated_by', Filament::auth()->user()?->name);
}), }),
// ->afterStateUpdated(function ($state, callable $get, callable $set) { // ->afterStateUpdated(function ($state, callable $get, callable $set) {
// $calibratedOn = $get('calibrated_on'); // $calibratedOn = $get('calibrated_on');
@@ -171,12 +208,21 @@ class EquipmentMasterResource extends Resource
Forms\Components\DateTimePicker::make('next_calibration_date') Forms\Components\DateTimePicker::make('next_calibration_date')
->label('Next Calibration Date') ->label('Next Calibration Date')
->readOnly() ->readOnly()
->required(), ->required()
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\TextInput::make('calibrated_by') Forms\Components\TextInput::make('calibrated_by')
->label('Calibrated By'), ->label('Calibrated By')
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\Textarea::make('calibration_certificate') Forms\Components\Textarea::make('calibration_certificate')
->label('Calibration Certificate'), ->label('Calibration Certificate')
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\FileUpload::make('attachment') Forms\Components\FileUpload::make('attachment')
->label('PDF Upload') ->label('PDF Upload')
@@ -185,7 +231,10 @@ class EquipmentMasterResource extends Resource
->disk('local') ->disk('local')
->directory('uploads/temp') ->directory('uploads/temp')
->preserveFilenames() ->preserveFilenames()
->reactive(), ->reactive()
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
// Forms\Components\Actions::make([ // Forms\Components\Actions::make([
// Action::make('uploadNow') // Action::make('uploadNow')
@@ -341,7 +390,11 @@ class EquipmentMasterResource extends Resource
->label('Created By') ->label('Created By')
->default(Filament::auth()->user()?->name), ->default(Filament::auth()->user()?->name),
Forms\Components\Hidden::make('updated_by') Forms\Components\Hidden::make('updated_by')
->label('Updated By'), ->label('Updated By')
->default(Filament::auth()->user()?->name),
Forms\Components\TextInput::make('id')
->hidden()
->readOnly(),
]); ]);
} }
@@ -359,7 +412,7 @@ class EquipmentMasterResource extends Resource
return ($currentPage - 1) * $perPage + $rowLoop->iteration; return ($currentPage - 1) * $perPage + $rowLoop->iteration;
}), }),
Tables\Columns\TextColumn::make('plant.name') Tables\Columns\TextColumn::make('plant.name')
->label('Plant') ->label('Plant Name')
->alignCenter() ->alignCenter()
->sortable(), ->sortable(),
Tables\Columns\TextColumn::make('machine.work_center') Tables\Columns\TextColumn::make('machine.work_center')
@@ -413,24 +466,30 @@ class EquipmentMasterResource extends Resource
->alignCenter() ->alignCenter()
->sortable(), ->sortable(),
Tables\Columns\TextColumn::make('created_by') Tables\Columns\TextColumn::make('created_by')
->label('Created Bys') ->label('Created By')
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('updated_by')
->label('Updated By')
->alignCenter() ->alignCenter()
->sortable(), ->sortable(),
Tables\Columns\TextColumn::make('created_at') Tables\Columns\TextColumn::make('created_at')
->label('Created At') ->label('Created At')
->dateTime() ->dateTime()
->alignCenter() ->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('updated_by')
->label('Updated By')
->alignCenter()
->sortable() ->sortable()
->toggleable(isToggledHiddenByDefault: true), ->toggleable(isToggledHiddenByDefault: false),
Tables\Columns\TextColumn::make('updated_at') Tables\Columns\TextColumn::make('updated_at')
->label('Updated At') ->label('Updated At')
->dateTime() ->dateTime()
->alignCenter() ->alignCenter()
->sortable() ->sortable()
->toggleable(isToggledHiddenByDefault: false),
Tables\Columns\TextColumn::make('deleted_at')
->label('Deleted At')
->dateTime()
->alignCenter()
->sortable()
->toggleable(isToggledHiddenByDefault: true), ->toggleable(isToggledHiddenByDefault: true),
]) ])
->filters([ ->filters([

View File

@@ -178,6 +178,8 @@ class PanelBoxValidationResource extends Resource
->afterStateUpdated(function (callable $set, callable $get, ?string $state) { ->afterStateUpdated(function (callable $set, callable $get, ?string $state) {
$pId = $get('line_id'); $pId = $get('line_id');
$plantId = $get('plant_id');
$plaCode = Plant::find($plantId)?->code;
$set('part_validation_type', null); $set('part_validation_type', null);
$set('show_validation_image', false); $set('show_validation_image', false);
$set('validation1_image_url', null); $set('validation1_image_url', null);
@@ -384,7 +386,17 @@ class PanelBoxValidationResource extends Resource
$set('item_id', null); $set('item_id', null);
return; return;
} }
} else { else if($plantCode != $plaCode){
Notification::make()
->title('Invalid Plant Code')
->body("Scanned plant code doesn't match the selected plant.")
->danger()
->send();
$set('item_id', null);
return;
}
}
else {
Notification::make() Notification::make()
->title('Invalid QR Format') ->title('Invalid QR Format')
@@ -478,6 +490,7 @@ class PanelBoxValidationResource extends Resource
// $set('serial_number', null); // $set('serial_number', null);
// $set('serial_number', $serialNumber); // $set('serial_number', $serialNumber);
} }
// Check if user input matches the database values // Check if user input matches the database values
foreach ($partValidationColumns as $field) { foreach ($partValidationColumns as $field) {
if ($get("{$field}_visible")) { if ($get("{$field}_visible")) {

View File

@@ -72,8 +72,6 @@ class CreatePanelBoxValidation extends CreateRecord {
->send(); ->send();
$this->halt(); $this->halt();
} }
} }
protected function checkIfHasCharacteristics(array $data) protected function checkIfHasCharacteristics(array $data)

View File

@@ -71,44 +71,8 @@ class WireMasterPackingResource extends Resource
}) })
->required() ->required()
->afterStateUpdated(function ($state, callable $set) { ->afterStateUpdated(function ($state, callable $set) {
if (!$state) {
$set('item_id', null);
return;
}
$set('item_id', null);
$set('wire_packing_number', null); $set('wire_packing_number', null);
// $customerPo = CustomerPoMaster::find($state);
// if ($customerPo && $customerPo->item_id) {
// $item = Item::find($customerPo->item_id);
// $set('item', $item?->code);
// } else {
// $set('item', null);
// }
}), }),
Forms\Components\Select::make('item_id')
->label('Item Code')
->reactive()
->searchable()
->options(function (callable $get) {
$customerPoId = $get('customer_po_master_id');
if (!$customerPoId) {
return [];
}
return Item::whereIn(
'id',
CustomerPoMaster::where('customer_po', $customerPoId)
->pluck('item_id')
)->pluck('code', 'id');
})
->required(),
Forms\Components\TextInput::make('wire_packing_number') Forms\Components\TextInput::make('wire_packing_number')
->label('Scan Wire Packing No') ->label('Scan Wire Packing No')
->reactive() ->reactive()
@@ -205,13 +169,19 @@ class WireMasterPackingResource extends Resource
->options(function ($get) { ->options(function ($get) {
$plantId = $get('plant_id'); $plantId = $get('plant_id');
$customerPo = $get('customer_po_master_id');
if (! $plantId) { if (!$plantId || !$customerPo) {
return []; return [];
} }
$customerPoIds = CustomerPoMaster::where('plant_id', $plantId)
->where('customer_po', $customerPo)
->pluck('id');
return WireMasterPacking::query() return WireMasterPacking::query()
->where('plant_id', $plantId) ->where('plant_id', $plantId)
->whereIn('customer_po_master_id', $customerPoIds)
->where(function ($query) { ->where(function ($query) {
$query->whereNull('wire_packing_status') $query->whereNull('wire_packing_status')
->orWhere('wire_packing_status', ''); ->orWhere('wire_packing_status', '');

View File

@@ -54,8 +54,6 @@ class CreateWireMasterPacking extends CreateRecord
$customerPo = trim($this->form->getState()['customer_po_master_id'])?? null; $customerPo = trim($this->form->getState()['customer_po_master_id'])?? null;
$selectedItem = trim($this->form->getState()['item_id'])?? null;
$wirePackNo = trim($this->form->getState()['wire_packing_number'])?? null; $wirePackNo = trim($this->form->getState()['wire_packing_number'])?? null;
$wirePackNo = trim($wirePackNo) ?? null; $wirePackNo = trim($wirePackNo) ?? null;
@@ -166,30 +164,6 @@ class CreateWireMasterPacking extends CreateRecord
return; return;
} }
$itemId = Item::where('code', $materialCode)
->where('plant_id', $plantId)
->value('id');
if($itemId != $selectedItem){
Notification::make()
->title("Item Code Mismatch")
->body("Scanned Item Code '$materialCode' does not match the selected Item in the form.")
->danger()
->duration(5000)
->send();
$this->form->fill([
'process_order' => null,
'plant_id' => $plantId,
'customer_po_master_id' => $customerPo,
'wire_packing_number' => $wirePackNo,
'Sno_quantity' => 0,
'created_by' => $operatorName,
'scanned_by' => $operatorName,
]);
return;
}
$icodeAgaCPoPlant = CustomerPoMaster::where('item_id', $itemId)->where('plant_id', $plantId)->first(); $icodeAgaCPoPlant = CustomerPoMaster::where('item_id', $itemId)->where('plant_id', $plantId)->first();
if(!$icodeAgaCPoPlant) if(!$icodeAgaCPoPlant)
@@ -282,7 +256,7 @@ class CreateWireMasterPacking extends CreateRecord
{ {
Notification::make() Notification::make()
->title("Scanned Weight Exceeds PO Quantity") ->title("Scanned Weight Exceeds PO Quantity")
->body("Scanned weight '$weight' and already scanned weight '$alreadyScannedQty' exceeds allowed quantity '{$customerPoRecord->quantity}' for PO '$customerPoRecord->name' and Item '$materialCode'") ->body("Scanned weight '$weight' and already scanned weight '$alreadyScannedQty' exceeds allowed quantity '{$customerPoRecord->quantity}' for PO '$customerPoRecord->customer_po' and Item '$materialCode'")
->danger() ->danger()
->duration(5000) ->duration(5000)
->send(); ->send();

View File

@@ -163,16 +163,19 @@ class PalletPrintController extends Controller
public function print(Request $request, $pallet, $plant) public function print(Request $request, $pallet, $plant)
{ {
$customerPo = $request->query('customer'); $customerPoMasterId = WireMasterPacking::where('plant_id', $plant)
$itemId = WireMasterPacking::where('plant_id', $plant)
->where('wire_packing_number', $pallet) ->where('wire_packing_number', $pallet)
->value('item_id'); ->value('customer_po_master_id');
$customerPoIds = CustomerPoMaster::where('plant_id', $plant) $masterIds = WireMasterPacking::where('plant_id', $plant)
->where('customer_po', $customerPo) ->where('wire_packing_number', $pallet)
->where('item_id', $itemId) ->pluck('customer_po_master_id');
->pluck('id');
$customerPo = CustomerPoMaster::whereIn('id', $masterIds)
->value('customer_po');
$customerPoMasterIds = CustomerPoMaster::where('customer_po', $customerPo)
->pluck('id');
$items = WireMasterPacking::with('item') $items = WireMasterPacking::with('item')
->where('plant_id', $plant) ->where('plant_id', $plant)
@@ -187,27 +190,23 @@ class PalletPrintController extends Controller
]; ];
}); });
$masterBox = WireMasterPacking::where('plant_id', $plant) $customer = CustomerPoMaster::find($customerPoMasterId);
->where('wire_packing_number', $pallet)
->value('customer_po_master_id');
$customer = CustomerPoMaster::find($masterBox);
$customerCode = $customer->customer_po ?? ''; $customerCode = $customer->customer_po ?? '';
$customerName = $customer->customer_name ?? ''; $customerName = $customer->customer_name ?? '';
// $totalBoxes = WireMasterPacking::where('plant_id', $plant) // $totalBoxes = WireMasterPacking::where('plant_id', $plant)
// ->where('customer_po_master_id', $customerId) // ->where('customer_po_master_id', $customerPoMasterId)
// ->distinct('wire_packing_number') // ->select('wire_packing_number')
// ->count('wire_packing_number'); // ->groupBy('wire_packing_number')
// ->havingRaw(
// $totalBoxes = WireMasterPacking::where('plant_id', $plant) // 'COUNT(*) = COUNT(CASE WHEN wire_packing_status = ? THEN 1 END)',
// ->whereIn('customer_po_master_id', $customerPoIds) // ['Completed']
// ->distinct('wire_packing_number') // )
// ->count('wire_packing_number'); // ->count();
$totalBoxes = WireMasterPacking::where('plant_id', $plant) $totalBoxes = WireMasterPacking::where('plant_id', $plant)
->whereIn('customer_po_master_id', $customerPoIds) ->whereIn('customer_po_master_id', $customerPoMasterIds)
->select('wire_packing_number') ->select('wire_packing_number')
->groupBy('wire_packing_number') ->groupBy('wire_packing_number')
->havingRaw( ->havingRaw(
@@ -217,7 +216,7 @@ class PalletPrintController extends Controller
->count(); ->count();
// $completedPallets = WireMasterPacking::where('plant_id', $plant) // $completedPallets = WireMasterPacking::where('plant_id', $plant)
// ->where('customer_po_master_id', $customerId) // ->where('customer_po_master_id', $customerPoMasterId)
// ->select('wire_packing_number') // ->select('wire_packing_number')
// ->groupBy('wire_packing_number') // ->groupBy('wire_packing_number')
// ->havingRaw( // ->havingRaw(
@@ -229,20 +228,20 @@ class PalletPrintController extends Controller
// ->values(); // ->values();
$completedPallets = WireMasterPacking::where('plant_id', $plant) $completedPallets = WireMasterPacking::where('plant_id', $plant)
->whereIn('customer_po_master_id', $customerPoIds) ->whereIn('customer_po_master_id', $customerPoMasterIds)
->select('wire_packing_number') ->select('wire_packing_number')
->groupBy('wire_packing_number') ->groupBy('wire_packing_number')
->havingRaw( ->havingRaw(
'COUNT(*) = COUNT(CASE WHEN wire_packing_status = ? THEN 1 END)', 'COUNT(*) = COUNT(CASE WHEN wire_packing_status = ? THEN 1 END)',
['Completed'] ['Completed']
) )
->orderBy('wire_packing_number') ->orderBy('wire_packing_number')
->pluck('wire_packing_number') ->pluck('wire_packing_number')
->values(); ->values();
$index = $completedPallets->search($pallet); $index = $completedPallets->search($pallet);
$currentPalletNo = ($index !== false) ? $index + 1 : 1; $currentPalletNo = ($index !== false) ? $index + 1 : 0;
$boxLabel = $currentPalletNo.'/'.$totalBoxes; $boxLabel = $currentPalletNo.'/'.$totalBoxes;
@@ -254,11 +253,18 @@ class PalletPrintController extends Controller
$plantAddress = Plant::where('id', $plant)->value('address'); $plantAddress = Plant::where('id', $plant)->value('address');
$scannedAt = WireMasterPacking::where('plant_id', $plant)
->where('wire_packing_number', $pallet)
->value('scanned_at');
$pdf = Pdf::loadView('pdf.wire-pallet', [ $pdf = Pdf::loadView('pdf.wire-pallet', [
'product' => 'Submersible Winding Wire', 'product' => 'Submersible Winding Wire',
'plantName' => $plantName, 'plantName' => $plantName,
'plantAddress' => $plantAddress, 'plantAddress' => $plantAddress,
'monthYear' => now()->format('M-y'), // 'monthYear' => now()->format('M-y'),
'monthYear' => $scannedAt
? \Carbon\Carbon::parse($scannedAt)->format('M-y')
: '',
'branch' => '', 'branch' => '',
'customerCode' => $customerCode, 'customerCode' => $customerCode,
'customerName' => $customerName, 'customerName' => $customerName,

View File

@@ -151,19 +151,38 @@ public $records = [];
$characteristic = ProductCharacteristicsMaster::find($characteristicId); $characteristic = ProductCharacteristicsMaster::find($characteristicId);
if (($characteristic?->inspection_type ?? null) === 'Value') { $itemCharacteristic = ProductCharacteristicsMaster::where('plant_id', $this->data['plant_id'])
if ($characteristic && is_numeric($value) && (($value >= $characteristic->lower && $value <= $characteristic->upper) || $value == $characteristic->lower || $value == $characteristic->upper) ->where('line_id', $this->data['line_id'])
->where('name', $characteristic->name)
->where('item_id', $itemId)
->first();
// if (($characteristic?->inspection_type ?? null) === 'Value') {
// if ($characteristic && is_numeric($value) && (($value >= $characteristic->lower && $value <= $characteristic->upper) || $value == $characteristic->lower || $value == $characteristic->upper)
// ) {
// $status = 'Ok';
// } else {
// $status = 'NotOk';
// }
// }
// else {
// $status = $value;
// }
if (($itemCharacteristic?->inspection_type ?? null) === 'Value') {
if ($itemCharacteristic && is_numeric($value) && $value >= $itemCharacteristic->lower && $value <= $itemCharacteristic->upper
) { ) {
$status = 'Ok'; $status = 'Ok';
} else { } else {
$status = 'NotOk'; $status = 'NotOk';
} }
} }
// else { else {
// $status = $value; $status = $value;
// } }
ProductionCharacteristic::create([ $prod = ProductionCharacteristic::create([
'plant_id' => $this->data['plant_id'] ?? null, 'plant_id' => $this->data['plant_id'] ?? null,
'item_id' => $itemId ?? null, 'item_id' => $itemId ?? null,
'line_id' => $this->data['line_id'] ?? null, 'line_id' => $this->data['line_id'] ?? null,
@@ -178,6 +197,15 @@ public $records = [];
]); ]);
} }
if (! $prod) {
Notification::make()
->title('Failed to save Panel Box Validation')
->body('Something went wrong while inserting data.')
->danger()
->send();
return;
}
$this->showChecklist = false; $this->showChecklist = false;
$this->dispatch('checklist-saved'); $this->dispatch('checklist-saved');
@@ -214,11 +242,24 @@ public $records = [];
$characteristic = ProductCharacteristicsMaster::find($characteristicId); $characteristic = ProductCharacteristicsMaster::find($characteristicId);
$itemCode = $this->data['item_id'];
$itemId = Item::where('plant_id', $characteristic->plant_id)->where('code', $itemCode)->value('id');
$characteristic = ProductCharacteristicsMaster::find($characteristicId);
$limit = ProductCharacteristicsMaster::where('plant_id', $characteristic->plant_id)
->where('line_id', $characteristic->line_id)
->where('name', $characteristic->name)
->where('item_id', $itemId)
->first();
if (! $characteristic || ! is_numeric($value)) { if (! $characteristic || ! is_numeric($value)) {
return 'Not Ok'; return 'Not Ok';
} }
// return ($value >= $characteristic->lower && $value <= $characteristic->upper) ? 'Ok' : 'Not Ok';
return ($value >= $characteristic->lower && $value <= $characteristic->upper) ? 'Ok' : 'Not Ok'; return ($value >= $limit->lower && $value <= $limit->upper) ? 'Ok' : 'Not Ok';
} }

View File

@@ -83,6 +83,15 @@
</td> </td>
</tr> </tr>
<tr>
<td style="border:1px solid #d1d5db;font-weight:bold;">
No of Person
</td>
<td style="border:1px solid #d1d5db;">
{{ $visitor->number_of_person }}
</td>
</tr>
<tr> <tr>
<td style="border:1px solid #d1d5db;font-weight:bold;"> <td style="border:1px solid #d1d5db;font-weight:bold;">
Visit Time Visit Time

View File

@@ -26,7 +26,7 @@
$grossWeightHeight = 5; $grossWeightHeight = 5;
$netWeightHeight = 5; $netWeightHeight = 5;
$licenseHeight = 5; $licenseHeight = 5;
$companyInfoHeight = 6.9; $companyInfoHeight = 6.9; //6.9
$logoHeight = $titleHeight * 0.8; $logoHeight = $titleHeight * 0.8;
$logoMaxWidth = 20; $logoMaxWidth = 20;
$isilogoHeight = $titleHeight * 0.9; $isilogoHeight = $titleHeight * 0.9;
@@ -240,8 +240,13 @@
/* Column widths */ /* Column widths */
.col-1 { width: 22%; } .col-1 { width: 22%; }
.col-2 { width: 45%; } .col-2 { width: 45%; }
.col-3 { width: 11%; }
.col-4 { width: 29%; }
/* .col-1 { width: 20%; }
.col-2 { width: 48%; }
.col-3 { width: 15%; } .col-3 { width: 15%; }
.col-4 { width: 25%; } .col-4 { width: 17%; } */
/* Force exact heights for rows - ALL FIXED EXCEPT ITEM ROWS */ /* Force exact heights for rows - ALL FIXED EXCEPT ITEM ROWS */
.title-row { .title-row {