dkulyk / nova-tabs Goto Github PK
View Code? Open in Web Editor NEWAnother Laravel Nova Tabs Package
Another Laravel Nova Tabs Package
The Create button of any resource I use with the tabs, stick on top of the bar.
I inspect the button and confirm that this class "mb-6" it's the issue.
I don't know if this class it's used on purpose, or If I can change this to remove it.
Here it's a view of the problem:
And this is how I'm using the nova-tabs:
...
(new Tabs(__('Structure Relations'), [
HasOne::make('Segmentation', 'segmentation', 'App\Nova\CondominiumSegmentation'),
HasMany::make('Building Types')
->hideFromDetail(function(){
if($this->segmentation()->count())
return false;
else
return true;
}),
HasMany::make(__('Building ↔︎ Segment Relation'), 'building_segments_relation', 'App\Nova\BuildingSegmentation')
->hideFromDetail(function(){
if($this->segmentation()->count() && $this->building_types()->count())
return false;
else
return true;
}),
])),
...
It's not possible to add set a group of relationship tabs in a stand-alone panel.
We get a 404 error when trying to delete a file from a file field.
It only happens when we are using the tabs also on the edit screen with use TabsOnEdit;
, else everything works fine.
It seems that there is an error in the nova/src/Http/Controllers/FieldDestroyController.php
.
To reproduce:
use TabsOnEdit;
to the nova modelNow try to upload and delete the file again from the field in nova. There should be a 404 error in the network tab of the browser debug window.
Does anybody else have the same problem?
Hello.
I don't know what i'm doing wrong, but here my tabs not render. See:
public function fields(Request $request)
{
return [
ID::make()->sortable(),
RadioButton::make('Tipo', 'tipo')
->options(\App\Models\Cliente::getTipos())
->default('Pessoa Jurídica') // optional
->stack()
->toggle([ // optional
'Pessoa Física' => [ 'cnpj', ],
'Pessoa Jurídica' => [ 'cpf', 'rg', 'rg_complemento' ],
]),
Text::make('Inscrição Estadual', 'ie'),
new Tabs('Tabs', [
'Balance' => [
Text::make('Name')
->sortable()
->rules('required', 'max:255'),
Text::make('Email')
->sortable()
->rules('required', 'email', 'max:255')
->creationRules('unique:users,email')
->updateRules('unique:users,email,{{resourceId}}')
],
'Address Info' => [
Text::make('Address')
->sortable()
->rules('required', 'max:255'),
],
'Other Info' => [
Text::make('Other')
->sortable()
->rules('required', 'max:255'),
],
]),
];
}
Of course, i'm using use DKulyk\Nova\Tabs;
In composer.json
the package is listed as "dkulyk/nova-tabs": "^1.1",
What i'm doing wrong ?
PHP: 7.3
Laravel: 6.3
Nova: 2.5
Hi,
I'm trying to add two Tabs with 2 different ressources that share the same model, in that case the layout is broken... Any idea ? may be i'm doing it wrong ? I would like to filter my model by type and add the filtered results in different tabs.
(new Tabs('Relations', [
HasMany::make('Drink Products', 'drink_products', \App\Nova\Product1::class),
HasMany::make('Food Products', 'food_products', \App\Nova\Product2::class),
]))->defaultSearch(true),
here is the result :
@dkulyk thanks for the great robust package, are you planning to add support for edit view? if so it will be also great if validation in edit view swich to the tab containing invalid fields ;)
Hello
Cool what you did with my package. I am considering simplifying some stuff too.
When I do:
(new Tabs('Tabs', [
// ...
]))->showToolbar(),
It doesn't work. There is no showToolbar-function in Tabs.php yet.
Regards
This package looks a lot like https://github.com/eminiarts/nova-tabs - are there any know differences? Is this just a fork? Or just another tabs package which looks exactly the same (even some images used in the docs look to be the same)
Hello,
It's possible to keep selected tab when the page is refresh ?
Example : I use "nova-field-sortable" and i lost the tab after each sort.
Thanks for your work :D
I saw that the only way to display the Panel title on the created Tabs is to add ->withToolbar()
parameter.
If i remove ->withToolbar()
, the title is gone :
For a panel, adding ->withToolbar()
only adds the Ressource Buttons.
If i remove ->withToolbar()
from a Panel, the title remains, that's the behavior I'm looking for.
Any idea about that ?
Thanks again for your help
Hi,
Does this package is compatible with Nova 4?
Regards
Hi, when adding a related resource in a tab, the lens for that resource doesn't display at all. Is this a bug?
Thanks
Hello @dkulyk . I'm trying to create a panel within a tab, I've read your documentation, but I can't find a way to do this. Do you know of a way?
Cheers
Am trying to use this in combination with a resource where I extracted a part of the fields to its own method and used merge
, as shown here.
The error that I am getting is:
Call to undefined method Illuminate\Http\Resources\MergeValue::withMeta()
on https://github.com/dkulyk/nova-tabs/blob/master/src/Tabs.php#L56
Love your package. It's clean, and fast. Thank you!
Do you think you could make the tabs work on edit screens as well ?
Imagine looking at a detail page that has some information above the tabs section (think metrics, general details panel etc), when switching the current tab closes and gets replaced by a new one.
Because the current tab gets closed before the new one is loaded, the window size gets smaller and the view basically jumps up to show the buttons of the tabs at the bottom of the screen. This causes the user having to scroll back down after switching between each tab.
Hi,
Is there a way to add Ressources Actions in Tabs ?
I'm getting this error when trying to implement relationship tabs. I followed the documentation instructions.
Hi,
First, thanks for this usefull package!
This is not working :
new Tabs('Tabs', [
HasMany::make('Address List', 'TierAddress'),
]),
I tried this too, without luck :
new Tabs('Tabs', [
new Panel('Adress List 1', [
HasMany::make('TierAddress'),
]),
'Adress List 2' => [
HasMany::make('TierAddress'),
],
]),
I'm looking to rename the create TierAddress Button & TierAddress Tabs Label.
Any way to use the singularLabel and/or label of the ressource ?
I might guess it's impossible to have a standard Panels within Tabs, right?
Any ideas how can I achieve something similar? I need to somehow separate a long list of fields. Tabs will be too much, just visual separation needed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.