diff --git a/api/tasks/create.cfm b/api/tasks/create.cfm index b947e8e..ee1a64e 100644 --- a/api/tasks/create.cfm +++ b/api/tasks/create.cfm @@ -44,7 +44,7 @@ try { // Use message as details taskDetails = message; - // Insert service bell task with ServicePointID + // Insert service bell task with ServicePointID and UserID queryTimed(" INSERT INTO Tasks ( BusinessID, @@ -52,6 +52,7 @@ try { TaskTypeID, CategoryID, OrderID, + UserID, Title, Details, CreatedOn, @@ -62,6 +63,7 @@ try { :taskTypeID, 0, :orderID, + :userID, :taskTitle, :taskDetails, NOW(), @@ -72,6 +74,7 @@ try { servicePointID: servicePointID, taskTypeID: taskTypeID, orderID: orderID, + userID: userID, taskTitle: taskTitle, taskDetails: taskDetails }, { datasource: "payfrit" }); diff --git a/api/tasks/listMine.cfm b/api/tasks/listMine.cfm index 350596a..8c37c22 100644 --- a/api/tasks/listMine.cfm +++ b/api/tasks/listMine.cfm @@ -77,6 +77,7 @@ t.ClaimedByUserID, t.ClaimedOn, t.CompletedOn, + t.UserID, tc.Name AS CategoryName, tc.Color AS CategoryColor, tt.Name AS TaskTypeName, @@ -84,13 +85,16 @@ tt.Color AS TaskTypeColor, b.Name AS BusinessName, t.ServicePointID, - sp.Name AS ServicePointName + sp.Name AS ServicePointName, + u.FirstName AS CustomerFirstName, + u.LastName AS CustomerLastName FROM Tasks t LEFT JOIN TaskCategories tc ON tc.ID = t.CategoryID LEFT JOIN tt_TaskTypes tt ON tt.ID = t.TaskTypeID LEFT JOIN Businesses b ON b.ID = t.BusinessID LEFT JOIN Orders o ON o.ID = t.OrderID LEFT JOIN ServicePoints sp ON sp.ID = COALESCE(t.ServicePointID, o.ServicePointID) + LEFT JOIN Users u ON u.ID = t.UserID WHERE #whereSQL# ORDER BY t.ClaimedOn DESC ", params, { datasource = "payfrit" })> @@ -113,6 +117,14 @@ + + + + + + + + diff --git a/api/tasks/listPending.cfm b/api/tasks/listPending.cfm index 7fb5d46..d5d9f70 100644 --- a/api/tasks/listPending.cfm +++ b/api/tasks/listPending.cfm @@ -65,18 +65,22 @@ t.Details, t.CreatedOn, t.ClaimedByUserID, + t.UserID, tc.Name AS CategoryName, tc.Color AS CategoryColor, tt.Name AS TaskTypeName, tt.Icon AS TaskTypeIcon, tt.Color AS TaskTypeColor, t.ServicePointID, - sp.Name AS ServicePointName + sp.Name AS ServicePointName, + u.FirstName AS CustomerFirstName, + u.LastName AS CustomerLastName FROM Tasks t LEFT JOIN TaskCategories tc ON tc.ID = t.CategoryID LEFT JOIN tt_TaskTypes tt ON tt.ID = t.TaskTypeID LEFT JOIN Orders o ON o.ID = t.OrderID LEFT JOIN ServicePoints sp ON sp.ID = COALESCE(t.ServicePointID, o.ServicePointID) + LEFT JOIN Users u ON u.ID = t.UserID WHERE #whereSQL# ORDER BY t.CreatedOn ASC ", params, { datasource = "payfrit" })> @@ -96,6 +100,14 @@ + + + + + + + +