Fluent Commerce Logo
Docs

Location Id Field Component

UI Component

Changed on:

15 July 2024

Overview

The Location ID Field Component is a component that allows users to provide a location ID on an OMX app.
Plugin NameCore
The standard library of mystique components. 
0000-00-00

v1.0.0

Initial changelog entry.

Alias

fc.attribute.locationId, locationId

Detailed technical description

fc.attribute.locationId is a custom field that allows users to specify a location in a form. The field’s key feature is the possibility to add a Location Id only in situations when it is necessary. Let’s consider the following situations when a user is created:
  • When new user with user type “AGENT” is created, the Location Id is a required parameter.
  • When user with another type is created, the primary Location Id is an optional parameter.
Location Id is a mandatory field from backend perspective, but in the second case we need to avoid System validation.Location Id field has two states:
  • Default state when + ADD LOCATION button is not pressed
No alt providedValidation: there is no validation (for Primary Location) from the backend perspective when we click on the drawer's SUBMIT button.
  • + ADD LOCATION button is pressed
No alt providedValidation: When a user clicks on the drawer’s SUBMIT button, the field with the Retailer Id parameter will be validated as well as other fields (it is impossible to send an empty value).

Properties

None

Configuration example

1{
2    "overrides": {
3        "primaryRetailer": {
4            "component":"fc.attribute.locationId"
5        }
6    }
7}

Version History

2024-06-05

v24.6.5

The Location ID field was moved to core and additionally aliased as "locationId"
0000-00-00

v1.0.0

Initial changelog entry.

Recommended Placement

This component was designed to be used inside the Create User drawer.