daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest Nov 20th, 2018 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Add routes
  2. //path: src/api/server/routes/devices.js
  3.  
  4. //Add services
  5. //path: src/api/server/services/devices.js
  6.  
  7. //register DevicesRoute in apiRouter
  8. //path: src/api/server/apiRouter.js
  9.  
  10. //add push notification module to admin
  11. //path: src/admin/client/modules/pushNotification
  12.  
  13. //add notifcation route
  14. //path: src/admin/client/routes/notifications.js
  15.  
  16. //declare notification route in app.js
  17. //path  src/admin/client/app.js
  18. import Notifications from 'routes/notifications';
  19. <Route path="/admin/notifications" component={Notifications} />
  20.  
  21. //add push notification link to drawer of admin panel
  22. //path  src/admin/client/modules/head/components/drawer.js
  23.   const menuItems = [
  24.     {
  25.         title: messages.drawer_home,
  26.         url: '/admin/',
  27.         icon: 'home'
  28.     },
  29.     {
  30.         title: messages.drawer_products,
  31.         url: '/admin/products',
  32.         icon: 'local_offer'
  33.     },
  34.     {
  35.         title: messages.drawer_orders,
  36.         url: '/admin/orders',
  37.         icon: 'shopping_cart'
  38.     },
  39.     {
  40.         title: messages.drawer_customers,
  41.         url: '/admin/customers',
  42.         icon: 'person'
  43.     },
  44.     {
  45.         title: messages.settings_pages,
  46.         url: '/admin/pages',
  47.         icon: 'description'
  48.     },
  49.     {
  50.         title: messages.files,
  51.         url: '/admin/files',
  52.         icon: 'folder'
  53.     },
  54.     {
  55.         title: '-',
  56.         url: 'settings'
  57.     },
  58.     {
  59.         title: messages.drawer_settings,
  60.         url: '/admin/settings',
  61.         icon: 'settings'
  62.     },
  63.     {
  64.         title: messages.apps,
  65.         url: '/admin/apps',
  66.         icon: 'apps'
  67.     },
  68.     {
  69.         title: messages.push_notification,
  70.         url: '/admin/notifications',
  71.         icon: 'add_alert'
  72.     },
  73.     {
  74.         title: messages.drawer_logout,
  75.         url: '/admin/logout',
  76.         icon: 'exit_to_app'
  77.     }
  78. ];
  79.  
  80. //add apiClient library for supporting request api
  81. //path  src/admin/client/lib/apiClient.js
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top