-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `ticketing`

CREATE DATABASE IF NOT EXISTS `ticketing`
  DEFAULT CHARACTER SET utf8mb4
  COLLATE utf8mb4_unicode_ci;

USE `ticketing`;



-- --------------------------------------------------------

--
-- Table structure for table `attachments`
--

CREATE TABLE `attachments` (
  `id` int(11) NOT NULL,
  `ticket_id` varchar(255) DEFAULT NULL,
  `comment_id` int(11) DEFAULT NULL,
  `filename` varchar(255) NOT NULL,
  `path` varchar(255) NOT NULL,
  `mime_type` varchar(255) DEFAULT NULL,
  `size` int(11) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `uploaded_by_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `attachments`
--

INSERT INTO `attachments` (`id`, `ticket_id`, `comment_id`, `filename`, `path`, `mime_type`, `size`, `created_at`, `updated_at`, `uploaded_by_id`) VALUES
(2, 'TKT-1778850537-2XNEBT', NULL, 'g3.png', 'storage/uploads/idSA3g8qU7Gj29RWMAv4MjHefNkQOGq3X0JZYkID.png', 'image/png', 3248, '2026-05-15 13:08:56', '2026-05-15 13:08:57', 1);

-- --------------------------------------------------------

--
-- Table structure for table `comments`
--

CREATE TABLE `comments` (
  `id` int(11) NOT NULL,
  `ticket_id` varchar(255) NOT NULL,
  `author_id` int(11) NOT NULL,
  `content` longtext NOT NULL,
  `is_internal` int(11) NOT NULL DEFAULT 0,
  `is_first_response` int(11) NOT NULL DEFAULT 0,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `comments`
--

INSERT INTO `comments` (`id`, `ticket_id`, `author_id`, `content`, `is_internal`, `is_first_response`, `created_at`, `updated_at`) VALUES
(35, 'TKT-1776082489-RO01LI', 4, 'Status changed from open to in-progress', 0, 0, '2026-04-13 12:18:16', '2026-04-13 12:18:16'),
(36, 'TKT-1777367015-GLUFES', 4, 'Status changed from open to in-progress', 0, 0, '2026-04-28 10:12:59', '2026-04-28 10:12:59'),
(37, 'TKT-1777367015-GLUFES', 4, 'Status changed from in-progress to waiting-customer', 0, 0, '2026-04-29 10:30:47', '2026-04-29 10:30:47'),
(38, 'TKT-1777367015-GLUFES', 4, 'Thank you for your patience.\n\nWe’ve now implemented an update to address the issue you reported. Please go ahead and test it on your end and let us know if everything is working as expected.\n\nIf you’re still experiencing any problems or notice anything unusual, feel free to reach out and we’ll assist you further.\n\nWe appreciate your cooperation.', 0, 0, '2026-04-29 10:30:55', '2026-04-29 10:30:55'),
(39, 'TKT-1777366839-DRTQAN', 4, 'Thank you for bringing this to our attention.\n\nWe’ve reviewed the orders (IDs: 3192, 3121, 3181, 4381, 4643, 3283) and can confirm that this behavior is intentional. Bump orders in the CRM are not designed to be updated to “Delivered” through standard user access.\n\nOnly users with the **Delivery Manager role** have the permission to update these orders to “Delivered,” as part of the system’s workflow and control structure.\n\nPlease let us know if you’d like further clarification or assistance with this process.', 0, 1, '2026-04-29 10:46:22', '2026-04-29 10:46:22'),
(40, 'TKT-1777366839-DRTQAN', 4, 'Status changed from open to waiting-internal', 0, 0, '2026-04-29 10:46:42', '2026-04-29 10:46:42'),
(41, 'TKT-1777366839-DRTQAN', 4, 'Status changed from waiting-internal to waiting-customer', 0, 0, '2026-04-29 10:48:36', '2026-04-29 10:48:36'),
(42, 'TKT-1777366533-XYUC83', 4, 'Thank you for bringing this to our attention.\n\nWe’ve reviewed the issue, and the necessary permissions have now been granted. The Logistics Manager should now be able to access the module and create waybills without any restrictions.\n\nPlease go ahead and try again, and let us know if the issue persists or if you encounter any further difficulties.', 0, 1, '2026-04-29 10:49:30', '2026-04-29 10:49:30'),
(43, 'TKT-1777366533-XYUC83', 4, 'Status changed from open to waiting-customer', 0, 0, '2026-04-29 10:49:36', '2026-04-29 10:49:36'),
(44, 'TKT-1777367015-GLUFES', 12, 'Thank you for the quick response to treat the speed issue, though we have observed an increase in speed but preferably we request that you still work on it to get it more faster. Thank you as we await a more speedy result.', 0, 0, '2026-04-29 10:55:24', '2026-04-29 10:55:24'),
(45, 'TKT-1777366269-KILF2H', 4, 'Thank you for bringing this to our attention.\n\nThe issue with the Sales Dashboard has now been resolved. Please go ahead and check on your endt the data should now be displaying correctly.\n\nIf you notice anything unusual or still encounter any issues, feel free to let us know and we’ll assist you further.', 0, 1, '2026-04-29 10:57:02', '2026-04-29 10:57:02'),
(46, 'TKT-1777366269-KILF2H', 4, 'Status changed from open to waiting-customer', 0, 0, '2026-04-29 10:57:10', '2026-04-29 10:57:10'),
(47, 'TKT-1777366269-KILF2H', 12, 'Thank you for your swift response, the issue with the sales Dashboard has now been fully resolved and working perfectly.', 0, 0, '2026-04-29 13:31:57', '2026-04-29 13:31:57'),
(48, 'TKT-1777366839-DRTQAN', 12, 'The issue with tagging Bump orders still persist with users using the Delivery manager role access on the CRM, please look into it', 0, 0, '2026-04-29 13:38:54', '2026-04-29 13:38:54'),
(49, 'TKT-1777366533-XYUC83', 12, 'Thank you, the waybill initiating issue has been resolved', 0, 0, '2026-04-29 13:45:02', '2026-04-29 13:45:02'),
(50, 'TKT-1777366533-XYUC83', 4, 'Status changed from waiting-customer to resolved', 0, 0, '2026-04-29 15:19:41', '2026-04-29 15:19:41'),
(51, 'TKT-1777366839-DRTQAN', 12, 'I just detected the issue, when an order comes as a bump e.g main: vision revive tea 1\nBump: Vision revive tea 4 \n\nIf the customer ends up taking 1 pack, it cannot be tagged because none of the  value can be 0.\n\nError message is usually value must be greater than or equal to 1', 0, 0, '2026-04-30 11:43:00', '2026-04-30 11:43:00'),
(52, 'TKT-1777365689-FRW9BH', 4, 'Hi, this has been implemented.\n\nWe now have an activity/status column that shows updates like “UPDATED BY [Delivery Manager]” whenever an order status is changed (e.g., to delivered).\n\nA filter has also been added, allowing you to view orders updated by specific delivery managers.\n\nAdditionally, on both the Operations Manager Dashboard and MD’s Dashboard, there is now a section that displays the total number of deliveries updated by each delivery manager, with an option to filter by date range.', 0, 1, '2026-04-30 16:03:45', '2026-04-30 16:03:45'),
(53, 'TKT-1777365689-FRW9BH', 4, 'Status changed from in-progress to waiting-customer', 0, 0, '2026-04-30 16:03:57', '2026-04-30 16:03:57'),
(54, 'TKT-1777365689-FRW9BH', 4, 'Status changed from waiting-customer to resolved', 0, 0, '2026-04-30 16:04:06', '2026-04-30 16:04:06'),
(55, 'TKT-1777472812-W3KFH6', 4, 'Hi, this has been resolved.\n\nWaybills initiated by the Logistics Manager are now visible on the Operations Manager profile as expected. Please confirm from your end.', 0, 1, '2026-05-01 08:39:39', '2026-05-01 08:39:39'),
(56, 'TKT-1777472812-W3KFH6', 4, 'Status changed from in-progress to waiting-customer', 0, 0, '2026-05-01 08:39:46', '2026-05-01 08:39:46'),
(57, 'TKT-1777366839-DRTQAN', 4, 'Hi, I’ve identified and resolved the issue.\n\nThe problem was caused by the validation rule requiring all values to be at least 1, which affected bump orders when quantities were reduced. This has now been adjusted, so orders can be properly tagged even when one of the values becomes 0.\n\nPlease test from your end and confirm.', 0, 0, '2026-05-01 09:00:59', '2026-05-01 09:00:59'),
(58, 'TKT-1777366839-DRTQAN', 4, 'Status changed from waiting-internal to waiting-customer', 0, 0, '2026-05-01 09:01:09', '2026-05-01 09:01:09'),
(59, 'TKT-1777472812-W3KFH6', 12, 'Hello, it is still showing no waybill records on my end.', 0, 0, '2026-05-01 12:40:35', '2026-05-01 12:40:35'),
(60, 'TKT-1777366839-DRTQAN', 12, 'Thank you, it has been resolved', 0, 0, '2026-05-01 12:41:40', '2026-05-01 12:41:40'),
(61, 'TKT-1777366839-DRTQAN', 4, 'Status changed from waiting-customer to resolved', 0, 0, '2026-05-01 12:49:36', '2026-05-01 12:49:36'),
(62, 'TKT-1777472812-W3KFH6', 4, 'Hello, thanks for the feedback.\n\nWe’ve rechecked the issue and made adjustments. Waybill records should now be visible on your end. Kindly refresh and confirm.', 0, 0, '2026-05-01 12:57:24', '2026-05-01 12:57:24'),
(63, 'TKT-1777472812-W3KFH6', 12, 'The issue persist. Still not seeing waybill records', 0, 0, '2026-05-01 15:46:05', '2026-05-01 15:46:05'),
(64, 'TKT-1777472812-W3KFH6', 12, 'Hi, this is a follow up to remind you to work on it, waybill records are still not visible to me', 0, 0, '2026-05-03 08:28:50', '2026-05-03 08:28:50'),
(65, 'TKT-1777472812-W3KFH6', 12, 'Also take note that on my general dashboard I can see the waybill count: that is total waybills the logistics manager has initiated.\r\n\r\nWhat I most interested in is to be able to see the waybills he has done, Individually on the waybill management section', 0, 0, '2026-05-03 08:43:37', '2026-05-03 08:43:37'),
(66, 'TKT-1777472812-W3KFH6', 4, 'Noted, thank you for the clarification.\r\n\r\nThe issue has now been resolved. You should be able to view the waybills initiated by the Logistics Manager individually within the waybill management section.\r\n\r\nKindly check and confirm from your end.', 0, 0, '2026-05-04 08:42:57', '2026-05-04 08:42:57'),
(67, 'TKT-1777472812-W3KFH6', 12, 'Seen. I can see the populated list of waybills INITIATED.\r\nBut\r\n 1. I noticed the list is continuously populated without splitting into pages, please work on this, this can help to give the logistics manager how many total he has initiated on this section also.\r\n\r\n2. No option to input total quantity of DAMAGE product when updating to received/delivered \r\n\r\n3. No provision to input total quantity of excess received.\r\n\r\n4. No provision to input total quantity of shortages.\r\n\r\n5. No provision to input missing waybill/product.\r\n\r\n6. I noticed the filter is not effective on pending orders, because when I did for pending orders it brought out no record even though we actually have.\r\n\r\nAlso on my OPERATIONS MANAGER DASHBOARD and MD\'S DASHBOARD there should be a section displaying total quantity of shortages, excess, damaged, missing waybill or product.\r\nTotal pending/in transit waybills.\r\n\r\nThis will help me checkmate whatever the logistics manager is doing.\r\n\r\n\r\nAlso let me know if I should log this in a different ticket if it is to be treated as a different issue entirely. Thank you', 0, 0, '2026-05-04 11:54:12', '2026-05-04 11:54:12'),
(68, 'TKT-1777472812-W3KFH6', 4, 'Status changed from waiting-customer to resolved', 0, 0, '2026-05-04 12:02:53', '2026-05-04 12:02:53'),
(69, 'TKT-1777472812-W3KFH6', 4, 'Noted, thank you for the detailed feedback.\r\n\r\nThe previous issue has been resolved. Kindly create a new ticket for these new items so they can be properly tracked and addressed.\r\n\r\nWe’ll take it up once the new ticket is created.', 0, 0, '2026-05-04 12:03:15', '2026-05-04 12:03:15'),
(70, 'TKT-1777365689-FRW9BH', 4, 'Status changed from resolved to closed', 0, 0, '2026-05-04 12:03:53', '2026-05-04 12:03:53'),
(71, 'TKT-1777366269-KILF2H', 4, 'Status changed from resolved to closed', 0, 0, '2026-05-04 12:04:29', '2026-05-04 12:04:29'),
(72, 'TKT-1777366533-XYUC83', 4, 'Status changed from resolved to closed', 0, 0, '2026-05-04 12:05:07', '2026-05-04 12:05:07'),
(73, 'TKT-1777366839-DRTQAN', 4, 'Status changed from resolved to closed', 0, 0, '2026-05-04 12:05:28', '2026-05-04 12:05:28'),
(74, 'TKT-1777367015-GLUFES', 4, 'Status changed from resolved to closed', 0, 0, '2026-05-04 12:05:56', '2026-05-04 12:05:56'),
(75, 'TKT-1777904191-DX28SZ', 4, 'Status changed from open to in-progress', 0, 0, '2026-05-04 15:37:46', '2026-05-04 15:37:46'),
(76, 'TKT-1777903055-A01MRP', 4, 'Status changed from open to in-progress', 0, 0, '2026-05-04 15:38:16', '2026-05-04 15:38:16'),
(77, 'TKT-1777903055-A01MRP', 4, 'Hello, this has been implemented.\r\n\r\nThe initiated waybill list has now been updated with pagination, and the total initiated waybills can now be properly tracked in that section.\r\n\r\nWe have also added provisions to capture damaged products, excess received, shortages, and missing waybill/product when updating waybills to received or delivered.\r\n\r\nThe pending orders filter has also been corrected and should now return the appropriate records.\r\n\r\nAdditionally, the Operations Manager Dashboard and MD’s Dashboard now include sections displaying totals for shortages, excess, damaged products, missing waybill/product, pending waybills, and in-transit waybills.\r\n\r\nKindly check from your end and confirm.', 0, 0, '2026-05-05 15:05:12', '2026-05-05 15:05:12'),
(78, 'TKT-1777903055-A01MRP', 4, 'Status changed from in-progress to waiting-customer', 0, 0, '2026-05-05 15:43:15', '2026-05-05 15:43:15'),
(79, 'TKT-1777903055-A01MRP', 12, 'I can now see shortages, excess and damage on my dashboard but there\'s still no provision for logistics manager to input that on his end... There are also new items added that\'s not supposed to be in the waybill management like sales order and delivery list.\r\nAlso logistics manager complained that after updating status to received or delivered the waybill status is not actually changing, new initiated waybill isn\'t reflecting.\r\n\r\nI uploaded a screen recording to show some of the things  I have mentioned.', 0, 0, '2026-05-06 08:56:17', '2026-05-06 08:56:17'),
(80, 'TKT-1777903055-A01MRP', 12, 'I can now see shortages, excess and damage on my dashboard but there\'s still no provision for logistics manager to input that on his end... There are also new items added that\'s not supposed to be in the waybill management like sales order and delivery list.\r\nAlso logistics manager complained that after updating status to received or delivered the waybill status is not actually changing, new initiated waybill isn\'t reflecting.\r\n\r\nI uploaded a screen recording to show some of the things  I have mentioned.', 0, 0, '2026-05-06 08:56:19', '2026-05-06 08:56:19'),
(81, 'TKT-1777903055-A01MRP', 12, 'I can now see shortages, excess and damage on my dashboard but there\'s still no provision for logistics manager to input that on his end... There are also new items added that\'s not supposed to be in the waybill management like sales order and delivery list.\r\nAlso logistics manager complained that after updating status to received or delivered the waybill status is not actually changing, new initiated waybill isn\'t reflecting.', 0, 0, '2026-05-06 08:56:20', '2026-05-06 08:56:20'),
(82, 'TKT-1777903055-A01MRP', 12, 'The file seems not to be going through', 0, 0, '2026-05-06 09:00:12', '2026-05-06 09:00:12'),
(83, 'TKT-1777903055-A01MRP', 12, 'Also the populated list \"Available delivery list\" should be removed', 0, 0, '2026-05-06 09:01:51', '2026-05-06 09:01:51'),
(84, 'TKT-1777903055-A01MRP', 4, 'Noted, thank you for the feedback.\r\n\r\nWe have seen the issues raised and will work on fixing them.', 0, 0, '2026-05-06 14:14:40', '2026-05-06 14:14:40'),
(85, 'TKT-1777903055-A01MRP', 4, 'Noted, thank you for the feedback.\r\n\r\nWe have seen the issues raised and will work on fixing them.', 0, 0, '2026-05-06 14:16:21', '2026-05-06 14:16:21'),
(86, 'TKT-1777904191-DX28SZ', 4, 'Hello, this has been resolved.\r\n\r\nA cross-sell section has now been added when Delivery Managers are updating an order to delivered.\r\n\r\nDelivery Managers can now add cross-sell products by entering the product, quantity, and price/amount during the delivery update process.\r\n\r\nThe cross-sell details will also be saved with the order record for proper tracking.\r\n\r\nKindly check from your end and confirm.', 0, 0, '2026-05-06 14:33:29', '2026-05-06 14:33:29'),
(87, 'TKT-1777904191-DX28SZ', 4, 'Status changed from in-progress to waiting-customer', 0, 0, '2026-05-06 14:33:48', '2026-05-06 14:33:48'),
(88, 'TKT-1777903055-A01MRP', 4, 'Hello, the “Available Delivery List” populated list has been removed and that issue has been resolved.\r\n\r\nFor the other issue regarding shortages, excess, damage input on the Logistics Manager’s end, waybill status not changing after update, and newly initiated waybills not reflecting, kindly create a new ticket for it so it can be properly tracked and handled separately.\r\n\r\nAlso, I’m currently unable to view the screen recording on my end, so please be patient while we review and address it once the new ticket is created.\r\n\r\nThank you.', 0, 0, '2026-05-06 14:45:18', '2026-05-06 14:45:18'),
(89, 'TKT-1777903055-A01MRP', 12, 'Okay noted', 0, 0, '2026-05-06 15:21:32', '2026-05-06 15:21:32'),
(90, 'TKT-1777472812-W3KFH6', 4, 'Status changed from resolved to closed', 0, 0, '2026-05-06 15:42:50', '2026-05-06 15:42:50'),
(91, 'TKT-1777903055-A01MRP', 4, 'Status changed from waiting-customer to resolved', 0, 0, '2026-05-06 15:43:27', '2026-05-06 15:43:27'),
(92, 'TKT-1777904191-DX28SZ', 12, 'Confirmed, but you used \'Add Upsell product\' instead of \'Add cross-sell product\' please rectify.', 0, 0, '2026-05-06 15:44:18', '2026-05-06 15:44:18'),
(93, 'TKT-1778081667-P9YKNZ', 4, 'Status changed from open to in-progress', 0, 0, '2026-05-06 15:45:50', '2026-05-06 15:45:50'),
(94, 'TKT-1778081667-P9YKNZ', 4, 'Hello, this has been resolved.\r\n\r\nThe Logistics Manager can now input shortage, excess, damage, and missing items from their end.\r\n\r\nThe items that were not supposed to appear in the waybill management section, such as sales order and delivery list, have also been removed.\r\n\r\nThe issue with waybill status not changing after updating to received or delivered has been fixed, and newly initiated waybills should now reflect properly.\r\n\r\nKindly check and confirm from your end.', 0, 0, '2026-05-07 08:32:06', '2026-05-07 08:32:06'),
(95, 'TKT-1778081667-P9YKNZ', 4, 'Status changed from in-progress to waiting-customer', 0, 0, '2026-05-07 08:33:41', '2026-05-07 08:33:41'),
(96, 'TKT-1777903055-A01MRP', 4, 'Status changed from resolved to closed', 0, 0, '2026-05-07 08:34:22', '2026-05-07 08:34:22'),
(97, 'TKT-1778082851-LHI1WG', 4, 'Status changed from open to in-progress', 0, 0, '2026-05-07 08:56:09', '2026-05-07 08:56:09'),
(98, 'TKT-1778081667-P9YKNZ', 12, 'i have confirmed that initiating waybill and updating waybill status is now working.\r\n\r\nhowever we can still see the delivery list and sales order option droplist among the other waybill management droplists options. please rectify.\r\n\r\ni also noticed the logistics manager can now input excesses, shortages, damaged and missing product but the issue is there is no clear provision to input the actual product that was received in excess, that incurred shortage, that was damaged or missing. it tends to calculate generally which i feel might have a negative impact on our stock records.', 0, 0, '2026-05-07 09:00:59', '2026-05-07 09:00:59'),
(99, 'TKT-1777904191-DX28SZ', 12, 'reminder to change it to ADD CROSS-SELL PRODUCT', 0, 0, '2026-05-07 09:34:39', '2026-05-07 09:34:39'),
(100, 'TKT-1777904191-DX28SZ', 4, 'Noted', 0, 0, '2026-05-07 09:38:02', '2026-05-07 09:38:02'),
(101, 'TKT-1777904191-DX28SZ', 4, 'Hello, this has been implemented.\r\n\r\nThe cross-sell section has been added, and the label has been updated to **ADD CROSS-SELL PRODUCT** as requested.\r\n\r\nKindly check from your end and confirm.', 0, 0, '2026-05-07 13:02:44', '2026-05-07 13:02:44'),
(102, 'TKT-1778081667-P9YKNZ', 4, 'Hello, this has been done.\r\n\r\nThe delivery list and sales order options have been removed from the waybill management dropdown list.\r\n\r\nIf they are still showing on your end, kindly do a hard reload/clear cache and check again, as it may still be displaying the old cached version.\r\n\r\nAlso, the input for excesses, shortages, damaged, and missing products has been updated to allow the actual affected product to be specified, instead of calculating everything generally.\r\n\r\nKindly confirm after refreshing.', 0, 0, '2026-05-07 13:05:42', '2026-05-07 13:05:42'),
(103, 'TKT-1778082851-LHI1WG', 4, 'Hello, this has been resolved.\r\n\r\nThe main product quantity validation has been updated to accept `0` as a valid value.\r\n\r\nThis means that if a customer rejects the main order and chooses to take only the cross-sell product, the delivery update can now be completed successfully without affecting the process.\r\n\r\nKindly check and confirm from your end.', 0, 0, '2026-05-07 13:07:24', '2026-05-07 13:07:24'),
(104, 'TKT-1778082851-LHI1WG', 4, 'Status changed from in-progress to waiting-customer', 0, 0, '2026-05-07 13:07:45', '2026-05-07 13:07:45'),
(105, 'TKT-1778082851-LHI1WG', 12, 'Thank you. it has been resolved', 0, 0, '2026-05-07 13:22:08', '2026-05-07 13:22:08'),
(106, 'TKT-1777904191-DX28SZ', 12, 'Thank you. it has been resolved', 0, 0, '2026-05-07 13:26:08', '2026-05-07 13:26:08'),
(107, 'TKT-1778081667-P9YKNZ', 12, 'Uploaded attachment(s).', 0, 0, '2026-05-07 13:36:27', '2026-05-07 13:36:27'),
(108, 'TKT-1778081667-P9YKNZ', 12, 'Uploaded attachment(s).', 0, 0, '2026-05-07 13:36:28', '2026-05-07 13:36:28'),
(109, 'TKT-1778081667-P9YKNZ', 12, 'Uploaded attachment(s).', 0, 0, '2026-05-07 13:36:55', '2026-05-07 13:36:55'),
(110, 'TKT-1778081667-P9YKNZ', 12, 'Uploaded attachment(s).', 0, 0, '2026-05-07 13:36:57', '2026-05-07 13:36:57'),
(111, 'TKT-1777904191-DX28SZ', 4, 'Status changed from waiting-customer to resolved', 0, 0, '2026-05-07 13:43:27', '2026-05-07 13:43:27'),
(112, 'TKT-1778082851-LHI1WG', 4, 'Status changed from waiting-customer to resolved', 0, 0, '2026-05-07 13:44:10', '2026-05-07 13:44:10'),
(113, 'TKT-1778081667-P9YKNZ', 12, 'aftter following all  instructions the delivery list and sales order is still visible.. please let me know if you can see the file i uploaded..\r\nthe inputs has been confirmed and it is now for individual product', 0, 0, '2026-05-07 13:50:41', '2026-05-07 13:50:41'),
(114, 'TKT-1778081667-P9YKNZ', 12, 'Uploaded attachment(s).', 0, 0, '2026-05-07 13:51:37', '2026-05-07 13:51:37'),
(115, 'TKT-1778081667-P9YKNZ', 1, 'Status changed from waiting-customer to waiting-internal', 0, 0, '2026-05-07 14:22:20', '2026-05-07 14:22:20'),
(116, 'TKT-1778058011-LUE4MP', 4, 'Status changed from open to in-progress', 0, 0, '2026-05-07 14:28:15', '2026-05-07 14:28:15'),
(117, 'TKT-1778058011-LUE4MP', 4, 'Hello, the issue has been seen and is currently being worked on.\r\n\r\nWe understand that orders initiated by WhatsApp Closers/Sales Closers should not be randomly assigned to other sales closers. Each initiated order should be automatically assigned to the sales closer or WhatsApp rep who initiated it.\r\n\r\nWe’ll work on correcting the assignment flow so that initiated orders are properly linked to the rep who created them.\r\n\r\nThis should be resolved within **2 working days**.', 0, 0, '2026-05-07 14:28:27', '2026-05-07 14:28:27'),
(118, 'TKT-1778081667-P9YKNZ', 4, 'Hello, this has been implemented.\r\n\r\nThe delivery list and sales order options have now been removed from the waybill management dropdown.\r\n\r\nCheck again to confirm that the updated changes are reflecting on your end.', 0, 0, '2026-05-08 08:15:01', '2026-05-08 08:15:01'),
(119, 'TKT-1778058011-LUE4MP', 4, 'Hello, this has been resolved.\r\n\r\nOrders initiated by WhatsApp Closers/Sales Closers are now automatically assigned to the same sales closer or rep who created the order.\r\n\r\nThe system should no longer assign initiated orders to random sales closers.\r\n\r\nPlease check again and confirm from your end.', 0, 0, '2026-05-08 09:46:10', '2026-05-08 09:46:10'),
(120, 'TKT-1778081667-P9YKNZ', 12, 'Thank you. It has been resolved', 0, 0, '2026-05-08 10:55:13', '2026-05-08 10:55:13'),
(121, 'TKT-1778081667-P9YKNZ', 12, 'BUT I noticed Shortage is displaying 1505, i tasked the logistics manager to manually check where he might have made that error, and he reported back that he could not find where he made such error. Please Zero it out that is from 1505 to 0. Also help run a check to find out where the issue is coming from so it can be fixed to avoid it from reoccurring also let me know if the issue was from the logistics manager end or it was a programing issue.  also let me know if this should be created on a new ticket', 0, 0, '2026-05-08 12:00:22', '2026-05-08 12:00:22'),
(122, 'TKT-1778081667-P9YKNZ', 4, 'Yes, please create this as a new ticket.', 0, 0, '2026-05-08 12:07:04', '2026-05-08 12:07:04'),
(123, 'TKT-1778081667-P9YKNZ', 12, 'OK', 0, 0, '2026-05-08 12:30:30', '2026-05-08 12:30:30'),
(124, 'TKT-1778081667-P9YKNZ', 12, 'I am having issues submitting new tickets.. it\'s not going through', 0, 0, '2026-05-08 13:02:39', '2026-05-08 13:02:39'),
(125, 'TKT-1778081667-P9YKNZ', 4, 'Noted', 0, 0, '2026-05-08 13:11:18', '2026-05-08 13:11:18');

-- --------------------------------------------------------

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` int(11) NOT NULL,
  `uuid` varchar(255) NOT NULL,
  `connection` longtext NOT NULL,
  `queue` longtext NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `jobs`
--

CREATE TABLE `jobs` (
  `id` int(11) NOT NULL,
  `queue` varchar(255) NOT NULL,
  `payload` longtext NOT NULL,
  `attempts` int(11) NOT NULL,
  `reserved_at` int(11) DEFAULT NULL,
  `available_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `total_jobs` int(11) NOT NULL,
  `pending_jobs` int(11) NOT NULL,
  `failed_jobs` int(11) NOT NULL,
  `failed_job_ids` longtext NOT NULL,
  `options` longtext DEFAULT NULL,
  `cancelled_at` int(11) DEFAULT NULL,
  `created_at` int(11) NOT NULL,
  `finished_at` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `messages`
--

CREATE TABLE `messages` (
  `id` varchar(255) NOT NULL,
  `user_id` int(11) NOT NULL,
  `message` longtext NOT NULL,
  `room_type` varchar(255) NOT NULL DEFAULT 'general',
  `room_id` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `messages`
--

INSERT INTO `messages` (`id`, `user_id`, `message`, `room_type`, `room_id`, `created_at`, `updated_at`) VALUES
('488f1b89-e776-4f6c-b6cb-b9b35c976232', 4, 'testing team chat', 'general', NULL, '2026-04-13 12:20:39', '2026-04-13 12:20:39'),
('613e7d26-6221-4257-9793-f211610daed8', 12, 'I just detected the issue, when an order comes as a bump e.g main: vision revive tea 1 Bump: Vision revive tea 4 If the customer ends up taking 1 pack, it cannot be tagged because none of the value can be 0. Error message is usually value must be greater than or equal to 1', 'ticket', 'TKT-1777366839-DRTQAN', '2026-04-30 11:44:21', '2026-04-30 11:44:21'),
('789e97c1-8772-479a-ab8b-ac84818b2324', 15, 'Hello! My name is Mary from Sommetvine Group and I am the Sales Manager. I\'m writing to inform you that Sales Closers are unable to add orders gotten from customers who have previously bought from us and are ordering again directly from the Sales Closers (Returning Customers). This is because they don\'t have access to the ADD ORDER button which will direct them to the form to fill in customer\'s details. Please I\'d like for this to be worked on as soon as possible. Thank you', 'general', NULL, '2026-04-29 13:34:03', '2026-04-29 13:34:03');

-- --------------------------------------------------------

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int(11) NOT NULL,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '0001_01_01_000000_create_users_table', 1),
(2, '0001_01_01_000001_create_cache_table', 1),
(3, '0001_01_01_000002_create_jobs_table', 1),
(4, '2026_04_02_000001_add_support_fields_to_users_table', 1),
(5, '2026_04_02_000002_create_tickets_table', 1),
(6, '2026_04_02_000003_create_comments_table', 1),
(7, '2026_04_02_000004_create_attachments_table', 1),
(8, '2026_04_02_000005_create_messages_table', 1),
(9, 'laravel_sanctum_personal_access_tokens', 1),
(10, '2026_04_07_093204_create_client_api_keys_table', 2),
(12, '2026_04_07_100000_add_client_api_key_id_to_users_table', 3),
(13, '2026_04_08_150130_create_ticket_agent_table', 3),
(14, '2026_04_09_130000_create_support_categories_table', 4),
(15, '2026_04_10_090000_add_service_features_to_client_api_keys_table', 4),
(16, '2026_05_06_000001_add_uploaded_by_id_to_attachments_table', 5),
(17, '2026_04_30_000001_add_comment_id_to_attachments_table', 6),
(18, '2026_05_04_000001_add_is_super_admin_to_users_table', 6);

-- --------------------------------------------------------

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(255) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `ip_address` varchar(255) DEFAULT NULL,
  `user_agent` longtext DEFAULT NULL,
  `payload` longtext NOT NULL,
  `last_activity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
('4e2wmKfviKGh3A2pDvhKKvNGhMKtDBycoK4Q0cUA', NULL, '105.112.26.5', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiNzVmeHpLOHBQT1RUTEVCTkNUMEdCcFNmakE0dXh0REZkZkF6UDR4USI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6ODM6Imh0dHBzOi8vdGlja2V0cy5jcmlzcHNsb29rcy5jb20vP2VtYmVkPTEmcGFyZW50X29yaWdpbj1odHRwcyUzQSUyRiUyRnNvbW1ldHZpbmUuY29tIjtzOjU6InJvdXRlIjtOO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1778323245),
('5Smz565TmOTatQ1r19lD9fYHYIfqOKgZsM24LdAQ', NULL, '197.211.52.73', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiWG13YUNxZzZwa0psSXdONmNUM3ZYbkhPU2F2ZVI5dUdzTWFOU2RLMSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzE6Imh0dHBzOi8vdGlja2V0cy5jcmlzcHNsb29rcy5jb20iO3M6NToicm91dGUiO047fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1778276980),
('66HXXrZN1Y3gczOT5JUBZre9S4Vq28adopjyGDrh', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoieDhGeElkeXNqbmhEMkY3dk4zWHZmNWdwWVRwZVN2Mlg0VnZkZEpZayI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMCI7czo1OiJyb3V0ZSI7Tjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1778849988),
('9S058RFBoxIiC4T0A4939efUQt5THIielkJWorFc', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiZGZ4Z1hFdEJubGJISlpsaW5TcTM5cEtnY3NGU0tDaXFwT2UxY3J1YyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMCI7czo1OiJyb3V0ZSI7Tjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1778326639),
('aWlSRlxJ5ObPg1vF6B7O4CZMyaNj0jEc9arc0DW0', NULL, '199.45.154.155', 'Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.censys.io/)', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiSm9ocmJpUjNoR0J1WFhkN1ZkSUVMbFFEYzBZSnpzRVBFYkhheHJKUSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzE6Imh0dHBzOi8vdGlja2V0cy5jcmlzcHNsb29rcy5jb20iO3M6NToicm91dGUiO047fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1778300712),
('DvGLeO7jo7qJ39aQCBNMinWr8bmxG6i3qJjloItl', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoibHBZTjJLRVRESGwwNXh3Zk81Nnk0NkF4Q2t2Y1ZaOUVSQ3U4aDdTNyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMCI7czo1OiJyb3V0ZSI7Tjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1778851346),
('G8mLpJncZj9ejObfJ3o1X5IEXiLGERSgXr17tr2F', NULL, '105.112.26.5', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiamdZVWhjNGtUeVNTQlp0RzR1YW1Rb3dWQm1hMmZDTWN6SXdEbVdSeiI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6ODM6Imh0dHBzOi8vdGlja2V0cy5jcmlzcHNsb29rcy5jb20vP2VtYmVkPTEmcGFyZW50X29yaWdpbj1odHRwcyUzQSUyRiUyRnNvbW1ldHZpbmUuY29tIjtzOjU6InJvdXRlIjtOO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1778324348),
('JapclayOZHwfLX83Kz8vjzXxqEXHmS3VixXcJ0Yj', NULL, '66.132.172.218', 'Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.censys.io/)', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiWE9FN3k0aUs4eU1kRllxeTZYb0kwSXQ3amVRaGtsUXhjNURHOUtqZyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzU6Imh0dHBzOi8vd3d3LnRpY2tldHMuY3Jpc3BzbG9va3MuY29tIjtzOjU6InJvdXRlIjtOO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1778290667),
('MKGqvwzyF18ooppDrLXgR7ur4h48SIUoFhsohNs8', NULL, '105.112.26.5', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiWDJyb3BBVk1UaHEwSXl0MVE2N0I5SDROcXV0TFBaMkEyajlTRkRudyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6ODM6Imh0dHBzOi8vdGlja2V0cy5jcmlzcHNsb29rcy5jb20vP2VtYmVkPTEmcGFyZW50X29yaWdpbj1odHRwcyUzQSUyRiUyRnNvbW1ldHZpbmUuY29tIjtzOjU6InJvdXRlIjtOO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1778323025),
('oEl23RaJFJPKBfQIOaBhN0RMXda1wBn1rkj67JDD', NULL, '102.90.103.139', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3.1 Safari/605.1.15', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiaEJtRlA2TldqSDJaSWQxNkVwVG11ODNnV01mM2dOeDhVUWNkZXdoSiI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6ODM6Imh0dHBzOi8vdGlja2V0cy5jcmlzcHNsb29rcy5jb20vP2VtYmVkPTEmcGFyZW50X29yaWdpbj1odHRwcyUzQSUyRiUyRnNvbW1ldHZpbmUuY29tIjtzOjU6InJvdXRlIjtOO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1778318892),
('tdM8bcLGgX0aRTnXj78moZ1J0B614IjAuZ7kyprk', NULL, '102.90.103.139', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3.1 Safari/605.1.15', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiZUFoMEJ2NHN6ZERJQTlFS1JWdDBaUENDNFJoc2RHZG9LTWRyMEhyOSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6ODM6Imh0dHBzOi8vdGlja2V0cy5jcmlzcHNsb29rcy5jb20vP2VtYmVkPTEmcGFyZW50X29yaWdpbj1odHRwcyUzQSUyRiUyRnNvbW1ldHZpbmUuY29tIjtzOjU6InJvdXRlIjtOO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1778313746),
('WhKlKArKoGWUBGIce2upQeJsMtAg9Q4VyK3JfsGd', NULL, '102.90.103.139', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3.1 Safari/605.1.15', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiWndvSTNrdTBTbkNCaHg0bFlSNUF2SHFrSVBBNFIxVjF2Z05tb1FWayI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6ODM6Imh0dHBzOi8vdGlja2V0cy5jcmlzcHNsb29rcy5jb20vP2VtYmVkPTEmcGFyZW50X29yaWdpbj1odHRwcyUzQSUyRiUyRnNvbW1ldHZpbmUuY29tIjtzOjU6InJvdXRlIjtOO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1778314967),
('XWdifXTXiefLwW2UUjZPpWcBgccGpl6DGN8MI7Um', NULL, '105.112.26.5', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiM0c5eFVMWmFIc2NLN05KZ2hLYmVJUUhZZUIwU3JDbWZzMXhETGEzTSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzE6Imh0dHBzOi8vdGlja2V0cy5jcmlzcHNsb29rcy5jb20iO3M6NToicm91dGUiO047fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1778324137),
('ZRYSsZEbtAXBTuSetpcOJLGyQa6PTzW8RJnBbcLK', NULL, '105.112.26.5', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoieDdQZW5jWGloRGFscWtsSWFhMWVETVJjeFEyd0VGUDMzdjBRd3I0diI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6ODM6Imh0dHBzOi8vdGlja2V0cy5jcmlzcHNsb29rcy5jb20vP2VtYmVkPTEmcGFyZW50X29yaWdpbj1odHRwcyUzQSUyRiUyRnNvbW1ldHZpbmUuY29tIjtzOjU6InJvdXRlIjtOO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1778321545);

-- --------------------------------------------------------

--
-- Table structure for table `support_categories`
--

CREATE TABLE `support_categories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `support_categories`
--

INSERT INTO `support_categories` (`id`, `name`, `slug`, `is_active`, `sort_order`, `created_at`, `updated_at`) VALUES
(1, 'General support', 'general-support', 1, 1, '2026-04-10 21:48:00', '2026-04-10 21:48:00'),
(2, 'Technical support', 'technical-support', 1, 2, '2026-04-10 21:48:00', '2026-04-10 21:48:00'),
(3, 'Sales', 'sales', 1, 3, '2026-04-10 21:48:00', '2026-04-10 21:48:00');

-- --------------------------------------------------------

--
-- Table structure for table `tickets`
--

CREATE TABLE `tickets` (
  `id` varchar(255) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` longtext NOT NULL,
  `category` varchar(255) NOT NULL,
  `priority` varchar(255) NOT NULL,
  `status` varchar(255) NOT NULL,
  `requester` varchar(255) DEFAULT NULL,
  `requester_id` int(11) DEFAULT NULL,
  `requester_name` varchar(255) DEFAULT NULL,
  `department` varchar(255) DEFAULT NULL,
  `assigned_to_id` int(11) DEFAULT NULL,
  `sla_due` datetime DEFAULT NULL,
  `first_response_sla` datetime DEFAULT NULL,
  `resolution_sla` datetime DEFAULT NULL,
  `first_response_at` datetime DEFAULT NULL,
  `first_response_met` int(11) NOT NULL DEFAULT 0,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tickets`
--

INSERT INTO `tickets` (`id`, `title`, `description`, `category`, `priority`, `status`, `requester`, `requester_id`, `requester_name`, `department`, `assigned_to_id`, `sla_due`, `first_response_sla`, `resolution_sla`, `first_response_at`, `first_response_met`, `created_at`, `updated_at`) VALUES
('TKT-1776082489-RO01LI', 'Final testing', 'Final testing', 'Technical support', 'Medium', 'closed', 'David', 5, 'David', 'Shoprite', NULL, '2026-04-15 12:14:49', '2026-04-13 16:14:49', '2026-04-15 12:14:49', NULL, 0, '2026-04-13 12:14:49', '2026-04-30 15:51:02'),
('TKT-1777365689-FRW9BH', 'Upgrade to Delivery Management', 'I want us to have a section/column where activity status can be displayed e.g when any of the delivery Managers update an order status to delivered it should clearly show something like UPDATED BY JAMES\n\nThere should also be a filter to be able to lookup only orders UPDATED by individual delivery Managers if possible.\nOn my OPERATIONS MANAGER DASHBOARD and MD\'S DASHBOARD there should also be a section that displays the total Delivered updated by individual delivery Managers which also can be filtered by choosing a date range.', 'Technical support', 'Medium', 'closed', 'Emmanuel O', 12, 'Emmanuel O', 'Operations', 4, '2026-04-30 08:41:29', '2026-04-28 12:41:29', '2026-04-30 08:41:29', '2026-04-30 16:03:45', 0, '2026-04-28 08:41:29', '2026-05-04 12:03:53'),
('TKT-1777366269-KILF2H', 'Sales Dashboard on OPERATIONS manager DASHBOARD', 'The sales Dashboard displaying on my end is not showing any data. Please work on it', 'Sales', 'Low', 'closed', 'Emmanuel O', 12, 'Emmanuel O', 'Operations', 4, '2026-05-01 08:51:09', '2026-04-29 08:51:09', '2026-05-01 08:51:09', '2026-04-29 10:57:02', 0, '2026-04-28 08:51:09', '2026-05-04 12:04:29'),
('TKT-1777366533-XYUC83', 'LOGISTICS', 'LOGISTICS Manager has not been able to create waybill on the system, the error message he keeps getting is \"sorry! You are not allowed to access this module', 'Technical support', 'High', 'closed', 'Emmanuel O', 12, 'Emmanuel O', 'LOGISTICS', NULL, '2026-04-29 08:55:33', '2026-04-28 09:55:33', '2026-04-29 08:55:33', '2026-04-29 10:49:30', 0, '2026-04-28 08:55:33', '2026-05-04 12:05:07'),
('TKT-1777366839-DRTQAN', 'Issue with BUMP ORDERS', 'We discovered bump orders on the CRM cannot be updated to delivered,  here are few to try out on your end : order ID 3192, 3121, 3181, 4381, 4643, 3283', 'Technical support', 'Urgent', 'closed', 'Emmanuel O', 12, 'Emmanuel O', 'Operations', 4, '2026-04-28 13:00:39', '2026-04-28 09:15:39', '2026-04-28 13:00:39', '2026-04-29 10:46:22', 0, '2026-04-28 09:00:39', '2026-05-04 12:05:28'),
('TKT-1777367015-GLUFES', 'CRM SPEED', 'CRM speed is extremely low for delivery Managers activities hence slowing down work, incurring Backlogs and being put on pressure.', 'Technical support', 'Urgent', 'closed', 'Emmanuel O', 12, 'Emmanuel O', 'Operations', 4, '2026-04-28 13:03:35', '2026-04-28 09:18:35', '2026-04-28 13:03:35', NULL, 0, '2026-04-28 09:03:35', '2026-05-04 12:05:56'),
('TKT-1777472812-W3KFH6', 'Waybill management', 'The logistics manager initiated a waybill on the CRM to confirm if the problem has been fixed which worked, but I noticed on my operations manager profile I cannot see the waybill he has initiated. Please work on this.', 'Technical support', 'Medium', 'closed', 'Emmanuel O', 12, 'Emmanuel O', 'logistics', NULL, '2026-05-01 14:26:52', '2026-04-29 18:26:52', '2026-05-01 14:26:52', '2026-05-01 08:39:39', 0, '2026-04-29 14:26:52', '2026-05-06 15:42:50'),
('TKT-1777892743-DIO12S', 'REPEATED ORDER TAB', 'JUST AS WE HAVE A TAB FOR CALL BACK, NOT PICKING ETC, A TAB FOR REPEATED ORDER SHOULD BE CREATED, SO SALES CLOSERS CAN MOVE ORDERS THAT ARE REPEATED THERE, IT WILL STILL COUNT FOR THEM JUST AS ORDERS ON THE OTHER TABS DOES UNTIL IT IS REVIEWED BY ADMIN OR SALES MANAGER.(THIS HAS ALSO BEEN DISCUSSED AND APPROVED BY MY BOSS).\n\nALSO A TRASH BIN SHOULD BE CREATED, WHEN ADMIN(SALES MANAGER) HAS CONFIRMED AN ORDER AS REPEATED IT SHOULD BE MOVED TO THE TRASH BIN, AT THIS POINT IT STOPS COUNTING FOR THE SALES REP, IT GETS REMOVED FROM THEIR TOTAL ORDER BUT DOES NOT GET PERMANTENTLY DELETED, IT REMAINS IN THE TRASH BIN FOR 30DAYS , WITH A RESTORE OPTION( IT CAN BE RESTORED TO THE SALES CLOSER), AFTER 30 DAYS IF NOT RESTORED IT CAN BE PERMANENTLY DELETED.', 'Sales', 'Urgent', 'open', 'Marytexy', 15, 'Marytexy', 'Sommetvine', NULL, '2026-05-04 15:05:43', '2026-05-04 11:20:43', '2026-05-04 15:05:43', NULL, 0, '2026-05-04 11:05:43', '2026-05-04 11:05:43'),
('TKT-1777903055-A01MRP', 'Upgrade to waybill management', 'I can now see the populated list of waybills INITIATED. But 1. I noticed the list is continuously populated without splitting into pages, please work on this, this can help to give the logistics manager how many total he has initiated on this section also. 2. No option to input total quantity of DAMAGE product when updating to received/delivered 3. No provision to input total quantity of excess received. 4. No provision to input total quantity of shortages. 5. No provision to input missing waybill/product. 6. I noticed the filter is not effective on pending orders, because when I did for pending orders it brought out no record even though we actually have. Also on my OPERATIONS MANAGER DASHBOARD and MD\'S DASHBOARD there should be a section displaying total quantity of shortages, excess, damaged, missing waybill or product. Total pending/in transit waybills. This will help me checkmate whatever the logistics manager is doing. Also let me know if I should log this in a different ticket if it is to be treated as a different issue entirely. Thank you', 'Technical support', 'High', 'closed', 'Emmanuel O', 12, 'Emmanuel O', 'Logistics', 4, '2026-05-05 13:57:35', '2026-05-04 14:57:35', '2026-05-05 13:57:35', NULL, 0, '2026-05-04 13:57:35', '2026-05-07 08:34:22'),
('TKT-1777904191-DX28SZ', 'Upgrade to updating an order status to delivered', 'Our sales closers are often task to offer cross sells to our clients, that is introduced other products that we sell to this clients. In some cases this clients actually agree to receive this additional products.\n\nNow when delivery Managers wants to update such order to delivered there\'s no provision to add such cross sells.\n\nPlease add a section where when updating, delivery Managers can add this cross sells. (Product, Qty and Price/amount)', 'Technical support', 'High', 'resolved', 'Emmanuel O', 12, 'Emmanuel O', 'Operations', NULL, '2026-05-05 14:16:31', '2026-05-04 15:16:31', '2026-05-05 14:16:31', NULL, 0, '2026-05-04 14:16:31', '2026-05-07 13:43:27'),
('TKT-1777907599-Q7C026', 'INITIATING OF ORDERS', 'ORDERS INITIATED BY WHATSAPP CLOSERS GETS ASSIGNED TO RANDOM SALES CLOSERS.\nPLEASE, EACH ORDER INITIATED IS SUPPOSED TO BE ASSIGNED TO THE SALES CLOSER/ WHATSAPP REP WHO INITIATED IT. THEY ALSO DON\'T HAVE THE OPTION TO SELECT THE PERSON THAT THEY WANT THE ORDER TO BE ASSIGNED TO. EVEN IF THE FEATURE OF SELECTING WHO TO ASSIGN THE INITIATED ORDERS TO IS NOT ENABLED, ALL INITIATED ORDERS BY SALES CLOSERS/WHATSAPP REPS SHOULD BE AUTOMATICALLY ASSIGNED TO THE REP THAT INITIATED IT', 'Sales', 'Urgent', 'open', 'Marytexy', 15, 'Marytexy', 'Sommetvine', NULL, '2026-05-04 19:13:19', '2026-05-04 15:28:19', '2026-05-04 19:13:19', NULL, 0, '2026-05-04 15:13:19', '2026-05-04 15:13:19'),
('TKT-1778058011-LUE4MP', 'Initiating of Orders', 'ORDERS INITIATED BY WHATSAPP CLOSERS GETS ASSIGNED TO RANDOM SALES CLOSERS. PLEASE, EACH ORDER INITIATED IS SUPPOSED TO BE ASSIGNED TO THE SALES CLOSER/ WHATSAPP REP WHO INITIATED IT. THEY ALSO DON\'T HAVE THE OPTION TO SELECT THE PERSON THAT THEY WANT THE ORDER TO BE ASSIGNED TO. EVEN IF THE FEATURE OF SELECTING WHO TO ASSIGN THE INITIATED ORDERS TO IS NOT ENABLED, ALL INITIATED ORDERS BY SALES CLOSERS/WHATSAPP REPS SHOULD BE AUTOMATICALLY ASSIGNED TO THE REP THAT INITIATED IT', 'Technical support', 'Urgent', 'in-progress', 'Marytexy', 15, 'Marytexy', 'Sommetvine', 4, '2026-05-06 13:00:11', '2026-05-06 09:15:11', '2026-05-06 13:00:11', NULL, 0, '2026-05-06 09:00:11', '2026-05-08 09:46:10'),
('TKT-1778081667-P9YKNZ', 'Waybill management', 'there\'s still no provision for logistics manager to input shortage, excess, damage, missing on his end... There are also new items added that\'s not supposed to be in the waybill management like sales order and delivery list. Also logistics manager complained that after updating status to received or delivered the waybill status is not actually changing, new initiated waybill isn\'t reflecting.', 'Technical support', 'High', 'resolved', 'Emmanuel O', 12, 'Emmanuel O', 'logistics', NULL, '2026-05-07 15:34:27', '2026-05-06 16:34:27', '2026-05-07 15:34:27', NULL, 0, '2026-05-06 15:34:27', '2026-05-09 10:24:29'),
('TKT-1778082851-LHI1WG', 'IMPROVE TO UPDATING ORDER STATUS TO DELIVERED FOR MAIN PRODUCT', 'We have recently noticed that at point of delivery some customers reject the main order and go for the cross-sell, since the main product Qty cannot be zero it is going to affect when updating. So please to fix this the main product Qty value command should be able to accept the value \"0\"', 'Technical support', 'High', 'resolved', 'Emmanuel O', 12, 'Emmanuel O', 'Opeations', 4, '2026-05-07 15:54:11', '2026-05-06 16:54:11', '2026-05-07 15:54:11', NULL, 0, '2026-05-06 15:54:11', '2026-05-07 13:44:10'),
('TKT-1778325182-9C067W', 'Local API create test', 'Testing the live create-ticket path through HTTP.', 'Technical support', 'Medium', 'open', 'Codex Local', 16, 'Codex Local', 'Sommetvine', 4, '2026-05-11 11:13:02', '2026-05-09 15:13:02', '2026-05-11 11:13:02', NULL, 0, '2026-05-09 11:13:02', '2026-05-09 11:13:02'),
('TKT-1778325880-168KDG', 'Org admin create test', 'Testing organization admin ticket creation via HTTP.', 'Technical support', 'Medium', 'open', 'sommetvineadmin', 13, 'sommetvineadmin', 'Sommetvine', 4, '2026-05-11 11:24:40', '2026-05-09 15:24:40', '2026-05-11 11:24:40', NULL, 0, '2026-05-09 11:24:40', '2026-05-09 11:24:40'),
('TKT-1778325880-EK7CZH', 'Super admin create test', 'Testing super admin ticket creation via HTTP.', 'Technical support', 'Medium', 'open', 'Admin User', 1, 'Admin User', 'IT', 4, '2026-05-11 11:24:40', '2026-05-09 15:24:40', '2026-05-11 11:24:40', NULL, 0, '2026-05-09 11:24:40', '2026-05-09 11:24:40'),
('TKT-1778326654-PCLJQR', 'lhgfcxdghj', 'lojhgfcxdcvhbnm', 'Technical support', 'Low', 'open', 'Admin User', 1, 'Admin User', 'IT', 4, '2026-05-12 11:37:34', '2026-05-10 11:37:34', '2026-05-12 11:37:34', NULL, 0, '2026-05-09 11:37:34', '2026-05-09 11:37:34'),
('TKT-1778850537-2XNEBT', 'testing', 'testing', 'Technical support', 'Medium', 'open', 'Admin User', 1, 'Admin User', 'IT', 4, '2026-05-17 13:08:57', '2026-05-15 17:08:57', '2026-05-17 13:08:57', NULL, 0, '2026-05-15 13:08:57', '2026-05-15 13:08:57');

-- --------------------------------------------------------

--
-- Table structure for table `ticket_agent`
--

CREATE TABLE `ticket_agent` (
  `ticket_id` varchar(255) NOT NULL,
  `agent_id` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ticket_agent`
--

INSERT INTO `ticket_agent` (`ticket_id`, `agent_id`, `created_at`, `updated_at`) VALUES
('TKT-1776082489-RO01LI', 4, '2026-04-13 16:17:48', '2026-04-13 16:17:48'),
('TKT-1777365689-FRW9BH', 4, '2026-04-28 12:41:29', '2026-04-28 12:41:29'),
('TKT-1777366269-KILF2H', 4, '2026-04-28 12:51:09', '2026-04-28 12:51:09'),
('TKT-1777366839-DRTQAN', 4, '2026-04-28 13:00:39', '2026-04-28 13:00:39'),
('TKT-1777367015-GLUFES', 4, '2026-04-28 13:03:35', '2026-04-28 13:03:35'),
('TKT-1777472812-W3KFH6', 4, '2026-04-30 12:58:07', '2026-04-30 12:58:07'),
('TKT-1777903055-A01MRP', 4, '2026-05-04 17:57:35', '2026-05-04 17:57:35'),
('TKT-1777907599-Q7C026', 4, '2026-05-05 14:15:48', '2026-05-05 14:15:48'),
('TKT-1778058011-LUE4MP', 4, '2026-05-06 13:00:11', '2026-05-06 13:00:11'),
('TKT-1778082851-LHI1WG', 4, '2026-05-06 19:54:11', '2026-05-06 19:54:11'),
('TKT-1778325182-9C067W', 4, '2026-05-09 10:13:02', '2026-05-09 10:13:02'),
('TKT-1778325880-168KDG', 4, '2026-05-09 10:24:40', '2026-05-09 10:24:40'),
('TKT-1778325880-EK7CZH', 4, '2026-05-09 10:24:40', '2026-05-09 10:24:40'),
('TKT-1778326654-PCLJQR', 4, '2026-05-09 10:37:34', '2026-05-09 10:37:34'),
('TKT-1778850537-2XNEBT', 4, '2026-05-15 12:08:57', '2026-05-15 12:08:57');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `attachments`
--
ALTER TABLE `attachments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `attachments_ticket_id_foreign` (`ticket_id`),
  ADD KEY `attachments_uploaded_by_id_index` (`uploaded_by_id`),
  ADD KEY `attachments_comment_id_foreign` (`comment_id`);

--
-- Indexes for table `comments`
--
ALTER TABLE `comments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `comments_ticket_id_foreign` (`ticket_id`),
  ADD KEY `comments_author_id_foreign` (`author_id`);

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Indexes for table `jobs`
--
ALTER TABLE `jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobs_queue_index` (`queue`);

--
-- Indexes for table `job_batches`
--
ALTER TABLE `job_batches`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `messages`
--
ALTER TABLE `messages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `messages_created_at_index` (`created_at`),
  ADD KEY `messages_room_type_room_id_index` (`room_type`,`room_id`),
  ADD KEY `messages_user_id_foreign` (`user_id`);

--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sessions_last_activity_index` (`last_activity`),
  ADD KEY `sessions_user_id_index` (`user_id`);

--
-- Indexes for table `support_categories`
--
ALTER TABLE `support_categories`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `support_categories_name_unique` (`name`),
  ADD UNIQUE KEY `support_categories_slug_unique` (`slug`);

--
-- Indexes for table `tickets`
--
ALTER TABLE `tickets`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tickets_updated_at_index` (`updated_at`),
  ADD KEY `tickets_created_at_index` (`created_at`),
  ADD KEY `tickets_assigned_to_id_index` (`assigned_to_id`),
  ADD KEY `tickets_requester_id_index` (`requester_id`),
  ADD KEY `tickets_category_index` (`category`),
  ADD KEY `tickets_priority_index` (`priority`),
  ADD KEY `tickets_status_index` (`status`);

--
-- Indexes for table `ticket_agent`
--
ALTER TABLE `ticket_agent`
  ADD PRIMARY KEY (`ticket_id`,`agent_id`),
  ADD KEY `ticket_agent_agent_id_foreign` (`agent_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `attachments`
--
ALTER TABLE `attachments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `comments`
--
ALTER TABLE `comments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=126;

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobs`
--
ALTER TABLE `jobs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `support_categories`
--
ALTER TABLE `support_categories`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `attachments`
--
ALTER TABLE `attachments`
  ADD CONSTRAINT `attachments_comment_id_foreign` FOREIGN KEY (`comment_id`) REFERENCES `comments` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `attachments_ticket_id_foreign` FOREIGN KEY (`ticket_id`) REFERENCES `tickets` (`id`) ON DELETE SET NULL ON UPDATE NO ACTION,
  ADD CONSTRAINT `attachments_uploaded_by_id_foreign` FOREIGN KEY (`uploaded_by_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `comments`
--
ALTER TABLE `comments`
  ADD CONSTRAINT `comments_author_id_foreign` FOREIGN KEY (`author_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
  ADD CONSTRAINT `comments_ticket_id_foreign` FOREIGN KEY (`ticket_id`) REFERENCES `tickets` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;

--
-- Constraints for table `messages`
--
ALTER TABLE `messages`
  ADD CONSTRAINT `messages_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;

--
-- Constraints for table `tickets`
--
ALTER TABLE `tickets`
  ADD CONSTRAINT `tickets_assigned_to_id_foreign` FOREIGN KEY (`assigned_to_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE NO ACTION;

--
-- Constraints for table `ticket_agent`
--
ALTER TABLE `ticket_agent`
  ADD CONSTRAINT `ticket_agent_agent_id_foreign` FOREIGN KEY (`agent_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ticket_agent_ticket_id_foreign` FOREIGN KEY (`ticket_id`) REFERENCES `tickets` (`id`) ON DELETE CASCADE;

COMMIT;

