fix: booking duration calculation, tip page auth, and UI polish across frontend
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -2323,8 +2323,10 @@ func ConfirmBookingHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if dav.Service != nil {
|
||||
var durationMinutes int
|
||||
db.DB.QueryRow(r.Context(), `
|
||||
SELECT COALESCE(SUM(override_duration_minutes), (SELECT SUM(duration_minutes) FROM booking_services WHERE booking_id = $1))
|
||||
FROM booking_services WHERE booking_id = $1
|
||||
SELECT COALESCE(SUM(COALESCE(bs.override_duration_minutes, s.duration_minutes)), 60)
|
||||
FROM booking_services bs
|
||||
JOIN services s ON bs.service_id = s.id
|
||||
WHERE bs.booking_id = $1
|
||||
`, bookingID).Scan(&durationMinutes)
|
||||
if durationMinutes == 0 {
|
||||
durationMinutes = 60
|
||||
|
||||
@@ -45,7 +45,7 @@ func GenerateTestToken(userID, role string) string {
|
||||
}
|
||||
|
||||
func GenerateAdminToken() string {
|
||||
return GenerateTestToken("admin-test-001", "admin")
|
||||
return GenerateTestToken("admintest001", "admin")
|
||||
}
|
||||
|
||||
func GenerateVerifiedUserToken(userID string) string {
|
||||
|
||||
Reference in New Issue
Block a user