Commit Graph

54 Commits

Author SHA1 Message Date
87eb66f06b WIP
Some checks failed
Telegram Mini App Shop Builder / Compute version metadata (push) Has been cancelled
Telegram Mini App Shop Builder / Run Frontend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run Backend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run PHP_CodeSniffer (push) Has been cancelled
Telegram Mini App Shop Builder / Build module. (push) Has been cancelled
Telegram Mini App Shop Builder / release (push) Has been cancelled
2026-03-11 21:52:01 +03:00
980f656a0a feat(admin): telegram settings improvements (#63)
Some checks failed
Telegram Mini App Shop Builder / Compute version metadata (push) Has been cancelled
Telegram Mini App Shop Builder / Run Frontend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run Backend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run PHP_CodeSniffer (push) Has been cancelled
Telegram Mini App Shop Builder / Build module. (push) Has been cancelled
Telegram Mini App Shop Builder / release (push) Has been cancelled
2026-02-23 15:17:34 +03:00
c0ca0c731d feat(cron): add scheduled jobs configuration in admin (#59)
* feat(cron): add database schedule jobs instead of file

* feat(cron): add scheduled jobs configuration in admin (#59)

* reformat: fix codestyle (#59)

* reformat: fix codestyle (#59)

* feat: disable cron debug (#59)
2026-02-23 15:17:33 +03:00
dependabot[bot]
b5a46c9123 build(deps-dev): bump the npm_and_yarn group across 1 directory with 2 updates
Bumps the npm_and_yarn group with 2 updates in the /frontend/admin directory: [ajv](https://github.com/ajv-validator/ajv) and [minimatch](https://github.com/isaacs/minimatch).


Updates `ajv` from 6.12.6 to 6.14.0
- [Release notes](https://github.com/ajv-validator/ajv/releases)
- [Commits](https://github.com/ajv-validator/ajv/compare/v6.12.6...v6.14.0)

Updates `minimatch` from 3.1.2 to 3.1.3
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.1.2...v3.1.3)

---
updated-dependencies:
- dependency-name: ajv
  dependency-version: 6.14.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: minimatch
  dependency-version: 3.1.3
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-22 13:34:35 +03:00
dependabot[bot]
66790768d9 build(deps): bump the npm_and_yarn group across 2 directories with 2 updates
Bumps the npm_and_yarn group with 1 update in the /frontend/admin directory: [axios](https://github.com/axios/axios).
Bumps the npm_and_yarn group with 1 update in the /frontend/spa directory: [swiper](https://github.com/nolimits4web/Swiper).


Updates `axios` from 1.13.2 to 1.13.5
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.13.2...v1.13.5)

Updates `swiper` from 12.0.3 to 12.1.2
- [Release notes](https://github.com/nolimits4web/Swiper/releases)
- [Changelog](https://github.com/nolimits4web/swiper/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nolimits4web/Swiper/compare/v12.0.3...v12.1.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.13.5
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: swiper
  dependency-version: 12.1.2
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-22 13:34:35 +03:00
9da605b9ea feat: add system information drawer (#44) 2026-01-05 15:41:47 +03:00
afade85d00 feat: add haptic feedback toggle setting
- Add haptic_enabled field to AppDTO with default value true
- Update SettingsSerializerService to deserialize haptic_enabled
- Add haptic_enabled setting in admin panel (GeneralView) with toggle
- Update admin settings store to include haptic_enabled default value
- Update SPA SettingsStore to load haptic_enabled from API
- Refactor useHapticFeedback composable to return safe wrapper object
- Replace all direct window.Telegram.WebApp.HapticFeedback usage with composable
- Update useHapticScroll to use useHapticFeedback composable
- Add getHapticFeedback helper function in CheckoutStore for store usage
- Add haptic_enabled default value to app.php configuration
- All haptic feedback methods now check settings internally
- Remove redundant if checks from components (handled in composable)
2025-12-25 22:36:07 +03:00
0a7877ddbe feat: add customizable text for manager contact button
- Add text_manager_button field to TextsDTO with getter method
- Update SettingsSerializerService to validate and deserialize new field
- Add text_manager_button field to admin settings store
- Add input field in admin TextsView for configuring button text
- Update SPA SettingsStore with default value including emoji
- Replace hardcoded button text in Product.vue with configurable text
- Remove SVG icon from manager button to allow emoji usage
- Add default value with emoji to app.php configuration
- Button text now customizable via admin panel Texts tab
2025-12-25 20:43:12 +03:00
551c4a3506 feat: add BETA label and UI improvements for TeleCart Pulse tab
- Add BETA badge to TeleCart Pulse tab in navigation
- Implement pulsing heartbeat animation for pulse icon
- Add dynamic color change for icon (light red when inactive, bright red when active)
- Add dynamic color change for BETA label (light orange when inactive, bright orange when active)
- Add informational block about TeleCart Pulse in TeleCartPulseView component
- Update App.vue with pulse icon animation and styling
- Update TeleCartPulseView.vue with info block and styling
2025-12-25 19:06:50 +03:00
115c13393f fix(admin): correct logs sorting by datetime with milliseconds
- Change sortField from datetime to datetime_raw for proper chronological sorting
- Add sortField attribute to 'Date and time' column to show sort indicator
- Remove sorting from 'Level' and 'Channel' columns
- Add information about displaying last 100 events
2025-12-25 18:31:13 +03:00
6a635e1896 feat(admin): improve navigation UI and move logs to drawer
- Add icons to all navigation tabs in admin panel
- Rename 'Telegram Покупатели' tab to 'Покупатели'
- Move logs view from navigation tab to Drawer component
- Add logs button in TopLead component next to cache reset button
- Group logs and cache reset buttons in ButtonGroup
- Remove logs route from router
2025-12-25 18:13:09 +03:00
ecf4df363d feat: add product interaction mode selector with three scenarios
- Add ItemToggleButton component for 3-way toggle in admin panel
- Add product_interaction_mode setting with options: order, manager, browser
- Add manager_username setting for Telegram manager contact
- Remove store_enabled setting, replaced with product_interaction_mode
- Create migration to automatically migrate store_enabled to product_interaction_mode
- Update Product.vue to handle all three interaction modes
- Update Dock.vue to show cart button only when product_interaction_mode is 'order'
- Rename 'Магазин' tab to 'Витрина' in admin panel
- Remove 'Разрешить покупки' option (now controlled via product_interaction_mode)
- Set default product_interaction_mode to 'browser'
- Update StoreDTO to remove enableStore field
- Update SettingsHandler to return product_interaction_mode instead of store_enabled
2025-12-25 18:02:38 +03:00
c3994b2291 feat: add setting to control category products button visibility
- Add show_category_products_button field to StoreDTO
- Update SettingsSerializerService to support new field
- Add setting in admin panel on 'Store' tab with toggle
- Pass setting to SPA through SettingsHandler
- Button displays only for categories with child categories
- Add default value true to configuration
2025-12-24 01:47:34 +03:00
2ec683f016 feat: hide greeting image from frontend 2025-12-23 21:49:56 +03:00
9870f2f363 fix: correct counter id for yandex metrika test 2025-12-15 19:45:31 +03:00
97df5b4c0a feat: add html editor for telegram messages 2025-12-15 19:44:56 +03:00
8a777cd4d2 feat: update design for product and product cards 2025-12-14 18:35:07 +03:00
152e6d715b feat: tg bot start message customization 2025-12-14 17:02:35 +03:00
e9c6ed8ddf feat: add options to select aspect ratio and cron algo for product images 2025-12-08 21:25:00 +03:00
4a3dcc11d1 feat(pulse): implement reliable event tracking and delivery system
Implement comprehensive event tracking system for TeleCart Pulse that ensures
all user interactions and order events are reliably captured and delivered to
the analytics platform, even in case of network failures or service outages.

Business Value:
- Guaranteed event delivery: All events are stored in database before sending,
  ensuring no data loss even if SaaS service is temporarily unavailable
- Automatic retry mechanism: Failed events are automatically retried with
  configurable attempts, reducing manual intervention
- Real-time monitoring: Admin dashboard displays event statistics (pending,
  sent, failed) to track system health and delivery status
- Data integrity: Idempotency keys prevent duplicate events, ensuring accurate
  analytics and metrics
- Performance optimization: Statistics are cached for 1 hour to reduce database
  load while maintaining visibility

Key Features:
- Event queue system: Events are queued in database with status tracking
  (pending/sent/failed)
- Asynchronous processing: Events are sent via background tasks, not blocking
  user interactions
- Error tracking: Failed events include detailed error reasons for debugging
- Campaign tracking: Only events with valid campaign_id and tracking_id are
  stored, ensuring data quality
- Admin visibility: Statistics dashboard shows delivery status at a glance

This system ensures reliable data collection for campaign analytics, A/B testing,
and performance metrics, providing accurate insights for business decisions.
2025-12-08 00:29:33 +03:00
7372b9c330 feat: add UI for CRON Scheduler 2025-12-07 19:55:05 +03:00
216ed7e522 build: fix cache hash for admin 2025-12-07 19:55:04 +03:00
615e8c54a6 feat: add aspect ratio selector for products_carousel 2025-12-06 18:18:34 +03:00
1fbbb7b6db feat(texts): add options to redefine text for zero product prices 2025-12-06 17:33:28 +03:00
f539bbfbbf feat: move getImage response to admin 2025-12-06 17:33:28 +03:00
cd060610fe feat(products-feed): replace fixed image dimensions with aspect ratio selection
- Added image aspect ratio selection (1:1, 4:5, 3:4, 2:3) to ProductsFeed block configuration in Admin panel
- Removed manual width/height input fields
- Updated ProductsFeed block in SPA to send aspect ratio parameter instead of dimensions
- Implemented backend logic to calculate image height based on selected aspect ratio and base width (300px)
- Updated default configuration for products_feed block
- Added descriptive help text for each aspect ratio option in the dropdown
2025-12-06 15:52:30 +03:00
38668fb4a7 feat: image processing improve 2025-12-06 12:59:55 +03:00
44d2af3b30 fix: settings numeric error 2025-12-04 14:46:30 +03:00
ad54b14c68 fix: admin mainpage builder drawer doesnot show 2025-12-04 14:08:55 +03:00
8f6af04e73 fix(admin): fix error when chat_id is string 2025-12-04 11:23:00 +03:00
772efce242 Fix frontend tests and linting errors 2025-12-03 01:34:12 +03:00
0ab09aad10 fix: switch between code and visual for custom forms 2025-12-02 20:03:43 +03:00
fdcfce0a79 feat: add reactivity to formkit 2025-12-02 18:22:27 +03:00
cedc49f0d5 feat: Use yaMetrika number in settings 2025-12-01 19:44:14 +03:00
ef785654b9 feat: track and push TeleCart Pulse events 2025-11-30 16:52:32 +03:00
e8d0f8a819 feat: add TeleCartPulse telemetry system and ETL endpoints
- Add TeleCartPulse service for event tracking and analytics
  - Implement PayloadSigner for secure payload signing/verification
  - Add StartParamSerializer for campaign parameter handling
  - Create TeleCartPulseServiceProvider for dependency injection
  - Add PulseEvents constants and exception classes

- Add TelemetryHandler for ingesting client-side events
  - Implement /ingest endpoint for receiving webapp events
  - Support WEBAPP_OPEN event tracking with campaign metadata

- Add ETLHandler for customer data export
  - Implement /customers endpoint for ETL processes
  - Add /customers/meta endpoint for pagination metadata
  - Support filtering by updated_at timestamp
  - Include customer metrics: orders count, total spent, etc.

- Add InvalidApiTokenException for API key validation
- Update Request class to support API key extraction
- Add Utils helper methods for domain extraction
- Integrate telemetry in frontend SPA (webapp open event)
- Add TeleCartPulseView in admin panel for API key configuration
- Update routes to include new telemetry and ETL endpoints
2025-11-30 11:54:24 +03:00
952d8e58da feat(customers): track order meta and OC sync
- add telecart_order_meta table and orders_count column for customers
- introduce OcCustomerService and OrderMetaService for syncing OC data
- rework OrderCreateService transaction flow, metadata handling and tests
- increment telegram customer orders_count and expose it via handlers/UI
- update stats dashboard with rub formatting, tooltips and customers count
- sync SPA theme colors with Telegram WebApp and fix dark variant behavior
- add helpers for RUB formatting and bool casting; simplify logs handler
2025-11-24 14:11:31 +03:00
b39a344a7d feat(admin): refactor logs viewer with table display and detailed dialog
Backend changes:
- Update LogsHandler.php to parse Monolog logs using regex
- Add parseLogLines() method to extract structured data from logs
- Support ISO 8601 format with microseconds and timezone
- Parse JSON context with nested objects and escaped characters support
- Add formatDateTime() method for readable date formatting
- Add findJsonEnd() method for correct JSON object extraction
- Return data in JSON format instead of plain string

Frontend changes:
- Update logs.js store: change data structure from string to array of objects
- Add loading flag for loading indicator
- Remove caching check for data freshness

- Completely refactor LogsViewer.vue component:
  * Replace textarea with PrimeVue DataTable with pagination and sorting
  * Add "Actions" column with view button (eye icon)
  * Use Badge component for log levels with color indicators
  * Remove "Context" column from table (unreadable in table view)
  * Add dialog with detailed log information:
    - Date and time (formatted and raw)
    - Level with color indicator
    - Channel
    - Message
    - Context (formatted JSON)
    - Raw string
  * Add word wrap for all text fields in dialog
  * Dialog closes on outside click (dismissableMask)
  * Configure pagination: 15 records per page by default

UX improvements:
- Improved log readability with structured display
- Easy navigation through large number of records via pagination
- Quick access to detailed information through dialog
- Color-coded levels for quick visual assessment
2025-11-24 00:09:32 +03:00
7a5eebec91 feat: добавлена функциональность политики конфиденциальности и согласия на обработку ПД
Основные изменения:

Backend:
- Добавлена миграция для поля privacy_consented_at в таблицу telecart_customers
- Создан PrivacyPolicyHandler с методами:
  * checkIsUserPrivacyConsented - проверка наличия согласия пользователя
  * userPrivacyConsent - сохранение согласия пользователя
- Обновлен TelegramService для извлечения userId из initData
- Обновлен TelegramServiceProvider для внедрения зависимостей
- Добавлены новые маршруты в routes.php
- Обновлен SettingsHandler для возврата privacy_policy_link
- Обновлен TelegramCustomersHandler для включения privacy_consented_at в ответы
- Обновлены тесты TelegramServiceTest

Frontend (SPA):
- Создан компонент PrivacyPolicy.vue для отображения запроса согласия
- Добавлена проверка согласия при инициализации приложения (main.js)
- Обновлен App.vue для отображения компонента PrivacyPolicy
- Добавлены функции checkIsUserPrivacyConsented и userPrivacyConsent в ftch.js
- Обновлен SettingsStore для хранения privacy_policy_link и is_privacy_consented

Frontend (Admin):
- Добавлено поле privacy_policy_link в настройки (settings.js)
- Добавлена настройка ссылки на политику конфиденциальности в GeneralView.vue
- Обновлен CustomersView.vue:
  * Добавлена колонка privacy_consented_at с отображением даты согласия
  * Добавлена поддержка help-текста для колонок с иконкой вопроса и tooltip
  * Добавлены help-тексты для колонок last_seen_at, privacy_consented_at, created_at
  * Улучшено форматирование кода
2025-11-23 23:19:15 +03:00
9a93cc7342 feat: add Telegram customers management system with admin panel
Implement comprehensive Telegram customers storage and management functionality:

Backend:
- Add database migration for telecart_customers table with indexes
- Create TelegramCustomer model with CRUD operations
- Implement TelegramCustomerService for business logic
- Add TelegramCustomerHandler for API endpoint (saveOrUpdate)
- Add TelegramCustomersHandler for admin API (getCustomers with pagination, filtering, sorting)
- Add SendMessageHandler for sending messages to customers via Telegram
- Create custom exceptions: TelegramCustomerNotFoundException, TelegramCustomerWriteNotAllowedException
- Refactor TelegramInitDataDecoder to separate decoding logic
- Add TelegramHeader enum for header constants
- Update SignatureValidator to use TelegramInitDataDecoder
- Register new routes in bastion/routes.php and src/routes.php

Frontend (Admin):
- Add CustomersView.vue component with PrimeVue DataTable
- Implement advanced filtering (text, date, boolean filters)
- Add column visibility toggle functionality
- Add global search with debounce
- Implement message sending dialog with validation
- Add Russian locale for PrimeVue components
- Add navigation link in App.vue
- Register route in router

Frontend (SPA):
- Add saveTelegramCustomer utility function
- Integrate automatic customer data saving on app initialization
- Extract user data from Telegram.WebApp.initDataUnsafe

The system automatically saves/updates customer data when users access the Telegram Mini App,
and provides admin interface for viewing, filtering, and messaging customers.

BREAKING CHANGE: None
2025-11-23 21:30:51 +03:00
6a59dcc0c9 feat: add FormKit framework support and update dependencies
- Add `telecart_forms` table migration and default checkout form seeder
- Implement `FormsHandler` to fetch form schemas
- Update `OrderCreateService` to handle custom fields in order comments
- Add `update` method to QueryBuilder and Grammar
- Add `Arr::except` helper
- Update composer dependencies (Carbon, Symfony, PHPUnit, etc.)
- Improve `MigratorService` error handling
- Add unit tests for new functionality
2025-11-23 16:05:46 +03:00
ae9771dec4 feat: maintenance tasks, logs
- add interval for periodic maintenance tasks
- add cache prune periodic task
- use rotating handler for monolog
- update UI logs component
- correctly reset cache from admin
- increase cache timeout for tg data
- fix UI errors in admin
2025-11-20 09:20:11 +03:00
07b7289fdc build: use node instead of bun 2025-11-18 15:51:05 +03:00
d6db083dea Implement PSR3 and PHP Monolog (#19)
* feat: install monolog composer lib
* feat: implement psr3 and monolog
* feat: display logs in frontend
* fix: tests
* build: update cicd to run tests for PR
* build: add phpcs to cicd
* refactor: fix phpcs problems
2025-11-17 15:00:54 +03:00
770ec81fdc feat: disable source maps for frontend production builds 2025-11-16 20:48:00 +03:00
09f1e514a9 feat: UI/UX, add reset cache to admin 2025-11-16 20:34:03 +03:00
f5d9d417b3 feat: improve mainpage ui/ux 2025-11-16 01:55:59 +03:00
f0837e5c94 feat: added new products_carousel bock type 2025-11-13 22:37:55 +03:00
c0a6cb17b3 feat: add migrations, mantenance tasks, database cache, blocks cache 2025-11-13 02:24:00 +03:00
6176c720b1 feat: new settings and mainpage blocks 2025-11-12 20:32:10 +03:00