Commit graph

30 commits

Author SHA1 Message Date
31d9ccb82a refactor(core): simplify code for price aggregation and formatting
Improve readability by removing unnecessary parentheses in `min_price` and `max_price` methods in `models.py`. Enhance JSON serialization error formatting in `views.py` and adjustment of field formatting in serializers. No functional changes, purely stylistic updates for code maintainability.
2026-03-05 11:03:45 +03:00
6955e6bec6 feat(models/serializers): migrate to Decimal for monetary values
Replaced `float` with `Decimal` for monetary calculations to prevent precision loss and enhance accuracy. Updated related models, serializers, and utility functions accordingly.
2026-03-05 11:03:27 +03:00
ad320235d6 feat(payments, vibes_auth, core): introduce decimal fields, 2FA, and admin OTP
- Refactored monetary fields across models to use `DecimalField` for improved precision.
- Implemented two-factor authentication (2FA) for admin logins with OTP codes.
- Added ability to generate admin OTP via management commands.
- Updated Docker Compose override for dev-specific port bindings.
- Included template for 2FA OTP verification to enhance security.

Additional changes:
- Upgraded and downgraded various dependencies (e.g., django-celery-beat and yarl).
- Replaced float-based calculations with decimal for consistent rounding behavior.
- Improved admin user management commands for activation and OTP generation.
2026-03-03 00:42:21 +03:00
adec5503b2 feat(core/auth): enable encryption for sensitive fields and token handling
Add encryption for user PII fields (phone number, name, attributes) and address fields to enhance data security. Introduced timestamped activation tokens for improved validation. Included migrations to encrypt existing plaintext data.

Refactored GraphQL settings to limit query depth and optionally disable introspection for enhanced API defense. Implemented throttling to safeguard API rates.

Improved Dockerfiles for better user management and restored media migration tools for smooth instance upgrades.
2026-03-02 00:11:57 +03:00
eef774c3a3 feat(markdown): integrate markdown rendering and editor support
Replace WYSIWYG editor with Markdown editor across all relevant models and admin fields. Add utilities for rendering and stripping markdown. Adjust serializers, views, and templates to support markdown content. Introduce `PastedImage` model and upload endpoint for handling inline image uploads in markdown.

This change simplifies content formatting while enhancing flexibility with markdown support.
2026-02-27 23:36:51 +03:00
f664b088a4 refactor(category): replace cache usage with model property for min/max price
remove redundant cache lookups for `min_price` and `max_price` in the category model by leveraging cached properties. minimizes complexity and improves maintainability while ensuring consistent behavior.
2026-02-25 12:19:39 +03:00
6311993b14 refactor(core): improve type checking and fix password handling in demo data
Replaced `pyright:ignore` with `ty:ignore` for better compatibility and accuracy in type annotations. Removed inline passwords during user creation and updated logic to securely set and save passwords afterward.
2026-02-15 03:06:17 +03:00
20473818a9 feat(emailing): add OpenAPI schemas for unsubscribe and tracking endpoints
Includes detailed OpenAPI schemas for unsubscribe (GET and POST) and tracking pixel (GET) endpoints, supporting email compatibility and event tracking. Added support for RFC 8058-compliant one-click unsubscribe functionality and transparent image-based email tracking.
2026-02-05 19:30:53 +03:00
45a1813465 feat(admin): add demo data management command and enhance low stock UI
Introduce `demo_data` management command for populating or removing demo fixtures in the system, facilitating testing and demonstration. Enhancements include low stock product list UI with product images and integration of value formatting for financial KPIs.
2026-02-05 17:07:02 +03:00
f3260686cf feat(fixtures): add demo.json for gemstone and jewelry showcase
Includes categories, brands, attributes, products, tags, and vendor/demo user data for demonstration purposes.
2026-02-05 15:40:57 +03:00
28622cec90 2026.1 2026-01-26 03:23:41 +03:00
39b841fcb2 2026.1 2026-01-25 23:16:38 +03:00
dc7f8be926 Features: 1) None;
Fixes: 1) Add `# ty: ignore` comments to suppress type errors in multiple files; 2) Correct method argument annotations and definitions to align with type hints; 3) Fix cases of invalid or missing imports and unresolved attributes;

Extra: Refactor method definitions to use tuple-based method declarations; replace custom type aliases with `Any`; improve caching utility and error handling logic in utility scripts.
2025-12-19 16:43:39 +03:00
13e7af52aa Features: 1) Improved request processing in middleware by adding mutable QueryDict implementation; 2) Extended type annotations across various modules for enhanced type safety; 3) Refined JWT token lifetime configuration for environment-specific logic.
Fixes: 1) Addressed missing or incorrect imports and type hints with `# ty:ignore` markers; 2) Fixed search queryset error handling in filters module; 3) Resolved issues in viewsets with updated `@action` method usage.

Extra: Removed unused classes and dependencies (e.g., `BaseMutation`, `basedpyright`, and related packages); streamlined GraphQL mutation implementations; cleaned up unused arguments in model `save` methods.
2025-12-19 15:17:17 +03:00
fdd42b8531 Features: I thought that's gonna be like 2 weeks stuff 2025-12-18 19:24:10 +03:00
5f5274f9cd Features: 1) Add detailed type annotations across middleware, tests, and utility code; 2) Integrate stricter type-checking configurations in pyproject.toml; 3) Enhance middleware functionality with additional type-safe logic.
Fixes: 1) Correct default values and type handling in util constructors; 2) Resolve missing or ambiguous `cast` operations for dynamic typing in tests and views; 3) Address potential issues with fallback/default handling in middleware.

