refactor: translate all docstrings and comments to English (STRICT ENGLISH POLICY complete)
This commit is contained in:
@@ -15,7 +15,7 @@ def check_in_item(
|
||||
db: Session = Depends(get_db),
|
||||
current_user: auth.TokenData = Depends(auth.get_current_user)
|
||||
):
|
||||
"""[C-01] Check-in item — doar utilizatori autentificati. [M-02] user_id din token."""
|
||||
"""[C-01] Check-in item — only for authenticated users. [M-02] user_id from token."""
|
||||
if op.quantity <= 0:
|
||||
raise HTTPException(status_code=400, detail="Quantity must be greater than zero")
|
||||
|
||||
@@ -26,7 +26,7 @@ def check_in_item(
|
||||
# Update quantity
|
||||
item.quantity += op.quantity
|
||||
|
||||
# Create Mandatory Audit Log — [M-02] user_id din token
|
||||
# Create Mandatory Audit Log — [M-02] user_id from token
|
||||
audit = models.AuditLog(
|
||||
user_id=current_user.sub,
|
||||
action="CHECK_IN",
|
||||
@@ -45,7 +45,7 @@ def check_out_item(
|
||||
db: Session = Depends(get_db),
|
||||
current_user: auth.TokenData = Depends(auth.get_current_user)
|
||||
):
|
||||
"""[C-01] Check-out item — doar utilizatori autentificati."""
|
||||
"""[C-01] Check-out item — only for authenticated users."""
|
||||
if op.quantity <= 0:
|
||||
raise HTTPException(status_code=400, detail="Quantity must be greater than zero")
|
||||
|
||||
@@ -78,7 +78,7 @@ def trash_item(
|
||||
db: Session = Depends(get_db),
|
||||
current_user: auth.TokenData = Depends(auth.get_current_user)
|
||||
):
|
||||
"""[C-01] Trash item — doar utilizatori autentificati."""
|
||||
"""[C-01] Trash item — only for authenticated users."""
|
||||
if op.quantity <= 0:
|
||||
raise HTTPException(status_code=400, detail="Quantity must be greater than zero")
|
||||
|
||||
@@ -112,7 +112,7 @@ def bulk_check_out(
|
||||
db: Session = Depends(get_db),
|
||||
current_user: auth.TokenData = Depends(auth.get_current_user)
|
||||
):
|
||||
"""[C-01] Bulk check-out — doar utilizatori autentificati."""
|
||||
"""[C-01] Bulk check-out — only for authenticated users."""
|
||||
results = {"success": [], "errors": []}
|
||||
|
||||
for op in bulk_op.items:
|
||||
@@ -151,7 +151,7 @@ def bulk_sync(
|
||||
db: Session = Depends(get_db),
|
||||
current_user: auth.TokenData = Depends(auth.get_current_user)
|
||||
):
|
||||
"""[C-01] Bulk sync offline operations — doar utilizatori autentificati."""
|
||||
"""[C-01] Bulk sync offline operations — only for authenticated users."""
|
||||
results = {"success": [], "errors": []}
|
||||
|
||||
for op in payload.operations:
|
||||
@@ -206,7 +206,7 @@ def get_logs(
|
||||
db: Session = Depends(get_db),
|
||||
current_user: auth.TokenData = Depends(auth.get_current_user)
|
||||
):
|
||||
"""[C-01] Lista audit logs — doar utilizatori autentificati."""
|
||||
"""[C-01] Audit logs list — only for authenticated users."""
|
||||
# Join with User to get the username directly
|
||||
logs_with_users = db.query(
|
||||
models.AuditLog.id,
|
||||
|
||||
Reference in New Issue
Block a user