How To Register A Custom Vue Component

NexoPOS 4.x uses Vue 2.x for all its components. You can then take profit of this to register your own custom components. Assuming you have successfully created your custom page, we'll now see how you can register your custom Vue component.

How To Inject A Global Output On Dashboad Footer

If you want to inject an output that should appear on every single page of the dashboard footer, you'll need to use the filter "ns-dashboard-footer". Here is how you'll add your view concretely :

Adding A Vue Component To nsExtraComponents Object

From that global view, we can create a script tag that loads a js file or a script tag where the Vue component is added to the nsExtraComponents object. Here is how you'll proceed :

Now the component is added to the main Vue instance that is attached to #dashboard-content.