API Improvements: - api/businesses/get.cfm: Fetch address from Addresses table, hours from Hours table - api/tasks/getDetails.cfm: Add CustomerPhone field from UserContactNumber - api/orders/getDetail.cfm: New endpoint for order details with line items - api/Application.cfm: Add new admin endpoints to public allowlist Admin Tools: - api/admin/beaconStatus.cfm: View all beacon-to-business mappings - api/admin/updateBeaconMapping.cfm: Change beacon business assignment - api/admin/setupBigDeansInfo.cfm: Set Big Dean's address and hours - api/admin/listTables.cfm: List all database tables - api/admin/describeTable.cfm: Get table structure and sample data - api/admin/randomizePrices.cfm: Randomize item prices for testing - Various Big Dean's debug/update scripts Portal Enhancements: - Enhanced CSS styling for portal pages - Improved portal.js functionality 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
52 lines
1.4 KiB
Text
52 lines
1.4 KiB
Text
<cfsetting showdebugoutput="false">
|
|
<cfsetting enablecfoutputonly="true">
|
|
<cfcontent type="application/json; charset=utf-8" reset="true">
|
|
|
|
<cfscript>
|
|
// Update Beacon 2 to point to In-N-Out (BusinessID 17)
|
|
beaconId = 2;
|
|
newBusinessId = 17;
|
|
|
|
queryExecute("
|
|
UPDATE lt_Beacon_Businesses_ServicePoints
|
|
SET BusinessID = :newBizId
|
|
WHERE BeaconID = :beaconId
|
|
", { newBizId: newBusinessId, beaconId: beaconId }, { datasource: "payfrit" });
|
|
|
|
// Get current state
|
|
q = queryExecute("
|
|
SELECT
|
|
b.BeaconID,
|
|
b.BeaconUUID,
|
|
b.BeaconName,
|
|
lt.BusinessID,
|
|
lt.ServicePointID,
|
|
biz.BusinessName,
|
|
sp.ServicePointName
|
|
FROM Beacons b
|
|
LEFT JOIN lt_Beacon_Businesses_ServicePoints lt ON lt.BeaconID = b.BeaconID
|
|
LEFT JOIN Businesses biz ON biz.BusinessID = lt.BusinessID
|
|
LEFT JOIN ServicePoints sp ON sp.ServicePointID = lt.ServicePointID
|
|
WHERE b.BeaconIsActive = 1
|
|
ORDER BY b.BeaconID
|
|
", {}, { datasource: "payfrit" });
|
|
|
|
rows = [];
|
|
for (row in q) {
|
|
arrayAppend(rows, {
|
|
"BeaconID": row.BeaconID,
|
|
"BeaconUUID": row.BeaconUUID,
|
|
"BeaconName": row.BeaconName ?: "",
|
|
"BusinessID": row.BusinessID ?: 0,
|
|
"BusinessName": row.BusinessName ?: "",
|
|
"ServicePointID": row.ServicePointID ?: 0,
|
|
"ServicePointName": row.ServicePointName ?: ""
|
|
});
|
|
}
|
|
|
|
writeOutput(serializeJSON({
|
|
"OK": true,
|
|
"MESSAGE": "Updated beacon #beaconId# to BusinessID #newBusinessId#",
|
|
"BEACONS": rows
|
|
}));
|
|
</cfscript>
|