=== Purralytics - Where Data Meets Compassion ===
Contributors: clawsorganization
Tags: cat rescue, colony management, TNR, animal welfare, volunteer management
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
Stable tag: 2.1.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Advanced cat colony management and analytics system with user authentication, colony tracking, volunteer management, and comprehensive data analytics.

== Description ==

Purralytics is a comprehensive colony analysis and tracking system (CATS) designed specifically for cat rescue organizations, TNR programs, and animal welfare groups. Manage your cat colonies, track intakes and discharges, coordinate volunteers, and gain powerful insights into your rescue operations.

= Key Features =

**Colony Management**
* Track multiple cat colonies with GPS location mapping
* Record detailed colony information (population, TNR status, feeding schedules)
* Monitor colony health and population changes over time
* Assign caregivers and manage colony access

**Intake & Discharge Tracking**
* Comprehensive intake forms for rescued cats
* Track medical information, age, gender, and condition
* Record discharge outcomes (adoption, TNR return, medical outcomes)
* Generate reports on rescue statistics

**NeoNate Care**
* Specialized feeding schedules for neonatal kittens
* Weight tracking and growth monitoring
* Feeding logs with timestamps
* Care reminders and alerts

**Volunteer Management (Deluxe Plan)**
* Time tracking for volunteer hours
* Event organization and management
* Team coordination and assignments
* Statistics and goal tracking
* Communications platform
* Administrative controls and approvals

**Analytics & Reporting**
* Visual dashboards with charts and graphs
* Export data in CSV format
* Historical data analysis
* Colony population trends
* Intake/discharge statistics

**User Roles & Permissions**
* Contributor: Can add and edit own data
* Author: Can view all data, manage own entries
* Administrator: Full access to all features and settings

= Premium Plans =

**Basic Plan**
* Colony Tracking
* Intake & Discharge Forms
* NeoNate Feeding & Weight Tracking
* Basic Analytics

**Deluxe Plan** (All Basic features plus)
* Volunteer Management Suite
  - My Time tracking
  - Events management
  - Teams coordination
  - Stats & Goals
  - Communications
  - Admin controls

**Free Trial**
* 7-day trial with full access to all Deluxe features
* Test all premium functionality before purchasing
* No commitment required

= Perfect For =

* Cat rescue organizations
* TNR (Trap-Neuter-Return) programs
* Animal welfare groups
* Community cat programs
* Foster networks
* Shelter colony management
* Volunteer coordinator teams

= Why Choose Purralytics? =

* **Designed by rescuers, for rescuers** - Built with real-world rescue experience
* **Comprehensive data** - Track every aspect of your rescue operations
* **User-friendly interface** - Intuitive design that your whole team can use
* **Secure & private** - Role-based access controls protect sensitive data
* **Mobile responsive** - Manage colonies from anywhere
* **Regular updates** - Continuous improvements and new features
* **Dedicated support** - We're here to help your rescue succeed

== Installation ==

= Manual Installation =

1. Download the plugin ZIP file
2. Log in to your WordPress admin panel
3. Navigate to Plugins > Add New > Upload Plugin
4. Choose the downloaded ZIP file and click "Install Now"
5. Activate the plugin
6. Navigate to Purralytics in your admin menu to complete setup

= After Activation =

1. Go to Purralytics > Settings in your WordPress admin
2. Configure your organization details (name, logo, tagline)
3. Set up user roles and permissions
4. Create a page with the `[claws_app]` shortcode to display the app
5. Start adding colonies and tracking your rescue data!

== Frequently Asked Questions ==


= What's the difference between Basic and Deluxe plans? =

**Basic Plan** includes colony tracking, intake/discharge forms, and NeoNate care features - everything you need for core colony management.

**Deluxe Plan** adds our complete volunteer management suite with time tracking, event organization, team coordination, statistics, communications, and admin controls.

= Can multiple users access the same data? =

Yes! Purralytics is built for team collaboration. Administrators can see all data, Authors can view all colonies and manage their own entries, and Contributors can add and edit their own records. Each user has secure login credentials.

= Is my data secure? =

Absolutely. Purralytics uses WordPress's built-in user authentication and role-based permissions. All data is stored securely in your WordPress database, and you have complete control over who can access what information.

= Can I export my data? =

Yes! You can export your colony, intake, and discharge data in CSV format for use in spreadsheets or other applications.

= Do I need coding knowledge to use Purralytics? =

No! Purralytics is designed to be user-friendly with an intuitive interface. Simply install the plugin, add the shortcode to a page, and you're ready to start tracking your rescue data.

= Does it work on mobile devices? =

Yes! Purralytics is fully responsive and works great on phones and tablets, so you can update colony information from the field.

= Can I customize the colors and branding? =

Yes! In the Settings page, you can upload your organization's logo, set custom colors, and customize the tagline to match your branding.

= What if I need help? =

We provide support through our help desk. Premium plan users receive priority support. We also maintain comprehensive documentation to help you get the most out of Purralytics.

= Can I upgrade or downgrade my plan? =

Yes! You can upgrade from Basic to Deluxe at any time. Your data will remain intact when changing plans.

= What happens if I cancel my subscription? =

Your data remains in your WordPress database. If you cancel, you'll lose access to premium features but your colony, intake, and discharge records will be preserved.

== Changelog ==
= 2.2.30 - 2025-12-21 =
* Fixed a variety of error messages in the standalone shortcodes relating to the refactor back more than fifty builds ago!

= 2.2.24 - 2025-12-21 =
* Fixed busted short codes for individual components
* Fixed bug that kept displaying colony summaries and graph when contextually, none of that should have been visible.

= 2.2.22 - 2025-12-21 =
* Code Cleanup - got rid of excessive logging, cleaned up unused methods

= 2.2.20 - 2025-12-19 =
* Fixed a vexing bug on the colony tab where the pie graph wouldn't generate reliably if you switched to any other tab and then came BACK to the colony tab.

= 2.1 - 2025-12-17 =
* Added more functionality to the Intake tab.  
* Added checkbox to the Settings (back end) page to allow users to restrict the intake form to Editors and Admins.
* Changed: GET /contacts now uses check_permission (any logged-in user)
* Rationale: Admin tab is already access-controlled, so API doesn't need to double-check
* Security: Non-admin users can view contact list BUT can't access Admin tab UI
* Result: "Write in the blind" - anyone can add contacts via intake, only admins see the list
* POST /contacts: Still check_permission (any logged-in user) ✅
* PUT /contacts: Still can_access_admin_features (Editors/Admins only) ✅
* DELETE /contacts: Still can_access_admin_features (Editors/Admins only) ✅

= 2.0.97 - 2025-12-12 =
* VISUAL: Comprehensive button styling update across entire app
* Updated: Colony form Cancel and Save Colony buttons (beveled)
* Updated: Discharge form Cancel and Record Outcome buttons (beveled)
* Updated: Donor modal Cancel button (beveled gray gradient)
* Updated: Apply AI Results button (beveled cyan gradient)
* All updated buttons now have: gradients, beveled edges, drop shadows, hover lift effects
* Consistent professional appearance across primary user workflows
* Note: Tab navigation and minor utility buttons intentionally left flat for visual hierarchy

= 2.0.94 - 2025-12-12 =
* Added: Color Picker for Primary and Secondary buttons for added styling options
* Added: "New Contact?" checkbox on intake form (next to Anonymous/Drop off)
* Feature: When checked, automatically creates contact from intake information
* Workflow: Streamlines adding people who bring in cats to your contact list
* Silent: Contact creation failure doesn't block intake (logged only)

= 2.0.93 - 2025-12-11 =
* OPTIMIZATION: Removed 94 verbose console.log statements (53% reduction)
* Removed: Emoji debug logs (🔧, ✅, 📬, 📤, etc.)
* Removed: Verbose state dumps (Mode:, Task data collected:, API endpoint:, etc.)
* Removed: Debug section markers (=== STARTED ===, === FINISHED ===)
* Kept: All console.error and console.warn statements (68 total)
* Kept: Critical console.log override in claws-core.js (prevents loops)
* Kept: 13 useful console.logs for actual debugging
* Result: Cleaner console, smaller file size, production-ready logging
* Note: Backups created with .backup_before_log_removal extension

= 2.0.91 - 2025-12-11 =
* REFINED PERMISSIONS: Implemented precise role-based access control
* Subscribers: Cannot see colonies at all (map or posts) - read-only site access
* Contributors: Can add colonies, but only see their own colonies on map/in app
* Authors: Can see all colonies on map/in app, can add their own
* Editors: "Admin Lite" - full app access including Admin tab, but NO backend WP menu access
* Administrators: Full access including backend WordPress Purralytics menu
* Changed: Backend WP menu now requires 'manage_claws' capability (admins only)
* Changed: All submenu pages require 'manage_claws' (admins only)
* Confirmed: Admin tab in app accessible to both Editors and Administrators
* Confirmed: Database colony filtering already implements role-based visibility
* Result: Clear separation of duties across all user roles

= 2.0.90 - 2025-12-11 =
* CRITICAL SECURITY FIX: Removed all CPT post capability inheritance
* SECURITY: Changed all CPTs from 'capability_type' => 'post' to custom capabilities
* SECURITY: Subscribers now get ONLY 'read' capability (no edit, delete, publish, manage)
* SECURITY: Removed 'manage_options' capability from all non-admin roles
* Added: Custom capability helper function for consistent CPT capability assignment
* Fixed: All 11 CPTs now use proper custom capabilities (colony, intake, discharge, etc)
* Changed: Contributors/Authors/Editors get appropriate edit capabilities for CLAWS CPTs only
* Changed: Administrators get full capabilities including edit_others, delete_others
* Result: Proper capability separation - subscribers cannot edit/delete anything
* IMPORTANT: Existing sites should deactivate/reactivate plugin to apply security fixes

= 2.0.89 - 2025-12-11 =
* FIXED: Care Guide modal close buttons now work properly (both X and Close button)
* Added: closeCareGuide() method to properly remove modal
* Fixed: Modal wrapper now has ID so buttons can reference it
* Changed: Both buttons call CLAWSApp.NeoNate.closeCareGuide() method

= 2.0.88 - 2025-12-11 =
* Fixed: Recent Intakes list now only shows ACTIVE cats (discharged cats removed)
* Fixed: Outcome form "Select Cat" dropdown now only shows ACTIVE cats (discharged cats removed)
* Fixed: Care Guide red X button now properly closes the modal
* Added: Care Guide "Close" button at bottom of modal (no need to scroll back up)
* Improved: Consistent filtering logic - checks both discharge_date and discharged status
* UX: Cleaner interface showing only relevant active cats

= 2.0.86 - 2025-12-11 =
* MAJOR FIX: Changed ALL menu capabilities from 'read_claws_data' to 'manage_options'
* Fixed: Admins can now ALWAYS access Purralytics menu (no more permission errors)
* Reason: 'manage_options' is a standard WordPress admin capability that's always available
* Removed: Dependency on custom 'read_claws_data' capability for menu access
* Result: No more "Sorry, you are not allowed" errors when clicking Purralytics menu

= 2.0.85 - 2025-12-11 =
* MAJOR FIX: Added after_license_activation_url filter to prevent permission error
* Fixed: Redirects to plugins page after license activation (not admin page)
* Fixed: No more "Sorry, you are not allowed to access this page" after activating license
* Applies to: Both Purralytics menu gear icon AND "Activate License" link
* User now sees "Plugin activated" message and can navigate to Purralytics when ready

