0.0.0-alpha.3 • Published 5 years ago

x-cite-proto-to-fields v0.0.0-alpha.3

Weekly downloads
4
License
ISC
Repository
github
Last release
5 years ago

To start

npm i x-cite-proto-to-fields
yarn add  x-cite-proto-to-fields

then use in app :

import React from 'react';
import ProtoFields from 'x-cite-proto-to-fields'

class App extends React.Component {

  render() {
 
    return (
      <ProtoFields
        model={{
                accountfields: ["id", "customerId", "ref", "balance", "bankAccount", "card", "money", "timePeriod", "created", "lastModified"]
                , balancefields: ["moneyBalance", "type", "validityPeriod"]
                , bankAccountfields: ["bic", "iban", "accountHolder", "domiciliation"]
                , cardfields: ["creditcardHolder", "expirationDate", "number", "typeCard"]
                , moneyBalancefields: ["unitBalance", "valueBalance"]
                , moneyfields: ["unit", "value"]
                , reffields: ["idRef"]
                , typeOfFields: [undefined, { uuid: "5" }, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined]
                , typeofbalance: [undefined, "", undefined]
                , typeofbankAccount: ["", "", "", ""]
                , typeofcard: ["", "", "", ""]
                , typeofmoney: ["", 0]
                , typeofmoneyBalance: ["", 0]
                , typeofref: [""]
                }}
        fieldsObject={["ref", "balance", "bankAccount", "card", "money", "moneyBalance"]}
        selectData={[
                    {
                        label: "IOM IOM",
                        value: "aa14d6a1-8c33-46d3-98ee-a1dd4fbab505"
                    }
                ]}
      />
    );
  }
}