=== TidyWeek ===
Contributors: twmaltd
Tags: tasks, to-do, planner, weekly, time tracking
Requires at least: 5.6
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 0.13.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A weekly task list inside the WordPress admin or on any page. Every person who is allowed to use it sees only their own tasks.

== Description ==

TidyWeek adds a TidyWeek item to the left-hand WordPress admin menu.

* Recurring tasks, reminders, a daily email digest, hourly rates with invoice totals, and optional team features (assign tasks to colleagues).
* Shortcode [tidyweek] shows TidyWeek on any page, with a WordPress login box for visitors.
* Weekly board with Monday to Sunday, Daily, Later and Completed rows.
* Subtasks, urgent tasks, projects, optional start and end times with totals.
* Summary panel: urgent tasks, project time, how busy each day is, general notes and a quote of the day.
* General notes page, preferences (rows, colours, track task times on or off) and a built-in guide.
* Each user's tasks, notes and preferences are saved in your site's database against their own user account. Nobody sees anyone else's, including administrators, inside the app.
* A website administrator chooses which user roles can use TidyWeek (the Admin button inside TidyWeek). The plain registered user role (Subscriber) is not offered.
* Everything you enter stays in your own site's database. The one exception: if you activate a Pro license key, this site checks in with TidyWeek's licensing server about once a day (sending the key and this site's web address) to confirm the subscription behind it is still active.
* Works with WordPress's Export and Erase Personal Data tools, and deletes a user's TidyWeek data when that user is deleted.

== Installation ==

1. In WordPress go to Plugins, then Add New Plugin, then Upload Plugin, and choose the zip file.
2. Press Install Now, then Activate.
3. Open TidyWeek, then click Admin, to choose which roles can use it. Administrators always can.

== Changelog ==

= 0.13.2 =
* Admin page: the Plan section's "Remove key" button is now "Cancel" and actually cancels the Stripe subscription behind the key (with a confirmation step first), instead of just forgetting the key on this site. A key with no Stripe subscription behind it (e.g. a free key) is simply removed, same as before.
* Admin page: the licensing and terms link moved from the top of the page to a button at the bottom; the support link moved out of the page itself and into the top navigation bar (top right, on every screen) and is now labelled "Support/Feedback".
* The "Plugin Update License Key" field's rejection message no longer mentions GitHub - it now just says the key doesn't work, since that field has nothing to do with Pro license keys and the old wording was confusing the two.

= 0.13.1 =
* The daily license check now also sends this site's web address, so the account holder can see which site each key is active on from the new tidyweeksite.app dashboard. No task, note or user data is ever included - just the key and the address, the same place the daily check already went.

= 0.13.0 =
* Dashboard: free plan now shows a note at the top explaining what's included and a button to upgrade to Pro (on the Admin page, points to Plan - no "buy me a coffee" link, just the upgrade path).
* License keys are now permanent: a Pro key no longer carries an expiry date or needs replacing when a subscription renews. Instead, this site quietly checks in with TidyWeek's licensing server about once a day to confirm the subscription is still active, and Pro switches off on its own (after a week's grace, in case of a brief outage) if it's ever cancelled. A new "Check now" button on the Plan section forces an immediate check. Keys issued before this update are no longer valid - none had been sold yet, only internal test keys.
* Removed a leftover free-plan limit of 3 projects per person from 0.11.0, which should have been removed in 0.12.0 when the free/Pro boundary changed to be based on features rather than project count - it had no effect going forward since nothing referenced it any more on the free plan, but it was still technically enforced and is now gone for good.

= 0.12.0 =
* The free plan is now just the taskboard (add, edit, tick off and delete tasks on Monday to Friday, Recurring, Later and Completed) plus General notes. Calendar, Preferences, Team features, Time tracking, Project Earning Reports, custom role access and email reminders/the daily digest all need TidyWeek Pro now - shown greyed out rather than hidden, so you can see what's there and nothing you've set is lost; it all switches back on the moment a Pro key is activated.
* Admin page: Plan and the plugin update key now sit in a row at the top of the page, ahead of Usage. Hourly rates and currency has moved into the same card as Projects and time tracking, so the two grey out together on the free plan.
* Preferences page is now fully Pro-gated: on the free plan every row shows greyed out, with Monday to Friday, Recurring and Later switched on, Saturday and Sunday off, and every other toggle (Quote of the day, Track task times, Email reminders, Daily email digest) shown on. Your own saved choices are kept and come back once Pro is active again.
* Calendar is now a Pro feature: visible from the nav bar on the free plan, but greyed out and read-only until Pro is active.
* The Guide button has moved to the end of the top nav bar, after Admin, and the guide has been updated throughout for the new free/Pro boundary.
* The in-plugin guide now opens with a "Free and TidyWeek Pro" section explaining what's included in each plan.

