Home
Wiki
Home
Wiki
  1. Components
  • Back to home
  • 1. Themes
  • Vs Code
    • Getting Started
  • Kitchenware
    • Layout
      • New Layout
      • Legacy Layout
    • Components
      • Announcement
      • Banner Carousel
      • Banner With Products Carousel
      • Blog Category List
      • Blog List
      • Brand List
      • Brands Carousel
      • Breadcrumb
      • Call To Action
      • Cart
      • Categories List
      • Change Password
      • Checkout
      • Cookie Manager
      • Filter list
      • Footer
      • Forgot Password
      • Form
      • Hero Carousel
      • Icon Block
      • Invitation
      • Last Visited Products
      • Layout
      • Login
      • Map
      • Nav Bar
      • Offer
      • Product Attachments
      • Product Attributes
      • Product Documentation
      • Product Expected
      • Product Modal
      • Products Block
      • Products Carousel
      • Product Single
      • Profile
      • Quote
      • Register
      • Related Products
      • Search
      • Stores
      • Subscribe Newsletter
      • Text with Image
      • Top Bar
      • Video
    • Reusables
      • Getting Started
    • Assets
      • Getting Started
    • SDK
      • Products
        • _findProductsByCategory
        • _findProductsByIds
        • _findProductsByTitle
        • _findProductsByFilter
        • _findProductsByCriteria
        • _findProductsAndCalculate
        • _findProductsThenCalculate
        • _getProductAttributeSet
        • _setLastVisited
      • Categories
        • _findCategoryTreeById
        • _findCategoriesByIds
        • _findCategoryByAlias
        • _findCategoryTreeByAlias
        • _getCategoryContent
      • Collections
        • _getCollectionContent
        • _findCollectionsByIds
        • _findCollectionsByIdsThenCalculate
      • Brands
        • _getBrandContent
        • _findBrandsByIds
      • Cart
        • _addToCartMulti
        • _addToCart
        • _setCart
        • _clearCart
        • _setCartListener
        • _removeFromCart
        • _calculateCart
      • Checkout
        • _startCheckout
        • _updateCheckout
        • _completeCheckout
      • Shopping Lists
        • _getShoppingLists
        • _updateShoppingList
        • _createShoppingList
        • _deleteShoppingList
        • _getShoppingListByAlias
      • Navigation
        • _getFooterMenu
        • _getHeaderMenu
      • Users
        • _getUserById
      • Utils
        • _calculateCurrency
        • _getCurrencySymbol
        • _getCulture
        • _subscribeToNewsletter
        • _findUnitsByIds
  • Noir
  1. Components

Product Expected

Documentation: Product Expected Component#

The Product Expected Component is designed to display expected delivery dates and quantities for products. It offers a dynamic and user-friendly way to show expected inventory information, conditional on user authentication.

Overview#

The Product Expected Component provides a structured way to present product delivery expectations. It conditionally renders information based on user authentication and formats expected delivery details for clarity.

Model Documentation#

The model object for the Product Expected Component includes configuration properties that determine how the component should display its content.
Model Structure#
id: String
A unique identifier for the component, used for element targeting and styling.
cssClass: String
Optional CSS class(es) to apply to the component's container.
header: String
Optional header text to be displayed at the top of the component.
alignment: Number
Determines the alignment of the header text:
1: Left
2: Center
3: Right
Example Model#
{
  "id": "productExpected",
  "cssClass": "expected-class",
  "header": "Expected Delivery Dates",
  "alignment": 2
}

Component Structure#

The Product Expected Component includes:
1.
HTML Template: Defines the structure for displaying expected delivery lines and a header.
2.
JavaScript: Manages data fetching, date formatting, alignment, and error handling.

HTML Template#

The HTML template displays expected delivery lines in a tabular format, with alternating row colors. It conditionally renders content based on the presence of expected lines and user authentication status.

JavaScript#

The JavaScript section handles data fetching, date formatting, and layout alignment.

Explanation#

Data Handling: Upon mounting, the component fetches expected inventory data using the _getExpectedInventory method. The data is assigned to the expectedLines variable.
Date Formatting: The formatDate method converts date strings into a readable format.
Alignment: The getAlignmentClass method applies CSS classes based on the specified alignment value for the header.

Usage#

To use the Product Expected Component in your Vue.js application:
1.
Register the Component: Ensure that the ProductExpected component is registered in your Vue app.
2.
Pass the Model: Provide a model object to configure the component’s appearance and behavior.
3.
Include the Component: Use the ProductExpected component in your Vue template with the appropriate model data.
Modified at 2024-08-27 10:05:02
Previous
Product Documentation
Next
Product Modal
Built with