=== PaintClarity ===
Contributors: paintops, freemius
Tags: painting, contractor, estimates, scheduling, invoicing
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.000
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Run your painting business from WordPress: quotes to invoices, crews, scheduling, customers, photos, profit reports, optional AI and card payments.

== Description ==

**PaintClarity turns your WordPress site into the back office for your painting business.** *(PaintClarity was formerly known as PaintOps. Same plugin, same team, same data.)* Build professional quotes, send them to customers who can view, e-sign, and pay a deposit online, schedule crews on a calendar, track every job from lead to invoice, and, on Pro, see your real profit per job, per crew, and per worker.

It was built by a painter, for painters. The quote builder understands painting scope: interior/exterior components, standard inclusions and exclusions, and the disclaimer language that keeps you out of disputes. Your data lives in your own WordPress database, not locked inside someone else's SaaS.

= Quote to invoice, start to finish =

* **Quotes, estimates & bids**: a scope-aware builder with reusable inclusions/exclusions, itemized or lump-sum pricing, printable output, and email delivery.
* **A professional customer page**: your customer opens a clean, branded page (your logo, your terms & conditions) and accepts by typing their name, an e-signature-grade record with timestamp. They can also decline with a reason, or ask a question, and you're notified either way.
* **Acceptance converts the quote to a job automatically**, whether they paid a deposit online or you shook hands, and a "Mark as Won" button covers the phone call.
* **Invoices**: numbered invoices for the balance (full or partial), emailed or shared by link, payable online (Pro + Stripe) or marked paid for check/cash, with the payment logged so balances always agree.
* **Receivables at a glance**: unpaid invoices surface on your dashboard with amounts and age.

= Running the work =

* **Scheduling calendar** with crew filtering, worker badges, time-off, and a subscribe link for Google/Apple/Outlook. Add your own recurring holiday labels.
* **Crews**: group your painters into named, colored crews; staff a job with one tap and filter the calendar and reports by crew.
* **Job board / pipeline**: Quote → Active → Completed, plus a lost-leads drawer with the customer's decline reason so you can revive the ones worth re-working.
* **A real app for your painters**: install-to-home-screen (PWA), a "My Jobs" home, one-tap directions (Google/Apple/Waze), per-job check-in/out that works offline and syncs, photo/receipt/note logging, a "My Hours" view of their own time and pay, and a "Mark Job Complete" button that notifies the office. Workers see only what their permissions allow, never your numbers.
* **Customers**: a directory with contact details, lifetime value, job history, and **multiple service addresses per customer**, built for landlords, realtors, property managers, and GCs whose one account means a dozen properties.
* **Before/After photos** with camera alignment overlay and a compare slider.
* **Trade calculators, paint-color tracking, and resource links.**
* **A choice of visual themes** (light, dark, industrial, and more) with a modern app-style navigation bar on desktop and phone.

= What Pro adds =

* **Job financials & profitability**: costs, materials, labor hours; gross, expenses, profit, and margin per job; a Profits dashboard with profit-by-classification, profit-per-hour rankings, and **profit by crew and by worker** (allocated by logged hours).
* **Expenses & receipts** against any job, plus business-level and vehicle expense tracking for tax time.
* **Online payments**: deposits on quote acceptance and invoice balances through Stripe Checkout, recorded automatically.
* **AI tools (bring your own OpenAI key)**: estimate dimensions, gallons, and a Description of Work from a photo; scan receipts to auto-fill expenses; get feedback on or a rewrite of your quote wording.

Pro is a paid upgrade handled through Freemius. The free plugin is fully functional on its own; Pro is optional.

== External services ==

This plugin can connect to the following third-party services. Some are optional and only run when you enable and configure the corresponding feature.

