Topic: Dashboard Theme and Module

Announcement

A new theme has been added to the installable themes and modules to provide a dashboard interface to each application tab in place of the standard menu list. Note that both the module and theme need to be installed.

The menu options have been compressed into an accordian list now displayed at all times at the left of the screen, enabling navigation between data entry and inquiry screens with the minimum of key clicks.

For new users, the dashboard area of each application tab is blank. Please select Setup, Dashboard setup, to add widgets to each application tab. Each widget can be configured to select sequence, number of items, reporting period and output type, depending on the type of data being displayed.

Within each application tab, widgets can be minimised and dragged and dropped to new positions, and the changed layout is saved to be restored the next time the user visits that tab.

The following widgets are supplied with the module:

Bank Balances

This displays a list of all the bank accounts with their balance as at today.

Bank Transactions

This widget displays  a table similar to the Bank Account Inquiry screen. In the configuration you can select which bank account, and how many days in the past and future are to be displayed.

Customers

Lists the top x customers by sales in the current fiscal year, either as a table or column chart.

Daily Bank Balances

Displays a table of a selected bank accounts balances for a specified period. It can be displayed as a table, line or bar chart.

Daily Sales

This lists the gross sales for each day of the week, as a table, line or bar chart.

Dimensions

This lists GL totals by dimension as a table or pie chart.

GL Return

This shows the total assets, liabilities, equity, income and expenses with the total return, as either a table or pie chart.

Items

Lists the top x product items either sold or manufactured, as a table or pie chart.

Purchase Invoices

Lists the top x outstanding purchase invoices as a table or column chart

Reminders

This shows a list of tasks that you can maintain by user role, with a date required and frequency. Go to Setup, Reminder Setup to define the reminder tasks for all roles. For each user, the reminder widget displays the outstanding tasks, with overdue tasks shown in red, today's tasks in blue and future tasks in black. When the user clicks on the task actioned check box, the next date for the task will be set according to it's defined frequency, and it is removed from the user's reminder list.

Sales Invoices

Lists the top x outstanding sales invoices as a table or column chart

Suppliers

Lists the top x suppliers by purchases in the current fiscal year, either as a table or column chart.

Weekly Sales

This lists the gross sales for each week, as a table, line or bar chart.

Feedback

Please address any problems to the email address in the module readme.txt file, in addition to any post to the FrontAccounting forum, as the author is not a regular at the forum.

Acknowledgements

This module/theme was developed from the suggestions of TCLim, and incorporates a lot of code from Joe Hunt's exclusive theme, with all the Javascript elements incorporating the code of many others.

2 (edited by chrison 02/17/2013 10:00:15 pm)

Re: Dashboard Theme and Module

I tried installing both the dashboard theme and module.  When i activated the module, I got this error message:

file(../modules/Dashboard/sql/update.sql): failed to open stream: No such file or directory in file: /var/www/accounting/admin/db/maintenance_db.inc at line 293Invalid argument supplied for foreach() in file: /var/www/accounting/admin/db/maintenance_db.inc at line 298

So, I logged out and logged back in again.  I then activated the dasbhoard theme from the Preferences screen.  When I did that, I got these error messages:

Debug mode database warning:
error code : 1146
error message : Table 'accounting.0_dashboard_widgets' doesn't exist
sql that failed was : SELECT DISTINCT column_id FROM 0_dashboard_widgets WHERE user_id ='1' AND app='system' ORDER BY column_id


mysql_fetch_array() expects parameter 1 to be resource, boolean given in file: /var/www/accounting/includes/db/connect_db.inc at line 89

Also, when I go to the Setup page, I don't see any "Dashboard Setup" option.

Any ideas on what I did wrong and how to fix it?  (Note:  e-mail also sent to author as requested above.)

Thanks!

Regards,

Chris

Re: Dashboard Theme and Module

Hi Chris
I think this a FA problem prior to the current 2.3.15 release. It fails to run the update.sql during the module activation to create the database tables it needs. If you have the facilities to do so, either run the update.sql in /modules/dashboard/sql directly in a mySQL admin utility, such as phpmyAdmin or upgrade to 2.3.15 and then activate the module.

Re: Dashboard Theme and Module

Yes, I'm running FA 2.3.14 so thanks for that suggestion so I'll upgrade and see if that helps.  Btw, it would've been nice if "requires FA 3.1.15" had been included in the original post.  Just saying!

Regards,

Chris

Re: Dashboard Theme and Module

