Skip to content

Track the progress of your nova resources and what data or steps are still missing.

Notifications You must be signed in to change notification settings

marshmallow-packages/nova-resource-progress

Repository files navigation

use HasMetadata;
use TrackResourceProgress;

#[ResourceProgressSuite(suite: 'progress', name: 'Progress')]
#[ResourceProgressSuite(suite: 'publish', name: 'Publish', fields: ['name', 'intro'])]
class Product extends ModelsProduct implements HasMedia, Sortable
{
    // Optional if you dont provide the fields in the attribute
    public function getProgressRequiredFields(): array
    {
        return ['name', 'intro', 'description', 'supplier_id', 'product_category_id'];
    }
}
public function setPublishActions(): array
{
    return [
        \Marshmallow\ResourceProgress\Actions\FieldFilled::class,
    ];
}
artisan make:resource-progress-action MissingTranslationsAction
a make:resource-progress-suite SeoSuite

Register your suites in the model (required action)

#[ResourceProgressSuite(suite: 'progress', name: 'Progress')]
#[ResourceProgressSuite(suite: 'publish', name: 'Publish')]
#[ResourceProgressSuite(suite: 'seo', name: 'SEO')]
class Product extends ModelsProduct implements HasMedia, Sortable

Register the field (required action)

ResourceProgress::make(__('Progress')),
// Selected resources
IndexResourceProgress::make(),

// All resources
IndexResourcesProgress::make(self::class)->standalone(),
``

About

Track the progress of your nova resources and what data or steps are still missing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published