42 Commits

Author SHA1 Message Date
7276765aa4 Merge pull request 'removed inspection status column in production characteristic' (#827) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 25s
Reviewed-on: #827
2026-07-13 08:33:47 +00:00
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
164a1becac Merge pull request 'Removed afterStateUpdated method in actions control' (#826) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 21s
Reviewed-on: #826
2026-07-09 07:11:12 +00:00
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
6ad91c8c96 Merge pull request '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' (#825) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #825
2026-07-08 13:15:29 +00:00
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
a6496b59c1 Merge pull request 'Added number of person in visitor mail' (#824) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 23s
Reviewed-on: #824
2026-07-08 10:48:37 +00:00
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
027bacbce8 Merge pull request 'changed logic in pallet print controller' (#823) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 24s
Reviewed-on: #823
2026-07-08 05:59:33 +00:00
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
6a87067387 Merge pull request 'issue solved undefined column error in wire' (#822) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 24s
Reviewed-on: #822
2026-07-08 05:50:39 +00:00
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
4ac1e9f7c7 Merge pull request 'changed logic in wire pallet print' (#821) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #821
2026-07-08 05:49:11 +00:00
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
2f84b269a1 Merge pull request 'Added created by and updated by in customer po master page' (#820) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 22s
Reviewed-on: #820
2026-07-08 05:17:42 +00:00
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
8de311cdfb Merge pull request 'Added id column for customer po page' (#819) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 22s
Reviewed-on: #819
2026-07-08 04:55:27 +00:00
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
f4f10e8748 Merge pull request 'Added plant code validation logic in resource page' (#818) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 22s
Reviewed-on: #818
2026-07-08 04:28:15 +00:00
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
d1e4114504 Merge pull request 'removed unwanted lines in create panel box validation' (#817) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #817
2026-07-08 04:26:55 +00:00
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
375bffe6ce Merge pull request 'Added updated logic in panel box validation' (#816) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #816
2026-07-08 04:25:38 +00:00
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
3de0ca365c Merge pull request 'added one more validation in customer po master' (#815) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #815
2026-07-08 04:23:26 +00:00
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
16cbe67c8b Merge pull request 'loaded pending pallet list against plant and customer po' (#814) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 43s
Reviewed-on: #814
2026-07-07 07:09:43 +00:00
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
85b214d5f3 Merge pull request 'changed month logic in pallet print' (#813) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 23s
Reviewed-on: #813
2026-07-07 03:52:46 +00:00
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
88fb7367ea Merge pull request 'Adjusted pdf column size in wire pallet pdf' (#812) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 22s
Reviewed-on: #812
2026-07-07 03:39:23 +00:00
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
15e0ed2014 Merge pull request 'Updated length validation on approver master' (#811) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 20s
Reviewed-on: #811
2026-07-06 13:34:58 +00:00
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
e3caf06da5 Merge pull request 'changed item row size in wire pdf' (#810) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 24s
Reviewed-on: #810
2026-07-06 11:44:45 +00:00
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
3e1b784215 Merge pull request 'changed logic in wire pdf' (#809) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #809
2026-07-06 11:42:38 +00:00
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
907ade608a Merge pull request 'changed column size in wire pdf' (#808) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #808
2026-07-06 11:39:46 +00:00
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
d82befeeaa Merge pull request 'adjusted size of the wire pallet pdf' (#807) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 36s
Reviewed-on: #807
2026-07-06 11:34:43 +00:00
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
12 changed files with 252 additions and 61 deletions

View File

@@ -39,8 +39,6 @@ class ProductionCharacteristicExporter extends Exporter
->label('OBSERVED VALUE'),
ExportColumn::make('status')
->label('STATUS'),
ExportColumn::make('inspection_status')
->label('INSPECTION STATUS'),
ExportColumn::make('remark')
->label('REMARK'),
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}'.";
}
$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();
// if (! $user) {
// $warnMsg[] = 'User not found';

View File

@@ -6,25 +6,24 @@ use App\Filament\Exports\CharacteristicApproverMasterExporter;
use App\Filament\Imports\CharacteristicApproverMasterImporter;
use App\Filament\Resources\CharacteristicApproverMasterResource\Pages;
use App\Models\CharacteristicApproverMaster;
use App\Models\Item;
use App\Models\Machine;
use App\Models\Plant;
use Filament\Facades\Filament;
use Filament\Forms;
use Filament\Forms\Components\DateTimePicker;
use Filament\Forms\Components\Section;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Actions\ExportAction;
use Filament\Tables\Actions\ImportAction;
use Filament\Tables\Filters\Filter;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
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
{
@@ -34,6 +33,8 @@ class CharacteristicApproverMasterResource extends Resource
protected static ?string $navigationGroup = 'Laser Marking';
protected static ?int $navigationSort = 2;
public static function form(Form $form): Form
{
return $form
@@ -224,7 +225,8 @@ class CharacteristicApproverMasterResource extends Resource
Forms\Components\TextInput::make('duration2')
->label('Duration (HH.MM)')
->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])$/')
->validationMessages([
'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')
->label('Duration (HH.MM)')
->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])$/')
->validationMessages([
'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;
}),
Tables\Columns\TextColumn::make('id')
->label('ID')
->numeric()
->alignCenter()
->sortable()
->searchable()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('plant.name')
->label('Plant')
->alignCenter()
@@ -110,10 +117,18 @@ class CustomerPoMasterResource extends Resource
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('created_by')
->label('Created By')
->sortable()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('updated_at')
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('updated_by')
->label('Updated By')
->sortable()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('deleted_at')
->dateTime()
->sortable()

View File

@@ -12,6 +12,7 @@ use Filament\Facades\Filament;
use Filament\Forms;
use Filament\Forms\Components\Actions\Action;
use Filament\Forms\Form;
use Filament\Forms\Get;
use Filament\Notifications\Notification;
use Filament\Resources\Resource;
use Filament\Tables;
@@ -39,18 +40,32 @@ class EquipmentMasterResource extends Resource
return $form
->schema([
Forms\Components\Select::make('plant_id')
->label('Plant')
->reactive()
->label('Plant Name')
->relationship('plant', 'name')
->required()
->searchable()
->reactive()
->options(function (callable $get) {
$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();
})
->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')
// ->relationship('machine', 'name')
->label('Work Center')
->required()
->searchable()
->reactive()
->options(function (callable $get) {
$plantId = $get('plant_id');
@@ -60,15 +75,30 @@ class EquipmentMasterResource extends Resource
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')
->label('Name'),
->label('Name')
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
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')
->label('Make'),
->label('Make')
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
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')
->label('Equipment Number')
->reactive()
@@ -82,6 +112,8 @@ class EquipmentMasterResource extends Resource
];
})
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
if (! $state) {
return;
}
@@ -108,7 +140,10 @@ class EquipmentMasterResource extends Resource
// }
// }),
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')
// ->label('Calibrated On')
// ->required(),
@@ -128,6 +163,7 @@ class EquipmentMasterResource extends Resource
$frequency = $get('frequency') ?? '1';
$nextDate = self::calculateNextCalibrationDate($state, $frequency);
$set('next_calibration_date', $nextDate);
$set('updated_by', Filament::auth()->user()?->name);
}),
// ->afterStateUpdated(function ($state, callable $get, callable $set) {
// $frequency = (int) $get('frequency');
@@ -152,6 +188,7 @@ class EquipmentMasterResource extends Resource
$calibratedOn = $get('calibrated_on');
$nextDate = self::calculateNextCalibrationDate($calibratedOn, $state);
$set('next_calibration_date', $nextDate);
$set('updated_by', Filament::auth()->user()?->name);
}),
// ->afterStateUpdated(function ($state, callable $get, callable $set) {
// $calibratedOn = $get('calibrated_on');
@@ -171,12 +208,21 @@ class EquipmentMasterResource extends Resource
Forms\Components\DateTimePicker::make('next_calibration_date')
->label('Next Calibration Date')
->readOnly()
->required(),
->required()
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
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')
->label('Calibration Certificate'),
->label('Calibration Certificate')
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\FileUpload::make('attachment')
->label('PDF Upload')
@@ -185,7 +231,10 @@ class EquipmentMasterResource extends Resource
->disk('local')
->directory('uploads/temp')
->preserveFilenames()
->reactive(),
->reactive()
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
// Forms\Components\Actions::make([
// Action::make('uploadNow')
@@ -341,7 +390,11 @@ class EquipmentMasterResource extends Resource
->label('Created By')
->default(Filament::auth()->user()?->name),
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;
}),
Tables\Columns\TextColumn::make('plant.name')
->label('Plant')
->label('Plant Name')
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('machine.work_center')
@@ -413,24 +466,30 @@ class EquipmentMasterResource extends Resource
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('created_by')
->label('Created Bys')
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('updated_by')
->label('Updated By')
->label('Created By')
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('created_at')
->label('Created At')
->dateTime()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('updated_by')
->label('Updated By')
->alignCenter()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
->toggleable(isToggledHiddenByDefault: false),
Tables\Columns\TextColumn::make('updated_at')
->label('Updated At')
->dateTime()
->alignCenter()
->sortable()
->toggleable(isToggledHiddenByDefault: false),
Tables\Columns\TextColumn::make('deleted_at')
->label('Deleted At')
->dateTime()
->alignCenter()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
])
->filters([

View File

@@ -178,6 +178,8 @@ class PanelBoxValidationResource extends Resource
->afterStateUpdated(function (callable $set, callable $get, ?string $state) {
$pId = $get('line_id');
$plantId = $get('plant_id');
$plaCode = Plant::find($plantId)?->code;
$set('part_validation_type', null);
$set('show_validation_image', false);
$set('validation1_image_url', null);
@@ -384,7 +386,17 @@ class PanelBoxValidationResource extends Resource
$set('item_id', null);
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()
->title('Invalid QR Format')
@@ -478,6 +490,7 @@ class PanelBoxValidationResource extends Resource
// $set('serial_number', null);
// $set('serial_number', $serialNumber);
}
// Check if user input matches the database values
foreach ($partValidationColumns as $field) {
if ($get("{$field}_visible")) {

View File

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

View File

@@ -169,13 +169,19 @@ class WireMasterPackingResource extends Resource
->options(function ($get) {
$plantId = $get('plant_id');
$customerPo = $get('customer_po_master_id');
if (! $plantId) {
if (!$plantId || !$customerPo) {
return [];
}
$customerPoIds = CustomerPoMaster::where('plant_id', $plantId)
->where('customer_po', $customerPo)
->pluck('id');
return WireMasterPacking::query()
->where('plant_id', $plantId)
->whereIn('customer_po_master_id', $customerPoIds)
->where(function ($query) {
$query->whereNull('wire_packing_status')
->orWhere('wire_packing_status', '');

View File

@@ -163,12 +163,20 @@ class PalletPrintController extends Controller
public function print(Request $request, $pallet, $plant)
{
// $customerPo = $request->query('customer');
$customerPoMasterId = WireMasterPacking::where('plant_id', $plant)
->where('wire_packing_number', $pallet)
->value('customer_po_master_id');
$masterIds = WireMasterPacking::where('plant_id', $plant)
->where('wire_packing_number', $pallet)
->pluck('customer_po_master_id');
$customerPo = CustomerPoMaster::whereIn('id', $masterIds)
->value('customer_po');
$customerPoMasterIds = CustomerPoMaster::where('customer_po', $customerPo)
->pluck('id');
$items = WireMasterPacking::with('item')
->where('plant_id', $plant)
->where('wire_packing_number', $pallet)
@@ -187,31 +195,53 @@ class PalletPrintController extends Controller
$customerCode = $customer->customer_po ?? '';
$customerName = $customer->customer_name ?? '';
$totalBoxes = WireMasterPacking::where('plant_id', $plant)
->where('customer_po_master_id', $customerPoMasterId)
->select('wire_packing_number')
->groupBy('wire_packing_number')
->havingRaw(
'COUNT(*) = COUNT(CASE WHEN wire_packing_status = ? THEN 1 END)',
['Completed']
)
->count();
// $totalBoxes = WireMasterPacking::where('plant_id', $plant)
// ->where('customer_po_master_id', $customerPoMasterId)
// ->select('wire_packing_number')
// ->groupBy('wire_packing_number')
// ->havingRaw(
// 'COUNT(*) = COUNT(CASE WHEN wire_packing_status = ? THEN 1 END)',
// ['Completed']
// )
// ->count();
$completedPallets = WireMasterPacking::where('plant_id', $plant)
->where('customer_po_master_id', $customerPoMasterId)
$totalBoxes = WireMasterPacking::where('plant_id', $plant)
->whereIn('customer_po_master_id', $customerPoMasterIds)
->select('wire_packing_number')
->groupBy('wire_packing_number')
->havingRaw(
'COUNT(*) = COUNT(CASE WHEN wire_packing_status = ? THEN 1 END)',
['Completed']
)
->orderBy('wire_packing_number')
->pluck('wire_packing_number')
->values();
->count();
// $completedPallets = WireMasterPacking::where('plant_id', $plant)
// ->where('customer_po_master_id', $customerPoMasterId)
// ->select('wire_packing_number')
// ->groupBy('wire_packing_number')
// ->havingRaw(
// 'COUNT(*) = COUNT(CASE WHEN wire_packing_status = ? THEN 1 END)',
// ['Completed']
// )
// ->orderBy('wire_packing_number')
// ->pluck('wire_packing_number')
// ->values();
$completedPallets = WireMasterPacking::where('plant_id', $plant)
->whereIn('customer_po_master_id', $customerPoMasterIds)
->select('wire_packing_number')
->groupBy('wire_packing_number')
->havingRaw(
'COUNT(*) = COUNT(CASE WHEN wire_packing_status = ? THEN 1 END)',
['Completed']
)
->orderBy('wire_packing_number')
->pluck('wire_packing_number')
->values();
$index = $completedPallets->search($pallet);
$currentPalletNo = ($index !== false) ? $index + 1 : 1;
$currentPalletNo = ($index !== false) ? $index + 1 : 0;
$boxLabel = $currentPalletNo.'/'.$totalBoxes;
@@ -223,11 +253,18 @@ class PalletPrintController extends Controller
$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', [
'product' => 'Submersible Winding Wire',
'plantName' => $plantName,
'plantAddress' => $plantAddress,
'monthYear' => now()->format('M-y'),
// 'monthYear' => now()->format('M-y'),
'monthYear' => $scannedAt
? \Carbon\Carbon::parse($scannedAt)->format('M-y')
: '',
'branch' => '',
'customerCode' => $customerCode,
'customerName' => $customerName,

View File

@@ -151,19 +151,38 @@ public $records = [];
$characteristic = ProductCharacteristicsMaster::find($characteristicId);
if (($characteristic?->inspection_type ?? null) === 'Value') {
if ($characteristic && is_numeric($value) && (($value >= $characteristic->lower && $value <= $characteristic->upper) || $value == $characteristic->lower || $value == $characteristic->upper)
$itemCharacteristic = ProductCharacteristicsMaster::where('plant_id', $this->data['plant_id'])
->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';
} else {
$status = 'NotOk';
}
}
// else {
// $status = $value;
// }
else {
$status = $value;
}
ProductionCharacteristic::create([
$prod = ProductionCharacteristic::create([
'plant_id' => $this->data['plant_id'] ?? null,
'item_id' => $itemId ?? 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->dispatch('checklist-saved');
@@ -214,11 +242,24 @@ public $records = [];
$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)) {
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>
</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>
<td style="border:1px solid #d1d5db;font-weight:bold;">
Visit Time

View File

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