build out mock views
This commit is contained in:
parent
6dac3bfb02
commit
403b29a8b8
12 changed files with 1066 additions and 70 deletions
|
|
@ -5,29 +5,39 @@ class DataUtils {
|
|||
// return clients.map((client) => [clientName, client.]
|
||||
// }
|
||||
|
||||
static calculateStepProgress(steps) {
|
||||
if (!steps || steps.length === 0) return "0/0";
|
||||
const completedSteps = steps.filter((step) => step.status === "completed").length;
|
||||
return `${completedSteps}/${steps.length}`;
|
||||
}
|
||||
|
||||
static dummyClientData = [
|
||||
{
|
||||
id: 1,
|
||||
fullName: "John Doe 123 Lane Dr Cityville, MN",
|
||||
appointmentScheduled: "completed",
|
||||
estimateSent: "pending",
|
||||
estimateSent: "in progress",
|
||||
paymentReceived: "not started",
|
||||
jobStatus: "not started",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
fullName: "Jane Smith 456 Oak St Townsville, CA",
|
||||
appointmentScheduled: "pending",
|
||||
appointmentScheduled: "in progress",
|
||||
estimateSent: "not started",
|
||||
paymentReceived: "not started",
|
||||
jobStatus: "not started",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
fullName: "Mike Johnson 789 Pine Rd Villagetown, TX",
|
||||
appointmentScheduled: "completed",
|
||||
estimateSent: "completed",
|
||||
paymentReceived: "pending",
|
||||
paymentReceived: "in progress",
|
||||
jobStatus: "in progress",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
fullName: "Emily Davis 321 Maple Ave Hamlet, FL",
|
||||
appointmentScheduled: "not started",
|
||||
estimateSent: "not started",
|
||||
|
|
@ -35,12 +45,463 @@ class DataUtils {
|
|||
jobStatus: "not started",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
fullName: "David Wilson 654 Cedar Blvd Borough, NY",
|
||||
appointmentScheduled: "completed",
|
||||
estimateSent: "completed",
|
||||
paymentReceived: "completed",
|
||||
jobStatus: "completed",
|
||||
},
|
||||
// create 30 more dummy entries
|
||||
{
|
||||
id: 6,
|
||||
fullName: "Sarah Brown 987 Birch Ln Metropolis, IL",
|
||||
appointmentScheduled: "in progress",
|
||||
estimateSent: "not started",
|
||||
paymentReceived: "not started",
|
||||
jobStatus: "not started",
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
fullName: "Chris Taylor 159 Spruce Ct Capital City, WA",
|
||||
appointmentScheduled: "completed",
|
||||
estimateSent: "completed",
|
||||
paymentReceived: "in progress",
|
||||
jobStatus: "in progress",
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
fullName: "Amanda Martinez 753 Willow Dr Smalltown, OH",
|
||||
appointmentScheduled: "not started",
|
||||
estimateSent: "not started",
|
||||
paymentReceived: "not started",
|
||||
jobStatus: "not started",
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
fullName: "Joshua Anderson 852 Aspen Rd Bigcity, NJ",
|
||||
appointmentScheduled: "completed",
|
||||
estimateSent: "in progress",
|
||||
paymentReceived: "not started",
|
||||
jobStatus: "not started",
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
fullName: "Olivia Thomas 147 Cypress St Uptown, GA",
|
||||
appointmentScheduled: "completed",
|
||||
estimateSent: "completed",
|
||||
paymentReceived: "completed",
|
||||
jobStatus: "completed",
|
||||
},
|
||||
{
|
||||
id: 11,
|
||||
fullName: "Daniel Jackson 369 Fir Ave Downtown, MI",
|
||||
appointmentScheduled: "in progress",
|
||||
estimateSent: "not started",
|
||||
paymentReceived: "not started",
|
||||
jobStatus: "not started",
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
fullName: "Sophia White 258 Palm Blvd Riverside, AZ",
|
||||
appointmentScheduled: "completed",
|
||||
estimateSent: "completed",
|
||||
paymentReceived: "in progress",
|
||||
jobStatus: "in progress",
|
||||
},
|
||||
{
|
||||
id: 13,
|
||||
fullName: "Matthew Harris 951 Olive Ln Seaside, OR",
|
||||
appointmentScheduled: "not started",
|
||||
estimateSent: "not started",
|
||||
paymentReceived: "not started",
|
||||
jobStatus: "not started",
|
||||
},
|
||||
{
|
||||
id: 14,
|
||||
fullName: "Isabella Clark 753 Magnolia Ct Hilltown, SC",
|
||||
appointmentScheduled: "completed",
|
||||
estimateSent: "in progress",
|
||||
paymentReceived: "not started",
|
||||
jobStatus: "not started",
|
||||
},
|
||||
{
|
||||
id: 15,
|
||||
fullName: "Andrew Lewis 357 Dogwood Dr Lakeview, VT",
|
||||
appointmentScheduled: "completed",
|
||||
estimateSent: "completed",
|
||||
paymentReceived: "completed",
|
||||
jobStatus: "completed",
|
||||
},
|
||||
{
|
||||
id: 16,
|
||||
fullName: "Mia Robinson 159 Cherry St Forestville, KY",
|
||||
appointmentScheduled: "in progress",
|
||||
estimateSent: "not started",
|
||||
paymentReceived: "not started",
|
||||
jobStatus: "not started",
|
||||
},
|
||||
{
|
||||
id: 17,
|
||||
fullName: "Ethan Walker 456 Walnut Rd Meadowbrook, ND",
|
||||
appointmentScheduled: "completed",
|
||||
estimateSent: "completed",
|
||||
paymentReceived: "in progress",
|
||||
jobStatus: "in progress",
|
||||
},
|
||||
{
|
||||
id: 18,
|
||||
fullName: "Ava Hall 123 Poplar Ave Greenfield, MS",
|
||||
appointmentScheduled: "not started",
|
||||
estimateSent: "not started",
|
||||
paymentReceived: "not started",
|
||||
jobStatus: "not started",
|
||||
},
|
||||
];
|
||||
|
||||
static dummyJobData = [
|
||||
{
|
||||
jobId: "JOB001",
|
||||
foreman: "Mike Thompson",
|
||||
crew: ["Worker A", "Worker B"],
|
||||
address: "123 Lane Dr, Cityville, MN",
|
||||
customer: "John Doe",
|
||||
overAllStatus: "in progress",
|
||||
completionDate: null,
|
||||
steps: [
|
||||
{ stepName: "Materials Ordered", status: "completed" },
|
||||
{ stepName: "Materials Received", status: "completed" },
|
||||
{ stepName: "Permits", status: "completed" },
|
||||
{ stepName: "Locate Utilities", status: "in progress" },
|
||||
{ stepName: "Foreman Assigned", status: "completed" },
|
||||
{ stepName: "Crew Assigned", status: "completed" },
|
||||
{ stepName: "Job Started", status: "not started" },
|
||||
{ stepName: "Job Completed", status: "not started" },
|
||||
],
|
||||
},
|
||||
{
|
||||
jobId: "JOB002",
|
||||
foreman: null,
|
||||
crew: [],
|
||||
address: "456 Oak St, Townsville, CA",
|
||||
customer: "Jane Smith",
|
||||
overAllStatus: "not started",
|
||||
completionDate: null,
|
||||
steps: [
|
||||
{ stepName: "Materials Ordered", status: "not started" },
|
||||
{ stepName: "Materials Received", status: "not started" },
|
||||
{ stepName: "Permits", status: "not started" },
|
||||
{ stepName: "Locate Utilities", status: "not started" },
|
||||
{ stepName: "Foreman Assigned", status: "not started" },
|
||||
{ stepName: "Crew Assigned", status: "not started" },
|
||||
{ stepName: "Job Started", status: "not started" },
|
||||
{ stepName: "Job Completed", status: "not started" },
|
||||
],
|
||||
},
|
||||
{
|
||||
jobId: "JOB003",
|
||||
foreman: "Sarah Johnson",
|
||||
crew: ["Worker C", "Worker D", "Worker E"],
|
||||
address: "789 Pine Rd, Villagetown, TX",
|
||||
customer: "Mike Johnson",
|
||||
overAllStatus: "in progress",
|
||||
completionDate: null,
|
||||
steps: [
|
||||
{ stepName: "Materials Ordered", status: "completed" },
|
||||
{ stepName: "Materials Received", status: "completed" },
|
||||
{ stepName: "Permits", status: "completed" },
|
||||
{ stepName: "Locate Utilities", status: "completed" },
|
||||
{ stepName: "Foreman Assigned", status: "completed" },
|
||||
{ stepName: "Crew Assigned", status: "completed" },
|
||||
{ stepName: "Job Started", status: "in progress" },
|
||||
{ stepName: "Job Completed", status: "not started" },
|
||||
],
|
||||
},
|
||||
{
|
||||
jobId: "JOB004",
|
||||
foreman: null,
|
||||
crew: [],
|
||||
address: "321 Maple Ave, Hamlet, FL",
|
||||
customer: "Emily Davis",
|
||||
overAllStatus: "not started",
|
||||
completionDate: null,
|
||||
steps: [
|
||||
{ stepName: "Materials Ordered", status: "not started" },
|
||||
{ stepName: "Materials Received", status: "not started" },
|
||||
{ stepName: "Permits", status: "not started" },
|
||||
{ stepName: "Locate Utilities", status: "not started" },
|
||||
{ stepName: "Foreman Assigned", status: "not started" },
|
||||
{ stepName: "Crew Assigned", status: "not started" },
|
||||
{ stepName: "Job Started", status: "not started" },
|
||||
{ stepName: "Job Completed", status: "not started" },
|
||||
],
|
||||
},
|
||||
{
|
||||
jobId: "JOB005",
|
||||
foreman: "David Martinez",
|
||||
crew: ["Worker F", "Worker G"],
|
||||
address: "654 Cedar Blvd, Borough, NY",
|
||||
customer: "David Wilson",
|
||||
overAllStatus: "completed",
|
||||
completionDate: "2024-10-15",
|
||||
steps: [
|
||||
{ stepName: "Materials Ordered", status: "completed" },
|
||||
{ stepName: "Materials Received", status: "completed" },
|
||||
{ stepName: "Permits", status: "completed" },
|
||||
{ stepName: "Locate Utilities", status: "completed" },
|
||||
{ stepName: "Foreman Assigned", status: "completed" },
|
||||
{ stepName: "Crew Assigned", status: "completed" },
|
||||
{ stepName: "Job Started", status: "completed" },
|
||||
{ stepName: "Job Completed", status: "completed" },
|
||||
],
|
||||
},
|
||||
{
|
||||
jobId: "JOB006",
|
||||
foreman: null,
|
||||
crew: [],
|
||||
address: "987 Birch Ln, Metropolis, IL",
|
||||
customer: "Sarah Brown",
|
||||
overAllStatus: "not started",
|
||||
completionDate: null,
|
||||
steps: [
|
||||
{ stepName: "Materials Ordered", status: "in progress" },
|
||||
{ stepName: "Materials Received", status: "not started" },
|
||||
{ stepName: "Permits", status: "not started" },
|
||||
{ stepName: "Locate Utilities", status: "not started" },
|
||||
{ stepName: "Foreman Assigned", status: "not started" },
|
||||
{ stepName: "Crew Assigned", status: "not started" },
|
||||
{ stepName: "Job Started", status: "not started" },
|
||||
{ stepName: "Job Completed", status: "not started" },
|
||||
],
|
||||
},
|
||||
{
|
||||
jobId: "JOB007",
|
||||
foreman: "Chris Wilson",
|
||||
crew: ["Worker H", "Worker I"],
|
||||
address: "159 Spruce Ct, Capital City, WA",
|
||||
customer: "Chris Taylor",
|
||||
overAllStatus: "in progress",
|
||||
completionDate: null,
|
||||
steps: [
|
||||
{ stepName: "Materials Ordered", status: "completed" },
|
||||
{ stepName: "Materials Received", status: "completed" },
|
||||
{ stepName: "Permits", status: "completed" },
|
||||
{ stepName: "Locate Utilities", status: "completed" },
|
||||
{ stepName: "Foreman Assigned", status: "completed" },
|
||||
{ stepName: "Crew Assigned", status: "completed" },
|
||||
{ stepName: "Job Started", status: "in progress" },
|
||||
{ stepName: "Job Completed", status: "not started" },
|
||||
],
|
||||
},
|
||||
{
|
||||
jobId: "JOB008",
|
||||
foreman: null,
|
||||
crew: [],
|
||||
address: "753 Willow Dr, Smalltown, OH",
|
||||
customer: "Amanda Martinez",
|
||||
overAllStatus: "not started",
|
||||
completionDate: null,
|
||||
steps: [
|
||||
{ stepName: "Materials Ordered", status: "not started" },
|
||||
{ stepName: "Materials Received", status: "not started" },
|
||||
{ stepName: "Permits", status: "not started" },
|
||||
{ stepName: "Locate Utilities", status: "not started" },
|
||||
{ stepName: "Foreman Assigned", status: "not started" },
|
||||
{ stepName: "Crew Assigned", status: "not started" },
|
||||
{ stepName: "Job Started", status: "not started" },
|
||||
{ stepName: "Job Completed", status: "not started" },
|
||||
],
|
||||
},
|
||||
{
|
||||
jobId: "JOB009",
|
||||
foreman: "Lisa Anderson",
|
||||
crew: ["Worker J"],
|
||||
address: "852 Aspen Rd, Bigcity, NJ",
|
||||
customer: "Joshua Anderson",
|
||||
overAllStatus: "in progress",
|
||||
completionDate: null,
|
||||
steps: [
|
||||
{ stepName: "Materials Ordered", status: "completed" },
|
||||
{ stepName: "Materials Received", status: "completed" },
|
||||
{ stepName: "Permits", status: "in progress" },
|
||||
{ stepName: "Locate Utilities", status: "not started" },
|
||||
{ stepName: "Foreman Assigned", status: "completed" },
|
||||
{ stepName: "Crew Assigned", status: "completed" },
|
||||
{ stepName: "Job Started", status: "not started" },
|
||||
{ stepName: "Job Completed", status: "not started" },
|
||||
],
|
||||
},
|
||||
{
|
||||
jobId: "JOB010",
|
||||
foreman: "Robert Thomas",
|
||||
crew: ["Worker K", "Worker L", "Worker M"],
|
||||
address: "147 Cypress St, Uptown, GA",
|
||||
customer: "Olivia Thomas",
|
||||
overAllStatus: "completed",
|
||||
completionDate: "2024-10-20",
|
||||
steps: [
|
||||
{ stepName: "Materials Ordered", status: "completed" },
|
||||
{ stepName: "Materials Received", status: "completed" },
|
||||
{ stepName: "Permits", status: "completed" },
|
||||
{ stepName: "Locate Utilities", status: "completed" },
|
||||
{ stepName: "Foreman Assigned", status: "completed" },
|
||||
{ stepName: "Crew Assigned", status: "completed" },
|
||||
{ stepName: "Job Started", status: "completed" },
|
||||
{ stepName: "Job Completed", status: "completed" },
|
||||
],
|
||||
},
|
||||
{
|
||||
jobId: "JOB011",
|
||||
foreman: null,
|
||||
crew: [],
|
||||
address: "369 Fir Ave, Downtown, MI",
|
||||
customer: "Daniel Jackson",
|
||||
overAllStatus: "not started",
|
||||
completionDate: null,
|
||||
steps: [
|
||||
{ stepName: "Materials Ordered", status: "in progress" },
|
||||
{ stepName: "Materials Received", status: "not started" },
|
||||
{ stepName: "Permits", status: "not started" },
|
||||
{ stepName: "Locate Utilities", status: "not started" },
|
||||
{ stepName: "Foreman Assigned", status: "not started" },
|
||||
{ stepName: "Crew Assigned", status: "not started" },
|
||||
{ stepName: "Job Started", status: "not started" },
|
||||
{ stepName: "Job Completed", status: "not started" },
|
||||
],
|
||||
},
|
||||
{
|
||||
jobId: "JOB012",
|
||||
foreman: "Maria White",
|
||||
crew: ["Worker N", "Worker O"],
|
||||
address: "258 Palm Blvd, Riverside, AZ",
|
||||
customer: "Sophia White",
|
||||
overAllStatus: "in progress",
|
||||
completionDate: null,
|
||||
steps: [
|
||||
{ stepName: "Materials Ordered", status: "completed" },
|
||||
{ stepName: "Materials Received", status: "completed" },
|
||||
{ stepName: "Permits", status: "completed" },
|
||||
{ stepName: "Locate Utilities", status: "completed" },
|
||||
{ stepName: "Foreman Assigned", status: "completed" },
|
||||
{ stepName: "Crew Assigned", status: "completed" },
|
||||
{ stepName: "Job Started", status: "in progress" },
|
||||
{ stepName: "Job Completed", status: "not started" },
|
||||
],
|
||||
},
|
||||
{
|
||||
jobId: "JOB013",
|
||||
foreman: null,
|
||||
crew: [],
|
||||
address: "951 Olive Ln, Seaside, OR",
|
||||
customer: "Matthew Harris",
|
||||
overAllStatus: "not started",
|
||||
completionDate: null,
|
||||
steps: [
|
||||
{ stepName: "Materials Ordered", status: "not started" },
|
||||
{ stepName: "Materials Received", status: "not started" },
|
||||
{ stepName: "Permits", status: "not started" },
|
||||
{ stepName: "Locate Utilities", status: "not started" },
|
||||
{ stepName: "Foreman Assigned", status: "not started" },
|
||||
{ stepName: "Crew Assigned", status: "not started" },
|
||||
{ stepName: "Job Started", status: "not started" },
|
||||
{ stepName: "Job Completed", status: "not started" },
|
||||
],
|
||||
},
|
||||
{
|
||||
jobId: "JOB014",
|
||||
foreman: "James Clark",
|
||||
crew: ["Worker P"],
|
||||
address: "753 Magnolia Ct, Hilltown, SC",
|
||||
customer: "Isabella Clark",
|
||||
overAllStatus: "in progress",
|
||||
completionDate: null,
|
||||
steps: [
|
||||
{ stepName: "Materials Ordered", status: "completed" },
|
||||
{ stepName: "Materials Received", status: "completed" },
|
||||
{ stepName: "Permits", status: "in progress" },
|
||||
{ stepName: "Locate Utilities", status: "not started" },
|
||||
{ stepName: "Foreman Assigned", status: "completed" },
|
||||
{ stepName: "Crew Assigned", status: "completed" },
|
||||
{ stepName: "Job Started", status: "not started" },
|
||||
{ stepName: "Job Completed", status: "not started" },
|
||||
],
|
||||
},
|
||||
{
|
||||
jobId: "JOB015",
|
||||
foreman: "Patricia Lewis",
|
||||
crew: ["Worker Q", "Worker R", "Worker S"],
|
||||
address: "357 Dogwood Dr, Lakeview, VT",
|
||||
customer: "Andrew Lewis",
|
||||
overAllStatus: "completed",
|
||||
completionDate: "2024-10-18",
|
||||
steps: [
|
||||
{ stepName: "Materials Ordered", status: "completed" },
|
||||
{ stepName: "Materials Received", status: "completed" },
|
||||
{ stepName: "Permits", status: "completed" },
|
||||
{ stepName: "Locate Utilities", status: "completed" },
|
||||
{ stepName: "Foreman Assigned", status: "completed" },
|
||||
{ stepName: "Crew Assigned", status: "completed" },
|
||||
{ stepName: "Job Started", status: "completed" },
|
||||
{ stepName: "Job Completed", status: "completed" },
|
||||
],
|
||||
},
|
||||
{
|
||||
jobId: "JOB016",
|
||||
foreman: null,
|
||||
crew: [],
|
||||
address: "159 Cherry St, Forestville, KY",
|
||||
customer: "Mia Robinson",
|
||||
overAllStatus: "not started",
|
||||
completionDate: null,
|
||||
steps: [
|
||||
{ stepName: "Materials Ordered", status: "in progress" },
|
||||
{ stepName: "Materials Received", status: "not started" },
|
||||
{ stepName: "Permits", status: "not started" },
|
||||
{ stepName: "Locate Utilities", status: "not started" },
|
||||
{ stepName: "Foreman Assigned", status: "not started" },
|
||||
{ stepName: "Crew Assigned", status: "not started" },
|
||||
{ stepName: "Job Started", status: "not started" },
|
||||
{ stepName: "Job Completed", status: "not started" },
|
||||
],
|
||||
},
|
||||
{
|
||||
jobId: "JOB017",
|
||||
foreman: "Kevin Walker",
|
||||
crew: ["Worker T", "Worker U"],
|
||||
address: "456 Walnut Rd, Meadowbrook, ND",
|
||||
customer: "Ethan Walker",
|
||||
overAllStatus: "in progress",
|
||||
completionDate: null,
|
||||
steps: [
|
||||
{ stepName: "Materials Ordered", status: "completed" },
|
||||
{ stepName: "Materials Received", status: "completed" },
|
||||
{ stepName: "Permits", status: "completed" },
|
||||
{ stepName: "Locate Utilities", status: "completed" },
|
||||
{ stepName: "Foreman Assigned", status: "completed" },
|
||||
{ stepName: "Crew Assigned", status: "completed" },
|
||||
{ stepName: "Job Started", status: "in progress" },
|
||||
{ stepName: "Job Completed", status: "not started" },
|
||||
],
|
||||
},
|
||||
{
|
||||
jobId: "JOB018",
|
||||
foreman: null,
|
||||
crew: [],
|
||||
address: "123 Poplar Ave, Greenfield, MS",
|
||||
customer: "Ava Hall",
|
||||
overAllStatus: "not started",
|
||||
completionDate: null,
|
||||
steps: [
|
||||
{ stepName: "Materials Ordered", status: "not started" },
|
||||
{ stepName: "Materials Received", status: "not started" },
|
||||
{ stepName: "Permits", status: "not started" },
|
||||
{ stepName: "Locate Utilities", status: "not started" },
|
||||
{ stepName: "Foreman Assigned", status: "not started" },
|
||||
{ stepName: "Crew Assigned", status: "not started" },
|
||||
{ stepName: "Job Started", status: "not started" },
|
||||
{ stepName: "Job Completed", status: "not started" },
|
||||
],
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue