vue-helpdesk
A vue-helpdesk project. It is a chat tool which you can add into your website.
Build Setup
To install it:
npm i vue-helpdesk
Use
This package has different components:
- admin-component (dashBoard to admin sessions)
- admin-chat-component (chat for the admin or support user)
- chat-component (chat component)
- customer-chat-component (chat component for the customer)
If you want to add the customer-chat component you have to add the following in the proper template (change path_to_your_npm_project with your path):
<customer-chat-component data-notification-server="<?php print variable_get('bi_helpdesk_notification_server', 'http://bi-notification-server.dev:3000') ?>" data-helpdesk-api="<?php echo url('/api'); ?>" data-access-token="<?php echo $access_token; ?>"></customer-chat-component>
<script src="<?php echo url('/path_to_your_npm_project/node_modules/vue-helpdesk/dist/build.js').'?'.time(); ?>"></script>
If you want to add the chat-component component you have to add the following in the proper template (change path_to_your_npm_project with your path):
<chat-component data-helpdesk-api="<?php echo url('/api', array('absolute' => TRUE)); ?>" data-access-token="<?php echo $access_token; ?>"></chat-component>
<script src="<?php echo url('/path_to_your_npm_project/node_modules/vue-helpdesk/dist/build.js', array('absolute' => TRUE)); ?>"></script>
If you want to add the admin-component and admin-chat-component component, you have to add the following in the proper template (change path_to_your_npm_project with your path):
<admin-component data-notification-server="<?php print variable_get('bi_helpdesk_notification_server', 'http://bi-notification-server.dev:3000') ?>" data-helpdesk-api="<?php echo url('/api', array('absolute' => TRUE)); ?>" data-access-token="<?php echo $access_token; ?>" data-user-uuid="<?php echo $user->uuid; ?>"></admin-component>
<admin-chat-component></admin-chat-component>
<script src="<?php echo url('/path_to_your_npm_project/node_modules/vue-helpdesk/dist/build.js', array('absolute' => TRUE)).'?'.time(); ?>"></script>