Coder Social home page Coder Social logo

nova-tabs's People

Contributors

ackermann avatar bajramemini avatar bernhardh avatar crynobone avatar dependabot[bot] avatar elijahworkz avatar emeto avatar feldsam avatar funkdoobiest avatar gertiozuni avatar henriquespin avatar ianrobertsff avatar jazo avatar johanvanhelden avatar johnpuddephatt avatar kosmonowt avatar lorenzosapora avatar manogi avatar marcfil avatar marcoboers avatar marcoraddatz avatar miki131 avatar mouadziani avatar niekdemelker avatar pbrisson avatar rderks88 avatar royduin avatar rvxlab avatar swatty007 avatar vbezruchkin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nova-tabs's Issues

MorphToMany Relationship

For MorphToMany Relationship the Tab changes "Attache Resource" button to "Create Resource" then when click create it gives error as explain in #1

Markdown field bug

image

When I used the "Markdown Field", I found that there was no content in the details.

Resource detail toolbar disappears when all fields are inside tabs

When you put all fields into tabs and navigate to the resource detail, then the toolbar doesn't get displayed. i.e. the actions button, edit button and delete buttons are not present. At least one field must be outside of tabs. Also that field cannot be inside a panel either as that also doesn't make the buttons display.

tabs

image

Tabs not working with custom resource tools

I have a working resource tool but when i setup the tabs, the resource tool title aperas as the tab title and nothing inside.

Code in the resource:

new Tabs('Tabs', [
                'Details' => [
                    ID::make()->sortable(),

                    Text::make('First name', 'firstName')
                        ->sortable()
                        ->rules('required', 'max:255'),
                    
                    Text::make('Last name', 'lastName')
                        ->sortable()
                        ->rules('required', 'max:255'),

                    Text::make('Email')
                        ->sortable()
                        ->rules('required', 'email', 'max:254')
                        ->creationRules('unique:users,email')
                        ->updateRules('unique:users,email,{{resourceId}}'),

                    Password::make('Password')
                        ->onlyOnForms()
                        ->creationRules('required', 'string', 'min:6')
                        ->updateRules('nullable', 'string', 'min:6'),
                ],
                'Permissions' => [
                    NovaUserPermissions::make(),
                ],
            ]),

Capture of the tab:

screen shot 2019-02-08 at 18 16 37

Error in the chrome console:

vendor.js?id=9e34ca4c58232cf1ad19:94149 [Vue warn]: Unknown custom element: <detail-nova-user-permissions> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

found in

---> <DetailTabs>
       <LoadingView> at resources/js/components/LoadingView.vue
         <Detail> at resources/js/views/Detail.vue
           <Root>

resource-tools: How to show on Edit tab?

Hi.

