adrian Posted March 17, 2022 Share Posted March 17, 2022 3 hours ago, d'Hinnisdaël said: If you create a panel group and add the tabs to that, it should work. Perfect - thank you. Just in case anyone is interested, the panel above the tabs is a dropdown select for filtering the results of the data shown in all the other tabs / panels, so this works really nicely now. 1 Link to comment Share on other sites More sharing options...
d'Hinnisdaël Posted March 17, 2022 Author Share Posted March 17, 2022 1 hour ago, adrian said: Just in case anyone is interested, the panel above the tabs is a dropdown select for filtering the results of the data shown in all the other tabs / panels, so this works really nicely now. I'd love to hear how you accomplished the filtering part — I'm assuming you've built a panel emitting custom events that trigger panel reloads. Or is it plain old get params? 1 Link to comment Share on other sites More sharing options...
adrian Posted March 17, 2022 Share Posted March 17, 2022 13 minutes ago, d'Hinnisdaël said: I'd love to hear how you accomplished the filtering part — I'm assuming you've built a panel emitting custom events that trigger panel reloads. Or is it plain old get params? Just a get param and an onchange triggered reload - it's only to filter to a specific organization so no need for anything fancier for now. 2 Link to comment Share on other sites More sharing options...
sandimilohanic Posted July 29, 2022 Share Posted July 29, 2022 Hi All, Does anyone know how to implement (configure dashboard chart panel) the chart.js bar like the picture below ? Thanks a lot! I need to show in chart this data, example for one month. Car1 TotalDrove: 5 SuccesDrove: 3 UnsuccessDrove: 2 Car2 TotalDrove: 10 SuccesDrove: 8 UnsuccessDrove: 2 Link to comment Share on other sites More sharing options...
zoeck Posted September 20, 2022 Share Posted September 20, 2022 I have a problem with the latest version. When I use the shortcuts with external links, I always get the following error: Quote PHP Notice: Trying to get property 'url' of non-object in ...\site\modules\Dashboard\DashboardPanelShortcuts.module:226 I think the check doesn't fit that way (line 226): if (!$page || !$page->url) { Because if "$page" does not exist, then "$page->url" will cause an error. Also added an issue on github ?https://github.com/daun/processwire-dashboard/issues/41 /edit: the new version 1.5.2 fixed this bug ? thanks! 1 Link to comment Share on other sites More sharing options...
cpx3 Posted April 6, 2023 Share Posted April 6, 2023 First, thanks for the lovely module! Is there any possibility to select the pages for the PageList with a selector instead of their parent? I would need for example to show only newsletters that have not been sent now ("checkbox_sent=0"). Link to comment Share on other sites More sharing options...
wbmnfktr Posted April 6, 2023 Share Posted April 6, 2023 You can use a selector and hide the parent... https://daun.github.io/processwire-dashboard/#/panels/page-list?id=options Link to comment Share on other sites More sharing options...
d'Hinnisdaël Posted April 6, 2023 Author Share Posted April 6, 2023 3 hours ago, cpx3 said: First, thanks for the lovely module! Is there any possibility to select the pages for the PageList with a selector instead of their parent? I would need for example to show only newsletters that have not been sent now ("checkbox_sent=0"). The PageList panel uses ProcessWire's internal ProcessPageList component. As far as I know, it works by displaying the actual children of a parent page and doesn't support rendering arbitrary pages that aren't siblings. Link to comment Share on other sites More sharing options...
cpx3 Posted April 6, 2023 Share Posted April 6, 2023 Thanks for the quick answer! Actually I want to display silbling pages but not all of them… Link to comment Share on other sites More sharing options...
wbmnfktr Posted April 6, 2023 Share Posted April 6, 2023 Ok, I misread the part in the docs. Page List isn't working as I read that. I use collections for this/a similar use case. // https://daun.github.io/processwire-dashboard/#/panels/collection $panel->add([ 'panel' => 'collection', 'title' => 'Newsletters', 'data' => [ 'collection' => 'template=newsletter, checkbox_sent=0', 'sortable' => true, 'columns' => [ 'title' => 'Subject', // 'url' => 'URL', // 'modified' => 'Modified', ], ], ]); Link to comment Share on other sites More sharing options...
eydun Posted June 29, 2023 Share Posted June 29, 2023 Hey @d'Hinnisdaël, I'm using RockGrid, a commercial module from @bernhard, which makes it possible to provide all kinds of great data listings in the PW backend that are highly customizable via simple JavaScript and great for the client to work with (sorting, filtering, colorization and aggregation of data etc.). RockGrids can be displayed as separate pages in the PW backend or in the PW page editor, because RockGrid ships with a Fieldtype/Inputfield that can be placed anywhere. I'd love to have such a grid (or more of them) in my dashboard that is built with your module. Is that possible somehow? Link to comment Share on other sites More sharing options...
d'Hinnisdaël Posted June 29, 2023 Author Share Posted June 29, 2023 5 hours ago, eydun said: Hey @d'Hinnisdaël, I'm using RockGrid, a commercial module from @bernhard, which makes it possible to provide all kinds of great data listings in the PW backend that are highly customizable via simple JavaScript and great for the client to work with (sorting, filtering, colorization and aggregation of data etc.). RockGrids can be displayed as separate pages in the PW backend or in the PW page editor, because RockGrid ships with a Fieldtype/Inputfield that can be placed anywhere. I'd love to have such a grid (or more of them) in my dashboard that is built with your module. Is that possible somehow? I‘m not familiar with RockGrid but if I understand you correctly it can export pages? In that case, using a Collection panel should get you there. However I suspect what you‘re looking for is showing the RockGrid UI inside a panel — in that case you could look into rendering a template file inside a panel and implementing the custom logic there. 1 Link to comment Share on other sites More sharing options...
eydun Posted June 30, 2023 Share Posted June 30, 2023 Hi Daun, Thank you - the template file method is working. 2 Link to comment Share on other sites More sharing options...
TomPich Posted October 26, 2023 Share Posted October 26, 2023 Hey there. This is a wonderful work. I’m new to ProcessWire, and I just tried this module for a couple of hours. Everything works fine except for a very small problem with dateFormat. I have the following code : $panels->add([ 'panel' => 'collection', 'title' => 'Articles', 'data' => [ 'collection' => 'template=blog-post, limit=10', "dateFormat" => "Y-m-d", "columns" => [ "title" => "Titre", "tags" => "Tags", "postdate" => "Date de publication" ], "actions" => ["view", "edit", "trash"], 'sortable' => true, ], ]); Everything is fine, but I get the postdate like "12 October 2023 9:12 am", whatever I use in the dateFormat value (I’d expect "2023-10-12" in the example above). Can someone please tell me what I am doing wrong? Link to comment Share on other sites More sharing options...
d'Hinnisdaël Posted October 26, 2023 Author Share Posted October 26, 2023 @TomPich I can‘t look into this as I‘m travelling at the moment. If you create an issue with reproducible examples on the GitHub repo, I‘m happy to take a closer look in the next weeks. Link to comment Share on other sites More sharing options...
TomPich Posted October 26, 2023 Share Posted October 26, 2023 Thanks d’Hinnisdaël. I will do that. Link to comment Share on other sites More sharing options...
TomPich Posted October 26, 2023 Share Posted October 26, 2023 @d'Hinnisdaël I investigated a bit more in the problem and here is what I found. For the field postdate (a datetime filed), what’s in the blue borders (see attached picture) is the date format in the front part of the website. I can format the date in the dashboard with the entry in the green borders – I don’t understand the difference between these two fields. But it seems that whatever format I enter in the panel configuration ($panel->add(...)) has no effect. Sorry, the screenshot is in french, as I wanted to learn how to install PW core translation. It’s not urgent. I will try again on a clean new install just to see if I can get this behaviour again and I’ll let you know. Enjoy your trip. Link to comment Share on other sites More sharing options...
ShadowByte Posted December 3, 2023 Share Posted December 3, 2023 Hello, is there a possibility to set a default order in a collection, for example? Default now is this: I would like to have this as default (newest News on the Top) This is my config now: $panels->add(['panel' => 'collection', 'size' => 'small', 'title' => 'News items', 'icon' => 'newspaper-o', 'data' => [ 'collection' => 'template=news, limit=10', 'sortable' => true, 'actions' => ['view', 'edit', 'trash'], 'columns' => [ 'date' => 'Published', 'title', 'phits' => 'Views', ] ], ]); Thanks in advance Link to comment Share on other sites More sharing options...
d'Hinnisdaël Posted December 3, 2023 Author Share Posted December 3, 2023 @ShadowByte You can add a sort order to your selector: template=news, limit=10, sort=-date 1 Link to comment Share on other sites More sharing options...
ShadowByte Posted December 4, 2023 Share Posted December 4, 2023 Thank you, It can be so simple when you know it ? Link to comment Share on other sites More sharing options...
TomPich Posted January 28 Share Posted January 28 Hey there! A quick, and, I’m sure, simple question about the Dashboard. I have a panel / collection. I want to display a date which is stored as timestamp (so I can display it properly in french in the front, with IntlDateFormatter). I can’t figure out how to format this timestamp date in the dashboard : $panels->add([ 'panel' => 'collection', 'title' => 'Meetings', "size" => "full", 'data' => [ 'collection' => 'template=meeting, limit=10', "dateFormat" => "d-m-Y", "columns" => [ "title" => "Meeting", "date" => "Date", ], 'sortable' => true, ], ]); }); The "dateFormat" option doesn’t do anything, I just get the timestamp. Any clue? Thank you ? ––– Found it ––– In the DashboardPanelCollection.module file, line 170, I found that : // Special case: timestamp fields // disabled for now (formatted datetime values work just as well) elseif (false && $fieldtype == 'FieldtypeDatetime') { $content = $this->datetime->date($this->dateFormat, $page->getUnformatted($markup)); } I got rid of the "false &&" and it works perfectly. So just my two cents : formatted values don’t work just as well : in my case, due to french language, I have to format the DateTime value from timestamp for the front site. And I don’t really care in the admin, but timestamp is a no go. ? Link to comment Share on other sites More sharing options...
d'Hinnisdaël Posted January 28 Author Share Posted January 28 @TomPich If the "date" field is an actual date field type (as opposed to an integer field storing the raw timestamp), this should work out of the box. The module knows about date fields and how to format them with using a custom format. If you're storing the timestamp as an integer, I'd suggest switching to an actual date field and getting the raw timestamp from that date field in the frontend instead: $page->getUnformatted('date') will usually get you the non-formatted timestamp as integer. 1 Link to comment Share on other sites More sharing options...
TomPich Posted January 28 Share Posted January 28 1 minute ago, d'Hinnisdaël said: @TomPich If the "date" field is an actual date field type (as opposed to an integer field storing the raw timestamp), this should work out of the box. The module knows about date fields and how to format them with using a custom format. If you're storing the timestamp as an integer, I'd suggest switching to an actual date field and getting the raw timestamp from that date field in the frontend instead: $page->getUnformatted('date') will usually get you the non-formatted timestamp as integer. Thanks @d'Hinnisdaël. I was editing my post because I found the solution. The value is stored as an actual date field type. As I need to get the date in french, using IntlDateFormatter, I have to store them as timestamp (I don’t want to install the whole traduction pack just for twelve months... ?). See the --- edit--- part of my last post. Link to comment Share on other sites More sharing options...
d'Hinnisdaël Posted January 28 Author Share Posted January 28 @TomPich I see. Glad you got it solved. This might easily break your setup when updating the module, though. If you feel strongly about re-enabling the custom date formats, feel free to open an issue on the GitHub repo! 1 Link to comment Share on other sites More sharing options...
TomPich Posted February 10 Share Posted February 10 Hey there, Still playing around with this awesome module. One question : is there a way to collect user input to customize the display of a collection? Here is an example. I have a template called “meeting” with 200 instances. I’d like to create a collection panel on the Dashboard, where the user can filter the result according to some simple entries fields : place (a simple text input) and themes (a multiple pages input). The way I see things : if the user does not filter, we have a paginated list of all the meeting pages (so up to this point, I did it). Somewhere in the panel wrapper, I have a text input where the user can specify a place. And another input (like select) where the user can choose a theme. Once done, the collection is filtered accordingly. Does dashboard have a way to do that (I didn’t find) ? Or do I need to create a custom admin page? Thank you guys! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now