=== Neyatek CRM ===
Contributors: neyatek, fahadtk
Tags: crm, lead tracking, contact list, team assignment, settings
Requires at least: 5.0
Requires PHP: 7.2
Tested up to: 7.0
Stable tag: 1.1.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

A lightweight, admin-only CRM plugin with lead tracking, settings panel, team assignment, activity log, duplicate finder, and performance analytics.

== Description ==

Neyatek CRM is a lightweight WordPress plugin designed to keep lead tracking simple, fast, and secure. Built exclusively for site administrators and editors, it helps manage team allocations, capture audit history logs, detect duplicates automatically, and display card-based performance analytics dashboards.

Key Features:
* Private Custom Post Type (`neyatek_lead`) ensures data security and sovereignty.
* Settings Panel to customize choices for Regions and Products/Services dropdowns.
* Automatic creator, created date, and last action timestamp logging.
* HSL-tailored status row color-coding (New, Interested, Follow-up, Not Interested, Converted, Lost).
* Lead Priority Levels (High, Medium, Low) with visual badge displays on the table.
* Integrated Click-to-Call and WhatsApp chat URLs with pre-filled lead details.
* Serialization based Audit History Log for full accountability.
* Debounced AJAX-powered duplicate finder.
* Interactive Analytics Dashboard showcasing total leads, conversions, conversion rate, staff leaderboard, and progress charts for Leads by Source, Priority, and Interested Products.

== Installation ==

1. Upload the `neyatek-crm` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Access the CRM under the 'Neyatek CRM' menu in your dashboard.

== FAQ ==

= Who can access this plugin? =
Only users with `edit_others_posts` permissions (typically Administrators and Editors) can access the dashboard and endpoints.

= Where is lead data stored? =
All data stays securely stored in your local WordPress database, utilizing the native metadata APIs.

= How do I configure Regions and Products? =
Go to the 'Settings' submenu under 'Neyatek CRM' to define one choice per line for Regions and Products/Services.

== Changelog ==

= 1.1.0 =
* Added Export and Import functionalities in Neyatek CRM settings page with client-side RFC-4180 compliant CSV parser and fuzzy header matcher.
* Implemented AJAX batching (50 rows per chunk) for importing large datasets.
* Added follow-up reminder alerts, WP-Cron checks, Reminders submenu, and bubble notification counts.
* Added Leads Archive system (custom post status, Edit Modal 'Archive' action, table status filter views, and list restore action).
* Added Settings page panel for custom Regions and Products list management.
* Added Email input validations on client and REST server.
* Added Priority Level dropdown and color-coded table badges.
* Added leads groupings on the Analytics Dashboard by Priority and Interested Products.
* Fixed menu conflicts: removed default position parameter to prevent overlapping with other menus like Theme Settings.
* Fixed transient cache clearance CSRF vulnerabilities by enforcing security nonces on manual flushes.

= 1.0.0 =
* Initial release. Includes CPT registration, List Table views, REST API controller, AJAX duplicate check, and Chart.js analytics dashboard.