I have been trying to create a custom resource-tool (https://nova.laravel.com/docs/2.0/customization/resource-tools.html), and show it on View and Edit tabs using your package, but I only see it on the View tab. I am familiar with this ticket #20 which was preventing the resource tool from appearing on the View tabs, but I am wondering how that fix could allow custom resource-tools to appear on the Edit tabs too.

From looking at the commit in the link above, it appears to only show the Detail vue if the resource-tool's registered name matches the package - if that is so, presumably the Form vue needs a different registration name, otherwise they'd be the same? I hope I'm being clear. When I look at the equivalent code for the Edit tab, (within FormTabs.vue, line 39) it appears to expect the vue to have a 'form-' prefix, like the DetailTabs.vue file had, before it was fixed. I tried renaming my edit form to be prefixed with 'form-', but no joy.

Can someone please help me understand if I'm making a newbie mistake, or if a further commit is needed to FormTabs.vue?

I am using this default registration code to show my resource tool on the 'View' Detail pane:
Nova.booting((Vue, router, store) => { Vue.component('resource-tool-demo', require('./components/Tool')) })

but expected something more like:
Nova.booting((Vue, router, store) => { Vue.component('detail-resource-tool-demo', require('./components/DetailTool')) Vue.component('form-resource-tool-demo', require('./components/FormTool')) })

Thank you.

Call to undefined method Laravel\Nova\Panel::defaultNameForUpdate()

Hello,
suddenly after updating my composer packages , and tried to open the application
i got error when trying to edit any resource with TabsOnEdit,
i looked at Laravel\Nova\Panel and there is no such method like defaultNameForUpdate

{
    "message": "Call to undefined method Laravel\\Nova\\Panel::defaultNameForUpdate()",
    "exception": "Symfony\\Component\\Debug\\Exception\\FatalThrowableError",
    "file": "E:\\Laravel\\Paymint\\latest\\vendor\\eminiarts\\nova-tabs\\src\\TabsOnEdit.php",
    "line": 113,
    "trace": [
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\nova\\src\\Http\\Controllers\\UpdateFieldController.php",
            "line": 24,
            "function": "updateFields",
            "class": "App\\Nova\\Setting",
            "type": "->"
        },
        {
            "function": "index",
            "class": "Laravel\\Nova\\Http\\Controllers\\UpdateFieldController",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Controller.php",
            "line": 54,
            "function": "call_user_func_array"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\ControllerDispatcher.php",
            "line": 45,
            "function": "callAction",
            "class": "Illuminate\\Routing\\Controller",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 219,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\ControllerDispatcher",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 176,
            "function": "runController",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 682,
            "function": "run",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php",
            "line": 30,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\nova\\src\\Http\\Middleware\\Authorize.php",
            "line": 18,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Laravel\\Nova\\Http\\Middleware\\Authorize",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php",
            "line": 53,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\nova\\src\\Http\\Middleware\\BootTools.php",
            "line": 20,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Laravel\\Nova\\Http\\Middleware\\BootTools",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php",
            "line": 53,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\nova\\src\\Http\\Middleware\\DispatchServingNovaEvent.php",
            "line": 20,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Laravel\\Nova\\Http\\Middleware\\DispatchServingNovaEvent",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php",
            "line": 53,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Auth\\Middleware\\Authenticate.php",
            "line": 43,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\nova\\src\\Http\\Middleware\\Authenticate.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Auth\\Middleware\\Authenticate",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Laravel\\Nova\\Http\\Middleware\\Authenticate",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php",
            "line": 53,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php",
            "line": 41,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php",
            "line": 53,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken.php",
            "line": 75,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php",
            "line": 53,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\View\\Middleware\\ShareErrorsFromSession.php",
            "line": 49,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Illuminate\\View\\Middleware\\ShareErrorsFromSession",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php",
            "line": 53,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Session\\Middleware\\StartSession.php",
            "line": 63,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Illuminate\\Session\\Middleware\\StartSession",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php",
            "line": 53,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse.php",
            "line": 37,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php",
            "line": 53,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Cookie\\Middleware\\EncryptCookies.php",
            "line": 66,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Illuminate\\Cookie\\Middleware\\EncryptCookies",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php",
            "line": 53,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 104,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 684,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 659,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 625,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 614,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 176,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php",
            "line": 30,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\nova\\src\\Http\\Middleware\\ServeNova.php",
            "line": 26,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Laravel\\Nova\\Http\\Middleware\\ServeNova",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php",
            "line": 53,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\fideloper\\proxy\\src\\TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Fideloper\\Proxy\\TrustProxies",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php",
            "line": 53,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 31,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php",
            "line": 53,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 31,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php",
            "line": 53,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php",
            "line": 53,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode.php",
            "line": 62,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php",
            "line": 53,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 104,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 151,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 116,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\public\\index.php",
            "line": 55,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "E:\\Laravel\\Paymint\\latest\\server.php",
            "line": 21,
            "function": "require_once"
        }
    ]
}

mergeWhen doesn't work with relations tabs

Using $this->mergeWhen($condition, $value) when condition is false is returning a new instance of Illuminate\Http\Resources\MissingValue and that's when Tabs is failing returning this error:

Call to undefined method Illuminate\Http\Resources\MissingValue::withMeta()

I guess, we should check the type of the fields returning on each tab content (or relations)

Multiple relationships in one tab?

I want to show several resources in one tab. I can not understand how this can be done.

