Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

Latest commit

 

History

History
279 lines (201 loc) · 7.7 KB

Suppliers.react_components.md

File metadata and controls

279 lines (201 loc) · 7.7 KB

Supplier Service (supplier) React Components Documentation

Supplier Editor

Props

Name Type Required Description
supplierId string true ID of Supplier
username string true User (customer) name
userRoles array true User (customer) roles
onUnauthorized function false Callback fired when unauthorized
onChange function false Callback fired on input change (event) => {}
onUpdate function false Callback fired on supplier update (supplier) => {}
onLogout function false Callback fired on logout

Context

Name Type Required Description
i18n object true internationalization fro translation
showNotification function false UI notification

Basic Example

import { SupplierEditor } from 'supplier-information';

<SupplierEditor
  key='company'
  supplierId='hard001'
  username='Marlon Wayans'
  userRoles={['supplier-admin']}
/>

supplier_editor_example

Supplier Registration Editor

Props

Name Type Required Description
supplier object false Supplier object
user object true User object. Should contain attributes id, firstName, lastName and email
onUnauthorized function false Callback fired when unauthorized
onChange function false Callback fired on input change (event) => {}
onUpdate function false Callback fired on supplier create (supplier) => {}
onLogout function false Callback fired on logout

Context

Name Type Required Description
i18n object true internationalization fro translation
showNotification function false UI notification

Basic Example

import { SupplierRegistrationEditor } from 'supplier-registration';

const newSupplier = {
  supplierName: 'Test AG',
  cityOfRegistration: 'Hamburg',
  countryOfRegistration: 'DE',
  taxIdentificationNo: '123-343-12',
  vatIdentificationNo: 'DE72342359',
  dunsNo: '12345',
  commercialRegisterNo: 'HRB 12873243'
};

<SupplierRegistrationEditor
  key='company'
  supplier={newSupplier}
  user={{ id: 'john.doe@example.com', firstName: 'John', lastName: 'Doe', email: 'john.doe@example.com' }}
/>

supplier_registration_editor_example

Supplier Address Editor

Props

Name Type Required Description
supplierId string true ID of Supplier
username string true User (customer) name
userRoles array true User (customer) roles
onUnauthorized function false Callback fired when unauthorized
onChange function false Callback fired on input change (event) => {}

Context

Name Type Required Description
i18n object true internationalization fro translation
showNotification function false UI notification

Basic Example

import { SupplierAddressEditor } from 'supplier-address';

<SupplierAddressEditor
  key='address'
  supplierId='hard001'
  username='Marlon Wayans'
  userRoles={['supplier-admin']}
/>

supplier_address_editor_example

Supplier Contact Editor

Props

Name Type Required Description
supplierId string true ID of Supplier
username string true User (customer) name
userRoles array true User (customer) roles
onUnauthorized function false Callback fired when unauthorized
onChange function false Callback fired on input change (event) => {}

Context

Name Type Required Description
i18n object true internationalization fro translation
showNotification function false UI notification

Basic Example

import { SupplierContactEditor } from 'supplier-contact';

<SupplierContactEditor
  key='contact'
  supplierId='hard001'
  username='Marlon Wayans'
  userRoles={['supplier-admin']}
/>

supplier_contact_editor_example

Supplier Bank Account Editor

Props

Name Type Required Description
supplierId string true ID of Supplier
username string true User (customer) name
userRoles array true User (customer) roles
onUnauthorized function false Callback fired when unauthorized
onChange function false Callback fired on input change (event) => {}

Context

Name Type Required Description
i18n object true internationalization fro translation
showNotification function false UI notification

Basic Example

import { SupplierBankAccountEditor } from 'supplier-bank_accounts';

<SupplierBankAccountEditor
  key='bank_account'
  supplierId='hard001'
  username='Marlon Wayans'
  userRoles={['supplier-admin']}
/>

supplier_bank_account_editor_example

Supplier Access Approval

Props

Name Type Required Description
supplierId string true ID of Supplier

Context

Name Type Required Description
i18n object true internationalization fro translation
showNotification function false UI notification

Basic Example

import { SupplierApproval } from 'supplier-access_approval';

<SupplierApproval
  key='access_approval'
  supplierId='hard001'
/>

supplier_access_approval_example

Supplier Search

Context

Name Type Required Description
i18n object true internationalization fro translation

Basic Example

import { SupplierSearch } from 'supplier-directory';

<SupplierSearch
  key='directory'
/>

supplier_search_example

Supplier Profile Strength

Props

Name Type Required Description
supplierId string true ID of Supplier

Basic Example

import { SupplierProfileStrength } from 'supplier-profile_strength';

<SupplierProfileStrength
  key='profile_strength'
  supplierId='hard001'
/>

supplier_profile_strength_example

Supplier Autocomplete

Props

Name Type Required Description
value object false Initial Supplier object
onChange function false Callback fired when the value changes
onBlur function false Callback fired when the component loose focus

Context

Name Type Required Description
i18n object true internationalization fro translation

Basic Example

import { SupplierAutocomplete } from 'supplier-autocomplete';

<SupplierAutocomplete
  key='autocomplete'
/>