Fix animation inconsistencies on pages with loading spinners

This commit is contained in:
2026-09-24 22:41:47 +05:30
parent 0c127f04af
commit 1acbda2f83
25 changed files with 98 additions and 23 deletions

9
backend/check_enum.py Normal file
View File

@@ -0,0 +1,9 @@
import asyncio
from sqlmodel import create_engine, text
DATABASE_URL = "postgresql://pragativeer_admin:local_secure_password_2026@postgres:5432/pragativeer_prod"
engine = create_engine(DATABASE_URL)
with engine.connect() as conn:
result = conn.execute(text("SELECT unnest(enum_range(NULL::tierenum));"))
print(result.fetchall())

9
backend/check_tier.py Normal file
View File

@@ -0,0 +1,9 @@
import asyncio
from sqlmodel import create_engine, text
DATABASE_URL = "postgresql://pragativeer_admin:local_secure_password_2026@postgres:5432/pragativeer_prod"
engine = create_engine(DATABASE_URL)
with engine.connect() as conn:
result = conn.execute(text("SELECT email, tier FROM \"user\" LIMIT 10;"))
print(result.fetchall())

15
backend/find_amit.py Normal file
View File

@@ -0,0 +1,15 @@
import asyncio
from sqlmodel import create_engine, select, Session
import sys
sys.path.append('backend')
import models
DATABASE_URL = "postgresql://pragativeer_admin:local_secure_password_2026@postgres:5432/pragativeer_prod"
engine = create_engine(DATABASE_URL)
with Session(engine) as session:
amit = session.exec(select(models.User).where(models.User.name == "Amit Kumar")).first()
if amit:
print(f"Amit Kumar: {amit.id}, {amit.tier}, {amit.target_exam}")
else:
print("Amit Kumar not found")

10
backend/fix_tier.py Normal file
View File

@@ -0,0 +1,10 @@
import asyncio
from sqlmodel import create_engine, text
DATABASE_URL = "postgresql://pragativeer_admin:local_secure_password_2026@postgres:5432/pragativeer_prod"
engine = create_engine(DATABASE_URL)
with engine.connect() as conn:
conn.execute(text("UPDATE \"user\" SET tier = 'AI Coach' WHERE tier = 'Al_Coach';"))
conn.commit()
print('Updated successfully')

14
backend/list_tests.py Normal file
View File

@@ -0,0 +1,14 @@
import asyncio
from sqlmodel import create_engine, select, Session
import sys
sys.path.append('backend')
import models
DATABASE_URL = "postgresql://pragativeer_admin:local_secure_password_2026@postgres:5432/pragativeer_prod"
engine = create_engine(DATABASE_URL)
with Session(engine) as session:
tests = session.exec(select(models.Test)).all()
print(f"Total Tests: {len(tests)}")
for t in tests:
print(t.id, t.title)

18
backend/test_api_tests.py Normal file
View File

@@ -0,0 +1,18 @@
import asyncio
from sqlmodel import create_engine, select, Session
import sys
sys.path.append('backend')
import models
DATABASE_URL = "postgresql://pragativeer_admin:local_secure_password_2026@postgres:5432/pragativeer_prod"
engine = create_engine(DATABASE_URL)
with Session(engine) as session:
user = session.exec(select(models.User).where(models.User.name == "Amit Kumar")).first()
print(f"User: {user.name}, Tier: {user.tier}, Exam: {user.target_exam}")
query = select(models.Test).where(models.Test.is_active == True).where(models.Test.type != "DPS")
tests = session.exec(query).all()
print(f"Tests returned from DB (excluding DPS): {len(tests)}")
for t in tests:
print(f" - {t.title} ({t.exam_pattern})")