image

I wrapped it in a panel, but is created separate tab for each relation.

License concerns

Hello,

I noticed this package has code from dkulyk/nova-tabs. I have some concerns regarding the license. Perhaps it should also be more prominently visible that this package was sort of built on top of @dkulyk's implementation.

What are your thoughts?

Trait TabsOnEdit overwrites `fill/fillForUpdate` and skips calling `*FieldsWithoutReadonly`.

The trait TabsOnEdit overwrite both fill and fillForUpdate methods but instead of calling
creationFieldsWithoutReadonly or updateFieldsWithoutReadonly they call creationFields or updateFields directly.

Nova's default behaviour from the trait FillsField is to exclude the readonly fields from the FieldCollection.

return static::fillFields(
  $request, $model,
  (new static($model))->creationFieldsWithoutReadonly($request)
);

where creationFieldsWithoutReadonly calls creationFields.

The trait TabsOnEdit calls creationFields directly

public static function fill(NovaRequest $request, $model)
{
    return static::fillFields(
        $request, $model,
        (new static($model))->parentCreationFields($request)
    );
}

public function parentCreationFields(NovaRequest $request)
{
    return parent::creationFields($request);
}

What is the reason behind this I'm not seeing?

So the implementation of fill and fillForUpdate in the TabsOnEdit trait only skips calling *FieldsWithoutReadonly. If I remove the fill and fillForUpdate overwrites from the TabsOnEdit trait, everything seems to work just fine.

Cannot install this package in my composer

Hello Im using nova v 2.1.0 but when im tried to install this package using composer it goes like this

Using version ^1.1 for eminiarts/nova-tabs
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for eminiarts/nova-tabs ^1.1 -> satisfiable by eminiarts/nova-tabs[1.1.0].
    - eminiarts/nova-tabs 1.1.0 requires laravel/nova ^2.1.0 -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.

Separate fields outside and inside tabs on update view

Hi, me again :)

Thanks for the amazing work on d678a7f

I just have a little enhanced me here as well. On detail view, i can have fields outside the tabs, those shows me for instance on top of the panel. but on update, it collect it to the tabs and put it in an empty register.

It would be awesome when it would be separated in the update view as well.

Thanks and best wishes,

Simon

Markdown field bug

image

When I used the "Markdown Field", I found that there was no content in the details.

TabsPanel has undefined groups

Found another issue, not sure why this happens, the only difference I can find is that it works in Car.php but not CarSeat.php, so the compound name, otherwise the two files are identical.

annotation 2019-01-15 001543

TabsPanel has undefined group names, which results in:

[Vue warn]: Unknown custom element: <detail-undefined> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

found in

---> <DetailTabs> at resources/js/components/Tabs.vue
       <TabsPanel> at resources/js/components/TabsPanel.vue
         <LoadingView> at resources/js/components/LoadingView.vue
           <Detail> at resources/js/views/Detail.vue
             <Root>

The code for that is:

(new TabsPanel(__('List name'), [
          Tabs::make()
              ->addTab(__('Details'), [
                  Text::make('Title', 'title'),
              ])
              ->addTab(__('v'), HasMany::make('Values', 'values', ListValue::class)),
        ]))->withToolbar(),

Originally posted by @JapSeyz in #7 (comment)

keep tabs on edit view

Hi

Thanks for your work!

Can you make that the tabs keep displaying on edit view? Now it's beautiful tabbed on detail view but on edit, it's all listed.

Would be great!

How to maintain tab

Version Information

  • laravel 5.8
  • Nova 2.0

problem

When I set up multiple tabs, how can I maintain this tab after the success of "relation create"?

image

thanks

Breaking bug with Laravel Nova 2.1.0 (Panel::defaultNameFor)

In TabsOnEdit.php

2 function are used from Panel class, which are removed in latest Nova version

Panel::defaultNameForCreate and Panel::defaultNameForUpdate

New function is added to Panel, which is merging these functions

Panel::defaultNameFor

2 function should be updated