**OpenAI (Pro AI features, optional).** When you use an AI feature (Photo Estimate, Receipt Scan, Description-of-Work Feedback or Rewrite), the plugin sends the relevant input, the photo you choose to upload and/or the quote text you are working on, to the OpenAI API using **your own** OpenAI API key, and receives the generated result. No data is sent unless you click one of these buttons. PaintClarity does not store the photo. Requests go to https://api.openai.com. See OpenAI's Terms (https://openai.com/policies/terms-of-use) and Privacy Policy (https://openai.com/policies/privacy-policy).

**Stripe (Pro online payments, optional).** If you enable card payments and a customer pays online, the plugin creates a Stripe Checkout session and verifies Stripe's webhook using your own Stripe keys. Order/amount details are exchanged with Stripe to process the payment. Requests go to https://api.stripe.com. See Stripe's Services Agreement (https://stripe.com/legal/ssa) and Privacy Policy (https://stripe.com/privacy).

**Google Maps Platform (optional).** If you add a Google Maps API key, address fields use Google Places/Geocoding for autocomplete and validation, and job locations may be shown on an embedded map. The address text you type is sent to Google to return suggestions. Requests go to https://maps.googleapis.com and related Google Maps endpoints. See Google's Terms (https://cloud.google.com/maps-platform/terms) and Privacy Policy (https://policies.google.com/privacy). (One-tap turn-by-turn Directions for your crew use keyless map links and need no API key.)

**YouTube and Vimeo (Resources page video embeds, optional).** The Resources page (staff-facing, inside your admin area) lets you save links to training videos, and seeds a starter list of publicly available painting tutorials on YouTube. When a staff member clicks a saved YouTube or Vimeo link's play button, the video is embedded on the page via the provider's standard embed player (www.youtube.com / player.vimeo.com), which loads content from that provider and is subject to its terms; no data is sent until the play button is clicked, and you can delete any or all saved links. See YouTube's Terms (https://www.youtube.com/t/terms) and Google's Privacy Policy (https://policies.google.com/privacy), and Vimeo's Terms (https://vimeo.com/terms) and Privacy Policy (https://vimeo.com/privacy).

**Freemius (licensing & updates).** PaintClarity uses the Freemius SDK to manage Pro licenses, deliver Pro updates, and (optionally) collect anonymous usage diagnostics you can opt out of. Site and license information is exchanged with Freemius. See Freemius's Terms (https://freemius.com/terms/) and Privacy Policy (https://freemius.com/privacy/).

You control every one of these by whether you enter the corresponding API key and enable the feature. With no keys entered, PaintClarity runs entirely on your own site.

== Installation ==

1. Install PaintClarity from the Plugins screen (Plugins → Add New → search "PaintClarity"), or upload the plugin ZIP under Plugins → Add New → Upload Plugin. Activate it.
2. Create a WordPress Page and add the shortcode `[paintops_app]`. This one page is your whole PaintClarity app; it routes internally.
3. Go to **PaintClarity → Settings** and set your Company Profile (business name, logo, country, currency), and review the Setup Health panel.
4. (Optional) Add team members under **PaintClarity → Painters/Helpers**, set their permissions, and group them into Crews.
5. (Optional) Add your Quote Terms & Conditions under Business Settings so customers see and sign against them.
6. (Optional, Pro) Under **Settings → AI Settings** connect OpenAI, under **Stripe Payments** add your Stripe secret key AND webhook signing secret (both are required before online payment buttons appear), and add a Google Maps API key for address autocomplete.

== Frequently Asked Questions ==

= Do I need a paid account to use it? =
No. The free plugin runs entirely on your own WordPress site and lets you quote, schedule, and manage unlimited jobs. Pro is an optional upgrade.

= What happens to my data if I deactivate or delete the plugin? =
Nothing is deleted. Your jobs, quotes, customers, payments, hours, and photos stay in your WordPress database, so nothing is lost if you deactivate temporarily or reinstall later. If you truly want the data gone, delete the plugin's tables and its uploads from your database and media library.

= Does it work without OpenAI, Stripe, or Google Maps? =
Yes. Those are optional integrations. If you don't enter their keys, the related features simply stay off and everything else works, including keyless turn-by-turn directions for your crew.

= Can my customers really sign a quote online? =
They accept by typing their full name, which is stored with a timestamp and IP address alongside your Terms & Conditions, a solid acceptance record. They can also decline with a reason, and change their minds later.

= Who pays for the AI usage? =
You do, through your own OpenAI account and key, typically a fraction of a cent to a few cents per action. PaintClarity adds per-month usage caps you control so costs stay predictable.

= Can my painters log in without seeing my numbers? =
Yes. Painters/Helpers get a dedicated role with opt-in permissions and their own app view: My Jobs, My Hours (their own time and pay only), directions, check-in/out, photos and receipts. Financial figures are owner-level and hidden from workers unless you explicitly grant access.

= Does it work in the field with bad reception? =
The app installs to a phone's home screen, and Time Clock check-in/out keeps working offline and syncs when a connection returns.

= Where is my data stored? =
In your own WordPress database. PaintClarity doesn't host your business data on an external server.

== Screenshots ==

1. The quote/estimate builder with scope components and inclusions/exclusions.
2. The customer's accept page: branded, e-signed, with online deposit.
3. The scheduling calendar with crews, worker badges, and holiday labels.
4. A painter's phone view: My Jobs, directions, and offline check-in.
5. The Profits dashboard (Pro) with profit by crew and worker.
6. An invoice with online payment and mark-as-paid.
7. Settings: Company Profile, Appearance themes, Stripe, and AI.

== Changelog ==

= 1.1.000 =
* A visual refresh across the whole app. The menu is now a dark navy rail with the PaintClarity mark at the top, and the page you are on is marked with a blue bar rather than a filled pill.
* Every screen now has a proper page header: the screen name, a thin rule under it, and, where the page already knows it, a short line of context such as how many customers are listed or which year the Profits page is showing.
* Text sizes are consistent everywhere. Helper sentences used to render at whatever size your WordPress theme happened to use, which on many themes made them larger than the headings above them.
* Money columns in every table now line up on the right with their decimal points stacked, so a column of figures can be read down.
* Buttons now have three clear levels: one solid action per screen, bordered buttons for everything secondary, and plain links for the rest. Previously almost every button looked equally important.
* The job stat tiles lead with Profit, marked with a rule across the top. On some themes the old highlight made the most important figure look like the faded one.
* Cards and tables are flatter and tighter, with a hairline border instead of a shadow. Shadows are now used only for menus and panels that genuinely float above the page.
* Keyboard users get a clear focus outline on every control in the app.
* The company logo you upload is unchanged everywhere it belongs: quotes, invoices, expense reports and your customer payment pages. Only the app menu shows the PaintClarity mark.
* Accessibility: icons, the job search box and the phone menus now keep their screen-reader attributes, which WordPress had been stripping. Form fields across the app that had no label now have one.
* Editing a customer's address from the Customers list now opens the full Edit Customer form instead of a small editor inside the row. One form, one save, one set of rules, so the two can never drift apart.
* Fixed a typo in one of the starter Resource links, "12 Mistakes That Loose Sales". New installs were already correct; sites set up before the fix have the title corrected automatically, and if both spellings ended up on your site the misspelled one is moved to the trash where you can still get it back.

= 1.0.301 =
* The Actions menu on the jobs list now opens as a dropdown over the page, lined up under the Actions link you tapped, instead of opening at the far left of the card and pushing every row below it down. Click anywhere outside it, or press Escape, to close it.
* New: "Invoices" in the job actions menu, right above Job Financials, so a job's invoices are one tap away instead of something you scroll for.
* The app icon, and the sidebar logo when you have not set your own, now use the PaintClarity artwork. If you already added the app to a phone's home screen, remove it and add it again to pick up the new icon.
* Fixed: the bottom navigation bar is back on phones. The sidebar layout was hiding it on every screen size, and since the sidebar itself slides away behind the menu button on a phone, that left phones with no navigation bar at all.

= 1.0.300 =
* The job actions menu (Directions, Add Expense, Edit Job, and so on) is now a compact dropdown instead of a full-width panel.
* Scheduling a follow-up now shows the right fields for the visit type you pick: Add-On Work goes straight to the agreed-price field since it's always billable, while Callback and Punch List keep the optional "billable" checkbox for the occasional paid touch-up.

= 1.0.299 =
* New installs now open the jobs list in Board view by default. Existing sites keep whatever view they're using; you can switch any time with the Row/Board toggle.
* Business page: the "Include jobs marked exclude from reports in these stats" toggle now also folds those jobs back into the Income, Job Materials and Total Deductions tiles while it's on. This is an on-screen view only; the coversheets and Business Financial Report still never include excluded jobs.
* Company Profile: the Website field now accepts a plain domain (like yourcompany.com) instead of demanding a full https:// address, so the profile saves cleanly. The address is normalized for you when it's used as a link.
* Removed the stray "+" from the "New Note" button on Business Notes.
* Resource link names carrying the old product name are updated to the current name automatically on upgrade.
* Search Jobs: results now sort by schedule date with the most recent first by default, the sort option reads "Schedule Date", and the tinted background on result cards was removed for a cleaner list.
* After marking a quote as won, the confirmation now offers a direct link to set the job's schedule.

= 1.0.297 =
* New installs now place the in-app workspace page at the /paintclarity/ address (existing sites keep their current page and address).
* Added a "WP Admin" link in the app sidebar footer for administrators, handy since the full-screen app hides the WordPress toolbar.
* The private workspace page and the WordPress login page are now marked no-index and kept out of the XML sitemap, so they no longer get picked up by search engines.

= 1.0.296 =
* PaintClarity: the plugin is now called PaintClarity (formerly PaintOps). Same plugin, same team, same data. Only the name and branding changed. All your jobs, quotes, customers, crews, and settings stay exactly where they are, and updates continue to arrive automatically as always.

= 1.0.295 =
* Fixed: some in-app cards (including the painter "My Jobs" home screen) could show overlapping text on certain sites, because an inline display style was being stripped by WordPress's HTML sanitizer. The cards now render correctly.
* Fixed: add-on and follow-up visit jobs now show their dollar value on the Job Board. Previously the Value column was blank when the amount came from the Financials page instead of a quote.
* Fixed: opening a job that had no scheduled arrival time (or was not scheduled yet) could show a blank page. The job view now renders in every case.
* Hardening: the Time Off page no longer errors if a stored date is malformed.

= 1.0.294 =
* New: a per-user option on the Profits and Business pages to include jobs marked "exclude from reports" in the on-screen stats. It is saved per user and remembered.
* Note: your Business Financial Report / accountant sheet never includes these excluded jobs, regardless of this setting; it only changes what you see on the dashboards.

= 1.0.293 =
* New: the Row view now has a per-row Actions menu (Mark Completed, Back to Request, and the usual job actions), matching what the Board offers, styled to fit the row rather than as buttons.
* Improved: link colors are now consistent across the app; job titles in the Row view use the same accent color as everywhere else.
* Changed: removed the search box from the Jobs page, since the search now lives in the app-wide top bar.

= 1.0.292 =
* New: the job search box now lives in the top bar next to + New, so you can search from anywhere in the app, not just the Jobs page.
* Improved: the Schedule a Callback / Punch List Visit page now carries the same job section menu as the rest of a job's pages, instead of a lone back link.
* Improved: on the quote builder, the AI Photo Estimator and the AI feedback / rewrite / materials buttons are tucked into a single "AI Tools" drawer, keeping the Description of Work area clean.

= 1.0.291 =
* New: the Jobs page search box is now a live search. Type three or more characters to see matching jobs as you type, and pick one to jump straight to it.
* New: an "All Fields" search option that matches your term across customer name, email, address, phone, job title, and job number at once. Pressing Enter in the live search runs a full All-Fields search.

= 1.0.290 =
* Fixed: on mobile, the menu (hamburger) button is now a crisp, high-contrast icon that no longer depends on a web font loading, so it's always clearly visible.
* Fixed: app icons could render blank on some screens (and inside the installed app), which made the app look half-styled; the icon font is now loaded on every app screen.

= 1.0.289 =
* Added: a Search button at the top-right of the Jobs page that opens the full Completed & all-jobs search.
* Fixed: on the Board view, the "Completed & all jobs" link is back, and the Board/Row toggle now matches the same clear accent-link style as the rest of the footer.
* Fixed: on the Seaside theme, the Board/Row switch link was hard to read and vanished on hover; it now stays a legible accent color, hover included.

= 1.0.288 =
* Improved: the job actions menu now appears on the Job View page too (with "View Job" marked as the current page), so it's identical across every job section.
* Changed: renamed the menu's "Job" tile to "View Job".
* Fixed: on a job's sub-pages, the More Actions menu now stays collapsed by default (its tile is highlighted when the current section lives inside it) instead of opening automatically.
* Added: the Job Profit Report Summary now shows an "Admin only" note above the figures, making clear your painters can't see profit numbers.

= 1.0.287 =
* Improved: on the Profits page, This Year and Last Year now line their columns up exactly, so the two years are easy to scan and compare side by side.
* Improved: the Job View action icons (Directions, Add Expense, Notes & Photos, More Actions) now match the crisp line-icons in the main menu.
* Improved: every job section (Add Expense, Notes & Photos, Financials, Edit, and the quote view) now carries the same job actions menu with the current section highlighted, instead of a lone back link, so moving between a job's pages is one consistent, permission-based menu.
* Improved: when a quote's More Actions has only one option (Replace Quote), it now shows as a plain action instead of a single-item dropdown.

= 1.0.286 =
* Improved: the Profits page is redesigned to read at a glance. Each year now leads with a single Profit figure and lists the rest as light supporting stats instead of a row of boxed tiles, This Year and Last Year share the same layout for easy comparison, and the Profit-per-hour ranking cards use a compact stat line.
* Improved: unified the link styling in the Jobs list footer so the "Completed & all jobs" link and the Board/Row view toggle match.

= 1.0.285 =
* Improved: section headers (like the dashboard's "Today" bar) are now a clean bold heading instead of a boxed, accented bar, so they guide the eye without over-drawing attention.

= 1.0.284 =
* Improved: the sidebar layout now keeps content in a comfortable, compact column instead of stretching edge to edge, so pages read cleaner on wide screens. Wide tables still scroll on their own when needed.

= 1.0.283 =
* Fixed: the dashboard "Unpaid Invoices" receivable now reflects payments you've recorded anywhere, not just the invoice's own "Mark as Paid". Recording a payment in a job's Payments log now reduces (or clears) what that invoice shows as outstanding, so a partly paid invoice shows the real balance and a fully paid one drops off. When a payment covers the job in full, its invoice is also marked paid automatically.
* Improved: the Jobs list rows now show small Crew, Date, and Value labels above those columns, so the numbers on the right aren't ambiguous.

= 1.0.282 =
* Improved: filing a receipt now highlights Expenses in the sidebar (both the File a Receipt page and a job's Add Expense screen), so it's clear where you are.
* Changed: Outstanding Balances moved from the Profits page to the Business page, where the rest of your money and tax sections live.

= 1.0.281 =
* Changed: the Sidebar layout is now on by default, so the app opens in the cleaner full-screen sidebar view with no site header. You can switch back to the classic top-bar layout any time at Settings > Appearance > Navigation > Layout.

For the full release history, see changelog.txt in the plugin folder.
