Files
Crussell/obsidian/.obsidian/workspace.json
T
popertots 94adc7f54c test: clarify 1h advance requirement is USER-ONLY, add admin walk-in tests
FIXES:
- Clarified that 1-hour minimum advance requirement applies to USER bookings only
- Admins can create walk-in bookings with no advance notice via AdminCreateBookingForUserHandler
- Updated test comments to reflect this distinction

NEW TESTS ADDED:
- TestAdminBookings_Create_WalkIn: Admin creates booking with < 1h notice (walk-in)
- TestAdminBookings_Create_WalkInWithDeposits: Admin walk-in with outstanding deposits + enforce_deposits=false

TEST SCENARIOS VERIFIED:
✓ User: Cannot book < 1h in advance (400 error)
✓ Admin: CAN book < 1h in advance (walk-in, 201 created)
✓ Admin: Can create walk-ins even with user deposits (with enforce_deposits bypass)
✓ Admin: Can bypass minimum advance requirement

BUILD STATUS:
✓ go build -tags test ./handlers/bookings
✓ go build -tags test ./handlers/admin
✓ go build -tags dev ./main.go

Documentation now clearly distinguishes:
- User journey: 1h minimum advance (universal)
- Admin journey: No minimum advance (accept walk-ins)
2026-03-07 18:05:17 +00:00

177 lines
4.6 KiB
JSON

{
"main": {
"id": "118cffd7cdee3b11",
"type": "split",
"children": [
{
"id": "c3304ad1f15b3261",
"type": "tabs",
"children": [
{
"id": "b72bbfe2e0c01c0c",
"type": "leaf",
"state": {
"type": "empty",
"state": {},
"icon": "lucide-file",
"title": "New tab"
}
}
]
}
],
"direction": "vertical"
},
"left": {
"id": "53a883d203e9233d",
"type": "split",
"children": [
{
"id": "490f9de080de140d",
"type": "tabs",
"children": [
{
"id": "42aca4a7881f98cd",
"type": "leaf",
"state": {
"type": "file-explorer",
"state": {
"sortOrder": "alphabetical",
"autoReveal": false
},
"icon": "lucide-folder-closed",
"title": "Files"
}
},
{
"id": "3f5a2398495786b0",
"type": "leaf",
"state": {
"type": "search",
"state": {
"query": "",
"matchingCase": false,
"explainSearch": false,
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical"
},
"icon": "lucide-search",
"title": "Search"
}
},
{
"id": "332fce93850753ed",
"type": "leaf",
"state": {
"type": "bookmarks",
"state": {},
"icon": "lucide-bookmark",
"title": "Bookmarks"
}
}
],
"currentTab": 1
}
],
"direction": "horizontal",
"width": 300
},
"right": {
"id": "2750d7726f904ef3",
"type": "split",
"children": [
{
"id": "8cf8aee55a46981b",
"type": "tabs",
"children": [
{
"id": "5c7ce50806d60318",
"type": "leaf",
"state": {
"type": "backlink",
"state": {
"file": "Express.js Cheat Sheet.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
"showSearch": false,
"searchQuery": "",
"backlinkCollapsed": false,
"unlinkedCollapsed": true
},
"icon": "links-coming-in",
"title": "Backlinks for Express.js Cheat Sheet"
}
},
{
"id": "77c2a28112c134e9",
"type": "leaf",
"state": {
"type": "outgoing-link",
"state": {
"file": "Crussell/Crussell Nails.md",
"linksCollapsed": false,
"unlinkedCollapsed": true
},
"icon": "links-going-out",
"title": "Outgoing links from Crussell Nails"
}
},
{
"id": "0f217e57cf9fb6d9",
"type": "leaf",
"state": {
"type": "tag",
"state": {
"sortOrder": "frequency",
"useHierarchy": true,
"showSearch": false,
"searchQuery": ""
},
"icon": "lucide-tags",
"title": "Tags"
}
},
{
"id": "013dd65f19607fbd",
"type": "leaf",
"state": {
"type": "outline",
"state": {
"file": "Crussell/Crussell Nails.md",
"followCursor": false,
"showSearch": false,
"searchQuery": ""
},
"icon": "lucide-list",
"title": "Outline of Crussell Nails"
}
}
]
}
],
"direction": "horizontal",
"width": 300,
"collapsed": true
},
"left-ribbon": {
"hiddenItems": {
"switcher:Open quick switcher": false,
"graph:Open graph view": false,
"canvas:Create new canvas": false,
"daily-notes:Open today's daily note": false,
"templates:Insert template": false,
"command-palette:Open command palette": false,
"bases:Create new base": false
}
},
"active": "b72bbfe2e0c01c0c",
"lastOpenFiles": [
"Crussell/Crussell Nails.md",
"Crussell/Backend/bookings.md",
"Untitled.base",
"Untitled.canvas",
"Express.js Cheat Sheet.md"
]
}