public function updateFields(NovaRequest $request)
    {
        return collect(
            [
                'Tabs' => [
                    'component' => 'tabs',
                    'fields'    => $this->removeNonUpdateFields($this->resolveFields($request)),
                    'panel'     => Panel::defaultNameForUpdate($request->newResource()),
                ],
            ]
        )

and

public function creationFields(NovaRequest $request)
    {
        return collect(
            [
                'Tabs' => [
                    'component' => 'tabs',
                    'fields'    => $this->removeNonCreationFields($this->resolveFields($request)),
                    'panel'     => Panel::defaultNameForCreate($request->newResource()),
                ],
            ]
        );
    }

Multiple relation tabs including filters result in error

Hi,
I've just found your package. Great work!

It seems that there is a problem with filters, when I have two tabs with different relations:

(new TabsPanel('Project Details', [
  Tabs::make()
    ->addTab('Applications', HasMany::make('Applications'))
    ->addTab('Information', [
      // other fields
    ])
    ->addTab('Instruments', HasMany::make('Instruments')),
  ]))->withToolbar(),
];

My Nova resource 'Application' has a filter, 'Instrument' does not have one. After loading the TabsPanel I get this error. Also the filter button is not displayed.
bildschirmfoto 2019-01-26 um 13 16 08
I can get the filter button back when I refresh the page (F5) but my filter is displayed on both relationship tabs then.

Jump to the right tab when a field is required.

Hi,

Whenever you fill all the required fields in a tab, but another tab has a required field that is not filled, there is no indication of why nothing is happening upon clicking the 'Create {model}' button. From an end user perspective this can be rather frustrating.

Sample video demonstrating the behaviour:
No indication of missing required fields upon creating

Jumping to the first tab in which a field is missing seems like the ideal behaviour.

Apologies if i missed something in the documentation!

P.S. Thanks for your effort on creating this plugin, makes the user experience lot better.

Bug with Filters and little results

Hey

This is 2 reports in 1, since they are connected.

screen shot on 2019-01-30 at 22-52-41

  1. As you can see from the screen above, if i have one result the filters get's cut out and i need to scroll that list but while that might work, the last filter is almost unreachable.

  2. Another problem is if have many tabs and i have filters with only one result (same as above) this time i can't scroll it.

Not sure if that's easily fixable, but that's a bug regardless.

Resource Filter disappears after visiting Actions

Not sure why this happens.

I have a Client Resource with a relationship and actions:

image

But when I visit Invoices (everything works fine) and then Actions, the Filter on Invoices disappear, even though I only hide the fields.

image

Looking at Actions -> Invoices -> Actions -> Invoices works.
Visiting Invoices -> Actions -> Invoices fails.

If anyone know why, any help would be much appreciated!

Cannot create resource from relationship tab

I have a basic hasMany relationship attached to one of my models when I select create resource, I get a 404 error on the network tab.

Soon as I remove your tabbed field, it works fine.

Plugin awesome apart from that.

