Commit graph

240 commits

Author SHA1 Message Date
NotARoomba
f1df459fe8 Update airtable-sync.ts 2026-03-10 15:05:44 -04:00
NotARoomba
4da771e9d3 dupe check 2026-03-10 14:47:53 -04:00
NotARoomba
8288e2a6ae fix xstuffs 2026-03-10 14:35:10 -04:00
NotARoomba
ced2151b1d unified checks 2026-03-10 14:18:52 -04:00
End Nightshade
5d6e7eab52
typos and stuff 2026-03-05 10:16:26 -07:00
NotARoomba
a3feec9263 slack id fallback 2026-03-04 14:17:18 -05:00
NotARoomba
8bfdcc7d52 aaa 2026-03-04 13:53:35 -05:00
NotARoomba
ad844dbcb3 updates 2026-03-04 13:39:19 -05:00
NotARoomba
b01538deba fix updates 2026-03-04 13:28:26 -05:00
NotARoomba
11faeef4be Update airtable-sync.ts 2026-03-04 12:46:31 -05:00
NotARoomba
86425dfca3 add in stuff 2026-03-04 12:31:57 -05:00
NotARoomba
fea18cf0ed update stuff 2026-03-04 12:15:50 -05:00
NotARoomba
2390eb7632 aaaa 2026-03-04 11:45:44 -05:00
NotARoomba
d8a4c8121c creator 2026-03-04 11:38:22 -05:00
NotARoomba
5a7087031a Update Navbar.svelte 2026-03-04 11:32:24 -05:00
NotARoomba
a79c27c838 add creator role 2026-03-04 11:24:41 -05:00
End Nightshade
f97e52b0a0
bweh 2026-03-04 08:44:23 -07:00
NotARoomba
a763a3e82d copy 2026-03-03 18:00:35 -05:00
NotARoomba
5aafb50a66 Merge branch 'main' of https://github.com/hackclub/scraps 2026-03-03 15:30:51 -05:00
End Nightshade
a49415a90e
aaaaaaaaaaa 2026-03-03 13:18:09 -07:00
End Nightshade
bf85cc71ae
what 2026-03-03 12:48:13 -07:00
End Nightshade
1370abec5d
fixes 2026-03-03 12:40:56 -07:00
NotARoomba
78f1caab59 aa 2026-03-03 14:35:40 -05:00
NotARoomba
e6473c91ac Merge branch 'main' of https://github.com/hackclub/scraps 2026-03-03 14:32:19 -05:00
NotARoomba
892ea160fc add in stuff 2026-03-03 14:29:03 -05:00
End Nightshade
dde9a8f27f
akdlskd 2026-03-03 12:17:05 -07:00
NotARoomba
5d4f12d4b6 adsfkhsadlkjfh 2026-03-03 13:15:02 -05:00
NotARoomba
6cdebfa56f aaa 2026-03-03 12:53:31 -05:00
NotARoomba
8af711ef7e actuall 2026-03-03 12:41:29 -05:00
End Nightshade
6890adb44c
HIDE REVIEWERS RAAA 2026-03-03 07:54:38 -07:00
End Nightshade
73e709fe2d
format omg why didnt ever run this 2026-03-03 07:31:25 -07:00
End Nightshade
827f285438
guh hackatime work 2026-03-02 21:41:00 -07:00
NotARoomba
bab78ab458 reject stuffa 2026-02-23 20:57:00 -05:00
NotARoomba
df2039908f update logic fix 2026-02-23 15:35:59 -05:00
End Nightshade
3e897fbd26
chore: tighten typings and frontend fixes (admin/shop, orders) 2026-02-23 13:03:25 -07:00
NotARoomba
c9643e3df4 new shop calcs 2026-02-23 14:34:42 -05:00
NotARoomba
064a10578b update stuff 2026-02-23 13:33:43 -05:00
NotARoomba
472fea634a Update ysws.ts 2026-02-23 12:34:49 -05:00
End Nightshade
89069f3fa9
fix(admin): fix EV simulation using perRollMultiplier as base cost multiplier
Same bug as backend — perRollMultiplier (0.05) was applied as a direct
multiplier on base roll cost in the admin shop EV simulation, making
everything appear exploitable (red).
2026-02-22 18:46:49 -07:00
End Nightshade
55477673ab
fix(frontend): resolve all 5 pre-existing TypeScript errors
- i18n: widen Translations type to accept any string values
- home: fix async onMount returning cleanup function
- CreateProjectModal: import Project from stores instead of local interface
- user profile: non-null assert githubUrl inside existence check
2026-02-22 18:42:59 -07:00
End Nightshade
dfa61ff117
fix(shop): remove perRollMultiplier from base roll cost calculation
perRollMultiplier (default 0.05) was being applied as a direct multiplier
on the base roll cost, making everything cost 1-3 scraps instead of the
correct amount. It should only be used as an escalation factor per
previous roll: displayRollCost = baseRollCost * (1 + perRollMultiplier * rollCount)
2026-02-22 18:35:14 -07:00
End Nightshade
bd133c09d6 refactor(db): use new drizzle({ client: pool }) API 2026-02-22 17:04:45 -08:00
End Nightshade
69b0309811 chore(backend): rebuild dist 2026-02-22 17:04:45 -08:00
End Nightshade
85683b860a fix(admin): decrement stock on restore, preserve notes/isFulfilled/updatedAt
- Restore handler now decrements shop_items.count for purchase/luck_win
  orders (reverses the increment from delete), with GREATEST(..., 0) guard
