Jump to content

ProcessWire Dashboard


Recommended Posts

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.

  • Like 1
Link to comment
Share on other sites

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?

  • Like 1
Link to comment
Share on other sites

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.

  • Like 2
Link to comment
Share on other sites

  • 4 months later...

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

 

KNnGi.png

Link to comment
Share on other sites

  • 1 month later...

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!

  • Like 1
Link to comment
Share on other sites

  • 6 months later...

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

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

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

  • 2 months later...

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

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.

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

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

@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.

Sans titre.png

Link to comment
Share on other sites

  • 1 month later...

Hello,
is there a possibility to set a default order in a collection, for example?

Default now is this:

2066502584_Screenshot2023-12-03at14-44-56Dashboardfgfc820_de.png.af6775bbac0f2c5feb67ac713f2ea5f4.png

I would like to have this as default (newest News on the Top)
978502014_Screenshot2023-12-03at14-45-14Dashboardfgfc820_de.png.d3475221c904366ac3adfd2500be104b.png

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

  • 1 month later...

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

@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.

  • Like 1
Link to comment
Share on other sites

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

  • 2 weeks later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...