Okay, in fairness to AlastairR, it does say "version 2.3.15-1" in the version field for the extension and I probably should have noticed that.  However, it's still "a good thing" to explicitly state that kind of requirements/dependency thing in the announcement as some folks (like me!) don't always read the fine print.

Regards,

Chris

6 (edited by chrison 02/17/2013 11:49:31 pm)

Re: Dashboard Theme and Module

Okay, I uninstalled both the theme and the extension and then upgraded to FA 2.3.15.  I then went back and installed the extension and theme.  When I tried to activate the extension, I got this error message:

file(../modules/Dashboard/sql/update.sql): failed to open stream: No such file or directory in file: /var/www/accounting/admin/db/maintenance_db.inc at line 293Invalid argument supplied for foreach() in file: /var/www/accounting/admin/db/maintenance_db.inc at line 298

When I go to the Setup page, I get these error messages:

Debug mode database warning:
error code : 1146
error message : Table 'accounting.0_dashboard_widgets' doesn't exist
sql that failed was : SELECT DISTINCT column_id FROM 0_dashboard_widgets WHERE user_id ='1' AND app='system' ORDER BY column_id


mysql_fetch_array() expects parameter 1 to be resource, boolean given in file: /var/www/accounting/includes/db/connect_db.inc at line 89

So, obviously, there's still a problem.  No, I haven't used phpMyadmin to manually update the database, but will do that next.  I'm just posting this here to notify the author that this extension does not install automatically even if you're using FA 2.3.15 so something appears to need to be fixed.

No time do do the manual database update right now, so I'll do it later and report back about whether or not that works.

Regards,

Chris

7 (edited by chrison 02/18/2013 05:30:01 am)

Re: Dashboard Theme and Module

Okay, I have manually updated the database tables and reinstalled both the extension and theme.  All went well, although it took me awhile to remember I had to go into "Setup -> Access Setup" and set the proper rights for the dashboard and reminders before I could access them in the Setup module.  (DOH!)

Anyway, all is well now.  I'm not terribly excited about the color scheme (blues/greys don't thrill me), but the various widgets are handy, the layout is nice, and I particularly like the accordion menus on the left.  So, overall, I like this extension/theme and will probably use it although sometime when I have time I'm going to go into the theme's default css and muck with the color scheme.

Finally, a HUGE thanks to Alastair for helping me get this going!  I sincerely apologize for my somewhat-snarky remarks earlier as I now see they were unwarranted.  I do hope the install problems get sorted out, as this is a pretty nice extension.

Regards,

Chris

Re: Dashboard Theme and Module

I have found the problem with the dashboard module, just small typo in installation setup already fixed. New module version is available from repo.
Janusz

Re: Dashboard Theme and Module

Well done. I've been using my custom version of the executive (with my own report) but is getting a bit clogged , I have too many report and there are hardcoded in the theme page, which is not ideal.
Doing a Dashboard like this is a great idea.

However, I'm not sure about the theme and  I don't like the accordion : It means clicking twice instead of one (on the executive one). Anyway, I guess that separating widget and theme would allows creating new theme easier.

Anyway, that's really promising. Now I have a couple of question :
- Is it easy to add new widget (is there a doc ?)
- is there a git or hg repository
- There is a dashboard option in the Application tab dropdown , what does that mean ? I was hoping a dedicated dashboard tab but I can't see it ?
- performance wise, is a collapsed rendered on demand or  at page loading ?
- Any plan to use Google chart or something similar ? (Or is the "drawing" still hardcoded in the report itself ?

Once again, I really like it, and I'm quite excited at the idea of rewritting my custom reports as widget. (When I'll have the time ..)

/Elax

Re: Dashboard Theme and Module

Hi Elax
The intention of the accordion menu was to reduce the page height and need to scroll to find a menu option. The alternative was a tree structure with a click on the category displaying a list to the right of the options within that category. I was hoping that for most usage the first category's list of items would be the most often clicked but I'm not sure that is true in practice. Perhaps it would be a good idea to make the style of the menu user configurable, and also to make the colours and style editable. You'd have to edit the file default.css in ~/themes/dashboard to change colours at the moment.

It should be reasonably easy to add new widgets. All the available ones are in the ~/modules/dashboard/widgets folder with a separate source file for each widget. The file contains a class with functions to render the widget, plus functions to prompt for and validate parameters required just for that widget. The dashboard setup screen calls the function in the selected widget class to dynamically display prompts for that widget.