= 0.11.3 =
* Per-task time tracking ("Track this task's time?") is now a Pro feature, matching the rest of the free/Pro plan. On the free plan the tickbox is shown greyed out (not hidden) with a note that it needs Pro, and a task that already had tracked time keeps showing and can still be edited - this only stops switching tracking on for a task that never had it.
* The Admin page's "Projects and time tracking" section (and Project Earning Reports within it) now shows its controls on the free plan too, greyed out, with a note that it needs Pro, instead of only failing silently when you tried to download.

= 0.11.2 =
* Fixed: ticking "Track this task's time?" on a task, without filling in a start or end time straight away, now actually saves. Previously it only "stuck" if you entered a start or end time before saving, so a task you meant to come back to later and time properly reverted to untracked. You can now tick it, save, and come back later to fill in the times from the day view.

= 0.11.1 =
* Pro license keys now carry a built-in expiry date and are checked fresh every time, so a yearly subscription naturally lapses on its own (no contact with any outside server either way). The Plan section shows the current key's "valid until" date, or an expiry date and a prompt to renew once it has passed.
* Keys issued before this update are no longer valid - none had been sold yet, only internal test keys, which have been replaced on the Admin page's test instructions.

= 0.11.0 =
* TidyWeek now has a free plan and a Pro plan. The free plan covers everything except Team features, Time tracking downloads, Project Earning Reports, custom role access (other than Administrators) and the daily email digest, and is capped at 3 projects per person. A license key on the new "Plan" section of the Admin page unlocks Pro.
* A site that was already using one of those features before this update gets a 30-day notice period with everything kept working, plus a "download all your data" CSV link on the Admin page during that window.

= 0.10.19 =
* License/Terms and new Support/Request pages now share a top navigation bar and use the full content width.
* Added a Support / Request form (Name, Email, Message) on the Admin page, emailed to TWMA through the site's own WordPress mail setup.

= 0.10.18 =
* License/terms page now shows the contact email and effective date.

= 0.10.17 =
* Added a License Agreement / Terms of Use page, linked from the bottom of the Admin page.

= 0.10.16 =
* Each release now ships with a TWMA Ltd ownership notice and a per-build fingerprint, and the plugin's JS is minified (comments and formatting stripped) before packaging.

= 0.10.15 =
* Customer name explainer now sits under each customer name field (small, italic). Invoice total made bold with more space above.

= 0.10.14 =
* Invoicing section renamed "Project Earning Reports"; intro text updated. Accounting-software fields stay hidden.

= 0.10.13 =
* Accounting section: the accounting software choice is hidden for now, so only the two Basic CSV downloads are offered. The customer name you type is now included in both Basic CSVs (a new "Customer name" column; blank uses the project name). "Save invoicing settings" is now "Save settings".

= 0.10.12 =
* Accounting section: the customer column heading is now "Customer Name", with a note underneath explaining what to enter.

= 0.10.11 =
* Accounting software now starts on None (anyone who has already chosen a system keeps it), None is first in the list, and the customer name boxes match the other entry fields.

= 0.10.10 =
* Admin accounting section: fixed it getting stuck on "Loading..." the first time the Admin page was opened (the Accounting software choice and invoice boxes now always appear).

= 0.10.9 =
* The Plugin Update License Key box now uses the same style of entry field as the hourly rate boxes.

= 0.10.8 =
* Admin page: new "Plugin Update License Key" box at the top. Paste a read-only GitHub key there so this website can keep checking for and installing updates once the GitHub project is made private. It says whether GitHub accepted the key. Without a key, updates still use the public page.

= 0.10.7 =
* Admin accounting section: new "None" choice in Accounting software. With None, the Country and Date layout boxes, the import note, the invoice boxes and the invoice CSV button are hidden; the project list, Save button and the two Basic CSV buttons stay.

= 0.10.6 =
* Admin page: "Hourly rates and currency" now sits above "Projects and time tracking" (which holds the accounting section).

= 0.10.5 =
* Accounts section: two new buttons, "Download Projects Basic CSV" (each project with its tasks, times, rate, amounts, dates and who completed them) and "Download Tasks Basic CSV" (every task with its sub tasks underneath). Sub task times are kept from now on, so older tasks list without sub task lines until they are opened again.

= 0.10.4 =
* Every start and end time (task window, subtasks, task rows) is now chosen from an hour box and a minutes box that close as soon as you choose, instead of the browser's clock picker.

