fix: correct global milestone discount indentation (C1)
CI / Env docs check (push) Successful in 20s
CI / Docker compose check (push) Successful in 23s
CI / Nginx config check (push) Successful in 24s
CI / Frontend major deps (push) Successful in 35s
CI / Frontend deps check (push) Successful in 36s
CI / Secrets scan (push) Successful in 48s
CI / Go build (push) Successful in 45s
CI / Frontend build (push) Successful in 47s
CI / Knip (push) Successful in 55s
CI / Go vet (prod) (push) Successful in 1m39s
CI / Frontend a11y check (push) Successful in 2m7s
CI / Go vet (dev) (push) Successful in 2m6s
CI / go mod tidy (push) Successful in 32s
CI / golangci-lint (push) Has been cancelled
CI / Staticcheck (dev) (push) Has been cancelled
CI / Staticcheck (prod) (push) Has been cancelled
CI / Security scan (dev) (push) Has been cancelled
CI / Security scan (prod) (push) Has been cancelled
CI / Tests (prod) (push) Has been cancelled
CI / Tests (dev) (push) Has been cancelled
CI / Race (prod) (push) Has been cancelled
CI / Race (dev) (push) Has been cancelled
CI / Go vulnerabilities (push) Has been cancelled
CI / Svelte strict check (push) Has been cancelled
CI / Frontend QC (audit) (push) Has been cancelled
CI / Frontend QC (typecheck) (push) Has been cancelled
CI / Frontend QC (lint) (push) Has been cancelled
CI / Env docs check (push) Successful in 20s
CI / Docker compose check (push) Successful in 23s
CI / Nginx config check (push) Successful in 24s
CI / Frontend major deps (push) Successful in 35s
CI / Frontend deps check (push) Successful in 36s
CI / Secrets scan (push) Successful in 48s
CI / Go build (push) Successful in 45s
CI / Frontend build (push) Successful in 47s
CI / Knip (push) Successful in 55s
CI / Go vet (prod) (push) Successful in 1m39s
CI / Frontend a11y check (push) Successful in 2m7s
CI / Go vet (dev) (push) Successful in 2m6s
CI / go mod tidy (push) Successful in 32s
CI / golangci-lint (push) Has been cancelled
CI / Staticcheck (dev) (push) Has been cancelled
CI / Staticcheck (prod) (push) Has been cancelled
CI / Security scan (dev) (push) Has been cancelled
CI / Security scan (prod) (push) Has been cancelled
CI / Tests (prod) (push) Has been cancelled
CI / Tests (dev) (push) Has been cancelled
CI / Race (prod) (push) Has been cancelled
CI / Race (dev) (push) Has been cancelled
CI / Go vulnerabilities (push) Has been cancelled
CI / Svelte strict check (push) Has been cancelled
CI / Frontend QC (audit) (push) Has been cancelled
CI / Frontend QC (typecheck) (push) Has been cancelled
CI / Frontend QC (lint) (push) Has been cancelled
This commit is contained in:
@@ -1453,7 +1453,7 @@ func UpdateBookingServicesHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if err := tx.Rollback(r.Context()); err != nil && err.Error() != "tx is closed" {
|
||||
slog.Error("failed to rollback transaction", "err", err)
|
||||
}
|
||||
}()
|
||||
}()
|
||||
|
||||
// Evict any pending_release bookings that overlap this slot.
|
||||
if _, evictErr := EvictPendingReleaseOverlapping(r.Context(), tx, startTime, newEndTime); evictErr != nil {
|
||||
@@ -1999,7 +1999,7 @@ func CreateBookingHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// Get payment info
|
||||
var preStartPaid float64
|
||||
if err := db.Conn.QueryRow(r.Context(), `SELECT COALESCE(SUM(amount), 0) FROM payments WHERE booking_id = $1 AND payment_type IN ('deposit', 'full') AND status = 'completed'`, existingBooking.ID).Scan(&preStartPaid); err != nil {
|
||||
if err := db.Conn.QueryRow(r.Context(), `SELECT COALESCE(SUM(amount), 0) FROM payments WHERE booking_id = $1 AND payment_type IN ('deposit', 'full') AND status = 'completed'`, existingBooking.ID).Scan(&preStartPaid); err != nil {
|
||||
log.Printf("Failed to scan preStartPaid for booking %s: %v", existingBooking.ID, err)
|
||||
}
|
||||
populateDepositFields(&existingBooking, existingBooking.DepositRequired, preStartPaid)
|
||||
@@ -2236,7 +2236,7 @@ if err := db.Conn.QueryRow(r.Context(), `SELECT COALESCE(SUM(amount), 0) FROM pa
|
||||
if err := tx.Rollback(r.Context()); err != nil && err.Error() != "tx is closed" {
|
||||
slog.Error("failed to rollback transaction", "err", err)
|
||||
}
|
||||
}()
|
||||
}()
|
||||
|
||||
// Evict any pending_release bookings that overlap this slot.
|
||||
if _, err := EvictPendingReleaseOverlapping(r.Context(), tx, req.StartTime, endTime); err != nil {
|
||||
@@ -2447,7 +2447,7 @@ func EditBookingHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if err := tx.Rollback(r.Context()); err != nil && err.Error() != "tx is closed" {
|
||||
slog.Error("failed to rollback transaction", "err", err)
|
||||
}
|
||||
}()
|
||||
}()
|
||||
|
||||
var durationMinutes int
|
||||
if err := tx.QueryRow(r.Context(), `
|
||||
@@ -2606,7 +2606,7 @@ func ProgressBookingHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if err := tx.Rollback(r.Context()); err != nil && err.Error() != "tx is closed" {
|
||||
slog.Error("failed to rollback transaction", "err", err)
|
||||
}
|
||||
}()
|
||||
}()
|
||||
|
||||
// Read current status before updating to validate the transition
|
||||
var currentStatus string
|
||||
@@ -3035,7 +3035,7 @@ func ConfirmBookingHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if err := tx.Rollback(r.Context()); err != nil && err.Error() != "tx is closed" {
|
||||
slog.Error("failed to rollback transaction", "err", err)
|
||||
}
|
||||
}()
|
||||
}()
|
||||
|
||||
var bkStart time.Time
|
||||
var dur int
|
||||
@@ -3167,7 +3167,7 @@ func ConfirmBookingHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
if dav.Service != nil {
|
||||
var durationMinutes int
|
||||
if err := db.Conn.QueryRow(r.Context(), `
|
||||
if err := db.Conn.QueryRow(r.Context(), `
|
||||
SELECT total_duration_minutes FROM bookings WHERE id = $1
|
||||
`, bookingID).Scan(&durationMinutes); err != nil {
|
||||
log.Printf("ALERT: failed to scan total_duration_minutes for booking %s: %v", bookingID, err)
|
||||
@@ -3274,7 +3274,7 @@ func DeleteBookingHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if err := tx.Rollback(r.Context()); err != nil && err.Error() != "tx is closed" {
|
||||
slog.Error("failed to rollback transaction", "err", err)
|
||||
}
|
||||
}()
|
||||
}()
|
||||
|
||||
result, err := tx.Exec(r.Context(), `
|
||||
UPDATE bookings SET status = $1, updated_at = NOW() WHERE id = $2 AND user_id = $3
|
||||
@@ -3365,7 +3365,7 @@ func DeleteBookingHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if err := tx.Rollback(r.Context()); err != nil && err.Error() != "tx is closed" {
|
||||
slog.Error("failed to rollback transaction", "err", err)
|
||||
}
|
||||
}()
|
||||
}()
|
||||
|
||||
if _, err := tx.Exec(r.Context(), `DELETE FROM admin_notifications WHERE booking_id = $1`, bookingID); err != nil {
|
||||
log.Printf("Failed to delete admin notifications for booking %s: %v", bookingID, err)
|
||||
@@ -4204,7 +4204,7 @@ func AdminRescheduleBookingHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if err := tx.Rollback(r.Context()); err != nil && err.Error() != "tx is closed" {
|
||||
slog.Error("failed to rollback transaction", "err", err)
|
||||
}
|
||||
}()
|
||||
}()
|
||||
|
||||
forgiveNoShow := req.ForgiveNoShow != nil && *req.ForgiveNoShow
|
||||
if forgiveNoShow && bookingUserID != "" {
|
||||
|
||||
Reference in New Issue
Block a user