studio-os 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/package.json +5 -5
- package/src/db/004-payment-booking.sql +5 -0
- package/src/db/index.js +1 -0
- package/src/routes/admin.js +728 -692
- package/src/routes/me.js +3 -9
- package/src/routes/public.js +10 -24
- package/src/services/booking.js +61 -8
- package/src/services/notify.js +19 -0
- package/test/booking.test.js +80 -1
- package/test/web.test.js +108 -1
- package/views/admin/roster.ejs +19 -0
- package/views/public/book_result.ejs +1 -1
- package/views/public/buy_thanks.ejs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0 — 2026-09-27
|
|
4
|
+
|
|
5
|
+
**Upgrading:** the database migrates itself on start (schema v4, one new
|
|
6
|
+
column on `payments`). Drop-in dues recorded before the upgrade aren't linked
|
|
7
|
+
to a booking, so they won't clear themselves if that booking is cancelled.
|
|
8
|
+
Check the dashboard's Pending payments for stale ones.
|
|
9
|
+
|
|
10
|
+
- **Editing a weekly rule moved nothing and doubled the schedule.** Changing
|
|
11
|
+
a rule's day or time left every future class at the old slot and then
|
|
12
|
+
generated a second set at the new one. Empty future classes now move with
|
|
13
|
+
the rule, and booked ones stay put with a note saying how many. A malformed
|
|
14
|
+
time used to save, 500, and then break the daily generator for every rule.
|
|
15
|
+
It's rejected now.
|
|
16
|
+
- **Drop-in dues were charged to people who never got a spot.** Booking
|
|
17
|
+
onto the waitlist recorded a pending drop-in payment, and cancelling never
|
|
18
|
+
removed one. Dues are now tied to the booking: recorded when the client
|
|
19
|
+
holds a spot (including when the waitlist promotes them), dropped when
|
|
20
|
+
they cancel in time or the studio cancels the class. A forfeited late
|
|
21
|
+
cancel still owes, same as it would lose a pack credit.
|
|
22
|
+
- **The waitlist got promoted into classes that had already started.** A
|
|
23
|
+
late cancel or a staff roster edit after start time moved the next person
|
|
24
|
+
in and charged them for a class they'd missed. Clients also can't cancel
|
|
25
|
+
once a class has started. Staff still can, to tidy the roster.
|
|
26
|
+
- **The booking form renamed existing clients.** Anyone who typed a known
|
|
27
|
+
email with a different name overwrote that client's name. An existing
|
|
28
|
+
client now keeps theirs.
|
|
29
|
+
- **Edit a single class.** The roster page can change one class's capacity,
|
|
30
|
+
instructor and notes. Extra capacity goes to the waitlist in order, and
|
|
31
|
+
those clients are emailed.
|
|
32
|
+
- A two-credit class said "1 credit deducted". The purchase thank-you page
|
|
33
|
+
said the pass was active before Stripe had confirmed the payment.
|
|
34
|
+
- **Dependencies**: dotenv → 18.0.3, marked → 18.0.14, supertest → 7.3.0.
|
|
35
|
+
- **Tests**: 135 → 144.
|
|
36
|
+
|
|
3
37
|
## 0.4.0 — 2026-09-27
|
|
4
38
|
|
|
5
39
|
**Upgrading with Stripe:** add `checkout.session.async_payment_succeeded` and
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "studio-os",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Self-hosted studio management: booking, class packs, memberships. Bring your own Stripe.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"bcryptjs": "^3.0.3",
|
|
20
20
|
"better-sqlite3": "^13.0.1",
|
|
21
21
|
"cookie-session": "^2.1.0",
|
|
22
|
-
"dotenv": "^18.0.
|
|
22
|
+
"dotenv": "^18.0.3",
|
|
23
23
|
"ejs": "^6.0.1",
|
|
24
24
|
"express": "^5.2.1",
|
|
25
|
-
"marked": "^18.0.
|
|
26
|
-
"nodemailer": "^10.0.
|
|
25
|
+
"marked": "^18.0.14",
|
|
26
|
+
"nodemailer": "^10.0.10",
|
|
27
27
|
"stripe": "^22.6.2"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"supertest": "^7.
|
|
30
|
+
"supertest": "^7.3.0"
|
|
31
31
|
},
|
|
32
32
|
"repository": {
|
|
33
33
|
"type": "git",
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
-- v4: a drop-in paid at the studio is only owed while its booking stands, so
|
|
2
|
+
-- the pending payment remembers which booking it's for.
|
|
3
|
+
|
|
4
|
+
ALTER TABLE payments ADD COLUMN booking_id INTEGER REFERENCES bookings(id);
|
|
5
|
+
CREATE INDEX IF NOT EXISTS idx_payments_booking ON payments(booking_id) WHERE booking_id IS NOT NULL;
|
package/src/db/index.js
CHANGED