- Delete handler now selects notes, isFulfilled, updatedAt so they're
  included in the archived deleted_payload JSONB
- Restore INSERT now includes notes, is_fulfilled, updated_at columns
2026-02-22 17:04:45 -08:00
End Nightshade
52b3e37c8f chore(backend): rebuild dist 2026-02-22 17:04:45 -08:00
End Nightshade
f85fde1937 feat(frontend): fetch server config on startup for canonical pricing
- Add fetchServerConfig to config.ts (fetches /admin/config endpoint)
- Call fetchServerConfig in +layout.svelte onMount for early client init
- Format long lines in admin dashboard page
2026-02-22 17:04:45 -08:00
End Nightshade
7367dac120 feat(shop): add displayRollCost and perRollMultiplier frontend support
- Add displayRollCost to ShopItem interface in stores
- ShopItemModal and shop page prefer server-provided displayRollCost
- Clean up as-any casts in ShopItemModal roll cost computation
- Admin shop: add perRollMultiplier to item type and EV simulation
- Remove unused modalEV derived (dead code, formEV used in template)
2026-02-22 17:04:45 -08:00
End Nightshade
719b4cb04d feat(admin): add order delete confirmation modal with undo toast
- Delete modal requires reason (min 3 chars) before sending DELETE
- Undo toast allows 30-second window to restore deleted order
- Admin user detail page: replace soft-delete + DELETE with single DELETE
  call including reason payload
- Add lightweight DOM toast helper for status messages
2026-02-22 17:04:45 -08:00
End Nightshade
e9e11101c8 fix(admin): fix order delete/restore with single JSONB payload archive
- Archive order + related rows (refinery, rolls, penalties) into single
  deleted_payload JSONB column matching migration 0014 schema
- Add runtime CREATE TABLE fallback for missing admin_deleted_orders
- Full restore handler restores order with original ID (OVERRIDING SYSTEM
  VALUE) plus all related rows; remove duplicate simple restore handler
- Delete transaction refunds stock count for purchase/luck_win orders
- Add detailed error logging for diagnostics
- Add batch compute-roll-costs endpoint and per-roll multiplier support
2026-02-22 17:04:45 -08:00
End Nightshade
ec726b0745 feat(shop): serve displayRollCost and perRollMultiplier from backend, add identity token refresh 2026-02-22 17:04:45 -08:00