update for version 1.0.1

This commit is contained in:
sujitprasad
2015-10-23 14:15:29 +05:30
parent 82b878e93b
commit 3d425dc380
8348 changed files with 10020 additions and 4171 deletions

View File

@@ -3,7 +3,7 @@
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 01, 2015 at 04:01 PM
-- Generation Time: Oct 23, 2015 at 01:21 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
@@ -17,7 +17,7 @@ SET time_zone = "+00:00";
/*!40101 SET NAMES utf8 */;
--
-- Database: `faveohelpdesk`
-- Database: `faveotest`
--
-- --------------------------------------------------------
@@ -47,7 +47,7 @@ CREATE TABLE IF NOT EXISTS `access` (
--
INSERT INTO `access` (`id`, `password_expire`, `reg_method`, `user_session`, `agent_session`, `reset_ticket_expire`, `password_reset`, `bind_agent_ip`, `reg_require`, `quick_access`, `created_at`, `updated_at`) VALUES
(1, '', '', '', '', '', 0, 0, 0, 0, '2015-10-01 05:00:00', '2015-10-01 05:00:00');
(1, '', '', '', '', '', 0, 0, 0, 0, '2015-10-21 06:35:38', '2015-10-21 06:35:38');
-- --------------------------------------------------------
@@ -96,7 +96,7 @@ CREATE TABLE IF NOT EXISTS `alert_notice` (
--
INSERT INTO `alert_notice` (`id`, `ticket_status`, `ticket_admin_email`, `ticket_department_manager`, `ticket_department_member`, `ticket_organization_accmanager`, `message_status`, `message_last_responder`, `message_assigned_agent`, `message_department_manager`, `message_organization_accmanager`, `internal_status`, `internal_last_responder`, `internal_assigned_agent`, `internal_department_manager`, `assignment_status`, `assignment_assigned_agent`, `assignment_team_leader`, `assignment_team_member`, `transfer_status`, `transfer_assigned_agent`, `transfer_department_manager`, `transfer_department_member`, `overdue_status`, `overdue_assigned_agent`, `overdue_department_manager`, `overdue_department_member`, `system_error`, `sql_error`, `excessive_failure`, `created_at`, `updated_at`) VALUES
(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '2015-10-01 05:00:00', '2015-10-01 05:00:00');
(1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '2015-10-21 06:35:38', '2015-10-23 00:59:31');
-- --------------------------------------------------------
@@ -121,7 +121,7 @@ CREATE TABLE IF NOT EXISTS `auto_response` (
--
INSERT INTO `auto_response` (`id`, `new_ticket`, `agent_new_ticket`, `submitter`, `participants`, `overlimit`, `created_at`, `updated_at`) VALUES
(1, 0, 0, 0, 0, 0, '2015-10-01 05:00:00', '2015-10-01 05:00:00');
(1, 1, 1, 0, 0, 0, '2015-10-21 06:35:38', '2015-10-23 00:59:25');
-- --------------------------------------------------------
@@ -141,6 +141,22 @@ CREATE TABLE IF NOT EXISTS `banlist` (
-- --------------------------------------------------------
--
-- Table structure for table `canned_response`
--
CREATE TABLE IF NOT EXISTS `canned_response` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
-- --------------------------------------------------------
--
-- Table structure for table `company`
--
@@ -166,7 +182,7 @@ CREATE TABLE IF NOT EXISTS `company` (
--
INSERT INTO `company` (`id`, `company_name`, `website`, `phone`, `address`, `landing_page`, `offline_page`, `thank_page`, `logo`, `use_logo`, `created_at`, `updated_at`) VALUES
(1, '', '', '', '', '', '', '', '', '', '2015-10-01 05:00:00', '2015-10-01 05:00:00');
(1, '', '', '', '', '', '', '', '', '0', '2015-10-21 06:35:38', '2015-10-23 00:58:51');
-- --------------------------------------------------------
@@ -254,9 +270,9 @@ CREATE TABLE IF NOT EXISTS `department` (
--
INSERT INTO `department` (`id`, `name`, `type`, `sla`, `manager`, `ticket_assignment`, `outgoing_email`, `template_set`, `auto_ticket_response`, `auto_message_response`, `auto_response_email`, `recipient`, `group_access`, `department_sign`, `created_at`, `updated_at`) VALUES
(1, 'Support', '', '', '', '', '', '', '', '', '', '', '', '', '2015-10-01 04:59:59', '2015-10-01 04:59:59'),
(2, 'Sales', '', '', '', '', '', '', '', '', '', '', '', '', '2015-10-01 04:59:59', '2015-10-01 04:59:59'),
(3, 'Operation', '', '', '', '', '', '', '', '', '', '', '', '', '2015-10-01 04:59:59', '2015-10-01 04:59:59');
(1, 'Support', '', '', '', '', '', '', '', '', '', '', '', '', '2015-10-21 06:35:38', '2015-10-21 06:35:38'),
(2, 'Sales', '', '', '', '', '', '', '', '', '', '', '', '', '2015-10-21 06:35:38', '2015-10-21 06:35:38'),
(3, 'Operation', '', '', '', '', '', '', '', '', '', '', '', '', '2015-10-21 06:35:38', '2015-10-21 06:35:38');
-- --------------------------------------------------------
@@ -287,7 +303,7 @@ CREATE TABLE IF NOT EXISTS `email` (
--
INSERT INTO `email` (`id`, `template`, `sys_email`, `alert_email`, `admin_email`, `mta`, `email_fetching`, `strip`, `separator`, `all_emails`, `email_collaborator`, `attachment`, `created_at`, `updated_at`) VALUES
(1, '', '', '', '', '', 0, 0, 0, 0, 0, 0, '2015-10-01 05:00:00', '2015-10-01 05:00:00');
(1, '', '', '', '', '', 1, 0, 0, 1, 1, 1, '2015-10-21 06:35:38', '2015-10-23 00:59:14');
-- --------------------------------------------------------
@@ -323,6 +339,25 @@ CREATE TABLE IF NOT EXISTS `emails` (
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
-- --------------------------------------------------------
--
-- Table structure for table `fields`
--
CREATE TABLE IF NOT EXISTS `fields` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`forms_id` int(11) NOT NULL,
`label` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`value` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`required` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
@@ -334,7 +369,7 @@ CREATE TABLE IF NOT EXISTS `emails` (
CREATE TABLE IF NOT EXISTS `footer` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`footer` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`footer` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
@@ -345,7 +380,7 @@ CREATE TABLE IF NOT EXISTS `footer` (
--
INSERT INTO `footer` (`id`, `title`, `footer`, `created_at`, `updated_at`) VALUES
(1, '', '', '2015-10-01 05:00:00', '2015-10-01 05:00:00');
(1, '', '', '2015-10-21 06:35:38', '2015-10-21 06:35:38');
-- --------------------------------------------------------
@@ -356,7 +391,7 @@ INSERT INTO `footer` (`id`, `title`, `footer`, `created_at`, `updated_at`) VALUE
CREATE TABLE IF NOT EXISTS `footer2` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`footer` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`footer` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
@@ -367,7 +402,7 @@ CREATE TABLE IF NOT EXISTS `footer2` (
--
INSERT INTO `footer2` (`id`, `title`, `footer`, `created_at`, `updated_at`) VALUES
(1, '', '', '2015-10-01 05:00:00', '2015-10-01 05:00:00');
(1, '', '', '2015-10-21 06:35:38', '2015-10-21 06:35:38');
-- --------------------------------------------------------
@@ -378,7 +413,7 @@ INSERT INTO `footer2` (`id`, `title`, `footer`, `created_at`, `updated_at`) VALU
CREATE TABLE IF NOT EXISTS `footer3` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`footer` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`footer` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
@@ -389,7 +424,7 @@ CREATE TABLE IF NOT EXISTS `footer3` (
--
INSERT INTO `footer3` (`id`, `title`, `footer`, `created_at`, `updated_at`) VALUES
(1, '', '', '2015-10-01 05:00:00', '2015-10-01 05:00:00');
(1, '', '', '2015-10-21 06:35:38', '2015-10-21 06:35:38');
-- --------------------------------------------------------
@@ -400,7 +435,7 @@ INSERT INTO `footer3` (`id`, `title`, `footer`, `created_at`, `updated_at`) VALU
CREATE TABLE IF NOT EXISTS `footer4` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`footer` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`footer` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
@@ -411,7 +446,21 @@ CREATE TABLE IF NOT EXISTS `footer4` (
--
INSERT INTO `footer4` (`id`, `title`, `footer`, `created_at`, `updated_at`) VALUES
(1, '', '', '2015-10-01 05:00:00', '2015-10-01 05:00:00');
(1, '', '', '2015-10-21 06:35:39', '2015-10-21 06:35:39');
-- --------------------------------------------------------
--
-- Table structure for table `forms`
--
CREATE TABLE IF NOT EXISTS `forms` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`formname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
@@ -471,7 +520,9 @@ INSERT INTO `form_name` (`id`, `name`, `status`, `no_of_fields`, `created_at`, `
CREATE TABLE IF NOT EXISTS `form_value` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`form_detail_id` int(11) NOT NULL,
`form_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`values` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
@@ -511,9 +562,9 @@ CREATE TABLE IF NOT EXISTS `groups` (
--
INSERT INTO `groups` (`id`, `name`, `group_status`, `can_create_ticket`, `can_edit_ticket`, `can_post_ticket`, `can_close_ticket`, `can_assign_ticket`, `can_trasfer_ticket`, `can_delete_ticket`, `can_ban_email`, `can_manage_canned`, `can_manage_faq`, `can_view_agent_stats`, `department_access`, `admin_notes`, `created_at`, `updated_at`) VALUES
(1, 'Group A', 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, '', '2015-10-01 04:59:59', '2015-10-01 04:59:59'),
(2, 'Group B', 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, '', '2015-10-01 04:59:59', '2015-10-01 04:59:59'),
(3, 'Group C', 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '', '2015-10-01 04:59:59', '2015-10-01 04:59:59');
(1, 'Group A', 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, '', '2015-10-21 06:35:38', '2015-10-21 06:35:38'),
(2, 'Group B', 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, '', '2015-10-21 06:35:38', '2015-10-21 06:35:38'),
(3, 'Group C', 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '', '2015-10-21 06:35:38', '2015-10-21 06:35:38');
-- --------------------------------------------------------
@@ -582,9 +633,9 @@ CREATE TABLE IF NOT EXISTS `help_topic` (
--
INSERT INTO `help_topic` (`id`, `topic`, `parent_topic`, `custom_form`, `department`, `ticket_status`, `priority`, `sla_plan`, `thank_page`, `ticket_num_format`, `internal_notes`, `status`, `type`, `auto_assign`, `auto_response`, `created_at`, `updated_at`) VALUES
(1, 'Support query', 'Support query', '1', '1', '1', '2', '1', '', '1', '', 1, 1, 0, 0, '2015-10-01 04:59:59', '2015-10-01 04:59:59'),
(2, 'Sales query', 'Sale query', '1', '2', '1', '2', '1', '', '1', '', 1, 1, 0, 0, '2015-10-01 04:59:59', '2015-10-01 04:59:59'),
(3, 'Operational query', 'Operational query', '1', '3', '1', '2', '1', '', '1', '', 1, 1, 0, 0, '2015-10-01 04:59:59', '2015-10-01 04:59:59');
(1, 'Support query', 'Support query', '', '1', '1', '2', '1', '', '1', '', 1, 1, 0, 0, '2015-10-21 06:35:38', '2015-10-21 06:35:38'),
(2, 'Sales query', 'Sale query', '', '2', '1', '2', '1', '', '1', '', 1, 1, 0, 0, '2015-10-21 06:35:38', '2015-10-21 06:35:38'),
(3, 'Operational query', 'Operational query', '', '3', '1', '2', '1', '', '1', '', 1, 1, 0, 0, '2015-10-21 06:35:38', '2015-10-21 06:35:38');
-- --------------------------------------------------------
@@ -673,6 +724,8 @@ CREATE TABLE IF NOT EXISTS `migrations` (
--
INSERT INTO `migrations` (`migration`, `batch`) VALUES
('2000_08_22_110830_create_forms_table', 1),
('2000_08_23_110830_create_fields_table', 1),
('2014_10_12_000000_create_users_table', 1),
('2014_10_12_100000_create_password_resets_table', 1),
('2015_05_06_073651_create_footers_table', 1),
@@ -718,7 +771,9 @@ INSERT INTO `migrations` (`migration`, `batch`) VALUES
('2015_07_10_061107_create_ticketsource_table', 1),
('2015_08_10_114142_create_smtp_table', 1),
('2015_09_14_101844_create_users_organization_table', 1),
('2015_09_17_050549_create_version_check_table', 1);
('2015_09_17_050549_create_version_check_table', 1),
('2015_10_09_105525_create_canned_response_table', 1),
('2015_10_20_154640_create_ticket_form_data_table', 1);
-- --------------------------------------------------------
@@ -791,13 +846,6 @@ CREATE TABLE IF NOT EXISTS `send_mail` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
--
-- Dumping data for table `send_mail`
--
INSERT INTO `send_mail` (`id`, `driver`, `host`, `port`, `encryption`, `name`, `email`, `password`) VALUES
(1, '', '', '', '', '', '', '');
-- --------------------------------------------------------
--
@@ -822,9 +870,9 @@ CREATE TABLE IF NOT EXISTS `sla_plan` (
--
INSERT INTO `sla_plan` (`id`, `name`, `grace_period`, `admin_note`, `status`, `transient`, `ticket_overdue`, `created_at`, `updated_at`) VALUES
(1, 'Sla 1', '6 Hours', '', 1, 0, 0, '2015-10-01 04:59:57', '2015-10-01 04:59:57'),
(2, 'Sla 2', '12 Hours', '', 1, 0, 0, '2015-10-01 04:59:57', '2015-10-01 04:59:57'),
(3, 'Sla 3', '24 Hours', '', 1, 0, 0, '2015-10-01 04:59:57', '2015-10-01 04:59:57');
(1, 'Sla 1', '6 Hours', '', 1, 0, 0, '2015-10-21 06:35:36', '2015-10-21 06:35:36'),
(2, 'Sla 2', '12 Hours', '', 1, 0, 0, '2015-10-21 06:35:36', '2015-10-21 06:35:36'),
(3, 'Sla 3', '24 Hours', '', 1, 0, 0, '2015-10-21 06:35:36', '2015-10-21 06:35:36');
-- --------------------------------------------------------
@@ -858,7 +906,7 @@ CREATE TABLE IF NOT EXISTS `system` (
--
INSERT INTO `system` (`id`, `status`, `url`, `name`, `department`, `page_size`, `log_level`, `purge_log`, `name_format`, `time_farmat`, `date_format`, `date_time_format`, `day_date_time`, `time_zone`, `content`, `created_at`, `updated_at`) VALUES
(1, 0, '', '', '', '', '', '', '', '', '', 'd/m/Y H:i', '', 'Asia/Kolkata', '', '2015-10-01 05:00:00', '2015-10-01 05:00:00');
(1, 1, '', '', '1', '', '', '', '', '', '', 'd/m/Y H:i:s', '', 'Europe/London', '', '2015-10-21 06:35:38', '2015-10-23 00:59:09');
-- --------------------------------------------------------
@@ -883,9 +931,9 @@ CREATE TABLE IF NOT EXISTS `teams` (
--
INSERT INTO `teams` (`id`, `name`, `status`, `team_lead`, `assign_alert`, `admin_notes`, `created_at`, `updated_at`) VALUES
(1, 'Level 1 Support', 0, '', 0, '', '2015-10-01 04:59:59', '2015-10-01 04:59:59'),
(2, 'Level 2 Support', 0, '', 0, '', '2015-10-01 04:59:59', '2015-10-01 04:59:59'),
(3, 'Developer', 0, '', 0, '', '2015-10-01 04:59:59', '2015-10-01 04:59:59');
(1, 'Level 1 Support', 0, '', 0, '', '2015-10-21 06:35:38', '2015-10-21 06:35:38'),
(2, 'Level 2 Support', 0, '', 0, '', '2015-10-21 06:35:38', '2015-10-21 06:35:38'),
(3, 'Developer', 0, '', 0, '', '2015-10-21 06:35:38', '2015-10-21 06:35:38');
-- --------------------------------------------------------
@@ -960,7 +1008,7 @@ CREATE TABLE IF NOT EXISTS `tickets` (
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;
-- --------------------------------------------------------
@@ -979,7 +1027,7 @@ CREATE TABLE IF NOT EXISTS `ticket_attachment` (
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`file` mediumblob,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;
-- --------------------------------------------------------
@@ -1000,6 +1048,22 @@ CREATE TABLE IF NOT EXISTS `ticket_collaborator` (
-- --------------------------------------------------------
--
-- Table structure for table `ticket_form_data`
--
CREATE TABLE IF NOT EXISTS `ticket_form_data` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ticket_id` int(11) NOT NULL,
`title` text COLLATE utf8_unicode_ci NOT NULL,
`content` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `ticket_priority`
--
@@ -1058,7 +1122,7 @@ CREATE TABLE IF NOT EXISTS `ticket_settings` (
--
INSERT INTO `ticket_settings` (`id`, `num_format`, `num_sequence`, `priority`, `sla`, `help_topic`, `max_open_ticket`, `collision_avoid`, `captcha`, `status`, `claim_response`, `assigned_ticket`, `answered_ticket`, `agent_mask`, `html`, `client_update`, `max_file_size`, `created_at`, `updated_at`) VALUES
(1, '#ABCD 1234 1234567', '0', 'low', '12 Hours', 'support query', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '2015-10-01 04:59:57', '2015-10-01 04:59:57');
(1, '#ABCD 1234 1234567', '0', '1', '1', '1', '', '', '', 1, 0, 0, 0, 0, 0, 0, 0, '2015-10-21 06:35:36', '2015-10-23 00:59:21');
-- --------------------------------------------------------
@@ -1107,11 +1171,11 @@ CREATE TABLE IF NOT EXISTS `ticket_status` (
--
INSERT INTO `ticket_status` (`id`, `name`, `state`, `mode`, `message`, `flags`, `sort`, `properties`, `created_at`, `updated_at`) VALUES
(1, 'Open', 'open', 3, 'Ticket have been Reopened by', 0, 1, 'Open tickets.', '2015-10-01 04:59:57', '2015-10-01 04:59:57'),
(2, 'Resolved', 'closed', 1, 'Ticket have been Resolved by', 0, 2, 'Resolved tickets.', '2015-10-01 04:59:57', '2015-10-01 04:59:57'),
(3, 'Closed', 'closed', 3, 'Ticket have been Closed by', 0, 3, 'Closed tickets. Tickets will still be accessible on client and staff panels.', '2015-10-01 04:59:57', '2015-10-01 04:59:57'),
(4, 'Archived', 'archived', 3, 'Ticket have been Archived by', 0, 4, 'Tickets only adminstratively available but no longer accessible on ticket queues and client panel.', '2015-10-01 04:59:57', '2015-10-01 04:59:57'),
(5, 'Deleted', 'deleted', 3, 'Ticket have been Deleted by', 0, 5, 'Tickets queued for deletion. Not accessible on ticket queues.', '2015-10-01 04:59:57', '2015-10-01 04:59:57');
(1, 'Open', 'open', 3, 'Ticket have been Reopened by', 0, 1, 'Open tickets.', '2015-10-21 06:35:36', '2015-10-21 06:35:36'),
(2, 'Resolved', 'closed', 1, 'Ticket have been Resolved by', 0, 2, 'Resolved tickets.', '2015-10-21 06:35:36', '2015-10-21 06:35:36'),
(3, 'Closed', 'closed', 3, 'Ticket have been Closed by', 0, 3, 'Closed tickets. Tickets will still be accessible on client and staff panels.', '2015-10-21 06:35:36', '2015-10-21 06:35:36'),
(4, 'Archived', 'archived', 3, 'Ticket have been Archived by', 0, 4, 'Tickets only adminstratively available but no longer accessible on ticket queues and client panel.', '2015-10-21 06:35:36', '2015-10-21 06:35:36'),
(5, 'Deleted', 'deleted', 3, 'Ticket have been Deleted by', 0, 5, 'Tickets queued for deletion. Not accessible on ticket queues.', '2015-10-21 06:35:36', '2015-10-21 06:35:36');
-- --------------------------------------------------------
@@ -1135,7 +1199,7 @@ CREATE TABLE IF NOT EXISTS `ticket_thread` (
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=17 ;
-- --------------------------------------------------------
@@ -1334,7 +1398,7 @@ CREATE TABLE IF NOT EXISTS `users` (
--
INSERT INTO `users` (`id`, `user_name`, `first_name`, `last_name`, `gender`, `email`, `ban`, `password`, `active`, `ext`, `phone_number`, `mobile`, `agent_sign`, `account_type`, `account_status`, `assign_group`, `primary_dpt`, `agent_tzone`, `daylight_save`, `limit_access`, `directory_listing`, `vocation_mode`, `company`, `role`, `internal_note`, `profile_pic`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'demo@demo.com', 'demo', 'demo', 0, 'demo@demo.com', 0, '$2y$10$4L3/whr/eCph0vYtYLENRuCiIolYpxZVwNH2xTFRFIQVfEfNrzGPa', 1, '', '', '', '', '', '', 'group A', 'support', '', '', '', '', '', '', 'admin', '', '', NULL, '2015-10-01 05:00:01', '2015-10-01 05:00:01');
(1, 'demo@demo.com', 'demo', 'demo', 0, 'demo@demo.com', 0, '$2y$10$2PP4xEbcHO3fLjOUuVvpwOXFEzPlpcIoroJ/0Kz7XqQ3wOvF/IWda', 1, '', '', '', '', '', '', 'group A', 'support', '', '', '', '', '', '', 'admin', '', '', 'Z8x1HfxP8gA69j82UZkSUTytGzfmnk1ZS5nfCYaQjVdHqftVN2RxdRYxMXVn', '2015-10-21 06:35:39', '2015-10-23 01:51:03');
-- --------------------------------------------------------
@@ -1371,7 +1435,7 @@ CREATE TABLE IF NOT EXISTS `version_check` (
--
INSERT INTO `version_check` (`id`, `current_version`, `new_version`, `created_at`, `updated_at`) VALUES
(1, '', '', '2015-10-01 05:00:00', '2015-10-01 05:00:00');
(1, '', '', '2015-10-21 06:35:39', '2015-10-21 06:35:39');
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;

3
code/.gitattributes vendored Normal file
View File

@@ -0,0 +1,3 @@
* text=auto
*.css linguist-vendored
*.less linguist-vendored

View File

@@ -0,0 +1,94 @@
<?php namespace App\Exceptions;
use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
// use App\Http\Controllers\Common\SettingsController;
//use App\Model\helpdesk\Email\Smtp;
class Handler extends ExceptionHandler {
/**
* A list of the exception types that should not be reported.
*
* @var array
*/
protected $dontReport = [
'Symfony\Component\HttpKernel\Exception\HttpException'
];
/**
* Create a new controller instance.
* @return type response
*/
// public function __construct() {
// SettingsController::smtp();
// }
/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $e
* @return void
*/
public function report(Exception $e)
{
return parent::report($e);
}
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $e
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $e)
{
if ($this->isHttpException($e) && $e->getStatusCode() == 404) {
return response()->view('errors.404', []);
} else {
if(\Config::get('database.install') == 1) {
// if(\Config::get('app.ErrorLog') == '%1%') {
// \App\Http\Controllers\Common\SettingsController::smtp();
// \Mail::send('errors.report', array('e' => $e), function ($message) {
// $message->to('', '')->subject('');
// });
// }
}
return response()->view('errors.500', []);
}
return parent::render($request, $e);
// if ($this->isHttpException($e))
// {
// return $this->renderHttpException($e);
// }
// if (config('app.debug'))
// {
// return $this->renderExceptionWithWhoops($e);
// }
// return parent::render($request, $e);
}
// protected function renderExceptionWithWhoops(Exception $e)
// {
// $whoops = new \Whoops\Run;
// $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler());
// return new \Illuminate\Http\Response(
// $whoops->handleException($e),
// $e->getStatusCode(),
// $e->getHeaders()
// );
// }
}

View File

@@ -0,0 +1,108 @@
<?php namespace App\Http\Controllers\Admin\helpdesk;
use App\Model\helpdesk\Form\Fields;
use App\Model\helpdesk\Form\Forms;
use Illuminate\Http\Request;
use Input;
use App\Http\Controllers\Controller;
use Redirect;
class FormController extends Controller {
private $fields;
private $forms;
public function __construct(Fields $fields,Forms $forms) {
$this->fields = $fields;
$this->forms = $forms;
// $this->middleware('auth');
}
/**
* home
* @return type
*/
public function home() {
return view('forms.home');
}
/**
* list of forms
* @param type Forms $forms
* @return Response
*/
public function index(Forms $forms) {
return view('themes.default1.admin.helpdesk.manage.form.index',compact('forms'));
}
/**
* Show the form for creating a new resource.
* @return Response
*/
public function create() {
return view('themes.default1.admin.helpdesk.manage.form.form');
}
/**
* Display the specified resource.
* @param int $id
* @return Response
*/
public function show($id) {
return view('themes.default1.admin.helpdesk.manage.form.preview',compact('id'));
}
/**
* Store a newly created resource in storage.
*
* @return Response
*/
public function store(Forms $forms) {
if(!Input::get('formname')) {
return Redirect::back()->with('fails','Please fill Form name');
}
$required = Input::get('required');
$count = count($required);
$require = array();
for($i=2;$i<$count+2;$i++) {
for($j=0;$j<1;$j++) {
array_push($require,$required[$i][$j]);
}
}
$forms->formname = Input::get('formname');
$forms->save();
$count = count(Input::get('name'));
$fields = array();
for($i=0; $i<=$count; $i++) {
if(!empty(Input::get('name')[$i])) {
array_push($fields, array(
'forms_id' => $forms->id,
'label' => Input::get('label')[$i],
'name' => Input::get('name')[$i],
'type' => Input::get('type')[$i],
'value' => Input::get('value')[$i],
'required'=>$require[$i],
));
}
}
Fields::insert($fields);
return Redirect::back()->with('success','Successfully created Form');
}
public function delete($id,Forms $forms, Fields $field) {
$fields = $field->where('forms_id',$id)->get();
foreach($fields as $field) {
$field->delete();
}
$forms = $forms->where('id',$id)->first();
$forms->delete();
return redirect()->back()->with('success', 'Deleted Successfully');
}
}

View File

@@ -7,7 +7,7 @@ use App\Http\Requests\helpdesk\HelptopicUpdate;
// models
use App\Model\helpdesk\Agent\Agents;
use App\Model\helpdesk\Agent\Department;
use App\Model\helpdesk\Form\Form_name;
use App\Model\helpdesk\Form\Forms;
use App\Model\helpdesk\Manage\Help_topic;
use App\Model\helpdesk\Manage\Sla_plan;
use App\Model\helpdesk\Ticket\Ticket_Priority;
@@ -65,7 +65,7 @@ class HelptopicController extends Controller {
| 5.Forms Model
================================================
*/
public function create(Ticket_Priority $priority, Department $department, Help_topic $topic, Form_name $form, User $agent, Sla_plan $sla) {
public function create(Ticket_Priority $priority, Department $department, Help_topic $topic, Forms $form, User $agent, Sla_plan $sla) {
try {
$departments = $department->get();
$topics = $topic->get();
@@ -122,7 +122,7 @@ class HelptopicController extends Controller {
* @param type Sla_plan $sla
* @return type Response
*/
public function edit($id, Ticket_Priority $priority, Department $department, Help_topic $topic, Form_name $form, Sla_plan $sla) {
public function edit($id, Ticket_Priority $priority, Department $department, Help_topic $topic, Forms $form, Sla_plan $sla) {
try {
$agents = User::where('role','=','agent')->get();
$departments = $department->get();

View File

@@ -0,0 +1,131 @@
<?php namespace App\Http\Controllers\Agent\helpdesk;
// controllers
use App\Http\Controllers\Controller;
// requests
use App\Http\Requests\helpdesk\CannedRequest;
use App\Http\Requests\helpdesk\CannedUpdateRequest;
// model
use App\Model\helpdesk\Agent_panel\Canned;
use App\User;
/**
* UserController
*
* @package Controllers
* @subpackage Controller
* @author Ladybird <info@ladybirdweb.com>
*/
class CannedController extends Controller {
/**
* Create a new controller instance.
* constructor to check
* 1. authentication
* 2. user roles
* 3. roles must be agent
*
* @return void
*/
public function __construct() {
$this->middleware('auth');
$this->middleware('role.agent');
// $this->middleware('roles');
}
/**
* Display a listing of the resource.
* @param type User $user
* @return type Response
*/
public function index() {
return view('themes.default1.agent.helpdesk.canned.index');
}
/**
* Show the form for creating a new resource.
* @return type Response
*/
public function create() {
return view('themes.default1.agent.helpdesk.canned.create');
}
/**
* Store a newly created resource in storage.
* @param type User $user
* @param type Sys_userRequest $request
* @return type Response
*/
public function store(CannedRequest $request, Canned $canned) {
$canned->user_id = \Auth::user()->id;
$canned->title = $request->input('title');
$canned->message = $request->input('message');
$canned->save();
return redirect()->route('canned.list')->with('success','Added Successfully');
}
/**
* Show the form for editing the specified resource.
* @param type int $id
* @param type User $user
* @return type Response
*/
public function edit($id, Canned $canned) {
$canned = $canned->where('user_id', '=', \Auth::user()->id)->where('id','=',$id)->first();
return view('themes.default1.agent.helpdesk.canned.edit',compact('canned'));
}
/**
* Update the specified resource in storage.
* @param type int $id
* @param type User $user
* @param type Sys_userUpdate $request
* @return type Response
*/
public function update($id, CannedUpdateRequest $request, Canned $canned) {
$canned = $canned->where('id','=',$id)->where('user_id', '=', \Auth::user()->id)->first();
$canned->user_id = \Auth::user()->id;
$canned->title = $request->input('title');
$canned->message = $request->input('message');
$canned->save();
return redirect()->route('canned.list')->with('success','Updated Successfully');
}
/**
* Remove the specified resource from storage.
* @param type int $id
* @param type User $user
* @return type Response
*/
public function destroy($id, Canned $canned) {
/* select the field where id = $id(request Id) */
$canned = $canned->whereId($id)->first();
/* delete the selected field */
/* Check whether function success or not */
if ($canned->delete() == true) {
/* redirect to Index page with Success Message */
return redirect()->route('canned.list')->with('success', 'User Deleted Successfully');
} else {
/* redirect to Index page with Fails Message */
return redirect()->route('canned.list')->with('fails', 'User can not Delete');
}
return view('themes.default1.agent.helpdesk.canned.destroy');
}
/**
* get canned
* @param type $id
* @return type json
*/
public function get_canned($id) {
if($id != "zzz") {
$canned = Canned::where('id','=',$id)->where('user_id','=',\Auth::user()->id)->first();
$msg = $canned->message;
} else {
$msg = "";
}
return \Response::json($msg);
}
}

View File

@@ -55,10 +55,10 @@ class DashboardController extends Controller {
public function ChartData()
{
$ticketlist = DB::table('tickets')
->select(DB::raw('MONTH(updated_at) as month'),
->select(DB::raw('MONTH(updated_at) as month'),
DB::raw('count(*) as tickets'))
->groupBy('month')
->orderBy('month', 'desc')
->orderBy('month', 'asc')
->get();
return $ticketlist;

View File

@@ -94,14 +94,21 @@ class MailController extends Controller {
$date_time = explode(" ", $datetime);
$date = $date_time[1] . "-" . $date_time[2] . "-" . $date_time[3] . " " . $date_time[4];
$date = date('Y-m-d H:i:s', strtotime($date));
$subject = $mail->subject;
if(isset($mail->subject)){
$subject = $mail->subject;
} else {
$subject = "No Subject";
}
$fromname = $mail->fromName;
$fromaddress = $mail->fromAddress;
$source = "2";
$phone = "";
$priority = '1';
$assign = "";
if ($this->TicketController->create_user($fromaddress, $fromname, $subject, $body, $phone, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign) == true) {
$form_data = null;
if ($this->TicketController->create_user($fromaddress, $fromname, $subject, $body, $phone, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $form_data) == true) {
$thread_id = Ticket_Thread::whereRaw('id = (select max(`id`) from ticket_thread)')->first();
$thread_id = $thread_id->id;

View File

@@ -20,6 +20,8 @@ use App\Model\helpdesk\Ticket\Ticket_Status;
use App\Model\helpdesk\Email\Emails;
use App\Model\helpdesk\Agent\Department;
use App\Model\helpdesk\Manage\Help_topic;
use App\Model\helpdesk\Ticket\Ticket_Form_Data;
use App\Model\helpdesk\Form\Fields;
use App\User;
// classes
use Auth;
@@ -130,8 +132,9 @@ class TicketController extends Controller {
$source = "3";
$headers = null;
$help = Help_topic::where('id','=',$helptopic)->first();
$form_data = null;
//create user
if ($this->create_user($email, $fullname, $subject, $body, $phone, $helptopic, $sla, $priority, $source, $headers, $help->department, $assignto)) {
if ($this->create_user($email, $fullname, $subject, $body, $phone, $helptopic, $sla, $priority, $source, $headers, $help->department, $assignto, $form_data)) {
return Redirect('newticket')->with('success', 'Ticket created successfully!');
} else {
return Redirect('newticket')->with('fails', 'fails');
@@ -399,7 +402,7 @@ class TicketController extends Controller {
* @param type $system
* @return type bool
*/
public function create_user($emailadd, $username, $subject, $body, $phone, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto) {
public function create_user($emailadd, $username, $subject, $body, $phone, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $from_data) {
// define global variables
// dd($source);
$email;
@@ -436,7 +439,7 @@ class TicketController extends Controller {
$username = $checkemail->username;
$user_id = $checkemail->id;
}
$ticket_number = $this->check_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto);
$ticket_number = $this->check_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $from_data);
$ticket_number2 = $ticket_number[0];
$ticketdata = Tickets::where('ticket_number','=',$ticket_number2)->first();
$threaddata = Ticket_Thread::where('ticket_id','=',$ticketdata->id)->first();
@@ -450,9 +453,23 @@ class TicketController extends Controller {
if($is_reply == 0)
{
$mail = "Admin_mail";
Mail::send('emails.Ticket_Create', ['name' => $username, 'ticket_number' => $ticket_number2, 'from'=>$company, 'system' => $system], function ($message) use ($emailadd, $username, $ticket_number2, $updated_subject) {
$message->to($emailadd, $username)->subject($updated_subject);
});
if(Auth::user()) {
$sign = Auth::user()->agent_sign;
} else {
$sign = $company;
}
if($source == 3) {
Mail::send('emails.Ticket_Create', ['sign'=>$sign, 'content' => $body, 'name' => $username, 'ticket_number' => $ticket_number2, 'system' => $system], function ($message) use ($emailadd, $username, $ticket_number2, $updated_subject) {
$message->to($emailadd, $username)->subject($updated_subject);
});
} else {
$body2 = null;
Mail::send('emails.Ticket_Create', ['sign'=>$sign, 'content' => $body2, 'name' => $username, 'ticket_number' => $ticket_number2, 'system' => $system], function ($message) use ($emailadd, $username, $ticket_number2, $updated_subject) {
$message->to($emailadd, $username)->subject($updated_subject);
});
}
}
else
{
@@ -529,7 +546,7 @@ class TicketController extends Controller {
* @param type $priority
* @return type string
*/
public function check_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto) {
public function check_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $form_data) {
// $read_ticket_number = substr($subject, 0, 6);
$read_ticket_number = explode('[#',$subject);
if(isset($read_ticket_number[1]))
@@ -577,11 +594,11 @@ class TicketController extends Controller {
}
}
} else {
$ticket_number = $this->create_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto);
$ticket_number = $this->create_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $form_data);
return array($ticket_number,0);
}
} else {
$ticket_number = $this->create_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto);
$ticket_number = $this->create_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $form_data);
return array($ticket_number,0);
}
}
@@ -596,7 +613,7 @@ class TicketController extends Controller {
* @param type $priority
* @return type string
*/
public function create_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto) {
public function create_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $form_data) {
$max_number = Tickets::whereRaw('id = (select max(`id`) from tickets)')->first();
if($max_number == null)
{
@@ -621,6 +638,27 @@ class TicketController extends Controller {
$ticket->save();
$ticket_number = $ticket->ticket_number;
$id = $ticket->id;
// store Form Data
// Form Data comes from raising a ticket from client panel
// dd($helptopic);
if($form_data != null) {
$help_topic = Help_topic::where('id', '=', $helptopic)->first();
$forms = Fields::where('forms_id', '=', $help_topic->custom_form)->get();
foreach($form_data as $key=>$form_details) {
foreach($forms as $from) {
if($from->name == $key) {
$form_value = new Ticket_Form_Data;
$form_value->ticket_id = $id;
$form_value->title = $from->label;
$form_value->content = $form_details;
$form_value->save();
}
}
}
}
// store collaborators
$this->store_collaborators($headers, $id);
@@ -829,7 +867,7 @@ class TicketController extends Controller {
$master = Auth::user()->first_name . " " . Auth::user()->last_name;
if(Alert::first()->internal_status == 1 || Alert::first()->internal_assigned_agent == 1) {
// ticket assigned send mail
Mail::send('emails.Ticket_assign', ['agent' => $agent, 'ticket_number' => $ticket_number, 'from'=>$company, 'master' => $master, 'system' => $system], function ($message) use ($agent_email, $agent, $ticket_number) {
Mail::send('emails.Ticket_assign', ['agent' => $agent, 'ticket_number' => $ticket_number, 'from'=>$company, 'master' => $master, 'system' => $system], function ($message) use ($agent_email, $agent, $ticket_number, $ticket_subject) {
$message->to($agent_email, $agent)->subject($ticket_subject.'[#' . $ticket_number . ']');
});
}
@@ -1183,11 +1221,11 @@ class TicketController extends Controller {
}
}
if($value == "Delete"){
return redirect()->back()->with('success',' Moved to trash');
return redirect()->back()->with('success','Moved to trash');
} elseif($value == "Close") {
return redirect()->back()->with('success',' Tickets has been Closed');
return redirect()->back()->with('success','Tickets has been Closed');
} elseif($value == "Open") {
return redirect()->back()->with('success',' Ticket has been Opened');
return redirect()->back()->with('success','Ticket has been Opened');
}
}
return redirect()->back()->with('fails','None Selected!');

View File

@@ -262,7 +262,7 @@ class UserController extends Controller {
$user->save();
return redirect('profile-edit')->with('success1', 'Password Updated sucessfully');
} else {
return redirect('profile-edit')->with('fails1', 'Password was not Updated');
return redirect('profile-edit')->with('fails1', 'Password was not Updated. Incorrect old password');
}
}

View File

@@ -1,9 +1,17 @@
<?php namespace App\Http\Controllers\Auth;
// classes
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Auth\PasswordBroker;
use Illuminate\Foundation\Auth\ResetsPasswords;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use App\User;
use App\Http\Controllers\Common\SettingsController;
/**
* PasswordController
@@ -27,6 +35,19 @@ class PasswordController extends Controller {
$this->auth = $auth;
$this->passwords = $passwords;
$this->middleware('guest');
\App\Http\Controllers\Common\SettingsController::smtp();
SettingsController::smtp();
}
/**
* Display the form to request a password reset link.
*
* @return Response
*/
public function getEmail()
{
return view('auth.password');
}
}

View File

@@ -0,0 +1,85 @@
<?php namespace App\Http\Controllers\Client\helpdesk;
// controllers
use App\Http\Controllers\Controller;
use App\Http\Controllers\Agent\helpdesk\TicketController;
use App\Http\Controllers\Common\SettingsController;
// requests
use Illuminate\Http\Request;
use App\Http\Requests\helpdesk\CreateTicketRequest;
use App\Http\Requests\helpdesk\TicketRequest;
use App\Http\Requests\helpdesk\TicketEditRequest;
// models
use App\Model\helpdesk\Email\Banlist;
use App\Model\helpdesk\Ticket\Tickets;
use App\Model\helpdesk\Ticket\Ticket_attachments;
use App\Model\helpdesk\Ticket\Ticket_Collaborator;
use App\Model\helpdesk\Ticket\Ticket_Thread;
use App\Model\helpdesk\Settings\Company;
use App\Model\helpdesk\Settings\System;
use App\Model\helpdesk\Settings\Alert;
use App\Model\helpdesk\Ticket\Ticket_Status;
use App\Model\helpdesk\Email\Emails;
use App\Model\helpdesk\Agent\Department;
use App\User;
// classes
use Auth;
use Hash;
use Input;
use Mail;
use PDF;
/**
* TicketController2
*
* @package Controllers
* @subpackage Controller
* @author Ladybird <info@ladybirdweb.com>
*/
class ClientTicketController extends Controller {
/**
* Create a new controller instance.
* @return type response
*/
public function __construct() {
SettingsController::smtp();
// $this->middleware('auth');
// $this->middleware('role.user');
}
/**
* Get Checked ticket
* @param type Tickets $ticket
* @param type User $user
* @return type response
*/
public function getCheckTicket(Tickets $ticket, User $user) {
return view('themes.default1.client.helpdesk.guest-user.newticket', compact('ticket'));
}
/**
* reply
* @param type $value
* @return type view
*/
public function reply($id, Request $request) {
$comment = $request->input('comment');
if($comment != null) {
$tickets = Tickets::where('id','=',$id)->first();
$threads = new Ticket_Thread;
$threads->user_id = Auth::user()->id;
$threads->ticket_id = $tickets->id;
$threads->poster = "client";
$threads->body = $comment;
$threads->save();
return \Redirect::back()->with('success1','Successfully replied');
} else {
return \Redirect::back()->with('fails1','Please fill some data!');
}
}
}

View File

@@ -0,0 +1,198 @@
<?php namespace App\Http\Controllers\Client\helpdesk;
// controllers
use App\Http\Controllers\Controller;
use App\Http\Controllers\Agent\helpdesk\TicketController;
use App\Http\Controllers\Common\SettingsController;
// requests
use Illuminate\Http\Request;
use App\Http\Requests\helpdesk\ClientRequest;
// models
/* include help topic model */
use App\Model\helpdesk\Form\Form_details;
/* Include form_name model */
use App\Model\helpdesk\Form\Form_name;
/* include form_detals model */
/* Include form_value model */
use App\Model\helpdesk\Manage\Help_topic;
use App\Model\helpdesk\Settings\Company;
/* Validate form TicketForm using */
use App\Model\helpdesk\Ticket\Tickets;
use App\Model\helpdesk\Ticket\Ticket_Thread;
use App\Model\helpdesk\Settings\System;
use App\Model\helpdesk\Settings\Ticket;
use App\Model\helpdesk\Agent\Department;
use App\Model\helpdesk\Ticket\Ticket_source;
use App\User;
// classes
use Form;
use Input;
use Mail;
use Hash;
use Redirect;
use Config;
use DateTime;
use DateTimeZone;
use App\Model\helpdesk\Form\Fields;
use App\Model\helpdesk\Form\Form_value;
/**
* FormController
*
* @package Controllers
* @subpackage Controller
* @author Ladybird <info@ladybirdweb.com>
*/
class FormController extends Controller {
public function __construct(TicketController $TicketController) {
SettingsController::smtp();
$this->TicketController = $TicketController;
}
// /**
// * This Function to get the form for the ticket
// * @param type Form_name $name
// * @param type Form_details $details
// * @param type Help_topic $topics
// * @return type Response
// */
// public function getForm() {
// if(Config::get('database.install') == '%0%') {
// return Redirect::route('license');
// }
// if(System::first()->status == 1) {
// return view('themes.default1.client.helpdesk.guest-user.form');
// } else {
// return "hello";
// }
// }
/**
* getform
* @param type Help_topic $topic
* @return type
*/
public function getForm(Help_topic $topic) {
if(\Config::get('database.install') == '%0%') {
return \Redirect::route('license');
}
if(System::first()->status == 1) {
$topics = $topic->get();
return view('themes.default1.client.helpdesk.form', compact('topics'));
} else {
return \Redirect::route('home');
}
}
/**
* This Function to post the form for the ticket
* @param type Form_name $name
* @param type Form_details $details
* @return type string
*/
public function postForm($id,Form_name $name, Form_details $details, Help_topic $topic) {
// dd($id);
if($id != 0 ){
$helptopic = $topic->where('id', '=', $id)->first();
$custom_form = $helptopic->custom_form;
$values = Fields::where('forms_id', '=', $custom_form)->get();
if(!$values) {
} if($values) {
foreach($values as $value){
if($value->type == "select") {
$data = $value->value;
$value = explode(',', $data);
echo '<select class="form-control">';
foreach($value as $option){
echo '<option>'.$option.'</option>';
}
echo '</select></br>';
} elseif ($value->type == "radio" ) {
$type2 = $value->value;
$val = explode(',', $type2);
echo '<label class="radio-inline">'.$value->label.'</label>&nbsp&nbsp&nbsp<input type="'.$value->type.'" name="'.$value->name.'">&nbsp;&nbsp;'.$val[0].'
&nbsp&nbsp&nbsp<input type="'.$value->type.'" name="'.$value->name.'">&nbsp;&nbsp;'.$val[1].'</br>';
} elseif($value->type == "textarea" ) {
$type3 = $value->value;
$v = explode(',', $type3);
//dd($v);
if(array_key_exists(1, $v)){
echo '<label>'.$value->label.'</label></br><textarea class=form-control rows="'.$v[0].'" cols="'.$v[1].'"></textarea></br>';
} else {
echo '<label>'.$value->label.'</label></br><textarea class=form-control rows="10" cols="60"></textarea></br>';
}
} elseif($value->type == "checkbox" ) {
$type4 = $value->value;
$check = explode(',', $type4);
echo '<label class="radio-inline">'.$value->label.'&nbsp&nbsp&nbsp<input type="'.$value->type.'" name="'.$value->name.'">&nbsp&nbsp'.$check[0].'</label><label class="radio-inline"><input type="'.$value->type.'" name="'.$value->name.'">&nbsp&nbsp'.$check[1].'</label></br>';
} else {
echo '<label>'.$value->label.'</label><input type="'.$value->type.'" class="form-control" name="'.$value->name.'" /></br>';
}
}
}
} else {
return null;
}
}
/**
* Posted form
* @param type Request $request
* @param type User $user
*/
public function postedForm(User $user, ClientRequest $request, Ticket $ticket_settings, Ticket_source $ticket_source) {
$form_extras = $request->except('Name','Phone','Email','Subject','Details','helptopic','_wysihtml5_mode','_token');
$name = $request->input('Name');
$phone = $request->input('Phone');
$email = $request->input('Email');
$subject = $request->input('Subject');
$details = $request->input('Details');
$System = System::where('id','=',1)->first();
$departments = Department::where('id','=',$System->department)->first();
$department = $departments->id;
$status = $ticket_settings->first()->status;
$helptopic = $ticket_settings->first()->help_topic;
$sla = $ticket_settings->first()->sla;
$priority = $ticket_settings->first()->priority;
$source = $ticket_source->where('name','=','web')->first();
$collaborator = null;
if($this->TicketController->create_user($email, $name, $subject, $details, $phone, $helptopic, $sla, $priority, $source->id, $collaborator, $department,$assignto = "", $form_extras)) {
return Redirect::route('guest.getform')->with('success','Ticket Created Successfully');
}
}
/**
* reply
* @param type $value
* @return type view
*/
public function post_ticket_reply($id, Request $request) {
$comment = $request->input('comment');
if($comment != null) {
$tickets = Tickets::where('id','=',$id)->first();
$threads = new Ticket_Thread;
$threads->user_id = $tickets->user_id;
$threads->ticket_id = $tickets->id;
$threads->poster = "client";
$threads->body = $comment;
$threads->save();
return \Redirect::back()->with('success1','Successfully replied');
} else {
return \Redirect::back()->with('fails1','Please fill some data!');
}
}
}

View File

@@ -34,7 +34,7 @@ class GuestController extends Controller {
*/
public function __construct() {
SettingsController::smtp();
// $this->middleware('auth');
$this->middleware('auth');
// $this->middleware('role.user');
}
@@ -53,9 +53,9 @@ class GuestController extends Controller {
* @param type ProfileRequest $request
* @return type Response
*/
public function postProfile($id, ProfileRequest $request) {
$user = Auth::user();
$user->gender = $request->input('gender');
public function postProfile(ProfileRequest $request) {
$user = User::where('id','=',Auth::user()->id)->first();
$user->gender = $request->get('gender');
$user->save();
if ($user->profile_pic == 'avatar5.png' || $user->profile_pic == 'avatar2.png') {
if ($request->input('gender') == 1) {
@@ -78,10 +78,10 @@ class GuestController extends Controller {
$user->profile_pic = $fileName;
} else {
$user->fill($request->except('profile_pic', 'gender'))->save();
return redirect('guest')->with('success', 'Profile Updated sucessfully');
return redirect()->back()->with('success1', 'Profile Updated sucessfully');
}
if ($user->fill($request->except('profile_pic'))->save()) {
return redirect('guest')->with('success', 'Profile Updated sucessfully');
return redirect()->back()->with('success1', 'Profile Updated sucessfully');
}
}
@@ -155,15 +155,15 @@ class GuestController extends Controller {
* @param type ProfilePassword $request
* @return type Response
*/
public function postProfilePassword($id, ProfilePassword $request) {
public function postProfilePassword(ProfilePassword $request) {
$user = Auth::user();
//echo $user->password;
if (Hash::check($request->input('old_password'), $user->getAuthPassword())) {
$user->password = Hash::make($request->input('new_password'));
$user->save();
return redirect('guest')->with('success', 'Password Updated sucessfully');
return redirect()->back()->with('success2', 'Password Updated sucessfully');
} else {
return redirect('guest')->with('fails', 'Password was not Updated');
return redirect()->back()->with('fails2', 'Password was not Updated. Incorrect old password');
}
}
@@ -236,8 +236,8 @@ class GuestController extends Controller {
$message->to($user->email, $username)->subject('Ticket link Request ['.$Ticket_number.']');
}
);
return \Redirect::route('account-forgot-password')
->with('success','We have sent you a new password by Email');
return \Redirect::back()
->with('success','We have sent you a link by Email. Please click on that link to view ticket');
}
}
}

View File

@@ -393,6 +393,14 @@ class InstallController extends Controller {
$datacontent = File::get($install);
$datacontent = str_replace('%0%', $value, $datacontent);
File::put($install, $datacontent);
$smtpfilepath = "\App\Http\Controllers\Common\SettingsController::smtp()";
$path22 = app_path('Http\routes.php');
$content23 = File::get($path22);
$content23 = str_replace('"%smtplink%"', $smtpfilepath, $content23);
File::put($path22, $content23);
try {
return View::make('themes/default1/installer/helpdesk/view7');
} catch (Exception $e) {

View File

@@ -0,0 +1,33 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* AgentRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
class CannedRequest extends Request {
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize() {
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules() {
return [
'title' => 'required',
'message' => 'required',
];
}
}

View File

@@ -0,0 +1,33 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* AgentRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
class CannedUpdateRequest extends Request {
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize() {
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules() {
return [
'title' => 'required',
'message' => 'required',
];
}
}

View File

@@ -27,7 +27,7 @@ class HelptopicRequest extends Request {
return [
'topic' => 'required|unique:help_topic',
// 'parent_topic' => 'required',
'custom_form' => 'required',
// 'custom_form' => 'required',
'department' => 'required',
'priority' => 'required',
'sla_plan' => 'required',

View File

@@ -26,7 +26,7 @@ class HelptopicUpdate extends Request {
public function rules() {
return [
// 'parent_topic' => 'required',
'custom_form' => 'required',
// 'custom_form' => 'required',
'department' => 'required',
'priority' => 'required',
'sla_plan' => 'required',

View File

@@ -1,5 +1,5 @@
<?php
"%smtplink%";
/*
|--------------------------------------------------------------------------
| Application Routes
@@ -20,7 +20,6 @@ Route::controllers([
]);
// Route::get('login','Auth\AuthController@getLogin');
$router->get('getmail/{token}', 'Auth\AuthController@getMail');
/*
@@ -28,7 +27,6 @@ $router->get('getmail/{token}', 'Auth\AuthController@getMail');
|Admin Routes
|-------------------------------------------------------------------------------
| Here is defining entire routes for the Admin Panel
|
|
*/
@@ -59,7 +57,10 @@ Route::group(['middleware' => 'roles', 'middleware' => 'auth'], function () {
Route::resource('sla', 'Admin\helpdesk\SlaController'); // in SLA Plan module, for CRUD
Route::resource('form', 'Admin\helpdesk\FormController'); // in Form module, for CRUD
Route::resource('forms','Admin\helpdesk\FormController');
Route::get('delete-forms/{id}',['as'=>'forms.delete','uses'=>'Admin\helpdesk\FormController@delete']);
//$router->model('id','getcompany');
Route::get('agent-profile-page/{id}',['as'=>'agent.profile.page','uses'=>'Admin\helpdesk\AgentController@agent_profile']);
@@ -181,6 +182,27 @@ Route::group(['middleware' => 'role.agent', 'middleware' => 'auth'], function ()
/* Profile Password Post */
Route::patch('agent-profile-password/{id}', 'Agent\helpdesk\UserController@postProfilePassword');
/* Canned list */
Route::get('canned/list',['as'=>'canned.list','uses'=>'Agent\helpdesk\CannedController@index']);
/* Canned create */
Route::get('canned/create',['as'=>'canned.create','uses'=>'Agent\helpdesk\CannedController@create']);
/* Canned store */
Route::patch('canned/store',['as'=>'canned.store','uses'=>'Agent\helpdesk\CannedController@store']);
/* Canned edit */
Route::get('canned/edit/{id}',['as'=>'canned.edit','uses'=>'Agent\helpdesk\CannedController@edit']);
/* Canned update */
Route::patch('canned/update/{id}',['as'=>'canned.update','uses'=>'Agent\helpdesk\CannedController@update']);
/* Canned show */
Route::get('canned/show/{id}',['as'=>'canned.show','uses'=>'Agent\helpdesk\CannedController@show']);
/* Canned delete */
Route::delete('canned/destroy/{id}',['as'=>'canned.destroy','uses'=>'Agent\helpdesk\CannedController@destroy']);
// Route::get('/abcd', 'GuestController@getList');
// Route::get('/qwer', ['as' => 'thread', 'uses' => 'GuestController@getThread']);
@@ -281,9 +303,9 @@ Route::group(['middleware' => 'role.agent', 'middleware' => 'auth'], function ()
Route::post('select_all', ['as'=>'select_all' ,'uses'=>'Agent\helpdesk\TicketController@select_all']);
Route::post('canned/{id}', 'MessageController@show');
Route::post('canned/{id}', 'Agent\helpdesk\CannedController@get_canned');
Route::get('message' , 'MessageController@show');
// Route::get('message' , 'MessageController@show');
Route::post('lock',['as'=>'lock' , 'uses'=>'Agent\helpdesk\TicketController@lock']);
@@ -344,7 +366,7 @@ Route::any('getdata', function() {
Route::get('/', ['as'=>'/', 'uses'=>'Client\helpdesk\WelcomepageController@index']);
//getform
Route::get('form',['as'=>'form','uses'=>'Client\helpdesk\GuestController@getForm']);
Route::get('form',['as'=>'form','uses'=>'Client\helpdesk\FormController@getForm']);
//detail ticket information
Route::get('mytickets/{id}', ['as' => 'ticketinfo', 'uses' => 'Client\helpdesk\GuestController@singleThread']);
//ticket ckeck
@@ -356,7 +378,7 @@ Route::any('getdata', function() {
//===================================================================================
Route::group(['middleware' => 'role.user', 'middleware' => 'auth'], function () {
/* User profile get */
Route::get('client-profile', 'Client\helpdesk\GuestController@getProfile');
Route::get('client-profile', ['as'=>'client.profile', 'uses'=>'Client\helpdesk\GuestController@getProfile']);
Route::get('mytickets', ['as' => 'ticket2', 'uses' => 'Client\helpdesk\GuestController@getMyticket']);
/* Get my tickets */
Route::get('myticket/{id}', ['as' => 'ticket', 'uses' => 'Client\helpdesk\GuestController@thread']);
@@ -364,11 +386,13 @@ Route::group(['middleware' => 'role.user', 'middleware' => 'auth'], function ()
Route::patch('client-profile-edit', 'Client\helpdesk\GuestController@postProfile');
/* Profile Password Post */
Route::patch('client-profile-password', 'Client\helpdesk\GuestController@postProfilePassword');
Route::post('post/reply/{id}',['as'=>'client.reply','uses'=>'Client\helpdesk\ClientTicketController@reply']);
});
//====================================================================================
/* Check your Ticket */
Route::get('checkticket', 'Client\helpdesk\GuestController@getCheckTicket');
Route::get('checkticket', 'Client\helpdesk\ClientTicketController@getCheckTicket');
/* Get my tickets */
Route::get('myticket', ['as' => 'ticket', 'uses' => 'Client\helpdesk\GuestController@getMyticket']);
/* Get my tickets */
@@ -377,6 +401,9 @@ Route::get('myticket/{id}', ['as' => 'ticket', 'uses' => 'Client\helpdesk\GuestC
Route::post('postcheck', 'Client\helpdesk\GuestController@PostCheckTicket');
Route::get('postcheck', 'Client\helpdesk\GuestController@PostCheckTicket');
Route::post('post-ticket-reply/{id}', 'Client\helpdesk\FormController@post_ticket_reply');
/* 404 page */
Route::get('404', 'error\ErrorController@error404');
@@ -490,4 +517,4 @@ Route::get('testmail',function(){
});
// Route::get('smp','HomeController@getsmtp');
// Route::get('smp','HomeController@getsmtp');

Some files were not shown because too many files have changed in this diff Show More