In the hooks module in ~/modules/dashboard it uses a function added for the dashboard application which adds widgets to the list of available widgets in a similar fashion the add_?app_function adds modules to FA. The add_widget function receives the internal class name for the widget, a description to be displayed in selection lists, the path to the source file and a security code.

I'm not sure about the git or hg repository. I guess the core developers can choose to include it in the FA source repository if they wish.

There was a dashboard tab in an early iteration because the module adds a new application to FA. It is hidden by the dashboard theme render module (~/themes/dashboard/renderer.php). Originally, only the dashboard tab displayed widgets, but by moving the menu to the side, it made more sense to make every application tab a dashboard and hide the dashboard tab itself. I forgot to hide it from the application list in the dashboard set up form.

All the widgets are rendered on page load. It seemed too difficult to render on demand, especially in response  to widgets being minimized and maximized. At the moment it does handle a ajax call to save the changed widget settings, but refreshing individual widgets at that time seemed too hard.

Have a look through some of the supplied widgets in ~/modules/dashboard/widgets. The ones I copied from Joe's executive theme use the built-in graphics, but the daily and weekly sales widgets I wanted for my own use, do use Google Chart to display column and line charts.

I suspect that this is going to be a work in progress. It was intended to be extendable. I'm happy to help anyone to would like to make changes to it.

Alastair

Re: Dashboard Theme and Module

AlastairR wrote:

Hi Elax
The intention of the accordion menu was to reduce the page height and need to scroll to find a menu option. The alternative was a tree structure with a click on the category displaying a list to the right of the options within that category. I was hoping that for most usage the first category's list of items would be the most often clicked but I'm not sure that is true in practice. Perhaps it would be a good idea to make the style of the menu user configurable, and also to make the colours and style editable. You'd have to edit the file default.css in ~/themes/dashboard to change colours at the moment.

I prefer to scroll that to have to click (maybe because I have a big screen and 99% of the time I don't need to scroll at all). But that's my choice. I guess one can easily modify the exclusive theme to add your dashboard

AlastairR wrote:

It should be reasonably easy to add new widgets. All the available ones are in the ~/modules/dashboard/widgets folder with a separate source file for each widget. The file contains a class with functions to render the widget, plus functions to prompt for and validate parameters required just for that widget. The dashboard setup screen calls the function in the selected widget class to dynamically display prompts for that widget.

In the hooks module in ~/modules/dashboard it uses a function added for the dashboard application which adds widgets to the list of available widgets in a similar fashion the add_?app_function adds modules to FA. The add_widget function receives the internal class name for the widget, a description to be displayed in selection lists, the path to the source file and a security code.

Is that possible then,  to add widgets without from on an external module without add it in the ~/modules/dashboard/widget folder ?

AlastairR wrote:

I'm not sure about the git or hg repository. I guess the core developers can choose to include it in the FA source repository if they wish.

If you would like people to help you and contribute to your project instead of doing on your own, you need a "public" repository". I strongly recommand github.
If you are not using a source control version, you should really do.

AlastairR wrote:

There was a dashboard tab in an early iteration because the module adds a new application to FA. It is hidden by the dashboard theme render module (~/themes/dashboard/renderer.php). Originally, only the dashboard tab displayed widgets, but by moving the menu to the side, it made more sense to make every application tab a dashboard and hide the dashboard tab itself. I forgot to hide it from the application list in the dashboard set up form.

I really like the idea of a separate tab call dashboard when I can slow reports. The problem with the widget in application tabs is 90% of the time, when you go on an application tab, is to select  something on the menu, (like sales -> customer payments). You don't really want to wait for the sales reporst to be done, you just want to be able to click to 'customer payments).

AlastairR wrote:

All the widgets are rendered on page load. It seemed too difficult to render on demand, especially in response  to widgets being minimized and maximized. At the moment it does handle a ajax call to save the changed widget settings, but refreshing individual widgets at that time seemed too hard.

Have a look through some of the supplied widgets in ~/modules/dashboard/widgets. The ones I copied from Joe's executive theme use the built-in graphics, but the daily and weekly sales widgets I wanted for my own use, do use Google Chart to display column and line charts.

Ok.

/Elax

Re: Dashboard Theme and Module

Updated the wiki with the info herein.

Re: Dashboard Theme and Module

Hi Alastair

I've modified the executive theme to use your dashboard instead of the original one. I also modified slightly the layout, so I can have wide widgets (1 column per page) and small (2 per page).

