Feat: Apps Page

Why it was needed?

After launching numerous portal based apps it has become very difficult for a user to navigate between apps. Also apps like Frappe CRM, Gameplan, Helpdesk can be installed as standalone apps in a separate sites (SaaS flow).

There are two cases:

1. SaaS flow (one app per site):

After login, user should be redirected to the installed app’s portal page. But currently, user is redirected to the desk (/app) and they have no idea about it and they get lost.

2. Multi-app flow through FC (multiple apps in one site):

After login, user get redirected to the desk (/app) and they have to navigate to the portal page of the app they want to use but they don’t know how many apps are installed and how to navigate to the portal page of the app they want to use.

Restarted previous attempt to fix it

Faris started working on this issue Old PR. But for some reason it never got merged. So I basically restarted it in a separate New PR.

With this new apps page the second case was resolved. So now if a site has multiple apps after login you will be landed on the apps page and you can select an app you want to work on.

For SaaS flow, since there is only one app (portal app) is installed on a site you will be redirected to that apps portal page after login. E.g if Gameplan is installed you will be redirected to /g. But what if only ERPNext app is installed since it is not a portal based app you will be redirected to /app/home.

Additional feature:

You can set any app as default to avoid landing on apps page.

  1. User Level


  2. System Level

How can we show our custom apps on apps page

If you need your app to be included in apps page add these details in hooks.py. Below is the example of Frappe CRM app.

Here has_permission option is used to show/hide app icon based on app based business logic. E.g. Hide icon if user is a Website User.

# Each item in the list will be shown as an app in the apps page
add_to_apps_screen = [{
    "name": "crm",
    "logo": "/assets/crm/logo.png",
    "title": "CRM",
    "route": "/crm",
    "has_permission": "crm.api.check_app_permission"
}]

It is supported in v15 and above

20 Likes

Hi @shariquerik,

Amazing feature! :ok_hand:

But I have a doubt. I tried it with the latest version 15, but the ERPNext app isn’t showing up in the apps list and also isn’t appearing in the user settings or system settings.

I’ve checked all the configurations, but I can’t figure out what I’m doing wrong. Could you please check the video and help me identify the mistake?

3 Likes

In ERPNext I think the PR fix: include erpnext in apps page (backport #42727) by mergify[bot] · Pull Request #42863 · frappe/erpnext · GitHub is not released

Edit: Released

1 Like

Interesting and admirable, whether any custom app can be added that way

1 Like

Yeah, custom apps can be added via hooks.py. We added Raven to the app switcher here: feat: add Raven to app switcher by nikkothari22 · Pull Request #1030 · The-Commit-Company/Raven · GitHub

2 Likes

I added same like this, but not working, any requirement ?

and every time when i am refreshing tab while apps screen, it is log outing

1 Like

Look go back to old version, Desktop

@NCP it’s appear with me in this version
ERPNext: v15.33.5 (version-15)
the latest version now is v15.34.0

I know, Shariq already told in the above post.

Hello,

How can I avoid the app page and the redirection ?

For example if I have both a non-app app and builder (an app one) I can’t select the non-app app as default and even without any selection builder redirection is applied.

I tried to add add_to_apps_screen= [ { "name": "myapp", "logo": "/assets/myapp/images/logo_100x100.png", "title": "My app", "route": "/app/my-app", "has_permission": "", } ]
to the non-app to let it be listed in the default app list to be able to select it
but it leads to further issues with the forced redirection from route overcoming every direction from roles and the see website button.