= 2.0.83 - 2025-12-11 =
* MONETIZATION MODEL: Changed to paid-only (no free trial)
* Changed: is_premium_only = true (license key required)
* Removed: All trial-related configuration and complexity
* Changed: pur_has_access() now checks for valid paid license only
* Changed: Upgrade screen now says "View Pricing & Purchase" (no trial language)
* Model: Two paid plans - Basic ($3.99/mo) and Deluxe ($9.99/mo)
* Result: Simple paid software - you want it, you buy it
* Kept: Activation redirect fix (no permission errors)

= 2.0.80 - 2025-12-10 =
* Added: "Mover & Shaker" award showing volunteer with most team memberships
* Added: Two-filter system for Volunteer Hours Summary (Type: Task/Team, Interval: None/Current Month/Last Month/QTD/Last Quarter/YTD/Last Year)
* Added: Export to Spreadsheet functionality for filtered volunteer hours data
* Enhanced: "Team Hours Summary" renamed to "Volunteer Hours Summary" for clarity
* Enhanced: Task view shows alphabetical volunteer list with total approved hours from all tasks
* Enhanced: Team view shows accordion with Team Lead highlighted and members sorted alphabetically
* Enhanced: Date filtering calculates proper ranges for quarters, years, and months
* Added: Three new REST API endpoints for mover-shaker and filtered volunteer hours
* Improved: Team hours now properly identify and highlight Team Lead role
* Improved: All volunteer lists sorted alphabetically for easy scanning
* Fixed: Hours display now shows decimal precision (e.g., 42.50 hrs instead of 42)

= 2.0.79 - 2025-12-10 =
* Fixed: Moved "Admin" configuration from separate menu item to Settings page tab
* Enhanced: Admin tab now appears alongside General, Colony, and Volunteer tabs
* Improved: Settings page navigation consistency
* Improved: User interface clarity for administrators

= 2.0.78 - 2025-12-10 =
* Added: Customizable contact attributes system for organizations
* Added: Admin configuration page for managing contact attribute types
* Added: Dynamic contact form checkboxes based on configured attributes
* Added: Dynamic filter dropdown on contact list view
* Added: Dynamic backend WordPress admin checkboxes for contacts
* Enhanced: Contact attributes now configurable instead of hardcoded (Donor, Special Skills, Potential Volunteer, etc.)
* Improved: Organizations can add/remove/edit attribute labels to match their workflow
* Improved: Single source of truth for contact attributes across frontend and backend
* Fixed: Contact form now generates checkboxes dynamically from settings

= 2.0.77 - 2025-12-10 =
* Added: 10 customizable contact attribute checkboxes on contact creation form
* Added: Filter dropdown on contact list view to filter by attribute
* Added: Attributes column showing colored badges for each contact
* Added: Backend WordPress admin meta box with attribute checkboxes
* Added: Counter showing filtered results on contact list
* Enhanced: Contact management now supports relationship classification
* Improved: Visual distinction between different contact types
* Improved: Admin can quickly identify contacts by their attributes

= 2.0.76 - 2025-12-09 =
* Added: Four new menu items under Purralytics (Volunteers, Contacts, Donors, Sponsors)
* Added: Meta boxes for backend editing of volunteer and contact records
* Added: Backend attribute management for volunteers and contacts
* Enhanced: Post type visibility configuration (show in admin, hide from menu)
* Improved: WordPress admin integration for volunteer management
* Improved: Direct access to volunteer and contact records from admin menu
* Fixed: Post type registration for better admin usability

= 2.0.74 =
* Added Edit/Delete functionality to volunteer list view
* Complete CRUD operations now available on all management systems
* Enhanced data management capabilities

= 2.0.73 =
* Streamlined contact list interface (elevation only via edit modal)
* Improved user workflow for contact-to-volunteer promotion

= 2.0.72 =
* Aligned volunteer form fields with contact form for seamless data transfer
* Zero data loss during contact elevation