If someone is interested I can send the files

/Elax

Re: Dashboard Theme and Module

I've added a project for the module and theme at code.google.com. It's called fa-dashboard-module. I regret it uses SVN for source control as that is what I know best.
A couple of issues identified by Elax have been fixed.
I've added Janusz as a joint project owner. If anyone else would like to be able to commit code changes, let me know and I'll add you.

Re: Dashboard Theme and Module

AlastairR wrote:

I've added a project for the module and theme at code.google.com. It's called fa-dashboard-module. I regret it uses SVN for source control as that is what I know best.
A couple of issues identified by Elax have been fixed.
I've added Janusz as a joint project owner. If anyone else would like to be able to commit code changes, let me know and I'll add you.

Hi Alastair

Could you provide a link ? I search for it but couldn't find it.

/Elax

Re: Dashboard Theme and Module

elax wrote:
AlastairR wrote:

I've added a project for the module and theme at code.google.com. It's called fa-dashboard-module. I regret it uses SVN for source control as that is what I know best.
A couple of issues identified by Elax have been fixed.
I've added Janusz as a joint project owner. If anyone else would like to be able to commit code changes, let me know and I'll add you.

Hi Alastair

Could you provide a link ? I search for it but couldn't find it.

/Elax

https://code.google.com/p/fa-dashboard-module/

Re: Dashboard Theme and Module

Sorry, I thought it would be immediately visible through Google, it's: http://code.google.com/p/fa-dashboard-module/

18 (edited by apmuthu 03/23/2013 02:07:52 am)

Re: Dashboard Theme and Module

In FireFox v19.0.2, in a Dashboard theme, on clicking a left menu entry, the resulting page has clickable menus on the left but they cannot be clicked.

Updated the 3 files (attached) from the googlecode svn - no luck yet.

Post's attachments

FA_dashboard_2.3.15-3_changed_files_2013-03-19.zip 29.9 kb, 23 downloads since 2013-03-23 

You don't have the permssions to download the attachments of this post.

19 (edited by apmuthu 03/23/2013 02:08:19 am)

Re: Dashboard Theme and Module

The problem exists in MSIE v8.0 / WinXP SP3 as well.

Located the issue as something to do with javascript error Line 18 Char 1 that is explained in this page. The solution to fix by resetting MSIE does not work.

The comparative portions of the html source of the working and non-working pages are attached herein.

Post's attachments

dashboard-analysis.patch 10.9 kb, 13 downloads since 2013-03-23 

You don't have the permssions to download the attachments of this post.

Re: Dashboard Theme and Module

First of all congratulations on this module, it is really a step forward on modernizing the FA front end.

I have a question. When I used the old standard theme everytime I went to a new page it was refreshed, now this isn't happening making me reselect the first option so the page refreshes.

A practical example would be: I used to make a direct invoice, then go to Customer Payments and the invoice line would automatically appear. Now when you go from direct invoice to Customer Payments it appears blank as there was no payments to allocate. Once you select in the customer list the same client it refreshes....

Not sure if I've explained myself correctly...

In any case I always missed an option to directly go from the direct invoice processed page to the actual invoice customer payment ¿shouldn't this link be included anyway in the core?

Re: Dashboard Theme and Module

@apmuthu:
I have not found any issues on Firefox 19.0.2 on Ubuntu.
@msmith:
The issue with first view of Customer Payment without allocatable invoices has been fixed,a nd will be available in next FA minor version.
When invoice is issued with cash type payment terms, the Customer Payment is generated in background and allocated to invoice automatically.
Janusz

Re: Dashboard Theme and Module

Hi again, I'm talking about invoices where we allocate payment afterwards (in my case for example when the client pays by bank transfer). When in purchases (supplier invoices) you do have this option once the invoice has been processed and it is even underlined, it makes life easier :-)

Thanks !

Re: Dashboard Theme and Module

Well, this is really rare case when you finish invoice entry, and before closing the final screen page (where the links could be) you already have payment on your account smile.

If you are talking about invoicing prepaid orders, you should already have  payment allocated to sales order, then it is automatically rellocated to invoice. But this workflow will be probably available in next major FA release.
Janusz

Re: Dashboard Theme and Module

That makes sense ! You are right.

Re: Dashboard Theme and Module

Hi All
WoW im looking forward to using the dashboard, problem is i get the following error when trying to configure dashboard setup

[an error occurred while processing this directive]

Using 2.3.16

You help would be appreciated

Cheers
Dave