From 30768b39b26671bfcc096f8cfe99431857e28c51 Mon Sep 17 00:00:00 2001 From: Venkata Chandra Sekhar Nainala Date: Wed, 10 Apr 2024 15:11:23 +0200 Subject: [PATCH] fix: various bug fixes and ux/ui improvements --- app/Console/Commands/ImportEntries.php | 9 +- app/Console/Commands/ProcessEntries.php | 18 +- .../Dashboard/Imports/EntryImporter.php | 1 + .../Dashboard/Resources/CitationResource.php | 2 + .../Resources/CollectionResource.php | 24 ++- .../EntriesRelationManager.php | 17 +- app/Jobs/ImportEntry.php | 80 ++++++--- app/Livewire/ShowJobStatus.php | 24 +++ app/Models/Collection.php | 1 + app/Models/Ticker.php | 11 ++ ..._02_09_195603_create_collections_table.php | 1 + ...2024_02_09_202825_create_entries_table.php | 1 + ...24_02_09_202858_create_molecules_table.php | 2 +- ...2024_04_09_220005_create_tickers_table.php | 30 ++++ database/seeders/DatabaseSeeder.php | 6 +- package-lock.json | 155 ++++++++++++++---- package.json | 11 +- postcss.config.js | 1 + .../views/livewire/show-job-status.blade.php | 26 +++ tailwind.config.js | 6 + 20 files changed, 340 insertions(+), 86 deletions(-) create mode 100644 app/Livewire/ShowJobStatus.php create mode 100644 app/Models/Ticker.php create mode 100644 database/migrations/2024_04_09_220005_create_tickers_table.php create mode 100644 resources/views/livewire/show-job-status.blade.php diff --git a/app/Console/Commands/ImportEntries.php b/app/Console/Commands/ImportEntries.php index c2f90710..1a54cef0 100644 --- a/app/Console/Commands/ImportEntries.php +++ b/app/Console/Commands/ImportEntries.php @@ -39,6 +39,10 @@ public function handle() } foreach ($collections as $collection) { + $collection->jobs_status = 'PROCESSING'; + $collection->job_info = 'Importing entries: Citations, Organism Info and other details'; + $collection->save(); + $batchJobs = []; $i = 0; Entry::select('id')->where('status', 'PASSED')->where('collection_id', $collection->id)->chunk(100, function ($ids) use (&$batchJobs, &$i) { @@ -47,7 +51,10 @@ public function handle() }); $batch = Bus::batch($batchJobs)->then(function (Batch $batch) { })->catch(function (Batch $batch, Throwable $e) { - })->finally(function (Batch $batch) { + })->finally(function (Batch $batch) use ($collection) { + $collection->jobs_status = 'INCURATION'; + $collection->job_info = ''; + $collection->save(); })->name('Import Entries '.$collection->id) ->allowFailures(false) ->onConnection('redis') diff --git a/app/Console/Commands/ProcessEntries.php b/app/Console/Commands/ProcessEntries.php index e84c9d3c..71b1c0ab 100644 --- a/app/Console/Commands/ProcessEntries.php +++ b/app/Console/Commands/ProcessEntries.php @@ -3,6 +3,7 @@ namespace App\Console\Commands; use App\Jobs\LoadEntriesBatch; +use App\Models\Collection; use App\Models\Entry; use Artisan; use Illuminate\Bus\Batch; @@ -35,18 +36,25 @@ public function handle() foreach ($collectionIds as $collectionId) { $batchJobs = []; $i = 0; - Entry::select('id')->where('status', 'SUBMITTED')->where('collection_id', $collectionId)->chunk(100, function ($ids) use (&$batchJobs, &$i) { + + $collection = Collection::whereId($collectionId['collection_id'])->first(); + $collection->jobs_status = 'PROCESSING'; + $collection->job_info = 'Processing entries using ChEMBL Pipeline.'; + $collection->save(); + + Entry::select('id')->where('status', 'SUBMITTED')->where('collection_id', $collectionId['collection_id'])->chunk(100, function ($ids) use (&$batchJobs, &$i) { array_push($batchJobs, new LoadEntriesBatch($ids->pluck('id')->toArray())); $i = $i + 1; }); $batch = Bus::batch($batchJobs)->then(function (Batch $batch) { })->catch(function (Batch $batch, Throwable $e) { - })->finally(function (Batch $batch) use ($collectionId) { - + })->finally(function (Batch $batch) use ($collection) { Artisan::call('entries:import', [ - 'collection_id' => $collectionId['collection_id'], + 'collection_id' => $collection->id, ]); - + $collection->jobs_status = 'INCURATION'; + $collection->job_info = ''; + $collection->save(); })->name('Process Entries '.$collectionId['collection_id']) ->allowFailures(false) ->onConnection('redis') diff --git a/app/Filament/Dashboard/Imports/EntryImporter.php b/app/Filament/Dashboard/Imports/EntryImporter.php index 56768721..0b5aacc9 100644 --- a/app/Filament/Dashboard/Imports/EntryImporter.php +++ b/app/Filament/Dashboard/Imports/EntryImporter.php @@ -17,6 +17,7 @@ public static function getColumns(): array return [ ImportColumn::make('canonical_smiles'), ImportColumn::make('reference_id'), + ImportColumn::make('name'), ImportColumn::make('doi'), ImportColumn::make('link'), ImportColumn::make('organism'), diff --git a/app/Filament/Dashboard/Resources/CitationResource.php b/app/Filament/Dashboard/Resources/CitationResource.php index 9c9e916d..3776f60c 100644 --- a/app/Filament/Dashboard/Resources/CitationResource.php +++ b/app/Filament/Dashboard/Resources/CitationResource.php @@ -20,6 +20,8 @@ class CitationResource extends Resource protected static ?string $model = Citation::class; + protected static ?string $recordTitleAttribute = 'title'; + protected static ?int $navigationSort = 2; protected static ?string $navigationIcon = 'heroicon-o-ticket'; diff --git a/app/Filament/Dashboard/Resources/CollectionResource.php b/app/Filament/Dashboard/Resources/CollectionResource.php index dd295277..54cb7c3e 100644 --- a/app/Filament/Dashboard/Resources/CollectionResource.php +++ b/app/Filament/Dashboard/Resources/CollectionResource.php @@ -5,13 +5,14 @@ use App\Filament\Dashboard\Resources\CollectionResource\Pages; use App\Filament\Dashboard\Resources\CollectionResource\RelationManagers\CitationsRelationManager; use App\Filament\Dashboard\Resources\CollectionResource\RelationManagers\EntriesRelationManager; +use App\Livewire\ShowJobStatus; use App\Models\Collection; +use Filament\Forms\Components\Livewire; use Filament\Forms\Components\Section; use Filament\Forms\Components\Select; use Filament\Forms\Components\SpatieTagsInput; use Filament\Forms\Components\TextArea; use Filament\Forms\Components\TextInput; -use Filament\Forms\Components\ToggleButtons; use Filament\Forms\Form; use Filament\Forms\Set; use Filament\Resources\Resource; @@ -30,11 +31,16 @@ class CollectionResource extends Resource protected static ?string $navigationIcon = 'heroicon-o-swatch'; + protected static ?string $recordTitleAttribute = 'title'; + public static function form(Form $form): Form { return $form ->schema( [ + + Livewire::make(ShowJobStatus::class), + Section::make('Database details') ->description('Provide details of the database and link to the resource.') ->schema([ @@ -48,23 +54,15 @@ public static function form(Form $form): Form Section::make('Meta data') ->schema([ SpatieTagsInput::make('tags') - ->type('collections'), + ->type('collections'), TextInput::make('identifier'), ]), Section::make('Distribution') ->schema([ Select::make('license') - ->relationship('license', 'title') - ->preload() - ->searchable(), - // ToggleButtons::make('status') - // ->options([ - // 'DRAFT' => 'Draft', - // 'REVIEW' => 'Review', - // 'EMBARGO' => 'Embargo', - // 'PUBLISHED' => 'Published', - // 'REJECTED' => 'Rejected', - // ])->inline(), + ->relationship('license', 'title') + ->preload() + ->searchable(), ]), ] )->columns(1); diff --git a/app/Filament/Dashboard/Resources/CollectionResource/RelationManagers/EntriesRelationManager.php b/app/Filament/Dashboard/Resources/CollectionResource/RelationManagers/EntriesRelationManager.php index 81851b96..53831fbe 100644 --- a/app/Filament/Dashboard/Resources/CollectionResource/RelationManagers/EntriesRelationManager.php +++ b/app/Filament/Dashboard/Resources/CollectionResource/RelationManagers/EntriesRelationManager.php @@ -30,6 +30,9 @@ public function form(Form $form): Form Forms\Components\TextInput::make('canonical_smiles') ->required() ->maxLength(255), + Forms\Components\TextInput::make('name') + ->required() + ->maxLength(255), Forms\Components\TextInput::make('doi') ->required() ->maxLength(255), @@ -42,11 +45,20 @@ public function form(Form $form): Form Forms\Components\TextInput::make('organism_part') ->required() ->maxLength(255), + Forms\Components\TextInput::make('mol_filename') + ->required() + ->maxLength(255), Forms\Components\TextInput::make('molecular_formula') ->required() ->maxLength(255), Forms\Components\TextArea::make('structural_comments') ->required(), + Forms\Components\TextInput::make('geo_location') + ->required() + ->maxLength(255), + Forms\Components\TextInput::make('location') + ->required() + ->maxLength(255), Forms\Components\TextArea::make('errors') ->required(), Forms\Components\TextInput::make('standardized_canonical_smiles') @@ -66,12 +78,15 @@ public function infolist(Infolist $infolist): Infolist Section::make() ->schema([ TextEntry::make('reference_id'), + TextEntry::make('name'), TextEntry::make('doi'), TextEntry::make('link'), TextEntry::make('organism'), TextEntry::make('organism_part'), TextEntry::make('molecular_formula'), TextEntry::make('structural_comments'), + TextEntry::make('geo_location'), + TextEntry::make('location'), TextEntry::make('errors'), ]), Section::make() @@ -122,7 +137,7 @@ public function table(Table $table): Table ->height(200) ->ring(5) ->defaultImageUrl(url('/images/placeholder.png')), - Tables\Columns\TextColumn::make('identifier')->searchable(), + Tables\Columns\TextColumn::make('reference_id')->searchable(), Tables\Columns\TextColumn::make('status'), ]) ->filters([ diff --git a/app/Jobs/ImportEntry.php b/app/Jobs/ImportEntry.php index 4cbe499e..5121c8ab 100644 --- a/app/Jobs/ImportEntry.php +++ b/app/Jobs/ImportEntry.php @@ -5,6 +5,7 @@ use App\Models\Citation; use App\Models\Molecule; use App\Models\Properties; +use App\Models\Ticker; use Illuminate\Bus\Batchable; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldBeUnique; @@ -29,6 +30,14 @@ public function __construct($entry) $this->entry = $entry; } + /** + * Get the unique ID for the job. + */ + public function uniqueId(): string + { + return $this->entry->uuid; + } + /** * Execute the job. */ @@ -41,46 +50,41 @@ public function handle(): void if ($parent->wasRecentlyCreated) { $parent->is_parent = true; $parent->has_variants = true; - $parent->identifier = $this->entry->coconut_id; $parent->is_placeholder = true; $parent->variants_count += $parent->variants_count; $parent = $this->assignData($parent, $data); $parent->save(); - - $this->fetchIUPACNameFromPubChem($parent); - $this->attachProperties('parent', $parent); - $this->classify($parent); + // $this->fetchIUPACNameFromPubChem($parent); + // $this->attachProperties('parent', $parent); + // $this->classify($parent); } - $this->attachCollection($parent); $data = $this->getRepresentations('standardized'); $molecule = Molecule::firstOrCreate(['standard_inchi' => $data['standard_inchi'], 'standard_inchi_key' => $data['standard_inchikey']]); if ($molecule->wasRecentlyCreated) { $molecule->has_stereo = true; $molecule->parent_id = $parent->id; - $parent->ticker = $parent->ticker + 1; - $molecule->identifier = $this->entry->coconut_id.'.'.$parent->ticker; - $molecule = $this->assignData($molecule, $data); - $this->fetchIUPACNameFromPubChem($molecule); - $this->attachProperties('standardized', $molecule); $parent->save(); - $this->classify($molecule); + $molecule = $this->assignData($molecule, $data); + // $this->fetchIUPACNameFromPubChem($molecule); + // $this->attachProperties('standardized', $molecule); + // $this->classify($molecule); $molecule->save(); } $this->entry->molecule_id = $molecule->id; $this->entry->save(); + $this->attachCollection($parent); $this->attachCollection($molecule); } else { $data = $this->getRepresentations('standardized'); $molecule = Molecule::firstOrCreate(['standard_inchi' => $data['standard_inchi'], 'standard_inchi_key' => $data['standard_inchikey']]); if ($molecule->wasRecentlyCreated) { $molecule = $this->assignData($molecule, $data); - $molecule->identifier = $this->entry->coconut_id; $molecule->save(); - $this->fetchIUPACNameFromPubChem($molecule); - $this->attachProperties('standardized', $molecule); - $this->classify($molecule); + // $this->fetchIUPACNameFromPubChem($molecule); + // $this->attachProperties('standardized', $molecule); + // $this->classify($molecule); } $this->entry->molecule_id = $molecule->id; $this->entry->save(); @@ -88,14 +92,37 @@ public function handle(): void } if ($this->entry->doi && $this->entry->doi != '') { - $this->fetchCitation($this->entry->doi, $molecule); + $dois = explode('|', $this->entry->doi); + + $doiRegex = '/\b(10[.][0-9]{4,}(?:[.][0-9]+)*)\b/'; + foreach ($dois as $doi) { + if (preg_match($doiRegex, $doi)) { + $this->fetchDOICitation($doi, $molecule); + } else { + $this->fetchCitation($doi, $molecule); + } + } } } } - public function classify($molecule) + public function fetchIdentifier() { + $ticker = Ticker::first(); + $identifier = $ticker->index + 1; + $ticker->index = $identifier; + $ticker->save(); + $CNP = 'CNP'.$identifier; + + while (Molecule::where('identifier', $CNP)->exists()) { + return $this->fetchIdentifier(); + } + return $CNP; + } + + public function classify($molecule) + { $properties = $molecule->properties; if ($properties->chemical_class == null || $properties->chemical_sub_class == null || $properties->chemical_super_class == null || $properties->direct_parent_classification == null) { @@ -146,8 +173,15 @@ public function classify($molecule) } - public function fetchCitation($doi, $molecule) + public function fetchCitation($citation_text, $molecule) + { + $citation = Citation::firstOrCreate(['citation_text' => $citation_text]); + $molecule->citations()->syncWithoutDetaching($citation); + } + + public function fetchDOICitation($doi, $molecule) { + $citation = null; // check if the doi is valid @@ -155,10 +189,13 @@ public function fetchCitation($doi, $molecule) if ($isDOI) { + echo $doi; + echo '/r/n'; + //check if citation already exists - $citation = Citation::where('doi', $doi)->first(); + $citation = Citation::firstOrCreate(['doi' => $doi]); $citationResponse = null; - if (! $citation) { + if ($citation->wasRecentlyCreated) { // fetch citation from EuropePMC $europemcUrl = env('EUROPEPMC_WS_API'); $europemcParams = [ @@ -199,7 +236,6 @@ public function fetchCitation($doi, $molecule) } } - // attach citation $molecule->citations()->syncWithoutDetaching($citation); } } diff --git a/app/Livewire/ShowJobStatus.php b/app/Livewire/ShowJobStatus.php new file mode 100644 index 00000000..cca880de --- /dev/null +++ b/app/Livewire/ShowJobStatus.php @@ -0,0 +1,24 @@ +collection = $record; + } + + public function render() + { + return view('livewire.show-job-status', [ + 'status' => $this->collection->jobs_status, + 'info' => $this->collection->job_info, + ]); + } +} diff --git a/app/Models/Collection.php b/app/Models/Collection.php index ea405a8c..7f1c776a 100644 --- a/app/Models/Collection.php +++ b/app/Models/Collection.php @@ -31,6 +31,7 @@ protected static function booted() 'title', 'slug', 'description', + 'jobs_status', 'comments', 'identifier', 'url', diff --git a/app/Models/Ticker.php b/app/Models/Ticker.php new file mode 100644 index 00000000..1afaa343 --- /dev/null +++ b/app/Models/Ticker.php @@ -0,0 +1,11 @@ +uuid('uuid')->unique(); $table->enum('status', ['DRAFT', 'REVIEW', 'EMBARGO', 'PUBLISHED', 'REJECTED'])->default('DRAFT'); $table->enum('jobs_status', ['INCURATION', 'QUEUED', 'PROCESSING', 'COMPLETE'])->default('INCURATION'); + $table->longText('job_info')->nullable(); $table->longText('doi')->nullable(); $table->foreignId('owner_id')->nullable(); $table->foreignId('license_id')->nullable(); diff --git a/database/migrations/2024_02_09_202825_create_entries_table.php b/database/migrations/2024_02_09_202825_create_entries_table.php index c8d22414..28dd837d 100644 --- a/database/migrations/2024_02_09_202825_create_entries_table.php +++ b/database/migrations/2024_02_09_202825_create_entries_table.php @@ -15,6 +15,7 @@ public function up(): void $table->id(); $table->longText('canonical_smiles')->nullable(); $table->longText('reference_id')->nullable(); + $table->longText('name')->nullable(); $table->longText('doi')->nullable(); $table->longText('link')->nullable(); $table->longText('organism')->nullable(); diff --git a/database/migrations/2024_02_09_202858_create_molecules_table.php b/database/migrations/2024_02_09_202858_create_molecules_table.php index ad779a65..4d96547d 100644 --- a/database/migrations/2024_02_09_202858_create_molecules_table.php +++ b/database/migrations/2024_02_09_202858_create_molecules_table.php @@ -20,7 +20,7 @@ public function up(): void $table->longText('standard_inchi_key')->nullable(); $table->longText('canonical_smiles')->nullable(); $table->longText('sugar_free_smiles')->nullable(); - $table->longText('identifier')->nullable()->unique(); + $table->longText('identifier')->nullable(); $table->longText('name')->nullable(); $table->longText('cas')->nullable(); $table->json('synonyms')->nullable(); diff --git a/database/migrations/2024_04_09_220005_create_tickers_table.php b/database/migrations/2024_04_09_220005_create_tickers_table.php new file mode 100644 index 00000000..85a2c2e9 --- /dev/null +++ b/database/migrations/2024_04_09_220005_create_tickers_table.php @@ -0,0 +1,30 @@ +id(); + $table->string('type'); + $table->bigInteger('index')->default(0); + $table->json('meta')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('tickers'); + } +}; diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 3ae0962f..bfc822d3 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -15,7 +15,7 @@ class DatabaseSeeder extends Seeder */ public function run(): void { - // \App\Models\User::factory(10)->create(); + \App\Models\User::factory(10)->create(); $password = Str::random(); $email = 'superadmin@email.com'; @@ -33,7 +33,7 @@ public function run(): void $this->call(ShieldSeeder::class); $this->call(LicenseSeeder::class); - $this->call(CitationSeeder::class); - $this->call(CollectionSeeder::class); + // $this->call(CitationSeeder::class); + // $this->call(CollectionSeeder::class); } } diff --git a/package-lock.json b/package-lock.json index b0656882..4c32b64f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,14 +8,15 @@ "openchemlib": "^8.9.0" }, "devDependencies": { - "@tailwindcss/forms": "^0.5.2", - "@tailwindcss/typography": "^0.5.0", - "autoprefixer": "^10.4.7", + "@tailwindcss/forms": "^0.5.7", + "@tailwindcss/typography": "^0.5.12", + "autoprefixer": "^10.4.19", "axios": "^1.6.4", "laravel-vite-plugin": "^1.0.0", - "postcss": "^8.4.14", + "postcss": "^8.4.38", + "postcss-nesting": "^12.1.1", "prettier": "^3.2.5", - "tailwindcss": "^3.1.0", + "tailwindcss": "^3.4.3", "vite": "^5.0.0" } }, @@ -691,9 +692,9 @@ } }, "node_modules/@tailwindcss/typography": { - "version": "0.5.10", - "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.10.tgz", - "integrity": "sha512-Pe8BuPJQJd3FfRnm6H0ulKIGoMEQS+Vq01R6M5aCrFB/ccR/shT+0kXLjouGC1gFLm9hopTFN+DMP0pfwRWzPw==", + "version": "0.5.12", + "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.12.tgz", + "integrity": "sha512-CNwpBpconcP7ppxmuq3qvaCxiRWnbhANpY/ruH4L5qs2GCiVDJXde/pjj2HWPV1+Q4G9+V/etrwUYopdcjAlyg==", "dev": true, "dependencies": { "lodash.castarray": "^4.4.0", @@ -767,9 +768,9 @@ "dev": true }, "node_modules/autoprefixer": { - "version": "10.4.17", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.17.tgz", - "integrity": "sha512-/cpVNRLSfhOtcGflT13P2794gVSgmPgTR+erw5ifnMLZb0UnSlkK4tquLmkd3BhA+nLo5tX8Cu0upUsGKvKbmg==", + "version": "10.4.19", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz", + "integrity": "sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==", "dev": true, "funding": [ { @@ -786,8 +787,8 @@ } ], "dependencies": { - "browserslist": "^4.22.2", - "caniuse-lite": "^1.0.30001578", + "browserslist": "^4.23.0", + "caniuse-lite": "^1.0.30001599", "fraction.js": "^4.3.7", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", @@ -851,9 +852,9 @@ } }, "node_modules/browserslist": { - "version": "4.22.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.3.tgz", - "integrity": "sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "dev": true, "funding": [ { @@ -870,8 +871,8 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001580", - "electron-to-chromium": "^1.4.648", + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", "node-releases": "^2.0.14", "update-browserslist-db": "^1.0.13" }, @@ -892,9 +893,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001585", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001585.tgz", - "integrity": "sha512-yr2BWR1yLXQ8fMpdS/4ZZXpseBgE7o4g41x3a6AJOqZuOi+iE/WdJYAuZ6Y95i4Ohd2Y+9MzIWRR+uGABH4s3Q==", + "version": "1.0.30001608", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001608.tgz", + "integrity": "sha512-cjUJTQkk9fQlJR2s4HMuPMvTiRggl0rAVMtthQuyOlDWuqHXqN8azLq+pi8B2TjwKJ32diHjUqRIKeFX4z1FoA==", "dev": true, "funding": [ { @@ -1040,9 +1041,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.664", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.664.tgz", - "integrity": "sha512-k9VKKSkOSNPvSckZgDDl/IQx45E1quMjX8QfLzUsAs/zve8AyFDK+ByRynSP/OfEfryiKHpQeMf00z0leLCc3A==", + "version": "1.4.731", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.731.tgz", + "integrity": "sha512-+TqVfZjpRz2V/5SPpmJxq9qK620SC5SqCnxQIOi7i/U08ZDcTpKbT7Xjj9FU5CbXTMUb4fywbIr8C7cGv4hcjw==", "dev": true }, "node_modules/emoji-regex": { @@ -1656,9 +1657,9 @@ } }, "node_modules/postcss": { - "version": "8.4.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz", - "integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==", + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", "dev": true, "funding": [ { @@ -1677,7 +1678,7 @@ "dependencies": { "nanoid": "^3.3.7", "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "source-map-js": "^1.2.0" }, "engines": { "node": "^10 || ^12 || >=14" @@ -1795,6 +1796,90 @@ "node": ">=4" } }, + "node_modules/postcss-nesting": { + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-12.1.1.tgz", + "integrity": "sha512-qc74KvIAQNa5ujZKG1UV286dhaDW6basbUy2i9AzNU/T8C9hpvGu9NZzm1SfePe2yP7sPYgpA8d4sPVopn2Hhw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "dependencies": { + "@csstools/selector-resolve-nested": "^1.1.0", + "@csstools/selector-specificity": "^3.0.3", + "postcss-selector-parser": "^6.0.13" + }, + "engines": { + "node": "^14 || ^16 || >=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/postcss-nesting/node_modules/@csstools/selector-resolve-nested": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-resolve-nested/-/selector-resolve-nested-1.1.0.tgz", + "integrity": "sha512-uWvSaeRcHyeNenKg8tp17EVDRkpflmdyvbE0DHo6D/GdBb6PDnCYYU6gRpXhtICMGMcahQmj2zGxwFM/WC8hCg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "engines": { + "node": "^14 || ^16 || >=18" + }, + "peerDependencies": { + "postcss-selector-parser": "^6.0.13" + } + }, + "node_modules/postcss-nesting/node_modules/@csstools/selector-specificity": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.0.3.tgz", + "integrity": "sha512-KEPNw4+WW5AVEIyzC80rTbWEUatTW2lXpN8+8ILC8PiPeWPjwUzrPZDIOZ2wwqDmeqOYTdSGyL3+vE5GC3FB3Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "engines": { + "node": "^14 || ^16 || >=18" + }, + "peerDependencies": { + "postcss-selector-parser": "^6.0.13" + } + }, + "node_modules/postcss-nesting/node_modules/postcss-selector-parser": { + "version": "6.0.16", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.16.tgz", + "integrity": "sha512-A0RVJrX+IUkVZbW3ClroRWurercFhieevHB38sr2+l9eUClMqome3LmEmnhlNy+5Mr2EYN6B2Kaw9wYdd+VHiw==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/postcss-selector-parser": { "version": "6.0.10", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", @@ -1992,9 +2077,9 @@ } }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", "dev": true, "engines": { "node": ">=0.10.0" @@ -2131,9 +2216,9 @@ } }, "node_modules/tailwindcss": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.1.tgz", - "integrity": "sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.3.tgz", + "integrity": "sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A==", "dev": true, "dependencies": { "@alloc/quick-lru": "^5.2.0", @@ -2144,7 +2229,7 @@ "fast-glob": "^3.3.0", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", - "jiti": "^1.19.1", + "jiti": "^1.21.0", "lilconfig": "^2.1.0", "micromatch": "^4.0.5", "normalize-path": "^3.0.0", diff --git a/package.json b/package.json index 44ca3a37..9eac84db 100644 --- a/package.json +++ b/package.json @@ -7,14 +7,15 @@ "format": "prettier resources/js --write" }, "devDependencies": { - "@tailwindcss/forms": "^0.5.2", - "@tailwindcss/typography": "^0.5.0", - "autoprefixer": "^10.4.7", + "@tailwindcss/forms": "^0.5.7", + "@tailwindcss/typography": "^0.5.12", + "autoprefixer": "^10.4.19", "axios": "^1.6.4", "laravel-vite-plugin": "^1.0.0", - "postcss": "^8.4.14", + "postcss": "^8.4.38", + "postcss-nesting": "^12.1.1", "prettier": "^3.2.5", - "tailwindcss": "^3.1.0", + "tailwindcss": "^3.4.3", "vite": "^5.0.0" }, "dependencies": { diff --git a/postcss.config.js b/postcss.config.js index 49c0612d..b9508a1b 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,5 +1,6 @@ export default { plugins: { + 'tailwindcss/nesting': 'postcss-nesting', tailwindcss: {}, autoprefixer: {}, }, diff --git a/resources/views/livewire/show-job-status.blade.php b/resources/views/livewire/show-job-status.blade.php new file mode 100644 index 00000000..fda61620 --- /dev/null +++ b/resources/views/livewire/show-job-status.blade.php @@ -0,0 +1,26 @@ +
+
+@if($status == 'PROCESSING') +
+
+
+ + + + +   +
+
+

JOBS IN PROGRESS

+
+

{{ $info }}

+
+
+
+
+@endif +
+
diff --git a/tailwind.config.js b/tailwind.config.js index e29c63c5..cac6e77f 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,14 +1,20 @@ import defaultTheme from 'tailwindcss/defaultTheme'; import forms from '@tailwindcss/forms'; import typography from '@tailwindcss/typography'; +import preset from './vendor/filament/support/tailwind.config.preset' /** @type {import('tailwindcss').Config} */ export default { + presets: [preset], + content: [ './vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php', './vendor/laravel/jetstream/**/*.blade.php', './storage/framework/views/*.php', './resources/views/**/*.blade.php', + './app/Filament/**/*.php', + './resources/views/filament/**/*.blade.php', + './vendor/filament/**/*.blade.php', ], theme: {