Commit graph

13 commits

Author SHA1 Message Date
c3e599b3e4 Enhance MerchantStore component with improved form handling and dialog management
- Introduce keys for reactivity in the stall creation dialog and form elements to ensure proper rendering and state management.
- Implement autocomplete and spellcheck attributes for input fields to enhance user experience during store creation.
- Refactor form initialization and reset logic to ensure a clean state upon dialog opening and closing, improving usability.
- Add validation triggers after loading data to ensure form integrity and user feedback during the stall creation process.

These changes streamline the store creation experience, providing a more responsive and user-friendly interface for merchants.
2025-09-08 18:44:36 +02:00
6f68c2320e Enhance MerchantStore component with improved stall management and loading states
- Refactor the MerchantStore component to display a grid of user stalls, including loading indicators and action buttons for managing stalls and viewing products.
- Introduce a new card for creating additional stores, enhancing the user experience for merchants.
- Update the NostrmarketAPI to correct the endpoint for fetching stalls, ensuring accurate data retrieval.
- Implement state management for user stalls and active stall selection, improving the overall functionality and responsiveness of the component.

These changes streamline the stall management process for merchants, providing a more intuitive interface and better feedback during interactions.
2025-09-08 17:46:54 +02:00
e6107839a0 Implement store creation dialog in MerchantStore component
- Introduce a dialog for creating new stores, allowing users to input store name, description, currency, and shipping zones.
- Add functionality to manage shipping zones, including the ability to create new zones and select existing ones.
- Enhance the stall creation process with error handling and loading states, providing better user feedback during store setup.
- Update the NostrmarketAPI to support fetching available currencies and shipping zones, improving integration with the backend services.

These changes streamline the store creation experience for merchants, ensuring a more intuitive and guided process.

Refactor getCurrencies method in NostrmarketAPI to improve currency retrieval logic

- Introduce base currencies and enhance the logic to combine them with API currencies, ensuring no duplicates.
- Update debug logging to provide clearer information on currency retrieval outcomes.
- Simplify fallback mechanism to use base currencies directly in case of API failures.

These changes enhance the reliability and clarity of currency data handling in the NostrmarketAPI.

Refactor MerchantStore component to use NATIVE checkbox selection and add debug information

- Replace Checkbox component with native input checkboxes for zone selection, simplifying the binding with v-model.
- Enhance the user interface by adding debug information displaying the store name, selected zones count, and creation status.
- These changes improve the clarity of the zone selection process and provide useful debugging insights during store creation.

Enhance zone selection functionality in MerchantStore component

- Replace v-model with native checkbox handling for zone selection, improving clarity and user interaction.
- Add debug information to display currently selected zones, aiding in user understanding of their selections.
- Implement a new method to manage zone toggling, ensuring accurate updates to the selected zones array.

These changes streamline the zone selection process and provide better feedback for users during stall creation.

Improve zone selection handling and debugging in MerchantStore component

- Update zone selection to use a custom Checkbox component, enhancing user interaction and clarity.
- Add detailed debug information for selected zones, including raw array output and type, to aid in troubleshooting.
- Refactor the zone toggle logic to handle various input types, ensuring accurate updates to the selected zones array.

These changes enhance the user experience during stall creation by providing better feedback and more robust zone selection functionality.

Refactor Checkbox handling in MerchantStore component for improved zone selection

- Update zone selection to utilize the Shadcn/UI Checkbox component with v-model for better state management.
- Remove manual zone toggle logic and debug information, streamlining the component's functionality.
- Enhance user interaction by following recommended patterns for checkbox usage, ensuring reliable selections.

These changes improve the clarity and reliability of zone selection during stall creation.

Refactor MerchantStore component to utilize Shadcn Form components and improve form handling

- Replace existing form elements with Shadcn Form components (FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage) for better structure and validation.
- Integrate vee-validate and zod for type-safe form validation, enhancing user experience and error handling.
- Update shipping zone selection to use the new form structure, improving clarity and accessibility.
- Implement form submission logic with validation checks, ensuring required fields are filled before submission.

These changes enhance the overall form handling and user interaction during the store creation process.
2025-09-08 16:58:10 +02:00
b8ba41d088 Enhance logging in MerchantStore and NostrmarketAPI for better debugging
- Update the MerchantStore component to include detailed logging during merchant profile creation, capturing wallet ID and admin key details.
- Improve NostrmarketAPI request logging to include method type, headers with masked API key, and a preview of the request body.