= 2.0.71 =
* Complete contact management system with CRUD operations
* Soft delete functionality with reason tracking
* Contact elevation to volunteer workflow

= 2.0.70 =
* Enhanced sponsor form with website, amount asked, and notes fields
* Improved fundraising tracking capabilities

= 2.0.65-69 =
* Complete admin tab redesign with card-based layout
* Donor management system
* Sponsor management system
* Volunteer application processing
* Contact management foundation
* Enhanced view modals with full data display
* CSV export for all management systems
* Username auto-matching system
* Integration with WordPress user accounts

= 2.0.21 - 2025-12-04 =
* Added: Freemius integration with Basic and Deluxe plan tiers
* Added: 7-day free trial with full feature access
* Added: Trial countdown banner for trial users
* Added: Upgrade prompts and teasers for Basic plan users
* Added: Plan badge in WordPress admin dashboard
* Added: Feature usage analytics and tracking
* Added: JavaScript protection for plan-restricted features
* Added: Professional animations and UI polish
* Improved: User experience with clear plan differentiation
* Fixed: Minor UI inconsistencies

= 2.0.20 - 2025-11-15 =
* Enhanced: Colony history tracking with timeline view
* Added: Bulk export functionality for discharge data
* Improved: Mobile responsiveness across all screens
* Fixed: Date picker issues in Safari browser

= 2.0.19 - 2025-11-01 =
* Added: NeoNate feeding schedule templates
* Enhanced: Weight tracking with growth charts
* Improved: User role permissions system
* Fixed: Colony map marker clustering on zoom

= 2.0.18 - 2025-10-15 =
* Added: Custom fields for colony data
* Enhanced: Search and filter capabilities
* Improved: Performance optimization for large datasets
* Fixed: CSV export formatting issues

= 2.0.17 - 2025-10-01 =
* Initial public release
* Core features: Colony tracking, Intake/Discharge forms, NeoNate care
* User authentication and role-based permissions
* Basic analytics and reporting

== Upgrade Notice ==

= 2.0.80 =
Major enhancement to volunteer hours reporting! Adds Mover & Shaker award, comprehensive filtering system (type + time interval), export functionality, and improved team hour displays. Recommended for all Deluxe plan users.

= 2.0.79 =
UI improvement - Admin settings now properly located as a tab on Settings page. Minor but important navigation fix.

= 2.0.78 =
Game-changer for contact management! Contact attributes are now fully customizable. Organizations can define their own relationship types instead of using hardcoded options.

= 2.0.74 =
Major update with comprehensive management systems for donors, sponsors, volunteers, and contacts. Includes CRUD operations, data export, and workflow automation. Recommended for all users.

= 2.0.21 =
Major update! Adds Freemius integration with tiered plans, free trial, and extensive UX improvements. Backup before upgrading.

= 2.0.20 =
Adds colony history timeline and bulk export features. Recommended update for all users.

== Additional Information ==

= Requirements =
* WordPress 5.0 or higher
* PHP 7.4 or higher
* MySQL 5.6 or higher
* Modern web browser (Chrome, Firefox, Safari, Edge)

= Translations =
* English (US) - Default
* Translations welcome! Contact us to contribute

= Privacy =
Purralytics stores all data locally in your WordPress database. We do not collect or transmit any rescue data to external servers. The only external connection is to Freemius for license management and payments.

= Support =
* Documentation: Included in plugin
* Support:  Available at clawsva@gmail.com
* Premium Support: Available for Deluxe plan subscribers
* Email: Contact through Freemius dashboard

= Links =
* Website: https://clawsva.org
* Documentation: Included in plugin
* Support: https://freemius.com/

== Credits ==

Purralytics is developed by the CLAWS Organization team with support from cat rescue volunteers and TNR coordinators across the country. Special thanks to all the rescuers who provided feedback and feature requests during development.

Built with love for cats and the people who save them. 
