Portal local development: - Add BASE_PATH detection to all portal files (login, portal.js, menu-builder, station-assignment) - Allows portal to work at /biz.payfrit.com/ path locally Menu Builder fixes: - Fix duplicate template options in getForBuilder.cfm query - Filter template children by business ID with DISTINCT New APIs: - api/portal/myBusinesses.cfm - List businesses for logged-in user - api/stations/list.cfm - List KDS stations - api/menu/updateStations.cfm - Update item station assignments - api/setup/reimportBigDeans.cfm - Full Big Dean's menu import script Admin utilities: - Various debug and migration scripts for menu/template management - Beacon switching, category cleanup, modifier template setup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
38 lines
1.3 KiB
Text
38 lines
1.3 KiB
Text
<cfsetting showdebugoutput="false">
|
|
<cfsetting enablecfoutputonly="true">
|
|
<cfcontent type="application/json; charset=utf-8" reset="true">
|
|
|
|
<cfscript>
|
|
bizId = 27;
|
|
|
|
// These are the items that were deactivated by fixBigDeansCategories.cfm
|
|
deactivatedIds = [11177, 11180, 11183, 11186, 11190, 11193, 11196, 11199, 11204, 11212, 11220, 11259];
|
|
|
|
qDeactivated = queryExecute("
|
|
SELECT i.ItemID, i.ItemName, i.ItemParentItemID, i.ItemIsActive, i.ItemIsCollapsible,
|
|
(SELECT COUNT(*) FROM Items c WHERE c.ItemParentItemID = i.ItemID) as ChildCount,
|
|
(SELECT GROUP_CONCAT(c.ItemName) FROM Items c WHERE c.ItemParentItemID = i.ItemID) as Children
|
|
FROM Items i
|
|
WHERE i.ItemID IN (:ids)
|
|
ORDER BY i.ItemID
|
|
", { ids: { value: arrayToList(deactivatedIds), list: true } }, { datasource: "payfrit" });
|
|
|
|
items = [];
|
|
for (row in qDeactivated) {
|
|
arrayAppend(items, {
|
|
"ItemID": row.ItemID,
|
|
"ItemName": row.ItemName,
|
|
"ParentID": row.ItemParentItemID,
|
|
"IsActive": row.ItemIsActive,
|
|
"IsCollapsible": row.ItemIsCollapsible,
|
|
"ChildCount": row.ChildCount,
|
|
"Children": row.Children
|
|
});
|
|
}
|
|
|
|
writeOutput(serializeJSON({
|
|
"OK": true,
|
|
"Message": "These items were deactivated thinking they were fake categories",
|
|
"DeactivatedItems": items
|
|
}));
|
|
</cfscript>
|