Skip to content

Unify request intake workflow and replace Estimate/Contract split with Project Request → Proposal → Project Agreement#61

Merged
iaretechnician merged 1 commit into
unstablefrom
copilot/cleanup-runlevel-dashboard
May 31, 2026
Merged

Unify request intake workflow and replace Estimate/Contract split with Project Request → Proposal → Project Agreement#61
iaretechnician merged 1 commit into
unstablefrom
copilot/cleanup-runlevel-dashboard

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 31, 2026

This PR consolidates the dashboard and intake pipeline around one customer-facing flow: Project Request → Proposal → Project Agreement → Payment/Approval → Work. It removes overlapping request concepts, standardizes IDs as Request ID, and makes proposal/agreement generation editable, linked, and role-visible.

  • Workflow + terminology unification

    • Replaced dual “Estimate Requests”/“Project Requests” handling with a unified project request model.
    • Standardized display/usage on Request ID across request, proposal, and agreement flows.
    • Added backward-compatible normalization so legacy estimate_id records continue to load/display as request IDs.
  • Data model + persistence

    • Added first-class JSON stores:
      • data/project_requests.json
      • data/proposals.json
      • data/project_agreements.json
    • Extended portal helpers to load/save unified records and to link proposals/agreements back to request origin.
    • Kept legacy estimate_requests.json readable during transition.
  • Public intake + messaging updates

    • Reworked estimate.php into a Project Request entry point (same route, updated language and fields).
    • Updated confirmation and email copy to reference Request ID and the new process expectations.
    • Updated public proposals.php, contracts.php (Project Agreements messaging), and payments.php to concise, professional workflow-aligned content.
  • Staff workflow implementation

    • Rebuilt staff request detail/list (staff/estimate-requests.php) as the unified Project Requests module with:
      • expanded request metadata,
      • staff-editable estimate/summary/next-step/internal fields,
      • normalized status set,
      • actions to create proposal/agreement, email customer, and print.
    • Added editable generation flows:
      • staff/create-proposal.php?request_id=...
      • staff/create-agreement.php?proposal_id=... (and request-based fallback)
    • Added draft/save/reopen/edit/send/print behavior for both proposal and agreement forms.
  • Client dashboard/view alignment

    • Updated dashboard role cards to remove duplicate request cards and reflect unified modules.
    • Added/updated client views for request/proposal/agreement listing and read-only detail pages:
      • client/request.php
      • client/proposal.php
      • client/agreement.php
    • Surfaced linked proposal/agreement context from each client request.
  • Routing + legacy surface cleanup

    • Redirected legacy pages to new canonical paths (old template/request entry points now route to unified pages).
    • Preserved existing visual system (dark/cobalt/gold) while reducing mobile card density and oversized module weight.
// includes/portal-helpers.php (core compatibility pattern)
function portalGetRequestDisplayId(array $request) {
    $requestId = trim((string)($request['request_id'] ?? ''));
    if ($requestId !== '') return $requestId;

    $estimateId = trim((string)($request['estimate_id'] ?? ''));
    if ($estimateId !== '') return $estimateId;

    return 'Legacy Request';
}

@iaretechnician iaretechnician marked this pull request as ready for review May 31, 2026 14:19
Copilot AI review requested due to automatic review settings May 31, 2026 14:20
@iaretechnician iaretechnician merged commit 8d9d424 into unstable May 31, 2026
@iaretechnician iaretechnician deleted the copilot/cleanup-runlevel-dashboard branch May 31, 2026 14:20
Copilot AI review requested due to automatic review settings May 31, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants