diff --git a/app/Filament/Resources/PlantResource.php b/app/Filament/Resources/PlantResource.php index f83c6b926..5eb2a4e09 100644 --- a/app/Filament/Resources/PlantResource.php +++ b/app/Filament/Resources/PlantResource.php @@ -61,6 +61,8 @@ class PlantResource extends Resource ->sortable(), Tables\Columns\TextColumn::make('name') ->sortable(), + Tables\Columns\TextColumn::make('address') + ->sortable(), Tables\Columns\TextColumn::make('company.name') ->sortable(), Tables\Columns\TextColumn::make('created_at') diff --git a/app/Filament/Resources/ProductionLineStopResource.php b/app/Filament/Resources/ProductionLineStopResource.php index 09316b6f0..495cb4cfd 100644 --- a/app/Filament/Resources/ProductionLineStopResource.php +++ b/app/Filament/Resources/ProductionLineStopResource.php @@ -25,12 +25,12 @@ class ProductionLineStopResource extends Resource { return $form ->schema([ - Forms\Components\Select::make('code_id') + Forms\Components\Select::make('lineStop_id') ->relationship('linestop', 'code') ->required(), - Forms\Components\Textarea::make('reason') + Forms\Components\Select::make('lineStop_id') + ->relationship('linestop', 'reason') ->required(), - //->columnSpanFull(), Forms\Components\DateTimePicker::make('from_datetime') ->required(), Forms\Components\DateTimePicker::make('to_datetime') @@ -66,7 +66,7 @@ class ProductionLineStopResource extends Resource ->sortable(), Tables\Columns\TextColumn::make('linestop.code') ->sortable(), - Tables\Columns\TextColumn::make('reason') + Tables\Columns\TextColumn::make('linestop.reason') ->sortable(), Tables\Columns\TextColumn::make('from_datetime') ->dateTime() diff --git a/app/Models/ProductionLineStop.php b/app/Models/ProductionLineStop.php index 653bd85f8..f4b01eafd 100644 --- a/app/Models/ProductionLineStop.php +++ b/app/Models/ProductionLineStop.php @@ -15,8 +15,7 @@ class ProductionLineStop extends Model "block_id", "shift_id", "line_id", - "code_id", - "reason", + "lineStop_id", "from_datetime", "to_datetime", "stop_hour", diff --git a/composer.lock b/composer.lock index a1993c395..26a97b4dd 100644 --- a/composer.lock +++ b/composer.lock @@ -71,16 +71,16 @@ }, { "name": "anourvalar/eloquent-serialize", - "version": "1.2.29", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/AnourValar/eloquent-serialize.git", - "reference": "0919c91e548d01261308fd54d27fc05a83c79d03" + "reference": "91188f82c5ec2842a5469fca6d7d64baa37ea593" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/AnourValar/eloquent-serialize/zipball/0919c91e548d01261308fd54d27fc05a83c79d03", - "reference": "0919c91e548d01261308fd54d27fc05a83c79d03", + "url": "https://api.github.com/repos/AnourValar/eloquent-serialize/zipball/91188f82c5ec2842a5469fca6d7d64baa37ea593", + "reference": "91188f82c5ec2842a5469fca6d7d64baa37ea593", "shasum": "" }, "require": { @@ -131,9 +131,9 @@ ], "support": { "issues": "https://github.com/AnourValar/eloquent-serialize/issues", - "source": "https://github.com/AnourValar/eloquent-serialize/tree/1.2.29" + "source": "https://github.com/AnourValar/eloquent-serialize/tree/1.3.0" }, - "time": "2025-02-25T05:18:46+00:00" + "time": "2025-03-22T08:49:12+00:00" }, { "name": "blade-ui-kit/blade-heroicons", @@ -980,16 +980,16 @@ }, { "name": "egulias/email-validator", - "version": "4.0.3", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "b115554301161fa21467629f1e1391c1936de517" + "reference": "d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/b115554301161fa21467629f1e1391c1936de517", - "reference": "b115554301161fa21467629f1e1391c1936de517", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa", + "reference": "d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa", "shasum": "" }, "require": { @@ -1035,7 +1035,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/4.0.3" + "source": "https://github.com/egulias/EmailValidator/tree/4.0.4" }, "funding": [ { @@ -1043,20 +1043,20 @@ "type": "github" } ], - "time": "2024-12-27T00:36:43+00:00" + "time": "2025-03-06T22:45:56+00:00" }, { "name": "filament/actions", - "version": "v3.3.4", + "version": "v3.3.5", "source": { "type": "git", "url": "https://github.com/filamentphp/actions.git", - "reference": "dd738da99c8032986e7628b09f185d8f0db7850a" + "reference": "66fc3526f39ec09156928fcdf2cd4cb44e97efc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/actions/zipball/dd738da99c8032986e7628b09f185d8f0db7850a", - "reference": "dd738da99c8032986e7628b09f185d8f0db7850a", + "url": "https://api.github.com/repos/filamentphp/actions/zipball/66fc3526f39ec09156928fcdf2cd4cb44e97efc4", + "reference": "66fc3526f39ec09156928fcdf2cd4cb44e97efc4", "shasum": "" }, "require": { @@ -1096,20 +1096,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2025-03-11T16:33:01+00:00" + "time": "2025-03-20T09:28:45+00:00" }, { "name": "filament/filament", - "version": "v3.3.4", + "version": "v3.3.5", "source": { "type": "git", "url": "https://github.com/filamentphp/panels.git", - "reference": "ae0288f28054c88a9f36f666f4752660ce72cb08" + "reference": "173e4695ed4c7318e26b11dafb79294f56775d55" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/panels/zipball/ae0288f28054c88a9f36f666f4752660ce72cb08", - "reference": "ae0288f28054c88a9f36f666f4752660ce72cb08", + "url": "https://api.github.com/repos/filamentphp/panels/zipball/173e4695ed4c7318e26b11dafb79294f56775d55", + "reference": "173e4695ed4c7318e26b11dafb79294f56775d55", "shasum": "" }, "require": { @@ -1161,20 +1161,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2025-03-11T16:33:11+00:00" + "time": "2025-03-20T09:28:52+00:00" }, { "name": "filament/forms", - "version": "v3.3.4", + "version": "v3.3.5", "source": { "type": "git", "url": "https://github.com/filamentphp/forms.git", - "reference": "647f03f3d7a15a9ce71e803926b2e89f88693e8e" + "reference": "e98beabb94e290b0edd837ffa4e6f821df5fcc89" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/forms/zipball/647f03f3d7a15a9ce71e803926b2e89f88693e8e", - "reference": "647f03f3d7a15a9ce71e803926b2e89f88693e8e", + "url": "https://api.github.com/repos/filamentphp/forms/zipball/e98beabb94e290b0edd837ffa4e6f821df5fcc89", + "reference": "e98beabb94e290b0edd837ffa4e6f821df5fcc89", "shasum": "" }, "require": { @@ -1217,20 +1217,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2025-03-11T16:33:00+00:00" + "time": "2025-03-20T09:29:10+00:00" }, { "name": "filament/infolists", - "version": "v3.3.4", + "version": "v3.3.5", "source": { "type": "git", "url": "https://github.com/filamentphp/infolists.git", - "reference": "a1355ace7341e4e44d31dc30cfc6129bd61c7d8f" + "reference": "cdf80f01fd822cbd7830dbb5892a1d1245e237fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/infolists/zipball/a1355ace7341e4e44d31dc30cfc6129bd61c7d8f", - "reference": "a1355ace7341e4e44d31dc30cfc6129bd61c7d8f", + "url": "https://api.github.com/repos/filamentphp/infolists/zipball/cdf80f01fd822cbd7830dbb5892a1d1245e237fa", + "reference": "cdf80f01fd822cbd7830dbb5892a1d1245e237fa", "shasum": "" }, "require": { @@ -1268,11 +1268,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2025-03-11T16:33:01+00:00" + "time": "2025-03-20T09:28:28+00:00" }, { "name": "filament/notifications", - "version": "v3.3.4", + "version": "v3.3.5", "source": { "type": "git", "url": "https://github.com/filamentphp/notifications.git", @@ -1324,16 +1324,16 @@ }, { "name": "filament/support", - "version": "v3.3.4", + "version": "v3.3.5", "source": { "type": "git", "url": "https://github.com/filamentphp/support.git", - "reference": "fb5ff99b8f7559815434c109d505c12c141510da" + "reference": "cf3fa32f6e419ca768e88ac061dc3c47d01ed401" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/support/zipball/fb5ff99b8f7559815434c109d505c12c141510da", - "reference": "fb5ff99b8f7559815434c109d505c12c141510da", + "url": "https://api.github.com/repos/filamentphp/support/zipball/cf3fa32f6e419ca768e88ac061dc3c47d01ed401", + "reference": "cf3fa32f6e419ca768e88ac061dc3c47d01ed401", "shasum": "" }, "require": { @@ -1379,20 +1379,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2025-03-05T09:26:25+00:00" + "time": "2025-03-20T09:29:02+00:00" }, { "name": "filament/tables", - "version": "v3.3.4", + "version": "v3.3.5", "source": { "type": "git", "url": "https://github.com/filamentphp/tables.git", - "reference": "8f9bb6449c7ff74e234848f336161af5a64561c6" + "reference": "b153de29ffe0cd5ef77d5c09a871c45f4d04b667" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/tables/zipball/8f9bb6449c7ff74e234848f336161af5a64561c6", - "reference": "8f9bb6449c7ff74e234848f336161af5a64561c6", + "url": "https://api.github.com/repos/filamentphp/tables/zipball/b153de29ffe0cd5ef77d5c09a871c45f4d04b667", + "reference": "b153de29ffe0cd5ef77d5c09a871c45f4d04b667", "shasum": "" }, "require": { @@ -1431,11 +1431,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2025-03-11T16:33:31+00:00" + "time": "2025-03-20T09:28:46+00:00" }, { "name": "filament/widgets", - "version": "v3.3.4", + "version": "v3.3.5", "source": { "type": "git", "url": "https://github.com/filamentphp/widgets.git", @@ -3272,16 +3272,16 @@ }, { "name": "monolog/monolog", - "version": "3.8.1", + "version": "3.9.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "aef6ee73a77a66e404dd6540934a9ef1b3c855b4" + "reference": "10d85740180ecba7896c87e06a166e0c95a0e3b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/aef6ee73a77a66e404dd6540934a9ef1b3c855b4", - "reference": "aef6ee73a77a66e404dd6540934a9ef1b3c855b4", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/10d85740180ecba7896c87e06a166e0c95a0e3b6", + "reference": "10d85740180ecba7896c87e06a166e0c95a0e3b6", "shasum": "" }, "require": { @@ -3359,7 +3359,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.8.1" + "source": "https://github.com/Seldaek/monolog/tree/3.9.0" }, "funding": [ { @@ -3371,7 +3371,7 @@ "type": "tidelift" } ], - "time": "2024-12-05T17:15:07+00:00" + "time": "2025-03-24T10:02:05+00:00" }, { "name": "nesbot/carbon", @@ -4526,16 +4526,16 @@ }, { "name": "ramsey/collection", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "3c5990b8a5e0b79cd1cf11c2dc1229e58e93f109" + "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/3c5990b8a5e0b79cd1cf11c2dc1229e58e93f109", - "reference": "3c5990b8a5e0b79cd1cf11c2dc1229e58e93f109", + "url": "https://api.github.com/repos/ramsey/collection/zipball/344572933ad0181accbf4ba763e85a0306a8c5e2", + "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2", "shasum": "" }, "require": { @@ -4596,9 +4596,9 @@ ], "support": { "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/2.1.0" + "source": "https://github.com/ramsey/collection/tree/2.1.1" }, - "time": "2025-03-02T04:48:29+00:00" + "time": "2025-03-22T05:38:12+00:00" }, { "name": "ramsey/uuid", @@ -4890,16 +4890,16 @@ }, { "name": "spatie/laravel-package-tools", - "version": "1.19.0", + "version": "1.91.1", "source": { "type": "git", "url": "https://github.com/spatie/laravel-package-tools.git", - "reference": "1c9c30ac6a6576b8d15c6c37b6cf23d748df2faa" + "reference": "b0b509b9b01d77caa431ce9af3a706bc678e09c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/1c9c30ac6a6576b8d15c6c37b6cf23d748df2faa", - "reference": "1c9c30ac6a6576b8d15c6c37b6cf23d748df2faa", + "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/b0b509b9b01d77caa431ce9af3a706bc678e09c9", + "reference": "b0b509b9b01d77caa431ce9af3a706bc678e09c9", "shasum": "" }, "require": { @@ -4938,7 +4938,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-package-tools/issues", - "source": "https://github.com/spatie/laravel-package-tools/tree/1.19.0" + "source": "https://github.com/spatie/laravel-package-tools/tree/1.91.1" }, "funding": [ { @@ -4946,7 +4946,7 @@ "type": "github" } ], - "time": "2025-02-06T14:58:20+00:00" + "time": "2025-03-21T09:50:49+00:00" }, { "name": "spatie/laravel-permission", @@ -7886,16 +7886,16 @@ }, { "name": "composer/class-map-generator", - "version": "1.6.0", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/composer/class-map-generator.git", - "reference": "ffe442c5974c44a9343e37a0abcb1cc37319f5b9" + "reference": "134b705ddb0025d397d8318a75825fe3c9d1da34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/class-map-generator/zipball/ffe442c5974c44a9343e37a0abcb1cc37319f5b9", - "reference": "ffe442c5974c44a9343e37a0abcb1cc37319f5b9", + "url": "https://api.github.com/repos/composer/class-map-generator/zipball/134b705ddb0025d397d8318a75825fe3c9d1da34", + "reference": "134b705ddb0025d397d8318a75825fe3c9d1da34", "shasum": "" }, "require": { @@ -7939,7 +7939,7 @@ ], "support": { "issues": "https://github.com/composer/class-map-generator/issues", - "source": "https://github.com/composer/class-map-generator/tree/1.6.0" + "source": "https://github.com/composer/class-map-generator/tree/1.6.1" }, "funding": [ { @@ -7955,7 +7955,7 @@ "type": "tidelift" } ], - "time": "2025-02-05T10:05:34+00:00" + "time": "2025-03-24T13:50:44+00:00" }, { "name": "composer/pcre", @@ -9112,16 +9112,16 @@ }, { "name": "phpunit/phpunit", - "version": "11.5.13", + "version": "11.5.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3bbb8d54b3a6718e51fd48cd478079f5f49b82bd" + "reference": "4b6a4ee654e5e0c5e1f17e2f83c0f4c91dee1f9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3bbb8d54b3a6718e51fd48cd478079f5f49b82bd", - "reference": "3bbb8d54b3a6718e51fd48cd478079f5f49b82bd", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4b6a4ee654e5e0c5e1f17e2f83c0f4c91dee1f9c", + "reference": "4b6a4ee654e5e0c5e1f17e2f83c0f4c91dee1f9c", "shasum": "" }, "require": { @@ -9141,7 +9141,7 @@ "phpunit/php-text-template": "^4.0.1", "phpunit/php-timer": "^7.0.1", "sebastian/cli-parser": "^3.0.2", - "sebastian/code-unit": "^3.0.2", + "sebastian/code-unit": "^3.0.3", "sebastian/comparator": "^6.3.1", "sebastian/diff": "^6.0.2", "sebastian/environment": "^7.2.0", @@ -9193,7 +9193,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.13" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.15" }, "funding": [ { @@ -9209,7 +9209,7 @@ "type": "tidelift" } ], - "time": "2025-03-18T13:41:57+00:00" + "time": "2025-03-23T16:02:11+00:00" }, { "name": "sebastian/cli-parser", diff --git a/database/migrations/2025_03_19_171555_create_plants_table.php b/database/migrations/2025_03_19_171555_create_plants_table.php index 50bb04f5c..ad1ae446f 100644 --- a/database/migrations/2025_03_19_171555_create_plants_table.php +++ b/database/migrations/2025_03_19_171555_create_plants_table.php @@ -14,9 +14,9 @@ return new class extends Migration CREATE TABLE plants ( id BIGINT GENERATED always AS IDENTITY PRIMARY KEY, - code INT NOT NULL CHECK (code >= 1000) UNIQUE, company_id BIGINT NOT NULL, + code INT NOT NULL CHECK (code >= 1000) UNIQUE, name TEXT NOT NULL UNIQUE, -- CITEXT use extension address TEXT NOT NULL, diff --git a/database/migrations/2025_03_20_115918_create_blocks_table.php b/database/migrations/2025_03_20_115918_create_blocks_table.php index f7bc9ef43..1cb60e70c 100644 --- a/database/migrations/2025_03_20_115918_create_blocks_table.php +++ b/database/migrations/2025_03_20_115918_create_blocks_table.php @@ -14,8 +14,8 @@ return new class extends Migration CREATE TABLE blocks ( id BIGINT GENERATED always AS IDENTITY PRIMARY KEY, - name TEXT NOT NULL, plant_id BIGINT NOT NULL, + name TEXT NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT NOW(), updated_at TIMESTAMP NOT NULL DEFAULT NOW(), diff --git a/database/migrations/2025_03_22_190920_create_lines_table.php b/database/migrations/2025_03_21_090347_create_lines_table.php similarity index 100% rename from database/migrations/2025_03_22_190920_create_lines_table.php rename to database/migrations/2025_03_21_090347_create_lines_table.php diff --git a/database/migrations/2025_03_23_163259_create_production_line_stops_table.php b/database/migrations/2025_03_23_163259_create_production_line_stops_table.php index f94a05d84..23f2071cc 100644 --- a/database/migrations/2025_03_23_163259_create_production_line_stops_table.php +++ b/database/migrations/2025_03_23_163259_create_production_line_stops_table.php @@ -18,8 +18,7 @@ return new class extends Migration shift_id BIGINT NOT NULL, block_id BIGINT NOT NULL, plant_id BIGINT NOT NULL, - code_id BIGINT NOT NULL, - reason_id BIGINT NOT NULL, + lineStop_id BIGINT NOT NULL, from_datetime TIMESTAMP NOT NULL, to_datetime TIMESTAMP NOT NULL, @@ -34,8 +33,7 @@ return new class extends Migration FOREIGN KEY (shift_id) REFERENCES shifts (id), FOREIGN KEY (block_id) REFERENCES blocks (id), FOREIGN KEY (plant_id) REFERENCES plants (id), - FOREIGN KEY (code_id) REFERENCES line_stops (id), - FOREIGN KEY (reason_id) REFERENCES line_stops (id) + FOREIGN KEY (lineStop_id) REFERENCES line_stops (id) ); SQL;