diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results index 18853e03..a7b08578 100644 --- a/.phpunit.cache/test-results +++ b/.phpunit.cache/test-results @@ -1 +1 @@ -{"version":"pest_2.33.4","defects":{"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_Form_List":8,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_Collection_List":8,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_Category_List":8},"times":{"P\\Tests\\ArchTest::__pest_evaluable_it_will_not_use_debugging_functions":0.2,"P\\Tests\\FormsTest::__pest_evaluable_it_can_list_Form":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_Form_List":0.047,"P\\Tests\\FormsTest::__pest_evaluable_it_can_not_edit":0.042,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_create_form_page":0.09,"P\\Tests\\FormsTest::__pest_evaluable_it_can_create":0.009,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_when_not_require_login":0.009,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_when_not_require_login_for_guest":0.011,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_require_login_for_guest_user":0.012,"P\\Tests\\FormsTest::__pest_evaluable_it_can_retrieve_data":0.095,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_list_Forms":0.013,"P\\Tests\\FormsTest::__pest_evaluable_it_the_form_can_be_rendered":0.032,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_show_Form":0.013,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_require_login_for_logged_in_user":0.01,"P\\Tests\\FormsTest::__pest_evaluable_it_can_save":1.19,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_date_is_valid":0.015,"P\\Tests\\FormsTest::__pest_evaluable_it_see_ended_form_date":0.01,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_Form_List":0.058,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_Category_List":0.052,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_Collection_List":0.037,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_test":0.01,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_collection_list":0.034,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_form_list":0.052,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_category_list":0.256}} \ No newline at end of file +{"version":"pest_2.33.6","defects":[],"times":{"P\\Tests\\ArchTest::__pest_evaluable_it_will_not_use_debugging_functions":0.247,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_test":0.006,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_form_list":0.215,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_collection_list":0.031,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_category_list":0.077,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_list_Forms":0.013,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_Form_List":0.051,"P\\Tests\\FormsTest::__pest_evaluable_it_see_ended_form_date":0.03,"P\\Tests\\FormsTest::__pest_evaluable_it_the_form_can_be_rendered":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_can_retrieve_data":0.089,"P\\Tests\\FormsTest::__pest_evaluable_it_can_not_edit":0.039,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_show_Form":0.01,"P\\Tests\\FormsTest::__pest_evaluable_it_can_list_Form":0.007,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_when_not_require_login_for_guest":0.009,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_require_login_for_logged_in_user":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_require_login_for_guest_user":0.01,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_create_form_page":0.092,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_date_is_valid":0.012,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_when_not_require_login":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_can_save":1.189,"P\\Tests\\FormsTest::__pest_evaluable_it_can_create":0.007}} \ No newline at end of file diff --git a/composer.lock b/composer.lock index f3aa6d2b..f8300a24 100644 --- a/composer.lock +++ b/composer.lock @@ -1422,16 +1422,16 @@ }, { "name": "filament/actions", - "version": "v3.2.30", + "version": "v3.2.34", "source": { "type": "git", "url": "https://github.com/filamentphp/actions.git", - "reference": "e610101445120065325486af31efac7b09fca6e3" + "reference": "db3f17e5a6c550e98f8246bc2ca9c882fe1bb0e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/actions/zipball/e610101445120065325486af31efac7b09fca6e3", - "reference": "e610101445120065325486af31efac7b09fca6e3", + "url": "https://api.github.com/repos/filamentphp/actions/zipball/db3f17e5a6c550e98f8246bc2ca9c882fe1bb0e2", + "reference": "db3f17e5a6c550e98f8246bc2ca9c882fe1bb0e2", "shasum": "" }, "require": { @@ -1471,20 +1471,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-02-10T13:49:11+00:00" + "time": "2024-02-12T17:10:13+00:00" }, { "name": "filament/filament", - "version": "v3.2.30", + "version": "v3.2.34", "source": { "type": "git", "url": "https://github.com/filamentphp/panels.git", - "reference": "7a99fc15755e9cc7d42e59100d3810a3021eeee3" + "reference": "275758cf9a0dea16214a89f8185a992d4b9cafea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/panels/zipball/7a99fc15755e9cc7d42e59100d3810a3021eeee3", - "reference": "7a99fc15755e9cc7d42e59100d3810a3021eeee3", + "url": "https://api.github.com/repos/filamentphp/panels/zipball/275758cf9a0dea16214a89f8185a992d4b9cafea", + "reference": "275758cf9a0dea16214a89f8185a992d4b9cafea", "shasum": "" }, "require": { @@ -1536,20 +1536,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-02-10T13:49:32+00:00" + "time": "2024-02-13T11:56:58+00:00" }, { "name": "filament/forms", - "version": "v3.2.30", + "version": "v3.2.34", "source": { "type": "git", "url": "https://github.com/filamentphp/forms.git", - "reference": "21112c7ded80bf90049cc32fac204f791860c6db" + "reference": "2c1772bba223fee30b855870059b111bb2e465a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/forms/zipball/21112c7ded80bf90049cc32fac204f791860c6db", - "reference": "21112c7ded80bf90049cc32fac204f791860c6db", + "url": "https://api.github.com/repos/filamentphp/forms/zipball/2c1772bba223fee30b855870059b111bb2e465a9", + "reference": "2c1772bba223fee30b855870059b111bb2e465a9", "shasum": "" }, "require": { @@ -1592,11 +1592,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-02-10T13:49:10+00:00" + "time": "2024-02-11T20:52:55+00:00" }, { "name": "filament/infolists", - "version": "v3.2.30", + "version": "v3.2.34", "source": { "type": "git", "url": "https://github.com/filamentphp/infolists.git", @@ -1647,7 +1647,7 @@ }, { "name": "filament/notifications", - "version": "v3.2.30", + "version": "v3.2.34", "source": { "type": "git", "url": "https://github.com/filamentphp/notifications.git", @@ -1699,16 +1699,16 @@ }, { "name": "filament/spatie-laravel-translatable-plugin", - "version": "v3.2.30", + "version": "v3.2.34", "source": { "type": "git", "url": "https://github.com/filamentphp/spatie-laravel-translatable-plugin.git", - "reference": "549f79881fbcd0488c48bb3fcdae3e68bdabe3cb" + "reference": "f373877ade23bda28a6c95a2343a58af08163656" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/spatie-laravel-translatable-plugin/zipball/549f79881fbcd0488c48bb3fcdae3e68bdabe3cb", - "reference": "549f79881fbcd0488c48bb3fcdae3e68bdabe3cb", + "url": "https://api.github.com/repos/filamentphp/spatie-laravel-translatable-plugin/zipball/f373877ade23bda28a6c95a2343a58af08163656", + "reference": "f373877ade23bda28a6c95a2343a58af08163656", "shasum": "" }, "require": { @@ -1740,20 +1740,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-02-10T13:49:07+00:00" + "time": "2024-02-11T20:52:54+00:00" }, { "name": "filament/support", - "version": "v3.2.30", + "version": "v3.2.34", "source": { "type": "git", "url": "https://github.com/filamentphp/support.git", - "reference": "449e5e0a508ca17355911e5a1bbb93553cf4fd5a" + "reference": "c2be482587352c21bd9dc215b2e489c3598a9a06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/support/zipball/449e5e0a508ca17355911e5a1bbb93553cf4fd5a", - "reference": "449e5e0a508ca17355911e5a1bbb93553cf4fd5a", + "url": "https://api.github.com/repos/filamentphp/support/zipball/c2be482587352c21bd9dc215b2e489c3598a9a06", + "reference": "c2be482587352c21bd9dc215b2e489c3598a9a06", "shasum": "" }, "require": { @@ -1797,20 +1797,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-02-10T13:49:06+00:00" + "time": "2024-02-13T06:30:24+00:00" }, { "name": "filament/tables", - "version": "v3.2.30", + "version": "v3.2.34", "source": { "type": "git", "url": "https://github.com/filamentphp/tables.git", - "reference": "dbffcb99f85a0d54665e74b5178272c4b3eef080" + "reference": "684cd0e83203f2ffc43f38451fd5a87df8f0c944" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/tables/zipball/dbffcb99f85a0d54665e74b5178272c4b3eef080", - "reference": "dbffcb99f85a0d54665e74b5178272c4b3eef080", + "url": "https://api.github.com/repos/filamentphp/tables/zipball/684cd0e83203f2ffc43f38451fd5a87df8f0c944", + "reference": "684cd0e83203f2ffc43f38451fd5a87df8f0c944", "shasum": "" }, "require": { @@ -1850,11 +1850,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-02-10T13:49:10+00:00" + "time": "2024-02-13T11:57:12+00:00" }, { "name": "filament/widgets", - "version": "v3.2.30", + "version": "v3.2.34", "source": { "type": "git", "url": "https://github.com/filamentphp/widgets.git", @@ -2482,16 +2482,16 @@ }, { "name": "lara-zeus/list-group", - "version": "1.x-dev", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/lara-zeus/list-group.git", - "reference": "da130d6a3976c8f8709b8d14bcad2ed1e40e86d6" + "reference": "0832212eb3207866bf1e8a1b879513753c2422ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lara-zeus/list-group/zipball/da130d6a3976c8f8709b8d14bcad2ed1e40e86d6", - "reference": "da130d6a3976c8f8709b8d14bcad2ed1e40e86d6", + "url": "https://api.github.com/repos/lara-zeus/list-group/zipball/0832212eb3207866bf1e8a1b879513753c2422ab", + "reference": "0832212eb3207866bf1e8a1b879513753c2422ab", "shasum": "" }, "require": { @@ -2507,7 +2507,6 @@ "orchestra/testbench": "^8.0", "phpstan/extension-installer": "^1.1" }, - "default-branch": true, "type": "library", "extra": { "laravel": { @@ -2566,7 +2565,7 @@ "type": "github" } ], - "time": "2024-02-10T18:31:50+00:00" + "time": "2024-02-12T23:03:41+00:00" }, { "name": "laravel/framework", @@ -9408,16 +9407,16 @@ }, { "name": "nunomaduro/larastan", - "version": "v2.8.1", + "version": "v2.9.0", "source": { "type": "git", "url": "https://github.com/larastan/larastan.git", - "reference": "b7cc6a29c457a7d4f3de90466392ae9ad3e17022" + "reference": "35fa9cbe1895e76215bbe74571a344f2705fbe01" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/larastan/larastan/zipball/b7cc6a29c457a7d4f3de90466392ae9ad3e17022", - "reference": "b7cc6a29c457a7d4f3de90466392ae9ad3e17022", + "url": "https://api.github.com/repos/larastan/larastan/zipball/35fa9cbe1895e76215bbe74571a344f2705fbe01", + "reference": "35fa9cbe1895e76215bbe74571a344f2705fbe01", "shasum": "" }, "require": { @@ -9485,7 +9484,7 @@ ], "support": { "issues": "https://github.com/larastan/larastan/issues", - "source": "https://github.com/larastan/larastan/tree/v2.8.1" + "source": "https://github.com/larastan/larastan/tree/v2.9.0" }, "funding": [ { @@ -9506,7 +9505,7 @@ } ], "abandoned": "larastan/larastan", - "time": "2024-01-08T09:11:17+00:00" + "time": "2024-02-13T11:49:22+00:00" }, { "name": "nunomaduro/phpinsights", @@ -9980,16 +9979,16 @@ }, { "name": "pestphp/pest", - "version": "v2.33.4", + "version": "v2.33.6", "source": { "type": "git", "url": "https://github.com/pestphp/pest.git", - "reference": "4baf27911e088cd27c0114bd9b4ee579203f8810" + "reference": "5b0f88c22716452be59202cfe7c5a24fbb2fb7de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest/zipball/4baf27911e088cd27c0114bd9b4ee579203f8810", - "reference": "4baf27911e088cd27c0114bd9b4ee579203f8810", + "url": "https://api.github.com/repos/pestphp/pest/zipball/5b0f88c22716452be59202cfe7c5a24fbb2fb7de", + "reference": "5b0f88c22716452be59202cfe7c5a24fbb2fb7de", "shasum": "" }, "require": { @@ -9999,10 +9998,10 @@ "pestphp/pest-plugin": "^2.1.1", "pestphp/pest-plugin-arch": "^2.7.0", "php": "^8.1.0", - "phpunit/phpunit": "^10.5.9" + "phpunit/phpunit": "^10.5.10" }, "conflict": { - "phpunit/phpunit": ">10.5.9", + "phpunit/phpunit": ">10.5.10", "sebastian/exporter": "<5.1.0", "webmozart/assert": "<1.11.0" }, @@ -10072,7 +10071,7 @@ ], "support": { "issues": "https://github.com/pestphp/pest/issues", - "source": "https://github.com/pestphp/pest/tree/v2.33.4" + "source": "https://github.com/pestphp/pest/tree/v2.33.6" }, "funding": [ { @@ -10084,7 +10083,7 @@ "type": "github" } ], - "time": "2024-02-02T16:54:54+00:00" + "time": "2024-02-12T08:55:32+00:00" }, { "name": "pestphp/pest-plugin", @@ -10879,16 +10878,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.57", + "version": "1.10.58", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "1627b1d03446904aaa77593f370c5201d2ecc34e" + "reference": "a23518379ec4defd9e47cbf81019526861623ec2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/1627b1d03446904aaa77593f370c5201d2ecc34e", - "reference": "1627b1d03446904aaa77593f370c5201d2ecc34e", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/a23518379ec4defd9e47cbf81019526861623ec2", + "reference": "a23518379ec4defd9e47cbf81019526861623ec2", "shasum": "" }, "require": { @@ -10937,7 +10936,7 @@ "type": "tidelift" } ], - "time": "2024-01-24T11:51:34+00:00" + "time": "2024-02-12T20:02:57+00:00" }, { "name": "phpunit/php-code-coverage", @@ -11262,16 +11261,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.9", + "version": "10.5.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "0bd663704f0165c9e76fe4f06ffa6a1ca727fdbe" + "reference": "50b8e314b6d0dd06521dc31d1abffa73f25f850c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0bd663704f0165c9e76fe4f06ffa6a1ca727fdbe", - "reference": "0bd663704f0165c9e76fe4f06ffa6a1ca727fdbe", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/50b8e314b6d0dd06521dc31d1abffa73f25f850c", + "reference": "50b8e314b6d0dd06521dc31d1abffa73f25f850c", "shasum": "" }, "require": { @@ -11343,7 +11342,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.9" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.10" }, "funding": [ { @@ -11359,7 +11358,7 @@ "type": "tidelift" } ], - "time": "2024-01-22T14:35:40+00:00" + "time": "2024-02-04T09:07:51+00:00" }, { "name": "pimple/pimple", @@ -11539,16 +11538,16 @@ }, { "name": "rector/rector", - "version": "0.19.8", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "de3b3bb159abd704b144aa86fb244f7f1f4ac947" + "reference": "362258a1f6369fc88d02d469a5478d220f78b0e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/de3b3bb159abd704b144aa86fb244f7f1f4ac947", - "reference": "de3b3bb159abd704b144aa86fb244f7f1f4ac947", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/362258a1f6369fc88d02d469a5478d220f78b0e6", + "reference": "362258a1f6369fc88d02d469a5478d220f78b0e6", "shasum": "" }, "require": { @@ -11583,7 +11582,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/0.19.8" + "source": "https://github.com/rectorphp/rector/tree/1.0.0" }, "funding": [ { @@ -11591,7 +11590,7 @@ "type": "github" } ], - "time": "2024-02-05T10:59:13+00:00" + "time": "2024-02-06T13:38:07+00:00" }, { "name": "sebastian/cli-parser", @@ -12637,16 +12636,16 @@ }, { "name": "spatie/laravel-ray", - "version": "1.35.0", + "version": "1.35.1", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ray.git", - "reference": "29298a4bc2038ba108abc283e96fb74991644774" + "reference": "f504d3787d88c7e5de7a4290658f7ad9b1352f22" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ray/zipball/29298a4bc2038ba108abc283e96fb74991644774", - "reference": "29298a4bc2038ba108abc283e96fb74991644774", + "url": "https://api.github.com/repos/spatie/laravel-ray/zipball/f504d3787d88c7e5de7a4290658f7ad9b1352f22", + "reference": "f504d3787d88c7e5de7a4290658f7ad9b1352f22", "shasum": "" }, "require": { @@ -12656,7 +12655,7 @@ "illuminate/queue": "^7.20|^8.19|^9.0|^10.0|^11.0", "illuminate/support": "^7.20|^8.19|^9.0|^10.0|^11.0", "php": "^7.4|^8.0", - "rector/rector": "^0.19.2", + "rector/rector": "^0.19.2|^1.0", "spatie/backtrace": "^1.0", "spatie/ray": "^1.41.1", "symfony/stopwatch": "4.2|^5.1|^6.0|^7.0", @@ -12708,7 +12707,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-ray/issues", - "source": "https://github.com/spatie/laravel-ray/tree/1.35.0" + "source": "https://github.com/spatie/laravel-ray/tree/1.35.1" }, "funding": [ { @@ -12720,7 +12719,7 @@ "type": "other" } ], - "time": "2024-02-03T10:04:50+00:00" + "time": "2024-02-13T14:19:41+00:00" }, { "name": "spatie/macroable", diff --git a/resources/lang/en.json b/resources/lang/en.json index dcd428e3..89637038 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -189,7 +189,7 @@ "Color Picker": "Color Picker", "start date": "start date", "end date": "end date", - "Edit Form": "edit form", + "Edit Form": "Edit form", "Responses Entries": "Responses Entries", "section options": "section options", "more section options": "more section options", diff --git a/resources/views/filament/fields/file-upload.blade.php b/resources/views/filament/fields/file-upload.blade.php index fe1bcbe9..7f04faee 100644 --- a/resources/views/filament/fields/file-upload.blade.php +++ b/resources/views/filament/fields/file-upload.blade.php @@ -1,9 +1,18 @@ -
- @foreach($responseValue as $file) - - {{ __('view file') .': '. $loop->iteration }} - - @endforeach -
+
+ @if(filled($responseValue)) +
+ @foreach($responseValue as $file) + + {{ __('view file') .': '. $loop->iteration }} + + @endforeach +
+ @else + {{ __('no file uploaded') }} + @endif +
\ No newline at end of file diff --git a/src/Fields/Classes/FileUpload.php b/src/Fields/Classes/FileUpload.php index bfa94359..0a5cf481 100644 --- a/src/Fields/Classes/FileUpload.php +++ b/src/Fields/Classes/FileUpload.php @@ -3,12 +3,14 @@ namespace LaraZeus\Bolt\Fields\Classes; use Filament\Forms\Components\Hidden; +use Filament\Tables\Columns\TextColumn; use LaraZeus\Accordion\Forms\Accordion; use LaraZeus\Accordion\Forms\Accordions; use LaraZeus\Bolt\Facades\Bolt; use LaraZeus\Bolt\Fields\FieldsContract; use LaraZeus\Bolt\Models\Field; use LaraZeus\Bolt\Models\FieldResponse; +use LaraZeus\Bolt\Models\Response; class FileUpload extends FieldsContract { @@ -65,7 +67,7 @@ public static function getOptionsHidden(): array public function getResponse(Field $field, FieldResponse $resp): string { - $responseValue = (filled($resp->response) && Bolt::isJson($resp->response)) ? json_decode($resp->response) : [$resp->response]; + $responseValue = filled($resp->response) ? Bolt::isJson($resp->response) ? json_decode($resp->response) : [$resp->response] : []; return view('zeus::filament.fields.file-upload') ->with('resp', $resp) @@ -74,6 +76,23 @@ public function getResponse(Field $field, FieldResponse $resp): string ->render(); } + public function TableColumn(Field $field): ?\Filament\Tables\Columns\Column + { + return null; + /*return TextColumn::make('zeusData.' . $field->id) + ->label($field->name) + ->url(null) + ->searchable(query: function (Builder $query, string $search): Builder { + return $query + ->whereHas('fieldsResponses', function ($query) use ($search) { + $query->where('response', 'like', '%' . $search . '%'); + }); + }) + ->getStateUsing(fn (Response $record) => $this->getFieldResponseValue($record, $field)) + ->html() + ->toggleable();*/ + } + // @phpstan-ignore-next-line public function appendFilamentComponentsOptions($component, $zeusField, bool $hasVisibility = false) {