{ "message": "", "exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException", "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Foundation/Application.php", "line": 940, "trace": [ { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php", "line": 46, "function": "abort", "class": "Illuminate\\Foundation\\Application", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/nova/src/Http/Controllers/FieldController.php", "line": 22, "function": "abort" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Support/helpers.php", "line": 1138, "function": "Laravel\\Nova\\Http\\Controllers\\{closure}", "class": "Laravel\\Nova\\Http\\Controllers\\FieldController", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Support/Arr.php", "line": 180, "function": "value" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Support/Collection.php", "line": 732, "function": "first", "class": "Illuminate\\Support\\Arr", "type": "::" }, { "file": "/var/www/nova/public/vendor/laravel/nova/src/Fields/FieldCollection.php", "line": 21, "function": "first", "class": "Illuminate\\Support\\Collection", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/nova/src/Http/Controllers/FieldController.php", "line": 23, "function": "findFieldByAttribute", "class": "Laravel\\Nova\\Fields\\FieldCollection", "type": "->" }, { "function": "show", "class": "Laravel\\Nova\\Http\\Controllers\\FieldController", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Controller.php", "line": 54, "function": "call_user_func_array" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php", "line": 45, "function": "callAction", "class": "Illuminate\\Routing\\Controller", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Route.php", "line": 212, "function": "dispatch", "class": "Illuminate\\Routing\\ControllerDispatcher", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Route.php", "line": 169, "function": "runController", "class": "Illuminate\\Routing\\Route", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Router.php", "line": 682, "function": "run", "class": "Illuminate\\Routing\\Route", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php", "line": 30, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/nova/src/Http/Middleware/Authorize.php", "line": 18, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", "line": 151, "function": "handle", "class": "Laravel\\Nova\\Http\\Middleware\\Authorize", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php", "line": 53, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/nova/src/Http/Middleware/BootTools.php", "line": 20, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", "line": 151, "function": "handle", "class": "Laravel\\Nova\\Http\\Middleware\\BootTools", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php", "line": 53, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/nova/src/Http/Middleware/DispatchServingNovaEvent.php", "line": 20, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", "line": 151, "function": "handle", "class": "Laravel\\Nova\\Http\\Middleware\\DispatchServingNovaEvent", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php", "line": 53, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php", "line": 43, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/nova/src/Http/Middleware/Authenticate.php", "line": 31, "function": "handle", "class": "Illuminate\\Auth\\Middleware\\Authenticate", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", "line": 151, "function": "handle", "class": "Laravel\\Nova\\Http\\Middleware\\Authenticate", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php", "line": 53, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php", "line": 41, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", "line": 151, "function": "handle", "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php", "line": 53, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php", "line": 75, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", "line": 151, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php", "line": 53, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php", "line": 49, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", "line": 151, "function": "handle", "class": "Illuminate\\View\\Middleware\\ShareErrorsFromSession", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php", "line": 53, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php", "line": 63, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", "line": 151, "function": "handle", "class": "Illuminate\\Session\\Middleware\\StartSession", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php", "line": 53, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php", "line": 37, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", "line": 151, "function": "handle", "class": "Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php", "line": 53, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php", "line": 66, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", "line": 151, "function": "handle", "class": "Illuminate\\Cookie\\Middleware\\EncryptCookies", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php", "line": 53, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", "line": 104, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Router.php", "line": 684, "function": "then", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Router.php", "line": 659, "function": "runRouteWithinStack", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Router.php", "line": 625, "function": "runRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Router.php", "line": 614, "function": "dispatchToRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php", "line": 176, "function": "dispatch", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php", "line": 30, "function": "Illuminate\\Foundation\\Http\\{closure}", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/nova/src/Http/Middleware/ServeNova.php", "line": 26, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", "line": 151, "function": "handle", "class": "Laravel\\Nova\\Http\\Middleware\\ServeNova", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php", "line": 53, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php", "line": 58, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", "line": 151, "function": "handle", "class": "Barryvdh\\Debugbar\\Middleware\\InjectDebugbar", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php", "line": 53, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/fideloper/proxy/src/TrustProxies.php", "line": 57, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", "line": 151, "function": "handle", "class": "Fideloper\\Proxy\\TrustProxies", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php", "line": 53, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php", "line": 31, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", "line": 151, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php", "line": 53, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php", "line": 31, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", "line": 151, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php", "line": 53, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php", "line": 27, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", "line": 151, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php", "line": 53, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php", "line": 62, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", "line": 151, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php", "line": 53, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", "line": 104, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php", "line": 151, "function": "then", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "/var/www/nova/public/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php", "line": 116, "function": "sendRequestThroughRouter", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "/var/www/nova/public/public/index.php", "line": 55, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" } ] }

How to show more than 5 Resources on one Index Page?

Hi, Is it possible to allow one Tab with Relations showing more than 5 Resources per Page?

Im working on a project where i almost always have between 5-10 Resources and i'd like to have them on the same page.

Remember current tab

Hello,

Is it possible to remember the current tab when editing a resource. When clicking "Update & Continue Editing" it always goes back to the first tab which would be frustrating for users.

Please add overflow-x-auto and search field overlapping.