These changes aim to facilitate easier debugging and provide more context during API interactions and merchant profile creation.
2025-09-08 16:58:10 +02:00
4ecec1aa78 Enhance MerchantStore component with merchant profile creation functionality
- Implement asynchronous merchant profile creation logic, including user authentication and wallet validation.
- Introduce loading and error handling states during the merchant creation process to improve user feedback.
- Update the button UI to reflect the creation status, providing a better user experience.
- Integrate toast notifications for success and error messages related to merchant profile creation.

These changes streamline the process for users to create their merchant profiles, ensuring they receive real-time feedback and guidance throughout the process.
2025-09-08 16:58:10 +02:00
b25e502c17 Add NostrmarketAPI integration and enhance MerchantStore component
- Introduce NostrmarketAPI service for improved merchant profile management.
- Update MerchantStore component to handle loading and error states during merchant profile checks.
- Implement logic to check for merchant profiles using the new API, enhancing user experience.
- Refactor computed properties and lifecycle methods to accommodate the new API integration.

These changes streamline the process of checking and managing merchant profiles, providing users with real-time feedback and improving overall functionality.
2025-09-08 16:58:10 +02:00
8cf62076fd Refactor MerchantStore component to enhance merchant profile management
- Update empty state messaging to guide users in creating a merchant profile before setting up a store.
- Introduce computed properties to check for user merchant profile and stalls, improving user experience.
- Rename functions and variables for clarity, ensuring better alignment with user actions.
- Prepare for future implementation of merchant profile and stall creation functionalities.

These changes streamline the onboarding process for new merchants and clarify the steps needed to start selling on the platform.
2025-09-08 16:58:10 +02:00
8e34f2c74e Enhance MerchantStore component with user store creation flow
- Introduce an empty state for users without a store, prompting them to create one.
- Implement computed property to check if the user has a store based on their order history.
- Update store statistics to reflect only the user's orders.
- Add a placeholder function for future store creation functionality.

These changes improve user experience by guiding new merchants to set up their stores effectively.
2025-09-08 16:58:10 +02:00
c284ad5778 Remove legacy compatibility layer and enforce modular architecture
- Delete src/stores/market.ts compatibility re-export file
- Update 15 files to import from proper module path @/modules/market/stores/market
- Add necessary type exports to market store for external consumers
- Remove empty src/stores/ directory completely
- Enforce clean modular architecture without global store shortcuts

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-07 02:30:37 +02:00
14d6bc6329 Add NostrmarketService to dependency injection container
- Introduce NOSTRMARKET_SERVICE token in the DI container for better service management.
- Update market module to create and register NostrmarketService instance using the new DI pattern.
- Refactor components and composables to inject NostrmarketService via the DI container, enhancing modularity and testability.

These changes improve the architecture by ensuring consistent service injection and eliminating legacy singleton references, aligning with the overall dependency injection strategy.
2025-09-07 01:31:24 +02:00
4feb5459cc Refactor authentication architecture to eliminate dual auth complexity
This major refactor consolidates the authentication system to use a single
source of truth, eliminating timing issues and architectural complexity
that was causing chat and payment functionality problems.

Key Changes:
• Remove old global useAuth composable and replace with useAuthService wrapper
• Update all 25+ files to use consistent auth pattern via dependency injection
• Eliminate dual auth detection workarounds from services (ChatService, PaymentService, etc.)
• Fix TypeScript errors and add proper Uint8Array conversion for Nostr private keys
• Consolidate auth state management to AuthService as single source of truth

Benefits:
• Resolves chat peer loading and message subscription timing issues
• Fixes wallet detection problems for Lightning payments
• Eliminates race conditions between global and injected auth
• Maintains API compatibility while improving architecture
• Reduces code complexity and improves maintainability

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-07 00:47:02 +02:00
36638d1080 Remove useNostrOrders composable and related Checkout page
- Delete the useNostrOrders composable as it is no longer needed.
- Update MerchantStore.vue to utilize nostrmarketService for publishing orders instead of the removed composable.
- Refactor market store to check the readiness of nostrmarketService instead of useNostrOrders.
- Remove the Checkout.vue page, streamlining the checkout process and improving code maintainability.
2025-09-05 04:22:54 +02:00
e40ac91417 Enhance market module with new chat and events features
- Introduce chat module with components, services, and composables for real-time messaging.
- Implement events module with API service, components, and ticket purchasing functionality.
- Update app configuration to include new modules and their respective settings.
- Refactor existing components to integrate with the new chat and events features.
- Enhance market store and services to support new functionalities and improve order management.
- Update routing to accommodate new views for chat and events, ensuring seamless navigation.
2025-09-05 00:01:40 +02:00
Renamed from src/components/market/MerchantStore.vue (Browse further)