Extra: 1) Refactor test cases to ensure stricter adherence to typing hints and valid contracts; 2) Update docstrings to align with new type annotations; 3) Cleanup unused imports and add comments for improved maintainability.
2025-12-18 16:44:13 +03:00
a81f734e23 Features: (1) None;
Fixes: (1) Removed all `# type: ignore` annotations across the codebase; (2) Fixed usage of Django Model methods by eliminating unnecessary `# type: ignore` directives; (3) Adjusted usage of functions like `get()` to align with method expectations, removing incorrect comments;

Extra: (1) Deleted `pyrightconfig.json` as part of migration to a stricter type-checked environment; (2) Minor code cleanup, including formatting changes and refactoring import statements in adherence to PEP8 recommendations.
2025-12-18 15:55:43 +03:00
890957197c Extra: RUFF 2025-12-15 20:29:02 +03:00
845ac8853d Extra: 1) I18N 2025-12-10 22:21:36 +03:00
5962fb1145 Features: 1) Add timeframe filter component in the admin dashboard; 2) Create low stock products widget with tailored design; 3) Extend KPI section to include dynamic data (GMV, Orders, AOV, Net Revenue, Refund Rate); 4) Allow timeframe selection functionality for metrics and charts.
Fixes: 1) Add missing `constance.config` import in `views.py`; 2) Replace hardcoded timeframe logic with configurable period parsing; 3) Ensure proper handling of empty datasets for low stock and KPI calculations.

Extra: Refactor dashboard templates to improve layout and add contextual adjustments (e.g., grid updates, daily sales title); Optimize cache handling for dashboard metrics; Cleanup unused legacy dashboard variables.
2025-12-10 19:33:18 +03:00
71389ee278 Features: 1) Add customer mix and shipped vs digital metrics to dashboard context;
Fixes: 1) Replace failed daily stats with empty lists instead of crashing; 2) Fix inconsistent variable scoping and cleanup;

Extra: 1) Refactor daily stats logic to handle exceptions gracefully; 2) Improve readability by grouping related metrics; 3) Add type annotations for new context variables.
2025-11-17 22:42:38 +03:00
08340c801a Features: 1) Added daily sales chart with orders and gross revenue visualization; 2) Added fallback message for insufficient data;
Fixes: 1) Removed deprecated UI elements;

Extra: 1) Refactored layout to use card components; 2) Added responsive chart with dual Y-axes; 3) Included error handling for chart initialization.
2025-11-17 15:50:29 +03:00
00a172d463 Features: 1) Add currency symbol display in dashboard; 2) Add type hints to dashboard_callback and related functions;
Fixes: 1) Fix type annotations for get_revenue, get_returns, get_total_processed_orders; 2) Add missing import for Context;

Extra: 1) Add type hint for currency_symbol; 2) Add type ignore comments for image_url; 3) Update UNFOLD config to use dict[str, Any]; 4) Add missing import for typing.Any; 5) Refactor template to conditionally display currency symbol.
2025-11-16 23:35:03 +03:00
d2f46539ee Features: 1) Add top 10 most wished and most popular products lists; 2) Update UI to display lists with cards and counts.
Fixes: 1) Fix translation of "Returns" to "Возвраты"; 2) Fix translation of "Sales vs Returns" to "Продажи и Возвраты".

Extra: 1) Refactor wishlist and order product queries to support top 10 lists; 2) Add backward compatibility for single product views; 3) Update template structure to include new lists and improve layout.
2025-11-16 17:02:36 +03:00
d139b7daf6 Features: 1) Enhance quick links rendering with flexible class styling;
Fixes: 1) Fix inconsistent indentation and formatting in quick links construction;

Extra: 1) Add class attribute to navigation component for layout control; 2) Improve readability by using consistent block structure.
2025-11-16 16:11:14 +03:00
b305876feb Features: 1) Add "eVibes" version display in admin dashboard footer;
Fixes: 1) Remove dashboard title exclusion logic; 2) Refactor quick links to include title, link, and optional icon;

Extra: 1) Add separator and version text component; 2) Update template to render version info; 3) Minor formatting cleanup.
2025-11-16 16:03:11 +03:00
20ecaa683f Features: 1) Added "Orders", "Taskboard", "Support", "Quick Links" settings; 2) Reordered and updated setting labels for consistency.
Fixes: 1) Corrected line endings in locale file; 2) Updated POT-Creation-Date to reflect current build.

Extra: 1) Refactored setting file to improve structure; 2) Ensured translation keys match updated UI labels.
2025-11-16 15:48:23 +03:00
56826300b6 Features: 1) Added dashboard callback view to expose revenue, returns, and order metrics; 2) Added new admin dashboard template with visual metrics and charts; 3) Integrated language flags into UNFOLD configuration using centralized LANGUAGES_FLAGS.
Fixes: 1) None.

Extra: 1) Refactored language flag definitions into a centralized dictionary in base settings; 2) Added commerce utility functions for revenue, returns, and order processing; 3) Improved code structure and documentation in views and utils.
2025-11-16 14:50:17 +03:00
5a046fb628 Features: 1) Messaging submodule drafts 2025-11-11 23:31:06 +03:00
33362d8340 2025.4 PREVIEW 2025-11-08 04:38:09 +03:00
Renamed from core/views.py (Browse further)