Great work!!
Could you please add overflow-x-auto.
For wide tabs on tablets and smaller devices it is impossible to reach tabs that grows out of the view.
Also the search field overlaps the tab titles,
(don't have a suggestion for how to solve that at the moment :)

<div class="relationship-tabs-panel card overflow-hidden overflow-x-auto">

small screen adjustments

Access to view does not check.

If I have tab with relation which denied by policy page will shown 403.

Need to filter denied fields in tab and hide empty tabs.

Edit tab and form validation

When you use the edittab option and the form validation fails it would be nice that you can see that there is an error on a field inside a tab.

all fields disappeared

After upgrading nova to 2.0.9, all form fields have disappeared.
When I tried to unuse 'TabsOnEdit' trait, all fields appeared.

laravel: 7.8.30
nova: 2.0.9
nova-tabs: 1.0.5

BUG Tabs only render on edit

Using Nova 2.0.9 or 2.0.8 & the latest version of nova-tabs (with the tabsOnEdit fix).

When I try to created a resource I get a blank page (only the action buttons), with no error in my console.

When I try to view a resource I get TypeError: Cannot set property 'fields' of undefined error

The edit view is working perfectly though

Last working setup:
nova 2.0.7 + nova-tabs 1.0.4

Mix fields with relations

Hey,

I can't figure out out to create a tab-panel with tabs for both regular fields and relations, eg:

| Details | Meta | Cars (Relation) | Driver ( Relation |

I can create one panel via new TabsPanel with regular fields, and relationships via Tabs::make, but if I try to add one to the either, it fails.

Is there a smart way to add the relationship tabs to the TabsPanel?

Cheers,

Mixing fields with relations not working

Nova Tabs: 1.0.4
Nova: 1.3.1
Laravel: 5.7.7

Mixing fields and relations in a single tab (as mentioned in #7 ) appears to no longer work since 1.0.

Using the documented syntax breaks the relation into their own tab regardless of what else is in the defined tab, and using the addTab syntax detailed in #7 results in a Only listable fields or Panel allowed. error.

Resources title is not display above the form detail

Hi,
I have this code but the resources title is not display at the top of the page, do you know why?

This is my code. I appreciate any help.

  public function fields(Request $request)
  {
    $options = [];

    $options = [
        'Pending' => 'Pending',
        'Assigned' => 'Assigned',
        'Expired' => 'Expired',
        'Cancelled' => 'Cancelled',
    ];

    return [

        (new Tabs(__('Load Order Details'), [

            new Panel(__('General'),[

                ID::make()->sortable(),

                Text::make(__('Load Order')),

                Text::make(__('From')),

                Text::make(__('To')),

                DateTime::make(__('PickUp Date')),

                Text::make(__('Expires In'))->resolveUsing(function($date) {
                    $expireDate = Carbon::parse(date($date));
                    $format = Carbon::ONE_DAY_WORDS;
                    return $expireDate->diffForHumans(now(), ['options' => $format]);
                })
                    ->hideWhenCreating()
                    ->hideWhenUpdating()
                    ->sortable(),

                DateTime::make(__('Expires Date'), 'expires_in')
                    ->hideFromIndex()
                    ->format('ddd, MMM Do YYYY - h:mm a')
                    ->rules('required')
                    ->sortable(),
                
                
                Select::make(__('Status'))
                    ->options($options),

                Boolean::make(__('Active')),

            ]),
        
            new Panel(__('Weight and Pieces'),[
        
                Number::make(__('Weight'))
                    ->hideFromIndex()
                    ->required(),
                
                Text::make(__('Unit Of Measure'))
                    ->hideFromIndex()
                    ->required(),
                
                Number::make(__('Pieces'))
                    ->hideFromIndex()
                    ->required(),
            ]),

            new Panel(__('Package Information'),[

                Select::make(__('Package Type'))
                    ->hideFromIndex()
                    ->required()
                    ->options([
                        'No Package' => 'No Package',
                        'Box' => 'Box',
                        'Container' => 'Container'
                    ]),
                
                Number::make(__('Package Width'))
                    ->hideFromIndex()
                    ->required(),
                
                Number::make(__('Package Length'))
                    ->hideFromIndex()
                    ->required(),

                Number::make(__('Package Height'))
                    ->hideFromIndex()
                    ->required(),
            ]),

            new Panel(__('Comments'),[

                Textarea::make(__('Description of Items to Pickup'), 'desc_items_pickup')
                    ->alwaysShow()
                    ->rows(8)
                    ->hideFromIndex()
                    ->required(),
                
                Textarea::make(__('Observations'))
                    ->alwaysShow()
                    ->rows(8)
                    ->hideFromIndex()
                    ->required(),

                // $table->integer('dispatcher_id');
                // $table->integer('user_id');
            ]),

        ])),
    ];
}

BelongsToMany causes "Trying to get property 'resourceClass' of non-object"

public function fields(Request $request)
{
    return [
        //...

        Tabs::make('Relations')
            ->addTab(
                __('Ssl Certificates'),
                BelongsToMany::make('Ssl Certificates', 'ssl_certificates', SslCertificate::class)
                    ->searchable()
            )
            //...
    ];
}

Causes "Trying to get property 'resourceClass' of non-object" exception when trying to attach a Ssl Certificate, but when I move the BelongsToMany outside of the Tab everything works:

public function fields(Request $request)
{
    return [
        //...

         Tabs::make('Relations')
            //...

         BelongsToMany::make('Ssl Certificates', 'ssl_certificates', SslCertificate::class)
            ->searchable()
    ];
}

Two fields with the same name results in "<detail-undefined>"

Hey.

I have these two fields:

Country::make('Country')->onlyOnForms(),
....
...
...
Text::make('Country')->exceptOnForms(),

Because the Form location and the detail location for the country is different - However it seems to clash and just default to Undefined in the JS.

Code fields not auto display in Tabs

  • Nova Version: 1.3.1
  • Laravel Version: 5.6.39

** Step to reproduce **

    /**
     * Get the fields displayed by the resource.
     *
     * @param \Illuminate\Http\Request $request
     *
     * @return array
     */
    public function fields(Request $request)
    {
        return [

            new Tabs('Tabs', [
                'One' => [
                    Text::make('youzan_client_secret')->hideFromIndex()->rules('required'),
                ],

                'Two' => [
                    Code::make('Json', 'meta')->json(JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)->rules('required'),
                ],
            ]),
        ];
    }

When I change to tab Two, the Json code field is empty, but when i click to focus, the content is back.

Screenshots
image
wx20190304-121728 2x

Tabs in pivot fields form

I can't get the tabs visible in my has many pivot form. Is this not possible or am I failing?

public function fields(Request $request)
  {
      return [
          (new Tabs('Tabs', [
              'General' => [
                  ID::make()
                      ->sortable(),
                  Text::make('Title'),
                  BelongsTo::make('Category')
                      ->searchable(),
                  BelongsToMany::make('Platforms')
                      ->fields(function () {
                          return [
                              (new Tabs('PivotTabs', [
                                  'General' => [
                                      Currency::make('Price'),
                                  ],
                                  'Content' => [
                                      Trix::make('Description')
                                          ->alwaysShow()
                                          ->nullable()
                                          ->hideFromIndex()
                                          ->withFiles('public'),
                                  ]
                              ])),
                          ];
                      }),
                  AttachMany::make('Platforms'),
              ],
          ]))->withToolbar(),
      ];
  }

Default search needs more bottom padding

It's fine on smaller screens but full iwdth on 23" monitor looks cut off when focused on search input. Also - the background could be light grey to make the search stand out a little.

If it's possible to change in the package could you point me to where and I will fork it

Screen Shot 2019-03-29 at 17 13 46

BelongsTo field is not populated from relation with TabsOnEdit trait

I have a BelongsTo field on a model and trying to create it from related parent.

    public function fields(Request $request)
    {
        return [
            new Tabs('Tabs', [
                'Basic'    => [
                    BelongsTo::make('Company'),
            ]),
        ];
    }

It is populated by relation model and disabled.

image

But if I add

        use TabsOnEdit;

To a model, it becomes not populated by relation.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.