= 0.10.3 =
* Calendar windows: start and end times are now chosen from an hour box and a minutes box, which close as soon as you choose (the browser's own clock picker stayed open).

= 0.10.2 =
* Calendar windows: the Save button now matches the other buttons, and the time picker closes once the minutes are chosen.

= 0.10.1 =
* Recurring is now listed by the next date each task falls on, and Later by its date.
* Calendar: click a task shared with you to add notes, set times or mark it complete.
* When someone completes a task assigned to them, a line "Completed by their name" is added to its notes (removed again if they untick it).

= 0.10.0 =
* The dashboard is now a rolling cycle: today first, then the following days (only the days switched on in Preferences, up to a week ahead) with each day's date, then Recurring, Later and Completed. When a day finishes it moves to the end as next week's day.
* Each day shows the Recurring tasks that fall on it and any Later tasks dated for it (marked "From Later"; they stay in Later too).
* A task not finished by the end of its day moves to the first day shown and is marked Urgent.
* The calendar follows the same dates.

= 0.9.3 =
* The calendar's Add Item and Add Task buttons now match the other buttons. On desktop every drop-down shows the same arrow, 12px in from the right edge, like the Projects drop-down.

= 0.9.2 =
* Calendar: back to the 0.9.0 item window. Two buttons now: "+ Add Item" (meetings, birthdays and so on) and "+ Add Task", which opens the standard Add Task window.

= 0.9.1 =
* Calendar: the button is now "+ Calendar item" and you choose Task, Meeting or Special Occasion. A task goes into its day's row if the date is in the current week, otherwise into Later with that date. Special Occasions default to repeating yearly and show in pink.

= 0.9.0 =
* New Calendar button: day, week, month and year views. Add your own events (meetings, birthdays and so on, with optional times, weekly/monthly/yearly repeat and an end date). Events never appear in the weekly rows. Your tasks also show: this week's tasks on their day, Later tasks on their due date, recurring tasks and tasks shared with you.
* Email reminders for events: up to 3 per event (on the day, 1 day, 1 week or 1 month before), sent in the morning at your daily-email time.
* Everything calendar related is marked CALENDAR in the code so it can be removed as a unit.

= 0.8.2 =
* Recurring tasks can now track their own time: "Track this task's time?" with start and end times (unless the task is made of subtasks, which carry the times instead). The times are copied into the Completed record when you tick the task and clear when a new round starts.

= 0.8.1 =
* Recurring tasks: for "Every month" the weekday is now chosen first, then which one in the month (1st to Last). The yearly weekday box is now labelled "If the date falls on a day which isn't good for you".

= 0.8.0 =
* Recurring tasks now also show in the board row of the day they fall on this week, marked Recurring: every day (daily), Monday to Friday (weekdays), the chosen day (weekly), the chosen weekday of the month (monthly) or the chosen date (yearly). Tick them there or in the Recurring row.
* New "Every year" repeat: pick a month and day, and optionally "or the first following Monday" (or any weekday).
* The daily email lists weekly, monthly and yearly recurring tasks only on the day they fall.

= 0.7.1 =
* Recurring tasks: "Every month" now has two choices, which one (1st, 2nd, 3rd, 4th or Last) and which weekday, for example the 2nd Wednesday of every month. "Last" covers months with five.

= 0.7.0 =
* Recurring tasks: choose "Every week" and pick the day of the week it falls on (for example Wednesday). The task starts again on that day each week.
* Recurring tasks: "Do you have an end date?" Pick the last day a recurring task repeats. After it, the task stops starting again and is left out of the daily email.

= 0.6.3 =
* Invoicing: settings saved by earlier versions (item name "Hours", tax code 20%, tax rate 20) now show as blank with the grey hint text instead.

= 0.6.2 =
* Invoicing: Product/Service name starts blank (grey suggestion "Your Service Title"). Tax is called VAT, GST or Sales tax to suit the country, with European countries added. Tax rate and tax code start blank for the admin to fill in.

= 0.6.1 =
* Invoicing: the tax rate box is hidden for Xero, which does not use it.

= 0.6.0 =
* Invoicing: choose the accounting software (QuickBooks Online, Xero, Zoho Books, Invoice Ninja) and country. The CSV layout, date layout and suggested tax wording follow the choice. Only the QuickBooks (UK) layout has been checked against a real sample file.

= 0.5.2 =
* Invoicing: new "Item description" setting with grey suggested text "Work carried out on [Project Title]". Task names are no longer put in the description automatically.

= 0.5.1 =
* Invoicing: the Product/Service name now starts as "Your Service Title" (change it to the item name you use in QuickBooks).

= 0.5.0 =
* New: Invoicing (admin only). Under Projects and time tracking, make a QuickBooks invoice import CSV: one invoice per project for the month, one line per completed task. Settings: next invoice number, prefix, payment terms, item name, tax code and rate, memo, and the customer name for each project.

= 0.4.4 =
* Admin: the two download buttons now sit side by side, left-aligned under the Month box.

= 0.4.3 =
* A "Check for updates" link under TidyWeek on the Plugins page checks GitHub straight away and says what it found (or why it could not).

= 0.4.2 =
* Time tracking CSVs show time as text such as "1h 4m" in a "Time" column, so Excel and Google Sheets no longer turn it into a clock time.

= 0.4.1 =
* Fix: the time picker closes once the minutes are chosen, and the click that closes a picker no longer opens the task or the Team page.

= 0.4.0 =
* Updates now arrive from the TidyWeek GitHub project as a normal "update available" notice on the Plugins page; settings and users are kept.
* Fix: a person a task is assigned to now has a clear "Edit notes" button with Save and Cancel (on their board and on the Team page).

= 0.3.8 =
* A person a task is assigned to can edit its notes and set its start and end times from their own board.

= 0.3.7 =
* "How busy are you" now includes tasks assigned to you.
* Time tracking downloads moved to the Admin page (Projects and time tracking) and are administrator-only. Choose month, year and project; download all tasks or projects only. Includes everyone's tracked tasks, even after Completed has been cleared.

= 0.3.6 =
* Hourly rates and currency moved to the Admin page and are now set once, site-wide, by an administrator only.

= 0.3.5 =
* "Track task times" in Preferences is now only shown to administrators.
* On a web page the TidyWeek background is transparent, so it can be styled in Elementor.
* Task notes wrap onto new lines instead of being cut off; narrow pages use the stacked task layout.

= 0.3.4 =
* Team features are now switched on or off for the whole site by an administrator only (Admin screen). The per-person preference is gone.
* In Admin Usage, a person's open and completed counts now include tasks assigned to them.

= 0.3.3 =
* Fix: a task shared or assigned to someone now appears on that person's own board (in its day row, marked "Assigned by"), even if their Team features are off.

= 0.3.2 =
* On a page (shortcode), TidyWeek no longer scrolls inside its own frame: the frame grows to fit and the whole page scrolls. Pop-up windows appear where you are looking.

= 0.3.1 =
* Menu item renamed TidyWeek. Guide updated for every new feature. Full security review of the new features.

= 0.3.0 =
* Recurring tasks: the Daily row is now Recurring. Each task repeats every day, weekday, week or month, clears its ticks when a new round starts, and logs to Completed when ticked.
* Hourly rates per project (and a default), with an invoice total in the Download Time Tracking box and Rate and Amount columns in the CSV.
* Reminders: set a date and time on a task and get an email, plus a Reminders box in the app.
* Daily email digest of today's tasks, with a "Send me a test email" button in Preferences.
* TidyWeek: today box on the WordPress Dashboard.
* Team features (switch on in Preferences): assign a task to another TidyWeek user, a Team page, and an Assigned to you box.
* Admin: open and completed tasks per person and per project (project names are listed for people who use Team features unless an administrator chooses otherwise), and a switch to allow or stop emails.

= 0.2.0 =
* New [tidyweek] shortcode: put TidyWeek on any page, including Elementor pages. Signed-out visitors get a WordPress login box; signed-in people with access see their TidyWeek.

= 0.1.9 =
* "How busy are you" box now has a second pie: active vs completed tasks.

= 0.1.8 =
* Clear completed tasks button in the time sheet box; drop-down arrows moved in.

= 0.1.7 =
* Time sheet is hidden when Track task times is off, and only includes tasks with tracked time.

= 0.1.6 =
* Download Time Tracking box (month, year, project, CSV) above the completed tasks on the Completed row and on each project page.

= 0.1.5 =
* Project hours for invoicing in the Completed row: month and year picker, per-project totals, CSV downloads, and a permanent hours record.

= 0.1.4 =
* Task rows only show start and end time boxes when the task tracks time.

= 0.1.3 =
* Security hardening: ids are restricted to safe characters on the server and in the app, and blank index files added to the plugin folders.

= 0.1.2 =
* Access sub menu removed; roles and the delete-data option now live in the Admin page. Full-width Admin page with user name, last seen/status, tasks, completed and projects. Menu item renamed My Dashboard.

= 0.1.1 =
* New Admin button inside TidyWeek (website administrators only): usage, role access, and a named list of users with on/off switches.

= 0.1.0 =
* First release.
