Proposal & payment workflow overhaul#69
Merged
Merged
Conversation
Copilot created this pull request from a session on behalf of
iaretechnician
June 1, 2026 20:26
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the multi-step proposal/approval process with a single canonical proposal object per customer request, with a linear flow: request → staff drafts proposal → customer views/accepts/requests changes → payment → work begins.
Data layer
data/payments.jsonstore;portalLoadPayments/portalSavePaymentshelpersportalGenerateUniqueProposalId()/portalGenerateUniquePaymentId()(date-prefixed:PROP-YYYYMMDD-XXXX)portalDefaultAdminSettings: nestedsandbox/livecredential sub-objects,modeenum (manual/sandbox/live), general fields (currency,payment_instructions,enable_webhook_logging, etc.)PORTAL_PAYPAL_WEBHOOK_LOGconstant; backward-compat fallback reads old flatstatusfieldStaff pages (new)
staff/proposals.php— pipeline list with status badges, bulk actionsstaff/proposal-edit.php— full editor: all proposal fields, dynamic milestone support (0–5), contract-required toggle, save-draft / send-to-customerstaff/proposal-view.php— read-only view with change requests panelstaff/proposal-send.php— setsproposal_status=sent, stampssent_at, fires emailstaff/payment-record.php— manual payment recorder; writespayments.json, advances proposal/milestone statusClient pages
client/proposal-view.php— full detail view: accept form (with checkbox confirmation), request-changes form (stores intoproposal.change_requests[]), conditional PayPal payment link based on configured modeclient/proposals.php— updated with "How This Works" steps, status cards, highlighted call-to-action per statusclient/proposal.php— now a redirect toproposal-view.phpProposal statuses
draft→sent→changes_requested→accepted→payment_pending→paid_start→in_progress→completed/cancelledPayPal webhook placeholder
paypal-webhook.php— logs raw POST payloads todata/paypal-webhook-log.json(gated onenable_webhook_logging), capped at 500 entries, returns 200. Stubbed TODOs for signature verification and transaction-to-proposal matching.Settings UI (
settings.php)••••shown after save; secret only overwritten on non-blank submit), general settings checkboxesDashboard (
dashboard.php)