- Move menu manager button to toolbar next to Save Menu for visibility - Implement server-side photo upload for menu items - Strip base64 data URLs from save payload to reduce size - Add scheduled tasks, quick tasks, ratings, and task categories APIs - Add vertical support and brand color features Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
39 lines
1.2 KiB
Text
39 lines
1.2 KiB
Text
<cfsetting showdebugoutput="false">
|
|
<cfsetting enablecfoutputonly="true">
|
|
<cfcontent type="application/json; charset=utf-8" reset="true">
|
|
|
|
<cfscript>
|
|
try {
|
|
q = queryExecute("
|
|
SELECT TaskID, TaskTitle, TaskDetails, TaskCategoryID, TaskClaimedByUserID, TaskCompletedOn, TaskAddedOn
|
|
FROM Tasks
|
|
WHERE TaskBusinessID = 47
|
|
ORDER BY TaskID DESC
|
|
LIMIT 20
|
|
", [], { datasource: "payfrit" });
|
|
|
|
tasks = [];
|
|
for (row in q) {
|
|
arrayAppend(tasks, {
|
|
"TaskID": row.TaskID,
|
|
"Title": row.TaskTitle,
|
|
"Details": isNull(row.TaskDetails) ? "" : row.TaskDetails,
|
|
"CategoryID": row.TaskCategoryID,
|
|
"ClaimedByUserID": row.TaskClaimedByUserID,
|
|
"CompletedOn": isNull(row.TaskCompletedOn) ? "" : dateTimeFormat(row.TaskCompletedOn, "yyyy-mm-dd HH:nn:ss"),
|
|
"AddedOn": isNull(row.TaskAddedOn) ? "" : dateTimeFormat(row.TaskAddedOn, "yyyy-mm-dd HH:nn:ss")
|
|
});
|
|
}
|
|
|
|
writeOutput(serializeJSON({
|
|
"OK": true,
|
|
"COUNT": arrayLen(tasks),
|
|
"TASKS": tasks
|
|
}));
|
|
} catch (any e) {
|
|
writeOutput(serializeJSON({
|
|
"OK": false,
|
|
"ERROR": e.message
|
|
}));
|
|
}
|
|
</cfscript>
|