{"version":3,"sources":["webpack:///./../bx-react-ui/src/components/AdvancedSearchbox/AdvancedSearch.js","webpack:///../bx-react-ui/src/components/AdvancedSearchbox/AdvancedSearch.module.scss?4b85","webpack:///./../bx-react-ui/src/components/AdvancedSearchbox/AdvancedSearchbox.js","webpack:///./../bx-react-ui/src/components/Asset/Calculator/Calculator.js","webpack:///../bx-react-ui/src/components/Asset/Calculator/styles.module.scss?9ed8","webpack:///./../bx-react-ui/src/components/Asset/Controls.js","webpack:///./../bx-react-ui/src/components/Asset/Controls2.js","webpack:///./../bx-react-ui/src/components/Asset/Grid/Grid.js","webpack:///./../bx-react-ui/src/components/Asset/Grid/Toolbar.js","webpack:///../bx-react-ui/src/components/Asset/Grid/styles.module.scss?9d1a","webpack:///./../bx-react-ui/src/components/Asset/Header/Header.js","webpack:///../bx-react-ui/src/components/Asset/Header/styles.module.scss?3047","webpack:///./../bx-react-ui/src/components/Asset/Modals/ModalClone.js","webpack:///./../bx-react-ui/src/components/Asset/Modals/ModalConfirm.js","webpack:///./../bx-react-ui/src/components/Asset/Modals/ModalCurrency.js","webpack:///./../bx-react-ui/src/components/Asset/Modals/ModalGroup.js","webpack:///./../bx-react-ui/src/components/Asset/Modals/ModalLoadFromFile.js","webpack:///./../bx-react-ui/src/components/Asset/Modals/ModalMessage.js","webpack:///./../bx-react-ui/src/components/Asset/Modals/ModalPayments.js","webpack:///./../bx-react-ui/src/components/Asset/Modals/ModalQuote.js","webpack:///./../bx-react-ui/src/components/Asset/Modals/ModalSinonyms.js","webpack:///./../bx-react-ui/src/components/Asset/Modals/ModalStatus.js","webpack:///./../bx-react-ui/src/components/Asset/Modals/ModalTax.js","webpack:///../bx-react-ui/src/components/Asset/Modals/styles.module.scss?ee54","webpack:///./../bx-react-ui/src/components/Asset/Navigation.js","webpack:///./../bx-react-ui/src/components/Asset/Tabs/Agencies/Agencies.js","webpack:///../bx-react-ui/src/components/Asset/Tabs/Agencies/styles.module.scss?24c2","webpack:///./../bx-react-ui/src/components/Asset/Tabs/Contracts/Contracts.js","webpack:///./../bx-react-ui/src/components/Asset/Tabs/Currency/Currency.js","webpack:///./../bx-react-ui/src/components/Asset/Tabs/Denominations/Denominations.js","webpack:///./../bx-react-ui/src/components/Asset/Tabs/Fundamentals/Fundamentals.js","webpack:///./../bx-react-ui/src/components/Asset/Tabs/General/Attachments.js","webpack:///./../bx-react-ui/src/components/Asset/Tabs/General/General.js","webpack:///../bx-react-ui/src/components/Asset/Tabs/General/styles.module.scss?cb63","webpack:///./../bx-react-ui/src/components/Asset/Tabs/Groups/Groups.js","webpack:///./../bx-react-ui/src/components/Asset/Tabs/Payments/Payments.js","webpack:///./../bx-react-ui/src/components/Asset/Tabs/Portfolios/Portfolios.js","webpack:///./../bx-react-ui/src/components/Asset/Tabs/Quotes/Quotes.js","webpack:///../bx-react-ui/src/components/Asset/Tabs/Quotes/styles.module.scss?6c2f","webpack:///./../bx-react-ui/src/components/Asset/Tabs/Sinonyms/Sinonyms.js","webpack:///./../bx-react-ui/src/components/Asset/Tabs/Structure/AssetSubClass.js","webpack:///./../bx-react-ui/src/components/Asset/Tabs/Structure/Structure.js","webpack:///./../bx-react-ui/src/components/Asset/Tabs/Structure/Structure2.js","webpack:///../bx-react-ui/src/components/Asset/Tabs/Structure/styles.module.scss?bee8","webpack:///./../bx-react-ui/src/components/Asset/Tabs/Tax/Tax.js","webpack:///./../bx-react-ui/src/components/Asset/Wizzard.js","webpack:///./../bx-react-ui/src/components/Asset/index.js","webpack:///../bx-react-ui/src/components/Asset/styles.module.scss?3505","webpack:///./../bx-react-ui/src/components/Asset/types.js","webpack:///./../bx-react-ui/src/components/Authorizations/AuthorizationsPage.js","webpack:///./../bx-react-ui/src/components/Authorizations/Bar/Item.js","webpack:///./../bx-react-ui/src/components/Authorizations/Bar/List.js","webpack:///./../bx-react-ui/src/components/Authorizations/Grid.js","webpack:///./../bx-react-ui/src/components/Authorizations/Toolbar/SearchBox.js","webpack:///./../bx-react-ui/src/components/Authorizations/Toolbar/Toolbar.js","webpack:///../bx-react-ui/src/components/Authorizations/Toolbar/Toolbar.module.scss?43c7","webpack:///./../bx-react-ui/src/components/Authorizations/UI.js","webpack:///./../bx-react-ui/src/components/Authorizations/index.js","webpack:///../bx-react-ui/src/components/Authorizations/style.module.scss?8771","webpack:///./../bx-react-ui/src/components/Authorizations/types.js","webpack:///./../bx-react-ui/src/components/Autosuggest/Autosuggest.js","webpack:///../bx-react-ui/src/components/Autosuggest/Autosuggest.module.scss?4d61","webpack:///./../bx-react-ui/src/components/AutosuggestCompliance/index.js","webpack:///./../bx-react-ui/src/components/CircularProgress/CircularProgress.js","webpack:///../bx-react-ui/src/components/CircularProgress/CircularProgress.module.scss?bd0a","webpack:///./../bx-react-ui/src/components/Collateral/types.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/Amortization/index.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/CashActivity.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/CorpEvent/Accounts.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/CorpEvent/index.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/CustodyLock/index.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/CustomCorpEvent/Accounts.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/CustomCorpEvent/index.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/EarningRecovery/Accounts.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/EarningRecovery/index.js","webpack:///../bx-react-ui/src/components/CrossReference/Forms/Grid.module.scss?4296","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/IO.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/Invoice/index.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/InvoicePayment/index.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/InvoiceRequest/index.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/JournalEntry.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/Offer.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/Order.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/ProductActivity.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/ProvisionsPayment/Accounts.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/ProvisionsPayment/index.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/RecurringCommissions/Accounts.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/RecurringCommissions/RecCommissionAccount.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/RecurringCommissions/index.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/SettleInst.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/ShortCover/Accounts.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/ShortCover/Events.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/ShortCover/Totals.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/ShortCover/index.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/SupplierInvoice/index.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/Trade.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/Transaction/Accounts.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/Transaction/index.js","webpack:///./../bx-react-ui/src/components/CrossReference/Forms/index.js","webpack:///./../bx-react-ui/src/components/CrossReference/Graph/Graph.js","webpack:///./../bx-react-ui/src/components/CrossReference/Graph/Node.js","webpack:///../bx-react-ui/src/components/CrossReference/Graph/styles.module.scss?007f","webpack:///./../bx-react-ui/src/components/CrossReference/index.js","webpack:///./../bx-react-ui/src/components/CrossReference/reducer.js","webpack:///../bx-react-ui/src/components/CrossReference/styles.module.scss?0211","webpack:///./../bx-react-ui/src/components/Custody/Items.js","webpack:///../bx-react-ui/src/components/Custody/Items.module.scss?2f7e","webpack:///./../bx-react-ui/src/components/Custody/types.js","webpack:///./../bx-react-ui/src/components/CustomDropdown/CustomDropdown.js","webpack:///../bx-react-ui/src/components/CustomDropdown/CustomDropdown.module.scss?f582","webpack:///./../bx-react-ui/src/components/DynamicReports/Grid/Grid.js","webpack:///../bx-react-ui/src/components/DynamicReports/Grid/Grid.module.scss?6d3f","webpack:///./../bx-react-ui/src/components/DynamicReports/Modal/DynamicReport.js","webpack:///../bx-react-ui/src/components/DynamicReports/Modal/Modal.module.scss?de35","webpack:///./../bx-react-ui/src/components/DynamicReports/Modal/Parameters/Item.js","webpack:///./../bx-react-ui/src/components/DynamicReports/Modal/Parameters/List.js","webpack:///../bx-react-ui/src/components/DynamicReports/Modal/Parameters/styles.module.scss?2577","webpack:///./../bx-react-ui/src/components/DynamicReports/Modal/formatter.js","webpack:///./../bx-react-ui/src/components/DynamicReports/Modal/types.js","webpack:///./../bx-react-ui/src/components/DynamicReports/Toolbar/Counter.js","webpack:///./../bx-react-ui/src/components/DynamicReports/Toolbar/SearchBox.js","webpack:///./../bx-react-ui/src/components/DynamicReports/Toolbar/Toolbar.js","webpack:///../bx-react-ui/src/components/DynamicReports/Toolbar/Toolbar.module.scss?90be","webpack:///./../bx-react-ui/src/components/DynamicReports/index.js","webpack:///./../bx-react-ui/src/components/EventAlert/Bar/Item.js","webpack:///./../bx-react-ui/src/components/EventAlert/Bar/List.js","webpack:///./../bx-react-ui/src/components/EventAlert/Grid/Grid.js","webpack:///./../bx-react-ui/src/components/EventAlert/ModalDetail.js","webpack:///./../bx-react-ui/src/components/EventAlert/PageGrid.js","webpack:///./../bx-react-ui/src/components/EventAlert/Toolbar/Advanced.js","webpack:///./../bx-react-ui/src/components/EventAlert/Toolbar/SearchBox.js","webpack:///./../bx-react-ui/src/components/EventAlert/Toolbar/Toolbar.js","webpack:///../bx-react-ui/src/components/EventAlert/Toolbar/Toolbar.module.scss?0394","webpack:///./../bx-react-ui/src/components/EventAlert/UI.js","webpack:///./../bx-react-ui/src/components/EventAlert/index.js","webpack:///../bx-react-ui/src/components/EventAlert/style.module.scss?4acf","webpack:///./../bx-react-ui/src/components/EventAlert/types.js","webpack:///./../bx-react-ui/src/components/ExecutionsTable/ExecutionsTable.js","webpack:///../bx-react-ui/src/components/ExecutionsTable/ExecutionsTable.module.scss?9c9b","webpack:///./../bx-react-ui/src/components/FloattingButton/child-button.js","webpack:///./../bx-react-ui/src/components/FloattingButton/index.js","webpack:///./../bx-react-ui/src/components/FloattingButton/main-button.js","webpack:///./../bx-react-ui/src/components/FloattingButton/menu.js","webpack:///./../bx-react-ui/src/components/FloattingButton/utils/children-validator.js","webpack:///./../bx-react-ui/src/components/FloattingButton/utils/get-children.js","webpack:///./../bx-react-ui/src/components/FloattingButton/utils/get-classes.js","webpack:///./../bx-react-ui/src/components/FormattedNumber/FormattedNumber.js","webpack:///./../bx-react-ui/src/components/Funds/Controls.js","webpack:///../bx-react-ui/src/components/Funds/DropDowFunds.module.scss?447d","webpack:///./../bx-react-ui/src/components/Funds/DropDownFunds.js","webpack:///./../bx-react-ui/src/components/Funds/Grid/Grid.js","webpack:///./../bx-react-ui/src/components/Funds/Grid/Toolbar.js","webpack:///../bx-react-ui/src/components/Funds/Grid/styles.module.scss?3b79","webpack:///./../bx-react-ui/src/components/Funds/Modals/ModalClone.js","webpack:///./../bx-react-ui/src/components/Funds/Modals/ModalStatus.js","webpack:///../bx-react-ui/src/components/Funds/Modals/styles.module.scss?a0a7","webpack:///./../bx-react-ui/src/components/Funds/index.js","webpack:///../bx-react-ui/src/components/Funds/styles.module.scss?27bb","webpack:///./../bx-react-ui/src/components/Funds/types.js","webpack:///../bx-react-ui/src/components/IO/IO.module.scss?f840","webpack:///./../bx-react-ui/src/components/IO/InlineItem.js","webpack:///./../bx-react-ui/src/components/IO/Item.js","webpack:///./../bx-react-ui/src/components/IO/types.js","webpack:///./../bx-react-ui/src/components/IO/utils.js","webpack:///./../bx-react-ui/src/components/MainCard/MainCard.js","webpack:///../bx-react-ui/src/components/MainCard/MainCard.module.scss?3ce4","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Comparer.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Account/BankAccountsTab.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Account/BeneficiariesTab.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Account/DocumentsTab.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Account/GroupsTab.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Account/HoldersTab.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Account/InstructionsTab.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Account/InvestmentProfileTab.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Account/KYCTab.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Account/PersonalReferencesTab.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Account/ProfileTab.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Account/QuestionsTab.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Account/RelatedAccountsTab.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Account/SignatureSetsTab.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Person/ArchivesTab.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Person/DocumentsTab.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Person/ExtendedData.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Person/FiscalReference.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Person/JuridicalPersonForm/index.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Person/LegalAddress.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Person/PersonBankAccount.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Person/PersonKYC.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Person/PhonesTab.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Person/PhysicalPersonForm/LegalInfo.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Person/PhysicalPersonForm/index.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Person/ProfileTab.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Person/ShareHolderTab.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Person/Suitability.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/Items/Person/types.js","webpack:///./../bx-react-ui/src/components/Modal/AccountComparer/index.js","webpack:///./../bx-react-ui/src/components/Modal/ActivityV2/helper.js","webpack:///../bx-react-ui/src/components/Modal/ActivityV2/styles.module.scss?71aa","webpack:///./../bx-react-ui/src/components/Modal/Alert/Alert.js","webpack:///../bx-react-ui/src/components/Modal/Alert/Alert.module.scss?cf4a","webpack:///./../bx-react-ui/src/components/Modal/Alert/Items/ChildAlert/ChildAlert.js","webpack:///../bx-react-ui/src/components/Modal/Alert/Items/ChildAlert/ChildAlert.module.scss?5af5","webpack:///../bx-react-ui/src/components/Modal/Alert/Items/Items.module.scss?6ac8","webpack:///./../bx-react-ui/src/components/Modal/Alert/Items/NewPost/Files/Files.js","webpack:///./../bx-react-ui/src/components/Modal/Alert/Items/NewPost/Files/SendFile.js","webpack:///./../bx-react-ui/src/components/Modal/Alert/Items/NewPost/NewPost.js","webpack:///../bx-react-ui/src/components/Modal/Alert/Items/NewPost/NewPost.module.scss?b740","webpack:///./../bx-react-ui/src/components/Modal/Alert/Items/PostList/PostItem.js","webpack:///./../bx-react-ui/src/components/Modal/Alert/Items/PostList/PostList.js","webpack:///./../bx-react-ui/src/components/Modal/Alert/Items/Summary.js","webpack:///./../bx-react-ui/src/components/Modal/Alert/Items/index.js","webpack:///./../bx-react-ui/src/components/Modal/Alert/Items/subsummary/duplicatedPeople.js","webpack:///../bx-react-ui/src/components/Modal/Alert/Items/subsummary/duplicatedPeople.scss?5ed9","webpack:///./../bx-react-ui/src/components/Modal/Alert/Items/subsummary/investorProfile.js","webpack:///./../bx-react-ui/src/components/Modal/Alert/store/reducer.js","webpack:///./../bx-react-ui/src/components/Modal/Alert/store/store.js","webpack:///./../bx-react-ui/src/components/Modal/AlertSimple/AlertSimple.js","webpack:///../bx-react-ui/src/components/Modal/AlertSimple/AlertSimple.module.scss?e6f1","webpack:///./../bx-react-ui/src/components/Modal/AlertSimple/Fields/Account.js","webpack:///../bx-react-ui/src/components/Modal/AlertSimple/Fields/Fields.module.scss?26c7","webpack:///./../bx-react-ui/src/components/Modal/AlertSimple/Fields/Process.js","webpack:///./../bx-react-ui/src/components/Modal/AlertSimple/Fields/types.js","webpack:///./../bx-react-ui/src/components/Modal/AlertSimple/reducer.js","webpack:///./../bx-react-ui/src/components/Modal/Authorization/Authorization.js","webpack:///./../bx-react-ui/src/components/Modal/Authorization/Processes.js","webpack:///../bx-react-ui/src/components/Modal/Authorization/style.module.scss?230b","webpack:///./../bx-react-ui/src/components/Modal/AuthorizationList/List.js","webpack:///./../bx-react-ui/src/components/Modal/AuthorizationList/index.js","webpack:///../bx-react-ui/src/components/Modal/AuthorizationList/styles.module.scss?79ce","webpack:///./../bx-react-ui/src/components/Modal/Collateral/Collateral.js","webpack:///../bx-react-ui/src/components/Modal/Collateral/Collateral.module.scss?ce1c","webpack:///./../bx-react-ui/src/components/Modal/Collateral/Footer.js","webpack:///./../bx-react-ui/src/components/Modal/Collateral/NewCollateral.js","webpack:///./../bx-react-ui/src/components/Modal/Collateral/components/CollateralWarranty.js","webpack:///./../bx-react-ui/src/components/Modal/Collateral/components/Symbol.js","webpack:///./../bx-react-ui/src/components/Modal/Collateral/store/reducer.js","webpack:///./../bx-react-ui/src/components/Modal/Collateral/store/store.js","webpack:///./../bx-react-ui/src/components/Modal/Collateral/utils.js","webpack:///./../bx-react-ui/src/components/Modal/CorpEvents/CorpEvents.js","webpack:///../bx-react-ui/src/components/Modal/CorpEvents/CorpEvents.module.scss?f071","webpack:///./../bx-react-ui/src/components/Modal/CorpEvents/Items/Account.js","webpack:///./../bx-react-ui/src/components/Modal/CorpEvents/Items/Error.js","webpack:///../bx-react-ui/src/components/Modal/CorpEvents/Items/Grid.module.scss?d98a","webpack:///./../bx-react-ui/src/components/Modal/CorpEvents/Items/GridAccount.js","webpack:///./../bx-react-ui/src/components/Modal/CorpEvents/Items/GridCustody.js","webpack:///../bx-react-ui/src/components/Modal/CorpEvents/Items/style.module.scss?b323","webpack:///./../bx-react-ui/src/components/Modal/CorpEvents/store/reducer.js","webpack:///./../bx-react-ui/src/components/Modal/CorpEvents/store/store.js","webpack:///./../bx-react-ui/src/components/Modal/CounterPartyRanking/CounterPartyRanking.js","webpack:///./../bx-react-ui/src/components/Modal/CounterPartyRanking/grids/ChartCounterPartyFailling.js","webpack:///./../bx-react-ui/src/components/Modal/CounterPartyRanking/grids/GridCounterParty.js","webpack:///./../bx-react-ui/src/components/Modal/CounterPartyRanking/grids/GridCustodian.js","webpack:///../bx-react-ui/src/components/Modal/CounterPartyRanking/style.module.scss?7bd6","webpack:///./../bx-react-ui/src/components/Modal/CounterPartySet/CounterParty.js","webpack:///../bx-react-ui/src/components/Modal/CounterPartySet/CounterParty.module.scss?e91e","webpack:///./../bx-react-ui/src/components/Modal/CounterPartySet/reducer.js","webpack:///./../bx-react-ui/src/components/Modal/Cross/Cross.js","webpack:///../bx-react-ui/src/components/Modal/Cross/Cross.module.scss?bce4","webpack:///./../bx-react-ui/src/components/Modal/Cross/ItemRow.js","webpack:///./../bx-react-ui/src/components/Modal/CrossReferenceSearch/CrossReferenceSearch.js","webpack:///./../bx-react-ui/src/components/Modal/CrossReferenceSearch/Item/Grid.js","webpack:///../bx-react-ui/src/components/Modal/CrossReferenceSearch/Item/style.module.scss?06e6","webpack:///../bx-react-ui/src/components/Modal/CrossReferenceSearch/style.module.scss?eebd","webpack:///./../bx-react-ui/src/components/Modal/CustodianEntity/CustodianEntity.js","webpack:///../bx-react-ui/src/components/Modal/CustodianEntity/CustodianEntity.module.scss?97e9","webpack:///./../bx-react-ui/src/components/Modal/CustodianEntity/CustodianEntityClearingHouse.js","webpack:///./../bx-react-ui/src/components/Modal/CustodianEntity/CustodianEntityCodeType.js","webpack:///./../bx-react-ui/src/components/Modal/CustodianEntity/CustodianEntityContact.js","webpack:///./../bx-react-ui/src/components/Modal/CustodianEntity/reducer.js","webpack:///./../bx-react-ui/src/components/Modal/Custody/Custody.js","webpack:///../bx-react-ui/src/components/Modal/Custody/Custody.module.scss?15ec","webpack:///./../bx-react-ui/src/components/Modal/Custody/Footer.js","webpack:///./../bx-react-ui/src/components/Modal/Custody/NewCustody.js","webpack:///./../bx-react-ui/src/components/Modal/Custody/components/Symbol.js","webpack:///./../bx-react-ui/src/components/Modal/Custody/store/reducer.js","webpack:///./../bx-react-ui/src/components/Modal/Custody/store/store.js","webpack:///./../bx-react-ui/src/components/Modal/Custody/utils.js","webpack:///./../bx-react-ui/src/components/Modal/CustodySet/CurrencyList/CurrencyList.js","webpack:///../bx-react-ui/src/components/Modal/CustodySet/CurrencyList/styles.module.scss?d204","webpack:///./../bx-react-ui/src/components/Modal/CustodySet/Custody.js","webpack:///../bx-react-ui/src/components/Modal/CustodySet/Custody.module.scss?5ca5","webpack:///./../bx-react-ui/src/components/Modal/CustodySet/CustodyRateRange/CustodyRateTable.js","webpack:///../bx-react-ui/src/components/Modal/CustodySet/CustodyRateRange/styles.module.scss?08c5","webpack:///./../bx-react-ui/src/components/Modal/CustodySet/CustomAutosuggest.js","webpack:///./../bx-react-ui/src/components/Modal/CustodySet/reducer.js","webpack:///./../bx-react-ui/src/components/Modal/EnvironmentSign/EnvironmentSign.js","webpack:///./../bx-react-ui/src/components/Modal/Execution/Controls.js","webpack:///./../bx-react-ui/src/components/Modal/Execution/Execution.js","webpack:///../bx-react-ui/src/components/Modal/Execution/Execution.module.scss?3fcd","webpack:///./../bx-react-ui/src/components/Modal/Execution/_state.js","webpack:///./../bx-react-ui/src/components/Modal/FundOrder/Form/commons.js","webpack:///./../bx-react-ui/src/components/Modal/History/History.js","webpack:///../bx-react-ui/src/components/Modal/History/History.module.scss?fbb4","webpack:///../bx-react-ui/src/components/Modal/HistoryDefault/History.module.scss?356f","webpack:///./../bx-react-ui/src/components/Modal/HistoryDefault/HistoryDefault.js","webpack:///./../bx-react-ui/src/components/Modal/IO/Fields/Account.js","webpack:///../bx-react-ui/src/components/Modal/IO/Fields/Fields.module.scss?70cf","webpack:///./../bx-react-ui/src/components/Modal/IO/Fields/Files/Files.js","webpack:///../bx-react-ui/src/components/Modal/IO/Fields/Files/Files.module.scss?e0da","webpack:///./../bx-react-ui/src/components/Modal/IO/Fields/LocalINTL.js","webpack:///./../bx-react-ui/src/components/Modal/IO/Fields/SimpleSuggest.js","webpack:///./../bx-react-ui/src/components/Modal/IO/Fields/Symbol.js","webpack:///./../bx-react-ui/src/components/Modal/IO/Fields/index.js","webpack:///./../bx-react-ui/src/components/Modal/IO/Footer.js","webpack:///./../bx-react-ui/src/components/Modal/IO/Forms/Bulk/Assets.js","webpack:///./../bx-react-ui/src/components/Modal/IO/Forms/Bulk/Bulk.js","webpack:///../bx-react-ui/src/components/Modal/IO/Forms/Bulk/Bulk.module.scss?5c0b","webpack:///./../bx-react-ui/src/components/Modal/IO/Forms/Bulk/Edit.js","webpack:///./../bx-react-ui/src/components/Modal/IO/Forms/Default.js","webpack:///./../bx-react-ui/src/components/Modal/IO/Forms/Deposit/Deposit.js","webpack:///./../bx-react-ui/src/components/Modal/IO/Forms/Deposit/DepositBulk.js","webpack:///./../bx-react-ui/src/components/Modal/IO/Forms/Redemption/Redemption.js","webpack:///./../bx-react-ui/src/components/Modal/IO/Forms/Subscription/Subscription.js","webpack:///./../bx-react-ui/src/components/Modal/IO/Forms/Transfer/Edit.js","webpack:///./../bx-react-ui/src/components/Modal/IO/Forms/Transfer/Securities.js","webpack:///./../bx-react-ui/src/components/Modal/IO/Forms/Transfer/Transfer.js","webpack:///./../bx-react-ui/src/components/Modal/IO/Forms/Withdrawal/Withdrawal.js","webpack:///./../bx-react-ui/src/components/Modal/IO/Forms/Withdrawal/WithdrawalBulk.js","webpack:///./../bx-react-ui/src/components/Modal/IO/Forms/index.js","webpack:///./../bx-react-ui/src/components/Modal/IO/IO.js","webpack:///../bx-react-ui/src/components/Modal/IO/IO.module.scss?5acc","webpack:///./../bx-react-ui/src/components/Modal/IO/Precheck/Authorization.js","webpack:///./../bx-react-ui/src/components/Modal/IO/Precheck/Precheck.js","webpack:///../bx-react-ui/src/components/Modal/IO/Precheck/Precheck.module.scss?2796","webpack:///./../bx-react-ui/src/components/Modal/IO/Precheck/Validation.js","webpack:///./../bx-react-ui/src/components/Modal/IO/store/reducer.js","webpack:///./../bx-react-ui/src/components/Modal/IO/store/store.js","webpack:///./../bx-react-ui/src/components/Modal/IOExecution/IOExecution.js","webpack:///../bx-react-ui/src/components/Modal/IOExecution/IOExecution.module.scss?caa7","webpack:///./../bx-react-ui/src/components/Modal/IOExecution/Securities.js","webpack:///./../bx-react-ui/src/components/Modal/Invoice/index.js","webpack:///../bx-react-ui/src/components/Modal/Invoice/style.module.scss?8455","webpack:///./../bx-react-ui/src/components/Modal/ModalInstruction/index.js","webpack:///./../bx-react-ui/src/components/Modal/Note/Note.js","webpack:///../bx-react-ui/src/components/Modal/Note/Note.module.scss?994a","webpack:///./../bx-react-ui/src/components/Modal/Note/OldNote.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/Account/Account.js","webpack:///../bx-react-ui/src/components/Modal/Offer/Field/Account/Account.module.scss?0da6","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/Account/Balance.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/Account/Holders.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/Account/Instruction.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/Account/Requeriments.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/Combobox.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/Field.js","webpack:///../bx-react-ui/src/components/Modal/Offer/Field/Field.module.scss?3221","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/FormSelector.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/Numeric.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/PriceType.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/Side.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/Switch.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/Symbol/Info/BoxBonds.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/Symbol/Info/BoxEquity.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/Symbol/Info/IEX.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/Symbol/Info/Info.js","webpack:///../bx-react-ui/src/components/Modal/Offer/Field/Symbol/Info/Info.module.scss?c598","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/Symbol/Info/MiniLineChart.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/Symbol/Info/PriceHighlight.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/Symbol/Options/Filter.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/Symbol/Options/Options.js","webpack:///../bx-react-ui/src/components/Modal/Offer/Field/Symbol/Options/Options.module.scss?3723","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/Symbol/Options/Table.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/Symbol/Symbol.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Field/TimeForce.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Footer/Footer.js","webpack:///../bx-react-ui/src/components/Modal/Offer/Footer/Footer.module.scss?ed49","webpack:///./../bx-react-ui/src/components/Modal/Offer/Helper/EarningsHelper.js","webpack:///../bx-react-ui/src/components/Modal/Offer/Helper/Helper.module.scss?2111","webpack:///./../bx-react-ui/src/components/Modal/Offer/Helper/QuantityHelper.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/Offer.js","webpack:///../bx-react-ui/src/components/Modal/Offer/Offer.module.scss?b391","webpack:///./../bx-react-ui/src/components/Modal/Offer/store/reducer.js","webpack:///./../bx-react-ui/src/components/Modal/Offer/store/store.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Basket/Basket.js","webpack:///../bx-react-ui/src/components/Modal/Order/Basket/Basket.module.scss?e708","webpack:///./../bx-react-ui/src/components/Modal/Order/Basket/Edit.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Bulk/Bulk.js","webpack:///../bx-react-ui/src/components/Modal/Order/Bulk/Bulk.module.scss?cf58","webpack:///./../bx-react-ui/src/components/Modal/Order/Bulk/Edit.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Account/Account.js","webpack:///../bx-react-ui/src/components/Modal/Order/Field/Account/Account.module.scss?7218","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Account/Balance.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Account/ExternalAccountsWrapper.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Account/Holders.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Account/Instruction.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Account/Requeriments.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Booktype.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Combobox.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Field.js","webpack:///../bx-react-ui/src/components/Modal/Order/Field/Field.module.scss?8911","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/FormSelector.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Numeric.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/PriceType.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Side.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Switch.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Symbol/Info/BoxBonds.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Symbol/Info/BoxEquity.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Symbol/Info/IEX.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Symbol/Info/Info.js","webpack:///../bx-react-ui/src/components/Modal/Order/Field/Symbol/Info/Info.module.scss?61ed","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Symbol/Info/MiniLineChart.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Symbol/Info/PriceHighlight.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Symbol/Options/Filter.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Symbol/Options/Options.js","webpack:///../bx-react-ui/src/components/Modal/Order/Field/Symbol/Options/Options.module.scss?6a8c","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Symbol/Options/Table.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Symbol/RepoSymbol.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/Symbol/Symbol.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Field/TimeForce.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Footer/Footer.js","webpack:///../bx-react-ui/src/components/Modal/Order/Footer/Footer.module.scss?13e6","webpack:///./../bx-react-ui/src/components/Modal/Order/Footer/OrderTotals.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Form/Bonds.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Form/Equity.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Form/Forex.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Form/Future.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Form/MFunds.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Form/MMarket.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Form/Options.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Form/Repo.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Form/commons.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Form/index.js","webpack:///./../bx-react-ui/src/components/Modal/Order/GoalSeek/GoalSeek.js","webpack:///../bx-react-ui/src/components/Modal/Order/GoalSeek/GoalSeek.module.scss?2bfb","webpack:///./../bx-react-ui/src/components/Modal/Order/Helper/EarningsHelper.js","webpack:///../bx-react-ui/src/components/Modal/Order/Helper/Helper.module.scss?2c36","webpack:///./../bx-react-ui/src/components/Modal/Order/Helper/QuantityHelper.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Message.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Order.js","webpack:///../bx-react-ui/src/components/Modal/Order/Order.module.scss?b1f6","webpack:///./../bx-react-ui/src/components/Modal/Order/Precheck/Authorization.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Precheck/Details.js","webpack:///./../bx-react-ui/src/components/Modal/Order/Precheck/Precheck.js","webpack:///../bx-react-ui/src/components/Modal/Order/Precheck/Precheck.module.scss?3cb9","webpack:///./../bx-react-ui/src/components/Modal/Order/Precheck/Validation.js","webpack:///./../bx-react-ui/src/components/Modal/Order/store/reducer.js","webpack:///./../bx-react-ui/src/components/Modal/Order/store/store.js","webpack:///./../bx-react-ui/src/components/Modal/OrderQuantityAssignment/ItemRow.js","webpack:///./../bx-react-ui/src/components/Modal/OrderQuantityAssignment/OrderQuantityAssignment.js","webpack:///../bx-react-ui/src/components/Modal/OrderQuantityAssignment/OrderQuantityAssignment.module.scss?adad","webpack:///./../bx-react-ui/src/components/Modal/OrderQuantityToTradesAssignment/ItemRow.js","webpack:///./../bx-react-ui/src/components/Modal/OrderQuantityToTradesAssignment/OrderQuantityToTradesAssignment.js","webpack:///../bx-react-ui/src/components/Modal/OrderQuantityToTradesAssignment/OrderQuantityToTradesAssignment.module.scss?60c6","webpack:///./../bx-react-ui/src/components/Modal/RecurringCommissions/FloatingButton.js","webpack:///../bx-react-ui/src/components/Modal/RecurringCommissions/FloatingButton.module.scss?25fd","webpack:///./../bx-react-ui/src/components/Modal/RecurringCommissions/Grid/Actions.js","webpack:///../bx-react-ui/src/components/Modal/RecurringCommissions/Grid/Grid.module.scss?1840","webpack:///./../bx-react-ui/src/components/Modal/RecurringCommissions/Grid/index.js","webpack:///./../bx-react-ui/src/components/Modal/RecurringCommissions/Modal/AccountsGrid.js","webpack:///../bx-react-ui/src/components/Modal/RecurringCommissions/Modal/Grid.module.scss?8aa5","webpack:///./../bx-react-ui/src/components/Modal/RecurringCommissions/Modal/index.js","webpack:///./../bx-react-ui/src/components/Modal/RecurringCommissions/Toolbar/Advanced.js","webpack:///./../bx-react-ui/src/components/Modal/RecurringCommissions/Toolbar/SearchBox.js","webpack:///../bx-react-ui/src/components/Modal/RecurringCommissions/Toolbar/Toolbar.module.scss?2815","webpack:///./../bx-react-ui/src/components/Modal/RecurringCommissions/Toolbar/index.js","webpack:///./../bx-react-ui/src/components/Modal/RecurringCommissions/index.js","webpack:///./../bx-react-ui/src/components/Modal/RecurringCommissions/types.js","webpack:///./../bx-react-ui/src/components/Modal/Reports/GridRequestPeopleInfoFields.js","webpack:///./../bx-react-ui/src/components/Modal/Reports/RequestPeopleInfoFields.js","webpack:///../bx-react-ui/src/components/Modal/Reports/styles.module.scss?9307","webpack:///./../bx-react-ui/src/components/Modal/Simple/Alert.js","webpack:///./../bx-react-ui/src/components/Modal/Trade/Trade.js","webpack:///../bx-react-ui/src/components/Modal/Trade/Trade.module.scss?ca56","webpack:///./../bx-react-ui/src/components/Modal/Trade/Trading.js","webpack:///./../bx-react-ui/src/components/Modal/Trade/Utils.js","webpack:///./../bx-react-ui/src/components/Modal/TradeHistory/TradeHistory.js","webpack:///../bx-react-ui/src/components/Modal/TradeHistory/TradeHistory.module.scss?daf0","webpack:///./../bx-react-ui/src/components/Modal/Trading/Column.js","webpack:///./../bx-react-ui/src/components/Modal/Trading/FormFields.js","webpack:///./../bx-react-ui/src/components/Modal/Trading/LineForm.js","webpack:///./../bx-react-ui/src/components/Modal/Trading/Trading.js","webpack:///../bx-react-ui/src/components/Modal/Trading/Trading.module.scss?75e8","webpack:///./../bx-react-ui/src/components/Modal/TradingDesk/TradingDesk.js","webpack:///./../bx-react-ui/src/components/NoFormatNumberInput/NoFormatNumberInput.js","webpack:///./../bx-react-ui/src/components/NumberFormatInput/NumberFormatInput.js","webpack:///./../bx-react-ui/src/components/Numeric/Numeric.js","webpack:///./../bx-react-ui/src/components/Offers/Offers.js","webpack:///../bx-react-ui/src/components/Offers/style.module.scss?4350","webpack:///./../bx-react-ui/src/components/Order/InlineDetail.js","webpack:///./../bx-react-ui/src/components/Order/Item.js","webpack:///../bx-react-ui/src/components/Order/Order.module.scss?a113","webpack:///./../bx-react-ui/src/components/Order/TradeInlineDetail.js","webpack:///./../bx-react-ui/src/components/OrderList/OrderList.js","webpack:///./../bx-react-ui/src/components/OrderList/Toolbar/Toolbar.js","webpack:///./../bx-react-ui/src/components/OrderList/index.js","webpack:///../bx-react-ui/src/components/OrderList/styles.module.scss?803e","webpack:///./../bx-react-ui/src/components/Pagination/Pagination.js","webpack:///./../bx-react-ui/src/components/PercentageBar/PercentageBar.js","webpack:///../bx-react-ui/src/components/PercentageBar/PercentageBar.module.scss?c9be","webpack:///./../bx-react-ui/src/components/PercentageCircle/PercentageCircle.js","webpack:///../bx-react-ui/src/components/PercentageCircle/PercentageCircle.module.scss?862e","webpack:///./../bx-react-ui/src/components/Profile/Account/AccountProfileCard.js","webpack:///./../bx-react-ui/src/components/Profile/Account/AccountProfileCarousel.js","webpack:///./../bx-react-ui/src/components/Profile/Account/AccountTabs.js","webpack:///./../bx-react-ui/src/components/Profile/Account/BeneficiariesForm.js","webpack:///./../bx-react-ui/src/components/Profile/Account/HoldersForm.js","webpack:///./../bx-react-ui/src/components/Profile/Account/ModalAccountBankAccount.js","webpack:///./../bx-react-ui/src/components/Profile/Account/ProfileForm.js","webpack:///./../bx-react-ui/src/components/Profile/Account/Risk/RiskTable.js","webpack:///./../bx-react-ui/src/components/Profile/Account/Risk/Widget.js","webpack:///./../bx-react-ui/src/components/Profile/Account/Risk/helper.js","webpack:///../bx-react-ui/src/components/Profile/Account/Risk/styles.module.scss?1749","webpack:///./../bx-react-ui/src/components/Profile/Account/Tabs/BankAccountsTab.js","webpack:///./../bx-react-ui/src/components/Profile/Account/Tabs/BeneficiariesTab.js","webpack:///./../bx-react-ui/src/components/Profile/Account/Tabs/CommissionsTabs/EventCommission.js","webpack:///../bx-react-ui/src/components/Profile/Account/Tabs/CommissionsTabs/Grid.module.scss?2fb9","webpack:///./../bx-react-ui/src/components/Profile/Account/Tabs/CommissionsTabs/OrderTable/OrderTable.js","webpack:///../bx-react-ui/src/components/Profile/Account/Tabs/CommissionsTabs/OrderTable/OrderTable.module.scss?a5bb","webpack:///./../bx-react-ui/src/components/Profile/Account/Tabs/CommissionsTabs/RecurringCommission.js","webpack:///./../bx-react-ui/src/components/Profile/Account/Tabs/CommissionsTabs/index.js","webpack:///./../bx-react-ui/src/components/Profile/Account/Tabs/Components/Booktype.js","webpack:///./../bx-react-ui/src/components/Profile/Account/Tabs/DocumentsTab.js","webpack:///./../bx-react-ui/src/components/Profile/Account/Tabs/FinalizeAccountTab.js","webpack:///./../bx-react-ui/src/components/Profile/Account/Tabs/GroupsTab.js","webpack:///./../bx-react-ui/src/components/Profile/Account/Tabs/HoldersTab.js","webpack:///./../bx-react-ui/src/components/Profile/Account/Tabs/InstructionsTab.js","webpack:///./../bx-react-ui/src/components/Profile/Account/Tabs/InvestmentProfileTab.js","webpack:///./../bx-react-ui/src/components/Profile/Account/Tabs/KYCTab.js","webpack:///./../bx-react-ui/src/components/Profile/Account/Tabs/PersonalReferencesTab.js","webpack:///./../bx-react-ui/src/components/Profile/Account/Tabs/ProfileTab.js","webpack:///./../bx-react-ui/src/components/Profile/Account/Tabs/QuestionsTab.js","webpack:///./../bx-react-ui/src/components/Profile/Account/Tabs/RelatedAccountsTab.js","webpack:///./../bx-react-ui/src/components/Profile/Account/Tabs/SignatureSetsTab.js","webpack:///./../bx-react-ui/src/components/Profile/Account/types.js","webpack:///../bx-react-ui/src/components/Profile/Grid.module.scss?1da4","webpack:///./../bx-react-ui/src/components/Profile/Modal/ModalArchive.js","webpack:///./../bx-react-ui/src/components/Profile/Modal/ModalBankAccount.js","webpack:///./../bx-react-ui/src/components/Profile/Modal/ModalConfirm.js","webpack:///./../bx-react-ui/src/components/Profile/Modal/ModalDocument.js","webpack:///./../bx-react-ui/src/components/Profile/Modal/ModalError.js","webpack:///./../bx-react-ui/src/components/Profile/Modal/ModalFiscalResidence.js","webpack:///./../bx-react-ui/src/components/Profile/Modal/ModalGroup.js","webpack:///./../bx-react-ui/src/components/Profile/Modal/ModalHolder.js","webpack:///./../bx-react-ui/src/components/Profile/Modal/ModalInstruction.js","webpack:///./../bx-react-ui/src/components/Profile/Modal/ModalLegalAddress.js","webpack:///./../bx-react-ui/src/components/Profile/Modal/ModalPersonalReference.js","webpack:///./../bx-react-ui/src/components/Profile/Modal/ModalPhone.js","webpack:///./../bx-react-ui/src/components/Profile/Modal/ModalRelatedAccount.js","webpack:///./../bx-react-ui/src/components/Profile/Modal/ModalShareHolder.js","webpack:///./../bx-react-ui/src/components/Profile/Modal/ModalSignature.js","webpack:///../bx-react-ui/src/components/Profile/Modal/styles.module.scss?3d50","webpack:///./../bx-react-ui/src/components/Profile/Person/Forms/FiscalResidence.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Forms/JuridicalPerson/index.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Forms/LegalAddress.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Forms/PersonSubAsset.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Forms/PhysicalPerson/LegalInfo.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Forms/PhysicalPerson/index.js","webpack:///../bx-react-ui/src/components/Profile/Person/Forms/style.module.scss?6f0a","webpack:///./../bx-react-ui/src/components/Profile/Person/ModalComments.js","webpack:///./../bx-react-ui/src/components/Profile/Person/PersonTabs.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Risk/PersonRiskTable.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Risk/helper.js","webpack:///../bx-react-ui/src/components/Profile/Person/Risk/styles.module.scss?a271","webpack:///./../bx-react-ui/src/components/Profile/Person/Tabs/ArchivesTab.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Tabs/BankAccountsTab.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Tabs/ContractsTab.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Tabs/DocumentsTab.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Tabs/ExtendedDataTab.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Tabs/FinalizeTab.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Tabs/FiscalResidencesTab.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Tabs/KYCTab.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Tabs/LegalAddressTab.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Tabs/PhonesTab.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Tabs/PortfolioTab.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Tabs/ProfileTab.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Tabs/QuestionsTab.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Tabs/RelatedPeopleTab.js","webpack:///./../bx-react-ui/src/components/Profile/Person/Tabs/ShareHolderTab.js","webpack:///../bx-react-ui/src/components/Profile/Person/Tabs/styles/ExtendedDataTab.scss?cae8","webpack:///./../bx-react-ui/src/components/Profile/Person/types.js","webpack:///./../bx-react-ui/src/components/Profile/preCheckForms.js","webpack:///./../bx-react-ui/src/components/QuoteList/QuoteList.js","webpack:///../bx-react-ui/src/components/QuoteList/QuoteList.module.scss?036d","webpack:///./../bx-react-ui/src/components/QuoteList/Toolbar.js","webpack:///./../bx-react-ui/src/components/QuoteList/index.js","webpack:///./../bx-react-ui/src/components/Quotebar/CrossItem/CrossItem.js","webpack:///./../bx-react-ui/src/components/Quotebar/Item/Form.js","webpack:///./../bx-react-ui/src/components/Quotebar/Item/Icon.js","webpack:///./../bx-react-ui/src/components/Quotebar/Item/Item.js","webpack:///./../bx-react-ui/src/components/Quotebar/Item/Status.js","webpack:///./../bx-react-ui/src/components/Quotebar/Quotebar.js","webpack:///../bx-react-ui/src/components/Quotebar/Quotebar.module.scss?f344","webpack:///./../bx-react-ui/src/components/Quotebar/_state.js","webpack:///./../bx-react-ui/src/components/RecoverPassword/index.js","webpack:///./../bx-react-ui/src/components/ResponsiveTable/ResponsiveTable.js","webpack:///../bx-react-ui/src/components/ResponsiveTable/Table.module.scss?7189","webpack:///./../bx-react-ui/src/components/SearchBox/SearchBox.js","webpack:///./../bx-react-ui/src/components/SpotQuotes/Modal.js","webpack:///./../bx-react-ui/src/components/SpotQuotes/index.js","webpack:///../bx-react-ui/src/components/SpotQuotes/styles.module.scss?2314","webpack:///./../bx-react-ui/src/components/ToggleSwitch/ToggleSwitch.js","webpack:///./../bx-react-ui/src/components/UI/Tooltip/Tooltip.js","webpack:///../bx-react-ui/src/components/UI/Tooltip/Tooltip.module.scss?95f2","webpack:///./../bx-react-ui/src/components/UI/index.js","webpack:///./../bx-react-ui/src/components/index.js","webpack:///./../bx-react-ui/src/index.js","webpack:///./../bx-react-ui/src/utils/Account/Account.js","webpack:///./../bx-react-ui/src/utils/DebugTools/ErrorBoundary.js","webpack:///./../bx-react-ui/src/utils/DebugTools/ModalError.js","webpack:///./../bx-react-ui/src/utils/DebugTools/index.js","webpack:///./../bx-react-ui/src/utils/FormFields.js","webpack:///./../bx-react-ui/src/utils/Formatter.js","webpack:///./../bx-react-ui/src/utils/Helper.js","webpack:///./../bx-react-ui/src/utils/NoPermissionWindow.js","webpack:///./../bx-react-ui/src/utils/Order/Order.js","webpack:///./../bx-react-ui/src/utils/Quote/Quote.js","webpack:///./../bx-react-ui/src/utils/Report/Orders.js","webpack:///./../bx-react-ui/src/utils/Report/Quotes.js","webpack:///./../bx-react-ui/src/utils/Report/Transfers.js","webpack:///./../bx-react-ui/src/utils/Report/index.js","webpack:///./../bx-react-ui/src/utils/dateUtils.js","webpack:///./../bx-react-ui/src/utils/hooks.js","webpack:///./../bx-react-ui/src/utils/index.js","webpack:///./node_modules/moment/locale sync ^\\.\\/.*$","webpack:///./public/svg/autorizaciones.svg","webpack:///./public/svg/calendar.svg","webpack:///./public/svg/checkbox-checked.svg","webpack:///./public/svg/checkbox-unchecked.svg","webpack:///./public/svg/csv.svg","webpack:///./public/svg/download-svgrepo-com.svg","webpack:///./public/svg/i.svg","webpack:///./public/svg/keyboard_arrow_down-24px.svg","webpack:///./public/svg/logoBancoFamiliar.svg","webpack:///./public/svg/logoBancoFamiliarCuadrado.svg","webpack:///./public/svg/menu.svg","webpack:///./public/svg/pdf.svg","webpack:///./public/svg/portafolio.svg","webpack:///./public/svg/x-symbol-svgrepo-com.svg","webpack:///./public/svg/xlsx.svg","webpack:///./src/actions/auth.js","webpack:///./src/actions/entities.js","webpack:///./src/components/Auth/ForgotPassword.js","webpack:///./src/components/Auth/Login.js","webpack:///./src/components/Auth/Login.scss?c99b","webpack:///./src/components/Auth/PrivateRoute.js","webpack:///./src/components/Auth/RecoveryPassword.js","webpack:///./src/components/Auth/ResetPassword.js","webpack:///./src/components/Auth/ResetPassword.scss?6abf","webpack:///./src/components/Authorization/AuthorizationComponent.js","webpack:///./src/components/Authorization/Grid/AuthorizationRow/AuthorizationRow.js","webpack:///./src/components/Authorization/Grid/AuthorizationRow/AuthorizationRow.scss?27a3","webpack:///./src/components/Authorization/Grid/Grid.js","webpack:///./src/components/Authorization/Grid/Grid.scss?b267","webpack:///./src/components/EmptyValues/EmptyValues.js","webpack:///./src/components/EmptyValues/EmptyValues.scss?006b","webpack:///./src/components/FormattedNumber/FormattedNumber.js","webpack:///./src/components/Help/Help.scss?c5e1","webpack:///./src/components/Help/HelpComponent.js","webpack:///./src/components/HistoryForm/DropdownBuySell.js","webpack:///./src/components/HistoryForm/DropdownBuySell.scss?b027","webpack:///./src/components/HistoryForm/HistoryForm.js","webpack:///./src/components/HistoryForm/HistoryForm.scss?bd69","webpack:///./src/components/Invest/ExternalAccountsWrapper/ExternalAccountsWrapper.js","webpack:///./src/components/Invest/ExternalAccountsWrapper/ExternalAccountsWrapper.module.scss?6ad7","webpack:///./src/components/Invest/FundsTable/FundInvestModal/FundInvestModal.js","webpack:///./src/components/Invest/FundsTable/FundInvestModal/FundInvestModal.scss?a6ed","webpack:///./src/components/Invest/FundsTable/FundsAssetTable/FundsAssetTable.js","webpack:///./src/components/Invest/FundsTable/FundsAssetTable/FundsAssetTable.scss?9839","webpack:///./src/components/Invest/FundsTable/FundsTable.js","webpack:///./src/components/Invest/FundsTable/FundsTable.scss?fcb5","webpack:///./src/components/Invest/Invest.js","webpack:///./src/components/Invest/Invest.scss?b2e1","webpack:///./src/components/Invest/InvestTable/InvestAssetClassTable/InvestAssetClassTable.js","webpack:///./src/components/Invest/InvestTable/InvestAssetClassTable/InvestAssetClassTable.scss?79af","webpack:///./src/components/Invest/InvestTable/InvestSubAssetClassTable/InvestSubAssetClassTable.js","webpack:///./src/components/Invest/InvestTable/InvestSubAssetClassTable/InvestSubAssetClassTable.scss?8a0a","webpack:///./src/components/Invest/InvestTable/InvestTable.js","webpack:///./src/components/Invest/InvestTable/InvestTable.scss?4b2e","webpack:///./src/components/Layout/BadgeIcon/BadgeIcon.js","webpack:///./src/components/Layout/BadgeIcon/BadgeIcon.scss?7528","webpack:///./src/components/Layout/Footer/Footer.js","webpack:///./src/components/Layout/Footer/Footer.scss?76a8","webpack:///./src/components/Layout/FutureIncomeComponent/FutureIncomeComponent.js","webpack:///./src/components/Layout/FutureIncomeComponent/FutureIncomeComponent.scss?66b1","webpack:///./src/components/Layout/Header/Header.js","webpack:///./src/components/Layout/Header/Header.scss?0dfa","webpack:///./src/components/Layout/Header/HeaderContainer.js","webpack:///./src/components/Layout/MainLayout.js","webpack:///./src/components/Layout/MonthlyStateComponent/MonthlyStateComponent.js","webpack:///./src/components/Layout/MonthlyStateComponent/MonthlyStateComponent.scss?b698","webpack:///./src/components/Layout/MyData/MyData.scss?8f7c","webpack:///./src/components/Layout/MyData/MyDataComponent.js","webpack:///./src/components/Layout/OrdersComponent/OrdersComponent.js","webpack:///./src/components/Layout/OrdersComponent/OrdersComponent.scss?f50e","webpack:///./src/components/Layout/Sidebar/Sidebar.js","webpack:///./src/components/Layout/Sidebar/Sidebar.scss?2b67","webpack:///./src/components/Layout/Sidebar/_nav.js","webpack:///./src/components/LegalContracts/LegalContracts.js","webpack:///./src/components/LegalContracts/LegalContracts.scss?ca9f","webpack:///./src/components/Modal/InvestBuyModal/InvestBuyModal.js","webpack:///./src/components/Modal/InvestBuyModal/InvestBuyModal.scss?a346","webpack:///./src/components/Modal/InvestModal/InvestModal.js","webpack:///./src/components/Modal/InvestModal/InvestModal.scss?4f4c","webpack:///./src/components/NoAccountsPopUp/NoAccountPopup.js","webpack:///./src/components/NoAccountsPopUp/NoAccountPupup.scss?9c8f","webpack:///./src/components/NotificationsCard/NotificationCollapse/NotificationCollapse.js","webpack:///./src/components/NotificationsCard/NotificationCollapse/NotificationCollapse.scss?1de0","webpack:///./src/components/NotificationsCard/NotificationsCard.js","webpack:///./src/components/NotificationsCard/NotificationsCard.scss?0081","webpack:///./src/components/PageWrapper/PageWrapper.js","webpack:///./src/components/PageWrapper/PageWrapper.scss?6206","webpack:///./src/components/Portfolio/Charts/Chart.js","webpack:///./src/components/Portfolio/Charts/Chart.scss?46a7","webpack:///./src/components/Portfolio/Portfolio.js","webpack:///./src/components/Portfolio/Portfolio.scss?a5ce","webpack:///./src/components/Portfolio/PortfolioDownload/PortfolioDownload.js","webpack:///./src/components/Portfolio/PortfolioDownload/PortfolioDownload.scss?06f1","webpack:///./src/components/Portfolio/PortfolioHeader/PortfolioHeader.js","webpack:///./src/components/Portfolio/PortfolioHeader/PortfolioHeader.scss?6ec1","webpack:///./src/components/Portfolio/PortfolioTable/AssetClassTable/AssetClassTable.js","webpack:///./src/components/Portfolio/PortfolioTable/AssetClassTable/AssetClassTable.scss?28ae","webpack:///./src/components/Portfolio/PortfolioTable/AssetTable/AssetTable.js","webpack:///./src/components/Portfolio/PortfolioTable/AssetTable/AssetTable.scss?7cb1","webpack:///./src/components/Portfolio/PortfolioTable/PortfolioTable.js","webpack:///./src/components/Portfolio/PortfolioTable/PortfolioTable.scss?fdf2","webpack:///./src/components/Portfolio/PortfolioTable/SubAssetClassTable/SubAssetClassTable.js","webpack:///./src/components/Portfolio/PortfolioTable/SubAssetClassTable/SubAssetClassTable.scss?a260","webpack:///./src/components/Tooltip/Tooltip.js","webpack:///./src/components/UI/Button/Button.js","webpack:///./src/components/UI/Button/Button.scss","webpack:///./src/components/UI/CircularProgress/CircularProgress.js","webpack:///./src/components/UI/CircularProgress/CircularProgress.scss?20cf","webpack:///./src/components/UI/Container/Container.js","webpack:///./src/components/UI/Container/Container.scss?5441","webpack:///./src/components/UserSelector/Adviserinfo/AdviserInfo.js","webpack:///./src/components/UserSelector/Adviserinfo/AdviserInfo.module.scss?471e","webpack:///./src/components/UserSelector/UserSelector.js","webpack:///./src/components/UserSelector/UserSelector.scss?3618","webpack:///./src/components/Warning/Warning.js","webpack:///./src/components/Warning/Warning.scss?0c80","webpack:///./src/config/config.js","webpack:///./src/config/routes.js","webpack:///./src/index.js","webpack:///./src/pages/Authorizations.js","webpack:///./src/pages/ForgotPassword.js","webpack:///./src/pages/FutureIncome.js","webpack:///./src/pages/Help.js","webpack:///./src/pages/History.js","webpack:///./src/pages/Invest.js","webpack:///./src/pages/Login.js","webpack:///./src/pages/MonthlyStates.js","webpack:///./src/pages/MyData.js","webpack:///./src/pages/Notifications.js","webpack:///./src/pages/Orders.js","webpack:///./src/pages/Portfolio.js","webpack:///./src/pages/ResetPassword.js","webpack:///./src/pages/Root.js","webpack:///./src/reducers/auth.js","webpack:///./src/reducers/entities.js","webpack:///./src/reducers/index.js","webpack:///./src/reducers/selectors.js","webpack:///./src/sagas/auth.js","webpack:///./src/sagas/index.js","webpack:///./src/services/api.js","webpack:///./src/services/api/accounts.js","webpack:///./src/services/api/authorizations.js","webpack:///./src/services/api/entities.js","webpack:///./src/services/api/inout.js","webpack:///./src/services/api/internalMessages.js","webpack:///./src/services/api/person.js","webpack:///./src/services/api/users.js","webpack:///./src/services/index.js","webpack:///./src/store/configureStore.js","webpack:///./src/store/configureStore.prod.js","webpack:///./src/style/assets/svg/csv.svg","webpack:///./src/style/assets/svg/pdf.svg","webpack:///./src/style/assets/svg/xlsx.svg","webpack:///./src/utils/AppInfoWrapper.js","webpack:///./src/utils/global.js","webpack:///./src/utils/handleRedirectionData.js","webpack:///./src/utils/helper.js","webpack:///./src/utils/hooks/useQuery.js","webpack:///./src/utils/inmutability.js"],"names":["AdvancedSearch","open","onChange","onSearch","toggleAdvancedSearch","fromDate","toDate","isSearching","FormGroup","className","style","advanced","Label","inputs","Input","type","value","placeholder","e","target","required","width","Button","color","onClick","disabled","marginLeft","propTypes","PropTypes","bool","isRequired","func","string","module","exports","AdvancedSearchbox","searchboxPlaceholder","showAdvanced","defaultOpenAdvanced","defaultFromDate","defaultToDate","onBasicFilterUpdate","onAdvancedFilterUpdate","useState","isOpenAdvanced","setIsOpenAdvanced","text","basicFilter","setBasicFilter","advancedFilter","setAdvancedFilter","useEffect","toggleAdvanced","Fragment","InputGroup","property","newValue","newFilter","defaultProps","toDateLocal","Date","TypeInput","Quantity","Total","initialState","inputType","Result","result","items","Principal","principal","Accruals","accrual","YTM","ytm","TNA","currentyield","total","Duration","duration","Days","days","sectionDark","totals","Object","entries","map","key","item","FormattedNumber","dataTypeDecimalName","events","Table","striped","event","index","date","FormattedDate","parseDate","quantity","cash","length","colSpan","empty","TypeInputValues","id","description","toggle","price","services","assetInformation","role","fields","setFields","errors","setErrors","loading","setLoading","setResult","getFullYear","getMonth","slice","getDate","name","undefined","Modal","isOpen","modal","ModalHeader","ModalBody","body","Container","container","Row","Col","lg","Field","label","error","readOnly","invalid","FormNumber","decimalScale","SubAssetClassDecimalPlaces","FormSelect","selectItems","getSelectItemId","i","getSelectItemName","inputTypeValue","checkFunds","CustomInput","AssetPricesDirty","checked","priceisclean","v","zIndex","nextErrors","valueIsEmpty","dateIsEmpty","keys","assetId","priceisdirty","trt","calculator","then","Code","showToast","Description","handleCalculate","data-style","SLIDE_LEFT","ModalFooter","changedColor","rest","fontWeight","fontSize","display","NumberFormatInput","customInput","onValueChange","FormCheck","customCheckChanged","Suggest","valueName","valueId","fieldId","fieldName","fieldExtension","getSelectItemExtension","service","internalOnChange","method","nextValue","Autosuggest","renderSuggestion","suggestion","suggestionItem","getSuggestionValue","onSuggestionsFetchRequested","res","response","values","inputProps","m","isEmpty","String","getValueFromId","s","LoadingField","Spinner","size","LoadingMessage","loadingMessage","CircularProgress","sm","margin","Status","status","Badge","toLowerCase","toUpperCase","SuggestIssuer","serviceCreateIssuer","errorMessage","setErroMessage","issuerName","setIssuerName","issuerTypeId","setIssuerTypeId","issuerTypes","setIssuerTypes","issuerDocument","setIssuerDocument","fetchServiceGetIssuerType","SDTIssuerTypeCollection","searchIssuer","marginBottom","for","IssuerTypeId","IssuerTypeName","newFields","IssuerName","IssuerDocument","createIssuer","IssuerId","ID","Message","fetchCreateIssuer","EmptyTable","textAlign","padding","marginTop","FormattedDateWithEmpty","grid","getAssets","getHistory","clone","Link","changeStatus","getContractcLosingLeg","isFundManager","fundInstalled","exportAsset","TraderCanCreateAssets","modalStatus","setModalStatus","modalClone","setModalClone","modalHistory","setModalHistory","handleAction","action","nextStatus","AssetStatus","Deleted","process","processId","pageStart","loader","loadMore","hasMore","hover","assets","asset","AssetId","to","AssetTicker","AssetName","AssetISIN","Active","AssetActiveDateTime","AssetModifiedDateTime","actions","outline","iconBtn","UncontrolledDropdown","DropdownToggle","dropdown","stopPropagation","DropdownMenu","DropdownItem","onHistoryRequest","onToggle","Counter","DropDownFilterSubClass","minWidth","caret","find","SubAssetClassId","SubAssetClassName","menu","subAssetClass","DropDownFilterStatus","rootOnChange","subClasses","rootFilter","filter","counters","searchAsset","filters","setFilters","debounceCallback","useCallback","debounce","nextValues","toolbar","EXPAND_RIGHT","tag","mode","wizzToggle","Card","CardBody","w55","AssetDefaultIdentifier","provider","Synonyms","DataProviderId","DataProviderName","getDefaultIdentifierLabel","AssetDefaultIdentifierValue","w120","prices","w80","AssetLast","aria-hidden","newAssetFromFile","CloneStatus","alert","setAlert","setStatus","Alert","cloneResult","success","newId","catch","message","title","onConfirm","initialFields","SettlementCurrencyId","SettlementCurrencyISO","SettlementCurrencyDescription","SettlementCurrencyIsDefault","validate","forEach","currency","currencies","handleSave","currencyId","currencyISO","currencyDescription","group","groups","setGroups","setValues","assetGroups","AssetGroupId","assetGroupValues","groupId","AssetGroupName","Value","AssetGroupValue","setIsOpen","file","setFile","warnings","setWarnings","newAssetId","setNewAssetId","fullscreen","Form","files","substring","indexOf","extension","reader","FileReader","readAsDataURL","onload","fileBlob","split","blob","onerror","accept","FormText","w","href","window","location","reload","r","Warning","err","onAction","AssetCouponDate","today","AssetNewCouponDate","AssetCouponRate","AssetCapitalizationRate","AssetSink","AssetPrincipalFactor","AssetAccrualFactor","AssetCouponNumber","AssetExpectedPayment","realAccruals","expectedAccruals","toISOString","getDateAsString","substr","validateRecalculate","payment","setShowAdvanced","handleRecalculate","intrinsecaccruals","CurrencyISO","Math","round","prevFields","calculateAccrualFactor","parseFloat","FormField","recalculate","AssetQuoteDate","QuoteCurrencyId","AssetQuotePrice","AssetQuoteAccountingPrice","AssetQuoteAdjustedPrice","AssetQuoteOpenPrice","AssetQuoteClosePrice","AssetQuotePriceIsDirty","matchedDate","match","quote","quotesDirty","QuoteCurrencyISO","QuoteCurrencyDescription","labelStyle","isNaN","floatValue","AssetQuoteXIRR","AssetQuoteDuration","checkbox","AssetProviderName","AssetProviderTradePricing","AssetProviderAccountingPricing","synonym","dataProviders","dataProvider","dp","AssetStatusValues","setNextStatus","contractClosingLeg","setContractClosingLeg","alreadyLoaded","setAlreadyLoaded","setAlreadyConfirmed","contractClosingLegModified","setContractClosingLegModified","showClosingLeg","setShowClosingLeg","initialDate","toFormatDate","maturityDate","setMaturityDate","getClosingLeg","ContractClosingLeg","confirmChangeStatus","closingLeg","closingleg","quantityOnClick","dateOnClick","line","confirm","TAXId","tax","taxes","setTaxes","tx","TAXName","active","Nav","tabs","NavItem","NavLink","TabName","General","WizzMode","New","Structure","Payments","Tax","Groups","Sinonyms","Currency","Quotes","Agencies","Portfolios","AssetPhysicalDenomination","Denominations","Scores","scores","score","CreditRatingAgencyScore","CreditRatingAgencyScoreValue","getRowKey","agency","CreditRatingAgencyId","CreditRatingAgencyDate","EmptyOrLoading","wizzOnChange","agencies","setAgencies","setActive","FromDate","addMonth","toString","ToDate","setFilter","creditsRatings","field","formDate","DateField","toLocaleDateString","ag","CreditRatingAgencyName","ContractModal","contract","contractDetailsWrapper","ContractCollateralAssetTicker","ContractCollateral","ContractCollateralPrice","ContractAppraisal","suffix","ContractMargin","ContractMarketValue","ContractCollateralCurrencyISO","step","ContractMaturity","ContractRate","leg","opening","ContractOpeningLeg","closing","CouponPayments","payments","Payment","setOpen","setTotal","prev","newTotal","ContractPaymentAdjustedAmmount","couponPaymentsLink","feesTable","responsive","coupon","idx","ContractPaymentDate","ContractPaymentName","ContractPaymentAmmount","paymentsTotal","assetContracts","View","setReadonly","modalContract","setModalContract","useEntities","checkeds","contracts","setGrid","page","setTimeout","LenderName","BorrowerName","Actions","deleting","Mode","Update","Delete","ZOOM_OUT","data-size","XS","settleCurrencies","readonly","modalCurrency","setModalCurrency","setDeleting","props","Insert","c","handleDelete","updateSettleCurrency","SettlementCurrencies","concat","splice","findIndex","assetInfo","toggleOrder","editing","setEditing","denominations","setDenominations","canSave","setCanSave","loadDenominations","fetchPortfolios","slotsDict","portfolio","p","PortfolioQuantity","truncateNumber","push","account","accountId","availableSlots","ceil","AssetSheetSize","AccountNumber","AccountName","BalanceType","PortfolioBalanceType","BookType","booktype","slots","availableSlotsAux","availableSlotsActive","availableSlotsInactive","fetchDenominations","newDenominations","currentAccountBefore","denIdx","d","Accountid","balancetype","DenominationStatus","situation","currentAccount","j","newDenomination","Assetid","DenominationId","IsEditable","found","slotsIdx","slot","finally","saveDenominations","btnDenominations","column20","column10","alignCenter","DenominationRow","denomination","editingGlobal","setEditingGlobal","denominationsToSave","console","handleHistory","processCharId","handleAddDenomination","f","fn","addDenominations","BasicAccountId","HistoryDefault","fetchHistoryByCharId","denominationValue","setDenominationValue","DenominationTicker","denominationTicker","setDenominationTicker","selectedDenominationStatus","setSelectedDenominationStatus","setDisabled","denominationSituation","setDenominationSituation","toggleEditing","handleOnChange","rowDenominationAdd","rowDenominationDelete","rowDenomination","Combobox","emptyLabel","handleHistoryDem","Fundamentals","financials","setFundamentals","AssetSynonym","iextradingFinancial","financial","reportDate","styleDetails","cashChange","cashFlow","costOfRevenue","currentAsset","currentCash","currentDebt","grossProfit","netIncome","operatingExpense","operatingGainsLosses","operatingIncome","operatingRevenue","researchAndDevelopment","shareholderEquity","totalAssets","totalCash","totalDebt","totalLiabilities","totalRevenue","getAttachments","changedFiles","attachments","Line","remove","download","attachment","AssetAttachmentExtension","AssetAttachmentName","delete","AssetAttachmentId","update","fileId","handleDownload","attachmentId","fileName","element","document","createElement","setAttribute","encodeURIComponent","appendChild","click","removeChild","chooser","random","new","validateGeneral","Error","getDataProviderLabel","providers","prov","DataProviderInternalName","previousFields","entities","updateFiles","DPEditing","None","dpEditable","setDPEditable","loaded","setLoaded","tooltipOpen","setTooltipOpen","toggleTooltip","DPEditableState","defaultId","OnlyValue","Both","nextFields","candidate","getDefaultAssetProvider","subAssetClasses","riskTypes","SinkTypeValues","SinkType","center","AssetHasOrdersInProgress","AssetCanBeTradedFromWebClient","AssetReadyToTrade","Taxes","xs","Tooltip","placement","AssetMaintainsFaceOnSink","AssetReadyToBook","AssetHasUnderlyingPortfolio","number","fetchSearchAccount","accounts","a","accountAttrs","JSON","parse","Id","AssetUnderlyingPortfolio","AssetCanUseMTM","AssetHasMTM","AssetSinktype","AssetSettlementCurrencyId","AssetRiskTypeId","AssetRiskTypeDesc","Attachments","CountryId","CountryName","Name","searchCountry","modalGroup","setModalGroup","updateGroup","height","SelectActions","setSelection","selection","doAction","assetPayments","recalculating","setRecalculating","calculating","modalPayments","setModalPayments","showRealAccruals","setShowRealAccruals","calculated","setCalculated","indice","setIndice","setQuantity","quantityError","setQuantityError","paymentId","updatePayment","forceUpdateAfterRecalculate","ids","deletePayments","paymentIds","reduce","handleSelectionAction","info","quantityValue","AssetHasIndex","AssetIndex","AssetIndexExpression","couponFill","checkBox","AssetCouponFlowInterest","opsViewAccountName","setPortfolio","setDate","io","order","custody","sellAll","setEmpty","decimalAmount","setDecimalAmount","handleOrder","CurrentAccount","AccountId","OrderSide","OrderQuantity","AssetClassForm","AssetDescription","changeDate","AssetPortfoliosXLSX","count","Blob","Uint8Array","buffer","data","link","URL","createObjectURL","ex","alignRight","PortfolioAveragePrice","PortfolioInvested","quotes","setQuotes","modalQuote","setModalQuote","quoteDate","updateQuote","q","assetSynonyms","modalSinonyms","setModalSinonyms","synonymId","updateSynonym","highlight","parseYesNo","subAsset","AssetClassName","SubAssetClassForm","SubAssetClassHasRegularPayments","SubAssetClassHasMaturity","SubAssetClassIsanOption","validateStruture","UseAssetAnnualTargetPerfomance","setShowAnnualTargetPerformance","UseAssetQualified","setShowIsQualified","getParameterValue","ParameterName","SdtParametersData","ParameterNumericValue","onChangeDate","onChangeSuggest","onChangeCheck","calendars","SubAssetClassInfo","CurrencyId","AssetDefaultSettlement","DayCountFractionsValues","AssetAccrualType","YesNoValues","AssetAccrualTypeEOM","section","AssetCouponDividendPaymentFrecuency","PaymentBaseValues","AssetCouponDividendPaymentBase","AssetFirstCouponDate","SubAssetClassPaymentType","PaymentFormula","InterestRate","EffectiveRate","AssetHasPartialRedemptions","AssetHasCapitalizations","SubAssetClassQuoting","QuotingType","Contracts","AssetContractSize","Dividend","PaymentRateTypeValues","AssetPaymentRateType","AssetPaymentRateFixed","AssetPaymentRateVariableExpression","AssetMaturityDate","YesNo","Yes","IndexTypeValues","AssetParValue","SubAssetClassPricesDirty","AssetHasCall","AssetUnderlyingAsset","AssetUnderlyingAssetName","Ticker","searchSymbol","AssetStrikePrice","AssetCallDate","CallPutValues","AssetIsCallPut","CountryISO2","searchCountryISO2","AssetIssuanceCurrency","IssuanceTypeValues","AssetIssuanceType","SubAssetClassRequieresIssuanceDate","AssetIssuanceDate","OfferTypeValues","AssetOfferType","SectorTypeValues","AssetSectorType","AssetCanBeTraded","AssetCanBeTradedProp","AssetPreferredCustodianEntity","AssetPreferredCustodianEntityName","searchCustEntity","CalendarId","CalendarName","AssetDefaultCalendar","AssetCanBeSelfCustodied","AssetIsQualified","SubAssetClassIsFund","FundTypeValues","AssetFundType","AssetHasPenalties","AssetFundReinvests","AssetMin","AssetMultiple","DecimalsValues","AssetMaxDecimals","AssetAnnualTargetPerformance","RiskRegionId","RiskRegionName","searchRegion","DayCountFractions","PaymentBase","IndexType","CallPut","OfferType","PaymentRateType","SectorType","IssuanceType","FundType","Decimals","SubAssetClassPhisicalDenomination","assetTaxes","modalTax","setModalTax","taxId","t","updateTax","TAXType","TAXPercentage","initial","useReducer","state","newState","getPropertySafe","elem","redirect","initialTab","modals","setModals","saving","setSaving","setAsset","previousAsset","setPreviousAsset","setChangedFiles","tab","setTab","setFileModalOpen","setEntities","assetEntities","subAssetClassId","prevAsset","saveAndContinue","forceGet","serviceHanlder","wizzardIsValid","generalIsValid","strutureIsValid","generalErrors","structureErrors","Edit","create","changedAttachments","changedFields","save","toggleLoadFromXLS","card","CardHeader","CardFooter","Grid","Toolbar","Header","Wizzard","ACTISDA","ACT365","ACT360","ACTISMA","ACTAFB","BOND30360","EU30360","ISDA30360","BOND30365","ACTPY","Weeks","Months","Years","ZeroCoupon","DiscountSimple","DiscountCompound","OnlyPrincipal","OnlyPayments","PrincipalAndPayments","Call","Put","Global","Local","Foreign","Sovereign","Public","Private","Fixed","Variable","Open","Close","No","Units","Percentage","0","1","2","3","4","5","6","7","8","TaxType","VAT","INCOME","MARKETWTAX","Face","Remaining","Inactive","InProcess","Blocked","Matured","AuthorizationsPage","hash","setMonth","modalAuth","authorizations","pageSize","skip","isAdvancedFilterActive","changeAdvancedFilter","dispatch","authorizationsSuccess","fetchGetAuthorizations","setState","isAdvancedFilterLoading","all","Length","Offset","Text","loadAuthorizations","filterOptions","prevState","toggleModal","changeFilter","handleReadAuthorization","authorization","username","fetchSetAsReadAuthorization","wasReadBy","includes","AuthorizationStatus","Waiting","authorizationsRead","session","this","getSession","UserRoleName","Advisor","manager","prevProps","locationState","AuthorizationWrapper","filteredAuthorizations","filtered","processedBy","authorized","parts","requestedBy","trim","every","some","sort","a1","a2","compare_wasRead","compare_waiting","compare_dateTime","dateTime","compare_status","Authorized","Rejected","filterAuthorizations","getUser","Authorizations","filtersParent","setRead","React","Component","header","processed","handleRead","icon","Icon","top","localDateTime","FormattedTime","hour12","pin","getRoute","routes","ItemGroup","read","classifyAuthorizations","counter","nav","tada","pill","right","todo","unread","waiting","more","UI","PendingRelatedAuthorizations","loadingAdvanced","getStatusPriority","b","statusPriorityA","statusPriorityB","ReadStatus","wasRead","hasPendingRelatedAuthorizations","changeValue","handleFilterDebounced","changeFilterValue","md","xl","filterDropdown","export","Desktop","readStatus","DateTime","Types","Bar","theme","suggestionsContainer","suggestionsContainerOpen","suggestionsList","suggestionHighlighted","input","selected","suggestions","bind","onSuggestionSelected","onSuggestionsClearRequested","shouldRenderSuggestions","nextProps","nextState","reason","inlineStyle","position","focusInputOnSuggestionClick","renderInputComponent","alwaysRenderSuggestions","handleFetch","fecthSuggestions","onGoingfetch","array","show","suggests","handleChangeValue","handleFocus","handleSelectSuggestion","onSelect","handleBlur","onBlur","onFocus","left","backgroundColor","static","StaticProgress","LoadingProgress","classes","spinner","styles","fg","fill","stroke","bg","transition","txt","strokeWidth","percentage","strokeWidthCapped","min","radius","max","circumference","PI","textStyle","transform","cx","cy","strokeDasharray","strokeDashoffset","x","y","textAnchor","getCWRelatedEntities","relatedEntity","CWRelatedEntites","CounterPart","Market","Other","getIntStatusName","CWStatus","Closed","CustodyLock","LockInBank","LockSelf","Release","Asset","Custodian","CustodyIntStatus","ClientRequest","CustodianRequest","Executed","ClientReturned","Returned","Lost","ReturnRequested","CancelRequest","Delivered","CustomFormInput","AmortizationSettlementDate","AmortizationStatus","AmortizationDescription","AmortizationFundId","AmortizationFundName","AmortizationFundCustodianName","AmortizationCurrencyISO","AmortizationAmount","TableDefault","credit","parseInt","CashActivityDebitCredit","CashActivityVolume","debit","CashActivityId","CashActivitySettlementDate","CashActivityDescription","BasicAccountName","BasicAccountNumber","CashActivityBalanceType","TableSm","CashActivityTotal","activity","matches","activeAccounts","setActiveAccounts","collapsedAccount","setCollapsedAccount","handleCollapse","oldCollapse","newColl","showAccounts","acc","accIndex","cursor","BasicAccountType","EventAccountAmount","Footprint","footprint","EventAccountFootprintId","EventAccountDebitCredit","end","EventAccountTicker","EventAccountIsCommission","EventAccountIsTax","EventAccountIsFee","EventAccountIsWithholding","EventAccountDebitCreditVolume","corpEvent","CorporateEventType","CorporateEventSettlementCurrencyISO","CorporateEventFX","CorporateEventCommissionCurrencyISO","CorporateEventCommissionFX","CorporateEventTaxCurrencyISO","CorporateEventTaxFX","CorporateEventClientTaxFX","Account","accountName","accountNumber","assetticker","volume","internalstatus","externalstatus","EventOption","option","options","optionDescription","accountid","accountname","groupByOption","trimAll","replace","customEvent","setCustomEvent","mainInfo","accountsInfo","CutOffDate","PositionDate","EarningAccounts","EarningAccountId","EarningAccountName","EarningAccountVolume","EarningAccountBalance","EarningRecovery","earning","EarningRecoverySendingCustodianName","EarningRecoveryReceivingCustodianName","EarningRecoveryCurrencyISO","EarningRecoveryStatus","EarningRecoverySettlementDate","EarningRecoveryDescription","EarningAccount","object","IO","userType","setModal","IOType","IOTypes","Transfer","IOItemUI","LocalOrINTL","IOMode","Simple","MultipleAssets","Symbol","BankAccount","READONLY","Totals","formattedNumber","InvoiceSubtotal","InvoiceTax","InvoiceTotal","Lines","lines","table","InvoiceLineDescription","InvoiceLineCommission","InvoiceLineTaxName","InvoiceLineTax","InvoiceLineTotal","invoiceInfo","ConceptName","InvoiceType","InvoiceSetllementDate","InvoiceId","InvoiceStatus","InvoiceTradeDate","InvoiceClientName","InvoiceDate","InvoiceClientTaxId","InvoiceAccountNumber","InvoiceAccountName","InvoiceCounterPartyName","InvoiceClientAddress","InvoiceBankAccountName","InvoiceDescription","InvoiceAddendum","Details","SupplierInvoiceNumber","SupplierInvoiceDate","SupplierInvoiceTotal","SupplierInvoiceUnpaidAmount","InvoiceAssociatedPaymentAmount","PaymentSupplierName","InvoicePaymentCurrencyISO","InvoicePaymentDate","PaymentSupplierRUT","InvoicePaymentBankAccountName","InvoicePaymentReferenceNumber","InvoicePaymentStatus","InvoiceAssociated","log","InvoicePaymentAmount","invoiceRequest","InvoiceRequestType","InvoiceRequestStatus","InvoiceRequestDate","InvoiceRequestAccountName","InvoiceRequestAccountNumber","InvoiceRequestExecutionDate","InvoiceRequestAmount","InvoiceRequestCurrencyISO","ActivityTable","Volume","journalEntry","debits","Level1","splitIndex","Credit","credits","JournalEntryStatus","UserType","BackOffice","Trader","MiddleOffice","Accounting","FundManager","JournalEntryRegisteredDate","JournalEntryPaymentDate","CashActivity","ProductActivity","Offer","o","stats","getOrderStats","OrderInitDate","OrderModifiedDate","renderOrderStatus","renderOrderSide","renderOrderQuantity","renderOrderQuantityType","renderOrderSymbol","renderOrderPrice","renderOrderTimeFrame","renderOrderAccount","renderExecutionsAvg","Order","platformRole","imageSource","ProductActivityDebitCredit","ProductActivityVolume","ProductActivityId","ProductActivitySettlementDate","ProductActivityDescription","ProductActivityAccountName","ProductActivityAccountNumber","ProductActivityBalanceType","ProductActivityTotal","ProvisionsPaymentAccounts","PaymentAccountId","PaymentAccountName","PaymentAccountCustodianName","PaymentAccountCurrencyISO","PaymentAccountVolumen","PaymentAccountBalance","ProvisionsPayment","ProvisionsPaymentSettlementDate","ProvisionsPaymentStatus","ProvisionsPaymentDescription","Accounts","ItemId","RecurringCommissionTotal","RecurringCommissionBuyingPower","RecurringCommissionBaseCalculation","RecurringCommissionVolume","RecurringCommissionTax","RecurringCommissions","recurringCommission","RecurringCommissionType","RecurringCommissionFrom","RecurringCommissionTo","RecurringCommissionExecutionDate","RecurringCommissionStatus","SettleInst","settleInst","SettleInstSide","Calculated","HasClientQuantity","HasPropQuantity","HasTradingQuantity","HasErrorQuantity","SettleInstQuantity","SettleInstAssetTicker","SettleInstStatus","SettleInstAssetISIN","SettleInstNetSettleValue","SettleInstSettleCurrencyISO","SettleInstOurClientCustName","SettleInstOurPropCustName","SettleInstCounterPartyName","SettleInstValueDate","SettleInstType","rootAccounts","ShortCoverTotalFromCurrency","ShortCoverAccountFromCurrency","ShortCoverAccountFromISO","ShortCoverTotalFromISO","fxIndex","ShortCoverAccountVolume","ShortCoverTotalDivides","ShortCoverTotalFX","eventType","assetISIN","assetTicker","settleCurrency","ShortCoverTotalISO","ShortCoverTotal","ShortCoverDate","ShortCoverDescription","ShortCoverStatus","ShortCoverType","ShortCoverCustodianName","Events","td","InvoiceDetailsDescription","InvoiceDetailsTAXName","InvoiceDetailsSubtotal","InvoiceDetailsTax","InvoiceDetailsTotal","SupplierInvoiceDescription","SupplierInvoiceAddendum","marginRight","SupplierInvoiceSubtotal","SupplierInvoiceTax","SupplierInvoiceStatus","SupplierName","SupplierInvoiceCurrencyISO","SupplierInvoiceTypeDescription","SupplierRUT","SupplierInvoiceDueDate","SupplierInvoiceCode","PaymentMethodDescription","SupplierInvoiceAssociated","SupplierInvoiceFundId","InvoiceDetails","trade","renderTradeSide","renderTradeQuantity","renderTradeSymbol","renderTradePrice","TradeStatus","TradeCashValue","TradeSettleCurrencyISO","TradeTradingRouteName","TradeCounterPartyName","TradeTradeDateTime","toDatetimeLocal","showDateTime","TradeValueDate","TradeBasicAccountName","TradeBasicAccountNumber","TradeOffsetBasicAccountName","TradeOffsetBasicAccountNumber","TradeTradeCurrencyISO","TradeTradeCurrencyId","TradeSettleCurrencyId","TradeFXRoute","TradeFXRelatedOrderId","TradeFX","showCurrency","CurrencyIso","Amount","Transaction","transaction","transactionAmount","TransactionCurrencyId","TransactionType","TransactionSettlementDate","TransactionAmount","TransactionCurrencyIso","CrossRefForms","processes","DERIVATIVE_MATURITY","JOURNAL_ENTRY","TRANSACTION","EARNING_RECOVERY","PROVISIONS_PAYMENT","AMORTIZATION","BULK_DEPOSIT","DEPOSIT","WITHDRAW","BULK_WITHDRAW","TRANSFER","WITHDRAW_ACCOUNT","DEPOSIT_ACCOUNT","ORDER","BULK_ORDER","BASKET_ORDER","OFFER","TRADE","CORP_EVENT","INVOICE","SUPPLIER_INVOICE","INVOICE_PAYMENT","SETTLEMENT_INSTRUCTION","RECURRINGCOMMISSIONS","RECCOMMISSIONACCOUNT","CUSTOM_EVENT","CUSTODY_LOCK","SHORT_COVER","INVOICE_REQUEST","renderForm","buildGraphData","graph","Array","isArray","node","processDescription","expand","parents","parentNodes","parent","nodeId","shortDescription","relationShortDescription","longDescription","relationLongDescription","children","childNodes","child","Graph","handleExpand","collapse","toggleExpand","expandAll","nodeData","forceUpdate","list","_this","val","horizontal","treeContainer","tree","onExpand","any","loadingId","collapsable","renderContent","directionType","renderNode","currentNode","previousNode","direction","prop","cls","treeNode","treeNodeParent","isLeaf","hasMoreChilds","vnode","NodeLoading","treeNodeLabelInner","treeNodeLabel","join","renderLabel","treeNodeChildren","hasMoreParents","render","loadingWrapper","nodeLoading","getTicketTitle","subProcessId","lastCrossRefTree","CrossReference","reducer","initializeState","openChilds","setOpenChilds","openActions","setOpenActions","treeData","setTreeData","errorPage","setErrorPage","revertC","setRevert","rollbacking","setRollbacking","reverting","setReverting","downloadTicketLoading","setDownloadTicketLoading","references","ticketNumber","ticketMainProcess","ticketMainProcessId","ticketMainSubProcessId","isRolledback","isHidden","childs","canRollback","canChangeVisibility","reset","num","RESET","payload","ticketReference","includeChilds","crossreference","newProcesses","CrossReferenceId","mainProcess","mainProcessId","mainSubProcessId","newIsRolledback","newIsHidden","newChilds","newParent","newActions","TICKET_REFERENCES","Promise","resolveTree","processType","canReuseLastTree","crossTree","nodes","ref","refProcess","refId","subId","crossRelatedInfo","properties","propertiesAsJson","accessProcess","PROCESS_DATA","CASH_ACTIVITY","PRODUCT_ACTIVITY","NoPermissionWindow","ButtonDropdown","divider","mainProcessDescription","crossReferenceId","rollbackCrossReference","confirmRollback","hide","setVisibilityOfRollbackedJournalEntry","paddingTop","revertCrossReference","treeItem","JournalEntryCorrelative","getTitle","getProcessId","crossreferenceid","caller","fetchTicket","code","url","oneOfType","processesOrder","refs","sorted","newRefs","InternalStatus","getInternalStatusClass","Number","removeZeros","ExternalStatus","getExternalStatusClass","CustodyExtStatus","PrintPending","Printed","Released","Recovered","Cancelled","getCorpEventStatusClass","TDateTime","StatusEvent","valueParam","getSelectedId","getSelectedName","getFilterCondition","setShow","search","setSearch","itemsFiltered","setItemsFiltered","selectedItem","selectedItemPreview","newItems","dropbtn","withPreview","withoutPreview","dropdownContent","searchInput","handleSelect","reports","view","report","desk","DynamicReportId","DynamicReportName","DynamicReportLastRuntime","DynamicReportUserLast","validateParameters","paramDefs","paramValues","hasErrors","paramDef","ParameterIsMandatory","onClose","QueryStatus","WaitingExec","queryStatus","setQueryStatus","reportResponse","setReportResponse","params","Parameters","param","initValue","ParameterInitValue","getInitParams","setParamValues","paramErrors","setParamErrors","reportName","reportQuery","DynamicReportSQL","reportId","handleExecuteButton","parameters","stringify","Executing","execute","ExecutedEmpty","centered","codeStyle","query","ParamDateField","showDate","toDateTime","dateFormat","ParamNumericField","ParamTextField","ParameterType","ParameterFriendlyName","paramValue","labelReq","ParamType","Character","Numeric","reservedWords","parseSQLReservedWords","_query","sqlFormatter","format","regex","RegExp","elements","_node","matchAll","chunksToHighlight","start","fillInChunks","allChunks","append","lastIndex","chunk","highlightWord","filteredCount","stringFilter","setStringFilter","DynamicReports","route","redirectProps","CustomHandlers","pathname","cleanText","IconClass","List","modalDetail","handleItemClick","fetchMarkAsRead","eventsCounter","i1","i2","sortItemsFirst15","Datetime","getEvents","setRedirect","isFailed","handleRowClick","initialGrid","includeRead","nextPage","fetchGetEventAlerts","offset","prevEvents","dateFrom","dateTo","DropDownFilterProcess","Process","openAdvanced","setOpenAdvanced","BulkOrder","BasketOrder","CorpEvent","PageGrid","Deposit","Withdraw","ExecutionsRows","executions","loadings","setLoadings","execution","childId","executionTableRow","ExecutionId","ExecutionDate","hour","minute","second","ExecutionQuantity","ExecutionPrice","TradingRouteName","CounterPartyName","ExecutionMoreInfo","showDelete","sent","onDelete","data-color","ExecutionIsMassive","tableFixed","ChildButton","handleOnClick","iconClass","data-mfb-label","Menu","MainButton","iconResting","iconActive","mainClass","toggleMenu","evt","preventDefault","buttons","main","cloneElement","data-mfb-toggle","data-mfb-state","effect","oneOf","childrenValidator","propName","componentName","msg","mainButtonCount","childButtonCount","otherCount","Children","decimalSeparator","___APP_CONFIG___","DECIMAL_SEPARATOR","thousandSeparator","DATA_TYPE_DECIMALS","CURRENCY","PRICE","QUANTITY","PERCENTAGE","default","DEFAULT","isNegative","toFixed","floatRes","toLocaleString","removeZeroesInDecimals","regexString","funds","allFunds","getNameFunds","filterActions","filtrado","toggleActions","hasActions","fromPage","ItemUI","InlineDetail","detail","bold","ioType","badge","OrderStatus","IsCurrency","TIOType","transfersendingName","transfersendingNumber","transferreceivingName","transferreceivingNumber","TransferType","IOTransferType","BankAccountName","BankAccountNumber","Product","local","TransactionStatus","ROUTED","FILLED","CANCEL_PENDING","CANCELED","REJECTED","AMENDING","ACKED","PARKED","AUTH_WAIT","Redemption","Subscription","MultipleAccounts","Client","PropClient","CurrencyAsset","Cash","ContextType","INTL","Cheque","getIOTypeName","iotype","getIOProcessName","getTransactionStatusName","iostatus","getStatusName","formatIOforUpdate","originalIO","Correlative","Price","assign","itemsHeader","getNextIOStatus","column","MainCard","cardHeader","getAccountType","personChangeType","Information","Documents","ShareHolders","Phone","FiscalResidence","LegalAddress","KYC","Suitability","ExtendedData","Comparer","requestedModification","person","fetchFile","comparerSelector","AccountChangeType","PersonChangeType","edit","changedAccount","showChanges","changedPerson","Person","BankAccountsTab","editBankAccount","BankAccounts","compareBankAccount","BankAccountItemId","DeleteBankAccount","getFile","ArchiveTemporalFileId","blobfile","ArchiveName","ArchiveExtension","FormToShow","bankAccount","refBankAcc","BankAccountPersonalName","BankAccountHolders","BankAccountBranch","BankAccountType","SelectFormField","BankAccountCurrency","BankAccountIsDepositInterest","BankAccountFundIncomesOnly","BankAccountObs","BankAccountStatus","Archives","ArchiveBlob","BeneficiariesTab","editHolder","Holder","compareHolder","h","PersonId","deleteHolder","holder","isPhysical","AccountIsPhysical","refHolder","PersonName","HoldersRelationship","CheckFormField","initialValue","isMainHolder","AccountHolderIsBeneficiary","HoldersRelationshipJuridical","HoldersIsController","HoldersIsManager","PersonType","HoldersOrderManaged","HoldersOrderWritten","chagedColor","HoldersOrderWeb","HoldersOrderViaLink","DocumentsTab","editDocument","AccountArchives","compareDocument","AccountArchiveId","AccountArchivesTemporalFileId","AccountArchivesName","AccountArchivesExtension","AccountArchivesBlob","AccountArchivesTypeDescription","AccountArchivesSubTypeDescription","AccountArchivesEnabled","AccountArchivesExpirationDate","GroupsTab","AccountGroupId","DeleteGroup","AccountGroupName","AccountGroupValue","HoldersTab","AccountHolderPersonType","editInstruction","Instructions","compareInstruction","AccountInstructionType","AccountInstructionsCurrency","DeleteInstruction","Instruction","refInstruction","AccountInstructionCurrencyISO","AccountInstructionTarget","AccountInstructionAssetticker","AccountInstructionBankAccountName","AccountInstructionMin","AccountInstructionMax","InvestmentProfileTab","editInvestExp","InvestExperience","compareInvestExp","exp","InvestExperienceId","inv","investExp","refInv","InvestExperienceDescription","InvestExperienceE","InvestExperienceQ","InvestExperienceM","KYCConstants","StockMarketKnowledge","Nothing","Good","Expert","CustomerLink","Option1","Option2","Option3","Option4","Option5","Option6","CustomerRelatedSince","NewCustomer","LessThan3","Between3And10","MoreThan10","editKYC","compareKYC","refKYC","AccountKnowledgeStockMarket","AccountInvestBonds","AccountInvestStocks","AccountInvestFunds","AccountInvestOthers","AccountKYCCustomerLink","AccountKYCCustomerLinkSpecify","AccountKYCCustomerRelatedSince","AccountKYCCustomerProfessionName","AccountKYCAnualIncome","AccountKYCEstimatedAmount","AccountKYCAmountMaximumCustody","AccountKYCAmountDepositedStocks","AccountKYCAmountRetiredStocks","AccountKYCQuantityDepositedStocks","AccountKYCQuantityRetiredStocks","AccountKYCComments","AccountKYCManualHighRisk","PersonalReferencesTab","editPersonalReference","PersonalReferences","comparePersonalReference","AccountPersonalReferenceId","reference","AccountPersonalReferenceName","AccountPersonalReferencePhone","ProfileTab","refAccount","AccountCurrencyId","AccountCurrencyISO","AccountCompanyLinkId","AccountCompanyLinkName","AccountAutomaticCreditSink","AccountAutomaticCreditCoupon","AccountAsksCustody","AccountUseMarkUP","AccountEmail","AccountWayGiveOrders","AccountBookInfo","AccountUsage","AccountFoundsOrigin","QuestionsTab","editQuestions","Questions","NewAnswerId","compareQuestions","question","QuestionDescription","Answer","AnswerId","AnswerDescription","AnswerIsResponse","RelatedAccountsTab","editRelatedAccount","RelatedAccount","compareRelatedAccount","RelatedAccountId","DeleteRelatedAccount","relAccount","refRelAcc","RelatedAccountName","RelatedAccountNumber","CustodianEntityName","SignatureSetsTab","editSignatureSet","SignatureSets","compareSignatureSet","SignatureSetId","SignatureSetWayOfAction","signatureSet","refSet","SignatureSetPersonName","SignatureSetPersonId","SignaturePeopleSelected","SignaturePersonName","ArchivesTab","editArchive","compareArchive","PersonArchivesHasExpirationDate","PersonArchiveId","PersonArchivesTemporalFileId","PersonArchivesName","PersonArchivesExtension","archive","PersonArchivesBlob","PersonArchivesTypeDescription","PersonArchivesSubTypeDescription","PersonArchivesEnabled","PersonArchivesExpirationDate","PhysicalPersonDocumentTypeId","compareDoc","Physical","PhysicalPersonFirstName","PhysicalPersonFirstLastName","JuridicalPersonLegalName","PhysicalPersonDocumentNumber","PhysicalPersonDocumentTypeName","PhysicalPersonDocumentIsMain","PhysicalPersonDocumentExpirationDate","PersonDocumentIssueCountryName","changedExtendedData","PersonExtendedData","Instance","renderExtensionGroup","extensionGroup","ExtensionGroupId","ExtensionGroupInternal","ExtensionGroupMultipleSelection","instance","ExtensionInstanceId","getValue","getExtensionItemDescription","ExtensionGroupType","ExtensionInstanceText","Item","ExtensionItemId","ExtensionItemDescription","editFiscalResidence","PersonFiscalResidence","compareFiscalResidence","PersonFiscalResidenceId","fiscalResidence","refFiscalResidence","PersonFiscalResidenceCountryName","PersonFiscalResidenceTaxId","DocumentTypeId","DocumentTypeName","PersonFiscalResidenceTaxIdName","PersonFiscalResidenceTin","PersonFiscalResidenceNoTINOpt","OptionsWhyWithoutTIN","PersonFiscalResidenceDateFrom","PersonFiscalResidenceDateTo","PersonFiscalResidenceAddress","PersonFiscalResidenceNoTINSpecify","JuridicalPersonProfile","showPerson","PersonIsMinimal","desc","JuridicalPersonConstDate","JuridicalPersonConstPlace","JuridicalPersonDocumentTypeName","JuridicalPersonTAXId","JuridicalPersonSecurityNumber","JuridicalPersonIssuePlace","JuridicalPersonRegFinalBeneficiaries","PersonEmail","PersonCompanyLinkId","PersonCompanyLinkName","PersonProfessionId","PersonProfessionName","PersonActivitySectorId","PersonActivitySectorName","PersonAnualIncome","PersonAnualExtraIncome","JuridicalPersonSocietyTypeDescription","PersonStatus","PhysicalPersonFiscalResidence","PhysicalPersonLegalAddress","showLegalAddress","editLegalAddress","compareLegalAddress","LegalAddressId","legalAddress","refLegalAddress","LegalAddressCityName","LegalAddressStateName","LegalAddressCountryName","LegalAddressStreet","LegalAddressNumber","LegalAddressType","LegalAddressZipCode","LegalAddressExtraInformation1","LegalAddressExtraInformation2","PersonBankAccount","PersonBankAccountItemId","PersonBankAccountName","PersonBankAccountPersonalName","PersonBankAccountHolders","PersonBankAccountBranch","PersonBankAccountNumber","PersonBankAccountType","PersonBankAccountCurrency","PersonBankAccountIsDepositInterest","PersonBankAccountFundIncomesOnly","PersonBankAccountObs","PersonBankAccountStatus","PersonKYC","KYCDate","KYCReason","KYCAdvisorComments","PhonesTab","editPhone","comparePhone","PhoneId","phone","PhoneType","PhoneNumber","PhysicalPersonLegalInfo","PersonExtraIncomeVolume","PersonQualification","PhysicalPersonPatrimonyId","PhysicalPersonPatrimonyDescription","PhysicalPersonPublicPositionId","PhysicalPersonPublicPositionName","PhysicalPersonLinkId","PhysicalPersonLinkName","PersonLinkPublicPositionId","PersonLinkPublicPositionName","PhysicalPersonInstitution","PhysicalPersonWebUser","PhysicalPersonWorkHistoryActivities","PhysicalPersonWorkHistoryYears","PhysicalPersonWorkHistoryRelevantPosition","PhysicalPersonWorkHistoryIncome","PhysicalPersonProfile","PhysicalPersonGender","PhysicalPersonSecondName","PhysicalPersonSecondLastName","PhysicalPersonEmail","PersonPassedAwayDate","getLocalDate","PhysicalPersonDateOfBirth","PhysicalPersonCountryOfBirthName","PhysicalPersonCityOfBirthName","PhysicalPersonCivilStatus","SpouseFirstName","SpouseSecondName","SpouseFirstLastName","SpouseSecondLastName","SpouseDocumentTypeName","SpouseDocumentNumber","SpouseDocumentCountryOfIssueName","PhysicalPersonPositionIndustry","PhysicalPersonWorkingIndustry","PersonRelatedFrom","PersonObservations","PersonCurrencyType","PersonProfileTab","editPerson","comparePerson","ShareHoldersTab","editShareHolder","ShareHolder","ShareHolderId","shareHolder","ShareHolderPersonType","ShareHolderPersonName","ShareHolderRelationshipDescription","ShareHolderParticipationPercentage","PersonQuestion","questions","changedQuestions","qIndex","questionToCompare","elemento","QuestionId","PersonAnswer","aIndex","check","defaultChecked","handleChangeAnswer","question1","question2","obj1","getTargetTypeName","TargetType","Juridical","All","CivilStatus","Single","Engaged","Married","Divorced","Widower","PhysicalPersonRelationshipAccount","Attorney","Beneficiary","PhysicalPersonRelationshipAccountJuridical","Representative","WebAuthorized","DocumentType","DNI","Passport","IdentityCard","AccountComparer","setModifications","setAccount","setPerson","setCurrencies","setClosing","alertReducer","defaultState","initialize","modalError","setModalError","ui","alertEv","fetchAlert","fetchs","alertEvent","parseAlert","refTag","modifications","sector","AccountGetInfo","GetAccountDataId","GetAccountDataType","SDTAccount","fetchAccount","personId","personInfo","fetchPerson","handleClose","eventIN","updateAlert","toggleModalError","user","maxWidth","getComplianceAlertFile","accountChangeType","updateAccount","updatePerson","updatePersonDocuments","updatePersonPhone","updatePersonShareHolder","aux","fetchUpdatePersonLegalAddress","updatePersonFiscalResidences","fetchPersonKYC","fetchUpdatePersonBankAccount","fetchPersonSuitability","fetchUpdatePersonExtendedData","extendedData","monthsToAdd","addDay","daysToAdd","getBalanceTypeName","BalanceTypes","getBalanceTypeValue","lockDate","hasLockDate","loadingUpdateDate","messageDisplay","fetchAlertFull","hasExpirationDate","expirationDate","accountPersonRelationship","relationship","accountsRelated","fetchAlertAntiClientDetails","clientId","listCheckId","details","antiClientDetails","fetchPersonInfo","childAlert","downloadFile","Summary","loadingAlert","personType","typeAlias","relateds","alertId","reftag","trigger","markFalseCoincidence","falseCoincidenceListCheck","dataRelated","getAllFiles","requestClosure","closedAccountDate","closedAccount","send","fileTypes","downloadPdf","updateStatus","falseCoincidenceCheckList","falseCoincidenteCheckList","closeAccountAlert","clientInfo","mergePeople","callApi","class","NewPost","addToHistory","updateGrid","posts","PostList","close","r2","aria-label","hideDelete","deleteFile","setSend","setFileTypes","sents","setSents","addToAccount","sendProps","alias","types","SDTGetArchivesTypes","ArchivesTypes","ArchivesSubTypes","eventId","eventHistoryId","eventHistoryFileId","overlay","btn","selectedType","setSelectedType","sending","setSending","background","ArchiveSubTypeId","ArchiveSubTypeDescription","subTypeId","SLIDE_DOWN","changingStatus","setChangingStatus","setDescription","setFiles","setCurrentDate","interval","setInterval","clearInterval","newpost","float","statusCompliance","rows","borderColor","inputFile","multiple","addedFiles","handleFilesUpload","filesFD","FormData","tzOffset","getTimezoneOffset","getTime","post","wordWrap","wordBreak","timeZone","smFile","RelatedDDown","openChildAlert","paddingRight","loadingCloseAccount","SetLoadingCloseAccount","showMessageCloseAccount","SetShowMessageCloseAccount","setROS","setInfo","updateKYCStatus","setUpdateKYCStatus","newInfo","checkFalseCoincidence","falseCoincidence","complianceEventid","closeAlert","getJournalEntryId","linea","partes","alertToROS","summary","getPersonTypeName","related","ListGroup","flush","ListGroupItem","part","part2","startsWith","endsWith","PhysicalPersonMainDocumentNumber","Relationship","investorProfile","btnRelated","ButtonGroup","personFromPershing","setPersonFromPershing","personFromSystem","setPersonFromSystem","personFromPershingFullName","setPersonFromPershingFullName","personFromSystemFullName","setPersonFromSystemFullName","matchingFields","setMatchingFields","merging","setMerging","equalDocumentType","setEqualDocumentType","personToKeep","setPersonToKeep","personToMerge","setPersonToMerge","getMatchingFields","checkSameDocumentType","docPershing","docSystem","PersonDocumentIssueCountryId","PersonDocumentTypeId","maxHeight","overflowY","personToMergeId","personToKeepId","profileLines","mergeDeep","processAlertUpdate","processUpdateLoading","processToggleChildAlert","processChildAlertSuccess","processChecklistFalseCoincidence","processChangeFields","Dispatch","createContext","addedData","validations","alertSimpleReducer","globalReadOnly","fetchProcesses","persons","validateForm","alertProps","_value","resolve","SdtPersonSearch","len","SdtOutPersons","collection","PersonLegalName","filteredProcesses","SdtComboCollection","enum","entry","autosuggestId","forceUpdateValidation","processUpdateButtons","compareStringsCaseInsensitive","str1","str2","localeCompare","sensitivity","processProps","setProcessProps","responsing","setResponsing","modalOpen","setModalOpen","modalAuthListOpen","setModalAuthListOpen","notes","setNotes","handleOpenModal","notesLoading","setNotesLoading","handleOpenModalAuthList","getProcessContext","accepted","canContinue","rejected","responseAuth","clearState","SubTitle","box","flex","processedAt","hasRelatedAuthorizations","OrderType","AuthorizationList","OrderId","getAuthorizations","auth","hideAvg","ProcessContext","getIconName","setItems","auths","validation","collateral","CollateralMargin","CollateralQuantity","CollateralAppraisal","CollateralMaturity","CollateralStatus","CollateralPositionItem","collateralPosition","onEdit","CollateralWarrantyItem","collateralWarranty","EmptyCollateralsWarranties","EmptyCollateralsPositions","custodyReducer","showCollateralWarranty","setshowCollateralWarranty","collaterals","products","collateralWarrantyItem","setCollateralWarranty","toDelete","setToDelete","toEdit","setToEdit","visible","CONFIRM","totalAvailable","deleteCollateralWarranty","toggleEdit","cw","ToEdit","form","Accountname","hideInstruction","hideHolder","Poolname","tabIndex","GCPoolRelated","getRelatedEntities","getEnabledStatus","GCPoolRelatedEntityId","floor","TotalAvilable","TotalRequiered","Margin","TotalAvailable","GCPoolTrackTransfers","OrderNote","btnAdd","addCollateralWarranty","sameDate","fetchSearchSymbol","precheck","fetchUpdateCollateral","gcpool","updateCollaterals","ButtonContainer","validationHeader","Accountnumber","showErrors","setShowErrors","totalRequired","fieldsToChange","validateFormHeader","EDIT","formContainer","isCurrency","PRECHECK","OrderQuantityIsCash","Collateral","CollateralId","decimal","symbols","hiddens","modify","processEdit","processPrecheck","processConfirm","collateralwarrantyitem","processSetCustody","processSetInitialsReadOnly","indexCollateral","addCollateralWarrantyToCollateral","collateralWarrantyI","setCollateralWarranyItem","processChangeFieldsCollateralWarrany","changeButtonProps","retriveAsync","TrackTransfers","allInternalStatus","newE","toggleEvent","searchEvents","EventSimpleReducer","Corpevent","setEvent","custodyProp","setCustodyProp","setCustody","accountProp","setAccountProp","auxaccount","setAccountAux","custodyaux","setCustodyAux","wizzard","setWizzard","errorbook","seterrorbook","setLabel","downloading","setdownloading","labelsett","labelcomm","labeltax","currencypairs","setCurrencyPairs","isFundsXSystem","setIsFundsXSystem","CorporateEventId","fetchGetCorporateEventSingle","corporateeventid","custodyProp1","IsProp","custody1","account1","accountProp1","FootPrintCredit","FootPrintDebit","item2","isFundManagerSistem","parametersData","fetchCurrencies","onChangeCurrencyDate","CorporateEventSettlementCurrency","CorporateEventCommissionCurrency","CorporateEventTaxCurrency","onChangeGrid","cd","cp","accountnum","EventCashCustAccountId","EventCashCustAccountName","PortfolioTotalPropClient","PortfolioTotalNoPropClient","PortfolioTotalProp","PortfolioTotalNoProp","WithholdingPropClient","CommissionPropClient","TaxPropClient","FeePropClient","EventAccountBaseForTax","BasePropClient","EventAccountModified","WithholdingProp","CommissionProp","TaxProp","FeeProp","BaseProp","WithholdingNoPropClient","CommissionNoPropClient","TaxNoPropClient","FeeNoPropClient","BaseNoPropClient","WithholdingNoProp","CommissionNoProp","TaxClientNoProp","FeeClientNoProp","BaseNoProp","TaxNoProp","FeeNoProp","onChangeCurrency","baseCurrency","iso1","BookDate","fetchCurrencyFX","targetCurrency","fx","fxclient","FX","divides","iso","corpevent","CorporateEventTaxPercentage","RecordDate","CorporateEventWithholdingP","FootPrint","fetchRecalculateEvent","re","oldState","sendEvent","CorporateEventReleased","fetchExecuteEvent","recalculateBeforeSend","removeCustody","propia","indexCorp","accountaux","addCustody","paracambiar","added","concatData","client","custodies","clientdata","accountPortfolio","Footprints","rounded","EventAccountIsCurrency","Footprints2","custodydata","headeritem","book","record","isin","AssetIsin","settcurrency","settcurrencyfx","commcurrency","commcurrencyfx","taxcurrency","taxcurrencyfx","clients","corporateEventXLSX","bookerror","CorporateEventWarning","font-weight","background-color","rep","CouponNumber","paddingLeft","fetchSearchBankProp","fetchSearchBank","fetchSearchAccountProp","load","fetchDeleteCorporateEvent","saveEvent","loadingHolders","holders","requestAccountHolders","_isMounted","HolderId","HolderName","onChangeAccountHolder","sendingAccountId","fetchSearchTransfer","holderItem","getItemById","fetchAccountHolders","_holders","isMain","IsMain","selectedHolder","holderId","defaultAccountValue","modalerror","setmodalerror","taxing","pro","Coldebit","Colcredit","paddingBottom","EventBalanceType","custodyObj","isCashCustodianDifferent","InitializeValues","Debit","editClearingHouse","processChangeClearingHousesFields","closeClearingHouse","AddClearingHouses","EditClearingHouseId","SaveEditClearingHouse","ChangeAccountType","SentAuthorization","ResetClose","actualstatus","dropdownMonthOpen","counterparties","loadingCP","custodians","loadingCU","loadingGP","topMonthSelected","faillings","selectedCP","selectedCU","counterpartiesSuggested","searchBar","openCounterParty","loadingCountry","countries","clearinghouses","countriesloading","clearinghousesloading","callApiProxy","Flag","AddNew","graphicdata","setGraphicdata","fetchCounterPartyRank","handleChangeTop","newTop","fetchCounterPartyTrades","counterParty","from","trades","day","month","fecha","getMostFaillings","handleChangeRange","onClickClose","editCounterParty","counterPartyId","InputGroupAddon","addonType","fetchAutoSuggestCounterParty","textOverflow","overflow","whiteSpace","handleSelectSearchCounterParty","getCountryCounterParty","getClearingHouseCounterParty","clearingHouses","ChartsCounterParty","selectCP","inline","monthNames","legendMonth","series","tooltip","formatter","legend","xAxis","boundaryGap","yAxis","creditLine","Limits","Progress","failingnumber","falingUSDYOY","tradesUSDYOY","TradeId","TradeBasicAccountId","TradeAssetTicker","labelSide","TradeSide","TradeQuantity","TradeAvgPrice","TradeDaysDiferenceFailing","CounterPartyEmail","CounterPartyLimit","CustodianEntityId","CounterPartySimpleReducer","counterparty","clearinghouse","editClearingHouseId","conf","sentAuthorization","custodianEntity","custodianEntityId","isEditCustodianEntity","openCustodianEntity","validCounterParty","setValidCounterParty","custodianEntities","limit","email","clearingHouse","CounterPartyStatus","country","bottom","sentCounterParty","counterPartyIn","CloseCustodianEntity","entityId","RechargeCustodianEntity","LoadingCounterParty","ConfirmCounterParty","SentAuthorizationUpdate","GetCustodianEntity","SetCounterParty","OpenCustodianEntity","DefineCustodianEntityId","CounterPartyId","settlementins","saveEditClearingHouseId","saveEditClearingHouseCode","processFields","DefaultClearingHouses","clear","clearingHouseId","clearingHouseCode","clearingHouseSettlementInstructions","clearingHouseDefault","EditCustodianEntity","SetErrorsCounterParty","totalerror","clearing","Decription","counterPartyOut","localDateToGMT","CommonsHelper","RepoCross","contractdata","calculatingLegs","handleChangeContractData","handleChangeAppraisal","handleChangeHaircut","handleChangeClosingLeg","maxDecimals","CollateralAssetTicker","appraisal","allowNegative","marketValue","maturity","rate","paymenttoborrower","couponPayments","DateAndCrossingType","valueDate","tradersNames","enabled","onChangeType","onChangeValueDate","tradingRoutes","onChangeTradingRoute","tradingRouteSelected","onHandleSelectedTrader","selectedTrader","showTraderName","crossingType","gridContainer","TradingRoutes","TradingRouteId","tradeRoutes","AccountsField","error_account","mb","borderTop","FooterTotals","footerTotals","crossingQuantity","crossingAverage","buySide","sellSide","filterOrders","orders","Fees","fees","feesContainer","feeItem","FeeAmount","setAccounts","setConfirm","setTotals","setFx","manualFX","setManualFX","setValueDate","setType","setError","settlementCurrencies","setSettlementCurrencies","setMaxDecimals","parValue","setParValue","setContractdata","setClosingLeg","allowSelection","setAllowSelection","setCalculatingLegs","showFees","setShowFees","sideStr","accountsSelected","setAccountsSelected","isFX","setIsFX","setBaseCurrency","priceCurrency","setPriceCurrency","hasDifferentCurrencies","setHasDifferentCurrencies","loadingItem","setLoadingItem","debItems","useDebounce","itemsFees","setItemsFees","setFirst","setTradingRoutes","setTradingRouteSelected","setTradersNames","setSelectedTrader","setshowTraderName","paymentToBorrower","setPaymentToBorrower","pending","newHasDifferentCurrencies","OrderCurrencySymbol","OrderSettlementCurrencySymbol","getBaseAndPriceCurrencies","newFilteredOrders","getRepoDefaultPaymentToBorrower","getTradingRoutes","trader_name_input","TRADER_NAME_INPUT","getAuthorizedTraders","newTotals","calcTotals","fetchGetCalculator","isSecurity","res2","ExecutionTotal2","crossType","ExecutionValueDate","ExecutionTotal","OrderSettlementCurrencyId","getExecutionFees","promises","itemFee","getAccounts","getSettlementCurrencies","currentItem","handleGetLegs","authUsers","getRepoDefaultPaymentsCorrespondent","newAccounts","fetchTradingRoutes","sorroutes","logs","keyvalues","uniqueRoutes","preferredRouteId","betterPreference","preference","updateValueDate","updateFX","fetchOrderAssetInfo","tradeDate","orderForm","tradeCurrencyId","OrderCurrencyId","settleCurrencyId","assetorderdata","settlementCurrency","currencyInfo","toggleItem","itemId","resolveQty","fetchChangeOrderStatus","promiseAck","OrderAction","ACK","ackRes","sumQty","sum","presult","orderPrice","OrderPrice","OrderStopPrice","error_price","error_quantity","selectedOrder","mainOrder","newContractdata","ContractType","term","OrderTerm","RefAssetid","CollateralAssetid","fetchGetAssetQuote","assetquote_in","assetid","assetquote_out","changeItem","prevItems","isBuy","isCash","isRepo","totalQtyPendingOrders","totalQtyCross","totalQtyMultPrice","order2","order2PendingQty","sideOrder","sideCross","fetchGetOpeningAndClosingLegs","newLegs","openingleg","marketvalue","cashflow_outs","adjusted","minHeight","Switch","change","showOwnFeesLink","buy","sell","_items","hasItems","newError","OrderPriceType","LIMIT","STOPLIMIT","dateAux","orderIsCash","newErrors","fetchAddExecutions","propExecution","ExecutionTrader","payload2","fixedItems","auxExecution","contractCounterParty","executionToAdd","fxMultiplies","settleCurrencyInfo","multiplies","refOrderId","OrderItemUI","OrderDetail","OrderAdvisorName","OrderTraderName","bottomRow","verticalAlign","showQuantity","setShowQuantity","showPrice","updateValues","component","loadingCbox","arroba","priceDisabled","showFeesLink","bounce1","bounce2","bounce3","arr","crossReference","setCrossReference","setProcesses","getProcesses","getCrossReferenceSearch","fromRow","crossReferences","changeProcess","buttonFormat","modifiers","setMaxHeight","data-id","temp","cross","rowStyle","data-process","validationsCustodianEntity","LegalInstitutionCode","LegalCustodianCode","CustodianEntityPendingLimit","CustodianEntityTAXId","CustodianEntityReducer","defaultStateEntity","initializeCustodianEntity","custodian","openCustodianEntityContact","openCustodianEntityClearingHouse","openCustodianEntityCodeType","EditClearingHouse","EditCodeType","EditContact","loadingConfirmCustodianEntity","messageConfirmCustodianEntity","messageErrors","setMessageErrors","onChangeUpdate","CustodianEntityAddress","CustodianEntityURL","CustodianEntityTaxDocument","taxDocument","CustodianEntitySwift","CustodianEntityIntroducedBy","CustodianEntityReference","alignCombo","CustodianEntityIsExchangeListed","CustodianEntityHasInvestmentGrade","CustodianEntityIsBank","CustodianEntityNotes","openContact","setContact","contacts","Contact","updateContact","deleteContact","openClearingHouse","setClearingHouse","ClearingHouse","updateClearingHouse","deleteClearingHouse","openCodeType","setCodeType","CodeTypes","CodeType","updateCodeType","deleteCodeType","ValidateCustodianEntity","validationsClearingHouse","CustodyClearingHouseCode","EmptyClearingHouses","indexContact","custodianClearingHouse","onChangeClearingHouse","CustodianEntityClearingHouseStatus","ClearingHouseId","clearingHouseNames","alignItems","CustodyClearingHouseIsDefault","CustodianEntityStatus","CustodyClearingHouseSettlementInstructions","ValidateClearingHouse","confirmClearingHouse","CustodyClearingHouseChangeType","IndexEditClearingHouse","ClickEditClearingHouses","ClickDeleteClearingHouse","validationsCodeTypes","CodeTypeId","CodeTypeValue","EmptyCodeTypes","custodianCodeType","CodeTypeNames","onChangeCodeType","CodeTypeName","unique","ValidateCodeTypes","confirmCodeType","CodeTypeChangeType","IndexEditCodeType","ClickEditCodeType","ClickDeleteCodeType","validationsContact","CustodianEntityContactName","CustodianEntityContactEmail1","EmptyContact","custodianContact","onChangeContact","CustodianEntityContactType","contactTypes","CustodianEntityContactEmail2","CustodianEntityContactTel1","CustodianEntityContactTel2","FixPaddingCol","CustodianEntityContactTicketConfirmation","CustodianEntityContactNotes","ValidateContactForm","confirmContact","IndexEditContact","ClickEditContact","ClickDeleteContact","SetCountries","SetTaxDocument","SetCustodianContactType","SetCustodianClearingHouse","SetCustodianCodeType","forceUpdateValidationContact","SetContact","SetClearingHouse","SetCodeType","GetClearingHouse","GetCodeType","UpdateClearingHouse","UpdateCodeType","DeleteClearingHouse","DeleteCodeType","GetContact","UpdateContact","DeleteContact","resetClearingHouse","resetCodeType","resetContact","getCustodianEntity","resetCustodianEntity","CustodianEntityLogo","CustodianEntityFileType","CustodianEntityContactChangeType","clearingHouseName","CustodianEntityClearingHouseCodeChange","processChangeContactFields","processChangeClearingHouse","processChangeCodeType","countryId","countryName","contactType","custodianType","OldCodeTypeId","OldCodeTypeName","lastClearingHouseCode","ClearingHouses","lastCodeId","CustodianEntityCodeTypeChange","CustodyCodeTypeChangeType","CustodianClearingHouses","CustodianCodeTypes","CodeTypeDelete","Contacts","codeTypes","assetHasDenomination","denominationUsed","hasdenomination","setAssetPhysicalDenomination","denominationsUsed","setDenominationsUsed","custodyHasDenomination","setHasDenomination","fetchGetCustody","fetchGetAssetInformation","custodyLockReleaseId","getDenominationsByCustodyLock","getAvailableDenominationsByAccount","onChangeDenomination","denominationResult","denominationAdd","updatedDenomination","externaldate","docreference","fileList","fetchCustodyPdf","noLabel","border","isChecked","custodysdt","fetchUpdateCustody","k2btrnmode","updateCustodies","setDisplayMessage","todayDate","accountnumber","tradeIsAlreadyConfirmed","skipItems","emptyItem","currencyNumber","imputableAccountId","imputableAccountName","imputableAccounts","currencySelected","k","currencySelectedISO","currencyIso","filterImputableAccounts","bookType","BookTypes","setEdit","openEdit","deletedItem","currencyAccounts","it","imputableAccount","allItems","LoadingWrapper","custodyRateTable","titleRef","useRef","CustodySimpleReducer","fundManager","setFundManager","errorMsg","setErrorMsg","FundId","FundName","fund","setFund","dialogMode","globalError","initialized","custodianEntityName","rateRanges","nextMode","CustodianRelatedAccountId","fundCode","fundName","onChangeFund","isEditing","accountType","loadingCustodianEntity","UpdateFields","loadingImputableAccounts","loadingCurrencies","CustodianMoneyMarketRate","CustodianMarginRate","CustodianMoneyMarketRateMin","fetchGetFunds","custodiesCash","custodiesValues","isLocalBank","feeSchema","validateErr","onSetCustody","current","scrollIntoView","focus","CustodyRateRangesPositiveRate","CustodyRateRangesNegativeRate","CustodyRateRangesMax","CustodyRateRangesMin","validateRanges","newRange","CustodyRateRangesLineId","updatedItems","maxCustodyRateRangesLineIdItem","maxItem","setSuggestions","getCustodyName","inputValue","getSuggestions","isProp","clearingHouseItem","currencyImputableAccount","processLoadForEditCustody","processChangeDialogMode","Countries","entity","EnvironmentSign","leftPad","ReactDOM","createPortal","opacity","pointerEvents","getElementById","getClassTitle","routesLogs","row","_state","Execution","changeValues","call","updateSettlementDate","delayedUpdateFilterValue","delayedFilter","orderId","relatedOrder","fetchAddExecution","ExecutionFXMultiplies","qtyPending","calculateAvailableQty","setTradeRoutes","getTradesAllowedTimeSpan","getTradesTimeSpan","minTradeDate","startingTime","maxTradeDate","endingTime","restricted","useValueDate","isFXOrder","ExecutionFX","newExecution","isWritten","callback","fetchRemoveExecution","executionId","handleGetFees","handleGetCollateralPrice","calculatingPrice","onChangeCollateral","handleSelectedTrader","calculatingTotal","newSymbol","fetchCurrencyFXbyDate","saveEntities","isLoading","getEntities","prevOrder","prevExecution","applySetDefaultExecTime","tradeDateStartTime","tradeDateEndTime","inputRef","tradeDateStartTimeHasValue","isValidTimeString","tradeDateEndTimeHasValue","newTradeDate","previousExecutionDate","shouldApplyDefaultTime","time","setHours","hours","minutes","blur","timeString","timeStr","hasChangedTime","getHours","getMinutes","hasChangedInitialTime","applyMarkupTrader","fetchSearchRepoSymbol","fetchYahooOptions","enabledLT","OrderLowTouchEnabled","quantityIsCash","tradeRoutesLogs","availableQty","executedQuantity","Childs","ChildOrderQuantity","ChildOrderPrice","Executions","exec","ChildOrderId","ChildProcessingMode","ProcessingMode","HighTouch","pendingQuantity","isManualAndActive","OrderIsAutomatic","OrderIsActive","EXPIRED","cashInfo","content","ExecutionFXRoute","ExecutionMarkupPrice","CounterpartySuggest","counterpartyId","counterpartyName","fetchItems","fetchCParties","onChangeTradeDate","AssetSecurityProvider","attrId","attrTicker","attrDescription","attrProvider","searchRepoSymbol","getYahooOptions","hideInfo","customFetchAssetInfo","sendingExecsIdsLoading","loadingSendExecsIds","onSendExecutionToBO","minimumFractionDigits","cashQuantity","currentDate","ExecutionCashQuantity","calculateTotal","initValues","BrokerId","sharesQuantity","ExecutionDateAux","ExecutionValueDateAux","ExecutionDateAux2","minExecutionDate","maxExecutionDate","toLocaleTimeString","newExecutionDate","totalPrice","differencePrice","orderStats","clientPrice","side","markupType","markup","isDiscount","sideSign","CommissionType","FaceValueCash","clientRate","accountProps","hasAttachment","HasFileUploadPending","uploadPending","AttachmentFileType","commissionSuffix","commissionType","currencySymbol","PrincipalPercentage","prefix","assetInfoData","OrderFutureSettlmentDate","fixedValueDate","ProductType","REPO","customFetchAccountInfo","updateOrderValues","fetchTasks","accountInfo","commissionInfo","taskResults","kvpItems","History","histories","OrderInlineDetail","ExecutionsTable","subtitle","HistoryType","HistoryId","HistoryUserName","HistoryDateTime","HistoryDetails","balance","FileList","plus100","setplus100","root","add","upload","tooltip-position","hasError","error2","ReadOnly","isLocal","localINTLRO","oneSide","localINTL","off","FOREX","LocalINTL","SimpleSuggest","useContext","onChangeMode","ioMode","ind","primerFetch","setPrimerFetch","setBalance","setDenominationsItem","denominationsDeposit","setDenominationsDeposit","denominationsReturn","setDenominationsReturn","assetDenominationInfo","setAssetDenominationInfo","segundoFetch","setSegundoFetch","cleanedErrors","GetDenominations","WithdrawId","DepositId","TransferId","responseDenominations","currentItemDenominations","obj2","DenominationsTotal","fetchAccountSellingPower","sellingpower","SlotsQuantity","denominationsTrue","DenominationsDeposit","onChangeDenominationDeposit","accountBanks","ABASWIFT","IntermediaryBank","IntermediaryABASwift","justifyContent","DepositValidations","WithdrawalValidations","RedemptionValidations","SubscriptionValidations","TransferValidations","simple","subForm","updateAccountBanks","fetchGetAccountBanks","isBulk","isThirdPartyAccount","BankAccountIsThirdParty","CustodianName","BankAccountId","ChequeNumber","ThirdPartyCountryName","permissions","allowValues","allowCash","simpleItem","readOnlyTypeSelector","accountEmpty","currencyEmpty","onChangeHeader","fundIncomesOnly","ThirdPartyPersonName","fetchAccountBuyingPower","buyingpower","onChangeItem","checkSettlementDate","tradedate","GetAssetSettlement","executeSettlement","DefaultSettlement","settlementvalue","getdata","ist0","settlement","GetIOSettlementDate","SettlementDate","settlementday","darken","header_IsCurrency","SimpleItemId","checkPrice","simple_CurrencyISO","simple_AssetTicker","simple_Quantity","header_Price","header_AccountNumber","header_AccountName","header_HolderName","fetchDownloadIOFile","fetchSearchCustodian","CustodianId","header_TransferType","header_BankAccountIsThirdParty","fetchSearchCustodianEntity","header_BankAccountName","header_BankAccountNumber","header_ThirdPartyPersonName","header_Quantity","header_ThirdPartyIdentificationNumber","ThirdPartyIdentificationNumber","fetchSearchCountry","header_ThirdPartyCountryName","ThirdPartyCountryId","header_ChequeNumber","hasDecimals","header_Commission","Commission","header_CommissionType","simple_Denominations","header_IntermediaryBank","header_CountryName","header_ABASWIFT","header_IntermediaryABASwift","isSubscriptionOrRedemption","transfersendingId","editingItem","transferreceivingId","DenominationsSlots","reasons","setReasons","fetchGetReasons","keyValues","inchange","header_CurrencyISO","header_AssetTicker","ReasonId","ReasonDescription","selectedIndex","Default","DepositBulk","InOut","toggleInfo","inOutReducer","executionRef","uploadFiles","ioId","newFiles","hasOwnProperty","fetchUploadIOAttachments","deleteFiles","removedItem","fileIds","DeleteFileIO","updIO","fetchUpdateIO","fetchChangeIOStatus","newStatus","parameter","getValues","Provider","EXECUTE","IOExecution","ioAccountsUpd","addedItems","changedItems","deletedItems","fetchUpdateIOAccount","ioaccounts","processName","refid","fetchAuthorizationCreate","resp","changeMessage","Precheck","waitingCounter","validateRules","ValidationProgram","fetchValidationsCheckRule","history","OverrridableByAuthorization","checkIfCanBeAuthorized","updateValidationStatus","vStatus","globalStatus","_validations","authorizationdefinitionid","authorizationDesc","fetchAuthorizeCheckIO","authorizationDescription","authorizationsdt","canbeauthorized","ValidationName","updateAuthorizationMessage","fetchRiskvalidations","getProcess","obj","NoPassConditions","PureComponent","Validation","getAlertColor","uiMode","others","processUpdateAccountBanks","processUpdateFiles","updatePrecheck","isNew","processEditBulkItem","processDeleteBulkItem","processChangeIOFields","processChangeIOItemsHeader","processChangeIOItem","newProps","forwardRef","useImperativeHandle","validateSecurities","securities","ModalInstruction","instruction","note","NotesRows","createdAt","createdBy","iconDelete","onAddRequest","onNoteRequest","onRemoveRequest","closeModalNote","setNote","prevNotes","tableNote","noteDate","filteredNotes","OldNote","addNote","deleteNote","balanceReady","contextType","Context","loadingBalance","instructions","sendingMail","requestAccountInfo","downloadAttachment","attachContent","orderPdf","attachmentDisabled","AccountType","RequiresSpecialCustody","Markup","MarkupType","FXMarkup","FXMarkupType","CurrentInfoDate","AssetPriceIsDiscounted","OrderAllowsMarkup","context","custodyHidden","markupHidden","FXMarkupHidden","commissionHidden","custodyReadonly","MMARKET","modHiddens","currentDay","Day","AssignedQty","ExecutionsAvgPrice","ExecutionsAvgFX","currentDayIsReadOnly","isExistingAccount","modReadonly","canResend","canResendAuthorizations","hideHolders","quantities","quantityTitle","markupTitle","FXMarkupTitle","commissionTitle","isPartiallyBooked","ComType","commission","earningCategoryName","earningTypeName","earningsTitle","BOND","EQUITY","OPTION","MFUNDS","showClientPrice","showClientFX","originalPrice","originalFX","onChangeInstruction","onChangeOrder","setAttachment","onSetAttachment","hasFile","HasFile","onResendAuth","getCommissionItems","FXMarkupAllowed","searchAccount","currentInstruction","ins","instructionItem","accountorderdata","AccountInBalanceType","assetBalanceItem","modsOnAccount","AccountAssetBalance","accountHolders","HoldersOrderNO","HoldersOrderW","HoldersOrderV","HoldersOrderL","getInstructions","resendAuth","styleF","isDisabled","restProps","setUploaded","flexGrow","Requeriments","handleFileUpload","resetState","AttachmentFileName","AttachmentFileUploadPending","uploaded","onChangeText","endings","attachmentInServer","requeriments","pdf","pencil","ModalText","darkenStyle","memo","select","TimeForce","PriceType","FormSelector","Side","formatNumber","PriceField","MARKET","MARKETONOPEN","MARKETONCLOSE","STOP","StopLimit","typePrice","_label","getOrderTypeName","typeItems","withOpenClose","SideReadOnly","BuySellOpenClose","BuySell","OrderOpenClose","openClose","buySellOpenClose","itemBuy","itemSell","buySell","switch","data-on","data-off","chart","setChart","percent","serie","v0","v1","bonds","ISIN","replaceAll","MaxDecimals","Coupon","Maturity","imgUrl","DetailedPrice","oldValue","old","handleChgPriceDebounced","data_tmp","initialData","lastValue","ask","bid","last","wsOnReceive","changePrice","wsSubscribeSymbol","wsUnsuscribeSymbol","tablePrice","detailed","setPrice","fetch","chart1dUrl","json","trunc","average","equity","img","alt","src","_symbol","_onReceive","_socket","on","symbol","askPrice","bidPrice","lastSalePrice","reconnection","emit","BoxForex","tradeCurrencies","value2","tradeCurrency","itemsReq","setItemsReq","userRole","timeseries","Sparklines","SparklinesLine","range","settDate","Intl","DateTimeFormat","year","Options","fetchOptions","useOption","optionFields","getOptionFieldsFromTicker","contractSymbol","optionChain","expirationDates","calls","puts","strikes","strike","put","longName","buildRow","NumericItem","lastPrice","showInfo","showOptions","hideButtonOptn","GetOptions","toggleOptions","optionsMethod","defaultSymbolValue","timeForce","TimeFrame","TimeFrameIsSelectable","getTimeFrameName","GTD","GoStepBack","activeStep","footer","linkHelper","UncontrolledPopover","PopoverBody","helper","orderReducer","messageResponse","setMessageResponse","setVisible","availableClients","setAvailableClients","availableAdvisors","setAvailableAdvisors","setAssetPaymentRateFixed","assetTradesDirty","setAssetTradesDirty","assetName","setAssetName","assetIsQualified","setAssetIsQualified","OfferCleanPrice","setOfferCleanPrice","OfferOriginalPrice","setOfferOriginalPrice","postOffer","offer","OfferId","OfferQuantitytoAdvisor","OfferQuantitytoClient","OfferPrice","OfferOfferQuantityTakenByAdvisor","OfferQuantityTakenByClient","featured","OfferDate","sellingPower","balanceType","OfferMinimumtoClient","CurrentPrice","setOffer","minimum_to_clients","OFFER_MINIMUM_TO_CLIENTS","rates","rateSelected","setRateSelected","targetValue","setTargetValue","nominal","newOrderPrices","setNewOrderPrices","quoteId","onOrderAssetInfo","AdvisorQuantity","ClientQuantity","offerToSend","calculatorRequest","fetchPricesForOffer","sdtOffer","response1","response2","assetParValue","getPricesWhenTnaEqualsCoupon","dirtyprice","validateOffer","validOffer","NominalRate","XIRR","ClientMinimum","rateId","handleChangeRate","request","targetValueTNA","isTargetTNA","fetchCalculatorDataForOffers","calculator_out","goalSeekResponse","cleanprice","FormFeedback","switc","nextBtn","changeForm","processChangeOrderFields","processChangeOrderAccountFields","processAssetInfo","processAccountInfo","processExecute","editAccount","deleteAccount","selectAccount","wizzNextStep","wizzStepBack","newForm","OrderHierarchy","OrderIsBasket","OrderHasMultipleAccounts","formProps","defaults","OrderTimeInForce","GTC","OrderGTD","filteredCurrencies","newCurrency","moo","DAY","modFields","orderFields","IsFullLiquidation","isBasket","modifyLabel","precheckFailed","processConfirm_basket","processConfirm_bulk","confirmLabel","initFetchs","commissionDisabled","commissionValue","markupValue","FXMarkupValue","currentInfoDate","accountIsInOrder","isMultiaccount","EDIT_COMMISSION","itemsDict","defaultSettlementCurrency","availableSettlementCurrencies","CurrencyIsDefault","orderPropsUpd","multiAccount","merge","accountLevel","REALLOCATE","CurrentAccountId","Type","Cross","steps","OrderChainOffsetCash","OrderChainOffsetCurrencyId","Basket","Bulk","pendingServerUpdate","accountIndex","accountsUpd","nextIndex","actualState","nextLabel","copyProps","Chained","copyChainedOrderPropsNextStep","copyCrossOrderPropsNextStep","step1_order","step2","OrderIsSwitch","mergeFirstStepChangesToNextStep","readOnlyAssetForm","nextStep","typeName","switchProps","switchAccountProps","formDefaults","orderExists","tmpCurrentAccount","QUOTE","completed","AccountItem","onDownloadPt","disabledEdit","onDownloadFile","EmptyAccounts","canAddAccount","removeAccount","isReadOnly","canModifyComposition","nextAccountIndex","offerAdvisors","setOfferAdvisors","offerClients","setOfferClients","offerFeatured","setOfferFeatured","offerGetted","getOffer","offerM","offerLoaded","clearFields","loadOffer","onSelectAccount","discard","setOfferClientsF","editOffer","setOfferAdvisorsF","onDeleteAccount","editProps","Advice","userIsOwner","changeChecked","errorText","orderCanResend","accountCanResend","clientBankAccounts","selectedBankAccount","useCashAccount","accountIsJuridical","ownPositionAccounts","fetchOwnPositionAccounts","clientBankAccount","imgSource","differCommissionPayment","OrderAssetData","commissionPaymentHidden","FUTURE","DifferCommissionPayment","currentDayData","differCommissionPaymentTitle","ExternalAccountWrapper","getAccountsService","getUserExternalAccounts","logo","selectedAccount","selectedCash","onSelectedAccountChange","onCheckCashAccount","onChangeAvailableAccounts","n","HolderIsJuridical","balanceWithBooktype","isJuridical","changes","bankAccounts","maxSize","setMaxSize","uploadedFile","booktypes","onAccountChange","itemsBook","setItemsBook","itemsBalance","setItemsBalance","bookItems","BooktypeName","BooktypeFriendlyName","balanceItems","bt","BalanceTypeName","BalanceTypeDescription","selectedBook","showEdit","onEditClick","RepoSymbol","oldValues","editable","setIsEditing","SideReadOnlyRepo","BuySellRepo","repo","containerStyle","itemStyle","CurrencyPairDate","BoxRepo","onLoadAssetOrderData","assetInfoForm","setAssetInfoForm","AssetForm","updatePrice","handleLoadAssetOrderData","attrCurrency","SettCurrencyName","orderAssetData","goBack","fetchTotals","OrderAVPrice","OrderAVClientPrice","OrderTotalExecuted","AvgNominalRate","AvgXIRR","avg","avgWithMarkup","settleDate","avgNominalRate","avgXIRR","totalsLoading","Accrual","upfront","charge","defaultValues","filteredBankAccounts","noBankAccountSelected","AssetRefPrice","limPrice","stopPrice","HasOriginalOrReplacingData","OriginalOrReplacingData","borderBottom","sendDirtyPrice","parseQuantityIsCash","qType","isMultiAccounts","isFullLiq","maxPartialRedemption","refPrice","exceedPartialRedemption","orderDate","setOrderDate","isFundCloseType","OrderSettlementDate","isSwitchFirstOrder","wizzStep","FundX","isCall","expiration","strikePrice","setUpdateAccount","handleSymbolSelection","AssetInformation","securityAsset","newCollateral","AssetCurrency","updRepo","OffsetQuantity","Equity","EquityValidations","EquityDefault","Bonds","BondsValidations","BondsDefault","OptionsValidations","OptionsDefault","MFundsValidations","MFundsDefault","Forex","ForexValidations","ForexDefault","MMarketValidations","MMarketDefault","Repo","RepoValidations","RepoDefault","Future","FutureValidations","FutureDefault","goalSeekResponseInitialValue","cleanPrice","tir","dirtyPrice","targetTNA","setTargetTNA","setGoalSeekResponse","reachedStatus","setReachedStatus","abortControllerRef","abort","goalSeekRequestHandler","isTNAEqualsCoupon","controller","AbortController","signal","processTnaEqualsCoupon","goalSeekRequest","CleanPrice","TIR","sucess","onSearchAccount","onOrderDownloadAttachment","onAccountHolders","onOrderPdf","onOrderAccountInfo","onOrderCommissionInfo","onAccountRemove","onGetOffer","fetchGetOrder","onSearchSymbol","onSearchRepoSymbol","onGetYahooOptions","getRiskValidations","onRiskValidations","getTotalsAndEarnings","onTotalsAndEarnings","validateRule","onValidationsCheckRule","checkAuth","onValidationsCheckAuth","getForm","MFunds","MMarket","onChangeForm","setMessage","orderForms","setOrderForms","setNewSymbol","setBooktypes","getBooktypes","isTrader","newOrderForms","getProductTypeName","OffertoAdvisors","OffertoClients","cOrder","confirmCommission","formErrors","saveAttachments","reject","handleFileInput","onOrderAttachment","onOrderUpdate","inOrderId","isConfirm","isCreate","quoteAction","QuoteAction","USE","AdvisorQuoteId","onAddHistories","HistoryRefProcessId","isConfirmHandler","onValidationsCreateAuth","isExistingMultiAccountOrder","onAccountUpdate","getOptionsTickerFromFields","toggleAction","onAddExecution","onGetTradingRoutes","PART","PART_FILLED","onTotals","context1","context2","order1","orderId2","additionalProps","commons","sufix","subtotal","warning","Warnings","otherProps","otherValues","detailsFields","noGutters","tooltipId","earnings","taxupfront","fxupfront","taxfxupfront","EarningsPercentage","loadingTotals","cashdiffered","componentDidMount","AccountDetail","hierarchy","definitionId","fileType","advice","saveVisible","isSaveAction","chainedWizzardDefault","crossWizzardDefault","CreatedByMe","dayInfo","askedQty","totalAssignedQty","totalBookedQty","selectedDate","OrderDayStatus","LOCKED","BOOKED","assignedQty","OrderQuantityAssignment","getAssignment","fetchOrderAccountsAssignment","AccountsAssignment","assignment","currentOrderVersion","CurrentVersion","minimumQuantity","MinimumQuantity","incrementQuantity","IncrementQuantity","ExecutedQuantity","bookedQuantity","BookedQuantity","quantityToAssign","QuantityToAssign","leftToAssign","fixedClientQty","FixedClientQuantity","fixedPropQty","FixedPropQuantity","accountInBalanceType","Position","AskedQuantity","askedFullLiquidation","AskedFullLiquidation","TotalBookedQuantity","TotalAssignedQuantity","accountDay","AssignedQuantity","differenceOfAssignedQty","modifiedDay","modAccounts","modAccount","modAccountDay","error_assignedQty","totalDayAssignedQty","totalDayClientAssignedQty","totalDayPropAssignedQty","accDay","abs","onAssignmentUpdate","fetchUpdateOrderAccountsAssignment","accountsToSend","onDistributionApply","distributionType","modifiedAccounts","pendingQuantityToAssign","totalRemainingQuantity","assignedQtyInOtherDays","prorateOverPendingQty","pendingAcctQty","remainderOverIncrementQuantity","totalAssignedQuantityWithoutBook","listOfDays","selectedDateDay","DistributionType","onApply","minimum","increment","applyDist","TradeItemUI","TradeDetail","TradeAssetClassForm","tradeId","clientQtyToAssign","assignedClientQty","propQtyToAssign","assignedPropQty","tradingQtyToAssign","assignedTradingQty","errorQtyToAssign","assignedErrorQty","OrderQuantityToTradesAssignment","fetchOrderQuantityToTradesAssignment","QuantityToTradesAssignment","ClientQuantityToAssign","PropQuantityToAssign","TradingQuantityToAssign","ErrorQuantityToAssign","leftClientQtyToAssign","leftPropQtyToAssign","leftTradingQtyToAssign","leftErrorQtyToAssign","Trades","AssignedQuantityIsFixed","AssignedClientQuantity","AssignedPropQuantity","AssignedTradingQuantity","AssignedErrorQuantity","TradeInfo","TradeOpenClose","TradeAssetISIN","Auxiliar","HasNotBookedTrades","modDays","modDay","totalAssignedClientQty","totalAssignedPropQty","totalAssignedTradingQty","totalAssignedErrorQty","modTrade","error_assignedClientQty","error_assignedPropQty","error_assignedTradingQty","error_assignedErrorQty","fetchUpdateOrderQuantityToTradesAssignment","daysToSend","totalAssignedClientQuantity","totalAssignedPropQuantity","totalAssignedTradingQuantity","totalAssignedErrorQuantity","FloatingButton","handleRefresh","modalConfirm","setModalConfirm","Cancel","updateRecurringCommission","recurringcommissionsdt","Book","bookRecurringCommission","RecurringCommissionId","Revert","Initiated","commissions","toggleCommission","AccountsGrid","handleChange","booking","setBooking","booked","afterSave","bookRecRecurringCommission","RecurringCommissionAccountStatus","alignSelf","preCheckForm","initialCommission","initializeForm","setCommission","searching","setSearching","setCurrency","isCommissionCreated","setIsCommissionCreated","fetchGetCurrencies","currenciesAux","getRecurringCommission","reccommission","recurringCommissionCurrency","clientName","ClientName","clientDocumentNumber","ClientDocumentNumber","RecurringCommissionBaseCalculationShow","commissionRecurringVolume","RecurringCommissionVolumeShow","ivaIICB","RecurringCommissionTaxShow","totalIICB","RecurringCommissionTotalShow","recurringCommissionXLSX","stringValue","newC","newAcc","handleSearch","changeSearch","setRange","ModalRecurringCommission","initialC","ManagementFee","CustodyFee","OpeningFee","NoTradeFee","AllInFee","OnValidation","Validated","Reverted","Authorizing","reportBCU","deletePerson","personName","initialFilter","personToList","deletePersonFromList","fromDateReport","toDateReport","changeDateInfoRequest","searchperson","labelDate","dates","InputGroupText","SearchAllPeople","people","accountText","buttonAlign","Trade","defaultFields","tradingRef","createRef","errorAccounts","distribute","errorAccount","trading","sides","distributed","leftOvers","fetchTradingRoutesForAsset","fetchSearchErrorAccount","getTradePossibleOrders","snapshot","fetchTradePossibleOrders","settlementCurrencyId","prevSide","prevForm","prevPrice","prevSettlementCurrencyId","prevTradeCurrencyId","prevDate","prevValueDate","prevRoute","prevQuantity","getTradePossibleOrdersDebounced","newFees","tradingWasEnabled","orderItems","orderItemsKey","clientOrders","propOrders","errorOrders","tradingSides","tradingIsEnabled","PendingQuantity","ParentOrderId","RelationType","sideItem","isFromThisTrade","IsFromRelatedTradeOrder","RelatedTradeInfo","quantityDisabled","RelationIsBooked","defaultSideItem","tradeGroupId","itemActions","isNewTrade","isReadonlyTrade","tradeAndGroupId","tradeHasSelectedOrders","HeaderForm","EmptyOrders","toggleItemAccount","tradings","fixedSide","changeTrading","sidesAux","FooterForm","toggleShowFees","AlertError","global","updateSelectedOrders","checkDefaultOrder","defaultSelectedOrderId","TradeAssetId","tradeOrders","categorizedOrders","categorizeFetchedOrders","selectedOrders","orderToCheck","updateTradeQuantityOnRefresh","refreshTotals","currentSettleCurrency","currentSettleCurrencySymbol","settlementCurrencySymbol","tradeCurrencyISO","settlementCurrenciesList","settleCurrencySymbol","tradeCurrencySymbol","remainingQty","updateTradeQuantity","oldLeftOvers","tradingValid","fetchUpdateTradeAndComposition","FXRoute","tradeAndComposition","TradeFXMultiplies","Orders","TradeBookType","TradeBalanceType","firstSide","secondSide","firstSideCap","secondSideCap","Source","source","tradeStatus","isConfirmedTrade","defaultFieldsFromTrade","TradeRefTradeGroupId","TradeTradingRouteId","TradeCounterPartyId","FXRelatedOrderId","defaultFieldsFromOrder","Trading","handleNew","handleDel","changedSides","fixedDate","fixedItem","oppSide","itemDate","tradingTitle","needFX","newRow","delRow","massiveMode","ProductField","SymbolField","NumberField","closeModalTradeHistory","setHistories","TradeInlineDetail","AddRow","btnNew","EmptyRows","cstyle","FXPair","DateTimeField","inputStyle","onChangeCparty","autoWidth","inputLength","rej","sndRow","deleteBtn","onChangeRow","sidesState","assetState","settleCurrencyState","fetchAddTradingExecutions","tradingExecutions","FXMultiplies","buyQuantity","buyAverage","sellQuantity","sellAverage","sumQuantity","sumAvgPrice","fetchTradingEarnings","loadingEarnings","pricedif","buyEarnings","sellEarnings","modalStyle","headerForm","columnContainer","SideDetail","OversDetail","BoxDetail","capitalize","TradingDesk","tradingSelected","setTradingSelected","SdtTradingDesk","dt","TradingDeskId","orderid","tradingdeskid","changeTradingDesks","updateTradingDesk","pattern","defaultValue","decimals","displayType","modalOrder","openModalOrder","itemArray","setItemArray","loadArray","filterArray","openOrder","getOrder","orderToLoad","getAssetInfo","orderSimple","NEW","asideContent","SearchBox","pointer","asideMinimizer","getOrderPdf","fileUrl","EXPAND_LEFT","timeFrameName","renderOrderTimeFrameLowTouch","orderSide","getStatusClass","renderTradeStatus","getTradeStatusClass","getTradeStatusName","settleText","renderOrderBroker","brokerName","abrev","broker","renderOrderAccountName","renderOrderInstruction","hasDifferentInstructions","renderOrderCurrencies","_pending","ANNULLED","REALLOCATING","CONFIRMATION_SENT","MATCHED","UNMATCHED","getOrders","handleClick","StatusesName","Statuses","DropDownFilterProduct","rootFilterText","filterText","rootOnChangeText","setFilterText","debounceCallbackText","OrderList","Pagination","pages","PaginationItem","PaginationLink","previous","onChangePage","apply","next","PercentageBar","progress","currentPercentage","barColor","bar","fixedMarkerPercentage","fixedMarkerText","PercentageCircle","c100","smallDescriptionText","descriptionText","percentageText","AccountProfileCard","percentageBarColor","AccountCurrentProfileRisk","AccountProfileRisk","AccountCurrentProfileRiskPercentage","AccountProfileRiskPercentage","accountStatus","AccountStatus","BLOCKED","AccountIsExceptionallyUnblocked","AccountUnblockingEndTime","cardHeight","AccountHealthPercentage","AccountShippingAddresStateName","AccountShippingAddresCityName","AccountShippingAddresCountryName","AccountProfileCarousel","activeHolder","goToIndex","onExited","onExiting","redirectPerson","AccountInfoHolder","AccountHolderRelationship","AccountHolderRelationshipJuridical","IsMainHolder","Carousel","activeIndex","CarouselIndicators","onClickHandler","CarouselItem","AccountHolderId","AccountHolderName","AccountHolderCountryName","AccountHolderEmail","AccountHolderDocumentTypeName","AccountHolderDocumentNumber","CarouselControl","directionText","AccountTabs","documents","signatureSets","archivesTypes","disabledFields","investment","relatedAccounts","companyLinks","reps","banks","setAccountData","setRedirectAccounts","setRedirectAccount","refresh","riskByPersonIsEnabled","riskByPersonIsZero","useRevenueProcess","Profile","tabErrors","setTabErrors","saveAccountData","needAuth","changeTab","newTab","AccountMode","AccountOnboardingId","enableField","setEnableField","fetchEnableCheckFields","IsEnabled","Commissions","Holders","Beneficiaries","References","Finalize","RelatedAccounts","InvestmentProfile","disabledviaLink","BeneficiariesForm","changedHolder","collapsedHolder","toggleHolder","existsMainHolder","handleDeleteHolder","handleChangeInstruction","canBeMainHolder","isController","AccountHolderIsController","isManager","AccountHolderIsManager","accountRelationship","AccountBeneficiaryCode","canEdit","AccountHolderTel","AccountHolderAddress","PEP","HoldersForm","isPhysicalAccount","setPhysical","holderRelationshipJuridical","onChangePhysical","AccountHolderStatus","ModalBankAccount","onSave","archives","setArchives","handleFile","ArchiveId","datamaxsize","cb","ListArchives","deleteArchive","archivesAux","borderRadius","archiveId","ProfileForm","checkField","showReps","RepId","advisors","RepName","MainAdvisorId","MainAdvisorName","AccountOpeningDate","AccountWayOfAction","AccountPurpose","AccountProfileObjective","AccountProfileRiskId","InvestorProfileTypeId","InvestorProfileTypeName","MainAdvisorCommissionPercentage","CompanyLinkId","CompanyLinkName","AccountFiscalResidenceIsLocal","AccountCondensedActivity","AccountRegulatedCustomer","AccountIsQualified","AccountHolderPhone","MainHolderAddress","AccountTotalCash","AccountRiskTable","riskSummary","decimalPlaces","isRiskByPerson","setIsRiskByPerson","risk","LoadingOrEmpty","Risk","FactorId","FactorDescription","FactorWeight","Data","Score","RiskSummary","getTotalRiskScore","ProfileRisk","AnswerScore","ProfileRiskSummary","ProfileRiskValue","getTotalScore","ProfileRiskPercentage","BOLevel","GetRiskClassName","AccountRisk","profileRiskSummary","riskWarning","AccountRiskWidget","riskWidget","AccountProfileRiskMismatch","UncontrolledTooltip","CardWrapper","cardlg","IsCustodyBalance","generateEmptyBankAccount","Savings","sended","fetching","setFetching","bankAccountItemId","modalBankAccount","setModalBankAccount","reloadBankAccounts","GetAccountDataOnboardingId","fetchNewAccountInfo","toggleModalConfirm","toggleModalBankAccount","handleEdit","bankId","deleteBankAccount","validateBankAccount","deleteAccountId","fetchAccountUpdate","newBankAccounts","bankAcc","fetchNewAccount","fetchAccountSectorInfo","RenderDropdownActions","strValue","newBankAccount","onboarding","getOnboardingAccountArchive","getAccountArchive","loadingSave","setLoadingSave","setCollapsedHolder","setChangedHolder","modalHolder","setModalHolder","newCollapsedHolder","toggleModalHolder","newHolders","allHolders","newAccountHolders","newHolder","newHolderInfo","AccountHolderCountryId","AccountHolderByAdvisor","newChangedHolder","preCheckObjectEmpty","EventCommission","eventErrors","minForm","commissionForm","Flat","maxForm","Group","formula","formulaadds","OrderTable","thead","groupItem","tr","GroupAdds","GroupVolume","CommissionGroupMax","CommissionGroupMin","RecurringCommission","recurrings","recurring","recurringErrors","setSubassets","excludesCash","RecurringAssetGroup","recIndex","subasset","subassetSchema","assetGroupId","assetGroup","setAssetGroup","getAssetGroup","aG","newSubassets","Values","newItem","included","blocked","excludedInMin","subAssSchema","subAssetIndex","CommissionTab","schema","setSchema","schemas","setSchemas","newCommission","typeSchema","oldType","compareValue","canCompare","maxCommissionGroup","minCommissionGroup","getCommissionSchemas","getAccountCommission","getCommissionSchema","commissionId","commissionFrom","newSchema","canSubmit","AccountCommissionsCanBeChanged","indexRecurring","rec","updateAccountCommission","AccountBooktypes","selectedBookType","bk","toggleBookType","modalArchives","setModalArchives","documentId","newM","doc","toggleModalDoc","ArchiveTypes","archiveType","ArchivesExtension","newArchive","newDocument","FinalizeTab","loadingData","setLoadingData","setPersonList","showResults","listResults","SDTApproveAccount","getReportListCheck","logListId","personCheckName","listName","personRelation","belongPersonList","markAsFalsePositive","onboardingProcessId","createAccount","handleCreateAccount","AccountGroupAction","ModalConfirm","groupid","hasMainHolder","addHolder","oldMainHolderRemoved","newMainHolderAdded","existHolder","currentHolder","isValidEdit","mainHolderRef","AccountHolderRelationshipDescription","HoldersRelationshipDescription","InstructionsTab","accountOnb","isOnboarding","setBankAccounts","editMode","setEditMode","AccountInstructionAssetid","AccountInstructionBankAccountItemId","modalInstruction","setModalInstruction","toggleModalInstructions","instructionToDelete","updatedInstructions","_","accountOnboarding","updateAccountInstructon","fetchBankAccounts","strValue2","instructionUpd","exists","AccountInstructionAssetId","newInstruction","investmentProfile","changedInvestExperience","setChangedInvestExperience","newChange","newInvestExperience","investExperience","KYCTab","changedKYC","setChangedKYC","valueref","valuerefnew","accountref","changedKYCcurrent","newKYC","KYCupd","referenceId","modalPersonalReference","setModalPersonalReference","toggleModalReference","personalReference","deleteReferenceId","newReferences","newReference","setChangedAccount","changedAccountRef","fullaccount","postAccount","preCheckAccountForm","accnew","Written","Managed","revert","toggleDisable","nameValue","newChangedAccount","accQuestions","setQuestions","questionschanged","newQuestions","newAnswers","newA","bodyN","questionIndex","answerIndex","setNeedAuth","relatedAccountId","relatedAccount","modalRelatedAccount","setModalRelatedAccount","toggleModalRelatedAccount","deleteAccountName","newRelatedAccounts","relAcc","newRelatedAccount","toggleOpen","setToggleOpen","signature","modalSignature","setModalSignature","toggleModalNewSignature","handleRefreshStore","set","initialSets","sigset","fetchPostSet","newSet","listMenuItems","toggleDWOpen","ListOptionsDropdown","newToggle","toggleDropdown","newSetId","newSignature","Dropdown","PieChartColors","AccountSignatureWayOfAction","Joint","Individual","Customer","InBalance","Pershing","Bank","Company","Indistinct","AccountHistoryProcess","RiskProfile","BlockUnblock","InvestorProfile","Current","LocalBooking","ThirdPartyBooking","Split","Sink","Capitalization","Fee","DerivativeMaturity","DerivativePayment","Custom","OtherIncome","InstructionTarget","Reinvest","ModalArchive","ArchivesName","ArchivesTypeId","ArchiveTypeId","ArchivesTypeDescription","ArchiveTypeDescription","ArchivesSubTypeId","ArchivesSubTypeDescription","canBeLifelong","ArchiveSubTypeCanBeLifelong","hasExpiration","ArchiveSubTypeHasExpiration","ArchivesBlob","ArchivesEnabled","ArchivesExpirationDate","getISODate","ArchivesHasExpirationDate","setNewArchive","newNewArchive","subType","dataMaxSize","lastIndexOf","PersonBankAccountBankId","ModalDocument","documentTypes","documentCountry","setDocumentCountry","PhysicalPersonDocumentWithoutExpiration","parseDoc","setNewDocument","newNewDocument","fetchAutosuggestCoutries","ModalError","ModalFiscalResidence","fiscal","PersonFiscalResidenceCountryId","PersonFiscalResidenceCountryIso","parseFiscal","fiscalresidence","setFiscalResidence","newFiscalResidence","getAccountGroups","groupName","holderIsComplete","ModalHolder","initialAccountHolder","setNewHolder","personSearch","setPersonSearch","existPerson","setExistPerson","relation","fetchPersonSuggestion","saveHolder","ra","condition1","condition2","condition3","setBankAccount","baFiltered","onChangeAddress","setLegalAddress","showError","setShowError","validForm","LegalAddressCountryId","LegalAddressCityId","LegalAddressStateId","LegalAddresses","Personal","changeAddress","setCountry","fetchGetStateAutosuggest","nameState","nameCountry","fetchGetCityAutosuggest","ModalPersonalReference","setNewReference","ModalPhone","phoneTypes","messageShow","newPhone","setNewPhone","PhoneTypeDescription","newNewPhone","ModalRelatedAccount","ModalShareHolder","initialShareHolder","shareHolders","peopleRelated","userSession","headerText","ShareHolderDescription","ShareHolderPersonId","ShareHolderHasWebAccount","ShareHolderIsReadOnly","newShareHolder","setNewShareHolder","participation","setParticipation","sh","IsReadOnly","saveShareHolder","generateCheckedObject","checkedObject","sp","SignaturePersonId","signatureIsComplete","ModalSignature","generateInitialSignature","setNewSignature","checkedHolder","setCheckedHolder","changeSignatureField","autosuggests","onChangeAutosuggest","onChangeCountry","PersonFiscalResidenceCountry","PersonFiscalResidenceTIN","entityTypes","activitySectors","societyTypes","publicPositions","professions","manual","onChangeConstPlace","needsExtraFields","setColor","checking","setChecking","isPEP","JuridicalPersonPublicPosition","JuridicalPersonDocumentTypeId","fetchCheckDocument","onboardingid","PersonMode","PersonActivationDate","PersonObligatedEntity","JuridicalPersonEntityTypeId","EntityTypeId","EntityTypeDescription","JuridicalPersonSocietyTypeId","SocietyTypeId","SocietyTypeDescription","JuridicalPersonConstPlaceId","shareType","JuridicalPersonShareType","ProfessionId","ProfessionName","profession","activitySector","PublicPositionId","PublicPositionName","publicPosition","CurrencyType","RelatedFrom","legalCountryId","legalStateId","legalCityId","handleCheck","checkedList","setCheckedList","PersonSubAssetClassId","updateCheckedList","personLinks","patrimonies","personPublicPositionId","personLinkPositionId","isPEPRelated","PatrimonyId","PatrimonyDescription","PersonLinkId","PersonLinkName","personLink","viewDigitalRelatedFrom","PhysicalPersonCountryOfBirthId","birthStates","setBirthStates","onChangeDocumentCountry","fetchCountrySuggestion","birthCountryId","fetchCountryStates","states","civilStatusArray","cities","City","personCivilStatus","PhysicalPersonMainDocumentTypeId","Gender","PhysicalPersonCountryOfBirth","PhysicalPersonCityOfBirthId","city","CityId","CityName","PhysicalPersonNationality","SpouseDocumentTypeId","SpouseDocumentCountryOfIssueId","SpouseDocumentCountryOfIssue","SpouseDocumentExpirationDate","SpouseDocumentWithoutExpiration","ModalComments","setRedirectPerson","comment","setComment","fetchOnboardingHistory","PersonTabs","setPersonData","handleRedirectAccount","handleRedirectPerson","setMode","isPerson","toggleTab","PersonUpdateManual","referesh","PersonArchiveSubTypeInternalName","phones","fiscalresidences","Portfolio","PopUp","popUp","closeButton","PersonRiskTable","setPopUp","PersonProfileRisk","TransactionalLimit","TotalTransactionalLimit","ListCheckErrors","ListCheckPersonKey","comments","togglePopUp","PersonRisk","PersonProfileRiskName","handleEnableFile","docs","nArchive","body2","postPerson","OnboardingId","fetchNewPerson","fetchAppendPersonNewDocument","newArchives","handleDeleteFile","personid","fileid","fetchOnboardingPersonFile","fetchPersonFile","bankAccountToDelete","personsend","isadministrator","ContractsTab","modalNewDocument","setModalNewDocument","newPerson","wasMain","newDocuments","PhysicalPersonMainDocumentType","handleToggleModalNewDocument","ExtendedDataItem","modifyItemGroup","setCollapse","itemgroup","setItemGroup","isMultipleSelection","locked","setLocked","defaultInstance","ExtensionRefId","ExtensionInstanceDate","handleRemoveClick","newInstances","handleAddClick","modifyInstance","titleButton","lockButton","Collapse","ExtendedDataItemInstance","internalName","iteminstance","colButton","butttonX","butttonAdd","itemGroups","setitemGroups","fetchPersonExtendedData","newItemGroups","itemGroupsWithInstancesFiltered","itemGroup","filteredInstances","updatePersonExtendedData","saveExtendedData","PersonTransactionalLimit","personresult","setPersonResult","now","modalComments","setModalComments","toggleModalComments","personWithoutArchives","fetchOnboardingPersonResult","SDTOnboardingResult","AccountRiskSummary","fetchCreateOnboardingPerson","handleCreatePerson","FiscalResidencesTab","PersonFiscalResidenceIsActive","modalFiscalResidence","setModalFiscalResidence","mod","fetchUpdatePersonFiscalResidences","toggleModalNewFiscalResidence","nResidence","initialstatus","KYCPersonName","KYCPersonDocumentNumber","KYCPersonIsPEP","KYCPersonNationality","KYCPersonType","KYCPersonAge","KYCPersonActivity","KYCPersonAddress","KYCPersonRisk","KYCPersonTransactionalLimit","KYCValidatedDate","KYCMaturedDate","KYCStatus","KYCValidateComments","KYCExternalStatus","IsPLD","KYCFlags","sendKYC","generateEmptyLegalAddress","LegalAddressCountryIso","modalLegalAddress","setModalLegalAddress","newLegalAddress","toggleModalNewLegalAdress","nAddress","Phones","modalNewPhone","setModalNewPhone","fetchAppendPersonNewPhone","nPhone","PortfolioTab","accountPortfolios","setAccountPortfolios","fetchGetPersonAccountPorfolios","port","portfolioSlices","AccountRelationship","setChangedPerson","changedLegalAddress","setChangedLegalAddress","setChecked","LegalAddressCountry","PersonActivitySector","setAutosuggests","isPersonExternalSystem","setIsPersonExternalSystem","externalPersonInfo","setExternalPersonInfo","docType","docPersonType","externalPersonDocType","setExternalPersonDocType","externalPersonDocNumber","setExternalPersonDocNumber","externalPersonIdCheckError","setExternalPersonIdCheckError","setIsLoading","isFetchingAvaible","setIsFetchingAvaible","PersonSubAssetClass","propsLegalAddress","handleExternalInfo","getExternalInfo","otherValue","newChangedPerson","JuridicalPersonEntityTypeDescription","onChangeLegalAddress","newChangedLegalAddress","changePersonType","changePersonMinimal","fetchExternalPerson","useAlternativeRoute","documentType","documentNumber","fetchOnboardingPersonInfo","newPersonId","PersonProcessResult","CircularProggress","updatedList","PersonOnboardingId","preCheckPersonForm","idOnb","newDoc","fetchUpdatePerson","suitabilityDescription","personOnboardingId","RelatedPeopleTab","modalShareHolder","setModalShareHolder","shareHolderId","fetchUpdatePersonShareHolder","newShareHolders","toggleModalShareHolder","nShareHolder","PassedAway","N","M","F","FaceToFace","App","Web","Digital","Approved","AuthWaiting","Renovation","Advanced","RiskChanged","preCheckPhysicalPersonForm","preCheckNewAccountForm","preCheckJuridicalPersonform","QuoteList","handleOnChangePage","requestQuotes","pageFilter","startIndex","ResponsiveTable","emptyText","AdvisorQuoteRequestedDate","AdvisorQuoteRequestedBy","AdvisorQuoteStatus","QuoteStatus","WAITING","AdvisorQuoteRespondedDate","AdvisorQuoteRespondedBy","tradingDeskName","AdvisorQuoteIsBuy","AdvisorQuoteQuantity","PRICED","USED","REJECTED_BY_SENDER","AdvisorQuotePrice","wasUsed","AdvisorQuoteRejectReason","REJECTED_BY_RECEIVER","formGroup","htmlFor","button","downloadQuotes","spinnerStyle","changeMode","changeField","QuoteMode","NONE","SET_PRICE","AdvisorQuoteDuration","REJECT","expired","moveDropDown","seconds","isAdvisor","AdvisorQuoteExpireAt","expirateIn","openModalOffer","visibility","getFieldVisibility","labelPrice","intervalExpiration","Quotebar","enableCounterAndExpirationsTask","getCounterAndExpirations","expirations","updateStateProps","getUpdatedValues","pCrossing","crossing","crossingSetPrice","sCounter","editingProps","getEditingProps","_expirations","diffSeconds","ForgotPasswordPage","ForgotPasswordFunction","setUserName","setCompleted","autoComplete","onKeyDown","ResetPasswordPage","ResetPasswordFunction","newpassword","setnewPassword","newpassword2","setnewPassword2","URLSearchParams","resetToken","get","tbodyChild","getTbodyChild","Empty","CardList","getChildren","tbody","mobile","trowChild","fstLine","sndLine","pos","insert","first","prototype","borderLeft","ModalSpotQuote","PairPricePrice","newPrice","setNewPrice","PairPriceDescription","PairPriceDate","toTimeString","newPairPrice","modalEdit","setModalEdit","getSpotQuotes","pairprices","classList","setSpotQuote","pairprice","ToggleSwitch","EventAlert","IOUtils","Funds","TradeHistory","Note","AlertSimple","Custody","NewCustody","NewCollateral","AlertCompl","CounterParty","CustodySet","CorpEvents","ModalAuthorization","AlertMessage","AccountProfile","PersonProfile","ModalInvoice","SpotQuotes","RequestPeopleInfoFields","CounterPartyRanking","CrossReferenceSearch","Offers","DropDownFunds","ACTIVE","INACTIVE","DELETED","ErrorBoundary","errorInfo","copyToClipboard","clipboardCopy","componentStack","navigator","clipboard","writeText","DOMException","span","textContent","getSelection","createRange","removeAllRanges","selectNode","addRange","execCommand","hidden","MonthDateField","minDate","showMonthYearPicker","DateFieldStyle","FormatNumber","maximumFractionDigits","fixed","ten","YYYY","MM","DD","delay","timer","args","arguments","clearTimeout","isObject","sourceValue","fetchIntercept","nativeFetch","interceptor","__attached__","interceptors","SoundType","serverTimezoneOffset","playSound","soundPath","_soundPath","audio","Audio","play","scale","domain","istart","istop","ostart","ostop","setAndGetServerTimezoneOffset","localStorage","getItem","timezoneOffset","_timeZoneOffset","reversedInterceptors","promise","requestError","responseError","preName","toast","configure","newestOnTop","autoClose","hideProgressBar","closeOnClick","pauseOnHover","draggable","warn","LOCAL_BOOKING","THIRD_PARTY_BOOKING","BOTH","SELF","PERSHING","IB","FC_STONE","ALL","Work","getDefaultBookType","DETAILED","CONDENSED","emailStatus","getColorSchReportStatus","parseScheduleReportXML","xmlDoc","DOMParser","parseFromString","Body","OTCFechaConcertacion","getElementsByTagName","nodeValue","OTCOperacionNumero","OTCTipoOperacion","OTCCompradorCodigo","OTCVendedorCodigo","OTCISIN","OTCPrecioCC","OTCPrecioSC","OTCTasa","OTCValorNominal","OTCEfectivo","OTCEfectivoUSD","OTCFechaLiquidacion","OTCLiquidaBVM","OTCMonedaBCU","ProductTypeFunds","OPG","tf","CASH","MARGIN","CROSSING","ASSIGNED","ROLLEDBACK","ACCEPT_CANCEL_REPLACE","REJECT_CANCEL_REPLACE","CANCEL","MOVE_TO_WORKING","MOVE_TO_COMPLETED","MOVE_TO_TODO","LOCK","SettleInstAction","MATCH","SPLIT","UNMATCH","SEND_EMAIL","TradeAction","MarketType","OTC","EXCHANGE","SettlementInstructionStatus","SETTLEMENT_FAILURE","SETTLEMENT_COMPLETION","SettlementInstructionAccount","IN_BALANCE","CUSTOMER","TRADING","Automated","productType","orderType","timeFrame","getAccountTypeName","settlementCurrencyInfo","settlementCurrencyMultiplies","getOrderActionByDrag","destination","canMoveToTodo","canMoveToWorking","canMoveToCompleted","padStart","REQUEST","READ","headers","buildRows","excelRows","newOrders","working","orderRows","orderRow","getOrderTimeFrame","modifiedDate","product","getOrderSide","customPrice","getOrderPrice","timeFrameDate","getOrderValues","getEmptyRowOrder","pop","execId","execQuantity","execDate","execPrice","execBroker","execCounterparty","getExecutionValues","getReportOrdersData","requestedAt","respondedAt","respondedBy","rejectReason","getReportQuotesData","transfer","transfers","flat","transferRows","transferRow","initiatedBy","InitiatedBy","takenBy","TakenBy","getTransferValues","getEmptyRowTransfer","getReportIOsData","getDateFromISO","dateString","toFormatDateReverse","strDate","setMinutes","toDateFromString","getUTCFullYear","getUTCMonth","getUTCDate","debouncedValue","setDebouncedValue","handler","useInterval","savedCallback","Report","DebugTools","dateUtils","FormFields","Formatter","webpackContext","req","webpackContextResolve","__webpack_require__","authSuccess","AUTH_SUCCESS","authFailure","AUTH_FAILURE","changeUsername","CHANGE_USERNAME","changePassword","password","CHANGE_PASSWORD","signIn","SIGN_IN","signOut","SIGN_OUT","mustResetPassword","MUST_RESET_PASSWORD","AUTH_REQUEST","eventAlertsSuccess","eventAlerts","EVENTALERTS_SUCCESS","eventAlertsRead","EVENTALERTS_READ","authorizationsReload","AUTHORIZATIONS_RELOAD","AUTHORIZATIONS_SUCCESS","notificationsReload","NOTIFICATIONS_RELOAD","notificationsSuccess","notifications","NOTIFICATIONS_SUCCESS","setNotificationsLoading","notificationsLoading","NOTIFICATIONS_LOADING","currentAccountSet","ACCOUNT_SET","personInfoSet","PERSON_INFO_SET","textsSet","texts","TEXTS_SET","textsLoadingSet","TEXTS_LOADING_SET","textsLoading","AUTHORIZATIONS_READ","ORDER_SUCCESS","fetchTooltipsAndNotes","ForgotPassword","forgotPasswordFunction","setEmail","col","inputGroup","iconContainer","userIcon","boton","emailTrim","test","validateEmail","ResetPasswordComponent","oldPassword","setOldPassword","newPassword","setNewPassword","confirmPassword","setConfirmPassword","userPasswordAttempts","setUserPasswordAttempts","policies","setPolicies","useDispatch","useSelector","handlePasswordChange","fetchCheckPassword","changeFirstAccessPassword","minLength","sdtSecurityPolicy","MinLengthPassword","minNumericChars","MinNumericCharacters","minSpecialChars","MinSpecialCharacters","minUpperCaseChars","MinUpperCaseCharacters","lockBackground","lockIcon","authenticated","Redirect","forgotPassword","isloading","withRouter","connect","Route","initalValue","confirmNewPassword","recoveryPasswordFunction","useQuery","token","successCard","flexContainer","buttonContainer","pass","confirmPas","isValid","isValidForm","ResetPassword","resetPasswordFunction","checkPassword","currentPassword","setCurrentPassword","sessionStorage","Username","successButton","getCurrentAccount","getAuthorizationsAsync","getAuthorizationsService","newAuthorizations","authItem","handleReject","respondAuthorization","handleAuthorize","onAuthorize","onReject","ammount","operationValue","setOrder","orderInfo","ammountString","tableRow","fetchInProcesOrderPDF","actionButtons","getTexts","wrapperCol","emptyWrapper","emptyMessage","authorizationsTableRow","tableHead","tableH","tablaMonto","tableBody","authorizationItem","authorizations_note","HelpComponent","initials","advisorName","advisorFirstLastName","subTitle","infoContainer","profile","infoText","contactInfoWrapper","cellphone","advisorPhone","advisorEmail","calendar","calendarSvg","help_text","itemTrade","handleDownloadCertificates","fetchgetTradeTicketClient","journalEntryId","dropdownFont","HistoryForm","loadingPosition","setLoadingPosition","portfolioNoLogs","setPortfolioNoLogs","setActivity","userDropdownIsOpen","setUserDropdownIsOpen","setFromDate","setToDate","instrumento","currencyFilter","displayDate","setDisplayDate","tableFilter","setTableFilter","currentFilter","setCurrentFilter","fetchGetPortfolioNoLogs","valores","reverse","moneda","currencyName","esEfectivo","updateActivity","handleChangeFilter","toggleUserDropdown","toggleFilterType","filterType","desde","subtract","valueOf","milliseconds","hasta","FilterButton","activeButton","timeSpan","diff","moment","_data","months","fetchGetActivity","fetchGetActivityProduct","newActivity","actividad","nombre","concepto","saldo_total","totales","finalBalance","concept","activityId","activityStatus","detalle","valor","changeDateHandler","noAccounts","buttonRow","leftContainer","dropdownButton","textImageWrapper","arrow","arrowImgActive","arrowImg","inNavbar","dropdownToggle","dropDownMenu","itemCuentas","greyFont","activeItem","dateContainer","dateContainerDisplayNone","dateSecondRow","fluid","hideOnPrint","print","excel","getHistoryXLS","csv","getHistoryCSV","activityTableRow","circularProgressRow","activityItem","toPascalCase","NoInfo","history_note","noInfoRow","ExternalAccountsWrapper","loadingBankAccounts","setLoadingBankAccounts","getPersonBankAccount","accountsWrapper","bankLogo","bankAccountData","checkBoxWrapper","cashWrapper","cashSpan","modes","BUY","cashCheckBox","FundInvestModal","setValue","afterHoursModal","setAfterHoursModal","setErrorMessage","noErrors","setNoErrors","isFullLiquidation","setIsFullLiquidation","setClientBankAccount","useCash","setUseCash","setSent","minAmmount","maxAmmount","tooltTipStyles","minTime","maxTime","contentClassName","modalWrapper","titleWrapper","modalBody","fieldTitle","toolTipContainer","tooltipIcon","toolTip","tooltips","invest_funds_rating","invest_funds_ytd","AssetXIRR","quantityInput","getNumber","availableBalance","SELL","fullLiquidationWrapper","afterHoursWrapper","after_hours_investment","afterHoursText","sentDisclaimer","accountContainer","bankAccountNumber","confirmButton","orderStatus","updateFund","FundsAssetTable","portfolioDate","fetchGetPortfolio","setPortfolioTotal","valueTotalUSD","positionPYG","currencypairprice","rawprice","currentPosition","assetClass","valuetotal","handleDeposit","handleWithdraw","FundsTable","collapseRowActive","collapseRow","collapseHeaderActive","collapseHeader","arrowActive","collapseActive","Invest","buyModal","setBuyModal","setItem","setIO","setTrade","offers","setOffers","availableOffers","setAvailableOffers","outstandingOffers","setOutstandingOffers","setFunds","loadingOffers","setLoadingOffers","loadingFunds","setLoadingFunds","loadingRedirection","setLoadingRedirection","useLocation","redirectionData","confirmFund","confirmOffer","loadOffers","loadFunds","fetchOffers","SdtOffers","OffersItems","fetchFunds","outstanding","available","toggleOffers","takeOffer","newTrade","activeAccount","LoadingModal","InvestTable","titulo","destacada","InvestModal","InvestBuyModal","redirectionModalBody","InvestAssetClassTable","InvestSubAssetClassTable","setBonds","equities","setEquities","setOptions","setRepo","newBonds","newEquities","newOptions","newFunds","newRepo","offerItem","collapseHeaderOutstanding","circle","Footer","logoButton","NoAccounts","futureIncomeRow","FutureIncomeRow","totalAccumulated","Chart","setData","labels","chartWrapper","notMerge","lazyUpdate","axisLine","splitLine","axisLabel","showSymbol","barWidth","hoverAnimation","futureIncome","setFutureIncome","getFutureIncome","cuenta","newFutureIncome","toggleButtonRow","toggleButton","toggleButtonActive","future_note","AccountJSON","isProdEnv","isTestingUser","showEnvironmentSign","environmentSignText","environmentSignColor","getTextsLoading","getUserContext","idleTimeout","setIdleTimeout","MaxIdleSessionTime","useIdleTimer","timeout","crossTab","syncTimers","onIdle","appHeader","hambMenuLogo","NavbarToggler","navToggler","mobileSidebarToggle","hambIcon","menuLine","dummyDiv","navbar","UserSelector","isInNavbar","userSelector","IsProductionEnv","IsTestingUser","bindActionCreators","getAuth","ToastContainer","MonthlyStateComponent","setMonths","MONTHS_NUMBERS","ENERO","FEBRERO","MARZO","ABRIL","MAYO","JUNIO","JULIO","AGOSTO","SETIEMBRE","SEPTIEMBRE","OCTUBRE","NOVIEMBRE","DICIEMBRE","getMonthsPositionReport","newMonths","monthsItem","splitMonthsItem","firstpossibledate","splitA","splitB","aYear","aMonth","bYear","bMonth","MonthYear","getAccountStatement","fileData","blobFile","b64Data","byteCharacters","atob","byteArrays","byteNumbers","charCodeAt","byteArray","bateToBlob","titleSubText","pdfSvg","FundsComponent","statements_note","setAssets","setSelectedDate","assetDropdownIsOpen","setAssetDropdownIsOpen","getAllFundsInPosition","assetinfocolletion","toggleAssetDropdown","buttonDropdown","AssetInfo","getFundAccountExtractClientX","MyDataComponent","getSavedPersonInfo","mobilePhone","setMobilePhone","personDocument","setPersonDocument","newMobilePhone","phoneItem","newPersonDocument","documentItem","firstAndLastName","personLegalAddress","personLegalAddressNumber","personLegalAddressCityName","setOrders","orders_note","getCounters","parentElement","activeRoute","routeName","hideMobile","contains","onLogout","variant","wrapper","attributes","navLink","iconUrl","URLlocation","activeLi","isExternal","backgroundIcon","iconSvg","activeClassName","isActive","tmp","isActiveItem","NavBadge","navType","navLabel","listLink","navList","navDropdown","navItem","filteredItems","sidebar","sidebarNav","imgLogo","mobileSidebarHeader","menuIcon","navBackground","LegalContracts","setContract","contractLoading","setContractLoading","contractLoaded","setContractLoaded","updateContractLoading","setUpdateContractLoading","updateLegalContract","getLegalContracts","LegalContractSDT","LegalContractAttachmentName","LegalContractAttachmentBlob","handleChangeCheckbox","contractContainer","contractTitle","contractFileCard","boxContract","contractPdf","LegalContractAttachmentExtension","pdfButtons","downloadIcon","chekboxContract","CheckedCheckbox","UncheckedCheckbox","textAcceptContract","buttonConfirmContract","setLegalContract","LegalContractId","SettlementCurrency","DebitTotal","BuyTotal","IVA","ioTotal","setIoTotal","defaultCurrency","settlementCurrenciesItem","paymentItem","paymentItemAssetCouponDate","newCharges","feeitem","feevalue","newIoTotal","ioItem","successTitle","containerSecondRow","sx","xxl","operationNumber","containerThirdRow","AssetPerformance","debValue","setActiveAccount","setLoadingEarnings","openConfirmationModal","setOpenConfirmationmodal","tradeInfo","setTradeInfo","setOrderInfo","Charges","Available","getEarnings","newIVA","toggleIcon","rowProduct","rowContainer","colContainer","subRowContainer","invest_isin","invest_performance","paymentString","getPaymentString","invest_coupon_rate","invest_maturity_date","invest_commission","invest_charges","rowQty","colQty","fixPosition","valuesAlignment","qtyWrapper","totalDebitar","totalDebtQty","offerid","backdrop","no_account_title","no_account_subtitle","NotificationCollapse","notification","handleNotificationRead","setCollapseActive","InternalMessageTitle","InternalMessageText","InternalMessageAttachmentName","getMessageAttachment","InternalMessageId","InternalMessageAttachmentExtension","NotificationsCard","getNotificationsLoading","getNotifications","handlePreNotificationRead","getTransactionalPinURL","pre_pin_validation_token","redirect_url","newRedirectData","setRedirectionData","updateMessage","approved","EmptyNotifications","PageWrapper","AssetClassDoghnut","onSelectItem","chartOptions","setChartOptions","optionData","assetClassItem","orient","fontFamily","screen","onEvents","doghnutWrapper","SubAssetClassDoghnut","PortfolioDoghnut","totalPortfolioUSD","cashTotal","portfolioTotal","totalPYG","portfolioTotalUSD","tooltipFormatter","valueOriginal","renderer","portfolioDoghnutWrapper","setPortfolioDate","usdModal","setUsdModal","gsModal","setGsdModal","toggleUsdModal","toggleGsModal","portolioRow","secondRow","PortfolioHeader","PortfolioTable","modalState","convert","screenBreakForCharts","headerRow","PortfolioDownload","portfolioDoghnut","spacedDiv","titleAndInput","getPortfolioXLS","getPortfolioCSV","totalPYDfx","mainRow","firstColumn","portfolioIcon","totalContainer","usdP","usdNumber","globalPosition","changeTypeContaier","changeType","guaraniP","guaraniNumber","portfolioColumn","collapseTitle","normalColumn","AssetClassTable","orangeRowCollapse","setOrangeRowCollapse","collapseOrangedata","indexCuentas","SubAssetClassTable","orangeRow","orangeRowText","arrowActivated","AssetTable","totalMarketValue","setTotalMarketValue","totalInvestmentCost","setTotalInvestmentCost","totalAbsoluteReturn","setTotalAbsoluteReturn","totalYTM","setTotalYTM","totalPortfolio","setTotalPortfolio","investCost","invested","totalOriginCurrencyWithCoupon","TRT","totalUSDWithCoupon","grayTableH","notShowColumn","itemIndex","AssetRow","assetRow","assetIsin","actualPrice","nominalValue","realizePL","isFirstCollapseOpen","selectedAsset","setSelectedAsset","assetQuantity","setAssetQuantity","setAssetClass","buttonBlue","blueButtonDiv","collapseTable","titleRow","tableHeadActivated","collapseTitleText","valueTotal","chartsRow","PortfolioModal","isCollapseBlueOpen","setIsCollapseBlueOpen","blueRow","containerStyles","marginRightIcon","primary","secondary","pl0","textColor","grayDark","lineHeight","btnGeneric","roundedMd","pNormal","normal","newClassName","containerWrapper","formatName","setLoadingInfo","myData","setMyData","isModalOpen","setIsModalOpen","getPersonInfo","fetchGetAccounts","handleChangeAccount","juridicalDoc","newAccount","rightContainer","accountHolderName","secondRowContainer","accountItem","inactiveItem","path","LoginPage","fetchForgotPassword","fetchResetPassword","exact","PortfolioPage","HistoryPage","InvestPage","FutureIncome","MonthlyStates","MyData","Help","store","Login","Notifications","IntlProvider","locale","HashRouter","createReducer","removeIfExists","authorizationsLoaded","notificationsLoaded","portfolio_general","portfolio_actual_price","portfolio_nominal_value","portfolio_investment_cost","portfolio_pl","portfolio_trt","portfolio_ytm","portfolio_percentage","sell_quote","footer_line_1","footer_line_2","reducers","combineReducers","getAuthCredentials","getAuthorizationsLoaded","getNotificationsLoaded","inProcessOrders","authFlowSaga","authorize","signout","LoginResult","getAuthStatus","setUserContext","setAuthStatus","isAuthenticated","userContext","accessToken","take","credentials","isLoginOk","userSignedOut","credentialsOrToken","race","api","authService","_response","logoutService","API_TOKEN","rootSaga","fork","contextJSON","API_PROXY_URL","Authorization","getAccessToken","callApiProxyCallback","API_ROOT","config","authHeader","guid","UserGUID","device","platform","userAgent","appVersion","vendor","Accept","ClientOptions","endpoint","normalizeFunction","fullUrl","unauthorized","Navigate","ok","encrypt","JSEncrypt","publicKey","setPublicKey","version","getCurrentVersion","fetchGetAccountInfo","getArchivesTypes","GetDigitalLinks","getClientPositionDigital","getClientHistoryAUM","getClientHistoryPerformance","GetDigitalReprofile","numCli","setPersonInfo","fetchProductActivityPDF","fetchOpenId","getFundAccountExtract","validateTransactionalAuthCode","getPaymentURL","validatePaymentAuthCode","fetchGetBankSuggestions","fetchGetCountrySuggestions","getRedirectionData","fetchGetWithdrawals","estatus","fetchGetDeposits","fetchAddWithdrawal","withdraw","fetchIO","encodeURI","fetchDepositableAccounts","getMessages","getQuestions","getAnswers","getAccountAnswers","updateAnswers","fetchResetPasswordNoToken","fetchChangePassword","fetchSendContactRequest","site","senderName","senderMail","_api","require","sagaMiddleware","createStore","rootReducer","applyMiddleware","backendSocketMiddleware","registerFetchInterceptor","run","WEB_SOCKET_URL","WEB_SOCKET_PATH","backendSocket","rejectUnauthorized","transports","attemptNumber","bodyUsed","statusText","AppInfoWrapper","setVersion","newVersionAvailable","setNewVersionAvailable","FrontendName","FrontendVersion","newAccountInfo","AccountGUID","AccountStrategyId","HH","II","getSeconds","charAt","setSessionRedirectionData","word","customToast","toPascalCaseString","division","answer","firstLetter","espLang","monthAbbr","dayOfWeek","dayOfWeekAbbr","selector","inverse","toolbox","brush","rect","polygon","lineX","lineY","keep","dataView","lang","dataZoom","zoom","back","magicType","stack","tiled","restore","saveAsImage","progressClassName","css","useMemo","getAllUrlParams","queryString","paramName","updateOrInsert","updateProperties"],"mappings":"2MAAA,I,IAAA,oCACA,0D,IACA,sD,IACA,iF,mDAEA,IAAMA,EAAiB,SAAC,GAAD,IACrBC,EADqB,EACrBA,KACAC,EAFqB,EAErBA,SACAC,EAHqB,EAGrBA,SACAC,EAJqB,EAIrBA,qBACAC,EALqB,EAKrBA,SACAC,EANqB,EAMrBA,OACAC,EAPqB,EAOrBA,YAPqB,OAQhBN,EAEH,wBAAC,EAAAO,UAAD,CAAWC,UAAWC,UAAMC,UAC1B,wBAAC,EAAAC,MAAD,mBACA,+BAAKH,UAAWC,UAAMG,QACpB,wBAAC,EAAAC,MAAD,CACEC,KAAK,OACLC,MAAOX,EACPY,YAAY,OACZf,SACE,SAACgB,GAAD,OAAOhB,EAAS,WAAYgB,EAAEC,OAAOH,QAEvCI,UAAA,IAEF,+BAAKV,MAAO,CAAEW,MAAO,UACrB,wBAAC,EAAAP,MAAD,CACEC,KAAK,OACLC,MAAOV,EAC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AAI4zG,GAAW3uN,KAAKkwC,GAPpB6qE,EAAI4zG,GAAaz+K,EAiBzB,OAJA6qE,EAAIykE,IAAM,SAACjkM,GACT,OAAOw/H,EAAIx/H,IAGNw/H,I,sRCxEO6zG,eAAT,WAAoD,IAA5BloM,EAA4B,uDAApB,GAAIjtC,EAAgB,4BAAPuE,EAAO,EAAPA,IAC5CQ,EAAQkoC,EAAM1nB,WAAU,SAAAsZ,GAAA,OAAQA,EAAKt6B,IAAQvE,EAAMuE,MAEzD,IAAe,IAAXQ,EACF,MAAO,CAAC/E,GAAOqlB,OAAO4nB,GAGxB,OAAOA,EAAM3oC,KAAI,SAAAu6B,GACf,OAAIA,EAAKt6B,IAAQvE,EAAMuE,GACdvE,EAGF6+B,M,EAIKu2M,iBAAT,WAA0D,IAAhCnoM,EAAgC,uDAAxB,GAAIxnC,EAAoB,4BAAdlB,EAAc,EAAdA,IAAKvE,EAAS,EAATA,MACtD,OAAOitC,EAAM3oC,KAAI,SAAAu6B,GACf,OAAIA,EAAKt6B,IAAQkB,EACf,KACKo5B,EACA7+B,GAIA6+B,M,EAIKurM,eAAT,WAAoD,IAA5Bn9L,EAA4B,uDAApB,GAAIjtC,EAAgB,4BAAPuE,EAAO,EAAPA,IAClD,OAAO0oC,EAAMp6B,QAAO,SAAAgsB,GAAA,OAAQA,EAAKt6B,IAAQvE,EAAMuE,Q","file":"index~493df0b3.4a848136c59745fbea4a.bundle.js","sourcesContent":["import React from 'react';\r\nimport { FormGroup, Label, Input, Button } from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\nimport style from './AdvancedSearch.module.scss';\r\n\r\nconst AdvancedSearch = ({\r\n open,\r\n onChange,\r\n onSearch,\r\n toggleAdvancedSearch,\r\n fromDate,\r\n toDate,\r\n isSearching,\r\n}) => (open\r\n ? (\r\n \r\n \r\n
\r\n onChange('fromDate', e.target.value)\r\n }\r\n required\r\n />\r\n
\r\n onChange('toDate', e.target.value)\r\n }\r\n />\r\n
\r\n \r\n Search\r\n \r\n \r\n Hide\r\n \r\n \r\n ) : null\r\n);\r\n\r\nAdvancedSearch.propTypes = {\r\n open: PropTypes.bool.isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n onSearch: PropTypes.func.isRequired,\r\n toggleAdvancedSearch: PropTypes.func.isRequired,\r\n fromDate: PropTypes.string.isRequired,\r\n toDate: PropTypes.string.isRequired,\r\n};\r\n\r\nexport default AdvancedSearch;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"advanced\":\"AdvancedSearch-module_advanced_1UR4s\",\"inputs\":\"AdvancedSearch-module_inputs_VlSXk\"};","import React, { useState, Fragment, useEffect } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport { InputGroup, Input, Button } from \"reactstrap\";\r\nimport AdvancedSearch from \"./AdvancedSearch\";\r\nimport { toDateLocal } from \"../../utils/Helper\";\r\n\r\nconst AdvancedSearchbox = ({\r\n searchboxPlaceholder = \"\",\r\n showAdvanced = false,\r\n defaultOpenAdvanced = false,\r\n defaultFromDate,\r\n defaultToDate,\r\n onBasicFilterUpdate,\r\n onAdvancedFilterUpdate,\r\n isSearching,\r\n}) => {\r\n const [isOpenAdvanced, setIsOpenAdvanced] = useState(defaultOpenAdvanced);\r\n const [basicFilter, setBasicFilter] = useState({\r\n text: \"\",\r\n });\r\n const [advancedFilter, setAdvancedFilter] = useState({\r\n fromDate: defaultFromDate,\r\n toDate: defaultToDate,\r\n });\r\n\r\n useEffect(() => {\r\n onAdvancedFilterUpdate({ isOpenAdvanced });\r\n }, [isOpenAdvanced]);\r\n\r\n const updateBasicFilterValue = (property, newValue) => {\r\n const newFilter = {\r\n ...basicFilter,\r\n [property]: newValue,\r\n };\r\n\r\n setBasicFilter(newFilter);\r\n onBasicFilterUpdate(newFilter);\r\n };\r\n\r\n const updateAdvancedFilterValue = (property, newValue) => {\r\n const newFilter = {\r\n ...advancedFilter,\r\n [property]: newValue,\r\n };\r\n\r\n setAdvancedFilter(newFilter);\r\n };\r\n\r\n const onSearch = () => {\r\n onAdvancedFilterUpdate(advancedFilter);\r\n };\r\n\r\n const toggleAdvanced = () => {\r\n if (isOpenAdvanced) {\r\n // We are closing the advanced feature.\r\n // We want the page to load the default values.\r\n onAdvancedFilterUpdate({});\r\n }\r\n setIsOpenAdvanced(!isOpenAdvanced);\r\n };\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n\r\n updateBasicFilterValue(\"text\", e.target.value)}\r\n />\r\n {showAdvanced && !isOpenAdvanced && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n {showAdvanced && (\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nAdvancedSearchbox.propTypes = {\r\n searchboxPlaceholder: PropTypes.string,\r\n showAdvanced: PropTypes.bool,\r\n defaultOpenAdvanced: PropTypes.bool,\r\n defaultFromDate: PropTypes.string,\r\n defaultToDate: PropTypes.string,\r\n onBasicFilterUpdate: PropTypes.func.isRequired,\r\n onAdvancedFilterUpdate: PropTypes.func.isRequired,\r\n};\r\n\r\nAdvancedSearchbox.defaultProps = {\r\n searchboxPlaceholder: \"\",\r\n showAdvanced: false,\r\n defaultOpenAdvanced: false,\r\n defaultFromDate: toDateLocal(new Date()),\r\n defaultToDate: toDateLocal(new Date()),\r\n};\r\n\r\nexport default AdvancedSearchbox;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport {\r\n Button,\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Container,\r\n Row,\r\n Col,\r\n Table,\r\n CustomInput,\r\n Input,\r\n} from \"reactstrap\";\r\nimport style from \"./styles.module.scss\";\r\nimport { FormField } from \"../../../utils\";\r\nimport { FormNumber, FormSelect } from \"../Controls\";\r\nimport LaddaButton from \"react-ladda/dist/LaddaButton\";\r\nimport { SLIDE_LEFT } from \"react-ladda/dist/constants\";\r\nimport { parseDate } from \"../../../utils\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport { valueIsEmpty, dateIsEmpty, showToast } from \"../../../utils/Helper\";\r\nimport { Field } from \"../../Modal/Order/Field/Field\";\r\n\r\nconst TypeInput = {\r\n Quantity: \"Quantity\",\r\n Total: \"Total\",\r\n};\r\n\r\nconst initialState = {\r\n inputType: TypeInput.Quantity,\r\n};\r\n\r\nconst ModalCalculator = ({ open, toggle, id, price, services, assetInformation, role }) => {\r\n const [fields, setFields] = useState(initialState);\r\n const [errors, setErrors] = useState({});\r\n const [loading, setLoading] = useState(false);\r\n const [result, setResult] = useState(false);\r\n\r\n useEffect(() => {\r\n if (open) {\r\n setFields({\r\n ...initialState,\r\n price,\r\n date:\r\n new Date().getFullYear() +\r\n \"-\" +\r\n (\"0\" + (new Date().getMonth() + 1)).slice(-2) +\r\n \"-\" +\r\n (\"0\" + new Date().getDate()).slice(-2),\r\n });\r\n }\r\n }, [open]);\r\n\r\n const onChange = (name, value) => {\r\n setFields({ ...fields, [name]: value });\r\n setErrors({ ...errors, [name]: undefined });\r\n };\r\n\r\n const handleCalculate = () => {\r\n const nextErrors = {};\r\n if (valueIsEmpty(fields.price)) {\r\n nextErrors.price = \"Required field\";\r\n }\r\n if (valueIsEmpty(fields.inputTypeValue)) {\r\n nextErrors.inputTypeValue = \"Required field\";\r\n }\r\n if (dateIsEmpty(fields.date)) {\r\n nextErrors.date = \"Required field\";\r\n }\r\n\r\n setErrors(nextErrors);\r\n\r\n if (Object.keys(nextErrors).length == 0) {\r\n setLoading(true);\r\n setResult(false);\r\n\r\n const body = {\r\n assetId: id,\r\n date: fields.date,\r\n price: fields.price,\r\n quantity: fields.inputType == TypeInput.Quantity ? fields.inputTypeValue : 0,\r\n total: fields.inputType == TypeInput.Total ? fields.inputTypeValue : 0,\r\n };\r\n\r\n if (assetInformation) {\r\n body.priceisclean = !!assetInformation.AssetPricesDirty ? fields.priceisclean : !fields.priceisclean;\r\n body.priceisdirty = !body.priceisclean;\r\n body.ytm = !!fields.ytm;\r\n body.trt = !!fields.trt;\r\n }\r\n\r\n services.calculator(body).then(({ result, calculator }) => {\r\n setLoading(false);\r\n setResult(calculator);\r\n\r\n if (result.Code === 400) {\r\n showToast(result.Description, true);\r\n }\r\n });\r\n }\r\n };\r\n\r\n return (\r\n \r\n Asset calculator\r\n \r\n \r\n \r\n \r\n \r\n onChange(\"date\", e.target.value)}\r\n invalid={!!errors.date}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.inputType}\r\n onChange={onChange}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n {assetInformation && (\r\n \r\n \r\n \r\n onChange(\"priceisclean\", !fields.priceisclean)}\r\n />\r\n \r\n \r\n \r\n \r\n onChange(\"ytm\", !fields.ytm)}\r\n />\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n handleCalculate()}\r\n data-style={SLIDE_LEFT}\r\n >\r\n Calculate\r\n \r\n \r\n \r\n {result && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const Result = ({ result }) => {\r\n const items = {\r\n Principal: result.principal,\r\n Accruals: result.accrual,\r\n YTM: result.ytm,\r\n \"Nom. Rate\": result.TNA,\r\n \"Current Yield\": result.currentyield,\r\n Total: result.total,\r\n Duration: result.duration,\r\n Days: result.days,\r\n };\r\n\r\n return (\r\n
\r\n Totals\r\n
\r\n {Object.entries(items).map(([key, value]) => (\r\n
\r\n {key}\r\n \r\n \r\n \r\n
\r\n ))}\r\n
\r\n
\r\n\r\n Events\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {result.events.map((event, index) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n {result.events.length == 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n
DateTypeQuantityCash
\r\n \r\n {event.type}\r\n \r\n \r\n \r\n
\r\n No events\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nconst TypeInputValues = Object.entries(TypeInput).map(([value, key]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nexport default ModalCalculator;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"styles-module_modal_2XbLD\",\"body\":\"styles-module_body_E8w2c\",\"container\":\"styles-module_container_1gqbx\",\"sectionDark\":\"styles-module_sectionDark_1zsaj\",\"result\":\"styles-module_result_XNfkO\",\"totals\":\"styles-module_totals_3I683\",\"item\":\"styles-module_item_2Xc7K\",\"events\":\"styles-module_events_fD48B\",\"empty\":\"styles-module_empty_2gjxt\",\"checkFunds\":\"styles-module_checkFunds_1JffP\"};","import React from \"react\";\r\nimport { FormGroup, Label, Input, Spinner, Badge, CustomInput } from \"reactstrap\";\r\nimport { NumberFormatInput } from \"../NumberFormatInput/NumberFormatInput\";\r\nimport classnames from \"classnames\";\r\nimport { Autosuggest, CircularProgress } from \"..\";\r\nimport style from \"./styles.module.scss\";\r\n\r\nexport const FormNumber = ({\r\n name,\r\n label,\r\n changedColor = false,\r\n value,\r\n onChange,\r\n error,\r\n disabled,\r\n decimalScale,\r\n dataTypeDecimalName,\r\n ...rest\r\n}) => {\r\n return (\r\n \r\n \r\n {label}\r\n \r\n onChange(name, e.value)}\r\n decimalScale={decimalScale}\r\n dataTypeDecimalName={dataTypeDecimalName}\r\n {...rest}\r\n />\r\n
\r\n {error}\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport const FormCheck = ({\r\n name,\r\n label,\r\n changedColor = false,\r\n className = \"\",\r\n value,\r\n onChange,\r\n disabled,\r\n}) => (\r\n \r\n);\r\n\r\nexport const Suggest = ({\r\n name,\r\n label,\r\n changedColor = false,\r\n valueId,\r\n valueName,\r\n fieldId,\r\n fieldName,\r\n fieldExtension,\r\n getSelectItemId,\r\n getSelectItemName,\r\n getSelectItemExtension,\r\n service,\r\n onChange,\r\n error,\r\n disabled,\r\n placeholder\r\n}) => {\r\n const fetchSearch = ({ value }) => {\r\n return service({\r\n text: value,\r\n length: 10,\r\n type: \"\",\r\n })\r\n .then((res) => res.response || res)\r\n .then((res) => res[Object.keys(res)[0]])\r\n .then((values) => values);\r\n };\r\n\r\n const internalOnChange = (method, nextValue) => {\r\n const value = {\r\n [fieldId]: null,\r\n [fieldName]: \"\",\r\n };\r\n if (fieldExtension) {\r\n value[fieldExtension] = \"\";\r\n }\r\n if (method != \"type\" && getSelectItemId(nextValue)) {\r\n value[fieldId] = getSelectItemId(nextValue);\r\n value[fieldName] = getSelectItemName(nextValue);\r\n if (fieldExtension) {\r\n value[fieldExtension] = getSelectItemExtension(nextValue);\r\n }\r\n }\r\n onChange(name, value);\r\n };\r\n\r\n return (\r\n \r\n {label && (\r\n \r\n {label}\r\n \r\n )}\r\n (\r\n
\r\n {getSelectItemName(suggestion)}\r\n
\r\n )}\r\n getSuggestionValue={getSelectItemName}\r\n onSuggestionsFetchRequested={fetchSearch}\r\n value={valueName || \"\"}\r\n inputProps={{\r\n placeholder: label || placeholder,\r\n invalid: !!error,\r\n disabled,\r\n }}\r\n onChange={(m, v) => internalOnChange(m, v)}\r\n />\r\n
\r\n {error}\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport function FormSelect({\r\n label,\r\n changedColor = false,\r\n value,\r\n name,\r\n disabled = false,\r\n onChange = () => {},\r\n selectItems,\r\n getSelectItemId,\r\n getSelectItemName,\r\n error,\r\n description,\r\n}) {\r\n const getValueFromId = (id) => {\r\n for (let i = 0; i < selectItems.length; i += 1) {\r\n if (String(getSelectItemId(selectItems[i])) === String(id)) {\r\n return getSelectItemName(selectItems[i]);\r\n }\r\n }\r\n return \"\";\r\n };\r\n\r\n const isEmpty = (value) => value === undefined || value === \"\";\r\n\r\n return (\r\n \r\n \r\n {label}\r\n \r\n onChange(name, e.target.value, getValueFromId(e.target.value))}\r\n >\r\n {(value === undefined || value === \"\" || value === -1) && (\r\n \r\n )}\r\n {selectItems.map((s) => (\r\n \r\n ))}\r\n \r\n
\r\n {error}\r\n
\r\n {!error && description && (\r\n
\r\n {description}\r\n
\r\n )}\r\n
\r\n );\r\n}\r\nexport const LoadingField = ({ label }) => (\r\n \r\n \r\n
\r\n \r\n Loading values\r\n
\r\n
\r\n);\r\n\r\nexport const LoadingMessage = ({ text }) => (\r\n
\r\n \r\n {text}\r\n
\r\n);\r\n\r\nexport const Status = ({ status }) => {\r\n return (\r\n \r\n {status.toUpperCase()}\r\n \r\n );\r\n};\r\n","import React, { useState, Fragment } from \"react\";\r\nimport { FormGroup, Label, Input, Spinner, Badge, CustomInput, Button } from \"reactstrap\";\r\nimport classnames from \"classnames\";\r\nimport { Autosuggest, CircularProgress } from \"..\";\r\nimport style from \"./styles.module.scss\";\r\nimport { showToast } from \"../../utils/Helper\";\r\nimport { NumberFormatInput } from \"../NumberFormatInput/NumberFormatInput\";\r\n\r\nexport const FormNumber = ({\r\n name,\r\n label,\r\n changedColor = false,\r\n value,\r\n onChange,\r\n error,\r\n disabled,\r\n decimalScale,\r\n dataTypeDecimalName,\r\n ...rest\r\n}) => {\r\n return (\r\n \r\n \r\n {label}\r\n \r\n onChange(name, e.value)}\r\n decimalScale={decimalScale}\r\n dataTypeDecimalName={dataTypeDecimalName}\r\n {...rest}\r\n />\r\n
\r\n {error}\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport const FormCheck = ({\r\n name,\r\n label,\r\n changedColor = false,\r\n className = \"\",\r\n value,\r\n onChange,\r\n disabled,\r\n}) => (\r\n \r\n);\r\n\r\nexport const SuggestIssuer = ({\r\n name,\r\n label,\r\n changedColor = false,\r\n valueId,\r\n valueName,\r\n fieldId,\r\n fieldName,\r\n fieldExtension,\r\n getSelectItemId,\r\n getSelectItemName,\r\n getSelectItemExtension,\r\n services,\r\n serviceCreateIssuer,\r\n onChange,\r\n error,\r\n disabled,\r\n}) => {\r\n const [errorMessage, setErroMessage] = useState(null);\r\n const [issuerName, setIssuerName] = useState(\"\");\r\n const [issuerTypeId, setIssuerTypeId] = useState(1);\r\n const [issuerTypes, setIssuerTypes] = useState([]);\r\n const [issuerDocument, setIssuerDocument] = useState(\"\");\r\n const [showNewIssuer, setShowNewIssuer] = useState(false);\r\n const fetchSearch = ({ value }) => {\r\n return services\r\n .searchIssuer({\r\n text: value,\r\n length: 10,\r\n type: \"\",\r\n })\r\n .then((res) => res.response || res)\r\n .then((res) => res[Object.keys(res)[0]])\r\n .then((values) => values);\r\n };\r\n\r\n const loadIssuerTypes = () => {\r\n if (services && issuerTypes.length === 0) {\r\n services.fetchServiceGetIssuerType().then((res) => {\r\n if (res.SDTIssuerTypeCollection) {\r\n setIssuerTypes(res.SDTIssuerTypeCollection);\r\n }\r\n });\r\n }\r\n };\r\n\r\n const fetchCreateIssuer = (issuerName) => {\r\n if (issuerName != \"\" && issuerName != null) {\r\n setErroMessage(null);\r\n const body = {\r\n newFields: {\r\n IssuerName: issuerName,\r\n IssuerTypeId: issuerTypeId,\r\n IssuerDocument: issuerDocument,\r\n },\r\n };\r\n services.createIssuer(body).then((res) => {\r\n if ((res.result.Code = 200)) {\r\n showToast(\"success: Issuer created successfully\");\r\n onChange(\"IssuerId\", { IssuerId: res.ID });\r\n } else {\r\n setErroMessage(res.result.Message);\r\n }\r\n });\r\n } else {\r\n setErroMessage(\"Issuer name is required\");\r\n }\r\n };\r\n\r\n const internalOnChange = (method, nextValue) => {\r\n const value = {\r\n [fieldId]: null,\r\n [fieldName]: nextValue,\r\n };\r\n if (fieldExtension) {\r\n value[fieldExtension] = \"\";\r\n }\r\n if (method != \"type\" && getSelectItemId(nextValue)) {\r\n value[fieldId] = getSelectItemId(nextValue);\r\n value[fieldName] = getSelectItemName(nextValue);\r\n if (fieldExtension) {\r\n value[fieldExtension] = getSelectItemExtension(nextValue);\r\n }\r\n }\r\n\r\n value[fieldId] === null\r\n ? setErroMessage(\r\n \"This Issuer does not currently exist, choose a Issuer Type and press \" +\r\n `\"Create\"` +\r\n \" to create it.\"\r\n )\r\n : setErroMessage(null);\r\n\r\n value[fieldId] === null ? setIssuerName(nextValue) : setIssuerName(\"\");\r\n onChange(name, value);\r\n };\r\n\r\n //Sets the error variable true or null\r\n //errorMessage ? (error = true) : (error = null);\r\n useState(() => {\r\n loadIssuerTypes();\r\n }, []);\r\n return (\r\n \r\n {label && (\r\n \r\n {label}\r\n \r\n )}\r\n (\r\n
\r\n {getSelectItemName(suggestion)}\r\n
\r\n )}\r\n getSuggestionValue={getSelectItemName}\r\n onSuggestionsFetchRequested={fetchSearch}\r\n value={valueName || \"\"}\r\n inputProps={{\r\n placeholder: label,\r\n invalid: !!error,\r\n disabled,\r\n }}\r\n onChange={(m, v) => internalOnChange(m, v)}\r\n />\r\n
\r\n {error}\r\n
\r\n 0 ? \"block\" : \"none\", marginBottom: \"4px\" }}\r\n >\r\n {errorMessage}\r\n
\r\n {!!(errorMessage && issuerName.length > 0) ? (\r\n \r\n \r\n setIssuerTypeId(e.target.value)}\r\n >\r\n {issuerTypes.map((v) => (\r\n \r\n ))}\r\n \r\n \r\n setIssuerDocument(e.target.value)}\r\n >\r\n {\r\n fetchCreateIssuer(issuerName);\r\n }}\r\n >\r\n Create\r\n \r\n \r\n ) : null}\r\n
\r\n );\r\n};\r\n\r\nexport function FormSelect({\r\n label,\r\n changedColor = false,\r\n value,\r\n name,\r\n disabled = false,\r\n onChange = () => {},\r\n selectItems,\r\n getSelectItemId,\r\n getSelectItemName,\r\n error,\r\n description,\r\n}) {\r\n const getValueFromId = (id) => {\r\n for (let i = 0; i < selectItems.length; i += 1) {\r\n if (String(getSelectItemId(selectItems[i])) === String(id)) {\r\n return getSelectItemName(selectItems[i]);\r\n }\r\n }\r\n return \"\";\r\n };\r\n\r\n const isEmpty = (value) => value === undefined || value === \"\";\r\n\r\n return (\r\n \r\n \r\n {label}\r\n \r\n onChange(name, e.target.value, getValueFromId(e.target.value))}\r\n >\r\n {(value === undefined || value === \"\" || value === -1) && (\r\n \r\n )}\r\n {selectItems.map((s) => (\r\n \r\n ))}\r\n \r\n
\r\n {error}\r\n
\r\n {!error && description && (\r\n
\r\n {description}\r\n
\r\n )}\r\n
\r\n );\r\n}\r\nexport const LoadingField = ({ label }) => (\r\n \r\n \r\n
\r\n \r\n Loading values\r\n
\r\n
\r\n);\r\n\r\nexport const LoadingMessage = ({ text }) => (\r\n
\r\n \r\n {text}\r\n
\r\n);\r\n\r\nexport const Status = ({ status }) => {\r\n return (\r\n \r\n {status.toUpperCase()}\r\n \r\n );\r\n};\r\n","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { Button, Table, UncontrolledDropdown, DropdownToggle, DropdownItem, DropdownMenu } from \"reactstrap\";\r\nimport { CircularProgress } from \"../..\";\r\nimport InfiniteScroll from \"react-infinite-scroller\";\r\nimport style from \"./styles.module.scss\";\r\nimport ModalStatus from \"../Modals/ModalStatus\";\r\nimport ModalClone from \"../Modals/ModalClone\";\r\nimport { Status } from \"../Controls\";\r\nimport { AssetStatus } from \"../types\";\r\nimport HistoryDefault from \"../../Modal/HistoryDefault/HistoryDefault\";\r\nimport { FormattedDate } from \"react-intl\";\r\n\r\nconst Grid = ({ grid, getAssets, getHistory, clone, Link, changeStatus, role, getContractcLosingLeg, isFundManager, fundInstalled, exportAsset, TraderCanCreateAssets }) => {\r\n const [modalStatus, setModalStatus] = useState(false);\r\n const [modalClone, setModalClone] = useState(false);\r\n const [modalHistory, setModalHistory] = useState(false);\r\n\r\n const handleAction = (action, { id, item }) => {\r\n if (action == \"delete\") {\r\n changeStatus({ assetId: id, nextStatus: AssetStatus.Deleted });\r\n } else if (action == \"clone\") {\r\n setModalClone({ item });\r\n } else if (action == \"status\") {\r\n setModalStatus({ item });\r\n } else if (action == \"history\") {\r\n setModalHistory({ process: \"Asset\", processId: id });\r\n } else if (action == \"exportToFunds\") {\r\n exportAsset({id});\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n }\r\n loadMore={getAssets}\r\n hasMore={grid.hasMore}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {grid.assets == null || grid.assets.length == 0 ? (\r\n \r\n ) : (\r\n grid.assets.map((asset) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))\r\n )}\r\n \r\n
TickerNameISIN/CusipStatusActive DateModified Date
\r\n \r\n #{asset.AssetId}\r\n {asset.AssetTicker}\r\n \r\n \r\n {asset.AssetName}\r\n {asset.AssetISIN}\r\n \r\n \r\n {asset.AssetStatus == AssetStatus.Active && (\r\n \r\n )}\r\n \r\n \r\n \r\n
\r\n handleAction(\"history\", { id: asset.AssetId })}\r\n className={style.iconBtn}\r\n >\r\n \r\n \r\n\r\n {(role !== \"advisor\" && (role !== \"trader\" || (role === \"trader\" && TraderCanCreateAssets)))&& (\r\n \r\n e.stopPropagation()}\r\n >\r\n \r\n \r\n\r\n \r\n {role == \"backoffice\" && (\r\n handleAction(\"status\", { item: asset })}>\r\n Change status\r\n \r\n )}\r\n {(role == \"backoffice\" || role === \"trader\") && fundInstalled && !isFundManager && (\r\n handleAction(\"exportToFunds\", { id: asset.AssetId })}>\r\n Export to Funds\r\n \r\n )}\r\n {(role == \"backoffice\" || role === \"trader\") && (\r\n handleAction(\"clone\", { item: asset })}>\r\n Clone\r\n \r\n )}\r\n {role == \"backoffice\" && (\r\n handleAction(\"delete\", { id: asset.AssetId })}>\r\n Delete\r\n \r\n )}\r\n \r\n \r\n )}\r\n
\r\n
\r\n \r\n\r\n {modalStatus && (\r\n setModalStatus(false)}\r\n />\r\n )}\r\n {modalClone && (\r\n setModalClone(false)} />\r\n )}\r\n {modalHistory && (\r\n setModalHistory(false)}\r\n />\r\n )}\r\n \r\n );\r\n};\r\n\r\nconst EmptyTable = ({ loading }) => (\r\n \r\n \r\n {loading ? :

No assets

}\r\n \r\n \r\n);\r\n\r\nconst FormattedDateWithEmpty = ({ value }) =>\r\n value == \"0000-00-00T00:00:00\" || value === null ? null : ;\r\n\r\nexport default Grid;","import React, { useCallback, useState, useEffect } from \"react\";\r\nimport style from \"./styles.module.scss\";\r\nimport {\r\n Col,\r\n Row,\r\n Button,\r\n Input,\r\n InputGroup,\r\n DropdownMenu,\r\n DropdownToggle,\r\n DropdownItem,\r\n UncontrolledDropdown,\r\n Spinner,\r\n} from \"reactstrap\";\r\nimport { debounce } from \"../../../utils/Helper\";\r\nimport { AssetStatus } from \"../types\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\n\r\nconst Toolbar = ({\r\n onChange: rootOnChange,\r\n subClasses,\r\n filter: rootFilter,\r\n counters,\r\n Link,\r\n role,\r\n searchAsset,\r\n TraderCanCreateAssets\r\n}) => {\r\n const [filters, setFilters] = useState(rootFilter);\r\n\r\n const debounceCallback = useCallback(\r\n debounce((nextValues) => rootOnChange(nextValues), 500),\r\n []\r\n );\r\n\r\n const onChange = (fields) => {\r\n const nextValues = {\r\n ...filters,\r\n ...fields,\r\n };\r\n debounceCallback(nextValues);\r\n setFilters(nextValues);\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n\r\n onChange({ text: e.target.value })}\r\n />\r\n
\r\n \r\n\r\n \r\n
\r\n {subClasses ? (\r\n \r\n ) : (\r\n \r\n )}\r\n\r\n \r\n\r\n searchAsset()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Search\r\n \r\n {(role != \"advisor\" && (role !== \"trader\" || (role === \"trader\" && TraderCanCreateAssets))) ? (\r\n \r\n ) : null}\r\n
\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nconst Counter = ({ total }) => (\r\n
\r\n
Assets: {total}
\r\n
\r\n);\r\n\r\nconst DropDownFilterSubClass = ({ value, items, onChange }) => (\r\n \r\n \r\n {!value ? \"All Subclasses\" : items.find((e) => e.SubAssetClassId == value).SubAssetClassName}\r\n \r\n \r\n onChange({ subAssetClass: 0 })}>\r\n {\"All Subclasses\"}\r\n \r\n {items.map((item) => (\r\n onChange({ subAssetClass: item.SubAssetClassId })}\r\n >\r\n {item.SubAssetClassName}\r\n \r\n ))}\r\n \r\n \r\n);\r\n\r\nconst DropDownFilterStatus = ({ value, onChange }) => (\r\n \r\n \r\n {value == \"\" ? \"All Statusses\" : value}\r\n \r\n \r\n onChange({ status: \"\" })}>\r\n {\"All Statusses\"}\r\n \r\n {Object.values(AssetStatus).map((status) => (\r\n onChange({ status: status })}>\r\n {status}\r\n \r\n ))}\r\n \r\n \r\n);\r\n\r\nexport default Toolbar;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"grid\":\"styles-module_grid_1ezBo\",\"dropdown\":\"styles-module_dropdown_1teHe\",\"actions\":\"styles-module_actions_3Tg79\",\"toolbar\":\"styles-module_toolbar_rpbIw\",\"menu\":\"styles-module_menu_CmyU-\",\"export\":\"styles-module_export_3-TbP\",\"totals\":\"styles-module_totals_3NGgb\",\"empty\":\"styles-module_empty_3Dqu6\"};","import React, { Fragment } from \"react\";\r\nimport { Card, CardBody, Row, Col, Button } from \"reactstrap\";\r\nimport style from \"./styles.module.scss\";\r\nimport { LoadingMessage, Status } from \"../Controls\";\r\nimport ModalLoadFromFile from \"../Modals/ModalLoadFromFile\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nconst logoUrl = (symbol) => `https://storage.googleapis.com/iex/api/logos/${symbol}.png`;\r\n\r\nconst Header = ({ services, asset, mode, wizzToggle, Link }) => {\r\n return (\r\n \r\n \r\n {mode != \"new\" ? (\r\n \r\n \r\n {asset ? (\r\n \r\n
\r\n Ticker\r\n {asset.AssetTicker}\r\n
\r\n
\r\n {getDefaultIdentifierLabel(asset)}\r\n {asset.AssetDefaultIdentifierValue}\r\n
\r\n
\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n {asset && (\r\n \r\n
\r\n Name\r\n {asset.AssetName}\r\n
\r\n
\r\n Sub asset class\r\n {asset.SubAssetClassName}\r\n
\r\n
\r\n )}\r\n \r\n \r\n
\r\n {asset && (\r\n
\r\n
\r\n Asset price\r\n \r\n
\r\n
\r\n )}\r\n {asset && (\r\n
\r\n Status\r\n \r\n
\r\n )}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n wizzToggle(\"calculator\", {\r\n id: asset.AssetId,\r\n price: asset.AssetLast,\r\n })\r\n }\r\n >\r\n \r\n Calculator\r\n \r\n \r\n
\r\n ) : (\r\n
\r\n \r\n \r\n

Add new asset

\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n )}\r\n
\r\n
\r\n );\r\n};\r\n\r\nfunction getDefaultIdentifierLabel(asset) {\r\n if (asset.AssetDefaultIdentifier != \"\" && asset.AssetDefaultIdentifier != \"0\") {\r\n const provider =\r\n asset.Synonyms && asset.Synonyms.find((s) => s.DataProviderId == asset.AssetDefaultIdentifier);\r\n\r\n if (provider) {\r\n return provider.DataProviderName;\r\n }\r\n }\r\n\r\n return \"Not defined\";\r\n}\r\n\r\nexport default Header;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"item\":\"styles-module_item_1JbS6\",\"w55\":\"styles-module_w55_1QIoy\",\"w80\":\"styles-module_w80_19S2_\",\"w120\":\"styles-module_w120_gYOW2\",\"prices\":\"styles-module_prices_55umr\",\"status\":\"styles-module_status_2o4SB\",\"label\":\"styles-module_label_1IwgY\"};","import React, { useState } from 'react';\r\n\r\nimport LaddaButton, { SLIDE_LEFT } from 'react-ladda';\r\nimport {\r\n Button,\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Alert,\r\n} from 'reactstrap';\r\n\r\nconst CloneStatus = {\r\n Waiting: 'Waiting',\r\n Cloning: 'Cloning',\r\n Error: 'Error',\r\n};\r\n\r\nconst ModalClone = ({ open, toggle, item, clone }) => {\r\n const [alert, setAlert] = useState(false);\r\n const [status, setStatus] = useState(CloneStatus.Waiting);\r\n\r\n const handleConfirm = () => {\r\n let cloneResult = { success: false };\r\n setStatus(CloneStatus.Cloning);\r\n clone({ id: item.AssetId })\r\n .then(({ result, newId }) => {\r\n if (result.Code == 200) {\r\n cloneResult = { success: true, newId };\r\n } else {\r\n setStatus(CloneStatus.Error);\r\n setAlert(result.Description);\r\n }\r\n return cloneResult;\r\n })\r\n .catch((e) => {\r\n setStatus(CloneStatus.Error);\r\n setAlert(e.message);\r\n return cloneResult;\r\n });\r\n };\r\n return (\r\n \r\n Asset clone confirmation\r\n \r\n {status === CloneStatus.Error && {alert}}\r\n

\r\n Are you sure you want to clone{' '}\r\n \r\n {item.AssetISIN}\r\n {' - '}\r\n {item.AssetTicker}\r\n \r\n ?\r\n

\r\n
\r\n \r\n \r\n \r\n Confirm\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default ModalClone;\r\n","import React from \"react\";\r\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from \"reactstrap\";\r\n\r\nconst ModalConfirm = ({ open, toggle, title, message, onConfirm }) => {\r\n const handleAction = action => {\r\n if (action == \"confirm\") {\r\n onConfirm();\r\n }\r\n toggle();\r\n };\r\n return (\r\n \r\n {title}\r\n \r\n

{message}

\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default ModalConfirm;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport {\r\n Button,\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Spinner,\r\n FormGroup,\r\n Label,\r\n CustomInput,\r\n} from \"reactstrap\";\r\nimport style from \"./styles.module.scss\";\r\nimport LaddaButton, { SLIDE_LEFT } from \"react-ladda\";\r\nimport { FormSelect } from \"../Controls\";\r\n\r\nconst initialFields = {\r\n SettlementCurrencyId: -1,\r\n SettlementCurrencyISO: \"\",\r\n SettlementCurrencyDescription: \"\",\r\n SettlementCurrencyIsDefault: false,\r\n};\r\n\r\nconst ModalCurrency = ({ open, toggle, currency, currencies, onConfirm }) => {\r\n const [fields, setFields] = useState({});\r\n const [errors, setErrors] = useState({});\r\n\r\n const [loading, setLoading] = useState(false);\r\n\r\n useEffect(() => {\r\n if (currency) {\r\n setFields(currency);\r\n } else {\r\n setFields(initialFields);\r\n }\r\n }, [currency]);\r\n\r\n const onChange = (name, value) => {\r\n setFields({ ...fields, [name]: value });\r\n setErrors({ ...errors, [name]: undefined });\r\n };\r\n\r\n const handleSave = async () => {\r\n const errors = validate(fields);\r\n\r\n if (Object.keys(errors).length == 0) {\r\n setLoading(true);\r\n const { currencyISO, currencyDescription } = currencies.find(\r\n (e) => e.currencyId == fields.SettlementCurrencyId\r\n );\r\n let result = await onConfirm({\r\n ...fields,\r\n SettlementCurrencyISO: currencyISO,\r\n SettlementCurrencyDescription: currencyDescription,\r\n });\r\n setLoading(false);\r\n\r\n if (result == 200) {\r\n toggle();\r\n }\r\n }\r\n };\r\n\r\n return (\r\n \r\n {currency ? \"Edit currency\" : \"Add currency\"}\r\n \r\n {currencies ? (\r\n i.currencyId}\r\n getSelectItemName={(i) => `${i.currencyISO} - ${i.currencyDescription}`}\r\n value={fields.SettlementCurrencyId}\r\n disabled={currency ? true : false}\r\n onChange={onChange}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n onChange(\"SettlementCurrencyIsDefault\", e.target.checked)}\r\n />\r\n \r\n \r\n \r\n \r\n handleSave()}\r\n data-style={SLIDE_LEFT}\r\n >\r\n \r\n Save\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nfunction validate(fields) {\r\n Object.entries(fields).forEach(([name, value]) => {});\r\n\r\n return {};\r\n}\r\n\r\nexport default ModalCurrency;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from \"reactstrap\";\r\nimport style from \"./styles.module.scss\";\r\nimport LaddaButton, { SLIDE_LEFT } from \"react-ladda\";\r\nimport { LoadingField, FormSelect } from \"../Controls\";\r\n\r\nconst initialFields = {};\r\n\r\nconst ModalGroup = ({ open, toggle, services, group, onConfirm }) => {\r\n const [groups, setGroups] = useState(false);\r\n const [values, setValues] = useState([]);\r\n\r\n const [fields, setFields] = useState(initialFields);\r\n const [errors, setErrors] = useState({});\r\n const [loading, setLoading] = useState(false);\r\n\r\n useEffect(() => {\r\n if (group) {\r\n setFields(group);\r\n } else {\r\n setFields(initialFields);\r\n }\r\n }, [group]);\r\n\r\n useEffect(() => {\r\n if (open) {\r\n services\r\n .assetGroups({})\r\n .then((res) => res.items)\r\n .then((items) => {\r\n setGroups(items);\r\n\r\n if (!group) {\r\n if (items.length > 0) {\r\n setFields({ ...fields, AssetGroupId: items[0].AssetGroupId });\r\n }\r\n }\r\n });\r\n }\r\n }, [open]);\r\n\r\n useEffect(() => {\r\n if (fields.AssetGroupId) {\r\n services\r\n .assetGroupValues({ groupId: fields.AssetGroupId })\r\n .then((res) => res.items)\r\n .then((items) => setValues(items));\r\n }\r\n }, [fields.AssetGroupId]);\r\n\r\n const onChange = (name, value) => {\r\n setFields({ ...fields, [name]: value });\r\n setErrors({ ...errors, [name]: undefined });\r\n };\r\n\r\n const handleSave = async () => {\r\n const errors = validate(fields);\r\n\r\n if (Object.keys(errors).length == 0) {\r\n setLoading(true);\r\n const { AssetGroupName } = groups.find((e) => e.AssetGroupId == fields.AssetGroupId);\r\n let result = await onConfirm({\r\n ...fields,\r\n AssetGroupName,\r\n });\r\n setLoading(false);\r\n\r\n if (result == 200) {\r\n toggle();\r\n }\r\n }\r\n };\r\n\r\n return (\r\n \r\n Add asset group\r\n \r\n {groups ? (\r\n i.AssetGroupId}\r\n getSelectItemName={(i) => i.AssetGroupName}\r\n value={fields.AssetGroupId}\r\n onChange={onChange}\r\n />\r\n ) : (\r\n \r\n )}\r\n {values ? (\r\n i.Value}\r\n getSelectItemName={(i) => i.Value}\r\n value={fields.AssetGroupValue}\r\n onChange={onChange}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n handleSave()}\r\n data-style={SLIDE_LEFT}\r\n >\r\n \r\n Save\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nfunction validate(fields) {\r\n Object.entries(fields).forEach(([name, value]) => {});\r\n\r\n return {};\r\n}\r\n\r\nexport default ModalGroup;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport {\r\n Button,\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n FormGroup,\r\n Label,\r\n Input,\r\n FormText,\r\n Form,\r\n Alert,\r\n Spinner,\r\n} from \"reactstrap\";\r\nconst LoadFromFile = ({ newAssetFromFile }) => {\r\n const [isOpen, setIsOpen] = useState(false);\r\n const [loading, setLoading] = useState(false);\r\n const [file, setFile] = useState({});\r\n const [warnings, setWarnings] = useState([]);\r\n const [errors, setErrors] = useState([]);\r\n const [newAssetId, setNewAssetId] = useState(-1);\r\n const saveAndContinue = () => {\r\n setLoading(true);\r\n\r\n newAssetFromFile(file)\r\n .then((r) => {\r\n const w = r.response.Warning;\r\n setWarnings(w.split(\";\").filter((i) => i.length > 0));\r\n\r\n if (r.response.result.Code != 200) {\r\n const e = r.response.result.Description;\r\n setErrors(e.split(\";\").filter((i) => i.length > 0));\r\n } else {\r\n setNewAssetId(r.response.assetId);\r\n }\r\n setLoading(false);\r\n })\r\n .catch((err) => {\r\n setLoading(false);\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n setWarnings([]);\r\n setErrors([]);\r\n setNewAssetId(-1);\r\n }, [isOpen]);\r\n\r\n const handleFileInput = (event) => {\r\n setWarnings([]);\r\n setErrors([]);\r\n setNewAssetId(-1);\r\n\r\n const file = event.target.files[0];\r\n const name = file.name.substring(0, file.name.indexOf(\".\"));\r\n const extension = file.name.substring(file.name.indexOf(\".\") + 1, file.name.length);\r\n if (file.size <= 5242880) {\r\n const reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n reader.onload = () => {\r\n const fileBlob = reader.result.split(\",\")[1];\r\n setFile({\r\n //id: Math.random().toString(36).substring(7),\r\n blob: fileBlob,\r\n extension,\r\n name,\r\n });\r\n };\r\n reader.onerror = (error) => {\r\n throw error;\r\n };\r\n } else {\r\n alert(\"File is too big! (Max. 5MB)\");\r\n event.target = \"\";\r\n }\r\n };\r\n\r\n const goToAsset = (assetId) => {\r\n window.location.href = window.location.href + \"/\" + assetId;\r\n window.location.reload();\r\n };\r\n\r\n return (\r\n
\r\n \r\n setIsOpen(false)} isOpen={isOpen}>\r\n setIsOpen(false)}>Load asset from XLS\r\n \r\n
\r\n \r\n \r\n \r\n The file extension must be xls, xlsx or xlsm.\r\n \r\n
\r\n\r\n {newAssetId >= 0 && (\r\n \r\n

Asset added succesfully!

\r\n

Click on \"Go to Asset\" to view the new asset details.

\r\n
\r\n )}\r\n\r\n {errors.length > 0 && (\r\n \r\n

Errors

\r\n

Some fields are missing or unformatted. The asset cannot be created.

\r\n\r\n
    \r\n {errors.map((w) => (\r\n
  • {w}
  • \r\n ))}\r\n
\r\n
\r\n )}\r\n\r\n {warnings.length > 0 && (\r\n \r\n

Warnings

\r\n
    \r\n {warnings.map((w) => (\r\n
  • {w}
  • \r\n ))}\r\n
\r\n
\r\n )}\r\n
\r\n \r\n {loading && (\r\n \r\n Loading...\r\n \r\n )}\r\n {newAssetId >= 0 ? (\r\n \r\n {\r\n goToAsset(newAssetId);\r\n }}\r\n color=\"success\"\r\n >\r\n {\" \"}\r\n Go to asset{\" \"}\r\n \r\n \r\n ) : (\r\n \r\n )}{\" \"}\r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default LoadFromFile;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from \"reactstrap\";\r\n\r\nconst ModalMessage = ({ open, toggle, title, message, onAction }) => {\r\n return (\r\n \r\n {title}\r\n \r\n

{message}

\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default ModalMessage;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter, Row, Col, Container } from \"reactstrap\";\r\nimport { FormNumber } from \"../Controls\";\r\nimport LaddaButton, { SLIDE_LEFT } from \"react-ladda\";\r\nimport style from \"./styles.module.scss\";\r\nimport { FormField } from \"../../..\";\r\nimport { dateIsEmpty, valueIsEmpty } from \"../../../utils/Helper\";\r\nimport { showToast } from \"../../../utils/Helper\";\r\n\r\nconst initialFields = {\r\n AssetCouponDate: today(),\r\n AssetNewCouponDate: today(),\r\n AssetCouponRate: \"\",\r\n AssetCapitalizationRate: \"\",\r\n AssetSink: \"\",\r\n AssetPrincipalFactor: \"\",\r\n AssetAccrualFactor: \"\",\r\n AssetCouponNumber: \"\",\r\n AssetExpectedPayment: \"\",\r\n quantity: \"\",\r\n realAccruals: \"\",\r\n expectedAccruals: \"\",\r\n};\r\n\r\nconst ModalPayments = ({ open, toggle, payment, onConfirm, assetId, services, asset }) => {\r\n const [fields, setFields] = useState(initialFields);\r\n const [errors, setErrors] = useState({});\r\n const [loading, setLoading] = useState(false);\r\n const [showAdvanced, setShowAdvanced] = useState(false);\r\n\r\n useEffect(() => {\r\n if (!open) {\r\n setShowAdvanced(false);\r\n }\r\n }, [open]);\r\n\r\n useEffect(() => {\r\n if (payment) {\r\n setFields({ ...payment, AssetNewCouponDate: payment.AssetCouponDate });\r\n setErrors({});\r\n } else {\r\n setFields(initialFields);\r\n setErrors({});\r\n }\r\n }, [payment]);\r\n\r\n const onChange = (name, value) => {\r\n setFields({ ...fields, [name]: value });\r\n setErrors({ ...errors, [name]: undefined });\r\n };\r\n\r\n const handleOnChangeCouponDate = (name, value) => {\r\n if (payment) {\r\n setFields({ ...fields, AssetNewCouponDate: value });\r\n } else {\r\n onChange(\"AssetCouponDate\", value);\r\n }\r\n };\r\n\r\n const handleRecalculate = async () => {\r\n const nextErrors = validateRecalculate(fields);\r\n setErrors(nextErrors);\r\n\r\n if (Object.keys(nextErrors).length === 0) {\r\n setLoading(true);\r\n const body = {\r\n assetId: assetId,\r\n date: fields.AssetCouponDate,\r\n quantity: fields.quantity,\r\n };\r\n\r\n try {\r\n const { result, calculator } = await services.calculator(body);\r\n setLoading(false);\r\n\r\n if (result.Code === 400) {\r\n showToast(result.Description, true);\r\n } else {\r\n let expectedAccruals = calculator.intrinsecaccruals;\r\n\r\n if (asset.CurrencyISO === \"PYG\") {\r\n expectedAccruals = Math.round(expectedAccruals);\r\n }\r\n\r\n setFields((prevFields) => ({\r\n ...prevFields,\r\n expectedAccruals,\r\n AssetAccrualFactor: calculateAccrualFactor(prevFields.realAccruals, expectedAccruals),\r\n }));\r\n }\r\n } catch (error) {\r\n setLoading(false);\r\n showToast(\"Error recalculating\", true);\r\n }\r\n }\r\n };\r\n\r\n const calculateAccrualFactor = (realAccruals, expectedAccruals) => {\r\n if (!expectedAccruals) return 0;\r\n return parseFloat(realAccruals || 0) / expectedAccruals;\r\n };\r\n\r\n const handleSave = async () => {\r\n const errors = validate(fields);\r\n setErrors(errors);\r\n if (Object.keys(errors).length === 0) {\r\n setLoading(true);\r\n const result = await onConfirm({\r\n ...fields,\r\n AssetNewCouponDate: getDateAsString(fields.AssetNewCouponDate),\r\n AssetCouponDate: getDateAsString(fields.AssetCouponDate),\r\n });\r\n setLoading(false);\r\n\r\n if (result === 200) {\r\n toggle();\r\n }\r\n }\r\n };\r\n\r\n const toggleAdvanced = () => setShowAdvanced(!showAdvanced);\r\n\r\n return (\r\n \r\n {payment ? \"Edit Payment\" : \"Add Payment\"}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {showAdvanced && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n handleSave()}\r\n data-style={SLIDE_LEFT}\r\n >\r\n \r\n Save\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nfunction parseDate(date) {\r\n if (date instanceof Date) {\r\n return date.toISOString();\r\n }\r\n\r\n if (date.indexOf(\"T\") > -1) {\r\n return date;\r\n }\r\n\r\n if (!date || date === \"\" || date === \"0000-00-00\" || dateIsEmpty(date)) {\r\n return \"\";\r\n }\r\n\r\n return new Date(`${date}T00:00`).toISOString();\r\n}\r\n\r\nfunction getDateAsString(date) {\r\n if (date instanceof Date) {\r\n return date.toISOString().substr(0, 10);\r\n }\r\n\r\n if (!date || date === \"\" || date === \"0000-00-00\" || dateIsEmpty(date)) {\r\n return \"\";\r\n }\r\n\r\n return date.substr(0, 10);\r\n}\r\n\r\nfunction validate(fields) {\r\n const errors = {};\r\n\r\n if (dateIsEmpty(fields.AssetCouponDate)) {\r\n errors.AssetCouponDate = \"Field is required\";\r\n }\r\n if (valueIsEmpty(fields.AssetCouponRate)) {\r\n errors.AssetCouponRate = \"Field is required\";\r\n }\r\n if (valueIsEmpty(fields.AssetCapitalizationRate)) {\r\n errors.AssetCapitalizationRate = \"Field is required\";\r\n }\r\n if (valueIsEmpty(fields.AssetSink)) {\r\n errors.AssetSink = \"Field is required\";\r\n }\r\n if (valueIsEmpty(fields.AssetPrincipalFactor)) {\r\n errors.AssetPrincipalFactor = \"Field is required\";\r\n }\r\n if (valueIsEmpty(fields.AssetCouponNumber)) {\r\n errors.AssetCouponNumber = \"Field is required\";\r\n }\r\n if (valueIsEmpty(fields.AssetExpectedPayment)) {\r\n errors.AssetExpectedPayment = \"Field is required\";\r\n }\r\n\r\n return errors;\r\n}\r\n\r\nfunction today() {\r\n return new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate());\r\n}\r\n\r\nfunction validateRecalculate(fields) {\r\n const errors = {};\r\n\r\n if (dateIsEmpty(fields.AssetCouponDate)) {\r\n errors.AssetCouponDate = \"Field is required\";\r\n }\r\n\r\n if (valueIsEmpty(fields.quantity)) {\r\n errors.quantity = \"Field is required\";\r\n }\r\n\r\n if (valueIsEmpty(fields.realAccruals)) {\r\n errors.realAccruals = \"Field is required\";\r\n }\r\n\r\n return errors;\r\n}\r\n\r\nexport default ModalPayments;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport {\r\n Button,\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Row,\r\n Col,\r\n Input,\r\n Label,\r\n Container,\r\n Spinner,\r\n FormGroup,\r\n CustomInput,\r\n} from \"reactstrap\";\r\nimport { FormCheck, FormNumber, FormSelect } from \"../Controls\";\r\nimport LaddaButton, { SLIDE_LEFT } from \"react-ladda\";\r\nimport style from \"./styles.module.scss\";\r\nimport { CheckFormField, FormField } from \"../../..\";\r\nimport { toDateLocal } from \"../../../utils/Helper\";\r\nimport { NumberFormatInput } from \"../../NumberFormatInput/NumberFormatInput\";\r\n\r\nconst initialFields = {\r\n AssetQuoteDate: new Date(),\r\n QuoteCurrencyId: \"\",\r\n AssetQuotePrice: \"\",\r\n AssetQuoteAccountingPrice: \"\",\r\n AssetQuoteAdjustedPrice: \"\",\r\n AssetQuoteOpenPrice: \"\",\r\n AssetQuoteClosePrice: \"\",\r\n AssetQuotePriceIsDirty: true,\r\n};\r\n\r\nconst ModalQuote = ({ open, toggle, quote, currencies,quotesDirty, onConfirm, decimalScale }) => {\r\n const [fields, setFields] = useState(initialFields);\r\n const [errors, setErrors] = useState({});\r\n\r\n const [loading, setLoading] = useState(false);\r\n\r\n useEffect(() => {\r\n if (quote) {\r\n setFields(quote);\r\n } else {\r\n setFields({ ...initialFields, AssetQuotePriceIsDirty: quotesDirty });\r\n\r\n }\r\n }, [quote]);\r\n\r\n const onChange = (name, value) => {\r\n if (name == \"AssetQuotePrice\") {\r\n setFields({\r\n ...fields,\r\n [name]: value,\r\n AssetQuoteAccountingPrice: value,\r\n AssetQuoteOpenPrice: value,\r\n AssetQuoteClosePrice: value,\r\n AssetQuoteAdjustedPrice: value,\r\n });\r\n } else {\r\n setFields({ ...fields, [name]: value });\r\n }\r\n setErrors({ ...errors, [name]: undefined });\r\n };\r\n\r\n const handleSave = async () => {\r\n const errors = validate(fields);\r\n setErrors(errors);\r\n\r\n if (Object.keys(errors).length == 0) {\r\n setLoading(true);\r\n const { currencyISO, currencyDescription } = currencies.find(\r\n (e) => e.currencyId == fields.QuoteCurrencyId\r\n );\r\n const result = await onConfirm({\r\n ...fields,\r\n QuoteCurrencyISO: currencyISO,\r\n QuoteCurrencyDescription: currencyDescription,\r\n AssetQuoteDate: new Date(parseDate(fields.AssetQuoteDate)).toDateLocal(),\r\n });\r\n setLoading(false);\r\n\r\n if (result == 200) {\r\n toggle();\r\n setFields(initialFields);\r\n }\r\n }\r\n };\r\n\r\n const labelStyle = {\r\n fontWeight: \"500\",\r\n marginBottom: \"5px\",\r\n color: \"#455a64 !important\",\r\n fontSize: \"13.5px !important\",\r\n };\r\n\r\n return (\r\n \r\n {quote ? \"Edit Quote\" : \"Add Quote\"}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {currencies ? (\r\n i.currencyId}\r\n getSelectItemName={(i) => `${i.currencyISO} - ${i.currencyDescription}`}\r\n value={fields.QuoteCurrencyId}\r\n error={errors.QuoteCurrencyId}\r\n disabled={false}\r\n onChange={onChange}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n onChange(\"AssetQuotePrice\", isNaN(e.floatValue) ? e.value : e.floatValue)\r\n }\r\n error={errors.AssetQuotePrice}\r\n decimalScale={decimalScale}\r\n dataTypeDecimalName=\"price\"\r\n />\r\n \r\n \r\n \r\n \r\n onChange(\"AssetQuoteAccountingPrice\", isNaN(e.floatValue) ? e.value : e.floatValue)\r\n }\r\n error={errors.AssetQuoteAccountingPrice}\r\n decimalScale={decimalScale}\r\n dataTypeDecimalName=\"price\"\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n onChange(\"AssetQuoteOpenPrice\", isNaN(e.floatValue) ? e.value : e.floatValue)\r\n }\r\n error={errors.AssetQuoteAccountingPrice}\r\n decimalScale={decimalScale}\r\n dataTypeDecimalName=\"price\"\r\n />\r\n \r\n \r\n \r\n \r\n onChange(\"AssetQuoteClosePrice\", isNaN(e.floatValue) ? e.value : e.floatValue)\r\n }\r\n error={errors.AssetQuoteClosePrice}\r\n decimalScale={decimalScale}\r\n dataTypeDecimalName=\"price\"\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange(\"AssetQuoteXIRR\", isNaN(e.floatValue) ? e.value : e.floatValue)\r\n }\r\n error={errors.AssetQuoteXIRR}\r\n dataTypeDecimalName=\"percentage\"\r\n />\r\n \r\n \r\n \r\n \r\n onChange(\"AssetQuoteDuration\", isNaN(e.floatValue) ? e.value : e.floatValue)\r\n }\r\n error={errors.AssetQuoteDuration}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n\r\n \r\n \r\n \r\n onChange(\"AssetQuoteAdjustedPrice\", isNaN(e.floatValue) ? e.value : e.floatValue)\r\n }\r\n error={errors.AssetQuoteAdjustedPrice}\r\n decimalScale={decimalScale}\r\n dataTypeDecimalName=\"price\"\r\n />\r\n \r\n \r\n
\r\n \r\n onChange(\"AssetQuotePriceIsDirty\", e.target.checked)}\r\n \r\n />\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n handleSave()}\r\n data-style={SLIDE_LEFT}\r\n >\r\n \r\n Save\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport function parseDate(date) {\r\n const dateRegex = /\\b\\w{3} \\d{2} \\d{4}\\b/;\r\n const matchedDate = String(date).match(dateRegex);\r\n date = matchedDate ? matchedDate[0] : date;\r\n if (date instanceof Date) {\r\n return date.toISOString();\r\n }\r\n\r\n if (date.indexOf(\"T\") > -1) {\r\n return date;\r\n }\r\n\r\n if (!date || date == \"\" || date == \"0000-00-00\") {\r\n return \"\";\r\n }\r\n try {\r\n return new Date(`${date}T00:00`).toISOString();\r\n } catch (e) {\r\n return date;\r\n }\r\n}\r\n\r\nfunction validate(fields) {\r\n const errors = {};\r\n\r\n Object.entries(fields).forEach(([name, value]) => {\r\n if (\r\n name !== \"QuoteCurrencyISO\" &&\r\n name !== \"QuoteCurrencyDescription\" &&\r\n (value === undefined || value === \"\")\r\n ) {\r\n errors[name] = \"Required field\";\r\n }\r\n if (name === \"QuoteCurrencyId\" && value === \"0\") errors[name] = \"Required field\";\r\n });\r\n\r\n return errors;\r\n}\r\n\r\nexport default ModalQuote;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport LaddaButton, { SLIDE_LEFT } from \"react-ladda\";\r\nimport {\r\n Button,\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Spinner,\r\n FormGroup,\r\n CustomInput,\r\n} from \"reactstrap\";\r\n\r\nimport style from \"./styles.module.scss\";\r\nimport { FormSelect } from \"../Controls\";\r\nimport { FormField } from \"../../..\";\r\n\r\nconst initialFields = {\r\n DataProviderId: \"\",\r\n DataProviderName: \"\",\r\n AssetProviderName: \"\",\r\n AssetProviderTradePricing: false,\r\n AssetProviderAccountingPricing: false,\r\n};\r\n\r\nconst ModalSinonyms = ({ open, toggle, services, synonym, dataProviders, onConfirm }) => {\r\n const [fields, setFields] = useState(initialFields);\r\n const [errors, setErrors] = useState({});\r\n\r\n const [loading, setLoading] = useState(false);\r\n\r\n useEffect(() => {\r\n if (synonym) {\r\n setFields(synonym);\r\n } else {\r\n setFields(initialFields);\r\n }\r\n }, [synonym]);\r\n\r\n const onChange = (name, value) => {\r\n setFields({ ...fields, [name]: value });\r\n setErrors({ ...errors, [name]: undefined });\r\n };\r\n\r\n const handleSave = async () => {\r\n const errors = validate(fields);\r\n\r\n if (Object.keys(errors).length == 0) {\r\n setLoading(true);\r\n const dataProvider = dataProviders.find((dp) => dp.DataProviderId == fields.DataProviderId);\r\n const result = await onConfirm({ ...fields, ...dataProvider });\r\n setLoading(false);\r\n\r\n if (result == 200) {\r\n toggle();\r\n }\r\n }\r\n };\r\n\r\n return (\r\n \r\n {synonym ? \"Edit Sinonym\" : \"Add Sinonym\"}\r\n \r\n {dataProviders ? (\r\n i.DataProviderId}\r\n getSelectItemName={(i) => i.DataProviderName}\r\n value={fields.DataProviderId}\r\n disabled={synonym ? true : false}\r\n onChange={onChange}\r\n />\r\n ) : (\r\n \r\n )}\r\n\r\n \r\n\r\n \r\n onChange(\"AssetProviderTradePricing\", e.target.checked)}\r\n />\r\n \r\n\r\n \r\n onChange(\"AssetProviderAccountingPricing\", e.target.checked)}\r\n />\r\n \r\n \r\n \r\n \r\n handleSave()}\r\n data-style={SLIDE_LEFT}\r\n >\r\n \r\n Save\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nfunction validate(fields) {\r\n Object.entries(fields).forEach(([name, value]) => {});\r\n\r\n return {};\r\n}\r\n\r\nexport default ModalSinonyms;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport {\r\n Button,\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Container,\r\n Row,\r\n Col,\r\n Table,\r\n Alert,\r\n Label,\r\n Input,\r\n} from \"reactstrap\";\r\nimport style from \"./styles.module.scss\";\r\nimport { Status, FormSelect, FormNumber } from \"../Controls\";\r\nimport LaddaButton, { SLIDE_LEFT } from \"react-ladda\";\r\nimport { AssetStatus } from \"../types\";\r\nimport { NumberFormatInput } from \"../../NumberFormatInput/NumberFormatInput\";\r\nimport { toFormatDate } from \"../../../utils\";\r\n\r\nconst ModalStatus = ({ open, toggle, item, changeStatus, getContractcLosingLeg }) => {\r\n const [alert, setAlert] = useState(false);\r\n const [loading, setLoading] = useState(false);\r\n const [nextStatus, setNextStatus] = useState(item.AssetStatus);\r\n const [contractClosingLeg, setContractClosingLeg] = useState();\r\n const [alreadyLoaded, setAlreadyLoaded] = useState(false);\r\n const [alreadyConfirmed, setAlreadyConfirmed] = useState(false);\r\n const [contractClosingLegModified, setContractClosingLegModified] = useState(false);\r\n const [showClosingLeg, setShowClosingLeg] = useState(false);\r\n const initialDate = toFormatDate(new Date());\r\n const [maturityDate, setMaturityDate] = useState();\r\n\r\n useEffect(() => {\r\n if (open) {\r\n setAlert(false);\r\n setLoading(false);\r\n getClosingLeg();\r\n setMaturityDate(initialDate);\r\n }\r\n }, [open]);\r\n\r\n const getClosingLeg = () => {\r\n if (!alreadyLoaded) {\r\n setAlreadyLoaded(true);\r\n getContractcLosingLeg(item.AssetId).then((res) => {\r\n if (res) {\r\n res.ContractClosingLeg != 0\r\n ? (setContractClosingLeg(res.ContractClosingLeg), setShowClosingLeg(true))\r\n : (setContractClosingLeg(0), setShowClosingLeg(false));\r\n }\r\n });\r\n }\r\n };\r\n\r\n const handleChangeStatus = () => {\r\n if (nextStatus == \"Matured\" && contractClosingLegModified) {\r\n let confirmation = confirm(\"Are you sure you want to change the closing value?\");\r\n if (confirmation) {\r\n confirmChangeStatus(contractClosingLeg);\r\n }\r\n } else {\r\n setLoading(true);\r\n setAlert(false);\r\n confirmChangeStatus();\r\n }\r\n };\r\n\r\n const confirmChangeStatus = (closingLeg) => {\r\n changeStatus({\r\n assetId: item.AssetId,\r\n nextStatus,\r\n closingleg: closingLeg,\r\n maturityDate: maturityDate,\r\n })\r\n .then((res) => res.result)\r\n .then((result) => {\r\n setLoading(false);\r\n if (result.Code == 200) {\r\n toggle();\r\n } else {\r\n setAlert(result.Description);\r\n }\r\n });\r\n };\r\n\r\n const quantityOnClick = (e) => {\r\n setContractClosingLegModified(true);\r\n e != \"\" ? setContractClosingLeg(e.target.value) : \"\";\r\n };\r\n\r\n const dateOnClick = (e) => {\r\n setMaturityDate(e);\r\n };\r\n\r\n return (\r\n \r\n Change asset status\r\n \r\n \r\n \r\n \r\n {item.AssetTicker}\r\n \r\n \r\n Current status\r\n \r\n \r\n \r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={nextStatus}\r\n onChange={(name, value) => {\r\n setNextStatus(value), setAlreadyLoaded(false), setAlreadyConfirmed(false);\r\n }}\r\n />\r\n {showClosingLeg && nextStatus == \"Matured\" && (\r\n
\r\n \r\n {\r\n quantityOnClick(e);\r\n }}\r\n dataTypeDecimalName=\"quantity\"\r\n />\r\n
\r\n )}\r\n {nextStatus == \"Matured\" && item.AssetStatus != \"Matured\" && (\r\n
\r\n \r\n {\r\n dateOnClick(e.target.value);\r\n }}\r\n />\r\n
\r\n )}\r\n {\"\"}\r\n {alert && (\r\n \r\n {alert.split(\".\").map((line, index) => (\r\n \r\n {line}.\r\n \r\n ))}\r\n \r\n )}\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n Change Status\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nconst AssetStatusValues = Object.entries(AssetStatus).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nexport default ModalStatus;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from \"reactstrap\";\r\nimport LaddaButton, { SLIDE_LEFT } from \"react-ladda\";\r\nimport { LoadingField, FormSelect } from \"../Controls\";\r\nimport style from \"./styles.module.scss\";\r\n\r\nconst initialFields = {\r\n TAXId: -1,\r\n};\r\n\r\nconst ModalTax = ({ open, toggle, tax, services, onConfirm }) => {\r\n const [taxes, setTaxes] = useState(false);\r\n\r\n const [fields, setFields] = useState({});\r\n const [errors, setErrors] = useState({});\r\n const [loading, setLoading] = useState(false);\r\n\r\n useEffect(() => {\r\n if (open) {\r\n services\r\n .taxes({})\r\n .then((res) => res.items)\r\n .then((items) => setTaxes(items));\r\n }\r\n }, [open]);\r\n\r\n useEffect(() => {\r\n if (tax) {\r\n setFields(tax);\r\n } else {\r\n setFields(initialFields);\r\n }\r\n }, [tax]);\r\n\r\n const onChange = (name, value) => {\r\n setFields({ ...fields, [name]: value });\r\n setErrors({ ...errors, [name]: undefined });\r\n };\r\n\r\n const handleSave = async () => {\r\n const errors = validate(fields);\r\n\r\n if (Object.keys(errors).length == 0) {\r\n setLoading(true);\r\n const tax = taxes.find((tx) => tx.TAXId == fields.TAXId);\r\n const result = await onConfirm({ ...fields, ...tax });\r\n setLoading(false);\r\n\r\n if (result == 200) {\r\n toggle();\r\n }\r\n }\r\n };\r\n\r\n return (\r\n \r\n Add tax\r\n \r\n {taxes ? (\r\n i.TAXId}\r\n getSelectItemName={(i) => i.TAXName}\r\n value={fields.TAXId}\r\n onChange={onChange}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n handleSave()}\r\n data-style={SLIDE_LEFT}\r\n >\r\n \r\n Save\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nfunction validate(fields) {\r\n Object.entries(fields).forEach(([name, value]) => {});\r\n\r\n return {};\r\n}\r\n\r\nexport default ModalTax;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"styles-module_modal_1EyUQ\",\"container\":\"styles-module_container_Pu6Np\",\"payments\":\"styles-module_payments_1AY2e\",\"checkbox\":\"styles-module_checkbox_2aopD\",\"recalculate\":\"styles-module_recalculate_2xA4v\",\"quantityInput\":\"styles-module_quantityInput_2-Lqz\"};","import React, { Fragment } from \"react\";\r\nimport { Nav, NavItem, NavLink } from \"reactstrap\";\r\nimport style from \"./styles.module.scss\";\r\nimport classnames from \"classnames\";\r\nimport { TabName, WizzMode } from \"./types\";\r\n\r\nconst Navigation = ({ active, toggle, mode, role, asset }) => {\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst Mode = {\r\n New: \"New\",\r\n Edit: \"Edit\",\r\n View: \"View\",\r\n};\r\n\r\nexport default Navigation;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Table } from \"reactstrap\";\r\nimport { LoadingMessage } from \"../../Controls\";\r\nimport { DateField } from \"../../../../utils\";\r\nimport { addMonth } from \"./../../../Modal/ActivityV2/helper\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport style from \"./styles.module.scss\";\r\n\r\nconst Agencies = ({ assetId, services, wizzToggle, wizzOnChange }) => {\r\n const [agencies, setAgencies] = useState(false);\r\n const [active, setActive] = useState(false);\r\n const [filter, setFilter] = useState({\r\n FromDate: addMonth(new Date(), -31).toString(),\r\n ToDate: new Date().toString(),\r\n });\r\n\r\n useEffect(() => {\r\n setAgencies(false);\r\n setActive(false);\r\n services.creditsRatings({ assetId, filter }).then(({ result, creditsRatings }) => {\r\n setAgencies(creditsRatings);\r\n });\r\n }, [filter]);\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
From Date
\r\n
\r\n setFilter({ ...filter, FromDate: value })}\r\n value={filter.FromDate || new Date().toLocaleDateString(\"en\")}\r\n />\r\n
\r\n
\r\n
\r\n
To Date
\r\n
\r\n setFilter({ ...filter, ToDate: value })}\r\n value={filter.ToDate || new Date().toLocaleDateString(\"en\")}\r\n />\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {agencies ? (\r\n \r\n {agencies.map((date) => (\r\n \r\n {date.Agencies.map((ag, index) => (\r\n \r\n setActive(active === getRowKey(ag, index) || getRowKey(ag, index))}\r\n >\r\n \r\n \r\n \r\n \r\n {active === getRowKey(ag, index) && (\r\n \r\n \r\n \r\n )}\r\n \r\n ))}\r\n \r\n ))}\r\n {agencies.length == 0 && }\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n
DateAgency detail
\r\n \r\n {active === getRowKey(ag, index) ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n {ag.CreditRatingAgencyName}
\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nconst Scores = ({ scores }) => (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n {scores.map((score) => (\r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n
ScoreScore value
{score.CreditRatingAgencyScore}{score.CreditRatingAgencyScoreValue}
\r\n
\r\n);\r\n\r\nfunction getRowKey(agency, index) {\r\n return `${agency.CreditRatingAgencyId}-${agency.CreditRatingAgencyDate}-${index}`;\r\n}\r\n\r\nconst EmptyOrLoading = ({ loading }) => (\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n No asset agencies data\r\n )}\r\n \r\n \r\n);\r\n\r\nexport default Agencies;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"filter\":\"styles-module_filter_2JlHC\",\"field\":\"styles-module_field_2wrlg\",\"label\":\"styles-module_label_2Eu1H\",\"input\":\"styles-module_input_3Rx-v\",\"agencies\":\"styles-module_agencies_15eTS\",\"scores\":\"styles-module_scores_2TMnT\"};","import React, { useState, Fragment, useEffect } from \"react\";\r\nimport {\r\n Table,\r\n Button,\r\n Input,\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Row,\r\n Col,\r\n Container,\r\n} from \"reactstrap\";\r\nimport LaddaButton, { ZOOM_OUT, XS, SLIDE_LEFT } from \"react-ladda\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport InfiniteScroll from \"react-infinite-scroller\";\r\nimport { NumberFormatInput } from \"../../../NumberFormatInput/NumberFormatInput\";\r\nimport { Field, Combobox, Switch, Symbol } from \"../../../Modal/Order/Field/Field\";\r\nimport { LoadingMessage } from \"../../Controls\";\r\nimport { Mode, WizzMode } from \"../../types\";\r\nimport { useEntities } from \"../../Wizzard\";\r\nimport { CircularProgress } from \"../../..\";\r\n\r\nimport style from \"./../../styles.module.scss\";\r\n\r\nconst Contracts = ({ mode, services, assetContracts, wizzToggle, wizzOnChange, assetId, decimalScale }) => {\r\n const [readonly, setReadonly] = useState(mode == WizzMode.View);\r\n const [recalculating, setRecalculating] = useState(false);\r\n const [modalPayments, setModalPayments] = useState({ open: false });\r\n const [modalContract, setModalContract] = useState({ open: false });\r\n const [deleting, setDeleting] = useEntities({});\r\n const [selection, setSelection] = useState({ active: false, checkeds: {} });\r\n const [grid, setGrid] = useState({\r\n hasMore: assetContracts ? assetContracts.length > 15 : false,\r\n contracts: assetContracts ? assetContracts.slice(0, 14) : null,\r\n loading: false,\r\n });\r\n\r\n useEffect(() => {\r\n if (assetContracts) {\r\n setReadonly(mode == WizzMode.View);\r\n setGrid({\r\n hasMore: assetContracts ? assetContracts.length > 15 : false,\r\n contracts: assetContracts ? assetContracts.slice(0, 14) : null,\r\n loading: false,\r\n });\r\n }\r\n }, [assetContracts]);\r\n\r\n const loadMore = (page) => {\r\n setTimeout(\r\n () => {\r\n setGrid({\r\n contracts: assetContracts.slice(0, (page + 1) * 15 - 1),\r\n hasMore: assetContracts.length > (page + 1) * 15,\r\n loading: false,\r\n });\r\n },\r\n page ? 500 : 0\r\n );\r\n };\r\n\r\n const handleViewContract = (contract) => {\r\n setModalContract(() => ({\r\n open: true,\r\n contract,\r\n }));\r\n };\r\n\r\n const toggleModalContract = () => {\r\n setModalContract(() => ({\r\n open: false,\r\n }));\r\n };\r\n\r\n return (\r\n
\r\n {modalContract.open && (\r\n \r\n )}\r\n }\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {grid.loading ? (\r\n \r\n ) : grid.contracts ? (\r\n \r\n {grid.contracts.map((item) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n {grid.contracts.length == 0 && }\r\n \r\n ) : null}\r\n \r\n
Maturity dateRateLenderBorrowerOpening legClosing legCollateral
\r\n \r\n \r\n \r\n {item.LenderName}{item.BorrowerName}\r\n \r\n \r\n \r\n {item.ContractCollateralAssetTicker}\r\n handleViewContract(item)}\r\n >\r\n \r\n \r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nconst EmptyOrLoading = ({ loading }) => (\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n \r\n No contracts\r\n \r\n )}\r\n \r\n \r\n);\r\n\r\nconst ContractModal = ({ open, contract, toggle, decimalScale }) => {\r\n return (\r\n \r\n View Contract\r\n \r\n \r\n \r\n \r\n Contract Details\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n @\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n Opening leg{\" \"}\r\n {contract.ContractCollateralCurrencyISO}{\" \"}\r\n {\r\n \r\n }\r\n
\r\n
\r\n Closing leg{\" \"}\r\n {contract.ContractCollateralCurrencyISO}{\" \"}\r\n {\r\n \r\n }\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport const CouponPayments = ({ payments = [] }) => {\r\n const [open, setOpen] = useState(false);\r\n const [total, setTotal] = useState(0);\r\n\r\n const toggle = () => {\r\n setOpen((prev) => !prev);\r\n };\r\n\r\n useEffect(() => {\r\n let newTotal = 0;\r\n payments.map((payment) => (newTotal += +payment.ContractPaymentAdjustedAmmount));\r\n setTotal(newTotal);\r\n }, [payments]);\r\n\r\n return (\r\n \r\n {payments.length > 0 && (\r\n \r\n \r\n View coupon payments\r\n \r\n {open && (\r\n \r\n Coupon payments\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {payments.map((coupon, idx) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n
DateNamePaymentAdjusted
\r\n \r\n {coupon.ContractPaymentName}\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n {`Adjusted total: `}\r\n \r\n \r\n \r\n \r\n
\r\n )}\r\n
\r\n )}\r\n
\r\n );\r\n};\r\n\r\nexport default Contracts;\r\n","import React, { useState, Fragment, useEffect } from \"react\";\r\nimport LaddaButton, { ZOOM_OUT, XS } from \"react-ladda\";\r\nimport ModalCurrency from \"../../Modals/ModalCurrency\";\r\nimport { Table, Button } from \"reactstrap\";\r\nimport { LoadingMessage } from \"../../Controls\";\r\nimport { useEntities } from \"../../Wizzard\";\r\nimport { Mode, WizzMode } from \"../../types\";\r\n\r\nconst Currency = ({\r\n mode,\r\n assetId,\r\n settleCurrencies,\r\n currencies,\r\n services,\r\n wizzToggle,\r\n wizzOnChange,\r\n}) => {\r\n const [readonly, setReadonly] = useState(mode == WizzMode.View);\r\n const [modalCurrency, setModalCurrency] = useState({ open: false });\r\n const [deleting, setDeleting] = useEntities({});\r\n\r\n useEffect(() => {\r\n if (mode) {\r\n setReadonly(mode == WizzMode.View);\r\n }\r\n }, [mode]);\r\n\r\n const toggle = (props) => {\r\n setModalCurrency({ open: !modalCurrency.open, ...props });\r\n };\r\n\r\n // handle grid actions\r\n const handleAction = (action, currencyId) => {\r\n if (action == Mode.Insert) {\r\n toggle({\r\n assetId,\r\n action,\r\n onConfirm: (e) => handleSave(action, e),\r\n });\r\n } else if (action == Mode.Update) {\r\n toggle({\r\n assetId,\r\n action,\r\n currency: settleCurrencies.find(\r\n (c) => c.SettlementCurrencyId == currencyId\r\n ),\r\n onConfirm: (e) => handleSave(action, e),\r\n });\r\n } else if (action == Mode.Delete) {\r\n wizzToggle(\"confirm\", {\r\n title: \"Delete settlement currency\",\r\n message: \"Are you sure you want to delete settlement currency?\",\r\n onConfirm: () => handleDelete(currencyId),\r\n });\r\n }\r\n };\r\n\r\n // callback after modal confirm\r\n const handleSave = (action, currency) => {\r\n return services\r\n .updateSettleCurrency({\r\n assetId,\r\n action,\r\n currency,\r\n })\r\n .then((res) => res.result)\r\n .then((result) => {\r\n if (result.Code == 200) {\r\n wizzOnChange({\r\n SettlementCurrencies: [currency].concat(\r\n settleCurrencies\r\n .filter(\r\n (e) => e.SettlementCurrencyId != currency.SettlementCurrencyId\r\n )\r\n .map((e) => ({\r\n ...e,\r\n SettlementCurrencyIsDefault:\r\n !currency.SettlementCurrencyIsDefault &&\r\n e.SettlementCurrencyIsDefault,\r\n }))\r\n ),\r\n });\r\n } else {\r\n wizzToggle(\"message\", {\r\n title: \"Error\",\r\n message: result.Description,\r\n });\r\n }\r\n\r\n return result.Code;\r\n });\r\n };\r\n\r\n // callback after confirm delete\r\n const handleDelete = (id) => {\r\n setDeleting({ [id]: true });\r\n services\r\n .updateSettleCurrency({\r\n assetId,\r\n action: Mode.Delete,\r\n currency: settleCurrencies.find((e) => e.SettlementCurrencyId == id),\r\n })\r\n .then((res) => res.result)\r\n .then((result) => {\r\n setDeleting({ [id]: false });\r\n if (result.Code == 200) {\r\n settleCurrencies.splice(\r\n settleCurrencies.findIndex((e) => e.SettlementCurrencyId == id),\r\n 1\r\n );\r\n wizzOnChange({\r\n SettlementCurrencies: settleCurrencies,\r\n });\r\n } else {\r\n wizzToggle(\"message\", {\r\n title: \"Error\",\r\n message: result.Description,\r\n });\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n {!readonly && (\r\n handleAction(Mode.Insert)}\r\n >\r\n \r\n Add Settlement currency\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {settleCurrencies ? (\r\n \r\n {settleCurrencies.map((item) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n {settleCurrencies.length == 0 && }\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n
ISODescriptionIs Default
{item.SettlementCurrencyISO}{item.SettlementCurrencyDescription}{item.SettlementCurrencyIsDefault ? \"Yes\" : \"No\"}\r\n {!readonly && (\r\n \r\n )}\r\n
\r\n\r\n {modalCurrency.open && (\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nconst EmptyOrLoading = ({ loading }) => (\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n No currencies\r\n )}\r\n \r\n \r\n);\r\n\r\nconst Actions = ({ action, id, deleting }) => (\r\n
\r\n action(Mode.Update, id)}\r\n >\r\n \r\n \r\n\r\n action(Mode.Delete, id)}\r\n data-style={ZOOM_OUT}\r\n data-size={XS}\r\n >\r\n \r\n \r\n
\r\n);\r\n\r\nexport default Currency;\r\n","import React, { useCallback, useState, useEffect, Fragment } from \"react\";\r\nimport {\r\n Table,\r\n UncontrolledDropdown,\r\n DropdownToggle,\r\n DropdownMenu,\r\n DropdownItem,\r\n Input,\r\n Row,\r\n Col,\r\n Label,\r\n FormGroup,\r\n Button,\r\n} from \"reactstrap\";\r\nimport { LoadingMessage } from \"../../Controls\";\r\nimport { WizzMode, DenominationStatus } from \"../../types\";\r\nimport { useEntities } from \"../../Wizzard\";\r\nimport style from \"./../../styles.module.scss\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport { DateField, truncateNumber } from \"../../../../utils\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { showToast, debounce } from \"../../../../utils/Helper\";\r\nimport CircularProgress from \"../../../CircularProgress/CircularProgress\";\r\nimport { FormField } from \"../../../../utils\";\r\nimport { Combobox } from \"../../../Modal/Order/Field/Field\";\r\nimport { HistoryDefault } from \"../../../..\";\r\n\r\nexport const Denominations = ({ mode, services, assetId, toggleOrder, assetInfo }) => {\r\n const [readonly, setReadonly] = useState(mode == WizzMode.View); // va a ser mediante un useEffect al traer los denominations\r\n const [loading, setLoading] = useState(true);\r\n const [editing, setEditing] = useState(false);\r\n const [denominations, setDenominations] = useState([]);\r\n const [empty, setEmpty] = useState(true);\r\n const [decimalAmount, setDecimalAmount] = useState();\r\n const [canSave, setCanSave] = useState(false);\r\n const [modalHistory, setModalHistory] = useState(false);\r\n const [filters, setFilters] = useState({ text: \"\", status: \"Active\" });\r\n // const debounceCallback = useCallback(\r\n // debounce((nextValues) => rootOnChange(nextValues), 500),\r\n // []\r\n // );\r\n\r\n // const rootOnChange = () => {\r\n // loadDenominations();\r\n // };\r\n\r\n const onChange = (fields) => {\r\n const nextValues = {\r\n ...filters,\r\n status: fields.status,\r\n };\r\n setFilters(nextValues);\r\n };\r\n\r\n useEffect(() => {\r\n loadDenominations();\r\n }, [filters.status]);\r\n\r\n const loadDenominations = () => {\r\n setLoading(() => true);\r\n services.fetchPortfolios({ id: assetId, date: new Date() }).then((res) => {\r\n let slotsDict = [];\r\n res.portfolio.forEach((p) => {\r\n p.PortfolioQuantity = truncateNumber(+p.PortfolioQuantity, assetInfo.SubAssetClassDecimalPlaces);\r\n\r\n slotsDict.push({\r\n account: +p.accountId,\r\n availableSlots: Math.ceil(+p.PortfolioQuantity / +assetInfo.AssetSheetSize),\r\n AccountNumber: p.AccountNumber,\r\n AccountName: p.AccountName,\r\n BalanceType: p.PortfolioBalanceType,\r\n BookType: p.booktype,\r\n slots: [],\r\n availableSlotsAux: Math.ceil(+p.PortfolioQuantity / +assetInfo.AssetSheetSize),\r\n availableSlotsActive: 0,\r\n availableSlotsInactive: 0,\r\n });\r\n });\r\n\r\n services\r\n .fetchDenominations({ AssetId: assetId, filter: filters.status })\r\n .then((res) => {\r\n const newDenominations = [];\r\n // Adds slots for each account combining already defined denominations\r\n let currentAccountBefore = slotsDict;\r\n for (let i = 0; i < slotsDict.length; i++) {\r\n //if (filters.status == \"Inactive\" || filters.status == \"\" || filters.status == \"Active\") {\r\n currentAccountBefore[i] = {\r\n ...currentAccountBefore[i],\r\n availableSlots: 0,\r\n };\r\n\r\n //if (filters.status == \"Inactive\" || filters.status == \"\" || filters.status == \"Active\") {\r\n for (let denIdx = 0; denIdx < res.denominations.length; denIdx++) {\r\n const d = res.denominations[denIdx];\r\n if (\r\n +d.Accountid === +currentAccountBefore[i].account &&\r\n d.balancetype === currentAccountBefore[i].BalanceType &&\r\n d.booktype === currentAccountBefore[i].BookType\r\n ) {\r\n //if (d.DenominationStatus == \"Inactive\") {\r\n currentAccountBefore[i] = {\r\n ...currentAccountBefore[i],\r\n availableSlots: currentAccountBefore[i].availableSlots + 1,\r\n };\r\n if (\r\n (+d.Accountid === +currentAccountBefore[i].account &&\r\n d.DenominationStatus == \"Active\" &&\r\n d.balancetype === currentAccountBefore[i].BalanceType &&\r\n d.booktype === currentAccountBefore[i].BookType &&\r\n filters.status == \"\") ||\r\n filters.status == \"Active\"\r\n ) {\r\n currentAccountBefore[i] = {\r\n ...currentAccountBefore[i],\r\n availableSlotsActive: currentAccountBefore[i].availableSlotsActive + 1,\r\n };\r\n }\r\n if (\r\n +d.Accountid === +currentAccountBefore[i].account &&\r\n d.balancetype === currentAccountBefore[i].BalanceType &&\r\n d.DenominationStatus == \"Inactive\" &&\r\n d.booktype === currentAccountBefore[i].BookType &&\r\n filters.status == \"\"\r\n ) {\r\n currentAccountBefore[i] = {\r\n ...currentAccountBefore[i],\r\n availableSlotsInactive: currentAccountBefore[i].availableSlotsInactive + 1,\r\n };\r\n }\r\n }\r\n }\r\n }\r\n\r\n for (let i = 0; i < slotsDict.length; i++) {\r\n let situation = \"\";\r\n if (filters.status == \"Active\") {\r\n if (currentAccountBefore[i].availableSlotsActive > currentAccountBefore[i].availableSlotsAux) {\r\n //tienen de sobra deben eliminar\r\n //pasa cuando le dan inactive sin tener menos cantidad de la necesaria\r\n // currentAccountBefore[i] = {\r\n // ...currentAccountBefore[i],\r\n // availableSlots: currentAccountBefore[i].availableSlotsAux,\r\n // };\r\n situation = \"delete\";\r\n } else if (\r\n currentAccountBefore[i].availableSlotsActive < currentAccountBefore[i].availableSlotsAux\r\n ) {\r\n //tienen de mas deben anadir\r\n currentAccountBefore[i] = {\r\n ...currentAccountBefore[i],\r\n availableSlots: currentAccountBefore[i].availableSlotsAux,\r\n };\r\n //situation = \"less\";\r\n } else {\r\n //todo ok\r\n }\r\n } else if (filters.status == \"\") {\r\n if (currentAccountBefore[i].availableSlotsActive < currentAccountBefore[i].availableSlotsAux) {\r\n //tienen de mas deben anadir\r\n currentAccountBefore[i] = {\r\n ...currentAccountBefore[i],\r\n availableSlots:\r\n currentAccountBefore[i].availableSlotsAux +\r\n currentAccountBefore[i].availableSlotsInactive,\r\n };\r\n //situation = \"less\";\r\n } else if (\r\n currentAccountBefore[i].availableSlotsActive > currentAccountBefore[i].availableSlotsAux\r\n ) {\r\n situation = \"delete\";\r\n }\r\n }\r\n let currentAccount = currentAccountBefore[i];\r\n\r\n for (let j = 1; j <= currentAccount.availableSlots; j++) {\r\n let newDenomination = {\r\n Accountid: +currentAccount.account,\r\n Assetid: assetId,\r\n AccountNumber: currentAccount.AccountNumber,\r\n AccountName: currentAccount.AccountName,\r\n DenominationId: \"\",\r\n IsEditable: true,\r\n balancetype: currentAccount.BalanceType,\r\n booktype: \"Self\",\r\n disabled: false,\r\n situation: situation,\r\n };\r\n for (let denIdx = 0; denIdx < res.denominations.length; denIdx++) {\r\n const d = res.denominations[denIdx];\r\n if (\r\n +d.Accountid === +currentAccount.account &&\r\n d.balancetype === currentAccountBefore[i].BalanceType &&\r\n d.booktype === currentAccountBefore[i].BookType\r\n ) {\r\n let found = false;\r\n for (let slotsIdx = 0; slotsIdx < currentAccount.slots.length; slotsIdx++) {\r\n if (currentAccount.slots[slotsIdx].DenominationId === d.DenominationId) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n if (!found) {\r\n newDenomination = {\r\n ...newDenomination,\r\n ...d,\r\n };\r\n break;\r\n }\r\n }\r\n }\r\n // agregar newDenomination a algo!!\r\n if (currentAccount.availableSlots > 0) {\r\n if (newDenomination.DenominationId !== \"\") {\r\n newDenomination = {\r\n ...newDenomination,\r\n disabled: true,\r\n };\r\n } else {\r\n newDenomination = {\r\n ...newDenomination,\r\n situation: \"add\",\r\n };\r\n }\r\n if (filters.status == \"\" && newDenomination.DenominationStatus == \"Inactive\") {\r\n newDenomination = {\r\n ...newDenomination,\r\n situation: \"\",\r\n };\r\n }\r\n currentAccount.slots.push(newDenomination);\r\n }\r\n } //sale del for grande\r\n\r\n currentAccount.slots.forEach((slot) => {\r\n newDenominations.push(slot);\r\n });\r\n }\r\n\r\n setDenominations(newDenominations);\r\n })\r\n .finally(() => {\r\n setLoading(() => false);\r\n });\r\n });\r\n };\r\n useEffect(() => {\r\n if (mode && assetId && assetInfo.AssetSheetSize) {\r\n setReadonly(mode == WizzMode.View);\r\n loadDenominations();\r\n }\r\n }, [mode, assetInfo, assetId]);\r\n\r\n useEffect(() => {\r\n if (services.saveDenominations) setCanSave(true);\r\n }, [services]);\r\n\r\n const handleSave = (idx, denomination) => {\r\n const denominationsToSave = [denomination];\r\n services\r\n .saveDenominations({ AssetId: assetId, denominations: denominationsToSave })\r\n .then((res) => {\r\n if (res.result.Code === 400) showToast(res.result.Description, true);\r\n else showToast(\"Denominations saved succesfully\");\r\n loadDenominations();\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error saving denominations\", true);\r\n });\r\n };\r\n\r\n const handleAddDenomination = (denomination, fn) => {\r\n services\r\n .addDenominations({\r\n DenominationId: denomination.DenominationId,\r\n BasicAccountId: denomination.Accountid,\r\n AssetId: assetId,\r\n BalanceType: denomination.balancetype,\r\n })\r\n .then((res) => {\r\n if (res.result.Code === 400) showToast(res.result.Description, true);\r\n else {\r\n showToast(\"Denominations added succesfully\");\r\n fn(res.denomination);\r\n }\r\n })\r\n .catch((err) => {\r\n showToast(\"Error adding denominiations\", true);\r\n });\r\n };\r\n\r\n const handleHistory = (denomination) => {\r\n setModalHistory({ process: \"Denomination\", processCharId: denomination, processId:assetId });\r\n };\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!loading ? (\r\n \r\n {denominations.map((item, idx) => (\r\n handleSave(idx, d)}\r\n canSave={canSave}\r\n handleHistory={(d) => handleHistory(d)}\r\n handleAddDenomination={(d, f) => handleAddDenomination(d, f)}\r\n />\r\n ))}\r\n {denominations.length == 0 && }\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n
AccountOrigin DenominationDenomination TickerStatusBalance TypeBook Type\r\n
\r\n
\r\n {modalHistory && (\r\n setModalHistory(false)}\r\n />\r\n )}\r\n
\r\n );\r\n};\r\n\r\nconst DenominationRow = ({\r\n denomination,\r\n editingGlobal,\r\n setEditingGlobal,\r\n handleSave,\r\n canSave,\r\n handleHistory,\r\n handleAddDenomination,\r\n}) => {\r\n const [editing, setEditing] = useState(false);\r\n const [loading, setLoading] = useState(false);\r\n const [denominationValue, setDenominationValue] = useState(denomination.DenominationId);\r\n const [denominationTicker, setDenominationTicker] = useState(denomination.DenominationTicker);\r\n const [selectedDenominationStatus, setSelectedDenominationStatus] = useState(\r\n denomination.DenominationStatus\r\n );\r\n const [disabled, setDisabled] = useState(denomination.disabled);\r\n const [denominationSituation, setDenominationSituation] = useState(denomination.situation);\r\n const toggleEditing = () => {\r\n setEditing((prev) => !prev);\r\n setEditingGlobal((prev) => !prev);\r\n };\r\n\r\n const handleCancel = () => {\r\n toggleEditing();\r\n handleOnChange(\"\", denomination.DenominationId);\r\n setLoading(() => false);\r\n };\r\n\r\n const fn = (res) => {\r\n //setDenominations(res);\r\n denomination = {\r\n ...denomination,\r\n DenominationId: res.DenominationId,\r\n disabled: false,\r\n };\r\n setDisabled(true);\r\n setDenominationSituation(\"\");\r\n setDenominationTicker(res.DenominationTicker);\r\n setDenominationValue(res.DenominationId);\r\n setSelectedDenominationStatus(res.DenominationStatus);\r\n };\r\n const handleNewDenomination = (name, value) => {\r\n denomination = {\r\n ...denomination,\r\n DenominationId: denominationValue,\r\n };\r\n handleAddDenomination(\r\n {\r\n ...denomination,\r\n },\r\n fn\r\n );\r\n };\r\n\r\n const handleOnChange = (name, value) => {\r\n setDenominationValue(() => value);\r\n };\r\n\r\n const handleOnChangeTicker = (name, value) => {\r\n setDenominationTicker(() => value);\r\n };\r\n\r\n const handleHistoryDem = (denominationValue) => {\r\n //llamar funcion a implementar que trae history\r\n //fetchHistoryByCharId;\r\n handleHistory(denominationValue);\r\n };\r\n\r\n const handleOnSave = () => {\r\n setLoading(() => true);\r\n handleSave({\r\n ...denomination,\r\n DenominationId: denominationValue,\r\n DenominationTicker: denominationTicker,\r\n DenominationStatus: selectedDenominationStatus,\r\n });\r\n toggleEditing();\r\n };\r\n\r\n return (\r\n \r\n \r\n {denomination.AccountNumber} {denomination.AccountName}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n setSelectedDenominationStatus(v)}\r\n />\r\n \r\n {denomination.balancetype}\r\n {denomination.booktype}\r\n\r\n {canSave ? (\r\n \r\n {editing ? (\r\n \r\n \r\n \r\n Save\r\n \r\n \r\n ) : !disabled ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n handleHistoryDem(denomination.DenominationId)}\r\n className={style.iconBtn}\r\n >\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst EmptyOrLoading = ({ loading }) => (\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n \r\n No denominations\r\n \r\n )}\r\n \r\n \r\n);\r\n\r\nconst DropDownFilterStatus = ({ value, onChange }) => (\r\n
\r\n \r\n \r\n {value == \"\" ? \"All Statusses\" : value}\r\n \r\n \r\n onChange({ status: \"\" })}>\r\n {\"All Statusses\"}\r\n \r\n {Object.values(DenominationStatus).map((status) => (\r\n onChange({ status: status })}>\r\n {status}\r\n \r\n ))}\r\n \r\n \r\n
\r\n);\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Table, Row, Col } from \"reactstrap\";\r\nimport { LoadingMessage } from \"../../Controls\";\r\nimport { WizzMode } from \"../../types\";\r\nimport { useEntities } from \"../../Wizzard\";\r\nimport style from \"./../../styles.module.scss\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\n\r\nconst Fundamentals = ({ mode, services, assetInfo }) => {\r\n const [, setReadonly] = useState(false);\r\n const [] = useState({ open: false });\r\n const [] = useEntities({});\r\n const [financials, setFundamentals] = useState();\r\n\r\n useEffect(() => {\r\n if (mode) {\r\n setReadonly(mode == WizzMode.View);\r\n }\r\n {\r\n assetInfo.AssetSynonym &&\r\n services.iextradingFinancial(assetInfo.AssetSynonym).then((res) => setFundamentals(res.financials));\r\n }\r\n }, [mode, assetInfo]);\r\n\r\n return (\r\n \r\n {financials ? (\r\n
\r\n {financials.map((financial) => {\r\n return [\r\n
\r\n {financial.reportDate && (\r\n \r\n
Report Date:\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {financial.cashChange && (\r\n \r\n Cash Change:\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {financial.cashFlow && (\r\n \r\n Cash Flow\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {financial.costOfRevenue && (\r\n \r\n Cost of revenue:\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {financial.currentAsset && (\r\n \r\n Current Assets:\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {financial.currentCash && (\r\n \r\n Current Cash:\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {financial.currentDebt && (\r\n \r\n Current Debt:\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {financial.grossProfit && (\r\n \r\n Gross Profit:\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {financial.netIncome && (\r\n \r\n Net Income:\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {financial.operatingExpense && (\r\n \r\n Operating Expense:\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {financial.operatingGainsLosses && (\r\n \r\n Operating gains losses:\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {financial.operatingIncome && (\r\n \r\n Operation income:\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {financial.operatingRevenue && (\r\n \r\n Operating revenue:\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {financial.researchAndDevelopment && (\r\n \r\n Research and development:\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {financial.shareholderEquity && (\r\n \r\n Share holder equity:\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {financial.totalAssets && (\r\n \r\n Total assets:\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {financial.totalCash && (\r\n \r\n Total cash:\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {financial.totalDebt && (\r\n \r\n Total debt:\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {financial.totalLiabilities && (\r\n \r\n Total liabilities:\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {financial.totalRevenue && (\r\n \r\n Total revenue:\r\n \r\n \r\n \r\n \r\n )}\r\n ,\r\n ];\r\n })}\r\n {Fundamentals.length == 0 && }\r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nconst EmptyOrLoading = ({ loading }) => (\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n \r\n No fundamentals\r\n \r\n )}\r\n \r\n \r\n);\r\n\r\nexport default Fundamentals;\r\n","import React, { useState, Fragment } from \"react\";\r\nimport { FormGroup, Label, Button, Badge } from \"reactstrap\";\r\nimport style from \"./styles.module.scss\";\r\nimport { Mode } from \"../../types\";\r\n\r\nconst Attachments = ({ readonly, attachments, update, services, id }) => {\r\n const handleFileInput = (event) => {\r\n const file = event.target.files[0];\r\n const name = file.name.substring(0, file.name.indexOf(\".\"));\r\n const extension = file.name.substring(file.name.indexOf(\".\") + 1, file.name.length);\r\n if (file.size <= 5242880) {\r\n const reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n reader.onload = () => {\r\n const fileBlob = reader.result.split(\",\")[1];\r\n update({\r\n mode: Mode.Insert,\r\n id: Math.random().toString(36).substring(7),\r\n blob: fileBlob,\r\n new: true,\r\n extension,\r\n name,\r\n });\r\n };\r\n reader.onerror = (error) => {\r\n throw error;\r\n };\r\n } else {\r\n alert(\"File is too big! (Max. 5MB)\");\r\n event.target = \"\";\r\n }\r\n };\r\n\r\n const handleDelete = (fileId) => {\r\n update({\r\n mode: Mode.Delete,\r\n id: fileId,\r\n });\r\n };\r\n\r\n const handleDownload = (file) => {\r\n if (id) {\r\n services.download({ assetId: id, attachmentId: file.AssetAttachmentId }).then((res) => {\r\n if (res.result.Code == 200) {\r\n const fileName = `${file.AssetAttachmentName}.${file.AssetAttachmentExtension}`;\r\n const element = document.createElement(\"a\");\r\n element.setAttribute(\r\n \"href\",\r\n \"data:application/octet-stream;base64,\" + encodeURIComponent(res.blob)\r\n );\r\n element.setAttribute(\"download\", fileName);\r\n element.style.display = \"none\";\r\n document.body.appendChild(element);\r\n element.click();\r\n document.body.removeChild(element);\r\n }\r\n });\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n {!readonly && (\r\n
\r\n \r\n \r\n
\r\n )}\r\n {attachments &&\r\n (attachments.length == 0 ? (\r\n
\r\n \r\n No Attachments\r\n \r\n
\r\n ) : (\r\n
\r\n {attachments.map((item) => (\r\n \r\n ))}\r\n
\r\n ))}\r\n
\r\n );\r\n};\r\n\r\nconst Line = ({ file, remove, download }) => (\r\n
\r\n \r\n {file.AssetAttachmentExtension}\r\n \r\n \r\n remove(file.AssetAttachmentId)}>\r\n \r\n \r\n
\r\n);\r\n\r\nexport function getAttachments(changedFiles) {\r\n const attachments = [];\r\n Object.values(changedFiles).forEach((file) => {\r\n if (file.mode == Mode.Delete) {\r\n attachments.push({\r\n accountId: file.id,\r\n });\r\n } else {\r\n attachments.push({\r\n ...file,\r\n });\r\n }\r\n });\r\n\r\n return attachments;\r\n}\r\n\r\nexport default Attachments;\r\n","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { Row, Col, FormGroup, Tooltip, Label } from \"reactstrap\";\r\nimport { LoadingField, FormSelect, LoadingMessage, FormNumber, FormCheck } from \"./../../Controls\";\r\nimport Attachments from \"./Attachments\";\r\nimport { FormField } from \"../../../..\";\r\nimport classnames from \"classnames\";\r\nimport style from \"./styles.module.scss\";\r\nimport { WizzMode, Mode, AssetStatus, DPEditing, SinkType } from \"../../types\";\r\nimport { Field } from \"../../..\";\r\nimport { SuggestIssuer } from \"./../../Controls2\";\r\nimport Autosuggest from \"../../../Autosuggest/Autosuggest\";\r\nimport { Suggest } from \"./../../Controls\";\r\n\r\nconst General = ({\r\n mode,\r\n fields,\r\n previousFields,\r\n errors,\r\n entities,\r\n services,\r\n updateFiles,\r\n wizzOnChange,\r\n wizzToggle,\r\n decimalScale,\r\n}) => {\r\n const [dpEditable, setDPEditable] = useState(DPEditing.None);\r\n const [loaded, setLoaded] = useState(false);\r\n const [readonly, setReadonly] = useState(mode == WizzMode.View);\r\n\r\n const [tooltipOpen, setTooltipOpen] = useState(false);\r\n const toggleTooltip = () => setTooltipOpen(!tooltipOpen);\r\n\r\n const renderSuggestion = (suggestion) => (\r\n
\r\n {suggestion.number}\r\n {\" - \"}\r\n {suggestion.name}\r\n
\r\n );\r\n\r\n const getSuggestionValue = (suggestion) => `${suggestion.number} - ${suggestion.name}`;\r\n\r\n const onSuggestionsFetchRequested = ({ value }) =>\r\n services.fetchSearchAccount({ text: value }).then((response) =>\r\n response.response.accounts.map((a) => {\r\n const accountAttrs = JSON.parse(a.Value);\r\n\r\n return {\r\n id: a.Id,\r\n name: accountAttrs.value,\r\n number: accountAttrs.key,\r\n };\r\n })\r\n );\r\n\r\n const onChangeSuggest = (method, value) => {\r\n if (method != \"type\" && value.id) {\r\n wizzOnChange({ AssetUnderlyingPortfolio: +value.id });\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (!loaded) {\r\n if (fields && entities.dataProviders) {\r\n let DPEditableState = DPEditing.None;\r\n setReadonly(mode == WizzMode.View);\r\n\r\n if (mode !== WizzMode.New) {\r\n const { AssetDefaultIdentifier: defaultId, AssetDefaultIdentifierValue: value } = fields;\r\n // if cloned, come with empty value\r\n if (!defaultId || defaultId === \"0\") {\r\n DPEditableState = DPEditing.Both;\r\n } else if (!value || value === \"\") {\r\n DPEditableState = DPEditing.OnlyValue;\r\n }\r\n } else {\r\n DPEditableState = DPEditing.Both;\r\n }\r\n\r\n setDPEditable(DPEditableState);\r\n\r\n let nextFields = { ...fields };\r\n if (mode == WizzMode.New) {\r\n // select default isin\r\n nextFields.AssetDefaultIdentifier = getDefaultAssetProvider(entities.dataProviders);\r\n }\r\n setLoaded(true);\r\n wizzOnChange(nextFields);\r\n }\r\n }\r\n }, [fields, entities]);\r\n\r\n const onChange = (name, value) => {\r\n wizzOnChange({ [name]: value });\r\n };\r\n\r\n const onChangeCountry = (name, value) => {\r\n wizzOnChange({ [name]: value.CountryId });\r\n };\r\n\r\n const onChangeIssuer = (name, value) => {\r\n wizzOnChange({ [name]: value.IssuerId });\r\n };\r\n\r\n const handleChangeFiles = (file) => {\r\n updateFiles(file.id, file);\r\n\r\n if (file.mode == Mode.Insert) {\r\n onChange(\r\n \"Attachments\",\r\n fields.Attachments.concat({\r\n AssetAttachmentId: file.id,\r\n AssetAttachmentName: file.name,\r\n AssetAttachmentExtension: file.extension,\r\n })\r\n );\r\n } else if (file.mode == Mode.Delete) {\r\n onChange(\r\n \"Attachments\",\r\n fields.Attachments.filter((a) => a.AssetAttachmentId != file.id)\r\n );\r\n }\r\n };\r\n\r\n const { subAssetClasses, dataProviders, riskTypes } = entities;\r\n\r\n const SinkTypeValues = Object.entries(SinkType).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n }));\r\n\r\n return (\r\n
\r\n {fields ? (\r\n \r\n \r\n \r\n {subAssetClasses ? (\r\n i.SubAssetClassId}\r\n getSelectItemName={(i) => i.SubAssetClassName}\r\n value={fields.SubAssetClassId}\r\n error={errors.SubAssetClassId}\r\n disabled={readonly || fields.AssetHasOrdersInProgress}\r\n description={\r\n !readonly && fields.AssetHasOrdersInProgress\r\n ? \"Cannot be changed because it has orders in progress\"\r\n : null\r\n }\r\n changedColor={fields.SubAssetClassId != previousFields.SubAssetClassId}\r\n onChange={onChange}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n {mode != WizzMode.New && (\r\n \r\n \r\n onChange(\"AssetCanBeTradedFromWebClient\", e.target.checked)}\r\n disabled={readonly}\r\n changedColor={\r\n fields.AssetCanBeTradedFromWebClient != previousFields.AssetCanBeTradedFromWebClient\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n onChange(\"AssetReadyToTrade\", e.target.checked)}\r\n disabled={\r\n readonly ||\r\n fields.Taxes.length == 0 ||\r\n fields.AssetTicker == \"\" ||\r\n fields.AssetTicker == \"Not defined\"\r\n }\r\n changedColor={fields.AssetReadyToTrade != previousFields.AssetReadyToTrade}\r\n />\r\n \r\n {(fields.Taxes.length == 0 ||\r\n fields.AssetTicker == \"\" ||\r\n fields.AssetTicker == \"Not defined\") && (\r\n \r\n \r\n \r\n \r\n \r\n {(fields.AssetTicker == \"\" || fields.AssetTicker == \"Not defined\") &&\r\n \"Assets must have a Ticker defined to be ready to Trade\"}\r\n {fields.Taxes.length == 0 &&\r\n \"Assets must have at least one Tax defined to be ready to Trade\"}\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n {mode != WizzMode.New && (\r\n \r\n \r\n onChange(\"AssetMaintainsFaceOnSink\", e.target.checked)}\r\n disabled={readonly}\r\n changedColor={\r\n fields.AssetMaintainsFaceOnSink != previousFields.AssetMaintainsFaceOnSink\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n onChange(\"AssetReadyToBook\", e.target.checked)}\r\n disabled={\r\n readonly ||\r\n fields.Taxes.length == 0 ||\r\n fields.AssetTicker == \"\" ||\r\n fields.AssetTicker == \"Not defined\"\r\n }\r\n changedColor={fields.AssetReadyToBook != previousFields.AssetReadyToBook}\r\n />\r\n \r\n {(fields.Taxes.length == 0 ||\r\n fields.AssetTicker == \"\" ||\r\n fields.AssetTicker == \"Not defined\") && (\r\n \r\n \r\n \r\n \r\n \r\n {(fields.AssetTicker == \"\" || fields.AssetTicker == \"Not defined\") &&\r\n \"Assets must have a Ticker defined to be ready to Book\"}\r\n {fields.Taxes.length == 0 &&\r\n \"Assets must have at least one Tax defined to be ready to Book\"}\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n onChange(\"AssetHasUnderlyingPortfolio\", e.target.checked)}\r\n disabled={readonly}\r\n changedColor={\r\n fields.AssetHasUnderlyingPortfolio != previousFields.AssetHasUnderlyingPortfolio\r\n }\r\n />\r\n \r\n \r\n {fields.AssetHasUnderlyingPortfolio && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n {fields.AssetCanUseMTM && (\r\n \r\n {mode != WizzMode.New && (\r\n \r\n onChange(\"AssetHasMTM\", e.target.checked)}\r\n disabled={readonly}\r\n changedColor={fields.AssetHasMTM != previousFields.AssetHasMTM}\r\n />\r\n \r\n )}\r\n \r\n )}\r\n \r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetSinktype || \"\"}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetSinktype != previousFields.AssetSinktype}\r\n />\r\n \r\n \r\n {subAssetClasses ? (\r\n i.DataProviderId}\r\n getSelectItemName={(i) => i.DataProviderName}\r\n value={fields.AssetDefaultIdentifier === \"0\" ? undefined : fields.AssetDefaultIdentifier}\r\n error={errors.AssetDefaultIdentifier}\r\n disabled={readonly || dpEditable !== DPEditing.Both}\r\n onChange={onChange}\r\n changedColor={fields.AssetDefaultIdentifier != previousFields.AssetDefaultIdentifier}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n {fields.AssetDefaultIdentifier && dataProviders && (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n {entities.currencies ? (\r\n i.currencyId}\r\n getSelectItemName={(i) => `${i.currencyISO} - ${i.currencyDescription}`}\r\n value={fields.AssetSettlementCurrencyId}\r\n error={errors.AssetSettlementCurrencyId}\r\n disabled={mode !== WizzMode.New}\r\n onChange={onChange}\r\n />\r\n ) : (\r\n \r\n )}\r\n {riskTypes ? (\r\n i.AssetRiskTypeId}\r\n getSelectItemName={(i) => i.AssetRiskTypeDesc}\r\n value={fields.AssetRiskTypeId}\r\n error={errors.AssetRiskTypeId}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetRiskTypeId != previousFields.AssetRiskTypeId}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n\r\n {mode == WizzMode.New && (\r\n \r\n )}\r\n i.Id}\r\n getSelectItemName={(i) => i.Name}\r\n getSelectItemExtension={(i) => i.Code}\r\n service={services.searchCountry}\r\n disabled={readonly}\r\n error={errors.CountryId}\r\n onChange={onChangeCountry}\r\n changedColor={fields.CountryId != previousFields.CountryId}\r\n />\r\n i.Id}\r\n getSelectItemName={(i) => i.Value}\r\n error={errors.IssuerId}\r\n services={services}\r\n serviceCreateIssuer={services.createIssuer}\r\n disabled={readonly}\r\n onChange={onChangeIssuer}\r\n changedColor={fields.IssuerId != previousFields.IssuerId}\r\n />\r\n \r\n \r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nconst Error = ({ error }) =>\r\n !!error ? (\r\n
\r\n {error}\r\n
\r\n ) : null;\r\n\r\nconst getDataProviderLabel = (fields, providers) => {\r\n let label;\r\n if (providers) {\r\n const provider = providers.find((prov) => prov.DataProviderId == fields.AssetDefaultIdentifier);\r\n\r\n if (provider) {\r\n label = provider.DataProviderInternalName;\r\n }\r\n }\r\n\r\n if (!label) {\r\n label = \"Not defined\";\r\n }\r\n\r\n return label;\r\n};\r\n\r\nfunction getDefaultAssetProvider(providers) {\r\n let candidate = providers.find((p) => p.DataProviderName == \"ISIN\");\r\n\r\n if (candidate) {\r\n return candidate.DataProviderId;\r\n }\r\n\r\n return null;\r\n}\r\n\r\nexport function validateGeneral(fields) {\r\n const fieldNames = [\r\n \"SubAssetClassId\",\r\n \"AssetDefaultIdentifier\",\r\n \"AssetSettlementCurrencyId\",\r\n \"AssetTicker\",\r\n \"AssetName\",\r\n \"CountryId\",\r\n \"IssuerId\",\r\n \"AssetRiskTypeId\",\r\n ];\r\n const errors = {};\r\n\r\n fieldNames.forEach((name) => {\r\n if (fields[name] == undefined || fields[name] == \"\") {\r\n errors[name] = \"Required field\";\r\n }\r\n });\r\n\r\n return errors;\r\n}\r\n\r\nexport default General;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"styles-module_container_1VeXv\",\"footer\":\"styles-module_footer_STYNg\",\"center\":\"styles-module_center_3Nw-Q\",\"chooser\":\"styles-module_chooser_3RkXj\",\"attachment\":\"styles-module_attachment_2Dl4Y\",\"name\":\"styles-module_name_1qwO0\",\"extension\":\"styles-module_extension_1UCVm\",\"delete\":\"styles-module_delete_33Gwx\"};","import React, { useState, Fragment, useEffect } from \"react\";\r\nimport { Table, Button } from \"reactstrap\";\r\nimport ModalGroup from \"../../Modals/ModalGroup\";\r\nimport { LoadingMessage } from \"../../Controls\";\r\nimport LaddaButton, { ZOOM_OUT, XS } from \"react-ladda\";\r\nimport { Mode, WizzMode } from \"../../types\";\r\nimport { useEntities } from \"../../Wizzard\";\r\n\r\nconst Groups = ({\r\n mode,\r\n assetId,\r\n assetGroups,\r\n services,\r\n wizzToggle,\r\n wizzOnChange,\r\n}) => {\r\n const [readonly, setReadonly] = useState(mode == WizzMode.View);\r\n const [modalGroup, setModalGroup] = useState({ open: false });\r\n const [deleting, setDeleting] = useEntities({});\r\n\r\n useEffect(() => {\r\n if (mode) {\r\n setReadonly(mode == WizzMode.View);\r\n }\r\n }, [mode]);\r\n\r\n const toggle = (props) => {\r\n setModalGroup({ open: !modalGroup.open, ...props });\r\n };\r\n\r\n // handle grid actions\r\n const handleAction = (action, group, value) => {\r\n if (action == Mode.Insert) {\r\n toggle({\r\n assetId,\r\n action,\r\n onConfirm: (e) => handleSave(action, e),\r\n });\r\n } else if (action == Mode.Update) {\r\n toggle({\r\n assetId,\r\n action,\r\n group: assetGroups.find(\r\n (c) => c.AssetGroupId == group && c.AssetGroupValue == value\r\n ),\r\n onConfirm: (e) => handleSave(action, e),\r\n });\r\n } else if (action == Mode.Delete) {\r\n wizzToggle(\"confirm\", {\r\n title: \"Delete asset group\",\r\n message: \"Are you sure you want to delete asset group?\",\r\n onConfirm: () => handleDelete(group, value),\r\n });\r\n }\r\n };\r\n\r\n // callback after modal confirm\r\n const handleSave = (action, group) => {\r\n return services\r\n .updateGroup({\r\n assetId,\r\n action,\r\n group,\r\n })\r\n .then((res) => res.result)\r\n .then((result) => {\r\n if (result.Code == 200) {\r\n wizzOnChange({\r\n Groups: [group].concat(\r\n assetGroups.filter(\r\n (e) =>\r\n e.AssetGroupId != group.AssetGroupId ||\r\n (e.AssetGroupId == group.AssetGroupId &&\r\n e.AssetGroupValue != group.AssetGroupValue)\r\n )\r\n ),\r\n });\r\n } else {\r\n wizzToggle(\"message\", {\r\n title: \"Error\",\r\n message: result.Description,\r\n });\r\n }\r\n\r\n return result.Code;\r\n });\r\n };\r\n\r\n // callback after confirm delete\r\n const handleDelete = (id, value) => {\r\n setDeleting({ [`${id}-${value}`]: true });\r\n services\r\n .updateGroup({\r\n assetId,\r\n action: Mode.Delete,\r\n group: assetGroups.find(\r\n (e) => e.AssetGroupId == id && e.AssetGroupValue == value\r\n ),\r\n })\r\n .then((res) => res.result)\r\n .then((result) => {\r\n setDeleting({ [`${id}-${value}`]: false });\r\n if (result.Code == 200) {\r\n assetGroups.splice(\r\n assetGroups.findIndex(\r\n (e) => e.AssetGroupId == id && e.AssetGroupValue == value\r\n ),\r\n 1\r\n );\r\n wizzOnChange({\r\n Groups: assetGroups,\r\n });\r\n } else {\r\n wizzToggle(\"message\", {\r\n title: \"Error\",\r\n message: result.Description,\r\n });\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n {!readonly && (\r\n handleAction(Mode.Insert)}\r\n >\r\n \r\n Add asset group\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {assetGroups ? (\r\n \r\n {assetGroups.map((item) => (\r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n {assetGroups.length == 0 && }\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n
Group NameGroup Value
{item.AssetGroupName}{item.AssetGroupValue}\r\n {!readonly && (\r\n \r\n )}\r\n
\r\n\r\n \r\n
\r\n );\r\n};\r\n\r\nconst EmptyOrLoading = ({ loading }) => (\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n No asset groups\r\n )}\r\n \r\n \r\n);\r\n\r\nconst Actions = ({ action, id, valueId, deleting }) => (\r\n
\r\n action(Mode.Update, id, valueId)}\r\n >\r\n \r\n \r\n\r\n action(Mode.Delete, id, valueId)}\r\n data-style={ZOOM_OUT}\r\n data-size={XS}\r\n >\r\n \r\n \r\n
\r\n);\r\n\r\nexport default Groups;\r\n","import React, { useState, Fragment, useEffect } from \"react\";\r\nimport { Table, Button, Input } from \"reactstrap\";\r\nimport ModalPayments from \"../../Modals/ModalPayments\";\r\nimport LaddaButton, { ZOOM_OUT, XS, SLIDE_LEFT } from \"react-ladda\";\r\nimport { LoadingMessage } from \"../../Controls\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport InfiniteScroll from \"react-infinite-scroller\";\r\nimport { Mode, WizzMode } from \"../../types\";\r\nimport { useEntities } from \"../../Wizzard\";\r\nimport { CircularProgress } from \"../../..\";\r\nimport style from \"./../../styles.module.scss\";\r\nimport { showToast } from \"../../../../utils/Helper\";\r\nimport { Quantity } from \"../../../IO/Item\";\r\n\r\nconst Payments = ({ mode, services, assetPayments, wizzToggle, wizzOnChange, assetId, asset }) => {\r\n const [readonly, setReadonly] = useState(mode == WizzMode.View);\r\n const [recalculating, setRecalculating] = useState(false);\r\n const [calculating, setCalculating] = useState(false); \r\n const [modalPayments, setModalPayments] = useState({ open: false });\r\n const [deleting, setDeleting] = useEntities({});\r\n const [selection, setSelection] = useState({ active: false, checkeds: {} });\r\n const [showRealAccruals, setShowRealAccruals] = useState(false); \r\n const [calculated, setCalculated] = useState(false);\r\n\r\n const [indice, setIndice] = useState(1)\r\n const [grid, setGrid] = useState({\r\n hasMore: assetPayments ? assetPayments.length > 15 : false,\r\n payments: assetPayments ? assetPayments.slice(0, 14) : null,\r\n loading: false,\r\n });\r\n const [quantity, setQuantity] = useState(\"\"); \r\n const [quantityError, setQuantityError] = useState(\"\"); \r\n\r\n useEffect(() => {\r\n if (assetPayments) {\r\n setReadonly(mode == WizzMode.View);\r\n setGrid({\r\n hasMore: assetPayments ? assetPayments.length > 15 : false,\r\n payments: assetPayments ? assetPayments.slice(0, 14) : null,\r\n loading: false,\r\n });\r\n }\r\n }, [assetPayments]);\r\n\r\n const toggle = (props) => {\r\n setModalPayments({ open: !modalPayments.open, ...props });\r\n };\r\n\r\n // handle grid actions\r\n const handleAction = (action, paymentId) => {\r\n if (action == Mode.Insert) {\r\n toggle({\r\n assetId,\r\n action,\r\n onConfirm: (e) => handleSave(action, e),\r\n });\r\n } else if (action == Mode.Update) {\r\n toggle({\r\n assetId,\r\n action,\r\n payment: assetPayments.find((p) => p.AssetCouponDate == paymentId),\r\n onConfirm: (e) => handleSave(action, e),\r\n });\r\n } else if (action == Mode.Delete) {\r\n wizzToggle(\"confirm\", {\r\n title: \"Delete payment\",\r\n message: \"Are you sure you want to delete payment?\",\r\n onConfirm: () => handleDelete({ [paymentId]: true }),\r\n });\r\n }\r\n };\r\n\r\n // callback after modal confirm\r\n const handleSave = (action, payment) => {\r\n return services\r\n .updatePayment({\r\n assetId,\r\n action,\r\n payment,\r\n })\r\n .then((res) => res.result)\r\n .then((result) => {\r\n if (result.Code == 200) {\r\n if (action === Mode.Update || action === Mode.Insert) {\r\n forceUpdateAfterRecalculate();\r\n }\r\n } else {\r\n wizzToggle(\"message\", {\r\n title: \"Error\",\r\n message: result.Description,\r\n });\r\n }\r\n\r\n return result.Code;\r\n });\r\n };\r\n\r\n // callback after confirm delete\r\n const handleDelete = (ids) => {\r\n setDeleting({ ...deleting, ...ids });\r\n\r\n services\r\n .deletePayments({\r\n assetId,\r\n paymentIds: Object.keys(ids),\r\n })\r\n .then((res) => res.result)\r\n .then((result) => {\r\n setDeleting(Object.keys(ids).reduce((items, value) => ({ ...items, [value]: false }), {}));\r\n if (result.Code == 200) {\r\n setGrid({\r\n ...grid,\r\n payments: grid.payments.filter((e) => !ids[e.AssetCouponDate]),\r\n });\r\n Object.keys(ids).forEach((id) =>\r\n assetPayments.splice(\r\n assetPayments.findIndex((e) => e.AssetCouponDate == id),\r\n 1\r\n )\r\n );\r\n wizzOnChange({\r\n Payments: assetPayments,\r\n });\r\n forceUpdateAfterRecalculate();\r\n } else {\r\n wizzToggle(\"message\", {\r\n title: \"Error\",\r\n message: result.Description,\r\n });\r\n }\r\n });\r\n };\r\n\r\n const handleSelectionAction = (action, id) => {\r\n if (action == \"select\") {\r\n const checkeds = {};\r\n assetPayments.forEach((e) => (checkeds[e.AssetCouponDate] = true));\r\n setSelection({\r\n active: true,\r\n checkeds,\r\n });\r\n } else if (action == \"unselect\") {\r\n const checkeds = {};\r\n assetPayments.forEach((e) => (checkeds[e.AssetCouponDate] = false));\r\n setSelection({\r\n active: true,\r\n checkeds,\r\n });\r\n } else if (action == \"delete\") {\r\n wizzToggle(\"confirm\", {\r\n title: \"Delete payments\",\r\n message: \"Are you sure you want to delete selected payments?\",\r\n onConfirm: () => handleDelete(selection.checkeds),\r\n });\r\n } else if (action == \"toggleCheck\") {\r\n setSelection({\r\n ...selection,\r\n checkeds: {\r\n ...selection.checkeds,\r\n [id]: !selection.checkeds[id],\r\n },\r\n });\r\n }\r\n };\r\n\r\n const forceUpdateAfterRecalculate = () => {\r\n setGrid({ ...grid, loading: true });\r\n\r\n return services\r\n .assetInformation({ assetId })\r\n .then((res) => res.info.Payments)\r\n .then((payments) => {\r\n setTimeout(() => {\r\n wizzOnChange({\r\n Payments: payments,\r\n });\r\n }, 350);\r\n });\r\n };\r\n\r\n const handleRecalculate = () => {\r\n wizzToggle(\"confirm\", {\r\n title: \"Recalculate\",\r\n message: \"Are you sure you want to recalcute coupons?\",\r\n onConfirm: () => {\r\n setRecalculating(true);\r\n services.couponFill({ assetId, recalculate: true }).then((res) => {\r\n forceUpdateAfterRecalculate().then((res) => setRecalculating(false));\r\n });\r\n },\r\n });\r\n };\r\n\r\n\r\n const handleCalculate = () => {\r\n const quantityValue = quantity;\r\n\r\n if ((asset.AssetHasIndex === 1 || asset.AssetHasIndex === true) && (asset.AssetIndex === 'Only Payments' || asset.AssetIndex === 'Principal And Payments')){\r\n setIndice(asset.AssetIndexExpression)\r\n }\r\n\r\n if (!quantityValue) {\r\n setQuantityError(\"This field is required\");\r\n setCalculated(false); \r\n setShowRealAccruals(false); \r\n return;\r\n } else {\r\n setQuantityError(\"\");\r\n setCalculated(true); \r\n setShowRealAccruals(true); \r\n }\r\n };\r\n\r\n const handleChangeQuantity = (e) => {\r\n setQuantity(e.target.value);\r\n setShowRealAccruals(false); \r\n setCalculated(false); \r\n };\r\n\r\n \r\n \r\n\r\n const loadMore = (page) => {\r\n setTimeout(\r\n () => {\r\n setGrid({\r\n payments: assetPayments.slice(0, (page + 1) * 15),\r\n hasMore: assetPayments.length > (page + 1) * 15,\r\n loading: false,\r\n });\r\n },\r\n page ? 500 : 0\r\n );\r\n };\r\n\r\n return (\r\n
\r\n {!readonly && (\r\n
\r\n \r\n\r\n \r\n\r\n
\r\n
\r\n \r\n {quantityError &&
{quantityError}
}\r\n
\r\n\r\n \r\n Calculate\r\n \r\n\r\n handleRecalculate()}\r\n data-style={SLIDE_LEFT}\r\n style={{ height: \"36px\"}}\r\n >\r\n Recalculate\r\n \r\n
\r\n
\r\n )}\r\n }\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {grid.loading ? (\r\n \r\n ) : grid.payments ? (\r\n \r\n {grid.payments.map((item, index) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n {grid.payments.length == 0 && }\r\n \r\n ) : null}\r\n \r\n
\r\n Coupon dateCoupon rateCapitalization rateSinkPrincipal factorAccrual factorCoupon numberExpected paymentReal Accrual
\r\n {selection.active && (\r\n handleSelectionAction(\"toggleCheck\", item.AssetCouponDate)}\r\n >\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {item.AssetCouponNumber}\r\n \r\n \r\n {calculated && showRealAccruals && (\r\n \r\n )}\r\n \r\n {!readonly && (\r\n \r\n )}\r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nconst EmptyOrLoading = ({ loading }) => (\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n \r\n No payments\r\n \r\n )}\r\n \r\n \r\n);\r\n\r\nconst Actions = ({ action, id, deleting }) => (\r\n
\r\n \r\n\r\n action(Mode.Delete, id)}\r\n data-style={ZOOM_OUT}\r\n data-size={XS}\r\n >\r\n \r\n \r\n
\r\n);\r\n\r\nconst SelectActions = ({ setSelection, selection, doAction }) => {\r\n return (\r\n
\r\n {selection.active ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n setSelection({ ...selection, active: true })}\r\n >\r\n Select items\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nexport default Payments;\r\n","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport {\r\n Table,\r\n UncontrolledDropdown,\r\n DropdownToggle,\r\n DropdownMenu,\r\n DropdownItem,\r\n Input,\r\n Row,\r\n Col,\r\n Label,\r\n FormGroup,\r\n} from \"reactstrap\";\r\nimport { LoadingMessage } from \"../../Controls\";\r\nimport { WizzMode } from \"../../types\";\r\nimport { useEntities } from \"../../Wizzard\";\r\nimport style from \"./../../styles.module.scss\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport { DateField, truncateNumber } from \"../../../../utils\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { showToast } from \"../../../../utils/Helper\";\r\n\r\nconst Portfolios = ({ mode, services, assetId, toggleOrder, assetInfo, opsViewAccountName }) => {\r\n const [, setReadonly] = useState(mode == WizzMode.View);\r\n const [] = useState({ open: false });\r\n const [] = useEntities({});\r\n const [portfolio, setPortfolio] = useState({});\r\n const [date, setDate] = useState(new Date().toLocaleDateString(\"en\"));\r\n const [] = useState({\r\n io: { open: false },\r\n order: { open: false },\r\n custody: { open: false },\r\n sellAll: { open: false },\r\n });\r\n const [loading, setLoading] = useState(false);\r\n const [empty, setEmpty] = useState(true);\r\n const [decimalAmount, setDecimalAmount] = useState();\r\n\r\n useEffect(() => {\r\n if (mode) {\r\n setReadonly(mode == WizzMode.View);\r\n }\r\n services.fetchPortfolios({ id: assetId, date: date }).then((res) => {\r\n res.portfolio.forEach((p) => {\r\n p.PortfolioQuantity = truncateNumber(p.PortfolioQuantity, assetInfo.SubAssetClassDecimalPlaces);\r\n });\r\n setPortfolio({ portfolio: res.portfolio });\r\n if (res.portfolio.length != 0) setEmpty(false);\r\n });\r\n services.assetInformation({ assetId: assetId }).then((response) => {\r\n setDecimalAmount(response.info.SubAssetClassDecimalPlaces);\r\n });\r\n }, [mode]);\r\n\r\n const handleOrder = (name, item) => {\r\n var quantity;\r\n {\r\n name == \"Sell\" ? (quantity = item.PortfolioQuantity) : (quantity = \"\");\r\n }\r\n toggleOrder(\"order\", {\r\n order: {\r\n CurrentAccount: {\r\n AccountId: item.accountId,\r\n AccountName: item.AccountName,\r\n AccountNumber: item.AccountNumber,\r\n Quantity: quantity,\r\n },\r\n AccountId: item.accountId,\r\n AccountName: item.AccountName,\r\n AccountNumber: item.AccountNumber,\r\n OrderSide: name,\r\n OrderQuantity: quantity,\r\n AssetId: assetId,\r\n AssetTicker: assetInfo.AssetTicker,\r\n AssetClassForm: assetInfo.AssetClassForm,\r\n AssetDescription: assetInfo.AssetDescription,\r\n },\r\n });\r\n };\r\n\r\n const changeDate = (value) => {\r\n setPortfolio({ portfolio: null });\r\n services\r\n .fetchPortfolios({ id: assetId, date: value })\r\n .then((res) => setPortfolio({ portfolio: res.portfolio }));\r\n setDate(value);\r\n };\r\n\r\n const handleDownload = () => {\r\n setLoading(true);\r\n services\r\n .AssetPortfoliosXLSX(portfolio)\r\n .then((r) => {\r\n if (r.response.count > 0) {\r\n try {\r\n const blob = new Blob([new Uint8Array(r.response.buffer.data)], {\r\n type: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;\",\r\n });\r\n const link = document.createElement(\"a\");\r\n link.href = window.URL.createObjectURL(blob);\r\n link.download = \"Portfolios.xlsx\";\r\n link.click();\r\n } catch (ex) {}\r\n }\r\n })\r\n .catch((e) => {});\r\n setLoading(false);\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n changeDate(value)}\r\n value={date}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {opsViewAccountName !== undefined ?\r\n (\r\n opsViewAccountName ?\r\n (\r\n \r\n )\r\n :\r\n (\r\n \"\"\r\n )\r\n )\r\n :\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {portfolio.portfolio ? (\r\n \r\n {portfolio.portfolio.map((item) => (\r\n \r\n \r\n \r\n {opsViewAccountName !== undefined ?\r\n (\r\n opsViewAccountName ?\r\n (\r\n \r\n )\r\n :\r\n (\r\n \"\"\r\n )\r\n )\r\n :\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n {portfolio.portfolio.length == 0 && }\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n
NumberAccountAccountBalance TypeQuantityAverage PricePortfolio Invested
\r\n \r\n \r\n \r\n \r\n \r\n handleOrder(e.target.name, item)}>\r\n Buy\r\n \r\n handleOrder(e.target.name, item)}>\r\n Sell\r\n \r\n \r\n \r\n {item.AccountNumber}{item.AccountName}{item.AccountName}{item.PortfolioBalanceType}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nconst EmptyOrLoading = ({ loading }) => (\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n \r\n No portfolios\r\n \r\n )}\r\n \r\n \r\n);\r\n\r\nexport default Portfolios;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport LaddaButton, { ZOOM_OUT, XS, SLIDE_LEFT } from \"react-ladda\";\r\nimport { Table, Button } from \"reactstrap\";\r\nimport { LoadingMessage } from \"../../Controls\";\r\nimport { DateField } from \"../../../../utils\";\r\nimport { addMonth } from \"./../../../Modal/ActivityV2/helper\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport ModalQuote, { parseDate } from \"./../../Modals/ModalQuote\";\r\nimport style from \"./styles.module.scss\";\r\nimport { useEntities } from \"../../Wizzard\";\r\nimport { WizzMode, Mode } from \"../../types\";\r\n\r\nconst Quotes = ({ mode, assetId, currencies, fields, services, wizzToggle, wizzOnChange, decimalScale = null }) => {\r\n const [quotes, setQuotes] = useState(false);\r\n const [readonly, setReadonly] = useState(false);\r\n const [modalQuote, setModalQuote] = useState({ open: false });\r\n const [deleting, setDeleting] = useEntities({});\r\n\r\n const [filter, setFilter] = useState({\r\n FromDate: addMonth(new Date(), -1),\r\n ToDate: new Date(),\r\n });\r\n\r\n useEffect(() => {\r\n setQuotes(false);\r\n services.quotes({ assetId, filter }).then(({ result, quotes }) => {\r\n setQuotes(quotes);\r\n });\r\n }, [filter]);\r\n\r\n useEffect(() => {\r\n if (mode) {\r\n setReadonly(mode == WizzMode.View);\r\n }\r\n }, [mode]);\r\n\r\n const toggle = (props) => {\r\n setModalQuote({ open: !modalQuote.open, ...props });\r\n };\r\n\r\n // handle grid actions\r\n const handleAction = (action, quoteDate) => {\r\n if (action == Mode.Insert) {\r\n toggle({\r\n assetId,\r\n action,\r\n onConfirm: (e) => handleSave(action, e),\r\n });\r\n } else if (action == Mode.Update) {\r\n toggle({\r\n assetId,\r\n action,\r\n quote: quotes.find((p) => p.AssetQuoteDate == quoteDate),\r\n onConfirm: (e) => handleSave(action, e),\r\n });\r\n } else if (action == Mode.Delete) {\r\n wizzToggle(\"confirm\", {\r\n title: \"Delete quote\",\r\n message: \"Are you sure you want to delete quote?\",\r\n onConfirm: () => handleDelete(quoteDate),\r\n });\r\n }\r\n };\r\n\r\n // callback after modal confirm\r\n const handleSave = (action, quote) => {\r\n return services\r\n .updateQuote({\r\n assetId,\r\n action,\r\n quote,\r\n })\r\n .then((res) => res.result)\r\n .then((result) => {\r\n if (result.Code == 200) {\r\n setQuotes([quote].concat(quotes.filter((e) => e.AssetQuoteDate != quote.AssetQuoteDate)));\r\n } else {\r\n wizzToggle(\"message\", {\r\n title: \"Error\",\r\n message: result.Description,\r\n });\r\n }\r\n\r\n return result.Code;\r\n });\r\n };\r\n\r\n // callback after confirm delete\r\n const handleDelete = (id) => {\r\n setDeleting({ ...deleting, [id]: true });\r\n\r\n services\r\n .updateQuote({\r\n action: \"DLT\",\r\n assetId,\r\n quote: quotes.find((e) => e.AssetQuoteDate == id),\r\n })\r\n .then((res) => res.result)\r\n .then((result) => {\r\n setDeleting({\r\n ...deleting,\r\n [id]: false,\r\n });\r\n if (result.Code == 200) {\r\n setQuotes(quotes.filter((e) => e.AssetQuoteDate != id));\r\n } else {\r\n wizzToggle(\"message\", {\r\n title: \"Error\",\r\n message: result.Description,\r\n });\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
From Date
\r\n
\r\n setFilter({ ...filter, FromDate: value })}\r\n value={filter.FromDate || new Date().toLocaleDateString(\"en\")}\r\n />\r\n
\r\n
\r\n
\r\n
To Date
\r\n
\r\n setFilter({ ...filter, ToDate: value })}\r\n value={filter.ToDate || new Date().toLocaleDateString(\"en\")}\r\n />\r\n
\r\n
\r\n
\r\n {!readonly && (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {quotes ? (\r\n \r\n {quotes.map((q) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n {quotes.length == 0 && }\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n
DateCurrencyPriceAccounting PriceAdjusted PriceOpen PriceClose PriceQuotes Dirty
\r\n \r\n {q.QuoteCurrencyISO}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {q.AssetQuotePriceIsDirty? 'YES':'NO'}\r\n \r\n {!readonly && (\r\n \r\n )}\r\n
\r\n {modalQuote.open && (\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nconst EmptyOrLoading = ({ loading }) => (\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n \r\n No asset quotes\r\n \r\n )}\r\n \r\n \r\n);\r\n\r\nconst Actions = ({ action, id, deleting }) => (\r\n
\r\n \r\n\r\n action(Mode.Delete, id)}\r\n data-style={ZOOM_OUT}\r\n data-size={XS}\r\n >\r\n \r\n \r\n
\r\n);\r\n\r\nexport default Quotes;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"filter\":\"styles-module_filter_L9Jav\",\"field\":\"styles-module_field__5CTg\",\"label\":\"styles-module_label_3KjTs\",\"input\":\"styles-module_input_2UDyR\"};","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { Table, Button } from \"reactstrap\";\r\nimport ModalSinonyms from \"../../Modals/ModalSinonyms\";\r\nimport { LoadingMessage } from \"../../Controls\";\r\nimport { Mode, WizzMode } from \"../../types\";\r\nimport LaddaButton, { ZOOM_OUT, XS } from \"react-ladda\";\r\nimport { useEntities } from \"../../Wizzard\";\r\nimport classNames from \"classnames\";\r\nimport style from \"./../../styles.module.scss\";\r\n\r\nconst Sinonyms = ({\r\n mode,\r\n defaultId,\r\n assetSynonyms,\r\n services,\r\n dataProviders,\r\n assetId,\r\n wizzOnChange,\r\n wizzToggle,\r\n}) => {\r\n const [readonly, setReadonly] = useState(mode == WizzMode.View);\r\n const [modalSinonyms, setModalSinonyms] = useState({ open: false });\r\n const [deleting, setDeleting] = useEntities({});\r\n\r\n useEffect(() => {\r\n if (mode) {\r\n setReadonly(mode == WizzMode.View);\r\n }\r\n }, [mode]);\r\n\r\n const toggle = (props) => {\r\n setModalSinonyms({ open: !modalSinonyms.open, ...props });\r\n };\r\n\r\n // handle grid actions\r\n const handleAction = (action, synonymId) => {\r\n if (action == Mode.Insert) {\r\n toggle({\r\n assetId,\r\n action,\r\n onConfirm: (e) => handleSave(action, e),\r\n });\r\n } else if (action == Mode.Update) {\r\n toggle({\r\n assetId,\r\n action,\r\n synonym: assetSynonyms.find((s) => s.DataProviderId == synonymId),\r\n onConfirm: (e) => handleSave(action, e),\r\n });\r\n } else if (action == Mode.Delete) {\r\n wizzToggle(\"confirm\", {\r\n title: \"Delete asset synonym\",\r\n message: \"Are you sure you want to delete asset synonym?\",\r\n onConfirm: () => handleDelete(synonymId),\r\n });\r\n }\r\n };\r\n\r\n // callback after modal confirm\r\n const handleSave = (action, synonym) => {\r\n return services\r\n .updateSynonym({\r\n assetId,\r\n action,\r\n synonym,\r\n })\r\n .then((res) => res.result)\r\n .then((result) => {\r\n if (result.Code == 200) {\r\n wizzOnChange({\r\n Synonyms: [synonym].concat(\r\n assetSynonyms.filter((e) => e.DataProviderId != synonym.DataProviderId)\r\n ),\r\n });\r\n } else {\r\n wizzToggle(\"message\", {\r\n title: \"Error\",\r\n message: result.Description,\r\n });\r\n }\r\n\r\n return result.Code;\r\n });\r\n };\r\n\r\n // callback after confirm delete\r\n const handleDelete = (id) => {\r\n setDeleting({ [id]: true });\r\n services\r\n .updateSynonym({\r\n assetId,\r\n action: Mode.Delete,\r\n synonym: assetSynonyms.find((e) => e.DataProviderId == id),\r\n })\r\n .then((res) => res.result)\r\n .then((result) => {\r\n setDeleting({ [id]: false });\r\n if (result.Code == 200) {\r\n assetSynonyms.splice(\r\n assetSynonyms.findIndex((e) => e.DataProviderId == id),\r\n 1\r\n );\r\n wizzOnChange({\r\n Synonyms: assetSynonyms,\r\n });\r\n } else {\r\n wizzToggle(\"message\", {\r\n title: \"Error\",\r\n message: result.Description,\r\n });\r\n }\r\n });\r\n };\r\n return (\r\n
\r\n {!readonly && (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {assetSynonyms ? (\r\n \r\n {assetSynonyms.map((item) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n {assetSynonyms.length == 0 && }\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n
Data ProviderAsset ProviderTrade PricingAccount Pricing
{item.DataProviderName}{item.AssetProviderName}{item.AssetProviderTradePricing ? \"Yes\" : \"No\"}{item.AssetProviderAccountingPricing ? \"Yes\" : \"No\"}\r\n {!readonly && (\r\n \r\n )}\r\n
\r\n\r\n \r\n
\r\n );\r\n};\r\n\r\nconst EmptyOrLoading = ({ loading }) => (\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n \r\n No sinonyms\r\n \r\n )}\r\n \r\n \r\n);\r\n\r\nconst Actions = ({ action, id, deleting }) => (\r\n
\r\n \r\n\r\n action(Mode.Delete, id)}\r\n data-style={ZOOM_OUT}\r\n data-size={XS}\r\n >\r\n \r\n \r\n
\r\n);\r\n\r\nconst filterDataProviders = (dataProviders) => {};\r\n\r\nexport default Sinonyms;\r\n","import React, { Fragment } from \"react\";\r\nimport { LoadingMessage } from \"../../Controls\";\r\nimport { Row, Col } from \"reactstrap\";\r\nimport style from \"./styles.module.scss\";\r\nimport { FormField } from \"../../../..\";\r\n\r\nconst AssetSubClass = ({ subAsset }) => {\r\n return (\r\n
\r\n Sub asset class section\r\n {subAsset ? (\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nconst parseYesNo = (value) => (value ? \"Yes\" : \"No\");\r\n\r\n// &info.SubAssetClassQuoting = SubAssetClassQuoting\r\n// &info.SubAssetClassPaymentType = SubAssetClassPaymentType\r\nexport default AssetSubClass;\r\n","import React, { Fragment, useState, useEffect } from \"react\";\r\nimport { Row, Col, Spinner, FormGroup, CustomInput } from \"reactstrap\";\r\nimport {\r\n DayCountFractions,\r\n PaymentBase,\r\n PaymentFormula,\r\n IssuanceType,\r\n IndexType,\r\n CallPut,\r\n FundType,\r\n YesNo,\r\n QuotingType,\r\n Decimals,\r\n WizzMode,\r\n OfferType,\r\n SectorType,\r\n PaymentRateType,\r\n} from \"../../types\";\r\nimport { Suggest, LoadingMessage, FormNumber, LoadingField, FormSelect, FormCheck } from \"./../../Controls\";\r\nimport AssetSubClass from \"./AssetSubClass\";\r\nimport { FormField } from \"../../../..\";\r\nimport { parseDate } from \"./../../Modals/ModalQuote\";\r\nimport style from \"./styles.module.scss\";\r\n\r\nconst Structure = ({ mode, services, fields, previousFields, entities, wizzOnChange }) => {\r\n const [readonly, setReadonly] = useState(false);\r\n\r\n useEffect(() => {\r\n if (mode) {\r\n setReadonly(mode == WizzMode.View);\r\n }\r\n }, [mode]);\r\n\r\n const [UseAssetAnnualTargetPerfomance, setShowAnnualTargetPerformance] = useState(false);\r\n const [UseAssetQualified, setShowIsQualified] = useState(false);\r\n\r\n useEffect(() => {\r\n if (services.getParameterValue) {\r\n services.getParameterValue({ ParameterName: \"UseAssetAnnualTargetPerfomance\" }, (response) => {\r\n if (response && response.SdtParametersData && response.SdtParametersData.ParameterNumericValue == 1) {\r\n setShowAnnualTargetPerformance(true);\r\n }\r\n });\r\n }\r\n services.getParameterValue({ ParameterName: \"UseAssetQualification\" }, (response) => {\r\n if (response && response.SdtParametersData && response.SdtParametersData.ParameterNumericValue == 1) {\r\n setShowIsQualified(true);\r\n }\r\n });\r\n }, [services])\r\n\r\n const onChange = (name, value) => {\r\n wizzOnChange({ [name]: value });\r\n };\r\n\r\n const onChangeDate = (name, value) => {\r\n wizzOnChange({ [name]: parseDate(value) });\r\n };\r\n\r\n const onChangeSuggest = (name, values) => {\r\n wizzOnChange(values);\r\n };\r\n\r\n const onChangeCheck = (event) => {\r\n const { id, checked } = event.target;\r\n wizzOnChange({ [id]: checked });\r\n };\r\n\r\n const { currencies, calendars } = entities;\r\n const { SubAssetClassInfo: subAsset } = fields || {};\r\n\r\n return (\r\n
\r\n \r\n Asset section\r\n {fields ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {currencies ? (\r\n i.currencyId}\r\n getSelectItemName={(i) => i.currencyISO}\r\n value={fields.CurrencyId}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.CurrencyId != previousFields.CurrencyId}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n {subAsset.SubAssetClassHasRegularPayments && (\r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetAccrualType}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetAccrualType != previousFields.AssetAccrualType}\r\n />\r\n \r\n )}\r\n {subAsset.SubAssetClassHasRegularPayments && (\r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={parseYesNo(fields.AssetAccrualTypeEOM)}\r\n disabled={readonly}\r\n onChange={(name, value) => onChange(name, +value)}\r\n changedColor={fields.AssetAccrualTypeEOM != previousFields.AssetAccrualTypeEOM}\r\n />\r\n \r\n )}\r\n \r\n {subAsset.SubAssetClassHasRegularPayments && (\r\n \r\n Coupon/Dividend info\r\n \r\n {subAsset.SubAssetClassHasRegularPayments && (\r\n \r\n \r\n \r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetCouponDividendPaymentBase}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={\r\n fields.AssetCouponDividendPaymentBase !=\r\n previousFields.AssetCouponDividendPaymentBase\r\n }\r\n />\r\n \r\n \r\n )}\r\n\r\n {subAsset.SubAssetClassHasRegularPayments && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n )}\r\n \r\n {(subAsset.SubAssetClassPaymentType == PaymentFormula.InterestRate ||\r\n subAsset.SubAssetClassPaymentType == PaymentFormula.EffectiveRate) && (\r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={parseYesNo(fields.AssetHasPartialRedemptions)}\r\n disabled={readonly}\r\n onChange={(name, value) => onChange(name, +value)}\r\n changedColor={\r\n fields.AssetHasPartialRedemptions != previousFields.AssetHasPartialRedemptions\r\n }\r\n />\r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={parseYesNo(fields.AssetHasCapitalizations)}\r\n disabled={readonly}\r\n onChange={(name, value) => onChange(name, +value)}\r\n changedColor={fields.AssetHasCapitalizations != previousFields.AssetHasCapitalizations}\r\n />\r\n \r\n \r\n )}\r\n {subAsset.SubAssetClassQuoting == QuotingType.Contracts && (\r\n \r\n \r\n \r\n )}\r\n \r\n\r\n {(subAsset.SubAssetClassPaymentType == PaymentFormula.InterestRate ||\r\n subAsset.SubAssetClassPaymentType == PaymentFormula.EffectiveRate ||\r\n (subAsset.SubAssetClassPaymentType == PaymentFormula.Dividend &&\r\n subAsset.SubAssetClassHasRegularPayments)) && (\r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetPaymentRateType}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetPaymentRateType != previousFields.AssetPaymentRateType}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={parseYesNo(fields.AssetHasIndex)}\r\n disabled={readonly}\r\n onChange={(name, value) => onChange(name, +value)}\r\n changedColor={fields.AssetHasIndex != previousFields.AssetHasIndex}\r\n />\r\n \r\n\r\n {subAsset.SubAssetClassHasMaturity && (\r\n \r\n \r\n \r\n )}\r\n\r\n {fields.AssetHasIndex == YesNo.Yes && (\r\n \r\n \r\n i.description}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetIndex}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetIndex != previousFields.AssetIndex}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n\r\n \r\n \r\n \r\n \r\n {subAsset.SubAssetClassPricesDirty && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n {subAsset.SubAssetClassIsanOption && (\r\n \r\n Option specific info\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n i.Id}\r\n getSelectItemName={(i) => i.Ticker}\r\n service={services.searchSymbol}\r\n disabled={readonly}\r\n onChange={onChangeSuggest}\r\n changedColor={fields.AssetUnderlyingAsset != previousFields.AssetUnderlyingAsset}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetIsCallPut}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetIsCallPut != previousFields.AssetIsCallPut}\r\n />\r\n \r\n \r\n \r\n )}\r\n\r\n \r\n \r\n i.Id}\r\n getSelectItemName={(i) => i.Name}\r\n getSelectItemExtension={(i) => i.Code}\r\n service={services.searchCountry}\r\n disabled={readonly}\r\n onChange={onChangeSuggest}\r\n changedColor={fields.CountryId != previousFields.CountryId}\r\n />\r\n \r\n\r\n \r\n i.Id}\r\n getSelectItemName={(i) => i.Name}\r\n getSelectItemExtension={(i) => i.Description}\r\n service={services.searchCountryISO2}\r\n disabled={readonly}\r\n onChange={onChangeSuggest}\r\n changedColor={fields.CountryId != previousFields.CountryId}\r\n />\r\n \r\n \r\n \r\n \r\n {currencies ? (\r\n i.currencyId}\r\n getSelectItemName={(i) => i.currencyISO}\r\n value={fields.AssetIssuanceCurrency}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetIssuanceCurrency != previousFields.AssetIssuanceCurrency}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetIssuanceType}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetIssuanceType != previousFields.AssetIssuanceType}\r\n />\r\n \r\n {subAsset.SubAssetClassRequieresIssuanceDate && (\r\n \r\n \r\n \r\n )}\r\n \r\n i.Id}\r\n getSelectItemName={(i) => i.Value}\r\n service={services.searchIssuer}\r\n serviceCreateIssuer={services.createIssuer}\r\n disabled={readonly}\r\n onChange={onChangeSuggest}\r\n changedColor={fields.IssuerId != previousFields.IssuerId}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetOfferType}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetOfferType != previousFields.AssetOfferType}\r\n />\r\n \r\n\r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetSectorType}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetSectorType != previousFields.AssetSectorType}\r\n />\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n i.Id}\r\n getSelectItemName={(i) => i.Value}\r\n service={services.searchCustEntity}\r\n disabled={readonly}\r\n onChange={onChangeSuggest}\r\n changedColor={\r\n fields.AssetPreferredCustodianEntity != previousFields.AssetPreferredCustodianEntity\r\n }\r\n />\r\n \r\n\r\n \r\n {calendars ? (\r\n i.CalendarId}\r\n getSelectItemName={(i) => i.CalendarName}\r\n disabled={readonly}\r\n value={fields.AssetDefaultCalendar == 0 ? -1 : fields.AssetDefaultCalendar}\r\n onChange={onChange}\r\n changedColor={fields.AssetDefaultCalendar != previousFields.AssetDefaultCalendar}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n {UseAssetQualified && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n {subAsset.SubAssetClassIsFund && (\r\n \r\n Fund specific info\r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetFundType}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetFundType != previousFields.AssetFundType}\r\n />\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n Others\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {subAsset.SubAssetClassIsFund && (\r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetMaxDecimals}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetMaxDecimals != previousFields.AssetMaxDecimals}\r\n />\r\n \r\n )}\r\n {UseAssetAnnualTargetPerfomance && subAsset.SubAssetClassIsFund && (\r\n \r\n \r\n \r\n )}\r\n \r\n i.Id}\r\n getSelectItemName={(i) => i.Value}\r\n service={services.searchRegion}\r\n disabled={readonly}\r\n onChange={onChangeSuggest}\r\n changedColor={fields.RiskRegionId != previousFields.RiskRegionId}\r\n />\r\n \r\n \r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nexport default Structure;\r\n\r\nconst parseYesNo = (value) => (value ? 1 : 0);\r\n\r\nconst DayCountFractionsValues = Object.entries(DayCountFractions).map(([key, value]) => ({\r\n id: value,\r\n description: value,\r\n}));\r\n\r\nconst PaymentBaseValues = Object.entries(PaymentBase).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nconst PaymentFormulaValues = Object.entries(PaymentFormula).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nconst IndexTypeValues = Object.entries(IndexType).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nconst CallPutValues = Object.entries(CallPut).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nconst OfferTypeValues = Object.entries(OfferType).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nconst PaymentRateTypeValues = Object.entries(PaymentRateType).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nconst SectorTypeValues = Object.entries(SectorType).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nconst IssuanceTypeValues = Object.entries(IssuanceType).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nconst FundTypeValues = Object.entries(FundType).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nconst YesNoValues = Object.entries(YesNo).map(([value, key]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nconst DecimalsValues = Object.entries(Decimals).map(([value, key]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nexport function validateStruture(fields) {\r\n const fieldNames = [];\r\n const errors = {};\r\n\r\n fieldNames.forEach((name) => {\r\n if (fields[name] == undefined || fields[name] == \"\") {\r\n errors[name] = \"Required field\";\r\n }\r\n });\r\n\r\n return errors;\r\n}\r\n","import React, { Fragment, useState, useEffect } from \"react\";\r\nimport { Row, Col, Spinner, FormGroup, CustomInput } from \"reactstrap\";\r\nimport {\r\n DayCountFractions,\r\n PaymentBase,\r\n PaymentFormula,\r\n IssuanceType,\r\n IndexType,\r\n CallPut,\r\n FundType,\r\n YesNo,\r\n QuotingType,\r\n Decimals,\r\n WizzMode,\r\n OfferType,\r\n SectorType,\r\n PaymentRateType,\r\n} from \"../../types\";\r\nimport { Suggest, LoadingMessage, FormNumber, LoadingField, FormSelect, FormCheck } from \"./../../Controls\";\r\nimport { SuggestIssuer } from \"./../../Controls2\";\r\nimport AssetSubClass from \"./AssetSubClass\";\r\nimport { FormField } from \"../../../..\";\r\nimport { parseDate } from \"./../../Modals/ModalQuote\";\r\nimport style from \"./styles.module.scss\";\r\n\r\nconst Structure2 = ({ mode, services, fields, previousFields, entities, wizzOnChange }) => {\r\n const [readonly, setReadonly] = useState(false);\r\n\r\n\r\n useEffect(() => {\r\n if (fields.AssetIssuanceDate==\"0000-00-00\"){\r\n const today = new Date().toISOString().split(\"T\")[0];\r\n wizzOnChange({ AssetIssuanceDate: today });\r\n }\r\n }, [fields.AssetIssuanceDate]);\r\n \r\n useEffect(() => {\r\n if (mode) {\r\n setReadonly(mode == WizzMode.View);\r\n }\r\n }, [mode]);\r\n\r\n const [UseAssetAnnualTargetPerfomance, setShowAnnualTargetPerformance] = useState(false);\r\n const [UseAssetQualified, setShowIsQualified] = useState(false);\r\n\r\n useEffect(() => {\r\n if (services.getParameterValue) {\r\n services.getParameterValue({ ParameterName: \"UseAssetAnnualTargetPerfomance\" }, (response) => {\r\n if (response && response.SdtParametersData && response.SdtParametersData.ParameterNumericValue == 1) {\r\n setShowAnnualTargetPerformance(true);\r\n }\r\n });\r\n services.getParameterValue({ ParameterName: \"UseAssetQualification\" }, (response) => {\r\n if (response && response.SdtParametersData && response.SdtParametersData.ParameterNumericValue == 1) {\r\n setShowIsQualified(true);\r\n }\r\n });\r\n }\r\n }, [services])\r\n\r\n const onChange = (name, value) => {\r\n wizzOnChange({ [name]: value });\r\n };\r\n\r\n const onChangeDate = (name, value) => {\r\n value=value.split(\"T\")[0];\r\n if (value==\"0000-00-00\"||!value){\r\n value = new Date().toISOString().split(\"T\")[0];\r\n }\r\n wizzOnChange({ [name]: (value) });\r\n };\r\n\r\n const onChangeSuggest = (name, values) => {\r\n wizzOnChange(values);\r\n };\r\n\r\n const onChangeCheck = (event) => {\r\n const { id, checked } = event.target;\r\n wizzOnChange({ [id]: checked });\r\n };\r\n\r\n const onChangeCheckQualified = (event) => {\r\n const { id, checked } = event.target;\r\n const newValue = checked ? \"Qualified\" : \"Unqualified\";\r\n \r\n wizzOnChange({ [id]: newValue });\r\n};\r\n\r\n const { currencies, calendars } = entities;\r\n const { SubAssetClassInfo: subAsset } = fields || {};\r\n\r\n return (\r\n
\r\n \r\n Asset section\r\n {fields ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {currencies ? (\r\n i.currencyId}\r\n getSelectItemName={(i) => i.currencyISO}\r\n value={fields.CurrencyId}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.CurrencyId != previousFields.CurrencyId}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n {subAsset.SubAssetClassHasRegularPayments && (\r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetAccrualType}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetAccrualType != previousFields.AssetAccrualType}\r\n />\r\n \r\n )}\r\n {subAsset.SubAssetClassHasRegularPayments && (\r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={parseYesNo(fields.AssetAccrualTypeEOM)}\r\n disabled={readonly}\r\n onChange={(name, value) => onChange(name, +value)}\r\n changedColor={fields.AssetAccrualTypeEOM != previousFields.AssetAccrualTypeEOM}\r\n />\r\n \r\n )}\r\n \r\n {subAsset.SubAssetClassHasRegularPayments && (\r\n \r\n Coupon/Dividend info\r\n \r\n {subAsset.SubAssetClassHasRegularPayments && (\r\n \r\n \r\n \r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetCouponDividendPaymentBase}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={\r\n fields.AssetCouponDividendPaymentBase !=\r\n previousFields.AssetCouponDividendPaymentBase\r\n }\r\n />\r\n \r\n \r\n )}\r\n\r\n {subAsset.SubAssetClassHasRegularPayments && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n )}\r\n \r\n {(subAsset.SubAssetClassPaymentType == PaymentFormula.InterestRate ||\r\n subAsset.SubAssetClassPaymentType == PaymentFormula.EffectiveRate) && (\r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={parseYesNo(fields.AssetHasPartialRedemptions)}\r\n disabled={readonly}\r\n onChange={(name, value) => onChange(name, +value)}\r\n changedColor={\r\n fields.AssetHasPartialRedemptions != previousFields.AssetHasPartialRedemptions\r\n }\r\n />\r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={parseYesNo(fields.AssetHasCapitalizations)}\r\n disabled={readonly}\r\n onChange={(name, value) => onChange(name, +value)}\r\n changedColor={fields.AssetHasCapitalizations != previousFields.AssetHasCapitalizations}\r\n />\r\n \r\n \r\n )}\r\n {subAsset.SubAssetClassQuoting == QuotingType.Contracts && (\r\n \r\n \r\n \r\n )}\r\n \r\n\r\n {(subAsset.SubAssetClassPaymentType == PaymentFormula.InterestRate ||\r\n subAsset.SubAssetClassPaymentType == PaymentFormula.EffectiveRate ||\r\n (subAsset.SubAssetClassPaymentType == PaymentFormula.Dividend &&\r\n subAsset.SubAssetClassHasRegularPayments)) && (\r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetPaymentRateType}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetPaymentRateType != previousFields.AssetPaymentRateType}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={parseYesNo(fields.AssetHasIndex)}\r\n disabled={readonly}\r\n onChange={(name, value) => onChange(name, +value)}\r\n changedColor={fields.AssetHasIndex != previousFields.AssetHasIndex}\r\n />\r\n \r\n\r\n {subAsset.SubAssetClassHasMaturity && (\r\n \r\n \r\n \r\n )}\r\n\r\n {fields.AssetHasIndex == YesNo.Yes && (\r\n \r\n \r\n i.description}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetIndex}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetIndex != previousFields.AssetIndex}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n\r\n \r\n \r\n \r\n \r\n {subAsset.SubAssetClassPricesDirty && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n {subAsset.SubAssetClassIsanOption && (\r\n \r\n Option specific info\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n i.Id}\r\n getSelectItemName={(i) => i.Ticker}\r\n service={services.searchSymbol}\r\n disabled={readonly}\r\n onChange={onChangeSuggest}\r\n changedColor={fields.AssetUnderlyingAsset != previousFields.AssetUnderlyingAsset}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetIsCallPut}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetIsCallPut != previousFields.AssetIsCallPut}\r\n />\r\n \r\n \r\n \r\n )}\r\n\r\n \r\n \r\n i.Id}\r\n getSelectItemName={(i) => i.Name}\r\n getSelectItemExtension={(i) => i.Code}\r\n service={services.searchCountry}\r\n disabled={readonly}\r\n onChange={onChangeSuggest}\r\n changedColor={fields.CountryId != previousFields.CountryId}\r\n />\r\n \r\n\r\n \r\n i.Id}\r\n getSelectItemName={(i) => i.Name}\r\n getSelectItemExtension={(i) => i.Description}\r\n service={services.searchCountryISO2}\r\n disabled={readonly}\r\n onChange={onChangeSuggest}\r\n changedColor={fields.CountryId != previousFields.CountryId}\r\n />\r\n \r\n \r\n \r\n \r\n {currencies ? (\r\n i.currencyId}\r\n getSelectItemName={(i) => i.currencyISO}\r\n value={fields.AssetIssuanceCurrency}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetIssuanceCurrency != previousFields.AssetIssuanceCurrency}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetIssuanceType}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetIssuanceType != previousFields.AssetIssuanceType}\r\n />\r\n \r\n {subAsset.SubAssetClassRequieresIssuanceDate && (\r\n \r\n \r\n \r\n )}\r\n \r\n i.Id}\r\n getSelectItemName={(i) => i.Value}\r\n services={services}\r\n serviceCreateIssuer={services.createIssuer}\r\n disabled={readonly}\r\n onChange={onChangeSuggest}\r\n changedColor={fields.IssuerId != previousFields.IssuerId}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetOfferType}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetOfferType != previousFields.AssetOfferType}\r\n />\r\n \r\n\r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetSectorType}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetSectorType != previousFields.AssetSectorType}\r\n />\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n i.Id}\r\n getSelectItemName={(i) => i.Value}\r\n service={services.searchCustEntity}\r\n disabled={readonly}\r\n onChange={onChangeSuggest}\r\n changedColor={\r\n fields.AssetPreferredCustodianEntity != previousFields.AssetPreferredCustodianEntity\r\n }\r\n />\r\n \r\n\r\n \r\n {calendars ? (\r\n i.CalendarId}\r\n getSelectItemName={(i) => i.CalendarName}\r\n disabled={readonly}\r\n value={fields.AssetDefaultCalendar == 0 ? -1 : fields.AssetDefaultCalendar}\r\n onChange={onChange}\r\n changedColor={fields.AssetDefaultCalendar != previousFields.AssetDefaultCalendar}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n {UseAssetQualified && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n {subAsset.SubAssetClassIsFund && (\r\n \r\n Fund specific info\r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetFundType}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetFundType != previousFields.AssetFundType}\r\n />\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n Others\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {subAsset.SubAssetClassIsFund && (\r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={fields.AssetMaxDecimals}\r\n disabled={readonly}\r\n onChange={onChange}\r\n changedColor={fields.AssetMaxDecimals != previousFields.AssetMaxDecimals}\r\n />\r\n \r\n )}\r\n {UseAssetAnnualTargetPerfomance && subAsset.SubAssetClassIsFund && (\r\n \r\n \r\n \r\n )}\r\n \r\n i.Id}\r\n getSelectItemName={(i) => i.Value}\r\n service={services.searchRegion}\r\n disabled={readonly}\r\n onChange={onChangeSuggest}\r\n changedColor={fields.RiskRegionId != previousFields.RiskRegionId}\r\n />\r\n \r\n \r\n \r\n \r\n {fields.SubAssetClassInfo && fields.SubAssetClassInfo.SubAssetClassPhisicalDenomination ? (\r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={parseYesNo(fields.AssetPhysicalDenomination)}\r\n disabled={readonly}\r\n onChange={(name, value) => onChange(name, +value)}\r\n />\r\n ) : (\r\n \"\"\r\n )}\r\n \r\n \r\n {fields.SubAssetClassInfo &&\r\n fields.SubAssetClassInfo.SubAssetClassPhisicalDenomination &&\r\n fields.AssetPhysicalDenomination ? (\r\n \r\n ) : (\r\n \"\"\r\n )}\r\n \r\n \r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nexport default Structure2;\r\n\r\nconst parseYesNo = (value) => (value ? 1 : 0);\r\n\r\nconst DayCountFractionsValues = Object.entries(DayCountFractions).map(([key, value]) => ({\r\n id: value,\r\n description: value,\r\n}));\r\n\r\nconst PaymentBaseValues = Object.entries(PaymentBase).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nconst PaymentFormulaValues = Object.entries(PaymentFormula).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nconst IndexTypeValues = Object.entries(IndexType).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nconst CallPutValues = Object.entries(CallPut).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nconst OfferTypeValues = Object.entries(OfferType).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nconst PaymentRateTypeValues = Object.entries(PaymentRateType).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nconst SectorTypeValues = Object.entries(SectorType).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nconst IssuanceTypeValues = Object.entries(IssuanceType).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nconst FundTypeValues = Object.entries(FundType).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nconst YesNoValues = Object.entries(YesNo).map(([value, key]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nconst DecimalsValues = Object.entries(Decimals).map(([value, key]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nexport function validateStruture(fields) {\r\n const fieldNames = [];\r\n const errors = {};\r\n\r\n fieldNames.forEach((name) => {\r\n if (fields[name] == undefined || fields[name] == \"\") {\r\n errors[name] = \"Required field\";\r\n }\r\n });\r\n\r\n return errors;\r\n}\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"checkbox\":\"styles-module_checkbox_pJDo0\",\"section\":\"styles-module_section_3TWOJ\",\"sectionDark\":\"styles-module_sectionDark_28343\",\"subAsset\":\"styles-module_subAsset_2-j3_\"};","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport LaddaButton, { ZOOM_OUT, XS } from \"react-ladda\";\r\nimport { Table, Button } from \"reactstrap\";\r\nimport { LoadingMessage } from \"../../Controls\";\r\nimport ModalTax from \"../../Modals/ModalTax\";\r\nimport { useEntities } from \"../../Wizzard\";\r\nimport { Mode, WizzMode } from \"../../types\";\r\nimport { showToast } from \"../../../../utils/Helper\"\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nconst Tax = ({\r\n mode,\r\n services,\r\n assetTaxes,\r\n assetId,\r\n wizzOnChange,\r\n wizzToggle,\r\n fields,\r\n role\r\n}) => {\r\n const [readonly, setReadonly] = useState(mode == WizzMode.View);\r\n const [modalTax, setModalTax] = useState({ open: false });\r\n const [deleting, setDeleting] = useEntities({});\r\n\r\n useEffect(() => {\r\n if (mode) {\r\n setReadonly(mode == WizzMode.View);\r\n }\r\n }, [mode]);\r\n\r\n const toggle = (props) => {\r\n setModalTax({ open: !modalTax.open, ...props });\r\n };\r\n\r\n // handle grid actions\r\n const handleAction = (action, taxId) => {\r\n if (action == Mode.Insert) {\r\n toggle({\r\n assetId,\r\n action,\r\n onConfirm: (e) => handleSave(action, e),\r\n });\r\n } else if (action == Mode.Update) {\r\n toggle({\r\n assetId,\r\n action,\r\n tax: assetTaxes.find((t) => t.TAXId == taxId),\r\n onConfirm: (e) => handleSave(action, e),\r\n });\r\n } else if (action == Mode.Delete) {\r\n wizzToggle(\"confirm\", {\r\n title: \"Delete asset tax\",\r\n message: \"Are you sure you want to delete asset tax?\",\r\n onConfirm: () => handleDelete(taxId),\r\n });\r\n }\r\n };\r\n\r\n // callback after modal confirm\r\n const handleSave = (action, tax) => {\r\n return services\r\n .updateTax({\r\n assetId,\r\n action,\r\n tax,\r\n })\r\n .then((res) => res.result)\r\n .then((result) => {\r\n if (result.Code == 200) {\r\n wizzOnChange({\r\n Taxes: [tax].concat(assetTaxes.filter((e) => e.TAXId != tax.TAXId)),\r\n });\r\n } else {\r\n wizzToggle(\"message\", {\r\n title: \"Error\",\r\n message: result.Description,\r\n });\r\n }\r\n\r\n return result.Code;\r\n });\r\n };\r\n\r\n // callback after confirm delete\r\n const handleDelete = (id) => {\r\n \r\n //No puedo eliminar todos los tax si el Asset esta Ready to Book o Ready to Trade\r\n if (assetTaxes.length == 1 && (fields.AssetReadyToBook || fields.AssetReadyToTrade)){\r\n showToast('If Assets are Ready to Book or Ready to Trade, you cannot delete all their taxes.', true)\r\n return\r\n }\r\n \r\n setDeleting({ [id]: true });\r\n services\r\n .updateTax({\r\n assetId,\r\n action: Mode.Delete,\r\n tax: assetTaxes.find((e) => e.TAXId == id),\r\n })\r\n .then((res) => res.result)\r\n .then((result) => {\r\n setDeleting({ [id]: false });\r\n if (result.Code == 200) {\r\n assetTaxes.splice(\r\n assetTaxes.findIndex((e) => e.TAXId == id),\r\n 1\r\n );\r\n wizzOnChange({\r\n Taxes: assetTaxes,\r\n });\r\n } else {\r\n wizzToggle(\"message\", {\r\n title: \"Error\",\r\n message: result.Description,\r\n });\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n {!readonly && (\r\n handleAction(Mode.Insert)}\r\n >\r\n \r\n Add Tax\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {assetTaxes ? (\r\n \r\n {assetTaxes.map((item) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n {assetTaxes.length == 0 && }\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n
NameTypePercentage
{item.TAXName}{item.TAXType}\r\n {!readonly && (\r\n \r\n )}\r\n
\r\n\r\n \r\n
\r\n );\r\n};\r\n\r\nconst EmptyOrLoading = ({ loading }) => (\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n No taxes\r\n )}\r\n \r\n \r\n);\r\n\r\nconst Actions = ({ action, id, deleting, role }) => (\r\n
\r\n action(Mode.Update, id)}\r\n >\r\n \r\n \r\n\r\n action(Mode.Delete, id)}\r\n data-style={ZOOM_OUT}\r\n data-size={XS}\r\n >\r\n \r\n \r\n
\r\n);\r\n\r\nexport default Tax;\r\n","import React, { useState, useEffect, useReducer } from \"react\";\r\nimport { Card, CardHeader, CardBody, CardFooter } from \"reactstrap\";\r\nimport LaddaButton, { SLIDE_LEFT } from \"react-ladda\";\r\nimport { TabName, WizzMode } from \"./types\";\r\nimport { getAttachments } from \"./Tabs/General/Attachments\";\r\nimport StructureTab, { validateStruture } from \"./Tabs/Structure/Structure\";\r\nimport Structure2Tab from \"./Tabs/Structure/Structure2\";\r\nimport GeneralTab, { validateGeneral } from \"./Tabs/General/General\";\r\nimport ModalCalculator from \"./Calculator/Calculator\";\r\nimport PaymentsTab from \"./Tabs/Payments/Payments\";\r\nimport ContractsTab from \"./Tabs/Contracts/Contracts\";\r\nimport SinonymslTab from \"./Tabs/Sinonyms/Sinonyms\";\r\nimport CurrencyTab from \"./Tabs/Currency/Currency\";\r\nimport ModalMessage from \"./Modals/ModalMessage\";\r\nimport ModalConfirm from \"./Modals/ModalConfirm\";\r\nimport AgenciesTab from \"./Tabs/Agencies/Agencies\";\r\nimport GroupsTab from \"./Tabs/Groups/Groups\";\r\nimport QuotesTab from \"./Tabs/Quotes/Quotes\";\r\nimport Navigation from \"./Navigation\";\r\nimport Header from \"./Header/Header\";\r\nimport TaxTab from \"./Tabs/Tax/Tax\";\r\nimport style from \"./styles.module.scss\";\r\nimport PortfoliosTab from \"./Tabs/Portfolios/Portfolios\";\r\nimport { Denominations } from \"./Tabs/Denominations/Denominations\";\r\nimport FundamentalsTab from \"./Tabs/Fundamentals/Fundamentals\";\r\nimport ModalLoadFromFile from \"./Modals/ModalLoadFromFile\";\r\nimport { toast } from \"react-toastify\";\r\nconst initialState = {\r\n AssetName: \"\",\r\n AssetTicker: \"\",\r\n AssetDescription: \"\",\r\n AssetIssuanceCurrency: null,\r\n AssetDefaultIdentifierValue: \"\",\r\n Attachments: [],\r\n};\r\n\r\nconst Wizzard = ({ id, mode, role, Link, services, showToast, redirect, toggleOrder, initialTab, opsViewAccountName }) => {\r\n const [modals, setModals] = useState({\r\n confirm: { open: false },\r\n message: { open: false },\r\n calculator: { open: false },\r\n });\r\n const [saving, setSaving] = useState({});\r\n const [asset, setAsset] = useState(false);\r\n const [previousAsset, setPreviousAsset] = useState(false);\r\n const [errors, setErrors] = useState({});\r\n const [changedFiles, setChangedFiles] = useState({});\r\n const [tab, setTab] = useState(initialTab || TabName.General);\r\n const [fileModalOpen, setFileModalOpen] = useState(true);\r\n const [entities, setEntities] = useEntities({\r\n subAssetClasses: null,\r\n dataProviders: null,\r\n currencies: null,\r\n riskTypes: null,\r\n calendars: null,\r\n });\r\n\r\n useEffect(() => {\r\n services.assetEntities({}).then(({ subAssetClasses, dataProviders, riskTypes, calendars }) =>\r\n setEntities({\r\n subAssetClasses,\r\n dataProviders,\r\n riskTypes,\r\n calendars,\r\n })\r\n );\r\n\r\n services\r\n .currencies({})\r\n .then((res) => res.currencies)\r\n .then((currencies) => setEntities({ currencies }));\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (mode) {\r\n if (id) {\r\n setAsset(false);\r\n\r\n services.assetInformation({ assetId: id }).then((res) => {\r\n setAsset(res.info);\r\n setPreviousAsset(res.info);\r\n });\r\n } else {\r\n setAsset(initialState);\r\n setPreviousAsset(initialState);\r\n }\r\n }\r\n }, [id]);\r\n\r\n useEffect(() => {\r\n if (asset.SubAssetClassId) {\r\n services\r\n .subAssetClass({ subAssetClassId: asset.SubAssetClassId })\r\n .then((res) => res.info)\r\n .then((info) =>\r\n setAsset({\r\n ...asset,\r\n SubAssetClassName: info.SubAssetClassName,\r\n SubAssetClassInfo: info,\r\n })\r\n );\r\n }\r\n }, [asset.SubAssetClassId]);\r\n\r\n const onChange = (newFields) => {\r\n setErrors({ ...errors, ...mapKeysToUndefined(newFields) });\r\n setAsset((prevAsset) => ({ ...prevAsset, ...newFields }));\r\n if (newFields && newFields.Synonyms)\r\n services.assetInformation({ assetId: id }).then((res) => {\r\n setAsset(res.info);\r\n setPreviousAsset(res.info);\r\n });\r\n if (asset.AssetIssuanceCurrency == null) {\r\n let currencyId = entities.currencies != null ? entities.currencies[0].currencyId : null;\r\n setAsset((prevAsset) => ({ ...prevAsset, AssetIssuanceCurrency: currencyId }));\r\n }\r\n if (newFields.AssetPhysicalDenomination == 1) {\r\n setAsset((prevAsset) => ({ ...prevAsset, AssetSheetSize: 1 }));\r\n }\r\n };\r\n\r\n const toggle = (name, props = {}) => {\r\n setModals({ ...modals, [name]: { open: !modals[name].open, ...props } });\r\n };\r\n\r\n const handleSave = (saveAndContinue) => {\r\n let forceGet = false;\r\n let nextErrors = {};\r\n let serviceHanlder;\r\n let wizzardIsValid = true;\r\n let generalIsValid = true;\r\n let strutureIsValid = true;\r\n\r\n const generalErrors = validateGeneral(asset);\r\n if (Object.keys(generalErrors).length != 0) {\r\n generalIsValid = false;\r\n }\r\n\r\n const structureErrors = validateStruture(asset);\r\n if (Object.keys(structureErrors).length != 0) {\r\n strutureIsValid = false;\r\n }\r\n\r\n if (mode == WizzMode.Edit) {\r\n serviceHanlder = services.update;\r\n nextErrors = { ...nextErrors, ...generalErrors, ...structureErrors };\r\n wizzardIsValid = generalIsValid && strutureIsValid;\r\n } else {\r\n serviceHanlder = services.create;\r\n nextErrors = { ...nextErrors, ...generalErrors };\r\n wizzardIsValid = generalIsValid;\r\n }\r\n\r\n const changedAttachments = getAttachments(changedFiles);\r\n const changedFields = asset;\r\n\r\n if (\r\n mode == WizzMode.Edit &&\r\n changedFields.AssetDefaultIdentifier != previousAsset.AssetDefaultIdentifier\r\n ) {\r\n forceGet = true;\r\n }\r\n\r\n setErrors(nextErrors);\r\n\r\n if (wizzardIsValid) {\r\n setSaving({\r\n saveAndContinue,\r\n save: !saveAndContinue,\r\n });\r\n\r\n serviceHanlder({\r\n info: changedFields,\r\n attachments: changedAttachments,\r\n })\r\n .then((res) => {\r\n setSaving({});\r\n if (!res) {\r\n toggle(\"message\", { title: \"Error\", message: \"Server error.\" });\r\n return;\r\n }\r\n\r\n const { result, assetId } = res;\r\n if (result.Code == 200) {\r\n setPreviousAsset(asset);\r\n showToast(\"Asset saved\");\r\n\r\n if (mode == WizzMode.New) {\r\n setTimeout(() => {\r\n if (saveAndContinue) {\r\n setAsset(false);\r\n setChangedFiles({});\r\n redirect({ page: \"asset\", assetId });\r\n } else {\r\n redirect({ page: \"assets\" });\r\n }\r\n }, 500);\r\n }\r\n // first save after clone and change defaultDataProviderId\r\n if (forceGet) {\r\n services.assetInformation({ assetId: changedFields.AssetId }).then((res) => {\r\n setAsset(res.info);\r\n setPreviousAsset(res.info);\r\n });\r\n }\r\n } else {\r\n showToast(result.Description, false, true);\r\n }\r\n })\r\n .catch((error) => {\r\n toggle(\"message\", {\r\n title: \"Error\",\r\n message: \"Server error.\",\r\n });\r\n });\r\n } else {\r\n showToast(\"Please fill in all required fields\", true);\r\n }\r\n };\r\n\r\n const handleChangeFiles = (id, file) => {\r\n setChangedFiles({ ...changedFiles, [id]: file });\r\n };\r\n return (\r\n
\r\n setFileModalOpen(true)}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n {tab === TabName.General && (\r\n \r\n )}\r\n {tab === TabName.Structure && !services.fetchServiceGetIssuerType && (\r\n \r\n )}\r\n {tab === TabName.Structure && services.fetchServiceGetIssuerType && (\r\n \r\n )}\r\n {tab === TabName.Payments && !asset.Contracts && (\r\n \r\n )}\r\n {tab === TabName.Payments && asset.Contracts && (\r\n \r\n )}\r\n {tab === TabName.Groups && (\r\n \r\n )}\r\n {tab === TabName.Tax && (\r\n \r\n )}\r\n {tab === TabName.Sinonyms && (\r\n \r\n )}\r\n {tab === TabName.Currency && (\r\n \r\n )}\r\n {tab === TabName.Quotes && (\r\n \r\n )}\r\n {tab === TabName.Agencies && (\r\n \r\n )}\r\n {tab == TabName.Portfolios && (\r\n \r\n )}\r\n {tab == TabName.Denominations && asset.AssetPhysicalDenomination && (\r\n \r\n )}\r\n {tab == TabName.Fundamentals && (\r\n \r\n )}\r\n\r\n {modals.message.open && toggle(\"message\", {})} />}\r\n\r\n {modals.confirm.open && toggle(\"confirm\", {})} />}\r\n\r\n {modals.calculator.open && (\r\n toggle(\"calculator\", {})}\r\n role={role}\r\n />\r\n )}\r\n \r\n {mode != WizzMode.View && (\r\n \r\n {mode == WizzMode.New && role == \"backoffice\" && (\r\n handleSave(false)}\r\n data-style={SLIDE_LEFT}\r\n >\r\n \r\n Save and send to backoffice\r\n \r\n )}\r\n {(tab === TabName.General || tab === TabName.Structure) && (\r\n handleSave(true)}\r\n data-style={SLIDE_LEFT}\r\n >\r\n \r\n {mode == WizzMode.New ? \"Save and continue\" : \"Save changes\"}\r\n \r\n )}\r\n \r\n )}\r\n \r\n
\r\n );\r\n};\r\n\r\nexport const useEntities = (initial) => useReducer((state, newState) => ({ ...state, ...newState }), initial);\r\n\r\nconst getPropertySafe = (elem, key) => (elem ? elem[key] : null);\r\n\r\nfunction mapKeysToUndefined(keys) {\r\n const result = {};\r\n Object.keys(keys).forEach((key) => (result[key] = undefined));\r\n return result;\r\n}\r\n\r\nexport default Wizzard;\r\n","import Grid from \"./Grid/Grid\";\r\nimport Toolbar from \"./Grid/Toolbar\";\r\nimport Header from \"./Header/Header\";\r\nimport Wizzard from \"./Wizzard\";\r\n\r\nexport { Grid, Toolbar, Header, Wizzard };\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"card\":\"styles-module_card_282zg\",\"body\":\"styles-module_body_3_AHi\",\"loadingMessage\":\"styles-module_loadingMessage_3j0sh\",\"status\":\"styles-module_status_3sFfK\",\"inprocess\":\"styles-module_inprocess_c7Zel\",\"active\":\"styles-module_active_jQ7xT\",\"inactive\":\"styles-module_inactive_LMjOp\",\"payments\":\"styles-module_payments_OiEns\",\"checkBox\":\"styles-module_checkBox_2YYWC\",\"highlight\":\"styles-module_highlight_3lrn7\",\"customCheckChanged\":\"styles-module_customCheckChanged_3cZVU\",\"alignRight\":\"styles-module_alignRight_2XBiN\",\"alignCenter\":\"styles-module_alignCenter_28OmT\",\"column20\":\"styles-module_column20_2-Ww9\",\"column10\":\"styles-module_column10_20VCs\",\"styleDetails\":\"styles-module_styleDetails_2HGjh\",\"date\":\"styles-module_date_pt45w\",\"contractDetailsWrapper\":\"styles-module_contractDetailsWrapper_2W-tT\",\"leg\":\"styles-module_leg_24P5s\",\"opening\":\"styles-module_opening_3heKX\",\"closing\":\"styles-module_closing_IY5zQ\",\"couponPaymentsLink\":\"styles-module_couponPaymentsLink_2h7ZG\",\"paymentsTotal\":\"styles-module_paymentsTotal_9lRR9\",\"rowDenominationAdd\":\"styles-module_rowDenominationAdd_33uLI\",\"rowDenominationDelete\":\"styles-module_rowDenominationDelete_b8fVj\"};","export const TabName = {\r\n General: \"General\",\r\n Structure: \"Structure\",\r\n Payments: \"Payments\",\r\n Tax: \"Tax\",\r\n Groups: \"Groups\",\r\n Sinonyms: \"Sinonyms\",\r\n Currency: \"Currency\",\r\n Quotes: \"Quotes\",\r\n Agencies: \"Agencies\",\r\n Portfolios: \"Portfolios\",\r\n Denominations: \"Denominations\",\r\n Fundamentals: \"Fundamentals\",\r\n};\r\n\r\nexport const DayCountFractions = {\r\n ACTISDA: \"ACTISDA\",\r\n ACT365: \"ACT365\",\r\n ACT360: \"ACT360\",\r\n ACTISMA: \"ACTISMA\",\r\n ACTAFB: \"ACTAFB\",\r\n BOND30360: \"BOND30360\",\r\n EU30360: \"30E/360\",\r\n ISDA30360: \"30E/360 (ISDA)\",\r\n BOND30365: \"BOND30365\",\r\n ACTPY: \"ACTPY\",\r\n};\r\n\r\nexport const PaymentBase = {\r\n Days: \"Days\",\r\n Weeks: \"Weeks\",\r\n Months: \"Months\",\r\n Years: \"Years\",\r\n};\r\n\r\nexport const PaymentFormula = {\r\n InterestRate: \"Interest Rate\",\r\n ZeroCoupon: \"Zero Coupon\",\r\n Dividend: \"Dividend\",\r\n DiscountSimple: \"Discount Simple\",\r\n DiscountCompound: \"Discount Compound\",\r\n EffectiveRate: \"Effective Rate\",\r\n None: \"None\",\r\n};\r\n\r\nexport const IndexType = {\r\n None: \"None\",\r\n OnlyPrincipal: \"Only Principal\",\r\n OnlyPayments: \"Only Payments\",\r\n PrincipalAndPayments: \"Principal And Payments\",\r\n};\r\n\r\nexport const CallPut = {\r\n Call: \"Call\",\r\n Put: \"Put\",\r\n};\r\n\r\nexport const IssuanceType = {\r\n Global: \"Global\",\r\n Local: \"Local\",\r\n Foreign: \"Foreign\",\r\n};\r\n\r\nexport const SectorType = {\r\n Sovereign: \"Sovereign\",\r\n Public: \"Public\",\r\n Private: \"Private\",\r\n};\r\n\r\nexport const OfferType = {\r\n Public: \"Public\",\r\n Private: \"Private\",\r\n};\r\n\r\nexport const PaymentRateType = {\r\n Fixed: \"Fixed\",\r\n Variable: \"Variable\",\r\n};\r\n\r\nexport const FundType = {\r\n Open: \"Open\",\r\n Close: \"Close\",\r\n};\r\n\r\nexport const YesNo = {\r\n Yes: 1,\r\n No: 0,\r\n};\r\n\r\nexport const QuotingType = {\r\n Units: \"Units\",\r\n Percentage: \"Percentage\",\r\n Contracts: \"Contracts\",\r\n};\r\n\r\nexport const Mode = {\r\n Insert: \"INS\",\r\n Update: \"UPD\",\r\n Delete: \"DLT\",\r\n};\r\n\r\nexport const WizzMode = {\r\n New: \"new\",\r\n Edit: \"edit\",\r\n View: \"view\",\r\n Quotes: \"quotes\",\r\n};\r\n\r\nexport const Decimals = {\r\n 0: \"0\",\r\n 1: \"1\",\r\n 2: \"2\",\r\n 3: \"3\",\r\n 4: \"4\",\r\n 5: \"5\",\r\n 6: \"6\",\r\n 7: \"7\",\r\n 8: \"8\",\r\n};\r\n\r\nexport const TaxType = {\r\n VAT: \"VAT\",\r\n INCOME: \"INCOME\",\r\n MARKETWTAX: \"MARKETWTAX\",\r\n};\r\n\r\nexport const SinkType = {\r\n Face: \"Original face\",\r\n Remaining: \"Remaining\",\r\n};\r\n\r\nexport const AssetStatus = {\r\n Active: \"Active\",\r\n Inactive: \"Inactive\",\r\n InProcess: \"InProcess\",\r\n Deleted: \"Deleted\",\r\n Blocked: \"Blocked\",\r\n Matured: \"Matured\",\r\n};\r\n\r\nexport const DenominationStatus = {\r\n Active: \"Active\",\r\n Inactive: \"Inactive\",\r\n};\r\n\r\nexport const DPEditing = {\r\n None: \"None\",\r\n Both: \"Both\",\r\n OnlyValue: \"OnlyValue\",\r\n};\r\n","import React from \"react\";\r\nimport { AuthorizationStatus } from \"./types\";\r\nimport { Authorizations } from \"..\";\r\n\r\nclass AuthorizationsPage extends React.Component {\r\n state = {\r\n role: \"\",\r\n location: {\r\n hash: null,\r\n },\r\n filters: {\r\n text: \"\",\r\n status: null,\r\n fromDate: (() => {\r\n const date = new Date();\r\n date.setMonth(date.getMonth() - 6);\r\n return date;\r\n })(),\r\n toDate: new Date(),\r\n },\r\n modalAuth: {\r\n open: false,\r\n },\r\n authorizations: [],\r\n loading: false,\r\n hasMore: true,\r\n page: 0,\r\n pageSize: 20,\r\n skip: 0,\r\n isAdvancedFilterActive: false, \r\n };\r\n \r\n changeAdvancedFilter = (props) => {\r\n const { dispatch, authorizationsSuccess, fetchGetAuthorizations } = this.props;\r\n const { pageSize } = this.state;\r\n \r\n this.setState(\r\n {\r\n filters: { ...this.state.filters, ...props },\r\n isAdvancedFilterActive: true,\r\n authorizations: [],\r\n skip: 0, \r\n hasMore: true,\r\n isAdvancedFilterLoading: true, \r\n },\r\n () => {\r\n fetchGetAuthorizations({\r\n all: true,\r\n length: 50,\r\n filter: {\r\n Length: pageSize,\r\n Offset: 0,\r\n FromDate: props.fromDate,\r\n ToDate: props.toDate,\r\n Text: props.text,\r\n Status: typeof props.status === \"string\" ? props.status : \"\",\r\n }\r\n }).then((r) => {\r\n dispatch(authorizationsSuccess(r.authorizations));\r\n this.setState({\r\n authorizations: r.authorizations,\r\n skip: pageSize, \r\n hasMore: r.authorizations.length === pageSize,\r\n isAdvancedFilterLoading: false, \r\n });\r\n });\r\n }\r\n );\r\n };\r\n\r\n loadAuthorizations = () => {\r\n const { dispatch, authorizationsSuccess, fetchGetAuthorizations } = this.props;\r\n const { pageSize, skip, filters, isAdvancedFilterActive, isAdvancedFilterLoading } = this.state;\r\n\r\n \r\n if (isAdvancedFilterActive && isAdvancedFilterLoading) return;\r\n\r\n this.setState({ loading: true }, () => {\r\n const filterOptions = isAdvancedFilterActive\r\n ? {\r\n Length: pageSize,\r\n Offset: skip,\r\n FromDate: filters.fromDate,\r\n ToDate: filters.toDate,\r\n Text: filters.text,\r\n Status: typeof filters.status === \"string\" ? filters.status : \"\",\r\n }\r\n : {\r\n Length: pageSize,\r\n Offset: skip,\r\n };\r\n\r\n fetchGetAuthorizations({\r\n all: true,\r\n length: 50,\r\n filter: filterOptions,\r\n }).then((r) => {\r\n dispatch(authorizationsSuccess(r.authorizations));\r\n\r\n this.setState((prevState) => ({\r\n authorizations:\r\n skip === 0 ? [...r.authorizations] : [...prevState.authorizations, ...r.authorizations],\r\n loading: false,\r\n hasMore: r.authorizations.length === pageSize,\r\n skip: prevState.skip + pageSize,\r\n }));\r\n });\r\n });\r\n };\r\n\r\n\r\n componentDidMount() {\r\n const session = this.props.getSession();\r\n this.setState({ role: session.UserRoleName });\r\n if (session.Advisor && session.Advisor.manager) {\r\n this.setState({ manager: true });\r\n }else\r\n {\r\n this.setState({manager: false });\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n const locationState = this.props.location.state;\r\n const { location } = this.state;\r\n const { authorizations } = this.props;\r\n\r\n if (locationState && locationState.id) {\r\n if (authorizations == null) return;\r\n\r\n if (location.hash !== locationState.hash) {\r\n this.setState({\r\n location: { ...location, hash: locationState.hash },\r\n });\r\n this.toggleModal(\"modalAuth\", {\r\n authorization: authorizations.find((a) => a.id === locationState.id),\r\n });\r\n }\r\n }\r\n }\r\n\r\n toggleModal = (name, props) => {\r\n this.setState({ [name]: { open: !this.state[name].open, ...props } });\r\n };\r\n\r\n changeFilter = (props) => {\r\n this.setState({\r\n filters: { ...this.state.filters, ...props },\r\n authorizations: [],\r\n skip: 0,\r\n page: 0,\r\n hasMore: true,\r\n });\r\n };\r\n \r\n handleReadAuthorization = (authorization) => {\r\n const { username, fetchSetAsReadAuthorization } = this.props;\r\n if (!authorization.wasReadBy.includes(username) && authorization.status !== AuthorizationStatus.Waiting) {\r\n this.props.actions.authorizationsRead(authorization.id, username);\r\n fetchSetAsReadAuthorization({ id: authorization.id });\r\n }\r\n };\r\n\r\n render() {\r\n const { filters, modalAuth, role, authorizations, loading, hasMore } = this.state;\r\n const { username, AuthorizationWrapper, getUser } = this.props;\r\n const filteredAuthorizations = filterAuthorizations(authorizations, filters, getUser());\r\n\r\n return (\r\n
\r\n this.props.handleDownload(filteredAuthorizations)}\r\n />\r\n\r\n \r\n\r\n this.toggleModal(\"modalAuth\", e)}\r\n />\r\n
\r\n );\r\n }\r\n}\r\n\r\nfunction filterAuthorizations(authorizations, filters, username) {\r\n if (authorizations == null || authorizations.length == 0) return [];\r\n\r\n const filtered = authorizations.filter((a) => {\r\n if (filters.status) {\r\n const status = a.processedBy !== \"\" ? (a.authorized ? \"Authorized\" : \"Rejected\") : \"Waiting\";\r\n if (filters.status !== status) {\r\n return false;\r\n }\r\n }\r\n\r\n if (filters.text != null && filters.text !== \"\") {\r\n const parts = [a.title, a.process, a.AccountName, a.description, a.requestedBy].map((p) =>\r\n p ? p.trim().toLowerCase() : \"\"\r\n );\r\n return filters.text.split(\" \").every((p) => parts.some((s) => s.includes(p)));\r\n }\r\n\r\n return true;\r\n });\r\n\r\n // Sort by status\r\n filtered.sort((a1, a2) => {\r\n const compare_wasRead = a1.wasReadBy.includes(username) - a2.wasReadBy.includes(username);\r\n const compare_waiting =\r\n (a2.requestedBy !== username && a2.processedBy === \"\") -\r\n (a1.requestedBy !== username && a1.processedBy === \"\");\r\n\r\n const compare_dateTime = new Date(a1.dateTime) - new Date(a2.dateTime);\r\n const compare_status =\r\n [AuthorizationStatus.Authorized, AuthorizationStatus.Rejected].includes(a1.status) -\r\n [AuthorizationStatus.Authorized, AuthorizationStatus.Rejected].includes(a2.status);\r\n\r\n return compare_wasRead || compare_waiting || compare_status || compare_dateTime;\r\n });\r\n\r\n return filtered;\r\n}\r\n\r\nexport default AuthorizationsPage;\r\n","import React from \"react\";\r\nimport { DropdownItem, Badge } from \"reactstrap\";\r\nimport style from \"./../style.module.scss\";\r\nimport { DateTime, Icon } from \"../UI\";\r\nimport classnames from \"classnames\";\r\nimport { FormattedDate, FormattedTime } from \"react-intl\";\r\nimport { localDateTime } from \"../../../utils/Helper\";\r\n\r\nconst Item = ({ item, header, toggleModal, setRead }) => {\r\n const processed = item.processedBy != \"\";\r\n\r\n const handleOnClick = () => {\r\n toggleModal({ authorization: item });\r\n\r\n if (processed) {\r\n handleRead({ id: item.id });\r\n }\r\n };\r\n\r\n const handleRead = ({ id }) => setRead({ id });\r\n\r\n return (\r\n handleOnClick()} className={classnames(style.item, {})}>\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n {item.process} #{item.processId}\r\n \r\n \r\n
\r\n {\" \"}\r\n \r\n
\r\n \r\n {header === \"unread\" ? (\r\n handleRead({ id: item.id })}>\r\n ) : (\r\n \r\n )}\r\n \r\n
\r\n
\r\n

{item.text}

\r\n {item.description !== \"\" &&

{item.description}

}\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default Item;\r\n","import React, { useState, Fragment } from \"react\";\r\nimport {\r\n Badge,\r\n DropdownToggle,\r\n DropdownMenu,\r\n DropdownItem,\r\n Dropdown as ReactStrapDropDown,\r\n} from \"reactstrap\";\r\nimport Item from \"./Item\";\r\nimport style from \"./../style.module.scss\";\r\nimport { classifyAuthorizations } from \"../types\";\r\n\r\nconst List = ({ items, username, role, toggleModal, routes, link, setRead }) => {\r\n const [open, setOpen] = useState(false);\r\n const [groups, counter] = classifyAuthorizations(items, username, role);\r\n\r\n const toggle = () => setOpen(!open);\r\n\r\n const actions = {\r\n toggle: toggleModal,\r\n read: setRead,\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {counter >= 15 ? \"15+\" : isNaN(counter) ? \"-\" : counter}\r\n \r\n \r\n \r\n \r\n
\r\n \r\n Authorizations\r\n \r\n {items && items.length == 0 && (\r\n
\r\n No Authorizations\r\n
\r\n )}\r\n {items && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n
\r\n \r\n View all authorizations\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nconst ItemGroup = ({ header, items, toggle, read }) => {\r\n if (!items || items.length == 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n {header}\r\n ({items.length})\r\n \r\n {items.map((item) => (\r\n \r\n ))}\r\n \r\n );\r\n};\r\n\r\nexport function getRoute(routes, process) {\r\n const route = routes[process] || { to: \"/\" };\r\n return route.to;\r\n}\r\n\r\nexport default List;\r\n","import React from \"react\";\r\nimport { Table } from \"reactstrap\";\r\nimport InfiniteScroll from \"react-infinite-scroller\";\r\nimport style from \"./style.module.scss\";\r\nimport CircularProgress from \"./../CircularProgress/CircularProgress\";\r\nimport * as UI from \"./UI\";\r\nimport { FormattedDate, FormattedTime } from \"react-intl\";\r\nimport { localDateTime } from \"../../utils/Helper\";\r\nimport { Tooltip } from \"../UI\";\r\n\r\nconst Grid = ({ authorizations, username, actions, loading, loadingAdvanced, loadMore, hasMore }) => {\r\n const view = (authorization) => {\r\n actions.toggleModal(\"modalAuth\", { authorization });\r\n if (!authorization.wasReadBy.includes(username)) {\r\n actions.setRead(authorization);\r\n }\r\n };\r\n\r\n const getStatusPriority = (status) => {\r\n switch (status) {\r\n case \"Waiting\":\r\n return 0;\r\n case \"Authorized\":\r\n return 1;\r\n case \"Rejected\":\r\n return 2;\r\n default:\r\n return 3;\r\n }\r\n };\r\n \r\n\r\n return (\r\n
\r\n }\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {authorizations == null || authorizations.length === 0 || loadingAdvanced ? (\r\n \r\n ) : (\r\n authorizations\r\n .sort((a, b) => {\r\n const statusPriorityA = getStatusPriority(a.status);\r\n const statusPriorityB = getStatusPriority(b.status);\r\n\r\n if (statusPriorityA !== statusPriorityB) {\r\n return statusPriorityA - statusPriorityB;\r\n }\r\n return new Date(b.dateTime) - new Date(a.dateTime);\r\n })\r\n .map((a, index) => (\r\n view(a)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))\r\n )}\r\n \r\n
ProcessTitleStatusAuth. RoleRequested ByProcessed ByDate
\r\n {a.process}\r\n \r\n \r\n \r\n {a.title} {a.hasPendingRelatedAuthorizations ? : null}\r\n \r\n \r\n {a.role}{a.requestedBy}{a.processedBy}\r\n {\" \"}\r\n \r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nconst PendingRelatedAuthorizations = () => (\r\n \r\n \r\n \r\n);\r\n\r\nconst EmptyTable = ({ loading, loadingAdvanced }) => (\r\n \r\n \r\n {loading || loadingAdvanced ? :

No Authorizations

}\r\n \r\n \r\n);\r\n\r\nexport default Grid;","import React from 'react';\r\nimport { InputGroup, Input, Button } from 'reactstrap';\r\n\r\n \r\nconst SearchBox = ({changeValue, text, ...props}) => (\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n\r\n changeValue({'text': e.target.value})}\r\n />\r\n
\r\n)\r\n\r\nexport default SearchBox;","import React, { Component } from \"react\";\r\nimport {\r\n Col,\r\n Row,\r\n Button,\r\n DropdownMenu,\r\n DropdownToggle,\r\n DropdownItem,\r\n UncontrolledDropdown,\r\n} from \"reactstrap\";\r\nimport SearchBox from \"./SearchBox\";\r\nimport style from \"./Toolbar.module.scss\";\r\nimport { debounce } from \"../../../utils/Helper\";\r\nimport Responsive from \"react-responsive\";\r\nimport AdvancedSearchbox from \"../../AdvancedSearchbox/AdvancedSearchbox\";\r\nimport Filter from \"../../Modal/Order/Field/Symbol/Options/Filter\";\r\n\r\nclass Toolbar extends Component {\r\n state = {\r\n filters: {\r\n text: \"\",\r\n status: 0,\r\n type: 0,\r\n fromDate: new Date(new Date().setMonth(new Date().getMonth() - 6)).toISOString().split(\"T\")[0],\r\n toDate: new Date().toISOString().split(\"T\")[0],\r\n },\r\n advanced: {\r\n open: false,\r\n },\r\n };\r\n\r\n handleFilterDebounced = debounce(() => {\r\n this.props.changeFilter({\r\n ...this.state.filters,\r\n });\r\n }, 200);\r\n\r\n changeFilterValue = (props) => {\r\n this.setState(\r\n {\r\n filters: {\r\n ...this.state.filters,\r\n ...props,\r\n },\r\n },\r\n () => {\r\n this.handleFilterDebounced();\r\n }\r\n );\r\n };\r\n\r\n changeAdvancedFilter = (filter) => {\r\n if (filter.fromDate !== undefined || filter.toDate !== undefined) {\r\n this.props.changeAdvancedFilter(filter); }\r\n };\r\n\r\n render() {\r\n const { filters } = this.state;\r\n const { counters } = this.props;\r\n\r\n return (\r\n
\r\n \r\n \r\n {/* Totals */}\r\n \r\n \r\n \r\n {/* Search input and Advanced */}\r\n
\r\n \r\n
\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst Desktop = (props) => ;\r\n\r\nconst Counter = ({ total, filtered }) => (\r\n \r\n
Records: {total}
\r\n\r\n
{filtered} filtered
\r\n
\r\n);\r\n\r\nconst DropDownFilterStatus = ({ value, onChange }) => (\r\n \r\n \r\n {value !== 0 ? value : \"All status\"}\r\n \r\n \r\n onChange({ status: 0 })}>{\"All status\"}\r\n onChange({ status: \"Pending\" })}>{\"Pending\"}\r\n onChange({ status: \"Waiting\" })}>{\"Waiting\"}\r\n onChange({ status: \"Authorized\" })}>{\"Authorized\"}\r\n onChange({ status: \"Rejected\" })}>{\"Rejected\"}\r\n \r\n \r\n);\r\n\r\nexport default Toolbar;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"toolbar\":\"Toolbar-module_toolbar_1KGY2\",\"filterDropdown\":\"Toolbar-module_filterDropdown_LcciL\",\"dropdown\":\"Toolbar-module_dropdown_UPFVz\",\"export\":\"Toolbar-module_export_18x2d\",\"totals\":\"Toolbar-module_totals_N-Xqd\",\"advanced\":\"Toolbar-module_advanced_3hIaw\",\"inputs\":\"Toolbar-module_inputs_2HGuy\"};","import React from \"react\";\r\nimport { Badge } from \"reactstrap\";\r\nimport style from \"./style.module.scss\";\r\nimport classnames from \"classnames\";\r\nimport { FormattedDate, FormattedTime } from \"react-intl\";\r\nimport { AuthorizationStatus } from \"./types\";\r\n\r\nexport const Status = ({ status }) => {\r\n return (\r\n \r\n {status.toUpperCase()}\r\n \r\n );\r\n};\r\n\r\nexport const ReadStatus = ({ status, wasRead }) => {\r\n if (status != AuthorizationStatus.Waiting && wasRead) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n {status == AuthorizationStatus.Waiting ? \"pending\" : \"unread\"}\r\n \r\n );\r\n};\r\n\r\nexport const DateTime = ({ date }) => {\r\n if (date == null) {\r\n return \"-\";\r\n }\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport function Icon({ processed, authorized }) {\r\n if (processed) {\r\n if (authorized) {\r\n return ;\r\n } else {\r\n return ;\r\n }\r\n } else {\r\n return ;\r\n }\r\n}\r\n","import Grid from './Grid'\r\nimport Toolbar from './Toolbar/Toolbar'\r\nimport Bar from './Bar/List'\r\nimport * as Types from './types'\r\nimport AuthorizationsPage from './AuthorizationsPage'\r\n\r\nexport {AuthorizationsPage, Grid, Toolbar, Bar, Types}\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"grid\":\"style-module_grid_39sOV\",\"empty\":\"style-module_empty_278ZF\",\"status\":\"style-module_status_2lgU5\",\"waiting\":\"style-module_waiting_1uGjA\",\"authorized\":\"style-module_authorized_2poIF\",\"rejected\":\"style-module_rejected_3Iiv_\",\"readStatus\":\"style-module_readStatus_3kQ9O\",\"item\":\"style-module_item_1j5A9\",\"icon\":\"style-module_icon_2pgsC\",\"pin\":\"style-module_pin_2BURQ\",\"body\":\"style-module_body_11SYl\",\"process\":\"style-module_process_1YslX\",\"top\":\"style-module_top_1K8h6\",\"badge\":\"style-module_badge_195mP\",\"more\":\"style-module_more_2Hovq\",\"tada\":\"style-module_tada_1e-l2\",\"container\":\"style-module_container_1QkTv\",\"header\":\"style-module_header_Xk3jB\"};","export function classifyAuthorizations(authorizations, username, role = \"\") {\r\n let counter;\r\n let groups = {\r\n todo: [],\r\n waiting: [],\r\n unread: [],\r\n };\r\n\r\n if (authorizations == null) {\r\n return [groups, counter];\r\n }\r\n\r\n authorizations.forEach((item) => {\r\n if (\r\n item.requestedBy.toLowerCase() == username.toLowerCase() ||\r\n item.role.toLowerCase() !== role.toLowerCase()\r\n ) {\r\n if (item.processedBy === \"\") {\r\n groups.waiting.push(item);\r\n } else {\r\n groups.unread.push(item);\r\n }\r\n } else if (item.processedBy === \"\") {\r\n groups.todo.push(item);\r\n }\r\n });\r\n\r\n counter = groups.todo.length + groups.waiting.length;\r\n // ponderateListLength(groups);\r\n return [groups, counter];\r\n}\r\n\r\nfunction ponderateListLength(groups) {\r\n const g1 = groupLength(groups, \"todo\");\r\n const g2 = groupLength(groups, \"waiting\");\r\n const g3 = groupLength(groups, \"unread\");\r\n\r\n if (g1 + g2 + g3 > 9) {\r\n // find the largest group and remove 1 element and try again\r\n const max = Math.max(g1, g2, g3);\r\n\r\n if (g1 == max) {\r\n groups.todo = groups.todo.splice(1);\r\n }\r\n if (g2 == max) {\r\n groups.waiting = groups.waiting.splice(1);\r\n }\r\n if (g3 == max) {\r\n groups.unread = groups.unread.splice(1);\r\n }\r\n\r\n ponderateListLength(groups);\r\n }\r\n}\r\n\r\nexport const AuthorizationStatus = {\r\n Waiting: \"Waiting\",\r\n Authorized: \"Authorized\",\r\n Rejected: \"Rejected\",\r\n};\r\n\r\nconst groupLength = (groups, name) => groups[name].length;\r\n","import ReactAutosuggest from \"react-autosuggest\";\r\nimport React, { Component } from \"react\";\r\nimport { Input } from \"reactstrap\";\r\nimport style from \"./Autosuggest.module.scss\";\r\nimport { debounce } from \"../../utils/Helper\";\r\n\r\nconst theme = {\r\n suggestionsContainer: style.suggestionsContainer,\r\n suggestionsContainerOpen: style.suggestionsContainerOpen,\r\n suggestionsList: style.suggestionsList,\r\n suggestionHighlighted: style.suggestionHighlighted,\r\n suggestion: style.suggestion,\r\n input: style.input,\r\n};\r\n\r\nclass Autosuggest extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n value: props.value,\r\n selected: props.value !== undefined,\r\n suggestions: [],\r\n };\r\n\r\n this.onChange = this.onChange.bind(this);\r\n this.onSuggestionSelected = this.onSuggestionSelected.bind(this);\r\n this.onSuggestionsFetchRequested = debounce(this.onSuggestionsFetchRequested.bind(this), 300);\r\n this.onSuggestionsClearRequested = this.onSuggestionsClearRequested.bind(this);\r\n this.shouldRenderSuggestions = this.shouldRenderSuggestions.bind(this);\r\n }\r\n\r\n componentWillUpdate(nextProps, nextState) {\r\n if (this.state.value != nextState.value) {\r\n this.setState({ value: nextState.value });\r\n } else if (this.props.value != nextProps.value) {\r\n this.setState({ value: nextProps.value });\r\n }\r\n }\r\n\r\n onChange(event, { newValue, method }) {\r\n if (method == \"up\" || method == \"down\") return;\r\n\r\n if (method !== \"click\" && method !== \"enter\") {\r\n this.props.onChange(method, newValue);\r\n }\r\n\r\n this.setState({\r\n value: newValue,\r\n selected: method == \"enter\" || method == \"click\",\r\n });\r\n }\r\n\r\n onSuggestionSelected(event, { suggestion, method }) {\r\n this.props.onChange(method, suggestion);\r\n }\r\n\r\n // Autosuggest will call this function every time you need to update suggestions.\r\n // You already implemented this logic above, so just use it.\r\n onSuggestionsFetchRequested({ value, reason }) {\r\n if (reason == \"input-focused\") {\r\n if (this.state.selected) {\r\n return;\r\n }\r\n }\r\n\r\n this.setState({ loading: true });\r\n\r\n this.props.onSuggestionsFetchRequested({ value }).then((suggestions) => {\r\n this.setState({\r\n suggestions,\r\n loading: false,\r\n });\r\n });\r\n }\r\n\r\n // Autosuggest will call this function every time you need to clear suggestions.\r\n onSuggestionsClearRequested() {\r\n this.setState({\r\n suggestions: [],\r\n });\r\n }\r\n\r\n shouldRenderSuggestions(value) {\r\n return value.length > 0;\r\n }\r\n\r\n render() {\r\n const { value, suggestions } = this.state;\r\n const inlineStyle = this.props.style || {};\r\n const inputProps = {\r\n ...this.props.inputProps,\r\n value,\r\n onChange: this.onChange,\r\n };\r\n return (\r\n
\r\n }\r\n inputProps={inputProps}\r\n alwaysRenderSuggestions={false}\r\n />\r\n {this.state.loading &&
}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default Autosuggest;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"suggestionsContainer\":\"Autosuggest-module_suggestionsContainer_1cV-E\",\"suggestionsContainerOpen\":\"Autosuggest-module_suggestionsContainerOpen_2hhW7\",\"suggestionsList\":\"Autosuggest-module_suggestionsList_1DBTs\",\"suggestion\":\"Autosuggest-module_suggestion_1r6T9\",\"suggestionHighlighted\":\"Autosuggest-module_suggestionHighlighted_1K7Rk\",\"input\":\"Autosuggest-module_input_FS44I\",\"item\":\"Autosuggest-module_item_NlaHm\",\"loading\":\"Autosuggest-module_loading_25_Lw\",\"spinner\":\"Autosuggest-module_spinner_291r4\"};","/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\r\n/* eslint-disable jsx-a11y/click-events-have-key-events */\r\nimport React, { Component } from 'react';\r\nimport { Input, Spinner } from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport './Autosuggest.css';\r\n\r\nclass Autosuggest extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n suggestions: {\r\n array: [],\r\n loading: false,\r\n show: false,\r\n },\r\n onGoingfetch: 0,\r\n };\r\n }\r\n\r\n handleFetch = (newValue) => {\r\n const { fecthSuggestions } = this.props;\r\n const { onGoingfetch } = this.state;\r\n this.setState({\r\n suggestions: {\r\n array: [],\r\n loading: newValue !== '',\r\n show: true,\r\n },\r\n onGoingfetch: onGoingfetch + 1,\r\n });\r\n if (newValue !== '') {\r\n setTimeout(() => {\r\n // eslint-disable-next-line react/destructuring-assignment\r\n if (this.state.onGoingfetch === onGoingfetch + 1) {\r\n fecthSuggestions(newValue)\r\n .then((suggests) => {\r\n // eslint-disable-next-line react/destructuring-assignment\r\n const newOngoingFetch = this.state.onGoingfetch;\r\n if (newOngoingFetch === (onGoingfetch + 1)) {\r\n this.setState({\r\n suggestions: {\r\n array: suggests,\r\n loading: false,\r\n show: true,\r\n },\r\n });\r\n }\r\n });\r\n }\r\n }, 300);\r\n }\r\n };\r\n\r\n handleChangeValue = (newValue) => {\r\n const { onChange } = this.props;\r\n onChange(newValue);\r\n this.handleFetch(newValue);\r\n };\r\n\r\n handleFocus = () => {\r\n const { value } = this.props;\r\n const { suggestions } = this.state;\r\n if (value && value !== '') {\r\n this.setState({ suggestions: { ...suggestions, show: true } });\r\n }\r\n };\r\n\r\n handleSelectSuggestion = (id, name) => {\r\n const { onSelect } = this.props;\r\n this.setState({\r\n suggestions: {\r\n array: [],\r\n loading: false,\r\n show: false,\r\n },\r\n });\r\n onSelect(id, name);\r\n };\r\n\r\n handleBlur = () => {\r\n const { suggestions } = this.state;\r\n setTimeout(() => this.setState({\r\n suggestions: {\r\n ...suggestions,\r\n show: false,\r\n },\r\n }), 200);\r\n };\r\n\r\n render() {\r\n const { value, disabled } = this.props;\r\n const { suggestions } = this.state;\r\n return (\r\n
\r\n this.handleChangeValue(e.target.value)}\r\n onBlur={this.handleBlur}\r\n onFocus={this.handleFocus}\r\n disabled={disabled || false}\r\n />\r\n {suggestions.loading && }\r\n {suggestions.array.length > 0 && suggestions.show\r\n && (\r\n
    \r\n {suggestions.array.map((s) => (\r\n
  • this.handleSelectSuggestion(s.id, s.name)}>\r\n {s.name}\r\n
  • \r\n ))}\r\n
\r\n )}\r\n
\r\n );\r\n }\r\n}\r\n\r\nAutosuggest.propTypes = {\r\n value: PropTypes.string.isRequired,\r\n onSelect: PropTypes.func.isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n fecthSuggestions: PropTypes.func.isRequired,\r\n disabled: PropTypes.bool,\r\n};\r\n\r\nAutosuggest.defaultProps = {\r\n disabled: false,\r\n};\r\n\r\nexport default Autosuggest;\r\n","import React, { Component } from \"react\";\r\nimport style from \"./CircularProgress.module.scss\";\r\nimport classnames from \"classnames\";\r\n\r\nclass CircularProgress extends Component {\r\n render() {\r\n if (this.props.static) {\r\n return ;\r\n } else {\r\n return ;\r\n }\r\n }\r\n}\r\n\r\nconst LoadingProgress = (props) => {\r\n const classes = props.sm\r\n ? style.spinner + \" \" + style.sm\r\n : props.md\r\n ? style.spinner + \" \" + style.md\r\n : style.spinner;\r\n\r\n return
;\r\n};\r\n\r\nconst StaticProgress = (props) => {\r\n const styles = {\r\n fg: {\r\n fill: \"none\",\r\n stroke: \"rgb(64, 179, 22)\",\r\n },\r\n bg: {\r\n fill: \"none\",\r\n stroke: \"rgb(239, 239, 239)\",\r\n transition: \"stroke-dashoffset .5s ease-in-out\",\r\n },\r\n txt: {\r\n fontSize: \"10.5px\",\r\n },\r\n };\r\n\r\n const { strokeWidth, size, percentage, text } = props;\r\n const strokeWidthCapped = Math.min(strokeWidth, size / 2 - 1);\r\n const radius = Math.max((size - strokeWidthCapped) / 2 - 1, 0);\r\n const circumference = 2 * Math.PI * radius;\r\n const textStyle = props.textStyle || {};\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {text ? text : Math.round(percentage) + \"%\"}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default CircularProgress;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"spinner\":\"CircularProgress-module_spinner_1GQ73\",\"rotation\":\"CircularProgress-module_rotation_BiFYm\",\"sm\":\"CircularProgress-module_sm_18uhV\"};","export const CustodyLock = {\r\n LockInBank: 'Lock in Bank',\r\n LockSelf: 'Lock Self',\r\n Release: 'Release'\r\n }\r\n \r\n export const CWStatus = {\r\n Active: 'Active',\r\n Inactive : 'Inactive',\r\n }\r\n\r\n \r\n export const CWRelatedEntites={\r\n CounterPart: 'CounterParty',\r\n Market: 'Market',\r\n Other: 'Other',\r\n Asset: 'Asset',\r\n Custodian: 'Custodian',\r\n }\r\n export const CustodyIntStatus = {\r\n ClientRequest: 'Client Request',\r\n CustodianRequest : 'Custodian Request',\r\n Executed: 'Executed',\r\n ClientReturned: 'Client Returned',\r\n Returned: 'Returned',\r\n Lost: 'Lost',\r\n ReturnRequested: 'Return Requested',\r\n CancelRequest: 'Cancel Request',\r\n Delivered: 'Delivered'\r\n }\r\n\r\n export function getCWRelatedEntities(relatedEntity) {\r\n switch (relatedEntity) {\r\n case CWRelatedEntites.CounterPart:\r\n return 'CounterPart';\r\n case CWRelatedEntites.Market:\r\n return 'Market';\r\n case CWRelatedEntites.Other:\r\n return 'Other';\r\n }\r\n }\r\n \r\n export function getIntStatusName(status) {\r\n switch (status) {\r\n case CWStatus.Active:\r\n return 'Active';\r\n case CWStatus.Inactive:\r\n return 'Inactive';\r\n case CWStatus.InProcess:\r\n return 'In Process';\r\n case CWStatus.Deleted:\r\n return 'Deleted';\r\n case CWStatus.Blocked:\r\n return 'Blocked';\r\n case CWStatus.Closed:\r\n return 'Closed';\r\n case CWStatus.Matured:\r\n return 'Matured';\r\n }\r\n }\r\n ","import React from \"react\";\r\nimport { Row, Col } from \"reactstrap\";\r\nimport { FormattedDate, FormattedNumber } from \"react-intl\";\r\nimport { Table } from \"reactstrap\";\r\n\r\nimport { CustomFormInput } from \"../../../../utils/FormFields\";\r\n\r\nconst Amortization = ({ payment }) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {payment.AmortizationStatus}\r\n \r\n\r\n \r\n {payment.AmortizationDescription}\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
AccountCustodianCurrencyVolume
{payment.AmortizationFundName}{payment.AmortizationFundCustodianName}{payment.AmortizationCurrencyISO}\r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default Amortization;\r\n","import React from \"react\";\r\nimport { Table } from \"reactstrap\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport MediaQuery from \"react-responsive\";\r\n\r\nimport style from \"./Grid.module.scss\";\r\n\r\nconst CashActivity = ({ activity, opsViewAccountName }) => (\r\n \r\n {(matches) => (matches ? : )}\r\n \r\n);\r\n\r\nconst TableDefault = ({ items, opsViewAccountName }) => (\r\n
\r\n
Cash Activity
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {items.map((item) => {\r\n const credit = parseInt(item.CashActivityDebitCredit, 10) > 0 ? item.CashActivityVolume : \"\";\r\n const debit = parseInt(item.CashActivityDebitCredit, 10) > 0 ? \"\" : item.CashActivityVolume;\r\n return (\r\n \r\n \r\n \r\n {opsViewAccountName == undefined ?\r\n (\r\n \r\n )\r\n :\r\n (\r\n opsViewAccountName ?\r\n (\r\n \r\n )\r\n :\r\n (\r\n \r\n )\r\n )\r\n }\r\n \r\n \r\n \r\n \r\n \r\n );\r\n })}\r\n {items.length === 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n
DateDescriptionAccountCurrencyBalance typeDebitCredit
\r\n \r\n {item.CashActivityDescription}{item.BasicAccountName}{item.BasicAccountName}{item.BasicAccountNumber}{item.CurrencyISO}{item.CashActivityBalanceType}\r\n {debit != -1 ? : \"*****\"}\r\n \r\n {credit != -1 ? : \"*****\"}\r\n
\r\n No Cash Activity\r\n
\r\n
\r\n);\r\n\r\nconst TableSm = ({ items, opsViewAccountName }) => (\r\n
\r\n
Cash Activity
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {items.map((item) => (\r\n \r\n \r\n \r\n )\r\n :\r\n (\r\n opsViewAccountName ?\r\n (\r\n \" - \" + \r\n \r\n )\r\n :\r\n (\r\n \r\n )\r\n )\r\n }\r\n \r\n \r\n \r\n \r\n ))}\r\n {items.length === 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n
DateDescription - AccountBalance typeVolume
\r\n \r\n \r\n {item.CashActivityDescription}\r\n {opsViewAccountName == undefined ?\r\n (\r\n \" - \" + \r\n {item.BasicAccountName}{item.BasicAccountName}{item.BasicAccountNumber}{item.CashActivityBalanceType}\r\n \r\n
\r\n No Cash Activity\r\n
\r\n
\r\n);\r\n\r\nexport default CashActivity;\r\n","import React, { useState } from \"react\";\r\nimport { Table } from \"reactstrap\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\n\r\nimport style from \"../Grid.module.scss\";\r\n\r\nconst page = 10;\r\n\r\nconst renderFootprint = (f) => {\r\n const initial = ` - ${parseInt(f.EventAccountDebitCredit, 10) > 0 ? \"Credit \" : \"Debit \"}`;\r\n let end = ` ${f.EventAccountTicker}`;\r\n if (f.EventAccountIsCommission) {\r\n end += \" Commission\";\r\n } else if (f.EventAccountIsTax) {\r\n end += \" Tax\";\r\n } else if (f.EventAccountIsFee) {\r\n end += \" Fee\";\r\n } else if (f.EventAccountIsWithholding) {\r\n end += \" Withholding\";\r\n }\r\n return (\r\n \r\n {initial}\r\n \r\n {end}\r\n \r\n );\r\n};\r\n\r\nconst CorpEventAccounts = ({ accounts }) => {\r\n const [activeAccounts, setActiveAccounts] = useState(accounts.length > page ? page : accounts.length);\r\n const [collapsedAccount, setCollapsedAccount] = useState(accounts.map(() => false));\r\n\r\n const handleMore = () =>\r\n setActiveAccounts(accounts.length > activeAccounts + page ? activeAccounts + page : accounts.length);\r\n\r\n const handleCollapse = (index) =>\r\n setCollapsedAccount((oldCollapse) => {\r\n const newColl = [...oldCollapse];\r\n newColl[index] = !newColl[index];\r\n return newColl;\r\n });\r\n\r\n const showAccounts = accounts.slice(0, activeAccounts);\r\n return (\r\n
\r\n
Accounts
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {showAccounts.map((acc, accIndex) => (\r\n \r\n handleCollapse(accIndex)}>\r\n \r\n \r\n \r\n \r\n {collapsedAccount[accIndex] &&\r\n acc.Footprint.map((footprint) => (\r\n \r\n \r\n \r\n ))}\r\n \r\n ))}\r\n {accounts.length === 0 && (\r\n \r\n \r\n \r\n )}\r\n {accounts.length > activeAccounts && (\r\n \r\n \r\n \r\n )}\r\n \r\n
NameTypePortfolio
{acc.BasicAccountName}{acc.BasicAccountType}\r\n \r\n
{renderFootprint(footprint)}
\r\n No Accounts\r\n
\r\n Show More Accounts\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default CorpEventAccounts;\r\n","import React, { useState } from \"react\";\r\nimport { Row, Col } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\"\r\nimport { CustomFormInput } from \"../../../../utils/FormFields\";\r\nimport Accounts from \"./Accounts\";\r\n\r\nconst CorpEvent = ({ corpEvent }) => (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {corpEvent.CorporateEventType}\r\n \r\n \r\n {corpEvent.AssetName}\r\n \r\n \r\n {corpEvent.CurrencyISO}\r\n \r\n \r\n \r\n {corpEvent.CorporateEventSettlementCurrencyISO}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {corpEvent.CorporateEventCommissionCurrencyISO}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {corpEvent.CorporateEventTaxCurrencyISO}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n);\r\n\r\nexport default CorpEvent;\r\n","import React, { Fragment } from 'react';\r\nimport { Row, Col } from 'reactstrap';\r\nimport { CustomFormInput } from '../../../../utils';\r\nimport { FormattedNumber } from '../../../FormattedNumber/FormattedNumber';\r\n\r\nconst CustodyLock = ({ info }) => {\r\n return (\r\n \r\n \r\n \r\n \r\n {info.accountName} - {info.accountNumber}\r\n \r\n \r\n \r\n \r\n \r\n {info.assetticker}\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {info.internalstatus}\r\n \r\n \r\n\r\n \r\n \r\n {info.externalstatus}\r\n \r\n \r\n \r\n \r\n \r\n {info.type}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default CustodyLock;","import React, { useState } from \"react\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport { Row, Col, Table } from \"reactstrap\";\r\n\r\nconst CustomEventAccounts = ({ accounts }) => {\r\n const options = groupByOption(accounts);\r\n\r\n return (\r\n
\r\n
Accounts grouped by option
\r\n {Object.values(options).map((option) => (\r\n \r\n ))}\r\n
\r\n );\r\n};\r\n\r\nconst EventOption = ({ option }) => {\r\n const [open, setOpen] = useState(false);\r\n\r\n return (\r\n
\r\n
\r\n setOpen(!open)} style={{ cursor: \"pointer\" }} className=\"mt-2 mb-3\">\r\n \r\n
\r\n \r\n {open ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n {option.description}\r\n ({option.items.length}) accounts\r\n
\r\n \r\n
\r\n {open && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {option.items.length > 0 ? (\r\n option.items.map((acc) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))\r\n ) : (\r\n \r\n \r\n \r\n )}\r\n \r\n
AccountVolumeQuantityPrice
{acc.account}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n No Accounts\r\n \r\n
\r\n )}\r\n
\r\n
\r\n );\r\n};\r\n\r\nfunction groupByOption(accounts) {\r\n const options = {};\r\n\r\n accounts.forEach((item) => {\r\n if (!options[item.option]) {\r\n options[item.option] = {\r\n id: item.option,\r\n description: item.optionDescription,\r\n items: [],\r\n };\r\n\r\n options[item.option].items.push({\r\n id: item.accountid,\r\n account: item.accountname,\r\n quantity: item.quantity,\r\n price: item.price,\r\n volume: item.volume,\r\n });\r\n }\r\n });\r\n\r\n return options;\r\n}\r\n\r\nexport default CustomEventAccounts;\r\n","import React, { Fragment, useState, useEffect } from 'react';\r\nimport { FormattedDate } from 'react-intl';\r\nimport { Row, Col } from 'reactstrap';\r\nimport { CustomFormInput, parseDate } from '../../../../utils';\r\nimport CustomEventAccounts from './Accounts';\r\n\r\nconst trimAll = text => text.replace(/\"\\s+|\\s+\"/g, '\"');\r\n\r\nconst CustomEvent = ({ info }) => {\r\n const [customEvent, setCustomEvent] = useState(false);\r\n\r\n useEffect(() => {\r\n if (info) {\r\n if (info.mainInfo && info.accountsInfo) {\r\n setCustomEvent({\r\n ...JSON.parse(trimAll(info.mainInfo)),\r\n accounts: JSON.parse(trimAll(info.accountsInfo))\r\n })\r\n } \r\n\r\n }\r\n }, [info]);\r\n\r\n if (!customEvent) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {customEvent.assetticker}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {customEvent.status}\r\n \r\n \r\n \r\n \r\n {customEvent.name}\r\n \r\n \r\n \r\n \r\n {customEvent.text}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default CustomEvent;\r\n","import React from \"react\";\r\nimport { Table } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\n\r\nimport style from \"../Grid.module.scss\";\r\n\r\nconst EarningAccounts = ({ accounts }) => (\r\n
\r\n
Accounts
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {accounts.map((item) => (\r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n {accounts.length === 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n
AccountVolumeBalance
{item.EarningAccountName}\r\n \r\n \r\n \r\n
\r\n No Accounts\r\n
\r\n
\r\n);\r\n\r\nEarningAccounts.propTypes = {\r\n accounts: PropTypes.array.isRequired,\r\n};\r\n\r\nexport default EarningAccounts;\r\n","import React from 'react';\r\nimport { Row, Col } from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedDate, FormattedNumber } from 'react-intl';\r\n\r\nimport { CustomFormInput, FormField } from '../../../../utils/FormFields';\r\nimport EarningAccounts from './Accounts';\r\n\r\nconst EarningRecovery = ({ earning }) => (\r\n \r\n \r\n \r\n \r\n {earning.EarningRecoverySendingCustodianName}\r\n \r\n \r\n \r\n \r\n {earning.EarningRecoveryReceivingCustodianName}\r\n \r\n \r\n \r\n \r\n {earning.EarningRecoveryCurrencyISO}\r\n \r\n \r\n \r\n \r\n {earning.EarningRecoveryStatus}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {earning.EarningRecoveryDescription}\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n);\r\n\r\nEarningRecovery.propTypes = {\r\n earning: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default EarningRecovery;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"desk\":\"Grid-module_desk_2QxER\",\"table\":\"Grid-module_table_37nSA\",\"actions\":\"Grid-module_actions_1AGQU\",\"dropdown\":\"Grid-module_dropdown_qLb8d\",\"icon\":\"Grid-module_icon_1eW-_\"};","import React, { useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Row, Col, Button } from 'reactstrap';\r\n\r\nimport { IOItemUI, IOTypes } from '../..';\r\nimport { IOMode } from '../../IO/types';\r\nimport IODialog from '../../Modal/IO/IO';\r\nimport { Mode } from '../../../utils';\r\n\r\nconst IO = ({ io, userType, services }) => {\r\n const [modal, setModal] = useState(false);\r\n\r\n const toggleModal = () => {\r\n setModal((m) => !m);\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n {io.IOType !== IOTypes.IOType.Transfer && (IOItemUI.LocalOrINTL(io.Local))}\r\n {' '}\r\n {io.IOMode === IOMode.Simple && (\r\n IOItemUI.Quantity(io.items[0].Quantity)\r\n )}\r\n {' '}\r\n {(io.IOMode === IOTypes.IOMode.MultipleAssets\r\n || (io.IOType === IOTypes.IOType.Transfer && io.items.length > 1))\r\n ? {'{Multiple securities}'}\r\n : IOItemUI.Symbol(io.items[0])}\r\n {' '}\r\n {IOItemUI.Account(io)}\r\n {' '}\r\n {IOItemUI.BankAccount(io)}\r\n \r\n \r\n \r\n \r\n \r\n More Info\r\n \r\n \r\n \r\n {modal && (\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nIO.propTypes = {\r\n io: PropTypes.object.isRequired,\r\n userType: PropTypes.string.isRequired,\r\n services: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default IO;\r\n","import React from \"react\";\r\nimport { Row, Col, Table } from \"reactstrap\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport MediaQuery from \"react-responsive\";\r\nimport style from \"../../../Modal/Invoice/style.module.scss\";\r\nimport { CustomFormInput } from \"../../../../utils/FormFields\";\r\nimport { formattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\n\r\nconst Invoice = ({ invoiceInfo, opsViewAccountName }) => (\r\n \r\n \r\n \r\n {invoiceInfo.ConceptName}\r\n \r\n \r\n {invoiceInfo.InvoiceType}\r\n \r\n \r\n {invoiceInfo.CurrencyISO}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {invoiceInfo.InvoiceId}\r\n \r\n {invoiceInfo.InvoiceStatus === \"PartiallyBooked\" && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n {invoiceInfo.InvoiceClientName && (\r\n \r\n {invoiceInfo.InvoiceClientName}\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {invoiceInfo.InvoiceStatus}\r\n \r\n {invoiceInfo.InvoiceClientTaxId && (\r\n \r\n {invoiceInfo.InvoiceClientTaxId}\r\n \r\n )}\r\n {invoiceInfo.InvoiceAccountNumber && (\r\n \r\n {invoiceInfo.InvoiceAccountNumber}\r\n \r\n )}\r\n \r\n {opsViewAccountName == undefined ?\r\n (\r\n \r\n {invoiceInfo.InvoiceAccountName}\r\n \r\n )\r\n :\r\n (\r\n opsViewAccountName ?\r\n (\r\n \r\n {invoiceInfo.InvoiceAccountName}\r\n \r\n )\r\n :\r\n (\r\n \"\"\r\n )\r\n )\r\n }\r\n \r\n {invoiceInfo.InvoiceCounterPartyName && (\r\n \r\n {invoiceInfo.InvoiceCounterPartyName}\r\n \r\n )}\r\n {invoiceInfo.InvoiceClientAddress && (\r\n \r\n {invoiceInfo.InvoiceClientAddress}\r\n \r\n )}\r\n {invoiceInfo.InvoiceBankAccountName && (\r\n \r\n {invoiceInfo.InvoiceBankAccountName}\r\n \r\n )}\r\n \r\n \r\n {invoiceInfo.line && invoiceInfo.line.length > 0 && }\r\n \r\n \r\n \r\n {invoiceInfo.InvoiceDescription}\r\n {invoiceInfo.InvoiceAddendum}\r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nconst Totals = ({ i }) => (\r\n
\r\n \r\n {formattedNumber(i.InvoiceSubtotal, \"currency\")}\r\n \r\n \r\n {formattedNumber(i.InvoiceTax, \"currency\")}\r\n \r\n \r\n {formattedNumber(i.InvoiceTotal, \"currency\")}\r\n \r\n
\r\n);\r\n\r\nconst Lines = ({ lines }) => (\r\n \r\n \r\n \r\n \r\n \r\n {(matches) =>\r\n matches ? (\r\n \r\n \r\n \r\n \r\n \r\n ) : null\r\n }\r\n \r\n \r\n \r\n \r\n \r\n {lines &&\r\n lines.length > 0 &&\r\n lines.map((line, index) => )}\r\n \r\n
Description\r\n Commission\r\n \r\n Tax Type\r\n \r\n Tax\r\n \r\n Total\r\n
\r\n);\r\n\r\nconst Line = ({ line }) => (\r\n \r\n {line.InvoiceLineDescription}\r\n \r\n {(matches) =>\r\n matches ? (\r\n \r\n {formattedNumber(line.InvoiceLineCommission, \"currency\")}\r\n {line.InvoiceLineTaxName}\r\n {formattedNumber(line.InvoiceLineTax, \"currency\")}\r\n \r\n ) : null\r\n }\r\n \r\n {formattedNumber(line.InvoiceLineTotal, \"currency\")}\r\n \r\n);\r\n\r\nexport default Invoice;\r\n","import React from \"react\";\r\nimport { Row, Col, Table, FormGroup, Label, Input } from \"reactstrap\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport MediaQuery from \"react-responsive\";\r\nimport style from \"../../../Modal/Invoice/style.module.scss\";\r\nimport { CustomFormInput } from \"../../../../utils/FormFields\";\r\nimport { formattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\n\r\nconst InvoicePayment = ({ payment }) => (\r\n \r\n \r\n \r\n {payment.PaymentSupplierName}\r\n \r\n \r\n {payment.InvoicePaymentCurrencyISO}\r\n \r\n \r\n {payment.InvoicePaymentDate}\r\n \r\n \r\n {payment.PaymentSupplierRUT}\r\n \r\n \r\n {payment.CountryName}\r\n \r\n \r\n \r\n \r\n {payment.InvoicePaymentBankAccountName}\r\n \r\n\r\n \r\n {payment.InvoicePaymentReferenceNumber}\r\n \r\n \r\n {payment.InvoicePaymentStatus}\r\n \r\n \r\n
\r\n {console.log(payment)}\r\n {payment.InvoicePaymentAmount}\r\n \r\n);\r\n\r\nconst Details = ({ line }) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {line == undefined ? (\r\n
\r\n ) : line.length == 0 ? (\r\n
\r\n ) : (\r\n line.map((line, index) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))\r\n )}\r\n \r\n
Invoice NumberInvoice DateInvoice AmountUnpaid AmountPayment Amount
\r\n {line.SupplierInvoiceNumber}\r\n \r\n {line.SupplierInvoiceDate}\r\n \r\n {line.SupplierInvoiceTotal}\r\n \r\n {line.SupplierInvoiceUnpaidAmount}\r\n \r\n {line.InvoiceAssociatedPaymentAmount}\r\n
\r\n
\r\n);\r\n\r\nexport default InvoicePayment;\r\n","import React from 'react';\r\nimport { Row, Col } from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedDate } from 'react-intl';\r\nimport { FormattedNumber } from '../../../FormattedNumber/FormattedNumber';\r\n\r\nimport { CustomFormInput } from '../../../../utils/FormFields';\r\n\r\nconst InvoiceRequest = ({ invoiceRequest }) => {\r\n return (\r\n \r\n \r\n \r\n \r\n {invoiceRequest.InvoiceRequestType}\r\n \r\n \r\n \r\n \r\n {invoiceRequest.InvoiceRequestStatus}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {invoiceRequest.InvoiceRequestAccountName}\r\n \r\n \r\n \r\n \r\n {invoiceRequest.InvoiceRequestAccountNumber}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {invoiceRequest.InvoiceRequestAmount && (\r\n \r\n \r\n \r\n {' '}\r\n {invoiceRequest.InvoiceRequestCurrencyISO}\r\n \r\n \r\n )}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\n\r\nexport default InvoiceRequest;\r\n","import React from \"react\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport { Table, Row, Col } from \"reactstrap\";\r\n\r\nimport CashActivity from \"./CashActivity\";\r\nimport ProductActivity from \"./ProductActivity\";\r\nimport style from \"./Grid.module.scss\";\r\nimport { UserType } from \"../../../utils/Helper\";\r\nimport { CustomFormInput } from \"../../..\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport { useEffect } from \"react\";\r\n\r\nconst JournalEntry = ({ journalEntry, userType, opsViewAccountName}) => {\r\n\r\n const debits = [...(journalEntry.Level1 || [])];\r\n let splitIndex = debits.length;\r\n debits.forEach((a, i) => {\r\n if (a.Credit && i < splitIndex) {\r\n splitIndex = i;\r\n }\r\n });\r\n const credits = debits.splice(splitIndex);\r\n return (\r\n \r\n \r\n \r\n {journalEntry.JournalEntryStatus}\r\n \r\n \r\n {(userType === UserType.BackOffice ||\r\n userType === UserType.Trader ||\r\n userType === UserType.MiddleOffice ||\r\n userType === UserType.Accounting ||\r\n userType === UserType.FundManager) && (\r\n \r\n \r\n \r\n \r\n {journalEntry.JournalEntryRegisteredDate &&\r\n !journalEntry.JournalEntryRegisteredDate.includes(\"0000-00-00\") ? (\r\n \r\n ) : (\r\n \" - \"\r\n )}\r\n \r\n \r\n \r\n \r\n {journalEntry.JournalEntryPaymentDate &&\r\n !journalEntry.JournalEntryPaymentDate.includes(\"0000-00-00\") ? (\r\n \r\n ) : (\r\n \" - \"\r\n )}\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n )}\r\n \r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nconst ActivityTable = ({ items, title }) => (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {items.map((item) => (\r\n \r\n \r\n \r\n \r\n ))}\r\n {items.length === 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n
{title}Amount
{item[title]}\r\n {item.Currency}\r\n
\r\n No {title}s\r\n
\r\n
\r\n);\r\n\r\nexport default JournalEntry;\r\n","import React, { useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Row, Col, Button } from 'reactstrap';\r\n\r\nimport OrderDialog from '../../Modal/Order/Order';\r\n\r\nimport {\r\n renderOrderStatus,\r\n renderOrderSide,\r\n renderOrderQuantity,\r\n renderOrderQuantityType,\r\n renderOrderSymbol,\r\n renderOrderPrice,\r\n renderOrderTimeFrame,\r\n renderOrderAccount,\r\n renderExecutionsAvg,\r\n} from '../../Order/Item';\r\nimport { getOrderStats, Mode } from '../../../utils';\r\nimport { localDateTime } from '../../../utils/Helper';\r\n\r\nconst Offer = ({ order: o, userType, services }) => {\r\n const [modal, setModal] = useState(false);\r\n\r\n const toggleModal = () => {\r\n setModal((m) => !m);\r\n };\r\n\r\n const order = { ...o };\r\n order.stats = getOrderStats(order);\r\n order.OrderInitDate = localDateTime(o.OrderInitDate);\r\n order.OrderModifiedDate = localDateTime(o.OrderModifiedDate);\r\n\r\n return (\r\n \r\n \r\n \r\n {' '}\r\n {renderOrderStatus(order)}\r\n {' '}\r\n {renderOrderSide(order)}\r\n {' '}\r\n {renderOrderQuantity(order)}\r\n {' '}\r\n {renderOrderQuantityType(order)}\r\n {' '}\r\n {renderOrderSymbol(order)}\r\n {' @ '}\r\n {renderOrderPrice(order)}\r\n {' '}\r\n {renderOrderTimeFrame(order)}\r\n {' '}\r\n {renderOrderAccount(order)}\r\n {' '}\r\n {renderExecutionsAvg(order)}\r\n \r\n \r\n \r\n \r\n \r\n More Info\r\n \r\n \r\n \r\n {modal && (\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nOffer.propTypes = {\r\n order: PropTypes.object.isRequired,\r\n userType: PropTypes.string.isRequired,\r\n services: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Offer;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport { Row, Col, Button } from \"reactstrap\";\r\n\r\nimport OrderDialog from \"../../Modal/Order/Order\";\r\n\r\nimport {\r\n renderOrderStatus,\r\n renderOrderSide,\r\n renderOrderQuantity,\r\n renderOrderQuantityType,\r\n renderOrderSymbol,\r\n renderOrderPrice,\r\n renderOrderTimeFrame,\r\n renderOrderAccount,\r\n renderExecutionsAvg,\r\n} from \"../../Order/Item\";\r\nimport { getOrderStats, Mode } from \"../../../utils\";\r\nimport { localDateTime } from \"../../../utils/Helper\";\r\n\r\nconst Order = ({ order: o, userType, platformRole, services, opsViewAccountName }) => {\r\n const [modal, setModal] = useState(false);\r\n\r\n const toggleModal = () => {\r\n setModal((m) => !m);\r\n };\r\n\r\n const order = { ...o };\r\n useEffect(() => {\r\n console.log(order);\r\n })\r\n order.stats = getOrderStats(order);\r\n order.OrderInitDate = localDateTime(o.OrderInitDate);\r\n order.OrderModifiedDate = localDateTime(o.OrderModifiedDate);\r\n\r\n return (\r\n \r\n \r\n \r\n {\" \"}\r\n {renderOrderStatus(order)} {renderOrderSide(order)} {renderOrderQuantity(order)}{\" \"}\r\n {renderOrderQuantityType(order)} {renderOrderSymbol(order)}\r\n {\" @ \"}\r\n {renderOrderPrice(order)} {renderOrderTimeFrame(order)} {renderOrderAccount(order)}{\" \"}\r\n {renderExecutionsAvg(order)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {modal && (\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nOrder.propTypes = {\r\n order: PropTypes.object.isRequired,\r\n userType: PropTypes.string.isRequired,\r\n services: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Order;\r\n","import React from \"react\";\r\nimport { Table } from \"reactstrap\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport MediaQuery from \"react-responsive\";\r\n\r\nimport style from \"./Grid.module.scss\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\n\r\nconst ProductActivity = ({ activity, opsViewAccountName }) => (\r\n \r\n {(matches) => (matches ? : )}\r\n \r\n);\r\n\r\nconst TableDefault = ({ items, opsViewAccountName }) => (\r\n
\r\n
Product Activity
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {items.map((item) => {\r\n const credit =\r\n parseInt(item.ProductActivityDebitCredit, 10) > 0 ? parseFloat(item.ProductActivityVolume) : \"\";\r\n const debit =\r\n parseInt(item.ProductActivityDebitCredit, 10) > 0 ? \"\" : parseFloat(item.ProductActivityVolume);\r\n return (\r\n \r\n \r\n \r\n \r\n {opsViewAccountName == undefined ?\r\n (\r\n \r\n )\r\n :\r\n (\r\n opsViewAccountName ?\r\n (\r\n \r\n )\r\n :\r\n (\r\n \r\n )\r\n )\r\n } \r\n \r\n \r\n \r\n \r\n );\r\n })}\r\n {items.length === 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n
DateDescriptionProductAccountBalance typeDebitCredit
\r\n \r\n {item.ProductActivityDescription}{item.AssetTicker}{item.ProductActivityAccountName}{item.ProductActivityAccountName}{item.ProductActivityAccountNumber}{item.ProductActivityBalanceType}\r\n \r\n \r\n \r\n
\r\n No Product Activity\r\n
\r\n
\r\n);\r\n\r\nconst TableSm = ({ items, opsViewAccountName }) => (\r\n
\r\n
Product Activity
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {items.map((item) => (\r\n \r\n \r\n \r\n )\r\n :\r\n (\r\n opsViewAccountName ?\r\n (\r\n \" - \" + \r\n \r\n )\r\n :\r\n (\r\n \r\n )\r\n )\r\n } \r\n \r\n \r\n \r\n \r\n ))}\r\n {items.length === 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n
DateDescription - AccountBalance typeVolume
\r\n \r\n \r\n {item.ProductActivityDescription}\r\n {opsViewAccountName == undefined ?\r\n (\r\n \" - \" + \r\n {item.ProductActivityAccountName}{item.ProductActivityAccountName}{item.ProductActivityAccountNumber}{item.ProductActivityBalanceType}\r\n \r\n
\r\n No Product Activity\r\n
\r\n
\r\n);\r\n\r\nexport default ProductActivity;\r\n","import React from \"react\";\r\nimport { Table } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\n\r\nimport style from \"../Grid.module.scss\";\r\n\r\nconst ProvisionsPaymentAccounts = ({ accounts }) => (\r\n
\r\n
Accounts
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {accounts.map((item) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n {accounts.length === 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n
AccountCustodianCurrencyVolumeBalance
{item.PaymentAccountName}{item.PaymentAccountCustodianName}{item.PaymentAccountCurrencyISO}\r\n \r\n \r\n \r\n
\r\n No Accounts\r\n
\r\n
\r\n);\r\n\r\nProvisionsPaymentAccounts.propTypes = {\r\n accounts: PropTypes.array.isRequired,\r\n};\r\n\r\nexport default ProvisionsPaymentAccounts;\r\n","import React from \"react\";\r\nimport { Row, Col } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport { FormattedDate, FormattedNumber } from \"react-intl\";\r\n\r\nimport { CustomFormInput, FormField } from \"../../../../utils/FormFields\";\r\nimport ProvisionsPaymentAccount from \"./Accounts\";\r\n\r\nconst ProvisionsPayment = ({ payment }) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {payment.ProvisionsPaymentStatus}\r\n \r\n\r\n \r\n {payment.ProvisionsPaymentDescription}\r\n \r\n \r\n
\r\n \r\n
\r\n);\r\n\r\nProvisionsPayment.propTypes = {\r\n earning: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default ProvisionsPayment;\r\n","import React from \"react\";\r\nimport { Table } from \"reactstrap\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\n\r\nimport style from \"../Grid.module.scss\";\r\n\r\nconst RecurringCommissionsAccounts = ({ accounts }) => (\r\n
\r\n
Accounts
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {accounts.map((item) => (\r\n \r\n \r\n \r\n \r\n ))}\r\n {accounts.length === 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n
AccountTotal
{item.AccountName}\r\n \r\n
\r\n No Accounts\r\n
\r\n
\r\n);\r\n\r\nexport default RecurringCommissionsAccounts;\r\n","import React from \"react\";\r\nimport { Table } from \"reactstrap\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\n\r\nimport style from \"../Grid.module.scss\";\r\n\r\nconst RecCommissionsAccount = ({ account }) => (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {account.length === 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n
AccountBuying PowerBase for calculationCommissionTaxTotal
{account.AccountName}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n No Account\r\n
\r\n
\r\n);\r\n\r\nexport default RecCommissionsAccount;\r\n","import React from \"react\";\r\nimport {Row, Col} from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport {FormattedDate} from \"react-intl\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\n\r\nimport {CustomFormInput} from \"../../../../utils/FormFields\";\r\nimport RecurringCommissionsAccounts from \"./Accounts\";\r\n\r\nconst RecurringCommissions = ({recurringCommission}) => {\r\n return (\r\n \r\n \r\n \r\n \r\n {recurringCommission.RecurringCommissionType}\r\n \r\n \r\n \r\n \r\n {\" \"}\r\n {\" - \"}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {recurringCommission.RecurringCommissionStatus}\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nRecurringCommissions.propTypes = {\r\n recurringCommission: PropTypes.object.isRequired\r\n};\r\n\r\nexport default RecurringCommissions;\r\n","import React from \"react\";\r\nimport { Row, Col, Badge } from \"reactstrap\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport { FormattedNumber, formattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport { CustomFormInput } from \"../../..\";\r\n\r\nconst SettleInst = ({ settleInst }) => (\r\n \r\n \r\n \r\n \r\n {\" \"}\r\n {settleInst.SettleInstSide.toUpperCase()}\r\n \r\n {settleInst.Calculated.HasClientQuantity && (\r\n \r\n CL\r\n \r\n )}\r\n {settleInst.Calculated.HasPropQuantity && (\r\n \r\n PP\r\n \r\n )}\r\n {settleInst.Calculated.HasTradingQuantity && (\r\n \r\n TR\r\n \r\n )}\r\n {settleInst.Calculated.HasErrorQuantity && (\r\n \r\n ER\r\n \r\n )}{\" \"}\r\n {\" \"}\r\n {settleInst.SettleInstAssetTicker}\r\n \r\n \r\n \r\n \r\n {settleInst.SettleInstStatus}\r\n \r\n \r\n {settleInst.SettleInstAssetISIN}\r\n \r\n \r\n \r\n {formattedNumber(settleInst.SettleInstNetSettleValue, \"currency\")}{\" \"}\r\n {settleInst.SettleInstSettleCurrencyISO}\r\n \r\n \r\n \r\n \r\n {settleInst.Calculated.HasClientQuantity || settleInst.Calculated.HasErrorQuantity\r\n ? settleInst.SettleInstOurClientCustName +\r\n (settleInst.Calculated.HasPropQuantity || settleInst.Calculated.HasTradingQuantity\r\n ? ` - ${settleInst.SettleInstOurPropCustName}`\r\n : \"\")\r\n : settleInst.SettleInstOurPropCustName}\r\n \r\n \r\n \r\n {settleInst.SettleInstCounterPartyName}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {settleInst.SettleInstType}\r\n \r\n \r\n \r\n);\r\n\r\nSettleInst.propTypes = {\r\n settleInst: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default SettleInst;\r\n","import React from \"react\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport { Table } from \"reactstrap\";\r\n\r\nconst Accounts = ({ accounts: rootAccounts, totals }) => {\r\n const accounts = rootAccounts\r\n .filter(({ AccountId }) => AccountId != -1)\r\n .map((account) => {\r\n let index = totals.findIndex(\r\n (t) => t.ShortCoverTotalFromCurrency === account.ShortCoverAccountFromCurrency\r\n );\r\n\r\n if (index == -1) {\r\n alert(`\r\n Error en account: ${account.AccountName}\r\n ShortCoverAccountFromCurrency: ${account.ShortCoverAccountFromCurrency} (${\r\n account.ShortCoverAccountFromISO\r\n }), no esta presente en Totals.\r\n Se tomara por defecto ${totals[0].ShortCoverTotalFromISO}.\r\n\r\n Las monedas que estan presentes en ShortCoverTotalFromISO: ${totals.map(\r\n (t) => `${t.ShortCoverTotalFromISO} `\r\n )}\r\n `);\r\n index = 0;\r\n }\r\n\r\n return {\r\n ...account,\r\n fxIndex: index,\r\n ShortCoverAccountFromISO: totals[index].ShortCoverTotalFromISO,\r\n };\r\n });\r\n\r\n const getAccountTotal = (index, volume) =>\r\n totals[index].ShortCoverTotalDivides\r\n ? volume * totals[index].ShortCoverTotalFX\r\n : volume / totals[index].ShortCoverTotalFX;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {accounts.map((a, i) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n
AccountFrom CurrencyTotalTotal UYU
{a.AccountNumber}{a.ShortCoverAccountFromISO}\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Accounts;\r\n","import React from 'react';\r\nimport { Table } from 'reactstrap';\r\n\r\nconst Events = ({ events }) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {events.map((item) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n
\r\n TypeISINAssetSettle. Currency
\r\n \r\n \r\n \r\n {item.eventType}{item.assetISIN}{item.assetTicker}{item.settleCurrency}
\r\n );\r\n};\r\n\r\nexport default Events;","import React from \"react\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport { Table } from \"reactstrap\";\r\n\r\nconst Totals = ({ totals }) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {totals.map((item, index) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n
ExchangeFX RateTotal USDTotal
\r\n {item.ShortCoverTotalDivides\r\n ? `${item.ShortCoverTotalISO} / ${item.ShortCoverTotalFromISO}`\r\n : `${item.ShortCoverTotalFromISO} / ${item.ShortCoverTotalISO}`}\r\n \r\n \r\n \r\n \r\n \r\n {\" \"}\r\n
\r\n );\r\n};\r\n\r\nexport default Totals;\r\n","import React, { Fragment } from 'react';\r\nimport { FormattedDate } from 'react-intl';\r\nimport { Row, Col } from 'reactstrap';\r\nimport { CustomFormInput, parseDate } from '../../../../utils';\r\nimport Events from './Events';\r\nimport Accounts from './Accounts';\r\nimport Totals from './Totals';\r\n\r\nconst ShortCover = ({ info }) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {info.ShortCoverDescription}\r\n \r\n \r\n\r\n \r\n \r\n {info.ShortCoverStatus}\r\n \r\n \r\n\r\n \r\n {info.ShortCoverType}\r\n \r\n\r\n \r\n \r\n {info.ShortCoverCustodianName}\r\n \r\n \r\n \r\n \r\n
Totals
\r\n \r\n\r\n
Events
\r\n \r\n\r\n
Accounts
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default ShortCover;\r\n","import React from \"react\";\r\nimport { Row, Col, Table, FormGroup, Label, Input } from \"reactstrap\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport MediaQuery from \"react-responsive\";\r\nimport style from \"../../../Modal/Invoice/style.module.scss\";\r\nimport { CustomFormInput } from \"../../../../utils/FormFields\";\r\nimport { formattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\n\r\nconst SupplierInvoice = ({ invoiceInfo }) => (\r\n \r\n {\" \"}\r\n {invoiceInfo.SupplierInvoiceStatus}\r\n \r\n \r\n \r\n \r\n {invoiceInfo.SupplierName}\r\n \r\n \r\n {invoiceInfo.SupplierInvoiceDate}\r\n \r\n \r\n {invoiceInfo.SupplierInvoiceNumber}\r\n \r\n \r\n {invoiceInfo.SupplierInvoiceCurrencyISO}\r\n \r\n \r\n \r\n {invoiceInfo.SupplierInvoiceTypeDescription}\r\n \r\n \r\n \r\n \r\n \r\n {invoiceInfo.SupplierRUT}\r\n \r\n\r\n \r\n {invoiceInfo.SupplierInvoiceDueDate}\r\n \r\n \r\n {invoiceInfo.SupplierInvoiceCode}\r\n \r\n \r\n {invoiceInfo.PaymentMethodDescription}\r\n \r\n \r\n \r\n {invoiceInfo.SupplierInvoiceAssociated}\r\n \r\n {invoiceInfo.SupplierInvoiceFundId}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n {console.log(invoiceInfo)}\r\n \r\n);\r\n\r\nconst Details = ({ info }) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {info == undefined ? (\r\n
\r\n ) : info.length == 0 ? (\r\n
\r\n ) : (\r\n info.map(\r\n (line, index) => (\r\n console.log(line),\r\n (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n )\r\n )\r\n )}\r\n \r\n
DescriptionConceptTAX\r\n Subtotal\r\n \r\n Tax\r\n \r\n Total\r\n
\r\n {line.InvoiceDetailsDescription}\r\n \r\n {line.ConceptName}\r\n \r\n {line.InvoiceDetailsTAXName}\r\n \r\n {line.InvoiceDetailsSubtotal}\r\n \r\n {line.InvoiceDetailsTax}\r\n \r\n {line.InvoiceDetailsTotal}\r\n
\r\n
\r\n);\r\n\r\nconst Totals = ({ i }) => (\r\n \r\n
\r\n {i.SupplierInvoiceDescription}\r\n {i.SupplierInvoiceAddendum}\r\n
\r\n
\r\n \r\n \r\n {formattedNumber(i.SupplierInvoiceSubtotal, \"currency\")}\r\n \r\n \r\n \r\n {formattedNumber(i.SupplierInvoiceTax, \"currency\")}\r\n \r\n \r\n {formattedNumber(i.SupplierInvoiceTotal, \"currency\")}\r\n \r\n
\r\n
\r\n);\r\nexport default SupplierInvoice;\r\n","import React from 'react';\r\nimport { Row, Col } from 'reactstrap';\r\n\r\nimport { FormattedTime, FormattedDate } from 'react-intl';\r\nimport { FormattedNumber, formattedNumber } from '../../FormattedNumber/FormattedNumber';\r\nimport {\r\n renderTradeSide,\r\n renderTradeQuantity,\r\n renderTradeSymbol,\r\n renderTradePrice,\r\n} from '../../Order/Item';\r\nimport { CustomFormInput } from '../../..';\r\nimport { showDateTime, localDateTime } from \"../../../utils/Helper\";\r\n\r\nconst Trade = ({ trade, opsViewAccountName }) => (\r\n
\r\n {renderTradeSide(trade)} {renderTradeQuantity(trade)}{\" \"}\r\n {renderTradeSymbol(trade)}\r\n {\" @ \"}\r\n {renderTradePrice(trade)}\r\n \r\n \r\n {trade.TradeStatus}\r\n \r\n \r\n \r\n {\" \"}\r\n {trade.TradeSettleCurrencyISO}\r\n \r\n \r\n \r\n \r\n {trade.TradeTradingRouteName}\r\n \r\n \r\n \r\n \r\n {trade.TradeCounterPartyName}\r\n \r\n \r\n \r\n \r\n {\" \"}\r\n {showDateTime(trade.TradeTradeDateTime)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {opsViewAccountName == undefined ?\r\n (\r\n trade.TradeBasicAccountName\r\n )\r\n :\r\n (\r\n opsViewAccountName ?\r\n (\r\n trade.TradeBasicAccountName\r\n )\r\n :\r\n (\r\n trade.TradeBasicAccountNumber\r\n )\r\n )\r\n }\r\n \r\n \r\n \r\n \r\n {opsViewAccountName == undefined ?\r\n (\r\n trade.TradeOffsetBasicAccountName\r\n )\r\n :\r\n (\r\n opsViewAccountName ?\r\n (\r\n trade.TradeOffsetBasicAccountName\r\n )\r\n :\r\n (\r\n trade.TradeOffsetBasicAccountNumber\r\n )\r\n )\r\n }\r\n \r\n \r\n \r\n \r\n {trade.TradeTradeCurrencyISO}\r\n \r\n \r\n \r\n \r\n {trade.TradeSettleCurrencyISO}\r\n \r\n \r\n {trade.TradeTradeCurrencyId != trade.TradeSettleCurrencyId && (\r\n \r\n {trade.TradeFXRoute != \"\" && (\r\n \r\n \r\n {formattedNumber(trade.TradeFXRoute, \"currency\")}\r\n \r\n \r\n )}\r\n {trade.TradeFXRelatedOrderId > 0 && (\r\n \r\n \r\n {trade.TradeFXRelatedOrderId}\r\n \r\n \r\n )}\r\n \r\n {formattedNumber(trade.TradeFX, \"currency\")}\r\n \r\n \r\n )}\r\n \r\n
\r\n);\r\n\r\nexport default Trade;\r\n","import React from \"react\";\r\nimport { Table } from \"reactstrap\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\n\r\nimport style from \"../Grid.module.scss\";\r\n\r\nconst TransactionAccounts = ({ accounts, showCurrency }) => (\r\n
\r\n
Accounts
\r\n \r\n \r\n \r\n \r\n {showCurrency && (\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n {accounts.map((item) => (\r\n \r\n \r\n {showCurrency && (\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n ))}\r\n {accounts.length === 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n
AccountCurrencyAmount
{item.Name}{item.CurrencyIso}\r\n \r\n
\r\n No Accounts\r\n
\r\n
\r\n);\r\n\r\nexport default TransactionAccounts;\r\n","import React from 'react';\r\nimport { Row, Col } from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedDate } from 'react-intl';\r\nimport { FormattedNumber } from '../../../FormattedNumber/FormattedNumber';\r\n\r\nimport { CustomFormInput } from '../../../../utils/FormFields';\r\nimport TransactionAccounts from './Accounts';\r\n\r\nconst Transaction = ({ transaction }) => {\r\n const transactionAmount = parseInt(transaction.TransactionCurrencyId, 10) > 0;\r\n return (\r\n \r\n \r\n \r\n \r\n {transaction.TransactionType}\r\n \r\n \r\n \r\n \r\n {transaction.ConceptName}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {transactionAmount && (\r\n \r\n \r\n \r\n {' '}\r\n {transaction.TransactionCurrencyIso}\r\n \r\n \r\n )}\r\n \r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nTransaction.propTypes = {\r\n transaction: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Transaction;\r\n","import React from \"react\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport { processes } from \"../../../utils/Helper\";\r\nimport JournalEntry from \"./JournalEntry\";\r\nimport Transaction from \"./Transaction\";\r\nimport IO from \"./IO\";\r\nimport Order from \"./Order\";\r\nimport Offer from \"./Offer\";\r\nimport Trade from \"./Trade\";\r\nimport CorpEvent from \"./CorpEvent\";\r\nimport Invoice from \"./Invoice\";\r\nimport SupplierInvoice from \"./SupplierInvoice\";\r\nimport InvoicePayment from \"./InvoicePayment\";\r\nimport SettleInst from \"./SettleInst\";\r\nimport EarningRecovery from \"./EarningRecovery\";\r\nimport ProvisionsPayment from \"./ProvisionsPayment\";\r\nimport Amortization from \"./Amortization\";\r\nimport RecurringCommissions from \"./RecurringCommissions\";\r\nimport RecCommissionsAccount from \"./RecurringCommissions/RecCommissionAccount\";\r\nimport CustomCorpEvent from \"./CustomCorpEvent\";\r\nimport CustodyLock from \"./CustodyLock\";\r\nimport ShortCover from \"./ShortCover\";\r\nimport InvoiceRequest from \"./InvoiceRequest\";\r\n\r\nconst CrossRefForms = ({ process, info, userType, platformRole, services, opsViewAccountName }) => {\r\n const renderForm = () => {\r\n switch (process) {\r\n case processes.DERIVATIVE_MATURITY:\r\n return\r\n case processes.JOURNAL_ENTRY:\r\n return ;\r\n case processes.TRANSACTION:\r\n return ;\r\n case processes.EARNING_RECOVERY:\r\n return ;\r\n case processes.PROVISIONS_PAYMENT:\r\n return ;\r\n case processes.AMORTIZATION:\r\n return ;\r\n case processes.BULK_DEPOSIT:\r\n case processes.DEPOSIT:\r\n case processes.WITHDRAW:\r\n case processes.BULK_WITHDRAW:\r\n case processes.TRANSFER:\r\n case processes.WITHDRAW_ACCOUNT:\r\n case processes.DEPOSIT_ACCOUNT:\r\n return ;\r\n case processes.ORDER:\r\n case processes.BULK_ORDER:\r\n case processes.BASKET_ORDER:\r\n return ;\r\n case processes.OFFER:\r\n return ;\r\n case processes.TRADE:\r\n return ;\r\n case processes.CORP_EVENT:\r\n return ;\r\n case processes.INVOICE:\r\n return ;\r\n case processes.SUPPLIER_INVOICE:\r\n return ;\r\n case processes.INVOICE_PAYMENT:\r\n return ;\r\n case processes.SETTLEMENT_INSTRUCTION:\r\n return ;\r\n case processes.RECURRINGCOMMISSIONS:\r\n return ;\r\n case processes.RECCOMMISSIONACCOUNT:\r\n return ;\r\n case processes.CUSTOM_EVENT:\r\n return ;\r\n case processes.CUSTODY_LOCK:\r\n return ;\r\n case processes.SHORT_COVER:\r\n return ;\r\n case processes.INVOICE_REQUEST:\r\n return ;\r\n default:\r\n return
Invalid Process
;\r\n }\r\n };\r\n\r\n return {renderForm()};\r\n};\r\n\r\nCrossRefForms.propTypes = {\r\n process: PropTypes.string.isRequired,\r\n info: PropTypes.object.isRequired,\r\n userType: PropTypes.string.isRequired,\r\n services: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default CrossRefForms;\r\n","import React, { Component } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport classnames from \"classnames\";\r\nimport GraphNode from \"./Node\";\r\nimport style from \"./styles.module.scss\";\r\n\r\nclass Graph extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.handleExpand = this.handleExpand.bind(this);\r\n this.collapse = this.collapse.bind(this);\r\n this.toggleExpand = this.toggleExpand.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n const { expandAll, data } = this.props;\r\n if (expandAll) this.toggleExpand(data, true);\r\n }\r\n\r\n componentWillUnmount() {}\r\n\r\n handleExpand(e, nodeData) {\r\n if (\"expand\" in nodeData) {\r\n nodeData.expand = !nodeData.expand;\r\n if (!nodeData.expand && nodeData.children) {\r\n this.collapse(nodeData.children);\r\n }\r\n this.forceUpdate();\r\n } else {\r\n nodeData.expand = true;\r\n this.forceUpdate();\r\n }\r\n }\r\n\r\n collapse(list) {\r\n let _this = this;\r\n list.forEach(function (child) {\r\n if (child.expand) {\r\n child.expand = false;\r\n }\r\n child.children && _this.collapse(child.children);\r\n });\r\n }\r\n\r\n toggleExpand(data, val) {\r\n let _this = this;\r\n if (Array.isArray(data)) {\r\n data.forEach(function (item) {\r\n item.expand = val;\r\n if (item.children) {\r\n _this.toggleExpand(item.children, val);\r\n }\r\n });\r\n } else {\r\n data.expand = val;\r\n if (data.children) {\r\n _this.toggleExpand(data.children, val);\r\n }\r\n }\r\n this.forceUpdate();\r\n }\r\n\r\n render() {\r\n const { horizontal, node, data, selected, onClick } = this.props;\r\n return (\r\n
\r\n \r\n this.handleExpand(e, nodeData)}\r\n onClick={(e, nodeData) => onClick && onClick(e, nodeData)}\r\n {...this.props}\r\n />\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nGraph.propTypes = {\r\n data: PropTypes.object,\r\n selected: PropTypes.any,\r\n loadingId: PropTypes.any,\r\n node: PropTypes.object,\r\n horizontal: PropTypes.bool,\r\n collapsable: PropTypes.bool,\r\n expandAll: PropTypes.bool,\r\n renderContent: PropTypes.func,\r\n onClick: PropTypes.func,\r\n};\r\n\r\nGraph.defaultProps = {\r\n node: {\r\n label: \"label\",\r\n expand: \"expand\",\r\n children: \"children\",\r\n },\r\n renderContent: function (data) {\r\n return data.label;\r\n },\r\n};\r\n\r\nexport default Graph;\r\n\r\nexport function buildGraphData(data) {\r\n const graph = {};\r\n\r\n // Verify if the array is not already a map.\r\n // If it is not, then convert the array to a map.\r\n if (data && Array.isArray(data)) {\r\n data.forEach((node) => {\r\n graph[node.id] = {\r\n id: node.id,\r\n label: node.processDescription,\r\n expand: true,\r\n data: node,\r\n parents: node.parentNodes\r\n ? node.parentNodes.map((parent) => ({\r\n id: parent.nodeId,\r\n shortDescription: parent.relationShortDescription,\r\n longDescription: parent.relationLongDescription,\r\n }))\r\n : [],\r\n children: node.childNodes\r\n ? node.childNodes.map((child) => ({\r\n id: child.nodeId,\r\n shortDescription: child.relationShortDescription,\r\n longDescription: child.relationLongDescription,\r\n }))\r\n : [],\r\n };\r\n });\r\n }\r\n\r\n return graph;\r\n}\r\n","import React, { Fragment } from \"react\";\r\nimport style from \"./styles.module.scss\";\r\nimport CircularProgress from \"../../CircularProgress/CircularProgress\";\r\n\r\nconst renderLabel = (data, prop) => {\r\n const { label } = data;\r\n const { renderContent, onClick, loadingId, selected } = prop;\r\n\r\n const childNodes = [];\r\n if (typeof renderContent === \"function\") {\r\n let vnode = renderContent(data);\r\n if (vnode && loadingId == data.id) {\r\n vnode = {vnode};\r\n }\r\n vnode && childNodes.push(vnode);\r\n } else {\r\n childNodes.push(label);\r\n }\r\n\r\n const cls = [];\r\n\r\n if (data.id == selected) {\r\n cls.push(style.selected);\r\n }\r\n\r\n cls.push(style.treeNodeLabelInner);\r\n\r\n return (\r\n
\r\n typeof onClick === \"function\" && onClick(e, data)}\r\n >\r\n {childNodes}\r\n
\r\n \r\n );\r\n};\r\n\r\nconst directionType = {\r\n LEFT: \"left\",\r\n RIGHT: \"right\",\r\n BOTH: \"both\",\r\n};\r\n\r\nconst renderNode = (data, currentNode, previousNode, direction, prop) => {\r\n const cls = [style.treeNode];\r\n const childNodes = [];\r\n\r\n if (direction === directionType.LEFT || direction === directionType.BOTH) {\r\n if (currentNode.parents.length > 0) {\r\n childNodes.push(\r\n
\r\n {currentNode.parents.map((parent) => (\r\n \r\n {renderNode(data, data[parent.id], currentNode, directionType.LEFT, prop)}\r\n \r\n ))}\r\n
\r\n );\r\n } else {\r\n cls.push(style.isLeaf);\r\n }\r\n if (direction === directionType.LEFT && previousNode) {\r\n if (currentNode.children.find((child) => child.id !== previousNode.id)) {\r\n // The current node has more children than the \"previous node\".\r\n cls.push(style.hasMoreChilds);\r\n }\r\n }\r\n }\r\n\r\n childNodes.push({renderLabel(currentNode, prop)});\r\n\r\n if (direction === directionType.RIGHT || direction === directionType.BOTH) {\r\n if (currentNode.children.length > 0) {\r\n childNodes.push(\r\n
\r\n {currentNode.children.map((children) => (\r\n \r\n {renderNode(data, data[children.id], currentNode, directionType.RIGHT, prop)}\r\n \r\n ))}\r\n
\r\n );\r\n } else {\r\n cls.push(style.isLeaf);\r\n }\r\n if (direction === directionType.RIGHT && previousNode) {\r\n if (currentNode.parents.find((parent) => parent.id !== previousNode.id)) {\r\n // The current node has more parents than the \"previous node\".\r\n cls.push(style.hasMoreParents);\r\n }\r\n }\r\n }\r\n\r\n return
{childNodes}
;\r\n};\r\n\r\nexport const render = ({ data, ...props }) => {\r\n if (!(data && props)) {\r\n return null;\r\n }\r\n\r\n const { selected } = props;\r\n const currentNode = data[selected];\r\n\r\n if (!currentNode) {\r\n return null;\r\n }\r\n\r\n return renderNode(data, currentNode, null, directionType.BOTH, props);\r\n};\r\n\r\nexport default render;\r\n\r\nconst NodeLoading = ({ children }) => (\r\n
\r\n
\r\n \r\n
\r\n {children}\r\n
\r\n);\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"styles-module_container_3rAfO\",\"tree\":\"styles-module_tree_2ohVR\",\"treeNode\":\"styles-module_treeNode_2MbQ6\",\"treeNodeChildren\":\"styles-module_treeNodeChildren_3cBkN\",\"treeNodeParent\":\"styles-module_treeNodeParent_3gV5g\",\"treeNodeLabel\":\"styles-module_treeNodeLabel_OioRr\",\"treeNodeLabelInner\":\"styles-module_treeNodeLabelInner_2E1cz\",\"selected\":\"styles-module_selected_1KMWw\",\"treeNodeBtn\":\"styles-module_treeNodeBtn_3v4aS\",\"expanded\":\"styles-module_expanded_2EIC-\",\"isLeaf\":\"styles-module_isLeaf_y7LIU\",\"collapsed\":\"styles-module_collapsed_Vjh_c\",\"collapsable\":\"styles-module_collapsable_3zc9H\",\"horizontal\":\"styles-module_horizontal_10VGY\",\"treeNodeInner\":\"styles-module_treeNodeInner_3ANUM\",\"loadingWrapper\":\"styles-module_loadingWrapper_L6mRv\",\"nodeLoading\":\"styles-module_nodeLoading_VPxTa\"};","import React, { useReducer, useEffect, useState } from \"react\";\r\nimport {\r\n Card,\r\n CardHeader,\r\n CardBody,\r\n Button,\r\n ButtonDropdown,\r\n DropdownToggle,\r\n DropdownMenu,\r\n DropdownItem,\r\n Row,\r\n Col,\r\n Label,\r\n} from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\nimport CircularProgress from \"../CircularProgress/CircularProgress\";\r\n\r\nimport { initializeState, reducer, TICKET_REFERENCES, PROCESS_DATA, RESET, getProcessId } from \"./reducer\";\r\nimport style from \"./styles.module.scss\";\r\nimport { processes } from \"../../utils/Helper\";\r\nimport { NoPermissionWindow } from \"../../utils/NoPermissionWindow\";\r\nimport Graph, { buildGraphData } from \"./Graph/Graph\";\r\nimport CrossRefForms from \"./Forms\";\r\nimport { DateField } from \"../../utils\";\r\nimport { parseDate } from \"../../utils/dateUtils\";\r\nimport { XS } from \"react-ladda/dist/constants\";\r\n\r\nconst trimAll = (text) => text.replace(/\"\\s+|\\s+\"/g, '\"');\r\n\r\nconst getTitle = (process, info, id, subId) => {\r\n if (process === processes.JOURNAL_ENTRY) {\r\n return `JournalEntry ${info.loading ? \"\" : `#${info.JournalEntryCorrelative}`}`;\r\n }\r\n return `${process} #${id}${parseInt(subId, 10) > 0 ? `.${subId}` : \"\"}`;\r\n};\r\n\r\nconst getTicketTitle = ({ number, process, processId, subProcessId, processDescription = \"\" }) => {\r\n let res = \"Ticket\";\r\n if (!number) return res;\r\n res += ` #${number}`;\r\n if (!process || !processId) return res;\r\n res += ` (${process} #${processId}`;\r\n if (parseInt(subProcessId, 10) > 0) {\r\n res += `.${subProcessId}`;\r\n }\r\n if (processDescription !== \"\") {\r\n res += ` - ${processDescription}`;\r\n }\r\n res += \")\";\r\n return res;\r\n};\r\n\r\n/** check if last tree data can be reused for this cross reference */\r\nfunction canReuseLastTree(process, id, lastCrossRefTree) {\r\n if (lastCrossRefTree) {\r\n if (lastCrossRefTree instanceof Array) {\r\n return lastCrossRefTree.some((node) => {\r\n if (!node.data) {\r\n return false;\r\n }\r\n\r\n if (process == \"CrossReference\") {\r\n return node.id == id;\r\n }\r\n\r\n return node.data.processType == process && node.data.processId == id;\r\n });\r\n }\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/** Store last calcualted tree, can be reused across item with same tree */\r\nlet lastCrossRefTree = null;\r\n\r\nconst CrossReference = ({ services, id, process, userType, platformRole, Link, opsViewAccountName }) => {\r\n const [state, dispatch] = useReducer(reducer, undefined, initializeState);\r\n const [openChilds, setOpenChilds] = useState(false);\r\n const [openActions, setOpenActions] = useState(false);\r\n const [treeData, setTreeData] = useState({ loadingId: null, data: null });\r\n const [errorPage, setErrorPage] = useState(false);\r\n const [revertC, setRevert] = useState(false);\r\n const [date, setDate] = useState(new Date());\r\n const [rollbacking, setRollbacking] = useState(false);\r\n const [reverting, setReverting] = useState(false);\r\n const [downloadTicketLoading, setDownloadTicketLoading] = useState(false);\r\n const {\r\n references,\r\n ticketNumber,\r\n ticketMainProcess,\r\n ticketMainProcessId,\r\n ticketMainSubProcessId,\r\n isRolledback,\r\n isHidden,\r\n childs,\r\n parent,\r\n actions,\r\n } = state;\r\n\r\n const canRollback = actions ? actions.canRollback : false;\r\n const canChangeVisibility = actions ? actions.canChangeVisibility : false;\r\n\r\n const reset = (num) => {\r\n dispatch({\r\n type: RESET,\r\n payload: {\r\n ticketNumber: num,\r\n },\r\n });\r\n };\r\n\r\n const rollback = (crossReferenceId) => {\r\n setRollbacking(true);\r\n services.rollbackCrossReference({ crossReferenceId, confirmRollback: true }).then((res) => {\r\n // TODO\r\n if (res.result.Code === 200) {\r\n alert(\"Correctly rollbacked\");\r\n setRollbacking(false);\r\n } else {\r\n alert(`Failed! ${res.result.Description}`);\r\n setRollbacking(false);\r\n }\r\n });\r\n };\r\n\r\n const revert = (crossReferenceId) => {\r\n setReverting(true);\r\n services.revertCrossReference({ crossReferenceId, date, confirmRollback: true }).then((res) => {\r\n // TODO\r\n if (res.result.Code === 200) {\r\n setReverting(false);\r\n alert(\"Correctly reverted\");\r\n } else {\r\n setReverting(false);\r\n alert(`Failed! ${res.result.Description}`);\r\n }\r\n });\r\n };\r\n const downloadTicket = ({ crossreferenceid, caller }) => {\r\n setDownloadTicketLoading(() => true);\r\n services\r\n .fetchTicket({\r\n crossreferenceid,\r\n caller,\r\n })\r\n .then((response) => {\r\n if (response.code !== 0) {\r\n alert(response.message);\r\n } else {\r\n window.open(response.url);\r\n }\r\n })\r\n .finally(() => setDownloadTicketLoading(() => false));\r\n };\r\n\r\n const changeVisibility = (crossReferenceId, hide) => {\r\n services.setVisibilityOfRollbackedJournalEntry({ crossReferenceId, hide }).then((res) => {\r\n // TODO\r\n if (res.result.Code === 200) {\r\n if (hide) {\r\n alert(\"Correctly hidden\");\r\n } else {\r\n alert(\"Correctly unhidden\");\r\n }\r\n } else {\r\n alert(`Failed! ${res.result.Description}`);\r\n }\r\n });\r\n };\r\n\r\n const onChangeDate = (name, value) => {\r\n const auxdate = new Date(value).toLocaleDateString(\"en\");\r\n setDate(value);\r\n };\r\n\r\n useEffect(() => {\r\n services.ticketReference({ processes: process, id, includeChilds: false }).then((res) => {\r\n const {\r\n processes: newProcesses,\r\n id: CrossReferenceId,\r\n mainProcess,\r\n mainProcessId,\r\n mainSubProcessId,\r\n isRolledback: newIsRolledback,\r\n isHidden: newIsHidden,\r\n childs: newChilds,\r\n parent: newParent,\r\n actions: newActions,\r\n } = res.crossreference;\r\n const action = {\r\n type: TICKET_REFERENCES,\r\n payload: {\r\n references: newProcesses || [],\r\n ticketNumber: CrossReferenceId,\r\n ticketMainProcess: mainProcess,\r\n ticketMainProcessId: mainProcessId,\r\n ticketMainSubProcessId: mainSubProcessId,\r\n isHidden: newIsHidden,\r\n isRolledback: newIsRolledback,\r\n childs: newChilds,\r\n parent: newParent,\r\n actions: newActions,\r\n },\r\n };\r\n dispatch(action);\r\n });\r\n\r\n /** reuse tree if last tree contains current node id */\r\n new Promise((resolveTree) => {\r\n if (canReuseLastTree(process, id, lastCrossRefTree)) {\r\n resolveTree(lastCrossRefTree);\r\n } else {\r\n // tree must be recalculated\r\n services.crossTree({ processes: process, id }).then((res) => {\r\n if (res) {\r\n lastCrossRefTree = res.nodes;\r\n resolveTree(res.nodes);\r\n }\r\n });\r\n }\r\n }).then((tree) => {\r\n const data = buildGraphData(tree);\r\n if (data) {\r\n setTreeData({ data });\r\n } else {\r\n setTreeData({ data: null });\r\n }\r\n });\r\n }, [process, id]);\r\n\r\n useEffect(() => {\r\n if (references) {\r\n references.forEach((ref) => {\r\n const { process: refProcess, ids } = ref;\r\n ids.forEach(({ id: refId, subId }) => {\r\n services.crossRelatedInfo({ process: refProcess, id: refId, subId }).then((res) => {\r\n const properties = JSON.parse(res.propertiesAsJson);\r\n if (properties.Error) {\r\n setErrorPage(true);\r\n } else {\r\n let accessProcess = refProcess;\r\n if (\r\n refProcess === processes.WITHDRAW ||\r\n refProcess === processes.BULK_WITHDRAW ||\r\n refProcess === processes.DEPOSIT ||\r\n refProcess === processes.BULK_DEPOSIT ||\r\n refProcess === processes.TRANSFER ||\r\n refProcess === processes.WITHDRAW_ACCOUNT ||\r\n refProcess === processes.DEPOSIT_ACCOUNT\r\n ) {\r\n accessProcess = \"IO\";\r\n }\r\n const action = {\r\n type: PROCESS_DATA,\r\n payload: {\r\n process: refProcess,\r\n id: refId,\r\n subId,\r\n [refProcess]: JSON.parse(trimAll(properties[accessProcess] || \"{}\")),\r\n },\r\n };\r\n if (refProcess === processes.JOURNAL_ENTRY) {\r\n action.payload[processes.JOURNAL_ENTRY][processes.CASH_ACTIVITY] = JSON.parse(\r\n trimAll(properties[processes.CASH_ACTIVITY])\r\n );\r\n action.payload[processes.JOURNAL_ENTRY][processes.PRODUCT_ACTIVITY] = JSON.parse(\r\n trimAll(properties[processes.PRODUCT_ACTIVITY])\r\n );\r\n }\r\n dispatch(action);\r\n }\r\n });\r\n });\r\n });\r\n }\r\n }, [references]);\r\n\r\n const crossReferenceGraphOnClick = (e, data) => {\r\n if (ticketNumber != data.id) {\r\n setTreeData({ ...treeData, loadingId: data.id });\r\n }\r\n };\r\n\r\n if (errorPage) {\r\n return NoPermissionWindow();\r\n }\r\n\r\n return (\r\n \r\n

\r\n {getTicketTitle({\r\n number: ticketNumber,\r\n process: ticketMainProcess,\r\n processId: ticketMainProcessId,\r\n subProcessId: ticketMainSubProcessId,\r\n })}\r\n

\r\n {!references && }\r\n \r\n {parent && parseInt(parent.id, 10) > 0 && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n {childs && childs.length > 0 && (\r\n \r\n setOpenChilds((o) => !o)}>\r\n \r\n Child Tickets\r\n \r\n \r\n Child Tickets\r\n \r\n {childs.map((child) => (\r\n \r\n reset(child.id)}>\r\n {`Go to Child ${getTicketTitle({\r\n number: child.id,\r\n process: child.mainProcess,\r\n processId: child.mainProcessId,\r\n subProcessId: child.mainSubProcessId,\r\n processDescription: child.mainProcessDescription,\r\n })}`}\r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n )}\r\n {(canRollback || canChangeVisibility) && !rollbacking && !reverting && (\r\n \r\n setOpenActions((o) => !o)}>\r\n \r\n Actions\r\n \r\n \r\n {canRollback && !isRolledback && (\r\n rollback(ticketNumber)}>Rollback\r\n )}\r\n {canRollback && !isRolledback && (\r\n setRevert(!revertC)}>Revert\r\n )}\r\n {canChangeVisibility && isRolledback && (\r\n changeVisibility(ticketNumber, !isHidden)}>\r\n {isHidden ? \"Unhide activity\" : \"Hide activity\"}\r\n \r\n )}\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n {revertC && }\r\n {revertC && (\r\n \r\n onChangeDate(name, value)}\r\n value={date}\r\n disabled={false}\r\n />\r\n \r\n )}\r\n {revertC && (\r\n \r\n revert(ticketNumber)}\r\n data-style={EXPAND_RIGHT}\r\n data-size={XS}\r\n >\r\n \r\n \r\n \r\n )}\r\n \r\n {treeData.data && (\r\n \r\n \r\n \r\n \r\n (\r\n \r\n {e.label}\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n \r\n )}\r\n {references &&\r\n references.map((r) => (\r\n \r\n {r.ids.map(({ id: processId, subId }, index) => (\r\n \r\n \r\n {getTitle(r.process, state[r.process][processId], processId, subId)}\r\n \r\n \r\n
\r\n {state[r.process][getProcessId(processId, subId)].loading && }\r\n {!state[r.process][getProcessId(processId, subId)].loading && (\r\n \r\n )}\r\n {r.ids.length > index + 1 &&
}\r\n
\r\n
\r\n \r\n {r.process === processes.TRADE && (\r\n \r\n {downloadTicketLoading ? (\r\n
\r\n \r\n
\r\n ) : (\r\n downloadTicket({ crossreferenceid: ticketNumber, caller: \"CR\" })}\r\n disabled={downloadTicketLoading}\r\n >\r\n \r\n \r\n )}\r\n
\r\n )}\r\n \r\n
\r\n ))}\r\n
\r\n ))}\r\n {references && references.length === 0 &&

No Cross References

}\r\n
\r\n );\r\n};\r\n\r\nCrossReference.propTypes = {\r\n services: PropTypes.object.isRequired,\r\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\r\n process: PropTypes.string.isRequired,\r\n userType: PropTypes.string.isRequired,\r\n Link: PropTypes.any.isRequired,\r\n};\r\n\r\nexport default CrossReference;\r\n","import { processes } from '../../utils/Helper';\r\n\r\nexport const PROCESS_DATA = 'PROCESS_DATA';\r\nexport const TICKET_REFERENCES = 'TICKET_REFERENCES';\r\nexport const RESET = 'RESET';\r\n\r\nexport const getProcessId = (id, subId) => `${id}${parseInt(subId, 10) > 0 ? `.${subId}` : ''}`;\r\n\r\nconst processesOrder = {\r\n [processes.ORDER]: 1,\r\n [processes.OFFER]: 1,\r\n [processes.TRADE]: 2,\r\n [processes.BULK_ORDER]: 1,\r\n [processes.BASKET_ORDER]: 1,\r\n [processes.DEPOSIT]: 1,\r\n [processes.BULK_DEPOSIT]: 1,\r\n [processes.WITHDRAW]: 1,\r\n [processes.BULK_WITHDRAW]: 1,\r\n [processes.TRANSFER]: 1,\r\n [processes.CORP_EVENT]: 1,\r\n [processes.TRANSACTION]: 1,\r\n [processes.PRODUCT_ACTIVITY]: 3,\r\n [processes.CASH_ACTIVITY]: 3,\r\n [processes.INVOICE]: 4,\r\n [processes.JOURNAL_ENTRY]: 5,\r\n};\r\n\r\nconst normalizeReferences = (refs) => {\r\n const sorted = refs.sort((a, b) => (\r\n (processesOrder[a.process] || 6) - processesOrder[b.process] || 6));\r\n const newRefs = [];\r\n sorted.forEach((ref, index) => {\r\n if (index === 0 || newRefs[newRefs.length - 1].process !== ref.process) {\r\n newRefs.push({\r\n process: ref.process,\r\n ids: [{ id: ref.id, subId: ref.subProcessId }],\r\n });\r\n } else {\r\n newRefs[newRefs.length - 1].ids.push({ id: ref.id, subId: ref.subProcessId });\r\n }\r\n });\r\n return newRefs;\r\n};\r\n\r\nexport const initializeState = () => ({\r\n references: undefined,\r\n parent: { id: undefined },\r\n childs: undefined,\r\n ticketNumber: undefined,\r\n actions: {},\r\n});\r\n\r\nexport const reducer = (state, { type, payload }) => {\r\n const newState = { ...state };\r\n switch (type) {\r\n case TICKET_REFERENCES:\r\n newState.references = [];\r\n payload.references.forEach(({ id, process, subProcessId }) => {\r\n newState.references.push({ id, process, subProcessId });\r\n if (!newState[process]) {\r\n newState[process] = {\r\n [getProcessId(id, subProcessId)]: {\r\n loading: true,\r\n },\r\n };\r\n } else {\r\n newState[process] = {\r\n ...newState[process],\r\n [getProcessId(id, subProcessId)]: {\r\n loading: true,\r\n },\r\n };\r\n }\r\n });\r\n newState.references = normalizeReferences(newState.references);\r\n newState.parent = payload.parent;\r\n newState.childs = payload.childs;\r\n newState.ticketNumber = payload.ticketNumber;\r\n newState.ticketMainProcess = payload.ticketMainProcess;\r\n newState.ticketMainProcessId = payload.ticketMainProcessId;\r\n newState.ticketMainSubProcessId = payload.ticketMainSubProcessId;\r\n newState.isRolledback = payload.isRolledback;\r\n newState.isHidden = payload.isHidden;\r\n newState.actions = payload.actions;\r\n return newState;\r\n case PROCESS_DATA:\r\n if (!newState[payload.process]) {\r\n newState[payload.process] = {\r\n [payload[payload.id]]: { ...payload[payload.process] },\r\n };\r\n } else {\r\n newState[payload.process] = {\r\n ...newState[payload.process],\r\n [getProcessId(payload.id, payload.subId)]: { ...payload[payload.process] },\r\n };\r\n }\r\n return newState;\r\n case RESET:\r\n return {\r\n references: undefined,\r\n parent: { id: undefined },\r\n childs: undefined,\r\n ticketNumber: payload.ticketNumber,\r\n actions: {},\r\n };\r\n default:\r\n return newState;\r\n }\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"card\":\"styles-module_card_FpjS3\",\"loading\":\"styles-module_loading_uwQxU\",\"cardlg\":\"styles-module_cardlg_1uFi-\",\"alerts\":\"styles-module_alerts_2Nagm\",\"icon\":\"styles-module_icon_14SzP\",\"risk\":\"styles-module_risk_2X2ON\",\"riskWarning\":\"styles-module_riskWarning_kD2N9\",\"flash\":\"styles-module_flash_19wsR\",\"treeItem\":\"styles-module_treeItem_2AxGP\",\"downloadTicketLoading\":\"styles-module_downloadTicketLoading_3jXTk\"};","import React from \"react\";\r\nimport { Badge } from \"reactstrap\";\r\nimport style from \"./Items.module.scss\";\r\nimport { FormattedDate, FormattedTime } from \"react-intl\";\r\nimport { FormattedNumber } from \"../FormattedNumber/FormattedNumber\";\r\nimport { CustodyExtStatus, CustodyIntStatus, getIntStatusName } from \"./types\";\r\n\r\nexport const InternalStatus = (status) => (\r\n \r\n {getIntStatusName(status).toUpperCase()}\r\n \r\n);\r\n\r\nexport const Number = (value, dataTypeDecimalName, decimalScale, removeZeros) => (\r\n \r\n);\r\n\r\nexport const ExternalStatus = (status) => (\r\n {status.toUpperCase()}\r\n);\r\n\r\nexport const getExternalStatusClass = (status) => {\r\n switch (status) {\r\n case CustodyExtStatus.PrintPending:\r\n return \"color1\";\r\n case CustodyExtStatus.Printed:\r\n return \"color4\";\r\n case CustodyExtStatus.Released:\r\n return \"color3\";\r\n case CustodyExtStatus.Recovered:\r\n return \"color6\";\r\n case CustodyExtStatus.Cancelled:\r\n return \"color5\";\r\n default:\r\n return \"\";\r\n }\r\n};\r\n\r\nexport const getInternalStatusClass = (status) => {\r\n switch (status) {\r\n case CustodyIntStatus.ClientRequest:\r\n return \"color1\";\r\n case CustodyIntStatus.CustodianRequest:\r\n return \"color2\";\r\n case CustodyIntStatus.Executed:\r\n return \"color4\";\r\n case CustodyIntStatus.ClientReturned:\r\n return \"color6\";\r\n case CustodyIntStatus.Returned:\r\n return \"color4\";\r\n case CustodyIntStatus.Lost:\r\n return \"color3\";\r\n case CustodyIntStatus.ReturnRequested:\r\n return \"color4\";\r\n case CustodyIntStatus.CancelRequest:\r\n return \"color2\";\r\n case CustodyIntStatus.Delivered:\r\n return \"color4\";\r\n default:\r\n return \"\";\r\n }\r\n};\r\n\r\nexport const TDateTime = (date) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const StatusEvent = (status) => (\r\n {status}\r\n);\r\n\r\nexport const getCorpEventStatusClass = (status) => {\r\n switch (status) {\r\n case \"Initiated\":\r\n return \"color1\";\r\n case \"On Validation\":\r\n return \"color6\";\r\n case \"Validated\":\r\n return \"color6\";\r\n case \"Executed\":\r\n return \"color4\";\r\n case \"Cancelled\":\r\n return \"color5\";\r\n default:\r\n return \"\";\r\n }\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"bold\":\"Items-module_bold_zqv9o\",\"status\":\"Items-module_status_112Wv\",\"color1\":\"Items-module_color1_1uWN4\",\"color2\":\"Items-module_color2_3LQTJ\",\"color3\":\"Items-module_color3_3RAW4\",\"color4\":\"Items-module_color4_UdyZs\",\"color5\":\"Items-module_color5_1u1cD\",\"color6\":\"Items-module_color6_5EvVK\"};","export const CustodyLock = {\r\n LockInBank: 'Lock in Bank',\r\n LockSelf: 'Lock Self',\r\n Release: 'Release'\r\n}\r\n\r\nexport const CustodyExtStatus = {\r\n PrintPending: 'Print Pending',\r\n Printed : 'Printed',\r\n Released: 'Released',\r\n Recovered: 'Recovered',\r\n Cancelled: 'Cancelled'\r\n}\r\n\r\nexport const CustodyIntStatus = {\r\n ClientRequest: 'Client Request',\r\n CustodianRequest : 'Custodian Request',\r\n Executed: 'Executed',\r\n ClientReturned: 'Client Returned',\r\n Returned: 'Returned',\r\n Lost: 'Lost',\r\n ReturnRequested: 'Return Requested',\r\n CancelRequest: 'Cancel Request',\r\n Delivered: 'Delivered'\r\n}\r\n\r\nexport function getIntStatusName(status) {\r\n switch (status) {\r\n case CustodyIntStatus.ClientRequest:\r\n return 'Client req.';\r\n case CustodyIntStatus.CustodianRequest:\r\n return 'Custodian req.'; \r\n case CustodyIntStatus.Executed:\r\n return 'Executed';\r\n case CustodyIntStatus.ClientReturned:\r\n return 'Client ret.';\r\n case CustodyIntStatus.Returned:\r\n return 'Returned';\r\n case CustodyIntStatus.Lost:\r\n return 'Lost'; \r\n case CustodyIntStatus.ReturnRequested:\r\n return 'Return req.';\r\n case CustodyIntStatus.CancelRequest:\r\n return 'Cancel req.';\r\n case CustodyIntStatus.Delivered:\r\n return 'Delivered';\r\n }\r\n}\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Button, Label } from \"reactstrap\";\r\n\r\nimport style from \"./CustomDropdown.module.scss\";\r\n\r\nconst CustomDropdown = ({\r\n items = [],\r\n getSelectedId = (i) => i,\r\n getSelectedName = (i) => i,\r\n getFilterCondition = (i) => i,\r\n changedColor = false,\r\n label,\r\n value,\r\n onChange,\r\n name,\r\n error,\r\n disabled,\r\n}) => {\r\n const searchItemByValue = (valueParam) => items.find((item) => getSelectedId(item) === valueParam);\r\n\r\n const [show, setShow] = useState(false);\r\n\r\n const [search, setSearch] = useState(\"\");\r\n const [itemsFiltered, setItemsFiltered] = useState([]);\r\n\r\n const selectedItem = items && searchItemByValue(value);\r\n const selectedItemPreview = selectedItem && getSelectedName(selectedItem);\r\n\r\n useEffect(() => {\r\n if (search === \"\") {\r\n setItemsFiltered(items);\r\n } else {\r\n const newItems = items.filter((item) => {\r\n const itemQuery = getFilterCondition(item);\r\n return itemQuery.toLowerCase().includes(search.toLowerCase());\r\n });\r\n setItemsFiltered(newItems);\r\n }\r\n }, [search]);\r\n\r\n useEffect(() => {\r\n setItemsFiltered(items);\r\n }, [items]);\r\n\r\n const handleSelect = (item) => {\r\n onChange(name, getSelectedId(item), getSelectedName(item));\r\n setShow(() => false);\r\n setSearch(() => \"\");\r\n };\r\n\r\n const handleToggle = () => setShow(!show);\r\n\r\n return (\r\n
\r\n \r\n {label}\r\n \r\n \r\n {selectedItemPreview && selectedItemPreview.length > 20\r\n ? selectedItemPreview.slice(0, 25) + \"...\"\r\n : selectedItemPreview}\r\n \r\n \r\n\r\n {error && (\r\n
\r\n {error}\r\n
\r\n )}\r\n\r\n {show && (\r\n
\r\n setSearch(e.target.value)}\r\n />\r\n {itemsFiltered.length > 0 ? (\r\n itemsFiltered.map((item) => {\r\n return (\r\n

handleSelect(item)}>\r\n {getSelectedName(item)}\r\n

\r\n );\r\n })\r\n ) : (\r\n

No se encontraron resultados...

\r\n )}\r\n
\r\n )}\r\n
\r\n );\r\n};\r\n\r\nexport default CustomDropdown;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"dropbtn\":\"CustomDropdown-module_dropbtn_3MHcf\",\"dropdown\":\"CustomDropdown-module_dropdown_2joFI\",\"withoutPreview\":\"CustomDropdown-module_withoutPreview_1B_cF\",\"withPreview\":\"CustomDropdown-module_withPreview_1An1q\",\"searchInput\":\"CustomDropdown-module_searchInput_3sNVn\",\"dropdownContent\":\"CustomDropdown-module_dropdownContent_3o0l3\"};","import React from \"react\";\r\nimport { Table } from \"reactstrap\";\r\nimport style from \"./Grid.module.scss\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport { CircularProgress } from \"../..\";\r\n\r\nconst Grid = ({ reports, actions }) => {\r\n const view = (report) => {\r\n actions.toggleModal(report);\r\n };\r\n\r\n const DisplayReportsList = () => {\r\n if (!reports) {\r\n return ;\r\n }\r\n if (reports.length === 0) {\r\n return ;\r\n }\r\n return reports.map((r) => {\r\n return (\r\n \r\n view(r)}>{`${r.DynamicReportName}`}\r\n view(r)}>\r\n \r\n \r\n view(r)}>{r.DynamicReportUserLast}\r\n \r\n );\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
NameLast RuntimeUser
\r\n
\r\n );\r\n};\r\n\r\nconst EmptyTable = ({ loading }) => (\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n

No dynamic reports

\r\n )}\r\n \r\n \r\n);\r\n\r\nexport default Grid;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"desk\":\"Grid-module_desk_2YKNf\",\"table\":\"Grid-module_table_9g_KL\",\"actions\":\"Grid-module_actions_P0xnE\",\"dropdown\":\"Grid-module_dropdown_2eo9W\",\"icon\":\"Grid-module_icon_3ZchV\"};","import React, { useState } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Button, FormGroup, Label, Alert } from \"reactstrap\";\r\nimport style from \"./Modal.module.scss\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport FormattedSQL from \"./formatter\";\r\nimport List from \"./Parameters/List\";\r\nimport { QueryStatus } from \"./types\";\r\n\r\nconst ModalDynamicReport = ({ report, open, onClose, services }) => {\r\n const handleClose = () => {\r\n onClose();\r\n };\r\n const [queryStatus, setQueryStatus] = useState(QueryStatus.WaitingExec);\r\n const [reportResponse, setReportResponse] = useState(undefined);\r\n\r\n const [paramValues, setParamValues] = useState(getInitParams(report));\r\n const [paramErrors, setParamErrors] = useState({});\r\n const [alert, setAlert] = useState(false);\r\n\r\n const reportName = report.DynamicReportName;\r\n const reportQuery = report.DynamicReportSQL;\r\n const reportId = report.DynamicReportId;\r\n\r\n const handleExecuteButton = async (reportId) => {\r\n let response = undefined;\r\n let body = {\r\n id: reportId,\r\n parameters: JSON.stringify(paramValues),\r\n };\r\n\r\n const [errors, hasErrors] = validateParameters(report.Parameters, paramValues);\r\n\r\n setParamErrors(errors);\r\n setAlert(false);\r\n\r\n if (!hasErrors) {\r\n setQueryStatus(QueryStatus.Executing);\r\n await services\r\n .execute(body)\r\n .then((res) => res.response)\r\n .then(({ result, buffer, count }) => {\r\n if (result.Code == 200) {\r\n if (count > 0) {\r\n response = buffer.data;\r\n setQueryStatus(QueryStatus.Executed);\r\n } else {\r\n setQueryStatus(QueryStatus.ExecutedEmpty);\r\n }\r\n setAlert({\r\n color: \"buy\",\r\n text: `Succesfully executed. Total rows=${count}`,\r\n });\r\n } else {\r\n setQueryStatus(QueryStatus.Error);\r\n setAlert({ color: \"danger\", text: result.Description });\r\n }\r\n })\r\n .catch((e) => {\r\n setQueryStatus(QueryStatus.WaitingExec);\r\n setAlert({ color: \"danger\", text: e.message });\r\n });\r\n setReportResponse(response);\r\n }\r\n };\r\n\r\n const handleOnChangeParamValue = (name, value) => {\r\n setParamValues({ ...paramValues, [name]: value });\r\n setParamErrors({ ...paramErrors, [name]: undefined });\r\n };\r\n\r\n const handleDownload = () => {\r\n try {\r\n const blob = new Blob([new Uint8Array(reportResponse)], {\r\n type: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;\",\r\n });\r\n const link = document.createElement(\"a\");\r\n link.href = window.URL.createObjectURL(blob);\r\n link.download = reportName.trim() + \".xlsx\";\r\n link.click();\r\n setQueryStatus(QueryStatus.Executed);\r\n } catch (ex) {\r\n setQueryStatus(QueryStatus.WaitingExec);\r\n setAlert({ color: \"danger\", text: ex.message });\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n {reportName}\r\n \r\n \r\n \r\n \r\n\r\n
\r\n            \r\n          
\r\n
\r\n\r\n \r\n\r\n {alert && (\r\n \r\n {alert.text}\r\n \r\n )}\r\n
\r\n\r\n \r\n \r\n\r\n handleExecuteButton(reportId)}\r\n data-style={EXPAND_RIGHT}\r\n loading={queryStatus === QueryStatus.Executing}\r\n >\r\n Execute\r\n \r\n {queryStatus === QueryStatus.Executed && (\r\n \r\n \r\n Download\r\n \r\n )}\r\n \r\n
\r\n );\r\n};\r\n\r\nfunction validateParameters(paramDefs, paramValues) {\r\n let nextErrors = {};\r\n let hasErrors = false;\r\n paramDefs.forEach((paramDef) => {\r\n if (paramDef.ParameterIsMandatory) {\r\n const value = paramValues[paramDef.ParameterName];\r\n if (value == undefined || value == \"\") {\r\n nextErrors[paramDef.ParameterName] = \"Required field\";\r\n hasErrors = true;\r\n }\r\n }\r\n });\r\n return [nextErrors, hasErrors];\r\n}\r\n\r\nfunction getInitParams(report) {\r\n const params = {};\r\n if (report.Parameters) {\r\n report.Parameters.forEach((param) => {\r\n const initValue = param.ParameterInitValue;\r\n if (initValue != \"\") {\r\n params[param.ParameterName] = initValue;\r\n }\r\n });\r\n }\r\n return params;\r\n}\r\n\r\nexport default ModalDynamicReport;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"Modal-module_modal_ofAnx\",\"body\":\"Modal-module_body_2P55w\",\"codeStyle\":\"Modal-module_codeStyle_1pdrC\",\"highlightWord\":\"Modal-module_highlightWord_30OQV\",\"table\":\"Modal-module_table_36HXT\",\"error\":\"Modal-module_error_1E1U8\",\"events\":\"Modal-module_events_3wz2Q\",\"box\":\"Modal-module_box_14ul2\"};","import React from \"react\";\r\nimport { FormGroup, Label, Input } from \"reactstrap\";\r\nimport DatePicker from \"react-datepicker\";\r\nimport { ParamType } from \"../types\";\r\nimport style from \"./styles.module.scss\";\r\nimport { toDateTime, toFormatDate } from \"../../../../utils\";\r\nimport { NumberFormatInput } from \"../../../NumberFormatInput/NumberFormatInput\";\r\n\r\nconst Parameter = ({\r\n ParameterType,\r\n ParameterName,\r\n ParameterFriendlyName,\r\n ParameterInitValue,\r\n ParameterIsMandatory,\r\n onChange,\r\n error,\r\n value,\r\n}) => {\r\n const paramValue = value == undefined ? ParameterInitValue : value;\r\n\r\n const handleOnChange = (nextValue) => {\r\n onChange(ParameterName, nextValue);\r\n };\r\n\r\n return (\r\n \r\n {ParameterIsMandatory ? (\r\n \r\n ) : (\r\n \r\n )}\r\n {ParameterType === ParamType.Character && (\r\n \r\n )}\r\n {ParameterType === ParamType.Numeric && (\r\n \r\n )}\r\n {ParameterType === ParamType.Date && (\r\n \r\n )}\r\n {!!error &&
{error}
}\r\n
\r\n );\r\n};\r\n\r\nconst ParamDateField = ({ value, invalid, onChange }) => {\r\n let showDate = value && value !== \"0000-00-00\" ? toDateTime(value) : undefined;\r\n\r\n if (showDate == \"Invalid Date\") {\r\n showDate = undefined;\r\n }\r\n\r\n return (\r\n onChange(toFormatDate(date))}\r\n dateFormat=\"dd-MM-yyyy\"\r\n customInput={}\r\n />\r\n );\r\n};\r\nconst ParamNumericField = ({ value, invalid, onChange, dataTypeDecimalName, decimalScale }) => (\r\n onChange(e.value)}\r\n dataTypeDecimalName={dataTypeDecimalName}\r\n decimalScale={decimalScale}\r\n />\r\n);\r\n\r\nconst ParamTextField = ({ value, invalid, onChange }) => (\r\n onChange(e.target.value)} />\r\n);\r\n\r\nexport default Parameter;\r\n","import React, {Fragment} from 'react';\r\nimport Parameter from './Item';\r\nimport {Row, Col} from 'reactstrap';\r\n\r\nconst List = ({parameters, values, errors, onChange}) => {\r\n parameters.sort((e) => e.ParameterIsMandatory);\r\n\r\n if (parameters.length == 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n
Parameters
\r\n \r\n {parameters.map((param, i) => (\r\n \r\n \r\n \r\n ))}\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default List;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"labelReq\":\"styles-module_labelReq_18vyM\"};","import React from \"react\";\r\nimport sqlFormatter from \"sql-formatter\";\r\nimport style from \"./Modal.module.scss\";\r\n\r\nconst reservedWords = [\r\n \"SELECT\",\r\n \"FROM\",\r\n \"WHERE\",\r\n \" AND \",\r\n \" OR \",\r\n \" IN \",\r\n \"ORDER BY\",\r\n \"GROUP BY\",\r\n \" JOIN \",\r\n \" INNER JOIN \",\r\n \" LEFT JOIN \",\r\n \" RIGHT JOIN \",\r\n \"DECLARE\",\r\n \"SET\",\r\n];\r\n\r\nfunction parseSQLReservedWords(_query) {\r\n const query = sqlFormatter.format(_query);\r\n const regex = new RegExp(reservedWords.join(\"|\"), \"gi\");\r\n\r\n let nodes = query.split(/\\r?\\n/);\r\n\r\n let elements = [];\r\n\r\n nodes.forEach((_node) => {\r\n const node = _node + \"\\n\";\r\n const matches = node.matchAll(regex);\r\n let chunksToHighlight = [];\r\n for (const match of matches) {\r\n chunksToHighlight.push({\r\n start: match.index,\r\n end: match.index + match[0].length,\r\n });\r\n }\r\n elements.push(...fillInChunks({ chunksToHighlight, text: node }));\r\n });\r\n\r\n return elements;\r\n}\r\n\r\nconst fillInChunks = ({ chunksToHighlight, text }) => {\r\n const allChunks = [];\r\n const append = (start, end, highlight) => {\r\n if (end - start > 0) {\r\n allChunks.push({\r\n start,\r\n text: text.substring(start, end),\r\n highlight,\r\n });\r\n }\r\n };\r\n\r\n if (chunksToHighlight.length === 0) {\r\n append(0, text.length, false);\r\n } else {\r\n let lastIndex = 0;\r\n chunksToHighlight.forEach((chunk) => {\r\n append(lastIndex, chunk.start, false);\r\n append(chunk.start, chunk.end, true);\r\n lastIndex = chunk.end;\r\n });\r\n append(lastIndex, text.length, false);\r\n }\r\n return allChunks;\r\n};\r\n\r\nconst FormattedSQL = ({ query }) => {\r\n return (\r\n \r\n {parseSQLReservedWords(query).map((e, i) => (\r\n \r\n {e.text}\r\n \r\n ))}\r\n \r\n );\r\n};\r\n\r\nexport default FormattedSQL;\r\n","export const ParamType = {\r\n Numeric: 'numeric',\r\n Character: 'character',\r\n Date: 'date'\r\n};\r\n\r\nexport const QueryStatus = {\r\n WaitingExec: 'WaitingExec',\r\n Executing: 'Executing',\r\n ExecutedEmpty: 'ExecutedEmpty',\r\n Executed: 'Executed',\r\n Error: 'Error'\r\n}","import React from \"react\";\r\nimport Responsive from \"react-responsive\";\r\nimport style from \"./Toolbar.module.scss\";\r\n\r\nconst Desktop = (props) => ;\r\n\r\nconst Counter = ({ total, filtered }) => (\r\n \r\n
Reports: {total}
\r\n\r\n
{filtered} filtered
\r\n
\r\n);\r\n\r\nexport default Counter;\r\n","import React from 'react';\r\nimport { InputGroup, Input, Button } from 'reactstrap';\r\n\r\n \r\nconst SearchBox = ({changeValue, text, ...props}) => (\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n\r\n changeValue(e.target.value)}\r\n />\r\n
\r\n)\r\n\r\nexport default SearchBox;","import React from \"react\";\r\nimport { Row, Col } from \"reactstrap\";\r\nimport style from \"./Toolbar.module.scss\";\r\nimport Counter from \"./Counter\";\r\nimport SearchBox from \"./SearchBox\";\r\n\r\nconst Toolbar = ({ filteredCount, total, stringFilter, setStringFilter }) => {\r\n const onSearchChange = (value) => {\r\n setStringFilter(value);\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Toolbar;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"toolbar\":\"Toolbar-module_toolbar_1LwY3\",\"filterDropdown\":\"Toolbar-module_filterDropdown_2HfvJ\",\"dropdown\":\"Toolbar-module_dropdown_1D8iK\",\"export\":\"Toolbar-module_export_3FXY5\",\"totals\":\"Toolbar-module_totals_5qjLQ\",\"advanced\":\"Toolbar-module_advanced_2amnG\",\"inputs\":\"Toolbar-module_inputs_27KjD\"};","import Grid from './Grid/Grid';\r\nimport Toolbar from './Toolbar/Toolbar';\r\nimport Modal from './Modal/DynamicReport';\r\n\r\nconst DynamicReports = {\r\n Grid,\r\n Toolbar,\r\n Modal\r\n}\r\n\r\nexport default DynamicReports;","import React from \"react\";\r\nimport { DropdownItem } from \"reactstrap\";\r\nimport style from \"./../style.module.scss\";\r\nimport { IconClass } from \"../UI\";\r\nimport { Datetime } from \"../Grid/Grid\";\r\nimport { CustomHandlers } from \"../types\";\r\nimport { FormattedDate, FormattedTime } from \"react-intl\";\r\nimport { localDateTime } from \"../../../utils/Helper\";\r\n\r\nconst Item = ({ item, tag, route, onClick }) => {\r\n const redirectProps = CustomHandlers.includes(item.process)\r\n ? {}\r\n : {\r\n tag,\r\n replace: true,\r\n to: {\r\n pathname: route,\r\n state: {\r\n id: item.processId,\r\n hash: Math.random().toString(36).substring(2, 10),\r\n },\r\n },\r\n };\r\n\r\n const cleanText = item.text.replace(/#Failed#|#Success#/g, \"\").trim();\r\n const isFailed = item.process === \"Offer\" && !item.read && item.text.includes(\"#Failed#\");\r\n const backgroundColor = isFailed\r\n ? \"#f8d7da\"\r\n : \"\";\r\n\r\n return (\r\n onClick(e)} className={style.item} style={{ backgroundColor }} >\r\n \r\n
\r\n
\r\n {item.process}\r\n \r\n {\" \"}\r\n \r\n \r\n
\r\n

{cleanText}

\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default Item;\r\n","import React from \"react\";\r\nimport {\r\n Badge,\r\n DropdownToggle,\r\n DropdownMenu,\r\n DropdownItem,\r\n Dropdown as ReactStrapDropDown,\r\n} from \"reactstrap\";\r\nimport Item from \"./Item\";\r\nimport style from \"./../style.module.scss\";\r\nimport ModalDetail from \"../ModalDetail\";\r\n\r\nclass List extends React.Component {\r\n state = {\r\n open: false,\r\n modalDetail: {\r\n open: false,\r\n },\r\n };\r\n\r\n toggle = () => {\r\n this.setState({ open: !this.state.open });\r\n };\r\n\r\n toggleModal = (name, props) => {\r\n this.setState({ [name]: { open: !this.state[name].open, ...props } });\r\n };\r\n\r\n handleItemClick = ({ id, process, ...props }) => {\r\n this.props.fetchMarkAsRead({ id });\r\n };\r\n\r\n render() {\r\n const { open, modalDetail } = this.state;\r\n const { link, routes } = this.props;\r\n let { items } = this.props;\r\n\r\n items = sortItemsFirst15(items);\r\n\r\n const eventsCounter = items ? items.length : \"-\";\r\n return [\r\n \r\n \r\n \r\n \r\n \r\n {eventsCounter}\r\n \r\n \r\n \r\n \r\n
\r\n \r\n Events unread\r\n \r\n {items && items.length == 0 && (\r\n
\r\n No events\r\n
\r\n )}\r\n {items &&\r\n items.map((item, i) => (\r\n this.handleItemClick(item)}\r\n />\r\n ))}\r\n
\r\n \r\n View all events\r\n \r\n
\r\n
,\r\n\r\n this.toggleModal(\"modalDetail\")}\r\n />,\r\n ];\r\n }\r\n}\r\n\r\nfunction sortItemsFirst15(items) {\r\n if (items == null) return;\r\n\r\n items = items.slice(0, 15);\r\n items.sort((i1, i2) => {\r\n const compare_dateTime = new Date(i2.dateTime) - new Date(i1.dateTime);\r\n const compare_read = i2.read - i1.read;\r\n\r\n return compare_read || compare_dateTime;\r\n });\r\n\r\n return items;\r\n}\r\n\r\nexport function getRoute(routes, process) {\r\n const route = routes[process] || { to: \"/\" };\r\n\r\n return route.to;\r\n}\r\n\r\nexport default List;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { FormattedDate, FormattedTime } from \"react-intl\";\r\nimport { Badge, Table } from \"reactstrap\";\r\nimport style from \"./../style.module.scss\";\r\nimport CircularProgress from \"../../CircularProgress/CircularProgress\";\r\nimport { CustomHandlers } from \"../types\";\r\nimport InfiniteScroll from \"react-infinite-scroller\";\r\nimport { localDateTime } from \"../../../utils/Helper\";\r\n\r\nconst Grid = ({ grid, getEvents, setRead, routes = {}, ...props }) => {\r\n const [redirect, setRedirect] = useState(null);\r\n\r\n useEffect(() => {\r\n getEvents(0);\r\n }, []);\r\n\r\n const handleRowClick = (event) => {\r\n setRead({ id: event.id });\r\n\r\n if (CustomHandlers.includes(event.process)) {\r\n } else {\r\n const { to } = routes[event.process] || { to: \"/\" };\r\n setRedirect({\r\n pathname: to,\r\n state: {\r\n id: event.processId,\r\n hash: Math.random().toString(36).substring(2, 10),\r\n },\r\n });\r\n }\r\n };\r\n\r\n if (redirect) {\r\n return ;\r\n }\r\n\r\n return [\r\n
\r\n \r\n {true ? : null}\r\n
\r\n }\r\n loadMore={getEvents}\r\n hasMore={grid.hasMore}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {grid.events == null || grid.events.length == 0 ? (\r\n \r\n ) : (\r\n grid.events.map((event) => {\r\n const isFailed = event.process === \"Offer\" && !event.read && event.text.includes(\"#Failed#\");\r\n const cleanText = event.text.replace(/#Failed#|#Success#/g, \"\").trim();\r\n return (\r\n handleRowClick(event)}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n );\r\n })\r\n )}\r\n \r\n
ProcessDatetimeDetail
\r\n {event.process}\r\n {!event.read && Unread}\r\n \r\n {cleanText}
\r\n \r\n ,\r\n ];\r\n};\r\n\r\nexport const Datetime = ({ value }) => {\r\n if (value == undefined) return -;\r\n return (\r\n \r\n {\" \"}\r\n \r\n \r\n );\r\n};\r\n\r\nconst EmptyTable = ({ loading }) => (\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n

No events

\r\n )}\r\n \r\n \r\n);\r\n\r\nconst progressStyle = {\r\n position: \"absolute\",\r\n top: 0,\r\n left: 0,\r\n bottom: \"30px\",\r\n right: 0,\r\n margin: \"auto\",\r\n};\r\n\r\nexport default Grid;\r\n","import React, {useState} from 'react'\r\nimport {Button, Modal, ModalHeader, ModalBody, ModalFooter} from 'reactstrap'\r\n\r\nconst ModalDetail = ({message, open, toggle}) => {\r\n if (!open) return null;\r\n\r\n return (\r\n
\r\n \r\n Event alert detail\r\n {message}\r\n \r\n \r\n \r\n \r\n
\r\n )\r\n}\r\n\r\nexport default ModalDetail\r\n","import React, { useEffect, useState } from \"react\";\r\nimport Grid from \"./Grid/Grid\";\r\nimport Toolbar from \"./Toolbar/Toolbar\";\r\n\r\nconst initialGrid = {\r\n page: 0,\r\n hasMore: false,\r\n loading: false,\r\n events: null,\r\n};\r\n\r\nconst PageGrid = ({ services, redirect, routes, actions }) => {\r\n const [filter, setFilter] = useState({\r\n text: \"\",\r\n process: \"\",\r\n includeRead: true,\r\n });\r\n const [grid, setGrid] = useState(initialGrid);\r\n\r\n useEffect(() => {\r\n if (filter) {\r\n getEvents(0);\r\n }\r\n }, [filter]);\r\n\r\n const setRead = (props) => {\r\n actions.setRead(props.id);\r\n return services.fetchMarkAsRead(props);\r\n };\r\n\r\n const getEvents = (page) => {\r\n if (!grid.loading) {\r\n let nextPage = 0;\r\n if (page == 0) {\r\n setGrid(initialGrid);\r\n } else {\r\n nextPage = grid.page + 1;\r\n setGrid({ ...grid, loading: true, hasMore: false });\r\n }\r\n services\r\n .fetchGetEventAlerts({\r\n filter,\r\n offset: nextPage * 25,\r\n length: 25,\r\n })\r\n .then((r) => {\r\n const prevEvents = nextPage == 0 ? [] : grid.events || [];\r\n setGrid({\r\n loading: false,\r\n hasMore: r.events.length >= 25,\r\n page: nextPage,\r\n events: [...prevEvents, ...r.events],\r\n });\r\n });\r\n }\r\n };\r\n\r\n const changeFilter = (props) => {\r\n setFilter({\r\n ...filter,\r\n ...props,\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default PageGrid;\r\n","import React from \"react\";\r\nimport { FormGroup, Label, Input, Button } from \"reactstrap\";\r\nimport style from \"./Toolbar.module.scss\";\r\n\r\nconst Advanced = ({ open, onChange, toggle, ...props }) => {\r\n if (open == false) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n
\r\n onChange({ dateFrom: e.target.value })}\r\n required\r\n />\r\n
\r\n onChange({ dateTo: e.target.value })}\r\n />\r\n
\r\n \r\n\r\n \r\n \r\n );\r\n};\r\n\r\nexport default Advanced;\r\n","import React from \"react\";\r\nimport { InputGroup, Input, Button } from \"reactstrap\";\r\n\r\nconst SearchBox = ({ open, onChange, toggle, text }) => (\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n\r\n onChange({ text: e.target.value })}\r\n />\r\n {/* {!open && (\r\n
\r\n \r\n
\r\n )} */}\r\n
\r\n);\r\n\r\nexport default SearchBox;\r\n","import React, { Component, useCallback, useState } from \"react\";\r\nimport style from \"./Toolbar.module.scss\";\r\nimport {\r\n Col,\r\n Row,\r\n Button,\r\n DropdownMenu,\r\n DropdownToggle,\r\n DropdownItem,\r\n UncontrolledDropdown,\r\n} from \"reactstrap\";\r\nimport Responsive from \"react-responsive\";\r\nimport SearchBox from \"./SearchBox\";\r\nimport Advanced from \"./Advanced\";\r\nimport { debounce } from \"../../../utils/Helper\";\r\nimport { Process } from \"../types\";\r\n\r\nconst Toolbar = ({ onChange: rootOnChange, filter: rootFilter, counters }) => {\r\n const [openAdvanced, setOpenAdvanced] = useState(false);\r\n const [filters, setFilters] = useState(rootFilter);\r\n\r\n const debounceCallback = useCallback(\r\n debounce((nextValues) => rootOnChange(nextValues), 500),\r\n []\r\n );\r\n\r\n const onChange = (fields) => {\r\n const nextValues = {\r\n ...filters,\r\n ...fields,\r\n advanced: openAdvanced,\r\n };\r\n debounceCallback(nextValues);\r\n setFilters(nextValues);\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n setOpenAdvanced(true)} {...filters} />\r\n {/* setOpenAdvanced(false)}\r\n onChange={onChange}\r\n open={openAdvanced}\r\n {...filters}\r\n /> */}\r\n
\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nconst Counter = ({ total }) => (\r\n
\r\n
Events: {total}
\r\n
\r\n);\r\n\r\nconst DropDownFilterProcess = ({ value, onChange }) => (\r\n \r\n \r\n {value == \"\" ? \"All Processes\" : value}\r\n \r\n \r\n onChange({ process: \"\" })}>\r\n {\"All Processes\"}\r\n \r\n {Object.values(Process).map((process) => (\r\n onChange({ process: process })}>\r\n {process}\r\n \r\n ))}\r\n \r\n \r\n);\r\n\r\nexport default Toolbar;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"toolbar\":\"Toolbar-module_toolbar_2AFJ4\",\"filterDropdown\":\"Toolbar-module_filterDropdown_2i1ZT\",\"dropdown\":\"Toolbar-module_dropdown_1_nbF\",\"export\":\"Toolbar-module_export_1q5se\",\"totals\":\"Toolbar-module_totals_3_S-n\",\"advanced\":\"Toolbar-module_advanced_aLmgr\",\"inputs\":\"Toolbar-module_inputs_jMjVM\"};","import { Process } from \"./types\";\r\n\r\nexport function IconClass(process) {\r\n switch (process) {\r\n case Process.Order:\r\n case Process.BulkOrder: \r\n return 'icon-bell icons';\r\n case Process.BasketOrder:\r\n return 'fa fa-shopping-basket';\r\n\r\n case Process.CorpEvent:\r\n return 'icon-bulb icons';\r\n }\r\n}","import List from \"./Bar/List\";\r\nimport Grid from \"./Grid/Grid\";\r\nimport PageGrid from \"./PageGrid\";\r\nimport Toolbar from \"./Toolbar/Toolbar\";\r\n\r\nexport { List as Bar, Grid, Toolbar, PageGrid };\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"style-module_container_L5rQI\",\"empty\":\"style-module_empty_3ZI4a\",\"item\":\"style-module_item_fow1P\",\"body\":\"style-module_body_2htGa\",\"top\":\"style-module_top_2P-RY\",\"grid\":\"style-module_grid_1PzKa\",\"more\":\"style-module_more_25mvq\"};","export const Process = {\r\n Order: 'Order',\r\n BulkOrder: 'BulkOrder',\r\n BasketOrder: 'BasketOrder',\r\n Deposit: 'Deposit',\r\n Withdraw: 'Withdraw',\r\n Transfer: 'Transfer',\r\n CorpEvent: 'CorpEvent'\r\n}\r\n\r\nexport const CustomHandlers = [\r\n 'Offer'\r\n]","import React, { useState } from \"react\";\r\nimport { Table, Button, UncontrolledTooltip } from \"reactstrap\";\r\nimport { FormattedDate, FormattedTime } from \"react-intl\";\r\nimport { FormattedNumber } from \"../FormattedNumber/FormattedNumber\";\r\nimport style from \"./ExecutionsTable.module.scss\";\r\nimport { ZOOM_OUT, XS } from \"react-ladda/dist/constants\";\r\nimport LaddaButton from \"react-ladda/dist/LaddaButton\";\r\n\r\nconst ExecutionsTable = (props) => {\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* */}\r\n \r\n \r\n \r\n \r\n \r\n
Trade/ExecDateQuantityPriceTrading RouteCounterparty
\r\n
\r\n );\r\n};\r\n\r\nconst ExecutionsRows = ({ executions, decimalAmount, ...props }) => {\r\n const [loadings, setLoadings] = useState({});\r\n\r\n const onDelete = (execution) => {\r\n if (window.confirm(`Are you sure to delete execution #${execution.childId}?`)) {\r\n setLoadings({ ...loadings, [execution.childId]: true });\r\n props.onDelete(execution, () => {\r\n setLoadings({ ...loadings, [execution.childId]: false });\r\n });\r\n }\r\n };\r\n\r\n if (!executions.length) {\r\n return (\r\n \r\n \r\n
No Executions
\r\n \r\n \r\n );\r\n }\r\n\r\n return executions.map((execution) => {\r\n return (\r\n \r\n \r\n \r\n {execution.childId} / {execution.ExecutionId}\r\n \r\n \r\n \r\n {\" \"}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {execution.TradingRouteName}\r\n \r\n \r\n {execution.CounterPartyName}\r\n \r\n \r\n \r\n\r\n {props.showDelete ? (\r\n execution.sent ? (\r\n \r\n \r\n \r\n ) : (\r\n onDelete(execution)}\r\n data-color=\"red\"\r\n data-style={ZOOM_OUT}\r\n data-size={XS}\r\n >\r\n \r\n \r\n )\r\n ) : // \r\n null}\r\n \r\n \r\n );\r\n });\r\n};\r\n\r\nconst ExecutionMoreInfo = (props) => {\r\n return null;\r\n ///////////////// BUG //////////////////\r\n return (\r\n
\r\n \r\n \r\n Broker: \r\n
\r\n Counterparty: \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default ExecutionsTable;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"ExecutionsTable-module_container_1POWh\",\"tableFixed\":\"ExecutionsTable-module_tableFixed_3h8ok\",\"executionTableRow\":\"ExecutionsTable-module_executionTableRow_2OhgC\",\"action\":\"ExecutionsTable-module_action_1T-n4\",\"moreInfo\":\"ExecutionsTable-module_moreInfo_QbMMD\",\"icon\":\"ExecutionsTable-module_icon_196b_\"};","import React from 'react';\r\nimport classnames from 'classnames';\r\n\r\n\r\nclass ChildButton extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.handleOnClick = this.handleOnClick.bind(this);\r\n }\r\n\r\n handleOnClick() {\r\n if (this.props.disabled === true) {\r\n return;\r\n }\r\n\r\n if (this.props.onClick) {\r\n this.props.onClick();\r\n }\r\n }\r\n\r\n render() {\r\n var iconClass = classnames('mfb-component__child-icon', this.props.icon);\r\n var className = classnames('mfb-component__button--child',\r\n this.props.className,\r\n {\"mfb-component__button--disabled\": this.props.disabled});\r\n return (\r\n
  • \r\n \r\n \r\n \r\n
  • \r\n );\r\n }\r\n}\r\n\r\nexport {ChildButton};\r\n","// https://github.com/nobitagit/react-material-floating-button\r\nimport { Menu } from \"./menu\";\r\nimport { MainButton } from \"./main-button\";\r\nimport { ChildButton } from \"./child-button\";\r\n\r\nexport { Menu, MainButton, ChildButton };\r\n","import React from \"react\";\r\nimport classnames from \"classnames\";\r\n\r\nexport const MainButton = ({ iconResting, iconActive, className, label, style, href, onClick }) => {\r\n var iconResting = classnames(\"mfb-component__main-icon--resting\", iconResting);\r\n var iconActive = classnames(\"mfb-component__main-icon--active\", iconActive);\r\n var mainClass = classnames(\"mfb-component__button--main\", className);\r\n if (label) {\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n } else {\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n};\r\n\r\nMainButton.defaultProps = {\r\n href: \"#\",\r\n onClick: function () {},\r\n iconResting: \"\",\r\n iconActive: \"\",\r\n label: null,\r\n};\r\n","import React from \"react\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport getClasses from \"./utils/get-classes\";\r\nimport getChildren from \"./utils/get-children\";\r\nimport childrenValidator from \"./utils/children-validator\";\r\n\r\nimport \"./mfb.css\";\r\nclass Menu extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n isOpen: false,\r\n };\r\n\r\n this.toggleMenu = this.toggleMenu.bind(this);\r\n }\r\n\r\n toggleMenu(evt) {\r\n evt.preventDefault();\r\n\r\n if (this.props.method === \"hover\") {\r\n return;\r\n }\r\n // flip the state from open to close and viceversa\r\n this.setState({\r\n isOpen: !this.state.isOpen,\r\n });\r\n }\r\n\r\n render() {\r\n var classes = getClasses(this.props);\r\n var buttons = getChildren(this.props.children);\r\n\r\n var main =\r\n buttons.main &&\r\n React.cloneElement(buttons.main, {\r\n onClick: this.toggleMenu,\r\n });\r\n\r\n return (\r\n \r\n
  • \r\n {main}\r\n
      {buttons.child}
    \r\n
  • \r\n \r\n );\r\n }\r\n}\r\n\r\nMenu.propTypes = {\r\n effect: PropTypes.oneOf([\"zoomin\", \"slidein\", \"slidein-spring\", \"fountain\"]).isRequired,\r\n position: PropTypes.oneOf([\"tl\", \"tr\", \"bl\", \"br\"]).isRequired,\r\n children: childrenValidator,\r\n};\r\n\r\nexport { Menu };\r\n","import React, {Children} from 'react';\r\nimport {MainButton} from './../main-button';\r\nimport {ChildButton} from './../child-button';\r\n\r\n\r\nfunction childrenValidator(props, propName, componentName){\r\n var children = props[propName];\r\n var mainButtonCount = 0;\r\n var childButtonCount = 0;\r\n var otherCount = 0;\r\n var msg;\r\n Children.forEach(children, function(child){\r\n if(child.type === MainButton){\r\n return mainButtonCount++;\r\n }\r\n if(child.type === ChildButton){\r\n return childButtonCount++;\r\n }\r\n otherCount++;\r\n });\r\n if(mainButtonCount === 0){\r\n msg = 'Prop `children` must contain a MainButton component in `' + componentName + '`.';\r\n return new Error(msg);\r\n }\r\n if(mainButtonCount > 1){\r\n msg = 'Prop `children` must contain only 1 MainButton component in `' +\r\n componentName + '`, but ' + mainButtonCount + ' exist.';\r\n return new Error(msg);\r\n }\r\n if(otherCount){\r\n msg = 'Prop `children` contains elements other than MainButton and ChildButton ' +\r\n 'components in `' + componentName + '`.';\r\n return new Error(msg);\r\n }\r\n}\r\n\r\nexport default childrenValidator;\r\n","import React, {Children} from 'react';\r\nimport {MainButton} from './../main-button';\r\n\r\nfunction getChildren(children){\r\n var buttons = {\r\n main: null,\r\n child: []\r\n };\r\n\r\n Children.forEach(children, function(child){\r\n if(child.type === MainButton){\r\n buttons.main = child;\r\n return;\r\n }\r\n buttons.child.push(child);\r\n });\r\n\r\n return buttons;\r\n}\r\n\r\nexport default getChildren;\r\n","import classnames from 'classnames';\r\n\r\nfunction getClasses(props){\r\n return classnames({\r\n 'mfb-zoomin': props.effect === 'zoomin',\r\n 'mfb-slidein': props.effect === 'slidein',\r\n 'mfb-slidein-spring': props.effect === 'slidein-spring',\r\n 'mfb-fountain': props.effect === 'fountain',\r\n 'mfb-component--tl': props.position === 'tl',\r\n 'mfb-component--tr': props.position === 'tr',\r\n 'mfb-component--bl': props.position === 'bl',\r\n 'mfb-component--br': props.position === 'br'\r\n }, props.className);\r\n}\r\n\r\nexport default getClasses;\r\n","import React from \"react\";\r\n\r\nconst decimalSeparator = (() => {\r\n if (\r\n typeof window !== \"undefined\" &&\r\n window.___APP_CONFIG___ &&\r\n window.___APP_CONFIG___.DECIMAL_SEPARATOR == \".\"\r\n )\r\n return \".\";\r\n return \",\";\r\n})();\r\n\r\nconst thousandSeparator = (() => {\r\n if (\r\n typeof window !== \"undefined\" &&\r\n window.___APP_CONFIG___ &&\r\n window.___APP_CONFIG___.DECIMAL_SEPARATOR == \".\"\r\n )\r\n return \",\";\r\n return \".\";\r\n})();\r\n\r\nconst currency =\r\n typeof window !== \"undefined\" && window.___APP_CONFIG___\r\n ? window.___APP_CONFIG___.DATA_TYPE_DECIMALS.CURRENCY\r\n : \"2\";\r\n\r\nconst price =\r\n typeof window !== \"undefined\" && window.___APP_CONFIG___\r\n ? window.___APP_CONFIG___.DATA_TYPE_DECIMALS.PRICE\r\n : \"4\";\r\n\r\nconst quantity =\r\n typeof window !== \"undefined\" && window.___APP_CONFIG___\r\n ? window.___APP_CONFIG___.DATA_TYPE_DECIMALS.QUANTITY\r\n : \"8\";\r\n\r\nconst percentage =\r\n typeof window !== \"undefined\" && window.___APP_CONFIG___\r\n ? window.___APP_CONFIG___.DATA_TYPE_DECIMALS.PERCENTAGE\r\n : \"2\";\r\n\r\nconst defaultValue =\r\n typeof window !== \"undefined\" && window.___APP_CONFIG___\r\n ? window.___APP_CONFIG___.DATA_TYPE_DECIMALS.DEFAULT\r\n : \"8\";\r\n\r\nconst decimalAmount = {\r\n quantity: quantity,\r\n price: price,\r\n currency: currency,\r\n percentage: percentage,\r\n default: defaultValue,\r\n};\r\n\r\nexport const formattedNumber = (value, dataTypeDecimalName = \"default\", decimalScale = null, removeZeros) => {\r\n dataTypeDecimalName = dataTypeDecimalName.toString().toLowerCase().trim();\r\n\r\n // decimalScale < 0 ? (decimalScale = decimalScale * -1) : null;\r\n decimalAmount[dataTypeDecimalName] === undefined ? (dataTypeDecimalName = \"default\") : null;\r\n\r\n // removeZeros === undefined && dataTypeDecimalName === \"quantity\" ? (removeZeros = true) : null;\r\n\r\n //decimalScale = null;\r\n removeZeros = true;\r\n\r\n let isNegative = false;\r\n let res = \"\" + value;\r\n res = res.trim();\r\n if (value === null || value === undefined || value === \"\") return \"\";\r\n\r\n //If it's negative we'll ignore the - sign until the end.\r\n if (value < 0) {\r\n isNegative = true;\r\n res = value * -1 + \"\";\r\n }\r\n\r\n if (\r\n dataTypeDecimalName === \"default\" ||\r\n dataTypeDecimalName === \"currency\" ||\r\n dataTypeDecimalName === \"quantity\"\r\n ) {\r\n //Here we change the decimal number amount.\r\n if (res.includes(\".\")) {\r\n if (decimalScale != null) {\r\n res = parseFloat(res).toFixed(decimalScale);\r\n } else {\r\n res = parseFloat(res).toFixed(decimalAmount[dataTypeDecimalName]);\r\n }\r\n } else {\r\n if (decimalScale != null) {\r\n res = parseFloat(res).toFixed(decimalScale) + \"\";\r\n } else {\r\n res = parseFloat(res).toFixed(decimalAmount[dataTypeDecimalName]) + \"\";\r\n }\r\n }\r\n }\r\n\r\n const floatRes = parseFloat(res);\r\n\r\n //Here we change the decimal and thousands separators.\r\n if (res.includes(\".\")) {\r\n res = res.split(\".\");\r\n if (thousandSeparator === \".\") {\r\n res = parseInt(res[0]).toLocaleString(\"es-ES\") + decimalSeparator + res[1];\r\n } else {\r\n res = parseInt(res[0]).toLocaleString(\"en-US\") + decimalSeparator + res[1];\r\n }\r\n } else {\r\n if (thousandSeparator === \".\") {\r\n res = parseInt(res).toLocaleString(\"es-ES\");\r\n } else {\r\n res = parseInt(res).toLocaleString(\"en-US\");\r\n }\r\n }\r\n\r\n //If value is a 4 digit number we have to manually add a thousand separator\r\n if (\r\n (res.includes(decimalSeparator) && res.split(decimalSeparator)[0].length === 4) ||\r\n (!res.includes(decimalSeparator) && res.length === 4)\r\n ) {\r\n res = res.split(\"\")[0] + thousandSeparator + res.substr(1, res.length);\r\n }\r\n\r\n if (isNaN(floatRes)) return \"*****\";\r\n if (isNegative && floatRes != 0 && !removeZeros) res = \"-\" + res;\r\n if (isNegative && floatRes != 0 && removeZeros) res = \"-\" + removeZeroesInDecimals(res);\r\n if (!isNegative && removeZeros) return removeZeroesInDecimals(res);\r\n return res;\r\n};\r\n\r\nexport const FormattedNumber = ({\r\n value,\r\n dataTypeDecimalName = \"default\",\r\n decimalScale = null,\r\n removeZeros,\r\n}) => {\r\n //decimalScale = null;\r\n removeZeros = true;\r\n return (\r\n \r\n {formattedNumber(value, dataTypeDecimalName, decimalScale, removeZeros) == \"NaN\"\r\n ? \"-\"\r\n : formattedNumber(value, dataTypeDecimalName, decimalScale, removeZeros)}\r\n \r\n );\r\n};\r\n\r\nexport const removeZeroesInDecimals = (value) => {\r\n try {\r\n const regexString =\r\n decimalSeparator === \",\"\r\n ? /^([\\d.]+)$|^([\\d.]+)\\,0*$|^([\\d.]+\\,[0-9]*?)0*$/\r\n : /^([\\d,]+)$|^([\\d,]+)\\.0*$|^([\\d,]+\\.[0-9]*?)0*$/;\r\n\r\n return value.toString().replace(regexString, \"$1$2$3\");\r\n } catch (err) {\r\n return value;\r\n }\r\n};\r\n","import React from \"react\";\r\nimport { FormGroup, Label, Input, Spinner, Badge, CustomInput } from \"reactstrap\";\r\nimport { NumberFormatInput } from \"../NumberFormatInput/NumberFormatInput\";\r\nimport classnames from \"classnames\";\r\nimport { Autosuggest, CircularProgress } from \"..\";\r\nimport style from \"./styles.module.scss\";\r\n\r\nexport const FormNumber = ({\r\n name,\r\n label,\r\n changedColor = false,\r\n value,\r\n onChange,\r\n error,\r\n disabled,\r\n decimalScale,\r\n dataTypeDecimalName,\r\n ...rest\r\n}) => {\r\n return (\r\n \r\n \r\n {label}\r\n \r\n onChange(name, e.value)}\r\n decimalScale={decimalScale}\r\n dataTypeDecimalName={dataTypeDecimalName}\r\n {...rest}\r\n />\r\n
    \r\n {error}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport const FormCheck = ({\r\n name,\r\n label,\r\n changedColor = false,\r\n className = \"\",\r\n value,\r\n onChange,\r\n disabled,\r\n}) => (\r\n \r\n);\r\n\r\nexport const Suggest = ({\r\n name,\r\n label,\r\n changedColor = false,\r\n valueId,\r\n valueName,\r\n fieldId,\r\n fieldName,\r\n fieldExtension,\r\n getSelectItemId,\r\n getSelectItemName,\r\n getSelectItemExtension,\r\n service,\r\n onChange,\r\n error,\r\n disabled,\r\n}) => {\r\n const fetchSearch = ({ value }) => {\r\n return service({\r\n text: value,\r\n length: 10,\r\n type: \"\",\r\n })\r\n .then((res) => res.response || res)\r\n .then((res) => res[Object.keys(res)[0]])\r\n .then((values) => values);\r\n };\r\n\r\n const internalOnChange = (method, nextValue) => {\r\n const value = {\r\n [fieldId]: null,\r\n [fieldName]: \"\",\r\n };\r\n if (fieldExtension) {\r\n value[fieldExtension] = \"\";\r\n }\r\n if (method != \"type\" && getSelectItemId(nextValue)) {\r\n value[fieldId] = getSelectItemId(nextValue);\r\n value[fieldName] = getSelectItemName(nextValue);\r\n if (fieldExtension) {\r\n value[fieldExtension] = getSelectItemExtension(nextValue);\r\n }\r\n }\r\n onChange(name, value);\r\n };\r\n\r\n return (\r\n \r\n {label && (\r\n \r\n {label}\r\n \r\n )}\r\n (\r\n
    \r\n {getSelectItemName(suggestion)}\r\n
    \r\n )}\r\n getSuggestionValue={getSelectItemName}\r\n onSuggestionsFetchRequested={fetchSearch}\r\n value={valueName || \"\"}\r\n inputProps={{\r\n placeholder: label,\r\n invalid: !!error,\r\n disabled,\r\n }}\r\n onChange={(m, v) => internalOnChange(m, v)}\r\n />\r\n
    \r\n {error}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport function FormSelect({\r\n label,\r\n changedColor = false,\r\n value,\r\n name,\r\n disabled = false,\r\n onChange = () => {},\r\n selectItems,\r\n getSelectItemId,\r\n getSelectItemName,\r\n error,\r\n description,\r\n}) {\r\n const getValueFromId = (id) => {\r\n for (let i = 0; i < selectItems.length; i += 1) {\r\n if (String(getSelectItemId(selectItems[i])) === String(id)) {\r\n return getSelectItemName(selectItems[i]);\r\n }\r\n }\r\n return \"\";\r\n };\r\n\r\n const isEmpty = (value) => value === undefined || value === \"\";\r\n\r\n return (\r\n \r\n \r\n {label}\r\n \r\n onChange(name, e.target.value, getValueFromId(e.target.value))}\r\n >\r\n {(value === undefined || value === \"\" || value === -1) && (\r\n \r\n )}\r\n {selectItems.map((s) => (\r\n \r\n ))}\r\n \r\n
    \r\n {error}\r\n
    \r\n {!error && description && (\r\n
    \r\n {description}\r\n
    \r\n )}\r\n
    \r\n );\r\n}\r\nexport const LoadingField = ({ label }) => (\r\n \r\n \r\n
    \r\n \r\n Loading values\r\n
    \r\n
    \r\n);\r\n\r\nexport const LoadingMessage = ({ text }) => (\r\n
    \r\n \r\n {text}\r\n
    \r\n);\r\n\r\nexport const Status = ({ status }) => {\r\n return (\r\n \r\n {status.toUpperCase()}\r\n \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"filterDropdown\":\"DropDowFunds-module_filterDropdown_1iK7o\",\"dropdown\":\"DropDowFunds-module_dropdown_1Q8c-\",\"menu\":\"DropDowFunds-module_menu_36lna\"};","import React, { useEffect, useState } from \"react\";\r\nimport {\r\n FormGroup,\r\n Label,\r\n DropdownMenu,\r\n DropdownToggle,\r\n DropdownItem,\r\n UncontrolledDropdown,\r\n Input,\r\n} from \"reactstrap\";\r\n\r\nimport style from \"./DropDowFunds.module.scss\";\r\n\r\nconst DropDownFunds = ({ funds, name, disabled, label, value, empty, onChange, allFunds }) => {\r\n const getNameFunds = (id) => {\r\n const name = funds.filter((f) => f.Id === id);\r\n if (name && name[0]) return name[0].Value;\r\n else return \"All funds\";\r\n };\r\n\r\n useEffect(() => {\r\n if (empty === undefined && value === 0 && funds[0]) {\r\n onChange(name, funds[0].Id);\r\n }\r\n }, []);\r\n\r\n return (\r\n
    \r\n \r\n {label && value != \"3\" && (\r\n \r\n Fund\r\n \r\n )}\r\n\r\n {!disabled ? (\r\n \r\n \r\n {getNameFunds(value)}\r\n \r\n\r\n \r\n {allFunds && (\r\n onChange(name, -1)}\r\n style={{ backgroundColor: value === -1 ? \"#97a6ad\" : \"inherit\" }}\r\n >\r\n All funds\r\n \r\n )}\r\n {funds.map((key, index) => (\r\n onChange(name, key.Id)}\r\n style={{ backgroundColor: value === key.Id ? \"#97a6ad\" : \"inherit\" }}\r\n >\r\n {key.Value}\r\n \r\n ))}\r\n \r\n \r\n ) : (\r\n value !== \"3\" && \r\n )}\r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default DropDownFunds;\r\n","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { Button, Table, UncontrolledDropdown, DropdownToggle, DropdownItem, DropdownMenu } from \"reactstrap\";\r\nimport { CircularProgress } from \"../../..\";\r\nimport InfiniteScroll from \"react-infinite-scroller\";\r\nimport style from \"./styles.module.scss\";\r\nimport ModalStatus from \"../Modals/ModalStatus\";\r\nimport ModalClone from \"../Modals/ModalClone\";\r\nimport { Status } from \"../Controls\";\r\nimport { AssetStatus } from \"../types\";\r\nimport HistoryDefault from \"../../Modal/HistoryDefault/HistoryDefault\";\r\nimport { FormattedDate } from \"react-intl\";\r\n\r\nconst Grid = ({\r\n grid,\r\n getAssets,\r\n getHistory,\r\n clone,\r\n Link,\r\n changeStatus,\r\n role,\r\n actions,\r\n toggleActions,\r\n getContractcLosingLeg,\r\n filterActions,\r\n}) => {\r\n const [modalStatus, setModalStatus] = useState(false);\r\n const [modalClone, setModalClone] = useState(false);\r\n const [modalHistory, setModalHistory] = useState(false);\r\n\r\n const handleAction = (action, { id, item }) => {\r\n if (action == \"delete\") {\r\n changeStatus({ assetId: id, nextStatus: AssetStatus.Deleted });\r\n } else if (action == \"clone\") {\r\n setModalClone({ item });\r\n } else if (action == \"status\") {\r\n setModalStatus({ item });\r\n } else if (action == \"history\") {\r\n setModalHistory({ process: \"Asset\", processId: id });\r\n }\r\n };\r\n\r\n const hasActions = (asset) => {\r\n let result = false;\r\n actions.forEach((action) => {\r\n if (filterActions(asset, action.name)) {\r\n result = true;\r\n }\r\n });\r\n return result;\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n
    \r\n }\r\n loadMore={getAssets}\r\n hasMore={grid.hasMore}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {grid.assets == null || grid.assets.length == 0 ? (\r\n \r\n ) : (\r\n grid.assets.map((asset) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))\r\n )}\r\n \r\n
    NameShort NameCodeStatusActive DateModified Date
    \r\n \r\n #{asset.AssetId}\r\n {asset.AssetTicker}\r\n \r\n \r\n {asset.AssetName}\r\n \r\n {asset.AssetISIN}\r\n \r\n \r\n \r\n {asset.AssetStatus == AssetStatus.Active && (\r\n \r\n )}\r\n \r\n \r\n \r\n {actions && hasActions(asset) && (\r\n \r\n )}\r\n
    \r\n \r\n\r\n {modalStatus && (\r\n setModalStatus(false)}\r\n />\r\n )}\r\n {modalClone && (\r\n setModalClone(false)} />\r\n )}\r\n {modalHistory && (\r\n setModalHistory(false)}\r\n />\r\n )}\r\n
    \r\n );\r\n};\r\n\r\nconst EmptyTable = ({ loading }) => (\r\n \r\n \r\n {loading ? :

    No funds

    }\r\n \r\n \r\n);\r\n\r\nconst FormattedDateWithEmpty = ({ value }) =>\r\n value == \"0000-00-00T00:00:00\" || value === null ? null : ;\r\n\r\nconst Actions = ({ actions, asset, toggleModal, filterActions }) => {\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n {actions.map((a, index) => {\r\n if (filterActions) {\r\n const filtrado = filterActions(asset, a.name);\r\n if (filterActions && filtrado) {\r\n return !a.loading ? (\r\n toggleModal(asset, a.name)}>\r\n {a.name}\r\n \r\n ) : (\r\n \r\n );\r\n }\r\n } else {\r\n return (\r\n toggleModal(asset, a.name)}>\r\n {a.name}\r\n \r\n );\r\n }\r\n })}\r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default Grid;\r\n","import React, { useCallback, useState, useEffect } from \"react\";\r\nimport style from \"./styles.module.scss\";\r\nimport {\r\n Col,\r\n Row,\r\n Button,\r\n Input,\r\n InputGroup,\r\n DropdownMenu,\r\n DropdownToggle,\r\n DropdownItem,\r\n UncontrolledDropdown,\r\n Spinner,\r\n} from \"reactstrap\";\r\nimport { debounce } from \"../../../utils/Helper\";\r\nimport { AssetStatus } from \"../types\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\n\r\nconst Toolbar = ({\r\n onChange: rootOnChange,\r\n subClasses,\r\n filter: rootFilter,\r\n counters,\r\n Link,\r\n role,\r\n searchAsset,\r\n fromPage,\r\n}) => {\r\n const [filters, setFilters] = useState(rootFilter);\r\n\r\n const debounceCallback = useCallback(\r\n debounce((nextValues) => rootOnChange(nextValues), 500),\r\n []\r\n );\r\n\r\n const onChange = (fields) => {\r\n const nextValues = {\r\n ...filters,\r\n ...fields,\r\n };\r\n debounceCallback(nextValues);\r\n setFilters(nextValues);\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n \r\n
    \r\n\r\n onChange({ text: e.target.value })}\r\n />\r\n
    \r\n \r\n\r\n \r\n
    \r\n {/* {subClasses ? (\r\n \r\n ) : (\r\n \r\n )*/}\r\n\r\n \r\n\r\n searchAsset()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Search\r\n \r\n\r\n {/* {role == \"advisor\" ? (\r\n
    \r\n ) : (\r\n \r\n )} */}\r\n
    \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nconst Counter = ({ total, fromPage }) => (\r\n
    \r\n
    \r\n {\" \"}\r\n {fromPage != \"funds\" ? \"Assets:\" : \"Funds:\"} {total}\r\n
    \r\n
    \r\n);\r\n/*\r\nconst DropDownFilterSubClass = ({ value, items, onChange }) => (\r\n \r\n \r\n {!value ? \"All Subclasses\" : items.find((e) => e.SubAssetClassId == value).SubAssetClassName}\r\n \r\n \r\n onChange({ subAssetClass: 0 })}>\r\n {\"All Subclasses\"}\r\n \r\n {items.map((item) => (\r\n onChange({ subAssetClass: item.SubAssetClassId })}\r\n >\r\n {item.SubAssetClassName}\r\n \r\n ))}\r\n \r\n \r\n);*/\r\n\r\nconst DropDownFilterStatus = ({ value, onChange }) => (\r\n \r\n \r\n {value == \"\" ? \"All Statusses\" : value}\r\n \r\n \r\n onChange({ status: \"\" })}>\r\n {\"All Statusses\"}\r\n \r\n {Object.values(AssetStatus).map((status) => (\r\n onChange({ status: status })}>\r\n {status}\r\n \r\n ))}\r\n \r\n \r\n);\r\n\r\nexport default Toolbar;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"grid\":\"styles-module_grid_3IJPS\",\"dropdown\":\"styles-module_dropdown_2C6hJ\",\"actions\":\"styles-module_actions_2akRf\",\"toolbar\":\"styles-module_toolbar_26Roz\",\"menu\":\"styles-module_menu_3vch1\",\"export\":\"styles-module_export_3WKqN\",\"totals\":\"styles-module_totals_3z2Ab\",\"empty\":\"styles-module_empty_1gZVr\"};","import React, { useState } from \"react\";\r\n\r\nimport LaddaButton, { SLIDE_LEFT } from \"react-ladda\";\r\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter, Alert } from \"reactstrap\";\r\n\r\nconst CloneStatus = {\r\n Waiting: \"Waiting\",\r\n Cloning: \"Cloning\",\r\n Error: \"Error\",\r\n};\r\n\r\nconst ModalClone = ({ open, toggle, item, clone }) => {\r\n const [alert, setAlert] = useState(false);\r\n const [status, setStatus] = useState(CloneStatus.Waiting);\r\n\r\n const handleConfirm = () => {\r\n let cloneResult = { success: false };\r\n setStatus(CloneStatus.Cloning);\r\n clone({ id: item.AssetId })\r\n .then(({ result, newId }) => {\r\n if (result.Code == 200) {\r\n cloneResult = { success: true, newId };\r\n } else {\r\n setStatus(CloneStatus.Error);\r\n setAlert(result.Description);\r\n }\r\n return cloneResult;\r\n })\r\n .catch((e) => {\r\n setStatus(CloneStatus.Error);\r\n setAlert(e.message);\r\n return cloneResult;\r\n });\r\n };\r\n return (\r\n \r\n Asset clone confirmation\r\n \r\n {status === CloneStatus.Error && {alert}}\r\n

    \r\n Are you sure you want to clone{\" \"}\r\n \r\n {item.AssetISIN}\r\n {\" - \"}\r\n {item.AssetTicker}\r\n \r\n ?\r\n

    \r\n
    \r\n \r\n \r\n \r\n Confirm\r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default ModalClone;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport {\r\n Button,\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Container,\r\n Row,\r\n Col,\r\n Table,\r\n Alert,\r\n Label,\r\n Input,\r\n} from \"reactstrap\";\r\nimport style from \"./styles.module.scss\";\r\nimport { Status, FormSelect, FormNumber } from \"../Controls\";\r\nimport LaddaButton, { SLIDE_LEFT } from \"react-ladda\";\r\nimport { AssetStatus } from \"../types\";\r\nimport { NumberFormatInput } from \"../../NumberFormatInput/NumberFormatInput\";\r\nimport { toFormatDate } from \"../../../utils\";\r\n\r\nconst ModalStatus = ({ open, toggle, item, changeStatus, getContractcLosingLeg }) => {\r\n const [alert, setAlert] = useState(false);\r\n const [loading, setLoading] = useState(false);\r\n const [nextStatus, setNextStatus] = useState(item.AssetStatus);\r\n const [contractClosingLeg, setContractClosingLeg] = useState();\r\n const [alreadyLoaded, setAlreadyLoaded] = useState(false);\r\n const [alreadyConfirmed, setAlreadyConfirmed] = useState(false);\r\n const [contractClosingLegModified, setContractClosingLegModified] = useState(false);\r\n const [showClosingLeg, setShowClosingLeg] = useState(false);\r\n const initialDate = toFormatDate(new Date());\r\n const [maturityDate, setMaturityDate] = useState();\r\n\r\n useEffect(() => {\r\n if (open) {\r\n setAlert(false);\r\n setLoading(false);\r\n getClosingLeg();\r\n setMaturityDate(initialDate);\r\n }\r\n }, [open]);\r\n\r\n const getClosingLeg = () => {\r\n if (!alreadyLoaded) {\r\n setAlreadyLoaded(true);\r\n getContractcLosingLeg(item.AssetId).then((res) => {\r\n if (res) {\r\n res.ContractClosingLeg != 0\r\n ? (setContractClosingLeg(res.ContractClosingLeg), setShowClosingLeg(true))\r\n : (setContractClosingLeg(0), setShowClosingLeg(false));\r\n }\r\n });\r\n }\r\n };\r\n\r\n const handleChangeStatus = () => {\r\n if (nextStatus == \"Matured\" && contractClosingLegModified) {\r\n let confirmation = confirm(\"Are you sure you want to change the closing value?\");\r\n if (confirmation) {\r\n confirmChangeStatus(contractClosingLeg);\r\n }\r\n } else {\r\n setLoading(true);\r\n setAlert(false);\r\n confirmChangeStatus();\r\n }\r\n };\r\n\r\n const confirmChangeStatus = (closingLeg) => {\r\n changeStatus({\r\n assetId: item.AssetId,\r\n nextStatus,\r\n closingleg: closingLeg,\r\n maturityDate: maturityDate,\r\n })\r\n .then((res) => res.result)\r\n .then((result) => {\r\n setLoading(false);\r\n if (result.Code == 200) {\r\n toggle();\r\n } else {\r\n setAlert(result.Description);\r\n }\r\n });\r\n };\r\n\r\n const quantityOnClick = (e) => {\r\n setContractClosingLegModified(true);\r\n e != \"\" ? setContractClosingLeg(e.target.value) : \"\";\r\n };\r\n\r\n const dateOnClick = (e) => {\r\n setMaturityDate(e);\r\n };\r\n\r\n return (\r\n \r\n Change asset status\r\n \r\n \r\n \r\n \r\n {item.AssetTicker}\r\n \r\n \r\n Current status\r\n \r\n \r\n \r\n \r\n \r\n i.id}\r\n getSelectItemName={(i) => i.description}\r\n value={nextStatus}\r\n onChange={(name, value) => {\r\n setNextStatus(value), setAlreadyLoaded(false), setAlreadyConfirmed(false);\r\n }}\r\n />\r\n {showClosingLeg && nextStatus == \"Matured\" && (\r\n
    \r\n \r\n {\r\n quantityOnClick(e);\r\n }}\r\n dataTypeDecimalName=\"quantity\"\r\n />\r\n
    \r\n )}\r\n {nextStatus == \"Matured\" && item.AssetStatus != \"Matured\" && (\r\n
    \r\n \r\n {\r\n dateOnClick(e.target.value);\r\n }}\r\n />\r\n
    \r\n )}\r\n {\"\"}\r\n {alert && (\r\n \r\n {alert.split(\".\").map((line, index) => (\r\n \r\n {line}.\r\n \r\n ))}\r\n \r\n )}\r\n \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n Change Status\r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nconst AssetStatusValues = Object.entries(AssetStatus).map(([key, value]) => ({\r\n id: key,\r\n description: value,\r\n}));\r\n\r\nexport default ModalStatus;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"styles-module_modal_pf-IZ\",\"container\":\"styles-module_container_131bb\"};","import Grid from \"./Grid/Grid\";\r\nimport Toolbar from \"./Grid/Toolbar\";\r\n\r\nexport { Grid, Toolbar };\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"card\":\"styles-module_card_zq4Ky\",\"body\":\"styles-module_body_fxWEV\",\"loadingMessage\":\"styles-module_loadingMessage_1dAgt\",\"status\":\"styles-module_status_zmScb\",\"inprocess\":\"styles-module_inprocess_1wQks\",\"active\":\"styles-module_active_1Ng_3\",\"inactive\":\"styles-module_inactive_3KCzU\",\"payments\":\"styles-module_payments_3MO6S\",\"checkBox\":\"styles-module_checkBox_3R6Mf\",\"highlight\":\"styles-module_highlight_2KS3f\",\"customCheckChanged\":\"styles-module_customCheckChanged_1OB-S\",\"alignRight\":\"styles-module_alignRight_2C9CW\",\"alignCenter\":\"styles-module_alignCenter_2cD0j\",\"column20\":\"styles-module_column20_VOIM5\",\"column10\":\"styles-module_column10_2iVNR\",\"styleDetails\":\"styles-module_styleDetails_24IDZ\",\"date\":\"styles-module_date_UHUvp\",\"contractDetailsWrapper\":\"styles-module_contractDetailsWrapper_31Y07\",\"leg\":\"styles-module_leg_2BK0G\",\"opening\":\"styles-module_opening_2AK-I\",\"closing\":\"styles-module_closing_37mMN\",\"couponPaymentsLink\":\"styles-module_couponPaymentsLink_rn4GR\",\"paymentsTotal\":\"styles-module_paymentsTotal_1yEzb\",\"btnDenominations\":\"styles-module_btnDenominations_35AwK\"};","export const TabName = {\r\n General: \"General\",\r\n Structure: \"Structure\",\r\n Payments: \"Payments\",\r\n Tax: \"Tax\",\r\n Groups: \"Groups\",\r\n Sinonyms: \"Sinonyms\",\r\n Currency: \"Currency\",\r\n Quotes: \"Quotes\",\r\n Agencies: \"Agencies\",\r\n Portfolios: \"Portfolios\",\r\n Denominations: \"Denominations\",\r\n Fundamentals: \"Fundamentals\",\r\n};\r\n\r\nexport const DayCountFractions = {\r\n ACTISDA: \"ACTISDA\",\r\n ACT365: \"ACT365\",\r\n ACT360: \"ACT360\",\r\n ACTISMA: \"ACTISMA\",\r\n ACTAFB: \"ACTAFB\",\r\n BOND30360: \"BOND30360\",\r\n EU30360: \"30E/360\",\r\n ISDA30360: \"30E/360 (ISDA)\",\r\n BOND30365: \"BOND30365\",\r\n ACTPY: \"ACTPY\",\r\n};\r\n\r\nexport const PaymentBase = {\r\n Days: \"Days\",\r\n Weeks: \"Weeks\",\r\n Months: \"Months\",\r\n Years: \"Years\",\r\n};\r\n\r\nexport const PaymentFormula = {\r\n InterestRate: \"Interest Rate\",\r\n ZeroCoupon: \"Zero Coupon\",\r\n Dividend: \"Dividend\",\r\n DiscountSimple: \"Discount Simple\",\r\n DiscountCompound: \"Discount Compound\",\r\n EffectiveRate: \"Effective Rate\",\r\n None: \"None\",\r\n};\r\n\r\nexport const IndexType = {\r\n None: \"None\",\r\n OnlyPrincipal: \"Only Principal\",\r\n OnlyPayments: \"Only Payments\",\r\n PrincipalAndPayments: \"Principal And Payments\",\r\n};\r\n\r\nexport const CallPut = {\r\n Call: \"Call\",\r\n Put: \"Put\",\r\n};\r\n\r\nexport const IssuanceType = {\r\n Global: \"Global\",\r\n Local: \"Local\",\r\n Foreign: \"Foreign\",\r\n};\r\n\r\nexport const SectorType = {\r\n Sovereign: \"Sovereign\",\r\n Public: \"Public\",\r\n Private: \"Private\",\r\n};\r\n\r\nexport const OfferType = {\r\n Public: \"Public\",\r\n Private: \"Private\",\r\n};\r\n\r\nexport const PaymentRateType = {\r\n Fixed: \"Fixed\",\r\n Variable: \"Variable\",\r\n};\r\n\r\nexport const FundType = {\r\n Open: \"Open\",\r\n Close: \"Close\",\r\n};\r\n\r\nexport const YesNo = {\r\n Yes: 1,\r\n No: 0,\r\n};\r\n\r\nexport const QuotingType = {\r\n Units: \"Units\",\r\n Percentage: \"Percentage\",\r\n Contracts: \"Contracts\",\r\n};\r\n\r\nexport const Mode = {\r\n Insert: \"INS\",\r\n Update: \"UPD\",\r\n Delete: \"DLT\",\r\n};\r\n\r\nexport const WizzMode = {\r\n New: \"new\",\r\n Edit: \"edit\",\r\n View: \"view\",\r\n Quotes: \"quotes\",\r\n};\r\n\r\nexport const Decimals = {\r\n 0: \"0\",\r\n 1: \"1\",\r\n 2: \"2\",\r\n 3: \"3\",\r\n 4: \"4\",\r\n 5: \"5\",\r\n 6: \"6\",\r\n 7: \"7\",\r\n 8: \"8\",\r\n};\r\n\r\nexport const TaxType = {\r\n VAT: \"VAT\",\r\n INCOME: \"INCOME\",\r\n MARKETWTAX: \"MARKETWTAX\",\r\n};\r\n\r\nexport const SinkType = {\r\n Face: \"Original face\",\r\n Remaining: \"Remaining\",\r\n};\r\n\r\nexport const AssetStatus = {\r\n Active: \"Active\",\r\n Inactive: \"Inactive\",\r\n InProcess: \"InProcess\",\r\n Deleted: \"Deleted\",\r\n Blocked: \"Blocked\",\r\n Matured: \"Matured\",\r\n};\r\n\r\nexport const DPEditing = {\r\n None: \"None\",\r\n Both: \"Both\",\r\n OnlyValue: \"OnlyValue\",\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"badge\":\"IO-module_badge_31MpW\",\"deposit\":\"IO-module_deposit_1_KXL\",\"withdraw\":\"IO-module_withdraw_40CSf\",\"transfer\":\"IO-module_transfer_1IYZT\",\"bold\":\"IO-module_bold_1HgbJ\",\"status\":\"IO-module_status_3-C2c\",\"color1\":\"IO-module_color1_1FcGw\",\"color2\":\"IO-module_color2_2J_hO\",\"color3\":\"IO-module_color3_2PvJ_\",\"color4\":\"IO-module_color4_3Fcqz\",\"color5\":\"IO-module_color5_2kHbv\",\"color6\":\"IO-module_color6_1I37r\",\"detail\":\"IO-module_detail__mLrv\",\"side\":\"IO-module_side_25r5m\"};","import React from \"react\";\r\nimport style from \"./IO.module.scss\";\r\nimport * as ItemUI from \"./Item\";\r\nimport { IOType, IOMode } from \"./types\";\r\n\r\nexport default class InlineDetail extends React.Component {\r\n render() {\r\n const { io } = this.props;\r\n\r\n return (\r\n
    \r\n {ItemUI.IOType(io.IOType)}{\" \"}\r\n {io.IOMode == IOMode.MultipleAssets || (io.IOType == IOType.Transfer && io.items.length > 1) ? (\r\n {\"{Multiple securities}\"}\r\n ) : (\r\n ItemUI.Symbol(io.items[0])\r\n )}{\" \"}\r\n {ItemUI.Account(io)} {ItemUI.BankAccount(io)}\r\n
    \r\n );\r\n }\r\n}\r\n","import React from \"react\";\r\nimport { Badge } from \"reactstrap\";\r\nimport style from \"./IO.module.scss\";\r\nimport { TransactionStatus, IOType as TIOType, IOTransferType } from \"./types\";\r\nimport { FormattedNumber } from \"../FormattedNumber/FormattedNumber\";\r\nimport { renderOrderStatus } from \"../Order/Item\";\r\n\r\nconst IOType = (ioType) => (\r\n {ioType.toUpperCase()}\r\n);\r\n\r\nconst Status = (status) => renderOrderStatus({ OrderStatus: status });\r\n\r\n/* quantity */\r\nconst Quantity = (quantity) => (\r\n \r\n \r\n \r\n);\r\n\r\n/* symbol */\r\nconst Symbol = ({ IsCurrency, AssetTicker, CurrencyISO }) => (\r\n {IsCurrency ? CurrencyISO : AssetTicker}\r\n);\r\n\r\nconst LocalOrINTL = (local) => (\r\n \r\n {local ? \"Local\" : \"INTL\"}\r\n \r\n);\r\n\r\nconst Account = (transaction, opsViewAccountName) => {\r\n if (transaction.IOType == TIOType.Transfer) {\r\n return(\r\n \r\n {opsViewAccountName == undefined ? \r\n (\r\n transaction.transfersendingName + \" \" + transaction.transfersendingNumber + \"/\" + transaction.transferreceivingName + \" \" + transaction.transferreceivingNumber\r\n )\r\n :\r\n (\r\n opsViewAccountName ?\r\n (\r\n transaction.transfersendingName + \" \" + transaction.transfersendingNumber + \"/\" + transaction.transferreceivingName + \" \" + transaction.transferreceivingNumber\r\n )\r\n :\r\n (\r\n transaction.transfersendingNumber + \"/\" + transaction.transferreceivingNumber\r\n )\r\n )\r\n }\r\n \r\n )\r\n }\r\n else{\r\n return (\r\n \r\n {opsViewAccountName == undefined ? \r\n (\r\n transaction.items[0].AccountName + \"/\" + transaction.items[0].AccountNumber\r\n )\r\n :\r\n (\r\n opsViewAccountName ?\r\n (\r\n transaction.items[0].AccountName + \"/\" + transaction.items[0].AccountNumber\r\n )\r\n :\r\n (\r\n transaction.items[0].AccountNumber\r\n )\r\n )\r\n }\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n {opsViewAccountName && transaction.items[0].AccountName}\r\n {\"/\"}\r\n {transaction.items[0].AccountNumber}\r\n \r\n );\r\n};\r\n\r\nconst BankAccount = (transaction) => {\r\n if (\r\n (transaction.IOType == TIOType.Deposit && transaction.items[0].IsCurrency) ||\r\n (transaction.IOType == TIOType.Withdraw && transaction.items[0].IsCurrency)\r\n ) {\r\n return (\r\n \r\n [\r\n {transaction.items[0].TransferType == IOTransferType.Transfer\r\n ? `${transaction.items[0].BankAccountName} - ${transaction.items[0].BankAccountNumber}`\r\n : `${transaction.items[0].TransferType}`}\r\n ]\r\n \r\n );\r\n }\r\n\r\n return null;\r\n};\r\n\r\nconst Product = (transaction) => {\r\n if (transaction.IOType == TIOType.Transfer && transaction.items.length > 1) {\r\n return \"-\";\r\n }\r\n\r\n return transaction.items[0].IsCurrency ? \"CASH\" : \"ASSET\";\r\n};\r\n\r\nexport { IOType, Status, Quantity, Symbol, Account, BankAccount, Product, LocalOrINTL };\r\n","import { getStatusName } from \"../../utils/Order/Order\"\r\n\r\nexport const TransactionStatus = {\r\n\tROUTED: 'PendingNew',\r\n\tFILLED: 'Filled',\r\n\tCANCEL_PENDING: 'PendingCancel',\r\n\tCANCELED: 'Canceled',\r\n\tREJECTED: 'Rejected',\r\n\tAMENDING: 'PendingReplace',\r\n\tACKED: 'New',\r\n\tPARKED: 'Parked',\r\n\tAUTH_WAIT: 'WaitingAuthorization'\r\n}\r\n\r\nexport const IOType = {\r\n Deposit: 'Deposit',\r\n Withdraw: 'Withdraw',\r\n Transfer: 'Transfer',\r\n Redemption: \"Redemption\",\r\n Subscription: \"Subscription\"\r\n}\r\n\r\nexport const IOMode = {\r\n Simple: 'Simple',\r\n MultipleAccounts: 'Multiple Accounts',\r\n MultipleAssets: 'Multiple Assets'\r\n}\r\n\r\nexport const TransferType = {\r\n Client: 'Client',\r\n Custodian: 'Custodian',\r\n PropClient: 'PropClient'\r\n}\r\n\r\nexport const CurrencyAsset = {\r\n Cash: 'Cash',\r\n Asset: 'Asset'\r\n}\r\n\r\nexport const ContextType = {\r\n Local: 'Local',\r\n INTL: 'INTL'\r\n}\r\n\r\nexport const IOTransferType = {\r\n Cash: 'Cash',\r\n Transfer: 'Transfer',\r\n Cheque: 'Cheque'\r\n}\r\n\r\n/** Selectors */\r\n\r\nexport const getIOTypeName = (iotype) => {\r\n return iotype;\r\n}\r\n\r\nexport const getIOProcessName = (io) => {\r\n if (io.IOType != IOType.Transfer) {\r\n if (io.IOMode == io.MultipleAccounts) {\r\n return `Bulk${io.IOType}`\r\n }\r\n }\r\n\r\n return `${io.IOType}`\r\n}\r\n\r\nexport const getTransactionStatusName = (iostatus) => getStatusName(iostatus);","import { object } from \"prop-types\";\r\nimport { TransactionStatus, IOMode, IOType } from \"./types\";\r\n\r\nexport function formatIOforUpdate(originalIO) {\r\n // copy item header to items in withdrawals and deposit\r\n let io = { ...originalIO };\r\n\r\n io.items = io.items.map((item) => {\r\n // add IOType for item\r\n item.IOType = io.IOType;\r\n // copy header props to item\r\n const {\r\n Denominations,\r\n Quantity,\r\n CurrencyId,\r\n CurrencyISO,\r\n AssetId,\r\n AssetTicker,\r\n Correlative,\r\n IsCurrency,\r\n Price,\r\n } = item;\r\n item = Object.assign({}, io.itemsHeader, {\r\n Id: io.Id,\r\n Correlative,\r\n Quantity,\r\n Denominations,\r\n CurrencyId,\r\n CurrencyISO,\r\n AssetId,\r\n AssetTicker,\r\n Price: io.itemsHeader.Price,\r\n });\r\n\r\n // Transfers allow currencies mixed with assets, require use item attribute IsCurrency\r\n if (io.IOType == IOType.Transfer) {\r\n item.IsCurrency = IsCurrency;\r\n item.Price = Price;\r\n }\r\n\r\n return item;\r\n });\r\n\r\n // remove redundant property\r\n delete io.itemsHeader;\r\n\r\n return io;\r\n}\r\n\r\nexport const getNextIOStatus = ({ io, column, action }) => {\r\n let nextStatus;\r\n\r\n // Is from trader desk move io throw columns\r\n if (column) {\r\n switch (column) {\r\n case \"todo\":\r\n nextStatus = TransactionStatus.ROUTED;\r\n break;\r\n\r\n case \"working\":\r\n nextStatus = TransactionStatus.ACKED;\r\n break;\r\n\r\n case \"completed\":\r\n nextStatus = TransactionStatus.FILLED;\r\n break;\r\n }\r\n } else {\r\n switch (action) {\r\n case \"ack\":\r\n nextStatus = TransactionStatus.ACKED;\r\n break;\r\n case \"cancel\":\r\n nextStatus = TransactionStatus.CANCELED;\r\n break;\r\n }\r\n }\r\n return nextStatus;\r\n};\r\n","import React, { useState, Fragment } from \"react\";\r\nimport {\r\n Col,\r\n Row,\r\n Card,\r\n CardHeader,\r\n CardBody,\r\n Label,\r\n Form,\r\n FormGroup,\r\n Input,\r\n Spinner,\r\n Badge,\r\n CustomInput,\r\n} from \"reactstrap\";\r\n\r\nimport style from \"./MainCard.module.scss\";\r\n\r\nexport const MainCard = ({ title, children }) => (\r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n);\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"card\":\"MainCard-module_card_3nvfD\",\"cardHeader\":\"MainCard-module_cardHeader_375Wa\",\"label\":\"MainCard-module_label_32KNE\"};","import React from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport { Row, Col, Spinner } from \"reactstrap\";\r\nimport HoldersTab from \"./Items/Account/HoldersTab\";\r\nimport QuestionsTab from \"./Items/Account/QuestionsTab\";\r\nimport KYCTab from \"./Items/Account/KYCTab\";\r\nimport DocumentsTab from \"./Items/Account/DocumentsTab\";\r\nimport InvestmentProfileTab from \"./Items/Account/InvestmentProfileTab\";\r\nimport ProfileTab from \"./Items/Account/ProfileTab\";\r\nimport SignatureSetsTab from \"./Items/Account/SignatureSetsTab\";\r\nimport PersonalReferencesTab from \"./Items/Account/PersonalReferencesTab\";\r\nimport BankAccountsTab from \"./Items/Account/BankAccountsTab\";\r\nimport RelatedAccountsTab from \"./Items/Account/RelatedAccountsTab\";\r\nimport PersonProfileTab from \"./Items/Person/ProfileTab\";\r\nimport PersonDocumentsTab from \"./Items/Person/DocumentsTab\";\r\nimport ShareHolderTab from \"./Items/Person/ShareHolderTab\";\r\nimport PersonArchivesTab from \"./Items/Person/ArchivesTab\";\r\nimport BeneficiariesTab from \"./Items/Account/BeneficiariesTab\";\r\nimport PersonPhonesTab from \"./Items/Person/PhonesTab\";\r\nimport GroupsTab from \"./Items/Account/GroupsTab\";\r\nimport FiscalResidence from \"./Items/Person/FiscalReference\";\r\nimport LegalAddress from \"./Items/Person/LegalAddress\";\r\nimport PersonKYC from \"./Items/Person/PersonKYC\";\r\nimport PersonBankAccount from \"./Items/Person/PersonBankAccount\";\r\nimport Suitability from \"./Items/Person/Suitability\";\r\nimport ExtendedData from \"./Items/Person/ExtendedData\";\r\nimport InstructionsTab from \"./Items/Account/InstructionsTab\";\r\n\r\nconst getAccountType = {\r\n Holders: \"Holders\",\r\n Questions: \"Questions\",\r\n KYC: \"KYC\",\r\n Documents: \"Documents\",\r\n InvestmentProfile: \"InvestmentProfile\",\r\n Profile: \"Profile\",\r\n SignatureSets: \"SignatureSets\",\r\n References: \"References\",\r\n BankAccounts: \"BankAccounts\",\r\n RelatedAccounts: \"RelatedAccounts\",\r\n Beneficiaries: \"Beneficiaries\",\r\n Groups: \"Groups\",\r\n Instructions: \"Instructions\",\r\n};\r\n\r\nexport const personChangeType = {\r\n Information: \"Information\",\r\n Documents: \"Documents\",\r\n ShareHolders: \"ShareHolders\",\r\n Phone: \"Phone\",\r\n FiscalResidence: \"FiscalResidence\",\r\n LegalAddress: \"LegalAddress\",\r\n KYC: \"KYC\",\r\n BankAccount: \"BankAccount\",\r\n Suitability: \"Suitability\",\r\n ExtendedData: \"ExtendedData\",\r\n};\r\n\r\nconst Comparer = ({\r\n requestedModification,\r\n account,\r\n currencies,\r\n person,\r\n fetchFile,\r\n}) => {\r\n if (!requestedModification || !(account || person)) return ;\r\n\r\n const comparerSelector = (props) => {\r\n let res;\r\n switch (requestedModification.AccountChangeType) {\r\n case getAccountType.Holders:\r\n res = ;\r\n break;\r\n case getAccountType.Beneficiaries:\r\n res = ;\r\n break;\r\n case getAccountType.Questions:\r\n res = ;\r\n break;\r\n case getAccountType.KYC:\r\n res = ;\r\n break;\r\n case getAccountType.Documents:\r\n res = ;\r\n break;\r\n case getAccountType.InvestmentProfile:\r\n res = ;\r\n break;\r\n case getAccountType.Profile:\r\n res = ;\r\n break;\r\n case getAccountType.SignatureSets:\r\n res = ;\r\n break;\r\n case getAccountType.References:\r\n res = ;\r\n break;\r\n case getAccountType.RelatedAccounts:\r\n res = ;\r\n break;\r\n case getAccountType.BankAccounts:\r\n res = ;\r\n break;\r\n case getAccountType.Groups:\r\n res = ;\r\n case getAccountType.Instructions:\r\n res = ;\r\n \r\n break;\r\n default:\r\n switch (requestedModification.PersonChangeType) {\r\n case personChangeType.Information:\r\n res = ;\r\n break;\r\n case personChangeType.Documents:\r\n if (requestedModification.file) {\r\n res = ;\r\n } else {\r\n res = (\r\n \r\n );\r\n }\r\n break;\r\n case personChangeType.ShareHolders:\r\n res = (\r\n \r\n );\r\n break;\r\n case personChangeType.Phone:\r\n res = (\r\n \r\n );\r\n break;\r\n case personChangeType.LegalAddress:\r\n res = (\r\n \r\n );\r\n break;\r\n case personChangeType.FiscalResidence:\r\n res = (\r\n \r\n );\r\n break;\r\n case personChangeType.KYC:\r\n res = (\r\n \r\n );\r\n break;\r\n case personChangeType.BankAccount:\r\n res = (\r\n \r\n );\r\n break;\r\n case personChangeType.Suitability:\r\n res = (\r\n \r\n );\r\n break;\r\n case personChangeType.ExtendedData:\r\n res = ;\r\n break;\r\n default:\r\n res = Invalid Input.;\r\n }\r\n break;\r\n }\r\n return res;\r\n };\r\n\r\n return (\r\n \r\n \r\n {comparerSelector({\r\n changedAccount: requestedModification.Account,\r\n account,\r\n showChanges: false,\r\n person,\r\n changedPerson: requestedModification.Person,\r\n })}\r\n \r\n {requestedModification.PersonChangeType!=personChangeType.ExtendedData &&\r\n (\r\n \r\n {comparerSelector({\r\n changedAccount: requestedModification.Account,\r\n account,\r\n showChanges: true,\r\n person,\r\n changedPerson: requestedModification.Person,\r\n fetchFile,\r\n })}\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nComparer.propTypes = {\r\n requestedModification: PropTypes.object,\r\n account: PropTypes.object,\r\n currencies: PropTypes.array,\r\n person: PropTypes.object,\r\n};\r\n\r\nComparer.defaultProps = {\r\n requestedModification: undefined,\r\n account: undefined,\r\n person: undefined,\r\n currencies: undefined,\r\n};\r\n\r\nexport default Comparer;\r\n","import React from 'react';\r\nimport {\r\n Form,\r\n Label,\r\n FormGroup,\r\n} from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { FormField, SelectFormField, CustomFormInput } from '../../../../../utils/FormFields';\r\nimport CircularProggess from '../../../../CircularProgress/CircularProgress';\r\nimport { BankAccountStatus } from '../../../../Profile/Account/types';\r\n\r\nfunction BankAccountsTab({\r\n account, changedAccount, showChanges, currencies, fetchFile\r\n}) {\r\n const editBankAccount = changedAccount.BankAccounts[0];\r\n let compareBankAccount;\r\n account.BankAccounts.map((b) => {\r\n if (parseInt(b.BankAccountItemId, 10) === parseInt(editBankAccount.BankAccountItemId, 10)) {\r\n compareBankAccount = b;\r\n }\r\n return {};\r\n });\r\n let color = 'black';\r\n if (showChanges) {\r\n if (compareBankAccount && editBankAccount.DeleteBankAccount) {\r\n color = 'red';\r\n } else if (compareBankAccount) {\r\n color = '#36a9e1';\r\n } else {\r\n color = 'green';\r\n }\r\n }\r\n\r\n const getFile = (file) => {\r\n const body = {\r\n fileId: file.ArchiveTemporalFileId\r\n }\r\n fetchFile(body, (response) => {\r\n var a = document.createElement('A');\r\n a.href = `data:application/octet-stream;base64,${response.blobfile}`;\r\n a.download = `${file.ArchiveName}.${file.ArchiveExtension}`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n })\r\n }\r\n return (\r\n
    \r\n \r\n {showChanges\r\n ? (\r\n \r\n {!editBankAccount.DeleteBankAccount\r\n && (\r\n \r\n )}\r\n \r\n )\r\n : (\r\n \r\n {compareBankAccount\r\n && (\r\n \r\n )}\r\n \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nBankAccountsTab.propTypes = {\r\n changedAccount: PropTypes.object.isRequired,\r\n account: PropTypes.object.isRequired,\r\n showChanges: PropTypes.bool.isRequired,\r\n currencies: PropTypes.array,\r\n fetchFile: PropTypes.func\r\n};\r\n\r\nBankAccountsTab.defaultProps = {\r\n currencies: undefined,\r\n};\r\n\r\nexport default BankAccountsTab;\r\n\r\nconst FormToShow = ({ bankAccount, refBankAcc, currencies, getFile }) => (\r\n \r\n {bankAccount.BankAccountItemId > 0 && (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {currencies ? (\r\n i.currencyId}\r\n getSelectItemName={(i) => i.currencyISO}\r\n value={bankAccount.BankAccountCurrency}\r\n name=\"\"\r\n />\r\n ) : }\r\n \r\n \r\n \r\n i}\r\n getSelectItemName={i => BankAccountStatus[i]}\r\n value={bankAccount.BankAccountStatus}\r\n name=\"\"\r\n />\r\n \r\n {bankAccount.Archives !== undefined && bankAccount.Archives.map((item) => (\r\n \r\n \r\n {item.ArchiveTemporalFileId > 0 ? \r\n getFile(item)} style = {{cursor:'pointer'}}>\r\n {`${item.ArchiveName}.${item.ArchiveExtension}`}\r\n \r\n : /* Este es el caso para las alertas que tienen los blobs en el objeto item */\r\n \r\n {`${item.ArchiveName}.${item.ArchiveExtension}`}\r\n \r\n }\r\n \r\n \r\n ))}\r\n \r\n \r\n);\r\n\r\nFormToShow.propTypes = {\r\n bankAccount: PropTypes.object.isRequired,\r\n refBankAcc: PropTypes.object,\r\n currencies: PropTypes.array,\r\n getFile: PropTypes.func\r\n};\r\n\r\nFormToShow.defaultProps = {\r\n refBankAcc: undefined,\r\n currencies: undefined,\r\n};\r\n","import React from \"react\";\r\nimport {Form, Label, FormGroup} from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport {\r\n FormField,\r\n CheckFormField,\r\n SelectFormField\r\n} from \"../../../../../utils/FormFields\";\r\n\r\nconst BeneficiariesTab = ({account, changedAccount, showChanges}) => {\r\n const editHolder = changedAccount.Holder[0];\r\n let compareHolder;\r\n account.Holder.map(h => {\r\n if (parseInt(h.PersonId, 10) === parseInt(editHolder.PersonId, 10)) {\r\n compareHolder = h;\r\n }\r\n return {};\r\n });\r\n let color = \"black\";\r\n if (showChanges) {\r\n if (compareHolder && editHolder.deleteHolder) {\r\n color = \"red\";\r\n } else if (compareHolder) {\r\n color = \"#36a9e1\";\r\n } else {\r\n color = \"green\";\r\n }\r\n }\r\n return (\r\n
    \r\n \r\n {showChanges ? (\r\n \r\n {compareHolder ? (\r\n \r\n {editHolder.deleteHolder\r\n ? \"Remove Beneficiary\"\r\n : \"Edit Beneficiary\"}\r\n \r\n ) : (\r\n \"New Beneficiary\"\r\n )}\r\n \r\n ) : (\r\n \"Actual Account\"\r\n )}\r\n \r\n {showChanges ? (\r\n \r\n {!editHolder.deleteHolder && (\r\n \r\n )}\r\n \r\n ) : (\r\n \r\n {compareHolder && (\r\n \r\n )}\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nBeneficiariesTab.propTypes = {\r\n changedAccount: PropTypes.object.isRequired,\r\n account: PropTypes.object.isRequired,\r\n showChanges: PropTypes.bool.isRequired\r\n};\r\n\r\nexport default BeneficiariesTab;\r\n\r\nconst FormToShow = ({holder, isPhysical = true, refHolder}) => (\r\n \r\n \r\n {isPhysical ? (\r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n \r\n \r\n {holder.PersonType === \"Juridical\" && (\r\n \r\n )}\r\n \r\n )}\r\n i}\r\n getSelectItemName={i => (i === 1 ? \"Yes\" : \"No\")}\r\n name=\"HoldersOrderManaged\"\r\n disabled\r\n />\r\n i}\r\n getSelectItemName={i => (i === 1 ? \"Yes\" : \"No\")}\r\n name=\"HoldersOrderWritten\"\r\n disabled\r\n />\r\n i}\r\n getSelectItemName={i => (i === 1 ? \"Yes\" : \"No\")}\r\n name=\"HoldersOrderWeb\"\r\n disabled\r\n />\r\n i}\r\n getSelectItemName={i => (i === 1 ? \"Yes\" : \"No\")}\r\n name=\"HoldersOrderViaLink\"\r\n disabled\r\n />\r\n \r\n);\r\n\r\nFormToShow.propTypes = {\r\n holder: PropTypes.object.isRequired,\r\n isPhysical: PropTypes.bool.isRequired,\r\n refHolder: PropTypes.object\r\n};\r\n\r\nFormToShow.defaultProps = {\r\n refHolder: undefined\r\n};\r\n","import React from 'react';\r\nimport {\r\n Form,\r\n Label,\r\n FormGroup,\r\n} from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\nimport { FormField, CustomFormInput } from '../../../../../utils/FormFields';\r\n\r\nfunction DocumentsTab({\r\n account, changedAccount, showChanges, fetchFile\r\n}) {\r\n const editDocument = changedAccount.AccountArchives[0];\r\n let compareDocument;\r\n account.AccountArchives.map((r) => {\r\n if (parseInt(r.AccountArchiveId, 10) === parseInt(editDocument.AccountArchiveId, 10)) {\r\n compareDocument = r;\r\n }\r\n return {};\r\n });\r\n let color = 'black';\r\n if (showChanges && editDocument.AccountArchiveId > 0) {\r\n color = 'red';\r\n } else if (showChanges && parseInt(editDocument.AccountArchiveId, 10) === 0) {\r\n color = 'green';\r\n }\r\n\r\n const getFile = (file) => {\r\n const body = {\r\n fileId: file.AccountArchivesTemporalFileId\r\n }\r\n fetchFile(body, (response) => {\r\n var a = document.createElement('A');\r\n a.href = `data:application/octet-stream;base64,${response.blobfile}`;\r\n a.download = `${file.AccountArchivesName}.${file.AccountArchivesExtension}`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n })\r\n }\r\n return (\r\n
    \r\n \r\n {showChanges\r\n ? (\r\n \r\n {parseInt(editDocument.AccountArchiveId, 10) === 0\r\n && }\r\n \r\n )\r\n : (\r\n \r\n {compareDocument && }\r\n \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nDocumentsTab.propTypes = {\r\n changedAccount: PropTypes.object.isRequired,\r\n account: PropTypes.object.isRequired,\r\n showChanges: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default DocumentsTab;\r\n\r\nconst FormToShow = ({ document, getFile }) => (\r\n \r\n {document.AccountArchiveId > 0 && (\r\n \r\n )}\r\n \r\n {document.AccountArchivesTemporalFileId > 0 ?\r\n getFile(document)} style = {{cursor:'pointer'}}>\r\n {`${document.AccountArchivesName}.${document.AccountArchivesExtension}`}\r\n \r\n :\r\n \r\n {`${document.AccountArchivesName}.${document.AccountArchivesExtension}`}\r\n \r\n }\r\n \r\n \r\n \r\n {!document.AccountArchivesEnabled\r\n ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n);\r\n\r\nFormToShow.propTypes = {\r\n document: PropTypes.object.isRequired,\r\n};\r\n","import React, { useState, Fragment, useEffect } from \"react\";\r\nimport { Form,\r\n Label,\r\n FormGroup, } from \"reactstrap\";\r\n import PropTypes from 'prop-types';\r\nimport { FormField, SelectFormField, CustomFormInput } from '../../../../../utils/FormFields';\r\nimport CircularProggess from '../../../../CircularProgress/CircularProgress';\r\n\r\nfunction GroupsTab({\r\n account, changedAccount, showChanges,\r\n}) {\r\n const editBankAccount = changedAccount.Groups[0];\r\n let compareBankAccount;\r\n account.Groups.map((b) => {\r\n if (parseInt(b.AccountGroupId, 10) === parseInt(editBankAccount.AccountGroupId, 10)) {\r\n compareBankAccount = b;\r\n }\r\n return {};\r\n });\r\n let color = 'black';\r\n if (showChanges) {\r\n if (compareBankAccount && editBankAccount.DeleteBankAccount) {\r\n color = 'red';\r\n } else if (compareBankAccount) {\r\n color = '#36a9e1';\r\n } else {\r\n color = 'green';\r\n }\r\n }\r\n\r\n return (\r\n
    \r\n \r\n {showChanges\r\n ? (\r\n \r\n {!editBankAccount.DeleteGroup\r\n && (\r\n \r\n )}\r\n \r\n )\r\n : (\r\n \r\n {compareBankAccount\r\n && (\r\n \r\n )}\r\n \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nGroupsTab.propTypes = {\r\n changedAccount: PropTypes.object.isRequired,\r\n account: PropTypes.object.isRequired,\r\n showChanges: PropTypes.bool.isRequired,\r\n};\r\n\r\n\r\nexport default GroupsTab;\r\n\r\nconst FormToShow = ({ bankAccount, refBankAcc }) => (\r\n \r\n {bankAccount.AccountGroupId > 0 && (\r\n \r\n )}\r\n \r\n \r\n \r\n);\r\n\r\nFormToShow.propTypes = {\r\n bankAccount: PropTypes.object.isRequired,\r\n refBankAcc: PropTypes.object,\r\n};\r\n\r\nFormToShow.defaultProps = {\r\n refBankAcc: undefined,\r\n};","import React from \"react\";\r\nimport {Form, Label, FormGroup} from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport {\r\n FormField,\r\n CheckFormField,\r\n SelectFormField\r\n} from \"../../../../../utils/FormFields\";\r\n\r\nconst HoldersTab = ({account, changedAccount, showChanges}) => {\r\n const editHolder = changedAccount.Holder[0];\r\n let compareHolder;\r\n account.Holder.map(h => {\r\n if (parseInt(h.PersonId, 10) === parseInt(editHolder.PersonId, 10)) {\r\n compareHolder = h;\r\n }\r\n return {};\r\n });\r\n let color = \"black\";\r\n if (showChanges) {\r\n if (compareHolder && editHolder.deleteHolder) {\r\n color = \"red\";\r\n } else if (compareHolder) {\r\n color = \"#36a9e1\";\r\n } else {\r\n color = \"green\";\r\n }\r\n }\r\n return (\r\n
    \r\n \r\n {showChanges ? (\r\n \r\n {compareHolder ? (\r\n \r\n {editHolder.deleteHolder ? \"Remove Holder\" : \"Edit Holder\"}\r\n \r\n ) : (\r\n \"New Holder\"\r\n )}\r\n \r\n ) : (\r\n \"Actual Account\"\r\n )}\r\n \r\n {showChanges ? (\r\n \r\n {!editHolder.deleteHolder && (\r\n \r\n )}\r\n \r\n ) : (\r\n \r\n {compareHolder && (\r\n \r\n )}\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nHoldersTab.propTypes = {\r\n changedAccount: PropTypes.object.isRequired,\r\n account: PropTypes.object.isRequired,\r\n showChanges: PropTypes.bool.isRequired\r\n};\r\n\r\nexport default HoldersTab;\r\n\r\nconst FormToShow = ({holder, isPhysical = true, refHolder}) => (\r\n \r\n \r\n {isPhysical ? (\r\n \r\n \r\n \r\n {holder.AccountHolderPersonType == \"Physical\" && (\r\n \r\n )}\r\n \r\n ) : (\r\n \r\n \r\n \r\n \r\n {holder.PersonType === \"Juridical\" && (\r\n \r\n )}\r\n \r\n )}\r\n i}\r\n getSelectItemName={i => (i === 1 ? \"Yes\" : \"No\")}\r\n name=\"HoldersOrderManaged\"\r\n disabled\r\n />\r\n i}\r\n getSelectItemName={i => (i === 1 ? \"Yes\" : \"No\")}\r\n name=\"HoldersOrderWritten\"\r\n disabled\r\n />\r\n i}\r\n getSelectItemName={i => (i === 1 ? \"Yes\" : \"No\")}\r\n name=\"HoldersOrderWeb\"\r\n disabled\r\n />\r\n i}\r\n getSelectItemName={i => (i === 1 ? \"Yes\" : \"No\")}\r\n name=\"HoldersOrderViaLink\"\r\n disabled\r\n />\r\n \r\n);\r\n\r\nFormToShow.propTypes = {\r\n holder: PropTypes.object.isRequired,\r\n isPhysical: PropTypes.bool.isRequired,\r\n refHolder: PropTypes.object\r\n};\r\n\r\nFormToShow.defaultProps = {\r\n refHolder: undefined\r\n};\r\n","import React from \"react\";\r\nimport { Form, Label, FormGroup } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport { FormField, CheckFormField, SelectFormField } from \"../../../../../utils/FormFields\";\r\n\r\nconst InstructionsTab = ({ account, changedAccount, showChanges }) => {\r\n const editInstruction = changedAccount.Instructions[0];\r\n let compareInstruction;\r\n if (account.Instructions){\r\n account.Instructions.map((h) => {\r\n if (\r\n (h.AccountInstructionType) == (editInstruction.AccountInstructionType) &&\r\n h.AccountInstructionsCurrency == editInstruction.AccountInstructionsCurrency\r\n ) {\r\n compareInstruction = h;\r\n }\r\n return {};\r\n })\r\n}\r\n let color = \"black\";\r\n if (showChanges) {\r\n if (compareInstruction && editInstruction.DeleteInstruction) {\r\n color = \"red\";\r\n } else if (compareInstruction) {\r\n color = \"#36a9e1\";\r\n } else {\r\n color = \"green\";\r\n }\r\n }\r\n return (\r\n
    \r\n \r\n {showChanges ? (\r\n \r\n {compareInstruction ? (\r\n \r\n {editInstruction.DeleteInstruction ? \"Remove Instruction\" : \"Edit Instruction\"}\r\n \r\n ) : (\r\n \"New Instruction\"\r\n )}\r\n \r\n ) : (\r\n \"Actual Account\"\r\n )}\r\n \r\n {showChanges ? (\r\n \r\n {!editInstruction.DeleteInstruction && (\r\n \r\n )}\r\n \r\n ) : (\r\n \r\n {compareInstruction && (\r\n \r\n )}\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default InstructionsTab;\r\n\r\nconst FormToShow = ({ Instruction, refInstruction }) => (\r\n \r\n \r\n \r\n i}\r\n getSelectItemName={(i) => i}\r\n disabled\r\n name=\"AccountInstructionTarget\"\r\n />\r\n\r\n {Instruction.AccountInstructionTarget==\"Reinvest\"?\r\n ( \r\n\r\n ):(\r\n \r\n )}\r\n\r\n \r\n\r\n\r\n\r\n\r\n \r\n);\r\n\r\n// FormToShow.propTypes = {\r\n// holder: PropTypes.object.isRequired,\r\n// isPhysical: PropTypes.bool.isRequired,\r\n// refHolder: PropTypes.object\r\n// };\r\n\r\n// FormToShow.defaultProps = {\r\n// refHolder: undefined\r\n// };\r\n","import React from 'react';\r\nimport {\r\n Form,\r\n Label,\r\n FormGroup,\r\n} from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\nimport { FormField } from '../../../../../utils/FormFields';\r\n\r\nconst InvestmentProfileTab = ({\r\n account, changedAccount, showChanges,\r\n}) => {\r\n const editInvestExp = changedAccount.InvestExperience;\r\n const compareInvestExp = [];\r\n editInvestExp.map((exp) => {\r\n account.InvestExperience.map((i) => {\r\n if (parseInt(i.InvestExperienceId, 10) === parseInt(exp.InvestExperienceId, 10)) {\r\n compareInvestExp.push(i);\r\n }\r\n return {};\r\n });\r\n return {};\r\n });\r\n return (\r\n
    \r\n \r\n {showChanges\r\n ? (\r\n \r\n {editInvestExp.map((inv, i) => (\r\n \r\n \r\n
    \r\n
    \r\n ))}\r\n
    \r\n )\r\n : (\r\n \r\n {compareInvestExp.map((inv) => (\r\n \r\n \r\n
    \r\n
    \r\n ))}\r\n
    \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nInvestmentProfileTab.propTypes = {\r\n changedAccount: PropTypes.object.isRequired,\r\n account: PropTypes.object.isRequired,\r\n showChanges: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default InvestmentProfileTab;\r\n\r\nconst FormToShow = ({ investExp, refInv }) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nFormToShow.propTypes = {\r\n investExp: PropTypes.object.isRequired,\r\n refInv: PropTypes.object,\r\n};\r\n\r\nFormToShow.defaultProps = {\r\n refInv: undefined,\r\n};\r\n","import React from \"react\";\r\nimport { Form, Label, FormGroup } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport { SelectFormField, FormField } from \"../../../../../utils/FormFields\";\r\n\r\nconst KYCConstants = {\r\n StockMarketKnowledge: {\r\n Nothing: \"Nothing\",\r\n Good: \"Good\",\r\n Expert: \"Expert\",\r\n },\r\n CustomerLink: {\r\n Option1: \"Cliente Existente\",\r\n Option2: \"Referido por otro cliente\",\r\n Option3: \"Referido por AF/Director\",\r\n Option4: \"Fue cliente en el pasado de una empresa fusionada/Nobilis\",\r\n Option5: \"Sin conocimiento previo\",\r\n Option6: \"Sucesion de otra cuenta Nobilis\",\r\n },\r\n CustomerRelatedSince: {\r\n NewCustomer: \"New Customer\",\r\n LessThan3: \"Less than 3\",\r\n Between3And10: \"Between 3 and 10\",\r\n MoreThan10: \"More than 10\",\r\n },\r\n};\r\n\r\nconst InvestmentProfileTab = ({ account, changedAccount, showChanges }) => {\r\n const editKYC = {};\r\n Object.keys(changedAccount.KYC).map((key) => {\r\n if (changedAccount.KYC[key] !== account.KYC[key]) {\r\n editKYC[key] = changedAccount.KYC[key];\r\n }\r\n return {};\r\n });\r\n const compareKYC = {};\r\n Object.keys(editKYC).map((key) => {\r\n compareKYC[key] = account.KYC[key];\r\n return {};\r\n });\r\n return (\r\n
    \r\n \r\n {showChanges ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nInvestmentProfileTab.propTypes = {\r\n changedAccount: PropTypes.object.isRequired,\r\n account: PropTypes.object.isRequired,\r\n showChanges: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default InvestmentProfileTab;\r\n\r\nconst FormToShow = ({ KYC, refKYC }) => (\r\n \r\n {KYC.AccountKnowledgeStockMarket && (\r\n KYCConstants.StockMarketKnowledge[i]}\r\n getSelectItemName={(i) => KYCConstants.StockMarketKnowledge[i]}\r\n name=\"\"\r\n />\r\n )}\r\n {KYC.AccountInvestBonds && (\r\n \r\n )}\r\n {KYC.AccountInvestStocks && (\r\n \r\n )}\r\n {KYC.AccountInvestFunds && (\r\n \r\n )}\r\n {KYC.AccountInvestOthers && (\r\n \r\n )}\r\n {KYC.AccountKYCCustomerLink && (\r\n i}\r\n getSelectItemName={(i) => KYCConstants.CustomerLink[i]}\r\n />\r\n )}\r\n {KYC.AccountKYCCustomerLinkSpecify && (\r\n \r\n )}\r\n {KYC.AccountKYCCustomerRelatedSince && (\r\n KYCConstants.CustomerRelatedSince[i]}\r\n getSelectItemName={(i) => KYCConstants.CustomerRelatedSince[i]}\r\n name=\"\"\r\n />\r\n )}\r\n {KYC.AccountKYCCustomerProfessionName && (\r\n \r\n )}\r\n {KYC.AccountKYCAnualIncome && (\r\n \r\n )}\r\n {KYC.AccountKYCEstimatedAmount && (\r\n \r\n )}\r\n {KYC.AccountKYCAmountMaximumCustody !== undefined && (\r\n \r\n )}\r\n {KYC.AccountKYCAmountDepositedStocks !== undefined && (\r\n \r\n )}\r\n {KYC.AccountKYCAmountRetiredStocks !== undefined && (\r\n \r\n )}\r\n {KYC.AccountKYCQuantityDepositedStocks !== undefined && (\r\n \r\n )}\r\n {KYC.AccountKYCQuantityRetiredStocks !== undefined && (\r\n \r\n )}\r\n {KYC.AccountKYCComments && (\r\n \r\n )}\r\n {KYC.AccountKYCManualHighRisk && (\r\n \r\n )}\r\n \r\n);\r\n\r\nFormToShow.propTypes = {\r\n KYC: PropTypes.object.isRequired,\r\n refKYC: PropTypes.object,\r\n};\r\n\r\nFormToShow.defaultProps = {\r\n refKYC: undefined,\r\n};\r\n","import React from 'react';\r\nimport {\r\n Form,\r\n Label,\r\n FormGroup,\r\n} from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\nimport { FormField } from '../../../../../utils/FormFields';\r\n\r\nfunction PersonalReferencesTab({\r\n account, changedAccount, showChanges,\r\n}) {\r\n const editPersonalReference = changedAccount.PersonalReferences[0];\r\n let comparePersonalReference;\r\n account.PersonalReferences.map((r) => {\r\n if (parseInt(r.AccountPersonalReferenceId, 10)\r\n === parseInt(editPersonalReference.AccountPersonalReferenceId, 10)) {\r\n comparePersonalReference = r;\r\n }\r\n return {};\r\n });\r\n let color = 'black';\r\n if (showChanges && editPersonalReference.AccountPersonalReferenceId > 0) {\r\n color = 'red';\r\n } else if (showChanges && parseInt(editPersonalReference.AccountPersonalReferenceId, 10) === 0) {\r\n color = 'green';\r\n }\r\n return (\r\n
    \r\n \r\n {showChanges\r\n ? (\r\n \r\n {parseInt(editPersonalReference.AccountPersonalReferenceId, 10) === 0\r\n && }\r\n \r\n )\r\n : (\r\n \r\n {comparePersonalReference && }\r\n \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nPersonalReferencesTab.propTypes = {\r\n changedAccount: PropTypes.object.isRequired,\r\n account: PropTypes.object.isRequired,\r\n showChanges: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default PersonalReferencesTab;\r\n\r\nconst FormToShow = ({ reference }) => (\r\n \r\n {reference.AccountPersonalReferenceId > 0 && (\r\n \r\n )}\r\n \r\n \r\n \r\n);\r\n\r\nFormToShow.propTypes = {\r\n reference: PropTypes.object.isRequired,\r\n};\r\n","import React from \"react\";\r\nimport { Form, Label, FormGroup } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport { FormField, CheckFormField } from \"../../../../../utils/FormFields\";\r\n\r\nfunction ProfileTab({ account, changedAccount, showChanges }) {\r\n return (\r\n
    \r\n \r\n {showChanges ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nProfileTab.propTypes = {\r\n changedAccount: PropTypes.object.isRequired,\r\n account: PropTypes.object.isRequired,\r\n showChanges: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default ProfileTab;\r\n\r\nconst FormToShow = ({ account, refAccount }) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {account.AccountIsPhysical == false && (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nFormToShow.propTypes = {\r\n account: PropTypes.object.isRequired,\r\n refAccount: PropTypes.object,\r\n};\r\n\r\nFormToShow.defaultProps = {\r\n refAccount: undefined,\r\n};\r\n","import React from 'react';\r\nimport {\r\n Form,\r\n Label,\r\n FormGroup,\r\n} from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { FormField } from '../../../../../utils/FormFields';\r\n\r\nfunction QuestionsTab({\r\n account, changedAccount, showChanges,\r\n}) {\r\n const editQuestions = [];\r\n changedAccount.Questions.map((q) => {\r\n if (q.NewAnswerId > 0) editQuestions.push(q);\r\n return {};\r\n });\r\n const compareQuestions = [];\r\n editQuestions.map((q) => {\r\n compareQuestions.push({\r\n ...q,\r\n NewAnswerId: 0,\r\n });\r\n return {};\r\n });\r\n return (\r\n \r\n \r\n {showChanges\r\n ? (\r\n \r\n {editQuestions.map((q) => (\r\n \r\n ))}\r\n \r\n )\r\n : (\r\n \r\n {compareQuestions.map((q) => (\r\n \r\n ))}\r\n \r\n )}\r\n \r\n );\r\n}\r\n\r\nQuestionsTab.propTypes = {\r\n changedAccount: PropTypes.object.isRequired,\r\n account: PropTypes.object.isRequired,\r\n showChanges: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default QuestionsTab;\r\n\r\nconst FormToShow = ({ question }) => (\r\n
    \r\n \r\n {question.QuestionDescription}\r\n {question.Answer.map((a) => (\r\n \r\n ))}\r\n \r\n
    \r\n);\r\n\r\nFormToShow.propTypes = {\r\n question: PropTypes.object.isRequired,\r\n};\r\n","import React from 'react';\r\nimport {\r\n Form,\r\n Label,\r\n FormGroup,\r\n} from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { FormField } from '../../../../../utils/FormFields';\r\n\r\nfunction RelatedAccountsTab({\r\n account, changedAccount, showChanges,\r\n}) {\r\n const editRelatedAccount = changedAccount.RelatedAccount[0];\r\n let compareRelatedAccount;\r\n account.RelatedAccount.map((a) => {\r\n if (parseInt(a.RelatedAccountId, 10) === parseInt(editRelatedAccount.RelatedAccountId, 10)) {\r\n compareRelatedAccount = a;\r\n }\r\n return {};\r\n });\r\n let color = 'black';\r\n if (showChanges) {\r\n if (compareRelatedAccount && editRelatedAccount.DeleteRelatedAccount) {\r\n color = 'red';\r\n } else if (compareRelatedAccount) {\r\n color = '#36a9e1';\r\n } else {\r\n color = 'green';\r\n }\r\n }\r\n return (\r\n
    \r\n \r\n {showChanges\r\n ? (\r\n \r\n {!editRelatedAccount.DeleteRelatedAccount\r\n && (\r\n \r\n )}\r\n \r\n )\r\n : (\r\n \r\n {compareRelatedAccount\r\n && (\r\n \r\n )}\r\n \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nRelatedAccountsTab.propTypes = {\r\n changedAccount: PropTypes.object.isRequired,\r\n account: PropTypes.object.isRequired,\r\n showChanges: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default RelatedAccountsTab;\r\n\r\nconst FormToShow = ({ relAccount, refRelAcc }) => (\r\n \r\n {relAccount.RelatedAccountId > 0 && (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n);\r\n\r\nFormToShow.propTypes = {\r\n relAccount: PropTypes.object.isRequired,\r\n refRelAcc: PropTypes.object,\r\n};\r\n\r\nFormToShow.defaultProps = {\r\n refRelAcc: undefined,\r\n};\r\n","import React from 'react';\r\nimport {\r\n Form,\r\n Label,\r\n FormGroup,\r\n} from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\nimport { FormField, CheckFormField } from '../../../../../utils/FormFields';\r\n\r\nfunction SignatureSetsTab({\r\n account, changedAccount, showChanges,\r\n}) {\r\n const editSignatureSet = changedAccount.SignatureSets[0];\r\n let compareSignatureSet;\r\n account.SignatureSets.map((s) => {\r\n if (parseInt(s.SignatureSetId, 10) === parseInt(editSignatureSet.SignatureSetId, 10)) {\r\n compareSignatureSet = s;\r\n }\r\n return {};\r\n });\r\n let color = 'black';\r\n if (showChanges) {\r\n if (compareSignatureSet && editSignatureSet.SignatureSetWayOfAction === 'NoAction') {\r\n color = 'red';\r\n } else if (compareSignatureSet) {\r\n color = '#36a9e1';\r\n } else {\r\n color = 'green';\r\n }\r\n }\r\n return (\r\n
    \r\n \r\n {showChanges\r\n ? (\r\n \r\n {editSignatureSet.SignatureSetWayOfAction !== 'NoAction'\r\n && }\r\n \r\n )\r\n : (\r\n \r\n {compareSignatureSet && }\r\n \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nSignatureSetsTab.propTypes = {\r\n changedAccount: PropTypes.object.isRequired,\r\n account: PropTypes.object.isRequired,\r\n showChanges: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default SignatureSetsTab;\r\n\r\nconst FormToShow = ({ signatureSet, refSet }) => (\r\n \r\n \r\n \r\n \r\n {signatureSet.SignaturePeopleSelected.map((p) => (\r\n \r\n \r\n \r\n ))}\r\n \r\n);\r\n\r\nFormToShow.propTypes = {\r\n signatureSet: PropTypes.object.isRequired,\r\n refSet: PropTypes.object,\r\n};\r\n\r\nFormToShow.defaultProps = {\r\n refSet: undefined,\r\n};\r\n","import React from 'react';\r\nimport {\r\n Form, FormGroup, Label,\r\n} from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { FormField, CustomFormInput } from '../../../../../utils/FormFields';\r\nimport { parseDate } from '../../../../../utils';\r\n\r\nfunction ArchivesTab({ person, changedPerson, showChanges , fetchFile}) {\r\n const editArchive = changedPerson.Archives[0];\r\n let isLifeLong = editArchive.PersonArchivesHasExpirationDate;\r\n let compareArchive;\r\n person.Archives.map((a) => {\r\n if (parseInt(a.PersonArchiveId, 10)\r\n === parseInt(editArchive.PersonArchiveId, 10)) {\r\n compareArchive = a;\r\n }\r\n return {};\r\n });\r\n let color = 'black';\r\n if (showChanges && editArchive.PersonArchiveId > 0) {\r\n color = 'red';\r\n } else if (showChanges && parseInt(editArchive.PersonArchiveId, 10) === 0) {\r\n color = 'green';\r\n }\r\n\r\n const getFile = (file) => {\r\n const body = {\r\n fileId: file.PersonArchivesTemporalFileId\r\n }\r\n fetchFile(body, (response) => {\r\n var a = document.createElement('A');\r\n a.href = `data:application/octet-stream;base64,${response.blobfile}`;\r\n a.download = `${file.PersonArchivesName}.${file.PersonArchivesExtension}`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n })\r\n }\r\n\r\n return (\r\n
    \r\n \r\n {showChanges\r\n ? (\r\n \r\n {parseInt(editArchive.PersonArchiveId, 10) === 0\r\n && }\r\n \r\n )\r\n : (\r\n \r\n {compareArchive && }\r\n \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nArchivesTab.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n changedPerson: PropTypes.object,\r\n showChanges: PropTypes.bool.isRequired,\r\n};\r\n\r\nArchivesTab.defaultProps = {\r\n changedPerson: undefined,\r\n};\r\n\r\nconst FormToShow = ({ archive, getFile }) => (\r\n \r\n \r\n {archive.PersonArchivesTemporalFileId > 0 ? \r\n getFile(archive)} style = {{cursor:'pointer'}}>\r\n {`${archive.PersonArchivesName}.${archive.PersonArchivesExtension}`}\r\n \r\n : /* Este es el caso para las alertas que tienen los blobs en el objeto item */\r\n \r\n {`${archive.PersonArchivesName}.${archive.PersonArchivesExtension}`}\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n {(archive.PersonArchivesHasExpirationDate == true)\r\n ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n);\r\n\r\nFormToShow.propTypes = {\r\n archive: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default (ArchivesTab);\r\n","/* eslint-disable no-nested-ternary */\r\nimport React from 'react';\r\nimport {\r\n Form, FormGroup, Label,\r\n} from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { FormField } from '../../../../../utils/FormFields';\r\nimport { PersonType } from '../../../../Profile/Account/types';\r\n\r\nfunction DocumentsTab({\r\n person,\r\n changedPerson,\r\n showChanges,\r\n remove,\r\n}) {\r\n const editDocument = changedPerson.Documents[0];\r\n let compareDocument;\r\n person.Documents.forEach((d) => {\r\n if (parseInt(d.PhysicalPersonDocumentTypeId, 10)\r\n === parseInt(editDocument.PhysicalPersonDocumentTypeId, 10)) {\r\n compareDocument = d;\r\n }\r\n });\r\n let color = 'black';\r\n if (showChanges) {\r\n if (compareDocument === undefined) {\r\n color = 'green';\r\n } else {\r\n color = remove ? 'red' : '#36a9e1';\r\n }\r\n }\r\n return (\r\n
    \r\n \r\n {showChanges\r\n ? (\r\n \r\n {compareDocument ?\r\n \r\n :\r\n \r\n }\r\n \r\n )\r\n : (\r\n \r\n {compareDocument && }\r\n \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nDocumentsTab.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n changedPerson: PropTypes.object,\r\n showChanges: PropTypes.bool.isRequired,\r\n remove: PropTypes.bool.isRequired,\r\n};\r\n\r\nDocumentsTab.defaultProps = {\r\n changedPerson: undefined,\r\n};\r\n\r\nconst FormToShow = ({ document, compareDoc, person}) => (\r\n \r\n {person.PersonType == PersonType.Physical ?\r\n : \r\n }\r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nFormToShow.propTypes = {\r\n document: PropTypes.object.isRequired,\r\n compareDoc: PropTypes.object,\r\n person: PropTypes.object.isRequired,\r\n};\r\n\r\nFormToShow.defaultProps = {\r\n compareDoc: undefined,\r\n};\r\n\r\nexport default (DocumentsTab);","import React, { Fragment } from \"react\";\r\nimport { Table } from \"reactstrap\";\r\nimport \"./style.css\"; // Importamos el archivo CSS para los estilos\r\n\r\nconst ExtendedData = ({ person, changedPerson}) => {\r\n const changedExtendedData = changedPerson.PersonExtendedData.filter(\r\n (group) => group.Instance && group.Instance.length > 0\r\n );\r\n const ExtendedData = person.PersonExtendedData.filter(\r\n (group) => group.Instance && group.Instance.length > 0\r\n );\r\n\r\n const renderExtensionGroup = (extensionGroup) => {\r\n return (\r\n \r\n {extensionGroup.ExtensionGroupInternal}\r\n \r\n {extensionGroup.ExtensionGroupMultipleSelection ? (\r\n
      \r\n {extensionGroup.Instance.map((instance) => (\r\n
    • {getValue(extensionGroup,instance)}
    • \r\n \r\n ))}\r\n
    \r\n ) : (\r\n getExtensionItemDescription(extensionGroup)\r\n )}\r\n \r\n \r\n );\r\n };\r\n\r\n const getValue = (extensionGroup, instance) => {\r\n if (extensionGroup.ExtensionGroupType==\"freetext\"){\r\n return instance.ExtensionInstanceText;\r\n }else{\r\n const item = extensionGroup.Item.find(\r\n (item) => item.ExtensionItemId === instance.ExtensionItemId\r\n );\r\n return item ? item.ExtensionItemDescription : \"No item found\";\r\n }\r\n }\r\n\r\n const getExtensionItemDescription = (extensionGroup) => {\r\n if(extensionGroup.ExtensionGroupType==\"freetext\"){\r\n return extensionGroup.Instance[0].ExtensionInstanceText;\r\n }\r\n if (!extensionGroup.Item || extensionGroup.Item.length === 0) {\r\n return \"No item found\";\r\n }\r\n const item = extensionGroup.Item.find(\r\n (item) => item.ExtensionItemId === extensionGroup.Instance[0].ExtensionItemId\r\n );\r\n return item ? item.ExtensionItemDescription : \"No item found\";\r\n };\r\n\r\n return (\r\n \r\n

    Extended Data

    \r\n

    Original

    \r\n
    \r\n {\" \"}\r\n {/* Div contenedor para aplicar estilos */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {ExtendedData.map(renderExtensionGroup)}\r\n
    Extension GroupData
    \r\n
    \r\n\r\n

    Changes requested

    \r\n
    \r\n {\" \"}\r\n {/* Div contenedor para aplicar estilos */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {changedExtendedData.map(renderExtensionGroup)}\r\n
    Extension GroupData
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default ExtendedData;\r\n","import React from \"react\";\r\nimport { Form, FormGroup, Label } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport { FormField, SelectFormField } from \"../../../../../utils/FormFields\";\r\nimport { OptionsWhyWithoutTIN } from \"../../../../Profile/Person/types\";\r\n\r\nfunction FiscalResidence({ person, changedPerson, showChanges, remove }) {\r\n const showFiscalResidence = changedPerson || person;\r\n const editFiscalResidence = changedPerson.PersonFiscalResidence[0];\r\n let compareFiscalResidence = {};\r\n person.PersonFiscalResidence.forEach((d) => {\r\n if (\r\n parseInt(d.PersonFiscalResidenceId, 10) ===\r\n parseInt(editFiscalResidence.PersonFiscalResidenceId, 10)\r\n ) {\r\n compareFiscalResidence = d;\r\n }\r\n });\r\n let color = \"black\";\r\n if (showChanges) {\r\n if (compareFiscalResidence === undefined) {\r\n color = \"green\";\r\n } else {\r\n color = remove ? \"red\" : \"#36a9e1\";\r\n }\r\n }\r\n\r\n return (\r\n
    \r\n \r\n {showChanges ? (\r\n \r\n {compareFiscalResidence !== undefined &&\r\n (editFiscalResidence.PersonFiscalResidenceId == 0\r\n ? \"New Account\"\r\n : remove\r\n ? \"Remove Account\"\r\n : \"Edit Account\")}\r\n \r\n ) : (\r\n \"Actual Account\"\r\n )}\r\n \r\n {showChanges ? (\r\n \r\n {compareFiscalResidence && (\r\n \r\n )}\r\n \r\n ) : (\r\n \r\n {compareFiscalResidence && (\r\n \r\n )}\r\n \r\n )}\r\n \r\n );\r\n}\r\n\r\nFiscalResidence.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n changedPerson: PropTypes.object.isRequired,\r\n showChanges: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default FiscalResidence;\r\n\r\nconst FormToShow = ({ fiscalResidence, refFiscalResidence }) => (\r\n \r\n {fiscalResidence &&\r\n fiscalResidence.PersonFiscalResidenceCountryName !== undefined && (\r\n \r\n )}\r\n {fiscalResidence &&\r\n fiscalResidence.PersonFiscalResidenceTaxId !== undefined && (\r\n i.DocumentTypeId}\r\n getSelectItemName={(i) => i.DocumentTypeName}\r\n />\r\n )}\r\n {fiscalResidence &&\r\n fiscalResidence.PersonFiscalResidenceTin !== undefined && (\r\n \r\n )}\r\n {fiscalResidence &&\r\n fiscalResidence.PersonFiscalResidenceNoTINOpt !== undefined && (\r\n item.id}\r\n getSelectItemName={(item) => item.text}\r\n />\r\n )}\r\n {fiscalResidence &&\r\n fiscalResidence.PersonFiscalResidenceDateFrom !== undefined && (\r\n \r\n )}\r\n {fiscalResidence &&\r\n fiscalResidence.PersonFiscalResidenceDateTo !== undefined && (\r\n \r\n )}\r\n {fiscalResidence &&\r\n fiscalResidence.PersonFiscalResidenceAddress !== undefined && (\r\n \r\n )}\r\n {fiscalResidence &&\r\n fiscalResidence.PersonFiscalResidenceNoTINSpecify !== undefined && (\r\n \r\n )}\r\n \r\n);\r\n\r\nFormToShow.propTypes = {\r\n fiscalResidence: PropTypes.object.isRequired,\r\n refFiscalResidence: PropTypes.object,\r\n};\r\n\r\nFormToShow.defaultProps = {\r\n refFiscalResidence: undefined,\r\n};\r\n","import React from \"react\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport { FormField, SelectFormField } from \"../../../../../../utils/FormFields\";\r\nimport JuridicalPersonLegalAddress from \"../LegalAddress\";\r\nimport JuridicalPersonFiscalResidence from \"../FiscalReference\";\r\nimport { getLocalDate, toDateTime } from \"../../../../../../utils/dateUtils\";\r\n\r\nfunction JuridicalPersonProfile({ person, changedPerson }) {\r\n const showPerson = changedPerson || person;\r\n return (\r\n \r\n {showPerson.JuridicalPersonLegalName !== undefined && (\r\n \r\n )}\r\n {showPerson.PersonIsMinimal !== undefined && (\r\n i.id}\r\n getSelectItemName={(i) => i.desc}\r\n />\r\n )}\r\n \r\n {showPerson.JuridicalPersonConstDate !== undefined && (\r\n \r\n )}\r\n {showPerson.JuridicalPersonConstPlace !== undefined && (\r\n \r\n )}\r\n {showPerson.JuridicalPersonDocumentTypeName !== undefined && (\r\n \r\n )}\r\n {showPerson.JuridicalPersonTAXId !== undefined && (\r\n \r\n )}\r\n {showPerson.JuridicalPersonSecurityNumber !== undefined && (\r\n \r\n )}\r\n {showPerson.JuridicalPersonIssuePlace !== undefined && (\r\n \r\n )}\r\n {showPerson.JuridicalPersonRegFinalBeneficiaries !== undefined && (\r\n \r\n )}\r\n {showPerson.PersonEmail !== undefined && (\r\n \r\n )}\r\n {showPerson.PersonCompanyLinkId !== undefined && (\r\n \r\n )}\r\n {showPerson.PersonProfessionId !== undefined && (\r\n \r\n )}\r\n {showPerson.PersonActivitySectorId !== undefined && (\r\n \r\n )}\r\n {showPerson.PersonAnualIncome !== undefined && (\r\n \r\n )}\r\n {showPerson.PersonAnualExtraIncome !== undefined && (\r\n \r\n )}\r\n {showPerson.JuridicalPersonSocietyTypeDescription !== undefined && (\r\n \r\n )}\r\n {showPerson.PersonStatus !== undefined && (\r\n \r\n )}\r\n\r\n {showPerson.PersonFiscalResidence !== undefined &&\r\n person &&\r\n person.PersonFiscalResidence != null &&\r\n changedPerson &&\r\n changedPerson.PersonFiscalResidence != null &&\r\n changedPerson.PersonFiscalResidence.length > 0 && (\r\n \r\n )}\r\n \r\n );\r\n}\r\n\r\nJuridicalPersonProfile.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n changedPerson: PropTypes.object,\r\n};\r\n\r\nJuridicalPersonProfile.defaultProps = {\r\n changedPerson: undefined,\r\n};\r\n\r\nexport default JuridicalPersonProfile;\r\n","import React from \"react\";\r\nimport { Form, FormGroup } from 'reactstrap';\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport {FormField} from \"../../../../../utils/FormFields\";\r\n\r\nfunction PhysicalPersonLegalAddress({person, changedPerson, showChanges, remove}) {\r\n const showLegalAddress = changedPerson || person;\r\n const editLegalAddress = changedPerson.LegalAddress[0];\r\n let compareLegalAddress;\r\n person.LegalAddress.forEach((d) => {\r\n if (parseInt(d.LegalAddressId, 10)\r\n === parseInt(editLegalAddress.LegalAddressId, 10)) {\r\n compareLegalAddress = d;\r\n }\r\n });\r\n let color = 'black';\r\n if (showLegalAddress) {\r\n if (compareLegalAddress === undefined) {\r\n color = 'green';\r\n } else {\r\n color = remove ? 'red' : '#36a9e1';\r\n }\r\n }\r\n return (\r\n
    \r\n {showChanges\r\n ? (\r\n \r\n {compareLegalAddress\r\n && (\r\n \r\n )}\r\n \r\n )\r\n : (\r\n \r\n {compareLegalAddress\r\n && (\r\n \r\n )}\r\n \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nPhysicalPersonLegalAddress.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n changedPerson: PropTypes.object.isRequired,\r\n showChanges: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default PhysicalPersonLegalAddress;\r\n\r\nconst FormToShow = ({legalAddress, refLegalAddress}) => (\r\n \r\n {legalAddress && (\r\n \r\n {legalAddress && legalAddress.LegalAddressCityName !== undefined && (\r\n \r\n )}\r\n {legalAddress && legalAddress.LegalAddressStateName !== undefined && (\r\n \r\n )}\r\n {legalAddress && legalAddress.LegalAddressCountryName !== undefined && (\r\n \r\n )}\r\n {legalAddress && legalAddress.LegalAddressStreet !== undefined && (\r\n \r\n )}\r\n {legalAddress && legalAddress.LegalAddressNumber !== undefined && (\r\n \r\n )}\r\n {legalAddress && legalAddress.LegalAddressType !== undefined && (\r\n \r\n )}\r\n {legalAddress && legalAddress.LegalAddressZipCode !== undefined && (\r\n \r\n )}\r\n {legalAddress && legalAddress.LegalAddressExtraInformation1 !== undefined && (\r\n \r\n )}\r\n {legalAddress && legalAddress.LegalAddressExtraInformation2 !== undefined && (\r\n \r\n )}\r\n \r\n )}\r\n\r\n);\r\n\r\nFormToShow.propTypes = {\r\n legalAddress: PropTypes.object.isRequired,\r\n refLegalAddress: PropTypes.object,\r\n};\r\n\r\nFormToShow.defaultProps = {\r\n refLegalAddress: undefined,\r\n};\r\n","import React from 'react';\r\nimport {\r\n Form,\r\n Label,\r\n FormGroup,\r\n} from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { FormField, SelectFormField, CustomFormInput } from '../../../../../utils/FormFields';\r\nimport CircularProggess from '../../../../CircularProgress/CircularProgress';\r\nimport { BankAccountStatus } from '../../../../Profile/Account/types';\r\n\r\nfunction PersonBankAccount({\r\n person, changedPerson, showChanges, currencies, fetchFile,remove\r\n}) {\r\n const editBankAccount = changedPerson.PersonBankAccount[0];\r\n let compareBankAccount;\r\n person.PersonBankAccount? person.PersonBankAccount.map((b) => {\r\n if (parseInt(b.PersonBankAccountItemId, 10) === parseInt(editBankAccount.PersonBankAccountItemId, 10)) {\r\n compareBankAccount = b;\r\n }\r\n return {};\r\n }):null;\r\n let color = 'black';\r\n if (showChanges) {\r\n if (remove) {\r\n color = 'red';\r\n } else if (compareBankAccount) {\r\n color = '#36a9e1';\r\n } else {\r\n color = 'green';\r\n }\r\n }\r\n\r\n const getFile = (file) => {\r\n const body = {\r\n fileId: file.ArchiveTemporalFileId\r\n }\r\n fetchFile(body, (response) => {\r\n var a = document.createElement('A');\r\n a.href = `data:application/octet-stream;base64,${response.blobfile}`;\r\n a.download = `${file.ArchiveName}.${file.ArchiveExtension}`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n })\r\n }\r\n return (\r\n
    \r\n \r\n {showChanges\r\n ? (\r\n \r\n {!editBankAccount.DeleteBankAccount\r\n && (\r\n \r\n )}\r\n \r\n )\r\n : (\r\n \r\n {compareBankAccount\r\n && (\r\n \r\n )}\r\n \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nPersonBankAccount.propTypes = {\r\n changedPerson: PropTypes.object.isRequired,\r\n person: PropTypes.object.isRequired,\r\n showChanges: PropTypes.bool.isRequired,\r\n currencies: PropTypes.array,\r\n fetchFile: PropTypes.func,\r\n remove: PropTypes.bool.isRequired,\r\n};\r\n\r\nPersonBankAccount.defaultProps = {\r\n currencies: undefined,\r\n};\r\n\r\nexport default PersonBankAccount;\r\n\r\nconst FormToShow = ({ bankAccount, refBankAcc, currencies, getFile }) => (\r\n \r\n {bankAccount.BankAccountItemId > 0 && (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {currencies ? (\r\n i.currencyId}\r\n getSelectItemName={(i) => i.currencyISO}\r\n value={bankAccount.PersonBankAccountCurrency}\r\n name=\"\"\r\n />\r\n ) : }\r\n \r\n \r\n \r\n i}\r\n getSelectItemName={i => BankAccountStatus[i]}\r\n value={bankAccount.PersonBankAccountStatus}\r\n name=\"\"\r\n />\r\n \r\n {bankAccount.Archives !== undefined && bankAccount.Archives.map((item) => (\r\n \r\n \r\n {item.ArchiveTemporalFileId > 0 ? \r\n getFile(item)} style = {{cursor:'pointer'}}>\r\n {`${item.ArchiveName}.${item.ArchiveExtension}`}\r\n \r\n : /* Este es el caso para las alertas que tienen los blobs en el objeto item */\r\n \r\n {`${item.ArchiveName}.${item.ArchiveExtension}`}\r\n \r\n }\r\n \r\n \r\n ))}\r\n \r\n \r\n);\r\n\r\nFormToShow.propTypes = {\r\n bankAccount: PropTypes.object.isRequired,\r\n refBankAcc: PropTypes.object,\r\n currencies: PropTypes.array,\r\n getFile: PropTypes.func\r\n};\r\n\r\nFormToShow.defaultProps = {\r\n refBankAcc: undefined,\r\n currencies: undefined,\r\n};\r\n","import React from \"react\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport { FormField, SelectFormField } from \"../../../../../utils/FormFields\";\r\nimport { getLocalDate } from \"../../../../../utils/dateUtils\";\r\n\r\nfunction PersonKYC({ person, changedPerson, ...props }) {\r\n const { showChanges } = props;\r\n changedPerson = showChanges ? changedPerson : undefined;\r\n const showPerson = changedPerson || person;\r\n const emptyDate = new Date(0);\r\n return (\r\n \r\n \r\n {showPerson.KYC.KYCDate !== undefined && (\r\n \r\n )}\r\n {showPerson.KYC.KYCReason !== undefined && (\r\n \r\n )}\r\n {showPerson.KYC.KYCAdvisorComments !== undefined && (\r\n \r\n )}\r\n \r\n );\r\n}\r\n\r\nPersonKYC.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n changedPerson: PropTypes.object,\r\n};\r\n\r\nPersonKYC.defaultProps = {\r\n changedPerson: undefined,\r\n};\r\n\r\nexport default PersonKYC;\r\n","/* eslint-disable no-nested-ternary */\r\nimport React from \"react\";\r\nimport {Form, FormGroup, Label} from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport {FormField} from \"../../../../../utils/FormFields\";\r\n\r\nfunction PhonesTab({person, changedPerson, showChanges, remove}) {\r\n const editPhone = changedPerson.Phone[0];\r\n var comparePhone = {};\r\n person.Phone.forEach(d => {\r\n if (String(d.PhoneId) == String(editPhone.PhoneId)) {\r\n comparePhone = d;\r\n }\r\n });\r\n let color = \"black\";\r\n if (showChanges) {\r\n if (comparePhone === undefined) {\r\n color = \"green\";\r\n } else {\r\n color = remove ? \"red\" : \"#36a9e1\";\r\n }\r\n }\r\n return (\r\n
    \r\n \r\n {showChanges ? (\r\n \r\n {editPhone !== undefined &&\r\n (editPhone.PhoneId == 0\r\n ? \"New Phone\"\r\n : remove\r\n ? \"Remove Phone\"\r\n : \"Edited Phone\")}\r\n \r\n ) : (\r\n \"Actual Phone\"\r\n )}\r\n \r\n {showChanges ? (\r\n \r\n {comparePhone && (\r\n \r\n )}\r\n \r\n ) : (\r\n \r\n {comparePhone && }\r\n \r\n )}\r\n \r\n );\r\n}\r\n\r\nPhonesTab.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n changedPerson: PropTypes.object,\r\n showChanges: PropTypes.bool.isRequired,\r\n remove: PropTypes.bool.isRequired\r\n};\r\n\r\nPhonesTab.defaultProps = {\r\n changedPerson: undefined\r\n};\r\n\r\nconst FormToShow = ({phone, compareDoc}) => (\r\n \r\n \r\n \r\n \r\n);\r\n\r\nFormToShow.propTypes = {\r\n phone: PropTypes.object.isRequired,\r\n compareDoc: PropTypes.object\r\n};\r\n\r\nFormToShow.defaultProps = {\r\n compareDoc: undefined\r\n};\r\n\r\nexport default PhonesTab;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { OptionsWhyWithoutTIN } from '../types';\r\nimport {\r\n FormField, CheckFormField, SelectFormField,\r\n} from '../../../../../../utils/FormFields';\r\n\r\nfunction PhysicalPersonLegalInfo({\r\n person,\r\n changedPerson,\r\n}) {\r\n const showPerson = changedPerson || person;\r\n return (\r\n \r\n {showPerson.PersonAnualIncome !== undefined && (\r\n \r\n )}\r\n {showPerson.PersonExtraIncomeVolume !== undefined && (\r\n \r\n )}\r\n {showPerson.PersonQualification !== undefined && (\r\n \r\n )}\r\n {showPerson.PhysicalPersonPatrimonyId !== undefined && (\r\n \r\n )}\r\n {showPerson.PersonProfessionId !== undefined && (\r\n \r\n )}\r\n {showPerson.PersonActivitySectorId !== undefined && (\r\n \r\n )}\r\n {showPerson.PhysicalPersonPublicPositionId !== undefined && (\r\n 1 ? 'PEP' : undefined}\r\n changedColor={changedPerson}\r\n />\r\n )}\r\n {showPerson.PhysicalPersonLinkId !== undefined && (\r\n \r\n )}\r\n {showPerson.PersonLinkPublicPositionId !== undefined && (\r\n 1 ? 'PEP Related' : undefined}\r\n value={showPerson.PersonLinkPublicPositionName}\r\n name=\"PersonLinkPublicPositionId\"\r\n changedColor={changedPerson}\r\n />\r\n )}\r\n {showPerson.PhysicalPersonInstitution !== undefined && (\r\n \r\n )}\r\n {showPerson.PhysicalPersonWebUser !== undefined && (\r\n \r\n )}\r\n {showPerson.PersonCompanyLinkId !== undefined && (\r\n \r\n )}\r\n {showPerson.PhysicalPersonWorkHistoryActivities !== undefined && (\r\n \r\n )}\r\n {showPerson.PhysicalPersonWorkHistoryYears !== undefined && (\r\n \r\n )}\r\n {showPerson.PhysicalPersonWorkHistoryRelevantPosition !== undefined && (\r\n \r\n )}\r\n {showPerson.PhysicalPersonWorkHistoryIncome !== undefined && (\r\n \r\n )}\r\n \r\n );\r\n}\r\n\r\nPhysicalPersonLegalInfo.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n changedPerson: PropTypes.object,\r\n};\r\n\r\nPhysicalPersonLegalInfo.defaultProps = {\r\n changedPerson: undefined,\r\n};\r\n\r\nexport default PhysicalPersonLegalInfo;\r\n","import React from \"react\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport {FormField, SelectFormField} from \"../../../../../../utils/FormFields\";\r\nimport PhysicalPersonLegalAddress from \"../LegalAddress\";\r\nimport PhysicalPersonLegalInfo from \"./LegalInfo\";\r\nimport PhysicalPersonFiscalResidence from \"../FiscalReference\";\r\nimport {getLocalDate} from \"../../../../../../utils/dateUtils\";\r\n\r\nfunction PhysicalPersonProfile({person, changedPerson}) {\r\n const showPerson = changedPerson || person;\r\n return (\r\n \r\n \r\n {showPerson.PhysicalPersonGender !== undefined && (\r\n i.id}\r\n getSelectItemName={i => i.desc}\r\n />\r\n )}\r\n {showPerson.PersonIsMinimal !== undefined && (\r\n i.id}\r\n getSelectItemName={i => i.desc}\r\n />\r\n )}\r\n {showPerson.PhysicalPersonFirstName !== undefined && (\r\n \r\n )}\r\n {showPerson.PhysicalPersonSecondName !== undefined && (\r\n \r\n )}\r\n {showPerson.PhysicalPersonFirstLastName !== undefined && (\r\n \r\n )}\r\n {showPerson.PhysicalPersonSecondLastName !== undefined && (\r\n \r\n )}\r\n {showPerson.PhysicalPersonEmail !== undefined && (\r\n \r\n )}\r\n\r\n {showPerson.PersonStatus !== undefined && (\r\n \r\n \r\n \r\n )}\r\n\r\n {showPerson.PersonPassedAwayDate !== undefined && (\r\n \r\n )}\r\n \r\n {showPerson.PhysicalPersonDateOfBirth !== undefined && (\r\n \r\n )}\r\n {showPerson.PhysicalPersonCountryOfBirthName !== undefined && (\r\n \r\n )}\r\n {showPerson.PhysicalPersonCityOfBirthName !== undefined && (\r\n \r\n )}\r\n {showPerson.PhysicalPersonCivilStatus && (\r\n \r\n )}\r\n {showPerson.SpouseFirstName !== undefined && (\r\n \r\n )}\r\n {showPerson.SpouseSecondName !== undefined && (\r\n \r\n )}\r\n {showPerson.SpouseFirstLastName !== undefined && (\r\n \r\n )}\r\n {showPerson.SpouseSecondLastName !== undefined && (\r\n \r\n )}\r\n {showPerson.SpouseDocumentTypeName !== undefined && (\r\n \r\n )}\r\n {showPerson.SpouseDocumentNumber !== undefined && (\r\n \r\n )}\r\n {showPerson.SpouseDocumentCountryOfIssueName !== undefined && (\r\n \r\n )}\r\n {showPerson.PhysicalPersonPositionIndustry !== undefined && (\r\n \r\n )}\r\n {showPerson.PhysicalPersonWorkingIndustry !== undefined && (\r\n \r\n )}\r\n {showPerson.PersonRelatedFrom !== undefined && (\r\n \r\n )}\r\n {showPerson.PersonObservations !== undefined && (\r\n \r\n )}\r\n {showPerson.PersonCurrencyType !== undefined && (\r\n \r\n )}\r\n \r\n {showPerson.PersonFiscalResidence!== undefined &&person&&person.PersonFiscalResidence!=null&&\r\n changedPerson&&changedPerson.PersonFiscalResidence!=null&&\r\n changedPerson.PersonFiscalResidence.length>0&& (\r\n \r\n )}\r\n \r\n );\r\n}\r\n\r\nPhysicalPersonProfile.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n changedPerson: PropTypes.object\r\n};\r\n\r\nPhysicalPersonProfile.defaultProps = {\r\n changedPerson: undefined\r\n};\r\n\r\nexport default PhysicalPersonProfile;\r\n","import React from \"react\";\r\nimport {Form, FormGroup} from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport PhysicalPersonProfile from \"./PhysicalPersonForm\";\r\nimport JuridicalPersonProfile from \"./JuridicalPersonForm\";\r\n\r\nfunction PersonProfileTab({person, changedPerson, showChanges}) {\r\n const editPerson = {};\r\n const comparePerson = {};\r\n Object.keys(person).map(key => {\r\n if (String(changedPerson[key]) !== String(person[key])) {\r\n editPerson[key] = changedPerson[key];\r\n comparePerson[key] = person[key];\r\n }\r\n return {};\r\n });\r\n editPerson.PersonType = person.PersonType;\r\n comparePerson.PersonType = person.PersonType;\r\n\r\n return (\r\n
    \r\n \r\n {person.PersonType === \"Physical\" ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n
    \r\n );\r\n}\r\n\r\nPersonProfileTab.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n changedPerson: PropTypes.object.isRequired,\r\n showChanges: PropTypes.bool.isRequired\r\n};\r\n\r\nexport default PersonProfileTab;\r\n","import React from 'react';\r\nimport {\r\n Form, FormGroup, Label,\r\n} from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\nimport { FormField } from '../../../../../utils/FormFields';\r\n\r\nfunction ShareHoldersTab({\r\n person,\r\n changedPerson,\r\n showChanges,\r\n edit,\r\n}) {\r\n const editShareHolder = changedPerson.ShareHolder[0];\r\n let compareHolder;\r\n person.ShareHolder.map((s) => {\r\n if (parseInt(s.ShareHolderId, 10)\r\n === parseInt(editShareHolder.ShareHolderId, 10)) {\r\n compareHolder = s;\r\n }\r\n return {};\r\n });\r\n let color = 'black';\r\n if (showChanges && editShareHolder.ShareHolderId > 0 && edit) {\r\n color = '#36a9e1';\r\n } else if (showChanges && editShareHolder.ShareHolderId > 0 && !edit) {\r\n color = 'red';\r\n } else if (showChanges && parseInt(editShareHolder.ShareHolderId, 10) === 0) {\r\n color = 'green';\r\n }\r\n return (\r\n
    \r\n \r\n {showChanges\r\n ? (\r\n \r\n {(parseInt(editShareHolder.ShareHolderId, 10) === 0 || edit)\r\n && }\r\n \r\n )\r\n : (\r\n \r\n {compareHolder && }\r\n \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nShareHoldersTab.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n changedPerson: PropTypes.array,\r\n showChanges: PropTypes.bool.isRequired,\r\n edit: PropTypes.bool.isRequired,\r\n};\r\n\r\nShareHoldersTab.defaultProps = {\r\n changedPerson: undefined,\r\n};\r\n\r\nfunction FormToShow({ shareHolder, compareHolder }) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nFormToShow.propTypes = {\r\n compareHolder: PropTypes.object,\r\n shareHolder: PropTypes.object.isRequired,\r\n};\r\n\r\nFormToShow.defaultProps = {\r\n compareHolder: undefined,\r\n};\r\n\r\nexport default (ShareHoldersTab);\r\n","import React, { Fragment } from \"react\";\r\nimport { Form, FormGroup, Label, Input } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport { CircularProgress } from \"../../../../..\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\n\r\nimport { FormField } from \"../../../../../utils/FormFields\";\r\n\r\nfunction PersonSuitability({ person, changedPerson, showChanges, remove }) {\r\n const showLegalAddress = changedPerson || person;\r\n const editLegalAddress = changedPerson.LegalAddress[0];\r\n let compareLegalAddress;\r\n person.LegalAddress.forEach((d) => {\r\n if (parseInt(d.LegalAddressId, 10) === parseInt(editLegalAddress.LegalAddressId, 10)) {\r\n compareLegalAddress = d;\r\n }\r\n });\r\n\r\n const showPersonSuitability = changedPerson || person;\r\n const editPersonSuitabilty = changedPerson.PersonQuestion;\r\n let comparePersonSuitability;\r\n\r\n let color = \"black\";\r\n if (showPersonSuitability) {\r\n if (compareLegalAddress === undefined) {\r\n color = \"green\";\r\n } else {\r\n color = remove ? \"red\" : \"#36a9e1\";\r\n }\r\n }\r\n return (\r\n
    \r\n {showChanges ? (\r\n \r\n {compareLegalAddress && (\r\n \r\n )}\r\n \r\n ) : (\r\n \r\n {compareLegalAddress && (\r\n \r\n )}\r\n \r\n )}\r\n
    \r\n );\r\n}\r\n\r\n// PhysicalPersonLegalAddress.propTypes = {\r\n// person: PropTypes.object.isRequired,\r\n// changedPerson: PropTypes.object.isRequired,\r\n// showChanges: PropTypes.bool.isRequired,\r\n// };\r\n\r\nexport default PersonSuitability;\r\n\r\nconst FormToShow = ({ questions, changedQuestions }) => {\r\n return (\r\n \r\n {!questions ? (\r\n \r\n ) : (\r\n
    \r\n {questions.length > 0 ? (\r\n questions.map((q, qIndex) => {\r\n const questionToCompare = changedQuestions.find(\r\n (elemento) => elemento.QuestionId == q.QuestionId\r\n );\r\n if (!compareQuestions(q.PersonAnswer, questionToCompare.PersonAnswer)) {\r\n return (\r\n \r\n
    \r\n \r\n \r\n {q.QuestionDescription}\r\n \r\n {q.PersonAnswer.map((a, aIndex) => (\r\n \r\n \r\n handleChangeAnswer(qIndex, aIndex)}\r\n disabled={true}\r\n />\r\n {` ${a.AnswerDescription}`}\r\n \r\n \r\n ))}\r\n \r\n
    \r\n
    \r\n );\r\n }\r\n })\r\n ) : (\r\n No Questions.\r\n )}\r\n\r\n {/* {questions.length > 0 && (\r\n handleSave()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Save\r\n \r\n )} */}\r\n
    \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nconst compareQuestions = (question1, question2) => {\r\n for (let i = 0; i < question1.length; i++) {\r\n const obj1 = question1[i];\r\n const questionToCompare = question2.find((elemento) => elemento.AnswerId == obj1.AnswerId);\r\n // Comparar campo por campo\r\n if (obj1.AnswerIsResponse !== questionToCompare.AnswerIsResponse) {\r\n return false; // Si un campo no es igual, retornar false\r\n }\r\n }\r\n return true;\r\n};\r\n\r\nFormToShow.propTypes = {\r\n legalAddress: PropTypes.object.isRequired,\r\n refLegalAddress: PropTypes.object,\r\n};\r\n\r\nFormToShow.defaultProps = {\r\n refLegalAddress: undefined,\r\n};\r\n","export const TargetType = {\r\n Account: 'Account',\r\n Physical: 'Physical',\r\n Juridical: 'Juridical',\r\n};\r\n\r\nexport const PersonType = {\r\n All: 'All',\r\n Physical: 'Physical',\r\n Juridical: 'Juridical',\r\n};\r\n\r\nexport const CivilStatus = {\r\n Single: 'Single',\r\n Engaged: 'Engaged',\r\n Married: 'Married',\r\n Divorced: 'Divorced',\r\n Widower: 'Widower',\r\n};\r\n\r\nexport function getTargetTypeName(type) {\r\n return type;\r\n}\r\n\r\nexport const PhysicalPersonRelationshipAccount = {\r\n Attorney: 'Attorney',\r\n Holder: 'Holder',\r\n Beneficiary: 'Beneficiary',\r\n};\r\n\r\nexport const PhysicalPersonRelationshipAccountJuridical = {\r\n Attorney: 'Attorney',\r\n Representative: 'Representative',\r\n None: 'None',\r\n WebAuthorized: 'WebAuthorized',\r\n Holder: 'Holder',\r\n};\r\n\r\nexport const OptionsWhyWithoutTIN = [{\r\n id: 'Option1',\r\n text: 'El país donde el titular de la cuenta está sujeto a impuestos tributarios como residente no emite TIN.',\r\n}, {\r\n id: 'Option2',\r\n text: 'El titular de la cuenta está imposibilitado de otra manera para obtener un TIN o número equivalente.',\r\n}, {\r\n id: 'Option3',\r\n text: 'No se requiere TIN porque la jurisdicción de la residencia fiscal que emitió el TIN no exige que una Institución Financiera recolecte e informe el TIN.',\r\n}];\r\n\r\nexport const DocumentType = {\r\n DNI: 'DNI',\r\n Passport: 'Passport',\r\n IdentityCard: 'Identity Card',\r\n};\r\n","import React, { useReducer, useEffect, useState } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Button } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\n\r\nimport { alertReducer } from \"../Alert/store/reducer\";\r\nimport { defaultState, parseAlert, initialize } from \"../Alert/store/store\";\r\nimport style from \"../Alert/Alert.module.scss\";\r\nimport Comparer, { personChangeType } from \"./Comparer\";\r\nimport ModalError from \"../../Profile/Modal/ModalError\";\r\nimport { parseDate } from \"../../../utils\";\r\n\r\nconst getAccountType = {\r\n Holders: \"Holders\",\r\n Questions: \"Questions\",\r\n KYC: \"KYC\",\r\n Documents: \"Documents\",\r\n InvestmentProfile: \"InvestmentProfile\",\r\n Profile: \"Profile\",\r\n SignatureSets: \"SignatureSets\",\r\n References: \"References\",\r\n BankAccounts: \"BankAccounts\",\r\n};\r\n\r\nconst AccountComparer = ({ open, toggle, ...props }) => {\r\n const [requestedModification, setModifications] = useState(undefined);\r\n const [account, setAccount] = useState(undefined);\r\n const [person, setPerson] = useState(undefined);\r\n const [currencies, setCurrencies] = useState(undefined);\r\n const [closing, setClosing] = useState(false);\r\n const [saving, setSaving] = useState(false);\r\n const [state, dispatch] = useReducer(\r\n alertReducer,\r\n defaultState(),\r\n initialize(props)\r\n );\r\n const [modalError, setModalError] = useState({\r\n open: false,\r\n message: \"\",\r\n });\r\n\r\n const { ui, alertEv } = state;\r\n\r\n const fetchAccount = (id, sector) => {\r\n const body = {\r\n AccountGetInfo: {\r\n GetAccountDataId: id,\r\n GetAccountDataType: sector,\r\n },\r\n };\r\n props.fetchs.account(body, (response) => {\r\n if (response && response.SDTAccount) {\r\n setAccount(response.SDTAccount);\r\n }\r\n });\r\n };\r\n\r\n const fetchPerson = (id) => {\r\n const body = {\r\n personId: id,\r\n };\r\n props.fetchs.person(body, (response) => {\r\n if (response && response.personInfo) {\r\n setPerson(response.personInfo);\r\n }\r\n });\r\n };\r\n\r\n const fetchCurrencies = () => {\r\n props.fetchs.currencies({}, (response) => {\r\n if (response && response.currencies) setCurrencies(response.currencies);\r\n });\r\n };\r\n\r\n const fetchAlert = (id) => {\r\n props.fetchs.alert({ id }, (r) => {\r\n if (r && r.alertEvent) {\r\n if (ui.loadings.alert) {\r\n dispatch({ type: \"UPDATE_LOADING\", loadings: { alert: false } });\r\n }\r\n dispatch({ type: \"ALERT_UPDATE\", alert: parseAlert(r.alertEvent) });\r\n if (r.alertEvent.refTag) {\r\n const modifications = JSON.parse(r.alertEvent.refTag);\r\n setModifications(modifications);\r\n fetchCurrencies();\r\n if (modifications.Account) {\r\n fetchAccount(\r\n modifications.Account.AccountId,\r\n modifications.AccountChangeType\r\n );\r\n if (\r\n modifications.AccountChangeType === getAccountType.Profile ||\r\n modifications.AccountChangeType === getAccountType.BankAccounts\r\n ) {\r\n }\r\n } else {\r\n fetchPerson(modifications.Person.PersonId);\r\n }\r\n }\r\n }\r\n });\r\n };\r\n\r\n const handleClose = () => {\r\n const eventIN = { ...alertEv };\r\n eventIN.status = \"Closed\";\r\n setClosing(true);\r\n props.fetchs.updateAlert({ eventIN }, () => {\r\n setClosing(false);\r\n setSaving(false);\r\n toggle();\r\n });\r\n };\r\n\r\n const handleReject = () => {\r\n const eventIN = { ...alertEv };\r\n eventIN.status = \"Rejected\";\r\n setClosing(true);\r\n props.fetchs.updateAlert({ eventIN }, () => {\r\n setClosing(false);\r\n setSaving(false);\r\n toggle();\r\n });\r\n };\r\n \r\n \r\n\r\n const toggleModalError = (e, message) =>\r\n setModalError({\r\n open: !modalError.open,\r\n message,\r\n });\r\n\r\n const handleSave = () => {\r\n setSaving(true);\r\n if (requestedModification.Account) {\r\n const body = {\r\n account: requestedModification.Account,\r\n accountChangeType: requestedModification.AccountChangeType,\r\n };\r\n props.fetchs.updateAccount(body, (response) => {\r\n if (response.result.Code === 200) {\r\n handleClose();\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result\r\n ? response.result.Description\r\n : \"Server Error\"\r\n );\r\n setSaving(false);\r\n }\r\n });\r\n } else {\r\n switch (requestedModification.PersonChangeType) {\r\n case personChangeType.Information:\r\n props.fetchs.updatePerson(\r\n {\r\n person: requestedModification.Person,\r\n },\r\n (response) => {\r\n if (response.result.Code === 200) {\r\n handleClose();\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result\r\n ? response.result.Description\r\n : \"Server Error\"\r\n );\r\n setSaving(false);\r\n }\r\n }\r\n );\r\n break;\r\n case personChangeType.Documents:\r\n props.fetchs.updatePersonDocuments(\r\n {\r\n person: requestedModification.Person,\r\n file: requestedModification.file,\r\n remove: requestedModification.delete,\r\n },\r\n (response) => {\r\n if (response.result.Code === 200) {\r\n handleClose();\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result\r\n ? response.result.Description\r\n : \"Server Error\"\r\n );\r\n setSaving(false);\r\n }\r\n }\r\n );\r\n break;\r\n case personChangeType.Phone:\r\n props.fetchs.updatePersonPhone(\r\n {\r\n person: requestedModification.Person,\r\n file: requestedModification.file,\r\n delete: requestedModification.delete,\r\n },\r\n (response) => {\r\n if (response.result.Code === 200) {\r\n handleClose();\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result\r\n ? response.result.Description\r\n : \"Server Error\"\r\n );\r\n setSaving(false);\r\n }\r\n }\r\n );\r\n break;\r\n case personChangeType.ShareHolders:\r\n props.fetchs.updatePersonShareHolder(\r\n {\r\n person: requestedModification.Person,\r\n edit: requestedModification.aux,\r\n },\r\n (response) => {\r\n if (response.result.Code === 200) {\r\n handleClose();\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result\r\n ? response.result.Description\r\n : \"Server Error\"\r\n );\r\n setSaving(false);\r\n }\r\n }\r\n );\r\n break;\r\n case personChangeType.LegalAddress:\r\n props.fetchs.fetchUpdatePersonLegalAddress(\r\n {\r\n person: requestedModification.Person,\r\n edit: requestedModification.aux,\r\n delete: requestedModification.delete,\r\n },\r\n (response) => {\r\n if (response.result.Code === 200) {\r\n handleClose();\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result\r\n ? response.result.Description\r\n : \"Server Error\"\r\n );\r\n setSaving(false);\r\n }\r\n }\r\n );\r\n break;\r\n case personChangeType.FiscalResidence:\r\n props.fetchs.updatePersonFiscalResidences(\r\n {\r\n person: requestedModification.Person,\r\n delete: requestedModification.delete,\r\n },\r\n (response) => {\r\n if (response.result.Code === 200) {\r\n handleClose();\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result\r\n ? response.result.Description\r\n : \"Server Error\"\r\n );\r\n setSaving(false);\r\n }\r\n }\r\n );\r\n break;\r\n\r\n case personChangeType.KYC:\r\n props.fetchs.fetchPersonKYC(\r\n {\r\n person: requestedModification.Person,\r\n edit: requestedModification.aux,\r\n },\r\n (response) => {\r\n if (response.result.Code === 200) {\r\n handleClose();\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result\r\n ? response.result.Description\r\n : \"Server Error\"\r\n );\r\n setSaving(false);\r\n }\r\n }\r\n );\r\n break;\r\n case personChangeType.BankAccount:\r\n props.fetchs.fetchUpdatePersonBankAccount(\r\n {\r\n person: requestedModification.Person,\r\n edit: requestedModification.aux,\r\n delete: requestedModification.delete,\r\n },\r\n (response) => {\r\n if (response.result.Code === 200) {\r\n handleClose();\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result\r\n ? response.result.Description\r\n : \"Server Error\"\r\n );\r\n setSaving(false);\r\n }\r\n }\r\n );\r\n break;\r\n case personChangeType.Suitability:\r\n props.fetchs.fetchPersonSuitability(\r\n { person: requestedModification.Person },\r\n (response) => {\r\n if (response.result.Code === 200) {\r\n handleClose();\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result\r\n ? response.result.Description\r\n : \"Server Error\"\r\n );\r\n setSaving(false);\r\n }\r\n }\r\n );\r\n break;\r\n case personChangeType.ExtendedData:\r\n props.fetchs.fetchUpdatePersonExtendedData({ personId: requestedModification.Person.PersonId, extendedData: requestedModification.Person.PersonExtendedData }, (response) => {\r\n if (response.result.Code === 200) {\r\n handleClose();\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result ? response.result.Description : \"Server Error\"\r\n );\r\n setSaving(false);\r\n }\r\n });\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n fetchAlert(alertEv.id);\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [alertEv.id]);\r\n\r\n const { user } = props;\r\n return (\r\n \r\n \r\n
    {alertEv.title}
    \r\n
    \r\n \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n toggle()}\r\n >\r\n Close\r\n \r\n {user &&\r\n user.role === \"Compliance\" &&\r\n alertEv.status === \"WorkingCompliance\" && (\r\n \r\n \r\n {closing && !saving ? \"Rejecting...\" : \"Reject\"}\r\n \r\n \r\n {saving && !closing ? (\r\n \"Saving...\"\r\n ) : (\r\n \r\n {closing && saving ? \"Closing...\" : \"Save\"}\r\n \r\n )}\r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nAccountComparer.propTypes = {\r\n open: PropTypes.bool.isRequired,\r\n toggle: PropTypes.func.isRequired,\r\n fetchs: PropTypes.object.isRequired,\r\n user: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default AccountComparer;\r\n","import React from \"react\";\r\nimport CircularProgress from \"../../../components/CircularProgress/CircularProgress\";\r\nimport style from \"./styles.module.scss\";\r\n\r\nexport const LoadingMessage = ({ text, className = \"\" }) => (\r\n
    \r\n \r\n {text}\r\n
    \r\n);\r\n\r\nexport const addMonth = function (date, monthsToAdd) {\r\n const d = date;\r\n d.setMonth(d.getMonth() + monthsToAdd);\r\n return d;\r\n};\r\n\r\nexport const addDay = function (date, daysToAdd) {\r\n const d = date;\r\n d.setDate(d.getDate() + daysToAdd);\r\n return d;\r\n};\r\n\r\nexport const getBalanceTypeName = (value) => BalanceTypes.find((type) => type.value == value).name;\r\n\r\nexport const getBalanceTypeValue = (name) => {\r\n const v = BalanceTypes.find((type) => type.name == name);\r\n if (v) return v.value;\r\n else return BalanceTypes[0].value;\r\n};\r\nexport const BalanceTypes = [\r\n { description: \"Current\", name: \"Current\", value: 1 },\r\n { description: \"Custody\", name: \"Custody\", value: 2 },\r\n { description: \"Tax Custody\", name: \"TaxCustody\", value: 3 },\r\n { description: \"Repo\", name: \"Repo\", value: 4 },\r\n { description: \"Margin\", name: \"Margin\", value: 5 },\r\n { description: \"Self Custody\", name: \"SelfCustody\", value: 6 },\r\n { description: \"Warrant\", name: \"Warrant\", value: 7 },\r\n { description: \"Savings\", name: \"Savings\", value: 8 },\r\n { description: \"Local Custody\", name: \"LocalCustody\", value: 9 },\r\n { description: \"Short\", name: \"Short\", value: 10 },\r\n { description: \"COD\", name: \"COD\", value: 11 },\r\n { description: \"Money Market Fund\", name: \"MoneyMarketFund\", value: 12 },\r\n { description: \"Available For Sale\", name: \"AFS\", value: 13 },\r\n { description: \"Hold to Maturity\", name: \"HTM\", value: 14 },\r\n { description: \"Stock T\", name: \"StockT\", value: 15 },\r\n { description: \"Stock O\", name: \"StockO\", value: 16 },\r\n { description: \"Stock U\", name: \"StockU\", value: 17 },\r\n { description: \"Stock I\", name: \"StockI\", value: 18 },\r\n { description: \"Stock S\", name: \"StockS\", value: 19 },\r\n { description: \"Markup\", name: \"Markup\", value: 20 },\r\n { description: \"PendingSet\", name: \"PendingSet\", value: 21 },\r\n];\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"loadingMessage\":\"styles-module_loadingMessage_1zU3C\"};","import React, { useReducer, useEffect } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Button, Col, Row, Input } from \"reactstrap\";\r\nimport { defaultState, initialize, parseAlert } from \"./store/store\";\r\nimport { alertReducer } from \"./store/reducer\";\r\nimport { FormattedDate, FormattedTime } from \"react-intl\";\r\nimport style from \"./Alert.module.scss\";\r\nimport { NewPost, Summary, PostList } from \"./Items/\";\r\nimport { PersonType } from \"../AlertSimple/Fields/types\";\r\nimport ChildAlert from \"./Items/ChildAlert/ChildAlert\";\r\nimport { parseDate } from \"../../../utils/dateUtils\";\r\n\r\nconst Alert = ({ open, toggle, ...props }) => {\r\n const [state, dispatch] = useReducer(alertReducer, defaultState(), initialize(props));\r\n const { ui, alertEv, lockDate, hasLockDate, loadingUpdateDate, messageDisplay } = state;\r\n\r\n useEffect(() => {\r\n fetchAlertFull(alertEv.id);\r\n }, [alertEv.id]);\r\n\r\n const fetchAlertFull = (id) => {\r\n props.fetchs.alert({ id }, (r) => {\r\n if (ui.loadings.alert) {\r\n dispatch({ type: \"UPDATE_LOADING\", loadings: { alert: false } });\r\n }\r\n dispatch({ type: \"ALERT_UPDATE\", alert: parseAlert(r.alertEvent) });\r\n dispatch({\r\n type: \"CHANGE_FIELDS\",\r\n fields: {\r\n hasLockDate: r.alertEvent.hasExpirationDate,\r\n lockDate: r.alertEvent.expirationDate,\r\n },\r\n });\r\n \r\n if (r.alertEvent.processes == \"CheckList\") {\r\n props.fetchs.accountPersonRelationship({ id: r.alertEvent.personId }, (r) => {\r\n if (r != null && r.relationship.length > 0) {\r\n dispatch({ type: \"ALERT_UPDATE\", alert: { accountsRelated: r.relationship } });\r\n }\r\n });\r\n props.fetchs.fetchAlertAntiClientDetails({ clientId: r.alertEvent.personId , listCheckId: r.alertEvent.refId }, (r) => {\r\n if (r != null && r.details != null) {\r\n let detailsString = r.details;\r\n let details = detailsString.split(\";\");\r\n dispatch({ type: \"ALERT_UPDATE\", alert: { antiClientDetails: details } });\r\n }\r\n });\r\n props.fetchs.fetchPersonInfo({ personId: r.alertEvent.personId }, (r) => {\r\n if (r != null) {\r\n dispatch({ type: \"ALERT_UPDATE\", alert: { personInfo: r.personInfo } });\r\n }\r\n });\r\n }\r\n });\r\n };\r\n\r\n const getAllFiles = () => {\r\n if (alertEv.events == null) return [];\r\n let files = [];\r\n alertEv.events.forEach((e) => files.push(...e.files));\r\n return files;\r\n };\r\n\r\n const updateLockDate = (fields) => {\r\n dispatch({ type: \"CHANGE_FIELDS\", fields });\r\n };\r\n\r\n const sendLockDate = () => {\r\n dispatch({\r\n type: \"CHANGE_FIELDS\",\r\n fields: { loadingUpdateDate: true, messageDisplay: false },\r\n });\r\n props.callApi(\"UpdateAccountLockDate\", { id: alertEv.id, date: lockDate }, (response, error) => {\r\n dispatch({\r\n type: \"CHANGE_FIELDS\",\r\n fields: { loadingUpdateDate: false, messageDisplay: true },\r\n });\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n
    {alertEv.title}
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \r\n {ui.childAlert.open && (\r\n dispatch(a)}\r\n fetchs={{\r\n downloadFile: props.fetchs.downloadFile,\r\n alert: props.fetchs.alert,\r\n }}\r\n />\r\n )}\r\n {!ui.childAlert.open && (\r\n \r\n dispatch(a)}\r\n antiClientDetails={alertEv.antiClientDetails}\r\n accountsRelated={alertEv.accountsRelated}\r\n loadingAlert={ui.loadings.alert}\r\n title={alertEv.title}\r\n description={alertEv.description}\r\n personType={alertEv.personType}\r\n typeAlias={alertEv.personType == PersonType.All ? alertEv.accountId : alertEv.personId}\r\n relateds={alertEv.relateds}\r\n alertId={alertEv.id}\r\n refId={alertEv.refId}\r\n reftag={alertEv.refTag}\r\n days={alertEv.days ? alertEv.days : 0}\r\n trigger={alertEv.trigger}\r\n status={alertEv.status}\r\n markFalseCoincidence={alertEv.falseCoincidenceListCheck}\r\n processes={alertEv.processes}\r\n role={props.user.role}\r\n dataRelated={alertEv.dataRelated}\r\n name={alertEv.name}\r\n files={getAllFiles()}\r\n requestClosure={alertEv.requestClosure}\r\n closedAccountDate={alertEv.closedAccountDate}\r\n closedAccount={alertEv.closedAccount}\r\n Link={props.link}\r\n personInfo={alertEv.personInfo}\r\n alert={alertEv}\r\n fetchs={{\r\n send: props.fetchs.send,\r\n fileTypes: props.fetchs.fileTypes,\r\n downloadFile: props.fetchs.downloadFile,\r\n downloadPdf: props.fetchs.downloadPdf,\r\n updateStatus: props.fetchs.updateStatus,\r\n falseCoincidenceCheckList: props.fetchs.falseCoincidenteCheckList,\r\n closeAccountAlert: props.fetchs.closeAccountAlert,\r\n clientInfo: props.fetchs.fetchPersonInfo,\r\n mergePeople: props.fetchs.mergePeople,\r\n getParameterValue: props.fetchs.getParameterValue,\r\n }}\r\n />\r\n {hasLockDate ? (\r\n
    \r\n \r\n \r\n Account lock date:\r\n \r\n \r\n updateLockDate({ lockDate: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n {messageDisplay ? (\r\n Date was successfully updated\r\n ) : (\r\n
    \r\n )}\r\n
    \r\n ) : (\r\n
    \r\n )}\r\n dispatch(a)}\r\n user={props.user}\r\n readonly={alertEv.status == \"Closed\"}\r\n alertId={alertEv.id}\r\n status={alertEv.status}\r\n processes={alertEv.processes}\r\n fetchs={{\r\n addToHistory: props.fetchs.addToHistory,\r\n updateStatus: props.fetchs.updateStatus,\r\n alert: fetchAlertFull,\r\n updateGrid: props.fetchs.updateGrid,\r\n }}\r\n />\r\n\r\n
    \r\n \r\n
    \r\n
    \r\n )}\r\n
    \r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default Alert;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"Alert-module_modal_fGFA5\",\"body\":\"Alert-module_body_3JfTI\",\"header\":\"Alert-module_header_1huce\"};","import React, { useState, useEffect } from \"react\";\r\nimport style from \"./ChildAlert.module.scss\";\r\nimport Summary from \"../Summary\";\r\nimport PostList from \"../PostList/PostList\";\r\nimport { parseAlert } from \"../../store/store\";\r\nimport { PersonType } from \"../../../AlertSimple/Fields/types\";\r\nimport classNames from \"classnames\";\r\n\r\nconst ChildAlert = ({ childAlert, fetchs, dispatch }) => {\r\n const [loading, setLoading] = useState(true);\r\n\r\n close = () => {\r\n dispatch({ type: \"TOGGLE_CHILD_ALERT\" });\r\n };\r\n\r\n useEffect(() => {\r\n fetchs.alert({ id: childAlert.id }, (r, r2) => {\r\n dispatch({ type: \"CHILD_ALERT_SUCCESS\", alert: parseAlert(r.alertEvent) });\r\n setLoading(false);\r\n });\r\n }, [childAlert.id]);\r\n\r\n const getAllFiles = () => {\r\n if (childAlert.events == null) return [];\r\n let files = [];\r\n childAlert.events.forEach((e) => files.push(...e.files));\r\n return files;\r\n };\r\n\r\n return (\r\n
    \r\n close()}\r\n >\r\n ×\r\n \r\n\r\n
    Related alert
    \r\n \r\n\r\n
    \r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default ChildAlert;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"child\":\"ChildAlert-module_child_1tooW\",\"close\":\"ChildAlert-module_close_OqYkI\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"summary\":\"Items-module_summary_NM0pB\",\"title\":\"Items-module_title_SCA-i\",\"newpost\":\"Items-module_newpost_1q-57\",\"user\":\"Items-module_user_1aNup\",\"inputFile\":\"Items-module_inputFile_3ir12\",\"posts\":\"Items-module_posts_2y2AQ\",\"empty\":\"Items-module_empty_2-n77\",\"post\":\"Items-module_post_2lsOK\",\"smFile\":\"Items-module_smFile_7mG5D\",\"related\":\"Items-module_related_1q_94\",\"left\":\"Items-module_left_2X2jy\",\"btnRelated\":\"Items-module_btnRelated_1UEoo\",\"badge\":\"Items-module_badge_1FUmy\",\"loadingMessage\":\"Items-module_loadingMessage_3_2Zi\"};","import React, { useState } from \"react\";\r\nimport { Button } from \"reactstrap\";\r\nimport style from \"./../NewPost.module.scss\";\r\nimport { LoadingMessage } from \"../../Summary\";\r\nimport SendFile from \"./SendFile\";\r\nimport { PersonType } from \"../../../../AlertSimple/Fields/types\";\r\n\r\nconst Files = ({ files, hideDelete, deleteFile, loading, fetchs, ...props }) => {\r\n const [send, setSend] = useState({});\r\n const [fileTypes, setFileTypes] = useState(null);\r\n const [sents, setSents] = useState([]);\r\n const addToAccount = (event, file) => {\r\n event.stopPropagation();\r\n\r\n const sendProps = {\r\n open: true,\r\n fetchs,\r\n file,\r\n fileTypes,\r\n download,\r\n personType: props.personType,\r\n alias: props.alias,\r\n toggle: (id) => {\r\n setSend({});\r\n if (id) {\r\n setSents([...sents, id]);\r\n }\r\n },\r\n };\r\n\r\n if (fileTypes == null) {\r\n fetchs.fileTypes({}, (r) => {\r\n let types = null;\r\n if (props.personType == PersonType.All) {\r\n types = r.SDTGetArchivesTypes.ArchivesTypes[1];\r\n } else if (props.personType == PersonType.Physical) {\r\n types = r.SDTGetArchivesTypes.ArchivesTypes[2];\r\n } else {\r\n types = r.SDTGetArchivesTypes.ArchivesTypes[0];\r\n }\r\n\r\n setFileTypes(types.ArchivesSubTypes);\r\n setSend({ ...sendProps, fileTypes: types.ArchivesSubTypes });\r\n });\r\n }\r\n\r\n setSend(sendProps);\r\n };\r\n\r\n const download = (file) => {\r\n if (hideDelete) {\r\n fetchs.downloadFile(\r\n {\r\n eventId: file.eventId,\r\n eventHistoryId: file.eventHistoryId,\r\n eventHistoryFileId: file.id,\r\n },\r\n (r) => {\r\n if (r.url != \"\") {\r\n window.open(r.url);\r\n }\r\n }\r\n );\r\n }\r\n };\r\n\r\n if (loading || files == null) {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n\r\n if (send.open) {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n\r\n return (\r\n
    \r\n {!files.length && {hideDelete ? \"No files\" : \"No uploaded files\"}}\r\n\r\n {files.length > 0 && (\r\n
    \r\n {files.map((f) => (\r\n
    download(f)}>\r\n {/* Delete */}\r\n {!hideDelete && (\r\n deleteFile(f.id)}>\r\n \r\n \r\n )}\r\n
    \r\n \r\n \r\n \r\n\r\n {/* File name */}\r\n

    {truncate(f.name.trim())}

    \r\n\r\n {/* Add To account */}\r\n {hideDelete && !f.sent && sents.indexOf(f.id) == -1 && (\r\n
    \r\n
    addToAccount(e, f)} className={style.btn}>\r\n \r\n
    \r\n
    \r\n )}\r\n
    \r\n
    \r\n ))}\r\n
    \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nfunction truncate(input) {\r\n return input.length > 16 ? `${input.substring(0, 16)}...` : input;\r\n}\r\n\r\nexport default Files;\r\n","import React, { useState } from \"react\";\r\nimport style from \"./../NewPost.module.scss\";\r\nimport classNames from \"classnames\";\r\nimport { Button } from \"reactstrap\";\r\nimport { LoadingMessage } from \"../../Summary\";\r\nimport { Combobox } from \"../../../../Order/Field/Field\";\r\nimport LaddaButton, { SLIDE_DOWN } from \"react-ladda\";\r\n\r\nconst SendFile = ({ file, personType, alias, fileTypes, fetchs, toggle, props }) => {\r\n const [selectedType, setSelectedType] = useState(-1);\r\n const [sending, setSending] = useState(false);\r\n\r\n const send = () => {\r\n setSending(true);\r\n\r\n fetchs.send(\r\n {\r\n eventId: file.eventId,\r\n eventHistoryId: file.eventHistoryId,\r\n eventHistoryFileId: file.id,\r\n subTypeId: selectedType,\r\n },\r\n (r) => {\r\n setSending(false);\r\n toggle(file.id);\r\n }\r\n );\r\n };\r\n\r\n return (\r\n
    \r\n
    \r\n toggle()}\r\n >\r\n ×\r\n \r\n\r\n {fileTypes == null ? (\r\n \r\n ) : (\r\n \r\n
    Send file to: {alias}
    \r\n props.download(file)}>{file.name}\r\n\r\n
    \r\n setSelectedType(v)}\r\n items={fileTypes.map((type) => ({\r\n id: type.ArchiveSubTypeId,\r\n description: type.ArchiveSubTypeDescription,\r\n }))}\r\n />{\" \"}\r\n send()}\r\n data-style={SLIDE_DOWN}\r\n >\r\n {\"Send\"}\r\n \r\n
    \r\n
    \r\n )}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default SendFile;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Container, Row, Col, Button, Input } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { Field } from \"./../../../Order/Field/Field\";\r\nimport Files from \"./Files/Files\";\r\nimport style from \"./../Items.module.scss\";\r\nimport { FormattedDate } from \"react-intl\";\r\n\r\nconst NewPost = ({ alertId, readonly, user, status, fetchs, dispatch, processes }) => {\r\n const [loading, setLoading] = React.useState(false);\r\n const [changingStatus, setChangingStatus] = React.useState(false);\r\n const [description, setDescription] = React.useState(\"\");\r\n const [files, setFiles] = React.useState([]);\r\n const [errors, setErrors] = React.useState({});\r\n const [currentDate, setCurrentDate] = useState(new Date());\r\n\r\n useEffect(() => {\r\n const interval = setInterval(() => {\r\n setCurrentDate(new Date());\r\n }, 1000); // Actualiza la fecha cada segundo\r\n\r\n return () => clearInterval(interval); // Limpia el intervalo cuando el componente se desmonta\r\n }, []);\r\n\r\n const handleFilesUpload = (event) => {\r\n const addedFiles = Object.values(event.target.files);\r\n\r\n setFiles([\r\n ...files,\r\n ...addedFiles.map((f) => ({\r\n id: Math.random().toString(36).substring(2, 15),\r\n name: f.name,\r\n type: f.type,\r\n data: f,\r\n })),\r\n ]);\r\n };\r\n\r\n const deleteFile = (id) => {\r\n setFiles(files.filter((f) => f.id != id));\r\n };\r\n\r\n const addToHistory = () => {\r\n if (description == null || description == \"\") {\r\n setErrors({\r\n ...errors,\r\n description: \"Required Field\",\r\n });\r\n } else {\r\n setLoading(true);\r\n // prepare files\r\n let filesFD = new FormData();\r\n\r\n files.forEach((f, i) => {\r\n filesFD.append(`file${i + 1}`, f.data);\r\n });\r\n\r\n const getLocalISOTime =() =>{\r\n const date = new Date();\r\n const tzOffset = -date.getTimezoneOffset() * 60 * 1000;\r\n const localDate = new Date(date.getTime() + tzOffset);\r\n const localISOTime = localDate.toISOString().slice(0, -1);\r\n \r\n return localISOTime;\r\n };\r\n\r\n fetchs.addToHistory(\r\n {\r\n eventId: alertId,\r\n message: description,\r\n dateTime: getLocalISOTime(),\r\n files: filesFD,\r\n },\r\n (response) => {\r\n fetchs.alert(alertId);\r\n\r\n setLoading(false);\r\n setFiles([]);\r\n setDescription(\"\");\r\n }\r\n );\r\n }\r\n};\r\n\r\n\r\n\r\n const changeWorkingStatus = () => {\r\n let nextStatus = \"WorkingAdvisor\";\r\n\r\n if (user.role == \"Advisor\") {\r\n nextStatus = \"WorkingCompliance\";\r\n }\r\n\r\n setChangingStatus(true);\r\n\r\n fetchs.updateStatus(\r\n {\r\n eventId: alertId,\r\n statusCompliance: nextStatus,\r\n },\r\n (response) => {\r\n dispatch({ type: \"ALERT_UPDATE\", alert: { status: nextStatus } });\r\n setChangingStatus(false);\r\n fetchs.updateGrid(alertId);\r\n }\r\n );\r\n\r\n {\r\n user.role == \"Advisor\" ? \"Compliance\" : \"Advisor\";\r\n }\r\n };\r\n\r\n const sendToCEO = () => {\r\n let nextStatus = \"WorkingCEO\";\r\n\r\n if (status == \"WorkingCEO\") {\r\n nextStatus = \"WorkingCompliance\";\r\n }\r\n\r\n setChangingStatus(true);\r\n\r\n fetchs.updateStatus(\r\n {\r\n eventId: alertId,\r\n statusCompliance: nextStatus,\r\n },\r\n (response) => {\r\n dispatch({ type: \"ALERT_UPDATE\", alert: { status: nextStatus } });\r\n setChangingStatus(false);\r\n }\r\n );\r\n };\r\n\r\n if (readonly) {\r\n return null;\r\n }\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n {user.name}\r\n \r\n \r\n \r\n \r\n {processes != \"ExternalImport\" && processes != \"RiskChanges\" && (\r\n \r\n {((user.role == \"Advisor\" && status == \"WorkingAdvisor\") ||\r\n (user.role == \"Compliance\" && status == \"WorkingCompliance\")) && (\r\n changeWorkingStatus()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Send to{\" \"}\r\n {user.role == \"Advisor\" ? \"Compliance\" : \"Advisor\"}\r\n \r\n )}\r\n \r\n )}\r\n \r\n
    \r\n {processes === \"TransactionalLimit\" || processes === \"RiskChanges\" ? (\r\n \r\n \r\n {((user.role == \"CEO\" && status == \"WorkingCEO\" && processes != \"RiskChanges\") ||\r\n (user.role == \"Compliance\" && status == \"WorkingCompliance\")) && (\r\n sendToCEO()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n \r\n {status == \"WorkingCompliance\" ? \"Second Approval\" : \"Send to Compliance\"}\r\n \r\n )}\r\n \r\n \r\n ) : (\"\")}\r\n\r\n \r\n \r\n \r\n 1000}\r\n style={description.length > 1000 ? { borderColor: \"red\" } : {}}\r\n onChange={(e) => {\r\n if (e.target.value.length <= 1000) {\r\n setDescription(e.target.value);\r\n if (e.target.value !== \"\") {\r\n setErrors({ ...errors, description: undefined });\r\n }\r\n } else {\r\n setErrors({ ...errors, description: \"Max Characters Limit Reached\" });\r\n }\r\n }}\r\n />\r\n \r\n\r\n \r\n\r\n
    \r\n \r\n {\r\n setFiles([]);\r\n setDescription(\"\");\r\n setErrors({});\r\n }}\r\n >\r\n Discard\r\n {\" \"}\r\n addToHistory()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Add\r\n \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default NewPost;","// extracted by mini-css-extract-plugin\nmodule.exports = {\"files\":\"NewPost-module_files_13Vt7\",\"empty\":\"NewPost-module_empty_2fQv3\",\"grid\":\"NewPost-module_grid_2IuQE\",\"error\":\"NewPost-module_error_2CjYq\",\"file\":\"NewPost-module_file_25irm\",\"overlay\":\"NewPost-module_overlay_3yFCL\",\"btn\":\"NewPost-module_btn_1fSG9\",\"buttons\":\"NewPost-module_buttons_2nWRd\",\"delete\":\"NewPost-module_delete__jZaH\",\"send\":\"NewPost-module_send_11lV0\",\"child\":\"NewPost-module_child_35y1D\",\"close\":\"NewPost-module_close_lwu38\",\"inputs\":\"NewPost-module_inputs_105xy\"};","import React from \"react\";\r\nimport style from \"./../Items.module.scss\";\r\nimport { FormattedDate } from \"react-intl\";\r\n\r\nconst PostItem = ({ user, date, message, files, downloadFile }) => {\r\n const download = (file) => {\r\n downloadFile(\r\n {\r\n eventId: file.eventId,\r\n eventHistoryId: file.eventHistoryId,\r\n eventHistoryFileId: file.id,\r\n },\r\n (r) => {\r\n if (r.url != \"\") {\r\n window.open(r.url);\r\n }\r\n }\r\n );\r\n };\r\n\r\n return (\r\n
    \r\n

    \r\n {user}\r\n {message}\r\n

    \r\n\r\n \r\n \r\n \r\n\r\n {files.map((f) => (\r\n download(f)}>\r\n \r\n {f.name}\r\n \r\n ))}\r\n
    \r\n );\r\n};\r\n\r\nexport default PostItem;\r\n","import React from \"react\";\r\nimport PostItem from \"./PostItem\";\r\nimport style from \"./../Items.module.scss\";\r\nimport CircularProgress from \"../../../../CircularProgress/CircularProgress\";\r\nimport { LoadingMessage } from \"../Summary\";\r\n\r\nconst PostList = ({ loadingAlert, events, fetchs }) => {\r\n return (\r\n
    \r\n {loadingAlert && }\r\n\r\n {!loadingAlert &&\r\n events &&\r\n events.map((e) => (\r\n \r\n ))}\r\n {!loadingAlert && events && events.length == 0 && (\r\n \r\n No events\r\n \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nexport default PostList;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport style from \"./Items.module.scss\";\r\nimport Files from \"./NewPost/Files/Files\";\r\nimport {\r\n Button,\r\n Badge,\r\n Dropdown,\r\n DropdownToggle,\r\n DropdownMenu,\r\n DropdownItem,\r\n UncontrolledDropdown,\r\n ButtonGroup,\r\n Row,\r\n Col,\r\n Table,\r\n ListGroup,\r\n ListGroupItem,\r\n} from \"reactstrap\";\r\n\r\nimport { getPersonTypeName } from \"../../AlertSimple/Fields/types\";\r\nimport CircularProgress from \"../../../CircularProgress/CircularProgress\";\r\nimport LaddaButton, { SLIDE_DOWN, SLIDE_LEFT } from \"react-ladda\";\r\nimport { accountProps } from \"../../Order/Form/commons\";\r\nimport { getLocalDate } from \"../../../../utils\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport InvestorProfile from \"./subsummary/investorProfile\";\r\nimport DuplicatedPeople from \"./subsummary/duplicatedPeople\";\r\n\r\n\r\nconst Summary = ({\r\n description,\r\n title,\r\n personType,\r\n typeAlias,\r\n files,\r\n relateds,\r\n alert,\r\n fetchs,\r\n loadingAlert,\r\n alertId,\r\n reftag,\r\n days,\r\n status,\r\n role,\r\n markFalseCoincidence,\r\n processes,\r\n requestClosure,\r\n name,\r\n closedAccountDate,\r\n closedAccount,\r\n dispatch,\r\n Link,\r\n trigger,\r\n personInfo,\r\n refId,\r\n antiClientDetails,\r\n accountsRelated,\r\n}) => {\r\n const [closing, setClosing] = useState(0);\r\n const [loadingCloseAccount, SetLoadingCloseAccount] = useState(false);\r\n const [showMessageCloseAccount, SetShowMessageCloseAccount] = useState(false);\r\n const [sending, setROS] = useState(0);\r\n const [info, setInfo] = useState();\r\n const [updateKYCStatus, setUpdateKYCStatus] = useState(false);\r\n\r\n useEffect(() => {\r\n fetchs.getParameterValue({ParameterName:\"UpdateKYCStatus\"}, (response) => {\r\n if (response) {\r\n setUpdateKYCStatus(response.SdtParametersData.ParameterNumericValue == 1);\r\n }\r\n })}, [updateKYCStatus]);\r\n\r\n useEffect(() => {\r\n if (reftag && processes === \"TransactionalLimit\") {\r\n try {\r\n let newInfo = JSON.parse(reftag);\r\n setInfo(newInfo);\r\n } catch (e) {\r\n setInfo();\r\n }\r\n }\r\n }, [reftag]);\r\n\r\n const openChild = (child) => {\r\n dispatch({ type: \"TOGGLE_CHILD_ALERT\", alert: child });\r\n };\r\n\r\n const downloadPdf = () => {\r\n fetchs.downloadPdf({ eventId: alertId });\r\n };\r\n\r\n const checkFalseCoincidence = (falseCoincidence) => {\r\n const body = {\r\n complianceEventid: alertId,\r\n falseCoincidence: falseCoincidence,\r\n };\r\n fetchs.falseCoincidenceCheckList(body);\r\n dispatch({\r\n type: \"CHECKLIST_COINCIDENCE\",\r\n alert: falseCoincidence,\r\n });\r\n };\r\n\r\n const closeAccount = () => {\r\n SetLoadingCloseAccount(true);\r\n fetchs.closeAccountAlert(\r\n {\r\n eventId: alertId,\r\n accountId: typeAlias,\r\n },\r\n (response) => {\r\n SetLoadingCloseAccount(false);\r\n SetShowMessageCloseAccount(true);\r\n }\r\n );\r\n };\r\n\r\n const closeAlert = () => {\r\n setClosing({ loading: true });\r\n\r\n fetchs.updateStatus(\r\n {\r\n eventId: alertId,\r\n statusCompliance: \"Closed\",\r\n },\r\n (response) => {\r\n setClosing(1);\r\n\r\n dispatch({ type: \"ALERT_UPDATE\", alert: { status: \"Closed\" } });\r\n }\r\n );\r\n };\r\n\r\n const getJournalEntryId = (linea) => {\r\n const partes = linea.split(\",\");\r\n if (partes.length < 2) {\r\n return \"\";\r\n }\r\n const journalEntryId = partes[0].trim().split(\":\")[1].trim();\r\n return journalEntryId;\r\n };\r\n\r\n const alertToROS = () => {\r\n setROS({ loading: true });\r\n\r\n fetchs.updateStatus(\r\n {\r\n eventId: alertId,\r\n statusCompliance: \"ROS\",\r\n },\r\n (response) => {\r\n setROS(1);\r\n\r\n dispatch({ type: \"ALERT_UPDATE\", alert: { status: \"ROS\" } });\r\n }\r\n );\r\n };\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n {processes == \"KYC\" || processes == \"Flags\" || processes == \"ExternalImport\" || processes == \"RiskChanges\" ? (\r\n description\r\n ) : processes == \"CheckList\" || processes == \"TransactionalLimit\" ? (\r\n
    {title}
    \r\n ) : processes == \"TransLimitChanges\" && description ? (\r\n
    {description.split(\".\")[0]}
    \r\n ) : (\r\n
    \r\n {getPersonTypeName(personType)}\r\n {\": \"}\r\n {typeAlias} {title}\r\n
    \r\n )}\r\n
    \r\n
    \r\n {(status == \"Closed\" || closing == 1) && (\r\n \r\n )}\r\n {((status != \"Closed\" && status != \"ROS\" && closing != 1 && processes != \"RiskChanges\" && role == \"Compliance\") || (processes == \"ExternalImport\" && status != \"Closed\") || (role == \"CEO\" && processes == \"RiskChanges\" && status != \"Closed\")) && (\r\n closeAlert()}\r\n data-style={SLIDE_DOWN}\r\n >\r\n Close alert\r\n \r\n )}\r\n
    \r\n
    \r\n
    \r\n
    \r\n {processes === \"CheckList\" && (\r\n
    \r\n

    {`${trigger}(${reftag})`}

    \r\n Details\r\n {(!antiClientDetails || antiClientDetails.length == 0 || antiClientDetails[0] == \"\") && (\r\n

    No details

    \r\n )}\r\n {antiClientDetails.length > 0 && (\r\n
    \r\n \r\n {antiClientDetails.map((item, index) => (\r\n \r\n {\r\n // convert to bold font the words into simple quoatation marks\r\n item.split(\"-\").map((part, index) => (\r\n \r\n {part\r\n .split(\":\")\r\n .map((part2, index) =>\r\n part2.startsWith(\"'\") && part2.endsWith(\"'\") ? (\r\n {part2.replace(/'/g, \"\") + \":\"}\r\n ) : (\r\n part2 + \" \"\r\n )\r\n )}\r\n \r\n ))\r\n }\r\n \r\n ))}\r\n \r\n
    \r\n )}\r\n Client\r\n

    \r\n \r\n {`${name}(${\r\n personInfo.PhysicalPersonMainDocumentNumber\r\n ? personInfo.PhysicalPersonMainDocumentNumber\r\n : typeAlias\r\n })`}\r\n \r\n

    \r\n

    {description.includes(\"spouse\") && description}

    \r\n Accounts related\r\n {accountsRelated.length == 0 &&

    No accounts

    }\r\n {accountsRelated.length > 0 && (\r\n
    \r\n {accountsRelated.map((account, index) => (\r\n

    \r\n \r\n {`${account.Relationship} - ${account.AccountId} - ${account.AccountName}`}\r\n \r\n

    \r\n ))}\r\n
    \r\n )}\r\n
    \r\n )}\r\n {(processes===\"ExternalImport\"&& description.includes(\"duplicated people\")) ? (\r\n
    \r\n \r\n
    \r\n ):\r\n (processes==\"InvestorProfile\"? (\r\n
    \r\n {processes==\"InvestorProfile\" && (\r\n \r\n )}\r\n
    \r\n ): \r\n\r\n (\r\n (processes!=\"InvestorProfile\" && processes !== \"TransactionalLimit\" && processes !== \"CheckList\" && processes != \"RiskChanges\") || (processes===\"ExternalImport\" && !description.includes(\"duplicated people\")))&& (\r\n\r\n
    \r\n
    \r\n Data related\r\n {processes === \"TransLimitChanges\" && description ? (\r\n
    \r\n

    {\"Transactional Limit Changes \"}

    \r\n

    {reftag.split(\"*\")[0]}

    \r\n

    {reftag.split(\"*\")[1]}

    \r\n

    {reftag.split(\"*\")[2]}

    \r\n

    \r\n alertToROS()}\r\n data-style={SLIDE_LEFT}\r\n >\r\n Mark as ROS\r\n \r\n

    \r\n
    \r\n ) : (\r\n

    \r\n {processes === \"KYC\" || processes === \"Flags\" || reftag === \"CLOSEACCOUNT\"\r\n ? trigger.split(\"--\").map((linea, index) =>

    {linea}

    )\r\n : (processes == \"ExternalImport\" ? reftag : \r\n (processes === \"Onboarding\" ?\r\n \r\n {description}\r\n \r\n :description)\r\n )}\r\n

    \r\n )}\r\n
    \r\n {processes === \"Precheck\" && (\r\n
    \r\n Precheck Details\r\n

    {reftag}

    \r\n
    \r\n )}\r\n {(processes === \"KYC\" || processes === \"Flags\") && reftag !== \"\" && (\r\n
    \r\n Flags\r\n

    {reftag}

    \r\n
    \r\n )}\r\n {status != \"Closed\" &&\r\n status != \"ROS\" &&\r\n sending != 1 &&\r\n processes == \"KYC\" &&\r\n role == \"Compliance\" && \r\n updateKYCStatus && \r\n (\r\n
    \r\n alertToROS()}\r\n data-style={SLIDE_LEFT}\r\n >\r\n KYC not approved\r\n \r\n
    \r\n )}\r\n
    \r\n )\r\n )}\r\n
    \r\n\r\n {processes == \"TransactionalLimit\" && (\r\n
    \r\n Details\r\n

    \r\n {trigger.trim() == \"Quantity limit in deposits\" ||\r\n trigger.trim() == \"Quantity limit in Withdraws\" ||\r\n trigger.trim() == \"Amount limit in deposits\" ||\r\n trigger.trim() == \"Amount limit in Withdraws\"\r\n ? role == \"Advisor\"\r\n ? reftag.split(\";\").map((linea, index) =>\r\n linea.includes(\"JournalEntryId:\") ? (\r\n \r\n {linea}
    \r\n
    \r\n ) : (\r\n

    \r\n {linea} {\"\\n\"}{\" \"}\r\n

    \r\n )\r\n )\r\n : reftag.split(\";\").map((linea, index) => (\r\n

    \r\n {linea} {\"\\n\"}\r\n

    \r\n ))\r\n : trigger}\r\n

    \r\n {info !== undefined && info !== \"\" ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {info.map((i) => {\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n })}\r\n \r\n
    InfoTotal
    {i.key}\r\n \r\n
    \r\n ) : (\r\n \"\"\r\n )}\r\n\r\n {status != \"Closed\" &&\r\n status != \"ROS\" &&\r\n sending != 1 &&\r\n role == \"Compliance\" &&\r\n processes !== \"KYC\" && (\r\n alertToROS()}\r\n data-style={SLIDE_LEFT}\r\n >\r\n Mark as ROS\r\n \r\n )}\r\n
    \r\n )}\r\n\r\n \r\n {relateds != null && (\r\n \r\n \r\n \r\n \r\n \r\n {relateds.length}\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n
    \r\n {requestClosure ? (\r\n \r\n \r\n {closedAccount ? (\r\n
    \r\n The account {name} is Closed - Date of closure: {getLocalDate(closedAccountDate)}\r\n
    \r\n ) : (\r\n
    \r\n
    \r\n Close Account\r\n
    \r\n {showMessageCloseAccount ? (\r\n
    The account was successfully closed
    \r\n ) : (\r\n
    \r\n Do you want to Close Account {name}?\r\n closeAccount()}\r\n data-style={SLIDE_LEFT}\r\n >\r\n Confirm\r\n \r\n
    \r\n )}\r\n
    \r\n )}\r\n \r\n
    \r\n ) : (\r\n
    \r\n )}\r\n {processes == \"CheckList\" ? (\r\n \r\n \r\n
    \r\n Person Checklist\r\n
    \r\n Do you want to mark this person as a false coincidence? If you select yes this alert wont be\r\n generated again next time\r\n \r\n checkFalseCoincidence(true)}\r\n color={markFalseCoincidence === true ? \"success btn btn-sm\" : \"primary btn btn-sm\"}\r\n active={markFalseCoincidence === true}\r\n >\r\n YES\r\n \r\n checkFalseCoincidence(false)}\r\n color={markFalseCoincidence === false ? \"danger btn btn-sm\" : \"primary btn btn-sm\"}\r\n active={markFalseCoincidence === false}\r\n >\r\n NO\r\n \r\n \r\n \r\n
    \r\n ) : (\r\n
    \r\n )}\r\n\r\n \r\n
    \r\n );\r\n};\r\n\r\nconst RelatedDDown = ({ children, relateds, openChildAlert }) => (\r\n \r\n \r\n {children}\r\n \r\n {relateds.length != 0 && (\r\n \r\n \r\n Relateds alerts\r\n \r\n {relateds &&\r\n relateds.map((r, i) => (\r\n openChildAlert(r)}>\r\n {r.title} {r.description}\r\n \r\n ))}\r\n \r\n )}\r\n \r\n);\r\n\r\nexport const LoadingMessage = ({ text }) => (\r\n
    \r\n \r\n {text}\r\n
    \r\n);\r\n\r\nexport default Summary;\r\n","import Summary from './Summary';\r\nimport NewPost from './NewPost/NewPost';\r\nimport PostList from './PostList/PostList';\r\n\r\nexport {\r\n NewPost,\r\n Summary,\r\n PostList\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport style from \"./duplicatedPeople.scss\";\r\nimport { Button, Col, Row, ButtonGroup } from \"reactstrap\";\r\nimport { showToast } from \"../../../../../utils/Helper\";\r\n\r\nconst DuplicatedPeople = ({ alert, fetchs, Link,closeAlert }) => {\r\n const [duplicatedPeople, setDuplicatedPeople] = useState([]);\r\n const [loading, setLoading] = useState(false);\r\n const [personFromPershing, setPersonFromPershing] = useState(null);\r\n const [personFromSystem, setPersonFromSystem] = useState(null);\r\n const [personFromPershingFullName, setPersonFromPershingFullName] = useState(null);\r\n const [personFromSystemFullName, setPersonFromSystemFullName] = useState(null);\r\n const [matchingFields, setMatchingFields] = useState([]);\r\n const [merging, setMerging] = useState(false);\r\n const [equalDocumentType, setEqualDocumentType] = useState(false);\r\n const [personToKeep, setPersonToKeep] = useState(null);\r\n const [personToMerge, setPersonToMerge] = useState(null);\r\n\r\n useEffect(() => {\r\n setLoading(true);\r\n fetchs.clientInfo({ personId: alert.personId }, (r) => {\r\n setPersonFromPershing(r.personInfo);\r\n });\r\n fetchs.clientInfo({ personId: alert.refId }, (r) => {\r\n setPersonFromSystem(r.personInfo);\r\n });\r\n setLoading(false);\r\n }, [alert.personId, alert.refId]);\r\n\r\n useEffect(() => {\r\n if (personFromPershing) {\r\n setPersonFromPershingFullName(\r\n personFromPershing.PhysicalPersonFirstName + \" \" + personFromPershing.PhysicalPersonFirstLastName\r\n );\r\n }\r\n }, [personFromPershing]);\r\n\r\n useEffect(() => {\r\n if (personFromPershing && personFromSystem) {\r\n setMatchingFields(getMatchingFields(personFromPershing, personFromSystem));\r\n checkSameDocumentType(personFromPershing, personFromSystem);\r\n //load defaults\r\n setPersonToKeep(personFromSystem.PersonId);\r\n setPersonToMerge(personFromPershing.PersonId);\r\n }\r\n }, [personFromPershing, personFromSystem]);\r\n\r\n const merge = () => {\r\n setMerging(true);\r\n fetchs.mergePeople({ personToMergeId: personToMerge, personToKeepId: personToKeep }, (r) => {\r\n if (r) {\r\n showToast(\"success: People merged successfully\");\r\n closeAlert();\r\n }\r\n setMerging(false);\r\n });\r\n };\r\n\r\n const checkSameDocumentType = (personFromPershing, personFromSystem) => {\r\n personFromPershing.Documents.forEach((docPershing) => {\r\n personFromSystem.Documents.forEach((docSystem) => {\r\n if (\r\n docPershing.PersonDocumentIssueCountryId === docSystem.PersonDocumentIssueCountryId &&\r\n docPershing.PersonDocumentTypeId === docSystem.PersonDocumentTypeId\r\n ) {\r\n setEqualDocumentType(true);\r\n }\r\n });\r\n });\r\n };\r\n\r\n const getMatchingFields = (personFromPershing, personFromSystem) => {\r\n const matchingFields = [];\r\n for (const key in personFromPershing) {\r\n if (personFromPershing[key] === personFromSystem[key]) {\r\n if (personFromPershing[key] && personFromPershing[key] != 0 && personFromPershing[key] != \"\") {\r\n if (key.includes(\"Date\")) {\r\n if (!personFromPershing[key].includes(\"0000-00-00\")) {\r\n matchingFields.push(key);\r\n }\r\n } else {\r\n matchingFields.push(key);\r\n }\r\n }\r\n }\r\n }\r\n return matchingFields;\r\n };\r\n\r\n useEffect(() => {\r\n if (personFromSystem) {\r\n setPersonFromSystemFullName(\r\n personFromSystem.PhysicalPersonFirstName + \" \" + personFromSystem.PhysicalPersonFirstLastName\r\n );\r\n }\r\n }, [personFromSystem]);\r\n\r\n return (\r\n
    \r\n {!personFromPershing || !personFromSystem ? (\r\n
    Loading...
    \r\n ) : (\r\n
    \r\n \r\n {`${personFromPershing.PhysicalPersonFirstName+' '+personFromPershing.PhysicalPersonFirstLastName}(${\r\n personFromPershing.PhysicalPersonMainDocumentNumber\r\n ? personFromPershing.PhysicalPersonMainDocumentNumber\r\n : typeAlias\r\n })- from pershing`}\r\n \r\n
    \r\n \r\n {`${personFromSystem.PhysicalPersonFirstName+' '+personFromSystem.PhysicalPersonFirstLastName}(${\r\n personFromSystem.PhysicalPersonMainDocumentNumber\r\n ? personFromSystem.PhysicalPersonMainDocumentNumber\r\n : typeAlias\r\n })- from system`}\r\n \r\n
    \r\n
    \r\n

    Matching Fields

    \r\n
    \r\n
      \r\n {matchingFields.map((field, i) => (\r\n
    • {field}
    • \r\n ))}\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n

    \r\n Do you want to merge the pershing person with the system person?\r\n

    \r\n \r\n \r\n \r\n \r\n \r\n

    Choose the person you want to keep

    \r\n \r\n {\r\n setPersonToKeep(personFromPershing.PersonId);\r\n setPersonToMerge(personFromSystem.PersonId);\r\n }}\r\n size=\"sm\"\r\n >\r\n {`${personFromPershingFullName}(${\r\n personFromPershing.PhysicalPersonMainDocumentNumber\r\n ? personFromPershing.PhysicalPersonMainDocumentNumber\r\n : typeAlias\r\n })`}\r\n \r\n {\r\n setPersonToKeep(personFromSystem.PersonId);\r\n setPersonToMerge(personFromPershing.PersonId);\r\n }}\r\n size=\"sm\"\r\n >\r\n {`${personFromSystemFullName}(${\r\n personFromSystem.PhysicalPersonMainDocumentNumber\r\n ? personFromSystem.PhysicalPersonMainDocumentNumber\r\n : typeAlias\r\n })`}\r\n \r\n \r\n \r\n \r\n {equalDocumentType ? (\r\n

    \r\n The documents have the same type and country, you need to fix it in the original system,\r\n otherwise the alert will be regenerated\r\n

    \r\n ) : (\r\n
    \r\n )}\r\n \r\n
    \r\n
    \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nexport default DuplicatedPeople;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"duplicatedPeople_container_1om3w\",\"content\":\"duplicatedPeople_content_2xBDE\"};","import React from \"react\";\r\nimport \"./InvestorProfile.scss\";\r\n\r\nconst InvestorProfile = ({ investorProfile }) => {\r\n // Dividir el texto en líneas separadas\r\n const profileLines = investorProfile.split(';').map((line, index) => (\r\n

    {line}

    \r\n ));\r\n\r\n return (\r\n
    \r\n

    Investor Profile

    \r\n {console.log(profileLines)}\r\n
    \r\n {profileLines}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default InvestorProfile;\r\n","import {mergeDeep} from \"../../../../utils/Helper\";\r\n\r\nexport const alertReducer = (state, action) => {\r\n switch (action.type) {\r\n case \"ALERT_UPDATE\":\r\n return processAlertUpdate(state, action.alert);\r\n case \"UPDATE_LOADING\":\r\n return processUpdateLoading(state, action.loadings);\r\n case \"TOGGLE_CHILD_ALERT\":\r\n return processToggleChildAlert(state, action);\r\n case \"CHILD_ALERT_SUCCESS\":\r\n return processChildAlertSuccess(state, action);\r\n case \"CHECKLIST_COINCIDENCE\":\r\n return processChecklistFalseCoincidence(state, action.alert);\r\n case \"CHANGE_FIELDS\":\r\n return processChangeFields(state, action.fields);\r\n }\r\n};\r\n\r\nfunction processAlertUpdate(state, alert) {\r\n return mergeDeep({...state}, {alertEv: alert});\r\n}\r\n\r\nfunction processUpdateLoading(state, loadings) {\r\n return mergeDeep(\r\n {...state},\r\n {\r\n ui: {\r\n loadings\r\n }\r\n }\r\n );\r\n}\r\n\r\nfunction processToggleChildAlert(state, action) {\r\n if (action.alert) {\r\n return mergeDeep(\r\n {...state},\r\n {\r\n ui: {\r\n childAlert: {\r\n open: true,\r\n alert: action.alert\r\n }\r\n }\r\n }\r\n );\r\n }\r\n return mergeDeep(\r\n {...state},\r\n {\r\n ui: {\r\n childAlert: {\r\n open: false\r\n }\r\n }\r\n }\r\n );\r\n}\r\n\r\nfunction processChildAlertSuccess(state, action) {\r\n return mergeDeep(\r\n {...state},\r\n {\r\n ui: {\r\n childAlert: {\r\n alert: action.alert\r\n }\r\n }\r\n }\r\n );\r\n}\r\n\r\nfunction processChecklistFalseCoincidence(state, alert) {\r\n return mergeDeep(\r\n {...state},\r\n {\r\n alertEv: {\r\n falseCoincidenceListCheck: alert\r\n }\r\n }\r\n );\r\n}\r\n\r\nfunction processChangeFields(state, action) {\r\n return mergeDeep({...state}, {...action});\r\n}\r\n","import React from \"react\";\r\nimport {mergeDeep} from \"../../../../utils/Helper\";\r\n\r\nexport const Dispatch = React.createContext(null);\r\n\r\nexport const initialize = props => {\r\n return initialState => {\r\n return mergeDeep(\r\n {...initialState},\r\n {\r\n alertEv: parseAlert(props.alert)\r\n }\r\n );\r\n };\r\n};\r\n\r\nexport const defaultState = () => ({\r\n ui: {\r\n loadings: {\r\n alert: true\r\n },\r\n childAlert: {\r\n open: false,\r\n alert: {}\r\n }\r\n },\r\n alertEv: {\r\n title: \"\",\r\n description: \"\",\r\n date: new Date(),\r\n trigger: \"\",\r\n accountsRelated:[],\r\n antiClientDetails:[],\r\n personInfo:{},\r\n },\r\n addedData: {\r\n description: null\r\n },\r\n fields: {\r\n readonly: {},\r\n errors: {}\r\n },\r\n hasLockDate: false,\r\n lockDate: new Date(),\r\n loadingUpdateDate: false,\r\n messageDisplay: false\r\n});\r\n\r\nexport function parseAlert(alert) {\r\n return {\r\n ...alert\r\n };\r\n}\r\n","import React, { useReducer } from \"react\";\r\nimport { alertSimpleReducer, defaultState, initialize, validateForm } from \"./reducer\";\r\nimport {\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Container,\r\n Row,\r\n Col,\r\n Input,\r\n Button,\r\n Label,\r\n} from \"reactstrap\";\r\nimport style from \"./AlertSimple.module.scss\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport classnames from \"classnames\";\r\nimport Account from \"./Fields/Account\";\r\nimport Process from \"./Fields/Process\";\r\nimport { Field, Combobox } from \"../Order/Field/Field\";\r\nimport { PersonType, getPersonTypeName } from \"./Fields/types\";\r\n\r\nconst AlertSimple = ({ open, toggle, fetchs, ...props }) => {\r\n const [state, dispatch] = useReducer(alertSimpleReducer, defaultState(), initialize(props));\r\n const { alert, buttons } = state;\r\n const { readonly, errors } = state.fields;\r\n\r\n const confirm = () => {\r\n const errors = validateForm(state);\r\n\r\n if (errors == false) {\r\n dispatch({ type: \"UPDATE_BUTTONS\", buttons: { confirm: { loading: true } } });\r\n\r\n const { id, ...alertProps } = alert;\r\n\r\n fetchs.updateAlert(\r\n {\r\n eventIN: {\r\n ...alertProps,\r\n accountId: alertProps.personType == PersonType.All ? id : null,\r\n personId: alertProps.personType != PersonType.All ? id : null,\r\n },\r\n },\r\n (response) => {\r\n toggle({\r\n ...alertProps,\r\n accountId: alertProps.personType == PersonType.All ? id : null,\r\n personId: alertProps.personType != PersonType.All ? id : null,\r\n id: response.eventId,\r\n });\r\n }\r\n );\r\n } else {\r\n dispatch({ type: \"FORCE_UPDATE_VALIDATION\", errors });\r\n }\r\n };\r\n\r\n const onChange = (fields) => dispatch({ type: \"CHANGE_FIELDS\", fields });\r\n\r\n const globalReadOnly = buttons.confirm.loading;\r\n\r\n return (\r\n \r\n New Alert\r\n \r\n \r\n \r\n \r\n onChange(values)}\r\n error={errors.processes}\r\n disabled={readonly.processes || globalReadOnly}\r\n value={alert.processes}\r\n fetchProcesses={fetchs.processes}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n onChange({ personType: v })}\r\n items={Object.values(PersonType).map((key, index) => ({\r\n id: key,\r\n description: getPersonTypeName(key),\r\n }))}\r\n />\r\n \r\n \r\n\r\n \r\n onChange(values)}\r\n error={errors.name}\r\n disabled={globalReadOnly}\r\n value={alert.name}\r\n type={alert.personType}\r\n fetchs={{\r\n accounts: fetchs.accounts,\r\n persons: fetchs.persons,\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n onChange({ title: e.target.value })}\r\n />\r\n \r\n\r\n \r\n onChange({ trigger: e.target.value })}\r\n />\r\n \r\n\r\n \r\n onChange({ description: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n confirm()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {\"Create\"}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport function validations(alert) {\r\n return {\r\n name: { empty: alert.personType == PersonType.All },\r\n title: { empty: true },\r\n trigger: { empty: true },\r\n description: { empty: true },\r\n processes: { empty: true },\r\n };\r\n}\r\n\r\nexport default AlertSimple;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"AlertSimple-module_modal_2H_7W\",\"body\":\"AlertSimple-module_body_3nxmL\"};","import React from \"react\";\r\nimport style from \"./Fields.module.scss\";\r\nimport Autosuggest from \"../../../Autosuggest/Autosuggest\";\r\nimport { Field } from \"../../Order/Field/Field\";\r\nimport { PersonType, getPersonTypeName } from \"./types\";\r\n\r\nconst Account = ({ type, value, error, disabled, onChange, fetchs }) => {\r\n const fetchSearch = ({ value }) => {\r\n return new Promise((resolve) => {\r\n if (type == PersonType.All) {\r\n fetchs.accounts(\r\n {\r\n length: 10,\r\n text: value,\r\n },\r\n (response) => {\r\n resolve(\r\n response.accounts.map((a) => {\r\n const accountAttrs = JSON.parse(a.Value);\r\n\r\n return {\r\n id: a.Id,\r\n name: accountAttrs.value,\r\n number: accountAttrs.key,\r\n };\r\n })\r\n );\r\n }\r\n );\r\n } else {\r\n fetchs.persons(\r\n {\r\n SdtPersonSearch: {\r\n len: 10,\r\n personType: type,\r\n text: value,\r\n },\r\n },\r\n (response) => {\r\n resolve(\r\n response.SdtOutPersons.collection.map((a) => {\r\n return {\r\n id: a.PersonId,\r\n name: a.PersonLegalName,\r\n };\r\n })\r\n );\r\n }\r\n );\r\n }\r\n });\r\n };\r\n\r\n const internalOnChange = (method, value) => {\r\n let _value = {\r\n id: null,\r\n name: \"\",\r\n number: null,\r\n };\r\n\r\n if (method != \"type\" && value.id) {\r\n _value = { ...value };\r\n }\r\n\r\n onChange(_value);\r\n };\r\n\r\n return (\r\n \r\n (\r\n
    \r\n {suggestion.name}\r\n
    \r\n )}\r\n getSuggestionValue={(s) => `${s.name}`}\r\n onSuggestionsFetchRequested={fetchSearch}\r\n value={value || \"\"}\r\n inputProps={{\r\n placeholder: getPersonTypeName(type),\r\n invalid: !!error,\r\n disabled,\r\n }}\r\n onChange={(m, v) => internalOnChange(m, v)}\r\n />\r\n
    \r\n );\r\n};\r\n\r\nexport default Account;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"suggestionItem\":\"Fields-module_suggestionItem_1enPF\"};","import React from \"react\";\r\nimport style from \"./Fields.module.scss\";\r\nimport Autosuggest from \"../../../Autosuggest/Autosuggest\";\r\nimport { Field } from \"../../Order/Field/Field\";\r\n\r\nconst Process = ({ value, error, disabled, onChange, fetchProcesses }) => {\r\n const fetchSearch = ({ value }) => {\r\n return new Promise((resolve) => {\r\n fetchProcesses((response) => {\r\n const filteredProcesses = response.SdtComboCollection.enum.filter((p) =>\r\n p.toLowerCase().includes(value.toLowerCase())\r\n );\r\n resolve(\r\n filteredProcesses.map((p, i) => ({\r\n id: i,\r\n name: p,\r\n }))\r\n );\r\n });\r\n });\r\n };\r\n\r\n const internalOnChange = (method, value) => {\r\n let _value = {\r\n processId: null,\r\n processes: \"\",\r\n };\r\n\r\n if (method !== \"type\" && value.id) {\r\n _value.processId = value.id;\r\n _value.processes = value.name;\r\n }\r\n\r\n onChange(_value);\r\n };\r\n\r\n return (\r\n \r\n (\r\n
    \r\n {suggestion.name}\r\n
    \r\n )}\r\n getSuggestionValue={(s) => `${s.name}`}\r\n onSuggestionsFetchRequested={fetchSearch}\r\n value={value || \"\"}\r\n inputProps={{\r\n placeholder: \"Process\",\r\n invalid: !!error,\r\n disabled,\r\n style: { fontWeight: 500 },\r\n }}\r\n onChange={(m, v) => internalOnChange(m, v)}\r\n />\r\n
    \r\n );\r\n};\r\n\r\nexport default Process;\r\n","export const PersonType = {\r\n All: 'All',\r\n Physical: 'Physical',\r\n Juridical: 'Juridical'\r\n}\r\n\r\nexport function getPersonTypeName(type) {\r\n switch(type) {\r\n case PersonType.All:\r\n return 'Account';\r\n case PersonType.Physical:\r\n return 'Physical'\r\n case PersonType.Juridical:\r\n return 'Juridical'\r\n }\r\n}","import { PersonType } from \"./Fields/types\";\r\nimport { mergeDeep } from \"../../../utils/Helper\";\r\nimport { validations } from \"./AlertSimple\";\r\n\r\nexport const defaultState = () => ({\r\n alert: {\r\n personType: PersonType.All,\r\n processes: 'CompliaceEvent'\r\n },\r\n fields: {\r\n readonly: {},\r\n errors: {}\r\n },\r\n buttons: {\r\n confirm: {\r\n loading: false\r\n }\r\n }\r\n})\r\n\r\nexport const alertSimpleReducer = (state, action) => {\r\n switch (action.type) {\r\n case 'CHANGE_FIELDS':\r\n return processChangeFields(state, action.fields);\r\n case 'UPDATE_BUTTONS':\r\n return processUpdateButtons(state, action.buttons);\r\n case 'FORCE_UPDATE_VALIDATION':\r\n return forceUpdateValidation(state, action);\r\n default:\r\n return state;\r\n }\r\n}\r\n\r\nfunction processChangeFields(state, fields) {\r\n const errors = Object.keys(fields)\r\n .reduce((f, name) => {\r\n f[name] = undefined;\r\n return f;\r\n }, {});\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n alert: {\r\n ...fields\r\n },\r\n fields: {\r\n errors\r\n }\r\n }\r\n );\r\n}\r\n\r\nexport function validateForm(state) {\r\n const {alert, fields} = state;\r\n \r\n\tconst errors = {};\r\n\r\n Object.entries(validations(alert)).forEach((entry) => {\r\n const [name, value] = entry;\r\n\r\n\t\tif (!fields.readonly[name]) {\r\n if (value.empty) {\r\n if (alert[name] == undefined || alert[name] === '') {\r\n errors[name] = 'Required field'\r\n }\r\n else if (value.autosuggestId && alert[value.autosuggestId] == undefined) {\r\n errors[name] = 'Must select a value from list'\r\n }\r\n }\r\n\t\t}\r\n })\r\n\r\n // has Errors only add errors to state\r\n if (Object.keys(errors).length !== 0) {\r\n return errors;\r\n }\r\n\r\n return false;\r\n}\r\n\r\nexport function forceUpdateValidation(state, {errors}) {\r\n return {\r\n ...state,\r\n fields: {\r\n ...state.fields,\r\n errors\r\n }\r\n }\r\n}\r\n\r\nexport function processUpdateButtons(state, buttons) {\r\n return mergeDeep(\r\n {...state},\r\n {\r\n buttons\r\n }\r\n )\r\n}\r\n\r\nexport const initialize = (props) => {\r\n\r\n\treturn (initialState) => {\r\n return {\r\n ...initialState\r\n }\r\n }\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Button, Input } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport style from \"./style.module.scss\";\r\nimport * as UI from \"../../Authorizations/UI\";\r\nimport { SubTitle, ProcessContext } from \"./Processes\";\r\nimport { LoadingMessage } from \"../Order/Precheck/Precheck\";\r\nimport { Mode, Type as OrderType } from \"../../../utils\";\r\nimport { CircularProgress, IO, Order } from \"../..\";\r\nimport { FormattedDate, FormattedTime } from \"react-intl\";\r\nimport { localDateTime } from \"../../../utils/Helper\";\r\nimport { AuthorizationList } from \"../..\";\r\n\r\nconst trimAll = (text) => text.replace(/\"\\s+|\\s+\"/g, '\"');\r\n\r\nconst Authorization = ({ authorization, open,manager, toggle, services, username, role }) => {\r\n if (authorization == null) return null;\r\n\r\n function compareStringsCaseInsensitive(str1, str2) {\r\n return str1.localeCompare(str2, undefined, { sensitivity: \"accent\" }) === 0;\r\n }\r\n\r\n const [processProps, setProcessProps] = useState(false);\r\n const [responsing, setResponsing] = useState({});\r\n const [readonly, setReadonly] = useState(\r\n (authorization.processedBy !== \"\" ||\r\n !compareStringsCaseInsensitive(authorization.role, role) ||\r\n compareStringsCaseInsensitive(authorization.requestedBy, username)) &&\r\n !(compareStringsCaseInsensitive(authorization.role, \"Manager\") && manager)\r\n );\r\n\r\n const [modalOpen, setModalOpen] = useState(false);\r\n const [modalAuthListOpen, setModalAuthListOpen] = useState(false);\r\n const [notes, setNotes] = useState(\"\");\r\n\r\n const handleOpenModal = () => setModalOpen((o) => !o);\r\n const [notesLoading, setNotesLoading] = useState(true);\r\n\r\n const handleOpenModalAuthList = () => {\r\n setModalAuthListOpen((o) => !o);\r\n };\r\n\r\n useEffect(() => {\r\n if (\r\n authorization.process === \"Order\" ||\r\n authorization.process === \"Deposit\" ||\r\n authorization.process === \"Withdraw\" ||\r\n authorization.process === \"Transfer\" ||\r\n authorization.process === \"InvoiceRequest\"||\r\n authorization.process === \"CounterParty\"\r\n ) {\r\n setNotesLoading(() => true);\r\n setProcessProps({ loading: true });\r\n services.getProcessContext({ id: authorization.id }).then((res) => {\r\n const properties = JSON.parse(res.propertiesAsJson);\r\n if (authorization.process === \"Order\") {\r\n properties.order = JSON.parse(trimAll(properties.Order));\r\n } else {\r\n if (properties.io)\r\n properties.io = JSON.parse(properties.IO);\r\n }\r\n setNotes(authorization.notes);\r\n setNotesLoading(() => false);\r\n setProcessProps(properties);\r\n });\r\n }\r\n }, [authorization.id, authorization.process, services]);\r\n\r\n const processed = authorization.processedBy != \"\";\r\n\r\n const response = (accepted) => {\r\n let canContinue = true;\r\n if (authorization.hasPendingRelatedAuthorizations) {\r\n canContinue = false;\r\n if (\r\n window.confirm(\r\n `This authorization has pending related authorizations, are you sure you want to ${\r\n accepted ? \"authorize\" : \"reject\"\r\n } it?`\r\n )\r\n ) {\r\n canContinue = true;\r\n }\r\n }\r\n if (canContinue) {\r\n setResponsing({ accepted, rejected: !accepted });\r\n\r\n services\r\n .responseAuth({\r\n id: authorization.id,\r\n accepted,\r\n notes,\r\n })\r\n .then((r) => {\r\n clearState();\r\n toggle();\r\n });\r\n }\r\n };\r\n\r\n const clearState = () => {\r\n setResponsing({});\r\n setReadonly(false);\r\n };\r\n\r\n const handleGetAuthorizations = (...props) => {\r\n return services.getAuthorizations(...props).then((response) => {\r\n response.authorizations = response.authorizations.filter((auth) => auth.id !== authorization.id);\r\n return response;\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n Authorization\r\n {authorization.processedBy == \"\" &&\r\n authorization.requestedBy != username &&\r\n processProps &&\r\n !processProps.loading && }\r\n \r\n \r\n
    \r\n
    \r\n \r\n\r\n {\r\n
    \r\n {\" \"}\r\n \r\n
    \r\n }\r\n
    \r\n\r\n {/* Now can view process from footer button */}\r\n {/* {processProps &&\r\n (processProps.loading ? (\r\n \r\n ) : (\r\n \r\n ))} */}\r\n\r\n
    \r\n
    {authorization.title}
    \r\n

    {authorization.text}

    \r\n {authorization.description !== \"\" &&\r\n (authorization.description.includes(\"\\\\r\\\\n\") ? (\r\n authorization.description.split(\"\\\\r\\\\n\").map((name) => {\r\n return
    {name}
    ;\r\n })\r\n ) : (\r\n

    {authorization.description}

    \r\n ))}\r\n
    \r\n\r\n
    \r\n \r\n \r\n {authorization.role}\r\n \r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n\r\n
    \r\n \r\n \r\n {authorization.requestedBy}\r\n \r\n \r\n \r\n {processed ? authorization.processedBy : \"-\"}\r\n \r\n \r\n \r\n {processed ? (\r\n \r\n {\" \"}\r\n \r\n \r\n ) : (\r\n \"-\"\r\n )}\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n {notesLoading ? (\r\n \r\n ) : (\r\n \r\n \r\n setNotes(e.target.value)}\r\n name=\"text\"\r\n id=\"exampleText\"\r\n />\r\n \r\n )}\r\n
    \r\n
    \r\n {authorization.hasRelatedAuthorizations && (\r\n
    \r\n \r\n {`Show related authorizations`}\r\n \r\n
    \r\n )}\r\n
    \r\n \r\n toggle()}\r\n >\r\n Close\r\n \r\n {(authorization.process === \"Order\" ||\r\n authorization.process === \"Deposit\" ||\r\n authorization.process === \"Withdraw\") && (\r\n \r\n {`Show ${authorization.process}`}\r\n \r\n )}\r\n {readonly == false && (\r\n \r\n response(false)}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n \r\n  \r\n {\"Reject\"}\r\n \r\n response(true)}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n \r\n  \r\n {\"Authorize\"}\r\n \r\n \r\n )}\r\n \r\n
    \r\n {modalOpen && authorization.process === \"Order\" && (\r\n \r\n )}\r\n {modalOpen && (authorization.process === \"Deposit\" || authorization.process === \"Withdraw\") && (\r\n \r\n )}\r\n {modalAuthListOpen && (\r\n \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nconst Process = ({ process }) =>
    {process}
    ;\r\n\r\nexport default Authorization;\r\n","import React from \"react\";\r\nimport { Container, Row, Col } from \"reactstrap\";\r\nimport { Process } from \"../../EventAlert/types\";\r\nimport OrderInlineDetail from \"../../Order/InlineDetail\";\r\nimport IOInlineDetail from \"../../IO/InlineItem\";\r\nimport { detailsFields, Number } from \"../Order/Precheck/Details\";\r\nimport style from \"./style.module.scss\";\r\nimport CircularProgress from \"../../CircularProgress/CircularProgress\";\r\n\r\nconst trimAll = (text) => text.replace(/\"\\s+|\\s+\"/g, '\"');\r\n\r\nexport const SubTitle = ({ process, props }) => {\r\n switch (process) {\r\n case Process.Order:\r\n case Process.BulkOrder:\r\n case Process.BasketOrder:\r\n return ;\r\n\r\n case Process.Deposit:\r\n case Process.Withdraw:\r\n case Process.Transfer:\r\n // check if IO no exists\r\n const io = JSON.parse(trimAll(props[\"IO\"]));\r\n if (io.Id == 0) {\r\n return null;\r\n }\r\n\r\n return ;\r\n\r\n default:\r\n return null;\r\n }\r\n};\r\n\r\nexport const ProcessContext = ({ process, props }) => {\r\n switch (process) {\r\n case Process.Order:\r\n case Process.BulkOrder:\r\n case Process.BasketOrder:\r\n // remove unnecesary info, info can be handled by button in dialog\r\n // const order = JSON.parse(trimAll(props['Order']));\r\n // const account = JSON.parse(trimAll(props['Account']));\r\n // return (\r\n //
    \r\n // \r\n //
    \r\n // );\r\n return null;\r\n\r\n case Process.Deposit:\r\n case Process.Withdraw:\r\n case Process.Transfer:\r\n return null;\r\n\r\n default:\r\n return null;\r\n }\r\n};\r\n\r\nexport const LoadingMessage = ({ text }) => (\r\n
    \r\n \r\n {text}\r\n
    \r\n);\r\n\r\nconst OrderDetail = ({ form, result, balance }) => {\r\n const rows = detailsFields(result, form);\r\n return (\r\n
    \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n {rows.map((row, index) => (\r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n
    {row.label}\r\n \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n {balance.map(\r\n (item, index) =>\r\n item.key !== \"\" && (\r\n
    \r\n {item.key}\r\n \r\n
    \r\n )\r\n )}\r\n
    \r\n
    \r\n Total Portofolio (USD):\r\n \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"style-module_modal_3hI8h\",\"body\":\"style-module_body_OmmOI\",\"box\":\"style-module_box_3Z-f9\",\"process\":\"style-module_process_26DDK\",\"header\":\"style-module_header_2vJbC\",\"detail\":\"style-module_detail_2OEWZ\",\"flex\":\"style-module_flex_1MxA5\",\"loadingMessage\":\"style-module_loadingMessage_2AI5V\",\"orderDetail\":\"style-module_orderDetail_3QI--\",\"totals\":\"style-module_totals_1Azf0\",\"balance\":\"style-module_balance_kw21J\",\"title\":\"style-module_title_pCFfZ\",\"item\":\"style-module_item_1DRIv\",\"totalPortfolio\":\"style-module_totalPortfolio_2Y-HJ\"};","import React from \"react\";\r\nimport style from \"./styles.module.scss\";\r\n\r\nconst List = ({ items }) => {\r\n return (\r\n
      \r\n {items.length ? (\r\n items.map((item) => )\r\n ) : (\r\n Process has no related authorizations\r\n )}\r\n
    \r\n );\r\n};\r\n\r\nconst Item = ({ item }) => (\r\n
  • \r\n \r\n \r\n \r\n\r\n

    \r\n {item.title} \r\n
    \r\n {item.text}\r\n
    \r\n

    \r\n \r\n Authorization role: {item.role}\r\n \r\n
    \r\n

    \r\n
  • \r\n);\r\n\r\nconst getIconName = (status) => {\r\n switch (status) {\r\n case \"Authorized\":\r\n return \"text-buy icon-check\";\r\n case \"Rejected\":\r\n return \"text-danger icon-close\";\r\n case \"Waiting\":\r\n return \"icon-clock\";\r\n }\r\n};\r\n\r\nexport default List;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Button } from \"reactstrap\";\r\nimport style from \"./styles.module.scss\";\r\nimport { LoadingMessage } from \"../Authorization/Processes\";\r\nimport List from \"./List\";\r\n\r\nconst AuthorizationList = ({ open, toggle, process, processId, services }) => {\r\n const [loading, setLoading] = useState(true);\r\n const [items, setItems] = useState([]);\r\n\r\n useEffect(() => {\r\n setLoading(true);\r\n if (process && processId) {\r\n services\r\n .getAuthorizations({\r\n refProcess: process,\r\n refId: processId,\r\n })\r\n .then((res) => res.authorizations)\r\n .then((auths) => {\r\n setItems(auths);\r\n setLoading(false);\r\n });\r\n }\r\n }, [process, processId]);\r\n\r\n return (\r\n \r\n \r\n Authorizations\r\n \r\n \r\n {loading ? : }\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default AuthorizationList;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"item\":\"styles-module_item_1yLOj\",\"title\":\"styles-module_title_1zsPo\",\"info\":\"styles-module_info_3yUtt\",\"value\":\"styles-module_value_1-IYA\"};","import React, { useReducer, useEffect, useState } from \"react\";\r\nimport {\r\n Modal,\r\n ModalHeader,\r\n CustomInput,\r\n ModalBody,\r\n ModalFooter,\r\n Col,\r\n Row,\r\n Container,\r\n Input,\r\n Button,\r\n Table,\r\n} from \"reactstrap\";\r\nimport { initialize, defaultState } from \"./store/store\";\r\nimport style from \"./Collateral.module.scss\";\r\nimport { custodyReducer, validateForm } from \"./store/reducer\";\r\nimport Footer from \"./Footer\";\r\nimport { Numeric, Combobox, Field } from \"../Order/Field/Field\";\r\nimport Symbol from \"./components/Symbol\";\r\nimport CollateralWarranty from \"./components/CollateralWarranty\";\r\nimport Account from \"../IO/Fields/Account\";\r\nimport { getIntStatusName, getCWRelatedEntities } from \"../../Collateral/types\";\r\nimport { getEnabledStatus, getRelatedEntities } from \"./utils\";\r\nimport CircularProgress from \"../../CircularProgress/CircularProgress\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport { Mode } from \"../../../utils\";\r\nimport { showToast } from \"../../../utils/Helper\";\r\n\r\nconst Collateral = ({ open, toggle, services, role, ...props }) => {\r\n const [state, dispatch] = useReducer(custodyReducer, defaultState(), initialize(props));\r\n const { fields, collateral, ui } = state;\r\n const [showCollateralWarranty, setshowCollateralWarranty] = useState(false);\r\n const { errors, readonly } = fields;\r\n const { collaterals, products } = collateral;\r\n const [collateralWarrantyItem, setCollateralWarranty] = useState(null);\r\n const [toDelete, setToDelete] = useState(false);\r\n const [toEdit, setToEdit] = useState(false);\r\n\r\n if (state.buttons.confirm.visible == false) {\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.CONFIRM });\r\n }\r\n\r\n const onChange = (fields) => {\r\n dispatch({ type: \"CHANGE_FIELDS\", fields });\r\n };\r\n\r\n const addCollateralWarranty = (collateralWarranty) => {\r\n let sameDate = false\r\n collateral.collaterals.forEach((c) => {\r\n if (c.AssetId == collateralWarranty.AssetId){\r\n if (c.CollateralMaturity == collateralWarranty.CollateralMaturity){\r\n sameDate = true;\r\n if (collateralWarranty.ToEdit!=true){\r\n showToast(\"Error: \" + \"Can't add same Asset already added with same expiration date\", true);\r\n }\r\n else{\r\n if (collateralWarranty.index == c.index){\r\n dispatch({ type: \"ADD_COLLATERAL_WARRANTY\", collateralWarranty });\r\n }\r\n else{\r\n showToast(\"Error: \" + \"Can't edit same Asset with already added same expiration date\", true);\r\n }\r\n }\r\n }\r\n }\r\n })\r\n if (!sameDate){\r\n dispatch({ type: \"ADD_COLLATERAL_WARRANTY\", collateralWarranty });\r\n }\r\n };\r\n\r\n const getTotalAvailable = () => {\r\n let totalAvailable = 0;\r\n collateral.collaterals.map((c) => {\r\n totalAvailable += Math.floor(c.CollateralQuantity);\r\n });\r\n return totalAvailable;\r\n };\r\n\r\n const getTotalRequired = () => {\r\n let totalRequired = 0;\r\n return totalRequired;\r\n };\r\n\r\n const confirm = () => {\r\n dispatch({ type: \"CHANGE_BUTTON_PROPS\", props: { confirm: { loading: true } } });\r\n\r\n services\r\n .fetchUpdateCollateral({\r\n gcpool: {\r\n ...collateral,\r\n },\r\n })\r\n .then((r) => {\r\n if (r) {\r\n if (r.error) {\r\n dispatch({ type: \"CHANGE_BUTTON_PROPS\", props: { confirm: { loading: false } } });\r\n showToast(\"Error:\" + r.error.message, true);\r\n } else {\r\n if (r.result.Code === 200) {\r\n toggle();\r\n showToast(\"Updated successfully\");\r\n props.updateCollaterals();\r\n }\r\n else { \r\n if (toDelete){\r\n dispatch({ type: \"DELETE_COLLATERAL_WARRANTY_FAIL\"});\r\n showToast(\"Error: \" + (r.error ? r.error.message : \"Failed to delete\"), true);\r\n setToDelete(false);\r\n }\r\n collaterals.forEach((c) => {\r\n if (c.ToEdit && c.CollateralStatus == \"Inactive\"){\r\n c.CollateralStatus = \"Active\"\r\n }\r\n })\r\n setToEdit(false);\r\n showToast(\"Error: \" + r.result.Description, true);\r\n dispatch({ type: \"CHANGE_BUTTON_PROPS\", props: { confirm: { loading: false } } });\r\n }\r\n }\r\n } else {\r\n dispatch({ type: \"CHANGE_BUTTON_PROPS\", props: { confirm: { loading: false } } });\r\n showToast(\"Error: \" + \"Server error\", true);\r\n }\r\n });\r\n };\r\n\r\n const deleteCollateralWarranty = (index) => {\r\n setToDelete(true);\r\n dispatch({ type: \"DELETE_COLLATERAL_WARRANTY_REQUEST\", collateralWarranty: index });\r\n };\r\n\r\n const toggleEdit = (cw) => {\r\n cw.ToEdit = true;\r\n setToEdit(true);\r\n setCollateralWarranty(cw);\r\n setshowCollateralWarranty(true);\r\n};\r\n\r\n return (\r\n \r\n General Collateral Pool\r\n \r\n
    \r\n {ui.loading && }\r\n {!ui.loading && (\r\n \r\n \r\n {/* Left */}\r\n \r\n onChange(dispatch, f)}\r\n filter={[]}\r\n hideInstruction={true}\r\n hideHolder={true}\r\n readonly={{\r\n AccountName: true,\r\n }}\r\n errors={{\r\n AccountNumber: errors.accountNumber,\r\n }}\r\n services={{\r\n fetchSearchAccount: services.fetchSearchAccount,\r\n }}\r\n />\r\n \r\n \r\n \r\n onChange({ Poolname: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n ({\r\n id: key,\r\n description: getCWRelatedEntities(key),\r\n }))}\r\n disabled={true}\r\n invalid={!!errors.status}\r\n onChange={(v) => onChange({ GCPoolRelated: v })}\r\n emptyLabel={\"realtedEntity\"}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n \r\n \r\n ({\r\n id: key,\r\n description: getIntStatusName(key),\r\n }))}\r\n disabled={true}\r\n invalid={!!errors.status}\r\n onChange={(v) => onChange({ status: v })}\r\n emptyLabel={\"Status\"}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n {collateral.GCPoolRelated != \"Other\" && (\r\n \r\n \r\n onChange({ GCPoolRelatedEntityId: e.target.value })}\r\n />\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n onChange({ TotalAvilable: v })}\r\n invalid={!!errors.volume}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ TotalRequiered: v })}\r\n invalid={!!errors.volume}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ TotalAvailable: v })}\r\n invalid={!!errors.volume}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange({ GCPoolTrackTransfers: v.target.checked })}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n onChange(dispatch, { OrderNote: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n {\r\n setToEdit(false)\r\n setshowCollateralWarranty(true);\r\n setCollateralWarranty(null);\r\n }}\r\n >\r\n \r\n {\"\\u00A0\"} Add Collateral\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {collaterals.length == 0 && }\r\n {collaterals.map((collateralWarranty, i) => {\r\n collateralWarranty.index = i;\r\n if (collateralWarranty.CollateralStatus == \"Active\") {\r\n return (\r\n deleteCollateralWarranty(i)}\r\n onEdit={() => toggleEdit(collateralWarranty)}\r\n />\r\n );\r\n }\r\n })}\r\n \r\n
    MaturityAssetMarginQuantityStatus
    \r\n
    \r\n {showCollateralWarranty && (\r\n setshowCollateralWarranty(false)}\r\n services={{\r\n fetchSearchSymbol: services.fetchSearchSymbol,\r\n fetchSearchAccount: services.fetchSearchAccount,\r\n precheck: services.precheck,\r\n }}\r\n toEdit={toEdit}\r\n setToEdit={setToEdit}\r\n />\r\n )}\r\n \r\n
    \r\n \r\n \r\n null}\r\n disabled={true}\r\n >\r\n \r\n {\"\\u00A0\"} Add position to back\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {products.length == 0 && }\r\n {products.map((collateralPosition, i) => {\r\n return (\r\n deleteCollateralWarranty(collateralPosition)}\r\n onEdit={() => toggleEdit(collateralPosition)}\r\n />\r\n );\r\n })}\r\n \r\n
    AssetQuantityTotal
    \r\n
    \r\n \r\n
    \r\n
    \r\n )}\r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nconst CollateralPositionItem = ({ collateralPosition, readonly, onDelete, onEdit }) => (\r\n \r\n {collateralPosition.AssetTicker}\r\n {collateralPosition.PortfolioQuantity}\r\n {collateralPosition.PortfolioQuantity * collateralPosition.PortfolioAveragePrice}\r\n \r\n \r\n onDelete(collateralPosition)}\r\n style={{ color: \"#d83737\" }}\r\n >\r\n \r\n \r\n \r\n \r\n);\r\n\r\nconst CollateralWarrantyItem = ({ collateralWarranty, readonly, onDelete, onEdit }) => (\r\n \r\n \r\n \r\n \r\n {collateralWarranty.AssetTicker}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {collateralWarranty.CollateralStatus}\r\n \r\n \r\n onDelete(collateralWarranty)}\r\n style={{ color: \"#d83737\" }}\r\n >\r\n \r\n \r\n \r\n \r\n);\r\n\r\nconst EmptyCollateralsWarranties = () => (\r\n \r\n \r\n
    No Collaterals
    \r\n \r\n \r\n);\r\n\r\nconst EmptyCollateralsPositions = () => (\r\n \r\n \r\n
    No Positions
    \r\n \r\n \r\n);\r\n\r\nexport function validation(collateral) {\r\n return {\r\n AssetId: { empty: true },\r\n AssetTicker: { empty: true, autosuggestId: \"AssetId\" },\r\n CollateralMargin: { empty: true },\r\n CollateralQuantity: { empty: true },\r\n CollateralAppraisal: { empty: true },\r\n\r\n CollateralMaturity: { empty: true, date: true },\r\n CollateralStatus: { empty: true },\r\n };\r\n}\r\n\r\nexport default Collateral;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"Collateral-module_modal_2VN82\",\"body\":\"Collateral-module_body_KFRMY\",\"ButtonContainer\":\"Collateral-module_ButtonContainer_34V-V\",\"formContainer\":\"Collateral-module_formContainer_msvVk\",\"table\":\"Collateral-module_table_2wZ_6\",\"error\":\"Collateral-module_error_243q_\",\"empty\":\"Collateral-module_empty_1R9tv\",\"form\":\"Collateral-module_form_13o4u\",\"fileList\":\"Collateral-module_fileList_3kcWA\",\"link\":\"Collateral-module_link_3X_V2\",\"box\":\"Collateral-module_box_O9Mcz\"};","import React, { useContext } from \"react\";\r\nimport { Button } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport classnames from \"classnames\";\r\nimport style from \"./Collateral.module.scss\";\r\nimport { Mode } from \"../../../utils\";\r\n\r\nconst Footer = ({ toggle, buttons, actions, dispatch }) => {\r\n const { precheck, confirm } = buttons;\r\n\r\n return (\r\n
    \r\n {\" \"}\r\n {precheck.visible && (\r\n actions.precheck()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {\"Pre check\"}\r\n \r\n )}\r\n {confirm.visible && (\r\n actions.confirm()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {\"Confirm\"}\r\n \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nexport default Footer;\r\n","import React, { useReducer, useEffect, useState } from \"react\";\r\nimport {\r\n Modal,\r\n ModalHeader,\r\n CustomInput,\r\n ModalBody,\r\n ModalFooter,\r\n Col,\r\n Row,\r\n Container,\r\n Input,\r\n Button,\r\n Table,\r\n} from \"reactstrap\";\r\nimport { initialize, defaultState } from \"./store/store\";\r\nimport style from \"./Collateral.module.scss\";\r\nimport { custodyReducer, validateForm, validateFormHeader } from \"./store/reducer\";\r\nimport Footer from \"./Footer\";\r\nimport { Numeric, Combobox, Field } from \"../Order/Field/Field\";\r\nimport CollateralWarranty from \"./components/CollateralWarranty\";\r\nimport Account from \"../IO/Fields/Account\";\r\nimport { getIntStatusName, getCWRelatedEntities } from \"../../Collateral/types\";\r\nimport { getEnabledStatus, getRelatedEntities } from \"./utils\";\r\nimport CircularProgress from \"../../CircularProgress/CircularProgress\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport { Mode } from \"../../../utils\";\r\nimport { showToast } from \"../../../utils/Helper\";\r\n\r\nconst Collateral = ({ open, toggle, services, role, ...props }) => {\r\n const [state, dispatch] = useReducer(custodyReducer, defaultState(), initialize(props));\r\n const { fields, collateral, ui } = state;\r\n const [showCollateralWarranty, setshowCollateralWarranty] = useState(false);\r\n const { errors, readonly } = fields;\r\n const { collaterals, products } = collateral;\r\n const [collateralWarrantyItem, setCollateralWarranty] = useState(null);\r\n const [showErrors, setShowErrors] = useState(false);\r\n if (collateral.GCPoolRelated == null) {\r\n dispatch({ type: \"CHANGE_FIELDS\", fields: { GCPoolRelated: \"Other\" } });\r\n }\r\n if (state.buttons.confirm.visible == false) {\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.CONFIRM });\r\n }\r\n if (state.collateral.GCPoolTrackTransfers == null) {\r\n dispatch({ type: \"CHANGE_FIELDS\", fields: { GCPoolTrackTransfers: \"false\" } });\r\n }\r\n const onChange = (fields) => {\r\n dispatch({ type: \"CHANGE_FIELDS\", fields });\r\n };\r\n\r\n const onChangeAccount = (fieldsToChange) => {\r\n dispatch({\r\n type: \"CHANGE_FIELDS\",\r\n fields: {\r\n Accountnumber: fieldsToChange.AccountNumber,\r\n Accountid: fieldsToChange.AccountId,\r\n },\r\n });\r\n dispatch({ type: \"CHANGE_FIELDS\", fields: { collaterals: [] } });\r\n };\r\n\r\n const addCollateralWarranty = (collateralWarranty) => {\r\n let sameDate = false\r\n collateral.collaterals.forEach((c) => {\r\n if (c.AssetId == collateralWarranty.AssetId){\r\n if (c.CollateralMaturity == collateralWarranty.CollateralMaturity){\r\n sameDate = true;\r\n if (collateralWarranty.ToEdit!=true){\r\n showToast(\"Error: \" + \"Can't add same Asset already added with same expiration date\", true);\r\n }\r\n else{\r\n if (collateralWarranty.index == c.index){\r\n dispatch({ type: \"ADD_COLLATERAL_WARRANTY\", collateralWarranty });\r\n }\r\n else{\r\n showToast(\"Error: \" + \"Can't edit same Asset with already added same expiration date\", true);\r\n }\r\n }\r\n }\r\n }\r\n })\r\n if (!sameDate){\r\n dispatch({ type: \"ADD_COLLATERAL_WARRANTY\", collateralWarranty });\r\n }\r\n };\r\n\r\n const getTotalAvailable = () => {\r\n let totalAvailable = 0;\r\n collateral.collaterals.map((c) => {\r\n totalAvailable += c.CollateralQuantity;\r\n });\r\n return totalAvailable;\r\n };\r\n\r\n const getTotalRequired = () => {\r\n let totalRequired = 0;\r\n collateral.collaterals.map((c) => {\r\n totalRequired += c.CollateralQuantity * (1 - c.CollateralMargin / 100);\r\n });\r\n return totalRequired;\r\n };\r\n\r\n const confirm = () => {\r\n setShowErrors(false);\r\n const hasErrors = validateFormHeader(state);\r\n dispatch({ type: \"CHANGE_BUTTON_PROPS\", props: { confirm: { loading: true } } });\r\n if (!hasErrors) {\r\n services\r\n .fetchUpdateCollateral({\r\n gcpool: collateral,\r\n })\r\n .then((r) => {\r\n if (r) {\r\n if (r.error) {\r\n dispatch({ type: \"CHANGE_BUTTON_PROPS\", props: { confirm: { loading: false } } });\r\n showToast(\"Error: \" + r.error.message, true);\r\n } else {\r\n if (r.result.Code === 200) {\r\n toggle();\r\n showToast(\"Added Successfully\");\r\n props.updateCollaterals();\r\n } else {\r\n showToast(\"Error: \" + r.result.Description, true);\r\n dispatch({ type: \"CHANGE_BUTTON_PROPS\", props: { confirm: { loading: false } } });\r\n }\r\n }\r\n } else {\r\n dispatch({ type: \"CHANGE_BUTTON_PROPS\", props: { confirm: { loading: false } } });\r\n showToast(\"Error: \" + \"Server error\", true);\r\n }\r\n });\r\n } else {\r\n setShowErrors(true);\r\n dispatch({ type: \"CHANGE_BUTTON_PROPS\", props: { confirm: { loading: false } } });\r\n }\r\n };\r\n\r\n const deleteCollateralWarranty = (index) => {\r\n dispatch({\r\n type: \"CHANGE_FIELDS\",\r\n fields: {\r\n collaterals: collateral.collaterals.filter((c, i) => i !== index),\r\n },\r\n });\r\n };\r\n\r\n const toggleEdit = (cw) => {\r\n cw.ToEdit = true;\r\n setCollateralWarranty(cw);\r\n setshowCollateralWarranty(true);\r\n };\r\n\r\n return (\r\n \r\n General Collateral Pool\r\n \r\n
    \r\n {ui.loading && }\r\n {!ui.loading && (\r\n \r\n \r\n \r\n onChangeAccount(f)}\r\n filter={[]}\r\n hideInstruction={true}\r\n error={true}\r\n hideHolder={true}\r\n readonly={{\r\n AccountName: false,\r\n }}\r\n errors={{\r\n AccountNumber:\r\n (collateral.Accountnumber== null || collateral.Accountnumber == \"\") && showErrors,\r\n AccountId: (collateral.Accountid == null || collateral.Accountid == \"\") && showErrors,\r\n }}\r\n services={{\r\n fetchSearchAccount: services.fetchSearchAccount,\r\n }}\r\n />\r\n \r\n \r\n \r\n onChange({ Poolname: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n ({\r\n id: key,\r\n description: getCWRelatedEntities(key),\r\n }))}\r\n disabled={true}\r\n invalid={!!errors.status}\r\n onChange={(v) => onChange({ GCPoolRelated: v })}\r\n emptyLabel={\"realtedEntity\"}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n \r\n \r\n ({\r\n id: key,\r\n description: getIntStatusName(key),\r\n }))}\r\n invalid={!!errors.status}\r\n onChange={(v) => onChange({ status: v })}\r\n emptyLabel={\"Status\"}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n {collateral.GCPoolRelated != \"Other\" && (\r\n \r\n \r\n onChange({ GCPoolRelatedEntityId: e.target.value })}\r\n />\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n onChange({ TotalAvilable: v })}\r\n invalid={!!errors.volume}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ TotalRequiered: v })}\r\n invalid={!!errors.volume}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ Margin: v })}\r\n invalid={!!errors.volume}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange({ GCPoolTrackTransfers: v.target.checked })}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n onChange(dispatch, { OrderNote: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n {\r\n setshowCollateralWarranty(true);\r\n setCollateralWarranty(null);\r\n }}\r\n >\r\n \r\n {\"\\u00A0\"} Add Collateral\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {collaterals.length == 0 && }\r\n {collaterals.map((collateralWarranty, i) => {\r\n collateralWarranty.index = i;\r\n if (collateralWarranty.CollateralStatus == \"Active\") {\r\n return (\r\n deleteCollateralWarranty(i)}\r\n onEdit={() => toggleEdit(collateralWarranty)}\r\n />\r\n );\r\n }\r\n })}\r\n \r\n
    MaturityAssetMarginQuantityStatus
    \r\n
    \r\n {showCollateralWarranty && (\r\n setshowCollateralWarranty(false)}\r\n services={{\r\n fetchSearchSymbol: services.fetchSearchSymbol,\r\n fetchSearchAccount: services.fetchSearchAccount,\r\n precheck: services.precheck,\r\n }}\r\n />\r\n )}\r\n \r\n
    \r\n \r\n \r\n null}\r\n disabled={true}\r\n >\r\n \r\n {\"\\u00A0\"} Add position to back\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {products.length == 0 && }\r\n {products.map((collateralPosition, i) => {\r\n return (\r\n deleteCollateralWarranty(collateralPosition)}\r\n onEdit={() => toggleEdit(collateralPosition)}\r\n />\r\n );\r\n })}\r\n \r\n
    AssetQuantityTotal
    \r\n
    \r\n \r\n
    \r\n
    \r\n )}\r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nconst CollateralPositionItem = ({ collateralPosition, readonly, onDelete, onEdit }) => (\r\n \r\n {collateralPosition.AssetTicker}\r\n {collateralPosition.PortfolioQuantity}\r\n {collateralPosition.PortfolioQuantity * collateralPosition.PortfolioAveragePrice}\r\n \r\n \r\n onDelete(collateralPosition)}\r\n style={{ color: \"#d83737\" }}\r\n >\r\n \r\n \r\n \r\n \r\n);\r\n\r\nconst CollateralWarrantyItem = ({ collateralWarranty, readonly, onDelete, onEdit }) => (\r\n \r\n \r\n \r\n \r\n {collateralWarranty.AssetTicker}\r\n {collateralWarranty.CollateralMargin}\r\n {collateralWarranty.CollateralQuantity}\r\n {collateralWarranty.CollateralStatus}\r\n \r\n \r\n onDelete(collateralWarranty)}\r\n style={{ color: \"#d83737\" }}\r\n >\r\n \r\n \r\n \r\n \r\n);\r\n\r\nconst EmptyCollateralsWarranties = () => (\r\n \r\n \r\n
    No Collaterals
    \r\n \r\n \r\n);\r\n\r\nconst EmptyCollateralsPositions = () => (\r\n \r\n \r\n
    No Positions
    \r\n \r\n \r\n);\r\n\r\nexport function validationHeader(collateral) {\r\n return {\r\n Accountnumber: { empty: true },\r\n Poolname: { empty: true },\r\n };\r\n}\r\n\r\nexport default Collateral;\r\n","import React, { useReducer, useEffect } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Col, Row, Container, Input } from \"reactstrap\";\r\nimport { initialize, defaultState } from \"./../store/store\";\r\nimport style from \"./../Collateral.module.scss\";\r\nimport { custodyReducer, validateForm } from \"./../store/reducer\";\r\nimport Footer from \"./../Footer\";\r\nimport { Numeric, Combobox, Field } from \"./../../Order/Field/Field\";\r\nimport Symbol from \"./Symbol\";\r\nimport { getIntStatusName } from \"./../../../Collateral/types\";\r\nimport { Mode } from \"../../../../utils\";\r\nimport { getEnabledStatus } from \"./../utils\";\r\nimport CircularProgress from \"./../../../CircularProgress/CircularProgress\";\r\nimport { showToast } from \"../../../../utils/Helper\";\r\nconst collateralWarranty = ({ open, toggle, addCollateralWarranty, services, role, toEdit, setToEdit, ...props }) => {\r\n const [state, dispatch] = useReducer(custodyReducer, defaultState(), initialize(props));\r\n const { fields, collateralWarrantyItem, ui } = state;\r\n const { errors, readonly } = fields;\r\n const onChange = (fields) => {\r\n dispatch({ type: \"CHANGE_FIELDS_COLLATERAL_WARRANTY\", fields });\r\n if (fields.CollateralAppraisal) {\r\n dispatch({\r\n type: \"CHANGE_FIELDS_COLLATERAL_WARRANTY\",\r\n fields: { CollateralMargin: 100 - fields.CollateralAppraisal },\r\n });\r\n }\r\n if (fields.CollateralMargin) {\r\n dispatch({\r\n type: \"CHANGE_FIELDS_COLLATERAL_WARRANTY\",\r\n fields: { CollateralAppraisal: 100 - fields.CollateralMargin },\r\n });\r\n }\r\n\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.EDIT });\r\n };\r\n\r\n if (collateralWarrantyItem.CollateralMargin == null) {\r\n dispatch({ type: \"CHANGE_FIELDS_COLLATERAL_WARRANTY\", fields: { CollateralMargin: 0 } });\r\n }\r\n\r\n if (collateralWarrantyItem.CollateralAppraisal == null) {\r\n dispatch({ type: \"CHANGE_FIELDS_COLLATERAL_WARRANTY\", fields: { CollateralAppraisal: 100 } });\r\n }\r\n\r\n const precheck = () => {\r\n state.fields.errors = {};\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.PRECHECK });\r\n const hasErrors = validateForm(state);\r\n if (!hasErrors) {\r\n let order = {\r\n OrderQuantityIsCash: \"false\",\r\n OrderSide: \"Sell\",\r\n AssetId: state.collateralWarrantyItem.AssetId,\r\n CurrentAccount: {\r\n Quantity: state.collateralWarrantyItem.CollateralQuantity,\r\n AccountId: state.collateral.Accountid,\r\n Collateral: [\r\n {\r\n CollateralId: state.collateralWarrantyItem.CollateralId,\r\n },\r\n ],\r\n },\r\n };\r\n services.precheck(order).then((r) => {\r\n if (r.validation.result.Code == 200) {\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.CONFIRM });\r\n } else {\r\n showToast(\"The volume exceed the quantity in the account\", true);\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.EDIT });\r\n }\r\n });\r\n } else {\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.EDIT });\r\n }\r\n };\r\n\r\n const confirm = () => {\r\n dispatch({ type: \"CHANGE_BUTTON_PROPS\", props: { confirm: { loading: true } } });\r\n addCollateralWarranty(state.collateralWarrantyItem);\r\n toggle();\r\n };\r\n\r\n return (\r\n
    \r\n
    \r\n {!ui.loading && (\r\n \r\n \r\n {toEdit ? (\r\n \r\n \r\n \r\n \r\n \r\n ) \r\n : \r\n (\r\n \r\n \r\n onChange({\r\n AssetId: v.AssetId,\r\n AssetTicker: v.AssetTicker,\r\n })\r\n }\r\n error={errors.AssetTicker}\r\n value={collateralWarrantyItem.AssetTicker}\r\n fetchSearchSymbol={services.fetchSearchSymbol}\r\n />\r\n \r\n )}\r\n \r\n \r\n onChange({ CollateralQuantity: v })}\r\n invalid={!!errors.CollateralQuantity}\r\n dataTypeDecimalName=\"quantity\"\r\n />\r\n \r\n \r\n \r\n \r\n ({\r\n id: key,\r\n description: getIntStatusName(key),\r\n }))}\r\n disabled={collateralWarrantyItem.ToEdit ? (false) : (true)}\r\n invalid={!!errors.CollateralStatus}\r\n onChange={(v) => onChange({ CollateralStatus: v })}\r\n emptyLabel={\"Status\"}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ CollateralMargin: v })}\r\n invalid={!!errors.CollateralMargin}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ CollateralAppraisal: v })}\r\n invalid={!!errors.CollateralAppraisal}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ CollateralMaturity: v.target.value })}\r\n invalid={!!errors.CollateralMaturity}\r\n />\r\n \r\n \r\n \r\n \r\n )}\r\n
    \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport function validation(collateral) {\r\n return {};\r\n}\r\n\r\nexport default collateralWarranty;\r\n","import React from \"react\";\r\nimport style from \"./../../IO/Fields/Fields.module.scss\";\r\nimport { Field } from \"../../Order/Field/Field\";\r\nimport Autosuggest from \"../../../Autosuggest/Autosuggest\";\r\nimport { IOType } from \"../../../IO/types\";\r\n\r\nconst Symbol = ({ ioType, isCurrency, value, error, disabled, accountId, onChange, fetchSearchSymbol }) => {\r\n const fetchSearch = ({ value }) => {\r\n return fetchSearchSymbol({\r\n type: \"Event\",\r\n text: value,\r\n length: 10,\r\n accountId: ioType != null && ioType != IOType.Deposit ? accountId : 0,\r\n })\r\n .then((r) => r.response.symbols)\r\n .then((symbols) =>\r\n symbols.map((s) => ({\r\n id: s.Id,\r\n name: `${s.Ticker} ${isCurrency ? `- ${s.Description}` : \"\"}`,\r\n decimal: Number(s.decimal),\r\n Price: s.price,\r\n }))\r\n );\r\n };\r\n\r\n const internalOnChange = (method, value) => {\r\n const _value = {\r\n CurrencyId: null,\r\n CurrencyISO: \"\",\r\n AssetId: null,\r\n AssetTicker: \"\",\r\n decimal: 2,\r\n };\r\n\r\n if (method != \"type\" && value.id) {\r\n if (isCurrency) {\r\n _value.CurrencyId = value.id;\r\n _value.CurrencyISO = value.name;\r\n _value.decimal = 2;\r\n } else {\r\n _value.AssetId = value.id;\r\n _value.AssetTicker = value.name;\r\n _value.decimal = value.decimal;\r\n _value.Price = value.Price;\r\n }\r\n }\r\n\r\n onChange(_value);\r\n };\r\n\r\n return (\r\n \r\n (\r\n
    \r\n {suggestion.name}\r\n
    \r\n )}\r\n getSuggestionValue={(s) => `${s.name}`}\r\n onSuggestionsFetchRequested={fetchSearch}\r\n value={value || \"\"}\r\n inputProps={{\r\n placeholder: isCurrency ? \"Currency\" : \"Asset\",\r\n invalid: !!error,\r\n disabled: disabled || (ioType != null && ioType != IOType.Deposit && !accountId),\r\n }}\r\n onChange={(m, v) => internalOnChange(m, v)}\r\n />\r\n \r\n );\r\n};\r\n\r\nexport default Symbol;\r\n","import { mergeDeep } from \"../../../../utils/Helper\";\r\nimport { Mode } from \"../../../../utils\";\r\nimport { validation } from \"../Collateral\";\r\nimport { validationHeader } from \"../NewCollateral\";\r\nimport { CustodyIntStatus } from \"../../../Collateral/types\";\r\nimport { func } from \"prop-types\";\r\n\r\nexport const custodyReducer = (state, action) => {\r\n switch (action.type) {\r\n case \"CHANGE_MODE\":\r\n switch (action.mode) {\r\n case Mode.EDIT:\r\n return processEdit(state);\r\n case Mode.PRECHECK:\r\n return processPrecheck(state);\r\n case Mode.CONFIRM:\r\n return processConfirm(state);\r\n default:\r\n return state;\r\n }\r\n case \"SET_COLLATERAL\":\r\n return processSetCustody(state, action.custody);\r\n\r\n case \"SET_INITIALS_READONLY\":\r\n return processSetInitialsReadOnly(state);\r\n case \"ADD_COLLATERAL_WARRANTY\":\r\n return addCollateralWarrantyToCollateral(state, action.collateralWarranty);\r\n case \"SET_COLLATERAL_WARRANTY_ITEM\":\r\n return setCollateralWarranyItem(state, action.collateralWarrantyItem);\r\n case \"DELETE_COLLATERAL_WARRANTY_REQUEST\":\r\n case \"DELETE_COLLATERAL_WARRANTY_FAIL\":\r\n return deleteCollateralWarranty(state, action); \r\n case \"CHANGE_FIELDS\":\r\n return processChangeFields(state, action.fields);\r\n case \"CHANGE_FIELDS_COLLATERAL_WARRANTY\":\r\n return processChangeFieldsCollateralWarrany(state, action.fields);\r\n case \"CHANGE_BUTTON_PROPS\":\r\n return changeButtonProps(state, action);\r\n default:\r\n return state;\r\n }\r\n};\r\n\r\nfunction deleteCollateralWarranty(state, action) {\r\n const collateral = state.collateral;\r\n\r\n switch (action.type) {\r\n case \"DELETE_COLLATERAL_WARRANTY_REQUEST\":\r\n const { collateralWarranty } = action; \r\n const index = collateral.collaterals.findIndex((c) => c.index == collateralWarranty);\r\n collateral.collaterals[index].CollateralStatus = \"Inactive\";\r\n break;\r\n case \"DELETE_COLLATERAL_WARRANTY_FAIL\":\r\n collateral.collaterals.forEach((c) =>\r\n {\r\n if (c.CollateralStatus = \"Inactive\"){\r\n c.CollateralStatus = \"Active\";\r\n }\r\n })\r\n break;\r\n }\r\n\r\n return { ...state, collateral: { ...collateral } };\r\n}\r\n\r\nfunction addCollateralWarrantyToCollateral(state, collateralWarranty) {\r\n const collateral = state.collateral;\r\n\r\n if (collateralWarranty.CollateralId == null) {\r\n const index = collateral.collaterals.findIndex((c) => c.AssetId == collateralWarranty.AssetId);\r\n if (index!=-1){\r\n if (!collateralWarranty.ToEdit){\r\n collateral.collaterals.push(collateralWarranty);\r\n }\r\n else{\r\n const indexCollateral = collateral.collaterals.findIndex((c) => c.CollateralId == collateralWarranty.CollateralId);\r\n collateral.collaterals[indexCollateral] = collateralWarranty;\r\n }\r\n }\r\n else{\r\n collateral.collaterals.push(collateralWarranty);\r\n }\r\n } else {\r\n //if collateralWarranty.id is not null, it is an existing collateralWarranty\r\n const index = collateral.collaterals.findIndex((c) => c.CollateralId == collateralWarranty.CollateralId);\r\n collateral.collaterals[index] = collateralWarranty;\r\n\r\n }\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n collateral: {\r\n ...collateral,\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction processSetCustody(state, collateral) {\r\n const { mode } = state.ui;\r\n const readonly = {};\r\n\r\n if (mode == Mode.READONLY) {\r\n Object.keys(collateral).forEach((f) => {\r\n readonly[f] = true;\r\n });\r\n }\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n loading: false,\r\n },\r\n collateral: {\r\n ...collateral,\r\n },\r\n collateralWarrantyItem: {\r\n ...collateralwarrantyitem,\r\n },\r\n fields: {\r\n readonly,\r\n },\r\n buttons: {\r\n precheck: { visible: mode != Mode.READONLY },\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction processChangeFields(state, fields) {\r\n const errors = Object.keys(fields).reduce((f, name) => {\r\n //f[name] = undefined;\r\n return f;\r\n }, {});\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n collateral: {\r\n ...fields,\r\n },\r\n fields: {\r\n errors,\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction setCollateralWarranyItem(state, collateralWarrantyI) {\r\n return mergeDeep({ ...state }, { collateralWarrantyItem: { ...collateralWarrantyI } });\r\n}\r\n\r\nfunction processChangeFieldsCollateralWarrany(state, fields) {\r\n const errors = Object.keys(fields).reduce((f, name) => {\r\n //f[name] = undefined;\r\n return f;\r\n }, {});\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n collateralWarrantyItem: {\r\n ...fields,\r\n },\r\n fields: {\r\n errors,\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction processSetInitialsReadOnly(state) {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n fields: {\r\n readonly: {\r\n accountName: true,\r\n assetticker: true,\r\n volume: state.custody.internalstatus != CustodyIntStatus.ClientRequest,\r\n date: true,\r\n },\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction processEdit(state) {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n mode: Mode.EDIT,\r\n },\r\n buttons: {\r\n precheck: {\r\n visible: true,\r\n loading: false,\r\n },\r\n modify: {\r\n visible: false,\r\n },\r\n confirm: {\r\n visible: false,\r\n loading: false,\r\n },\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction processPrecheck(state) {\r\n const errors = validateForm(state);\r\n\r\n if (errors == false) {\r\n const readonly = {};\r\n\r\n Object.keys(state.collateralWarrantyItem).forEach((f) => {\r\n readonly[f] = true;\r\n });\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n mode: Mode.PRECHECK,\r\n },\r\n buttons: {\r\n precheck: {\r\n loading: true,\r\n },\r\n },\r\n fields: {\r\n readonly,\r\n },\r\n }\r\n );\r\n } else {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n fields: {\r\n errors,\r\n },\r\n }\r\n );\r\n }\r\n}\r\n\r\nfunction processConfirm(state) {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n buttons: {\r\n precheck: {\r\n visible: false,\r\n loading: false,\r\n },\r\n modify: {\r\n visible: true,\r\n },\r\n confirm: {\r\n visible: true,\r\n loading: false,\r\n },\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction changeButtonProps(state, { props }) {\r\n return mergeDeep({ ...state }, { buttons: { ...props } });\r\n}\r\n\r\nexport function validateFormHeader(state) {\r\n const errors = {};\r\n const { collateral, fields } = state;\r\n const { hiddens } = fields;\r\n const validations = validationHeader(collateral);\r\n\r\n Object.entries(validations).forEach((entry) => {\r\n const [name, value] = entry;\r\n if (!hiddens[name]) {\r\n if (value.empty) {\r\n if (collateral[name] == undefined || collateral[name] === \"\") {\r\n errors[name] = \"Required field\";\r\n } else if (value.autosuggestId && collateral[value.autosuggestId] == undefined) {\r\n errors[name] = \"Must select a value from list\";\r\n } else if (collateral[name] < 0) {\r\n errors[name] = \"the value must be positive\";\r\n }\r\n }\r\n }\r\n });\r\n\r\n // has Errors only add errors to state\r\n if (Object.keys(errors).length !== 0) {\r\n mergeDeep(\r\n { ...state },\r\n {\r\n fields: {\r\n errors,\r\n },\r\n }\r\n );\r\n return errors;\r\n }\r\n return false;\r\n}\r\n\r\nexport function validateForm(state) {\r\n const { collateralWarrantyItem, fields } = state;\r\n const { hiddens } = fields;\r\n const errors = {};\r\n\r\n const validations = validation(collateralWarrantyItem);\r\n\r\n Object.entries(validations).forEach((entry) => {\r\n const [name, value] = entry;\r\n\r\n if (!hiddens[name]) {\r\n if (value.empty) {\r\n if (collateralWarrantyItem[name] == undefined || collateralWarrantyItem[name] === \"\") {\r\n errors[name] = \"Required field\";\r\n } else if (value.autosuggestId && collateralWarrantyItem[value.autosuggestId] == undefined) {\r\n errors[name] = \"Must select a value from list\";\r\n } else if (collateralWarrantyItem[name] < 0) {\r\n errors[name] = \"the value must be positive\";\r\n }\r\n }\r\n //check if the date is not in the past\r\n if (value.date) {\r\n if (collateralWarrantyItem[name] == undefined || collateralWarrantyItem[name] === \"\") {\r\n errors[name] = \"Required field\";\r\n } else if (new Date(collateralWarrantyItem[name]) < new Date()) {\r\n errors[name] = \"the date must be in the future\";\r\n }\r\n }\r\n }\r\n });\r\n\r\n // has Errors only add errors to state\r\n if (Object.keys(errors).length !== 0) {\r\n return errors;\r\n }\r\n\r\n return false;\r\n}\r\n","import { Mode } from '../../../../utils';\r\nimport { mergeDeep } from '../../../../utils/Helper';\r\n\r\nexport const initialize = (props) => {\r\n return (initialState) => {\r\n let state = mergeDeep(\r\n { ...initialState },\r\n {\r\n ui: {\r\n mode: props.mode || Mode.EDIT,\r\n loading: props.retriveAsync\r\n },\r\n collateral: {\r\n ...props.collateral,\r\n },\r\n collateralWarrantyItem: {\r\n ...props.collateralWarrantyItem,\r\n },\r\n }\r\n );\r\n if (state.ui.mode == Mode.READONLY) {\r\n Object.keys(state.collateral).forEach(f => {\r\n state.fields.readonly[f] = true;\r\n })\r\n\r\n state.buttons.precheck.readonly = true;\r\n }\r\n\r\n return state;\r\n }\r\n}\r\n\r\nexport const defaultState = () => ({\r\n ui: {\r\n title: 'General Collateral Pool',\r\n mode: Mode.EDIT\r\n },\r\n fields: {\r\n errors: {},\r\n readonly: {},\r\n hiddens: {}\r\n },\r\n collateral: {\r\n id: null,\r\n Accountid: null,\r\n Accountname: null,\r\n GCPoolRelated: null,\r\n GCPoolRelatedEntityId: null,\r\n GCPoolTrackTransfers: null,\r\n status: \"active\",\r\n collaterals: [],\r\n products: [],\r\n Margin: null,\r\n Poolname: null,\r\n TotalAvilable: null,\r\n TotalRequiered: null,\r\n TrackTransfers: false,\r\n },\r\n collateralWarrantyItem: {\r\n AssetId: null,\r\n AssetTicker: null,\r\n CollateralAppraisal: null,\r\n CollateralId: null,\r\n CollateralMargin: null,\r\n CollateralMaturity: null,\r\n CollateralQuantity: null,\r\n CollateralStatus: \"Active\",\r\n },\r\n\r\n buttons: {\r\n confirm: {\r\n visible: false\r\n },\r\n precheck: {\r\n visible: true\r\n },\r\n },\r\n})","import { CWStatus,CWRelatedEntites } from \"../../Collateral/types\";\r\n\r\n\r\nexport function getRelatedEntities (){\r\n return Object.values(CWRelatedEntites);\r\n}\r\n\r\nexport function getEnabledStatus(collateral) {\r\n let allInternalStatus = Object.values(CWStatus);\r\n let skipItems = [];\r\n\r\n /*if (collateral.internalstatus == CWStatus.CustodianRequest) {\r\n skipItems = [CWStatus.ClientRequest];\r\n }\r\n else if (collateral.internalstatus != CWStatus.ClientRequest ) {\r\n skipItems = [\r\n CWStatus.ClientRequest, \r\n CWStatus.CustodianRequest\r\n ];\r\n }\r\n \r\n if (collateral.internalstatus == CWStatus.Returned) {\r\n skipItems = [...skipItems, CWStatus.ReturnRequested];\r\n }\r\n\r\n allInternalStatus = allInternalStatus.filter(\r\n s => skipItems.includes(s) == false\r\n );\r\n*/\r\n return allInternalStatus;\r\n}","import React, { useReducer, useEffect, useState } from \"react\";\r\n\r\nimport {\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Col,\r\n Row,\r\n Container,\r\n Input,\r\n Button,\r\n Card,\r\n CardHeader,\r\n CardBody,\r\n Nav,\r\n NavItem,\r\n NavLink,\r\n Table,\r\n} from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { defaultState } from \"./store/store\";\r\nimport classnames from \"classnames\";\r\n\r\nimport style from \"./CorpEvents.module.scss\";\r\nimport { EventSimpleReducer } from \"./store/reducer\";\r\n// import Footer from './Footer';\r\nimport { Combobox, Field } from \"../Order/Field/Field\";\r\n// import Symbol from '../IO/Fields/Symbol';\r\n// import Account from '../IO/Fields/Account';\r\n// import { CustodyLock, getIntStatusName, CustodyIntStatus } from '../../Custody/types';\r\n// import { Mode } from '../../../utils';\r\n// import { getEnabledStatus } from './utils';\r\n// import {InternalStatus} from './../../Custody/Items';\r\nimport CircularProgress from \"../../CircularProgress/CircularProgress\";\r\nimport GridCustody from \"./Items/GridCustody\";\r\nimport GridAccount from \"./Items/GridAccount\";\r\nimport Errors from \"./Items/Error\";\r\nimport { Numeric } from \"../../Modal/Order/Field/Field\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport { DateField, DateFieldStyle } from \"../../../utils\";\r\nimport { toFormatDate, getLocalDate, toDateFromString, parseDate } from \"../../../utils/dateUtils\";\r\n\r\nconst eventsingle = {\r\n Account: [],\r\n AssetId: 0,\r\n WithholdingPropClient: 0,\r\n WithholdingProp: 0,\r\n WithholdingNoPropClient: 0,\r\n WithholdingNoProp: 0,\r\n CommissionPropClient: 0,\r\n CommissionProp: 0,\r\n CommissionNoPropClient: 0,\r\n CommissionNoProp: 0,\r\n BasePropClient: 0,\r\n BaseProp: 0,\r\n BaseNoPropClient: 0,\r\n FeeNoProp: 0,\r\n FeePropClient: 0,\r\n FeeProp: 0,\r\n FeeNoPropClient: 0,\r\n BaseNoProp: 0,\r\n TaxNoPropClient: 0,\r\n TaxNoProp: 0,\r\n TaxProp: 0,\r\n TaxPropClient: 0,\r\n PortfolioTotalProp: 0,\r\n PortfolioTotalNoProp: 0,\r\n PortfolioTotalNoPropClient: 0,\r\n PortfolioTotalPropClient: 0,\r\n CorporateEventReleased: false,\r\n};\r\n\r\nconst CorpEvents = ({ open, toggle, newE, toggleEvent, searchEvents, services, ...props }) => {\r\n const [state, dispatch] = useReducer(EventSimpleReducer, defaultState());\r\n const [Corpevent, setEvent] = useState({});\r\n const [custodyProp, setCustodyProp] = useState([]);\r\n const [custody, setCustody] = useState([]);\r\n const [account, setAccount] = useState([]);\r\n const [accountProp, setAccountProp] = useState([]);\r\n const [currencies, setCurrencies] = useState([]);\r\n const [auxaccount, setAccountAux] = useState([]);\r\n const [custodyaux, setCustodyAux] = useState([]);\r\n const [wizzard, setWizzard] = useState(1);\r\n const [loading, setLoading] = useState(false);\r\n const [errorbook, seterrorbook] = useState({ open: false, desc: \"\" });\r\n const [label, setLabel] = useState(\"\");\r\n const [sending, setSending] = useState(false);\r\n const [saving, setSaving] = useState(false);\r\n const [deleting, setDeleting] = useState(false);\r\n const [downloading, setdownloading] = useState(false);\r\n const [currencypairs, setCurrencyPairs] = useState({\r\n labelsett: \"\",\r\n labelcomm: \"\",\r\n labeltax: \"\",\r\n });\r\n const [isFundsXSystem, setIsFundsXSystem] = useState(false);\r\n\r\n useEffect(() => {\r\n if (props.event.CorporateEventId !== 0) {\r\n services\r\n .fetchGetCorporateEventSingle({\r\n corporateeventid: props.event.CorporateEventId,\r\n })\r\n .then((r) => {\r\n setEvent(r);\r\n const custodyProp1 = r.Account.filter((account) => account.IsProp);\r\n const custody1 = r.Account.filter((account) => !account.IsProp);\r\n const account1 = r.Account.filter((account) => !account.IsProp);\r\n const accountProp1 = r.Account.filter((account) => account.IsProp);\r\n\r\n let custodyProp = custodyProp1.filter((item) => item.BasicAccountType == \"Bank\");\r\n let custody = custody1.filter((item) => item.BasicAccountType == \"Bank\");\r\n let account = account1.filter((item) => item.BasicAccountType == \"Customer\");\r\n let accountProp = accountProp1.filter(\r\n (item) => item.BasicAccountType == \"InBalance\" || item.BasicAccountType == \"Fund\"\r\n );\r\n\r\n let item = account.length > 0 && JSON.parse(JSON.stringify(account[0]));\r\n if (!item) {\r\n item = accountProp.length > 0 && JSON.parse(JSON.stringify(accountProp[0]));\r\n }\r\n\r\n if (item) {\r\n item.EventAccountAmount = 0;\r\n for (let i = 0; i < item.FootPrintCredit.length; i++) {\r\n item.FootPrintCredit[i].EventAccountDebitCreditVolume = 0;\r\n }\r\n\r\n for (let i = 0; i < item.FootPrintDebit.length; i++) {\r\n item.FootPrintDebit[i].EventAccountDebitCreditVolume = 0;\r\n }\r\n }\r\n\r\n let item2 = custody.length > 0 && JSON.parse(JSON.stringify(custody[0]));\r\n if (!item2) {\r\n item2 = custodyProp.length > 0 && JSON.parse(JSON.stringify(custodyProp[0]));\r\n }\r\n\r\n if (item2) {\r\n item2.EventAccountAmount = 0;\r\n\r\n for (let i = 0; i < item2.FootPrintCredit.length; i++) {\r\n item2.FootPrintCredit[i].EventAccountDebitCreditVolume = 0;\r\n }\r\n\r\n for (let i = 0; i < item2.FootPrintDebit.length; i++) {\r\n item2.FootPrintDebit[i].EventAccountDebitCreditVolume = 0;\r\n }\r\n }\r\n\r\n setCustody(custody);\r\n setCustodyProp(custodyProp);\r\n setAccount(account);\r\n setAccountProp(accountProp);\r\n setAccountAux(item);\r\n setCustodyAux(item2);\r\n setEvent(r);\r\n });\r\n }\r\n }, [props.event.CorporateEventId]);\r\n\r\n useEffect(() => {\r\n if (services && services.isFundManagerSistem) {\r\n services.isFundManagerSistem().then((res) => {\r\n if (res && res.response) {\r\n const parametersData = res.response.SdtParametersData;\r\n if (parametersData && parametersData.ParameterNumericValue == 1) {\r\n setIsFundsXSystem(true);\r\n }\r\n }\r\n });\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n services.fetchCurrencies({}).then((r) => {\r\n const currency = r.currencies;\r\n const currencies = [];\r\n let item = {};\r\n for (let i = 0; i < currency.length; i++) {\r\n item = {\r\n id: currency[i].currencyId,\r\n description: currency[i].currencyISO,\r\n };\r\n currencies.push(item);\r\n }\r\n setCurrencies(currencies);\r\n });\r\n }, []);\r\n\r\n const onChange = (name, value) => {\r\n if (name == \"BookDate\") {\r\n onChangeCurrencyDate(\r\n \"CorporateEventSettlementCurrency\",\r\n Corpevent.CorporateEventSettlementCurrency,\r\n value\r\n );\r\n onChangeCurrencyDate(\r\n \"CorporateEventCommissionCurrency\",\r\n Corpevent.CorporateEventCommissionCurrency,\r\n value\r\n );\r\n onChangeCurrencyDate(\"CorporateEventTaxCurrency\", Corpevent.CorporateEventTaxCurrency, value);\r\n\r\n setEvent((event) => ({\r\n ...event,\r\n [name]: value,\r\n }));\r\n } else {\r\n setEvent((event) => ({\r\n ...event,\r\n [name]: value,\r\n }));\r\n }\r\n };\r\n\r\n const deleteEvent = () => {\r\n setDeleting(true);\r\n services\r\n .fetchDeleteCorporateEvent({\r\n corporateeventid: props.event.CorporateEventId,\r\n })\r\n .then((r) => {\r\n searchEvents();\r\n toggle();\r\n });\r\n };\r\n\r\n const onChangeGrid = (cd, cp, prop, accountnum, index, value) => {\r\n let name = \"\";\r\n let total = 0;\r\n if (cd === \"Account\") {\r\n if (value.AccountId !== null) {\r\n if (cp === \"Client\") {\r\n if (prop) {\r\n accountProp[accountnum].BasicAccountId = value.AccountId;\r\n accountProp[accountnum].BasicAccountName = value.AccountName;\r\n accountProp[accountnum].BasicAccountNumber = value.AccountNumber;\r\n } else {\r\n account[accountnum].BasicAccountId = value.AccountId;\r\n account[accountnum].BasicAccountName = value.AccountName;\r\n account[accountnum].BasicAccountNumber = value.AccountNumber;\r\n }\r\n } else if (cp === \"CustodyCash\") {\r\n if (prop) {\r\n custodyProp[accountnum].EventCashCustAccountId = value.AccountId;\r\n custodyProp[accountnum].EventCashCustAccountName = value.AccountName;\r\n } else {\r\n custody[accountnum].EventCashCustAccountId = value.AccountId;\r\n custody[accountnum].EventCashCustAccountName = value.AccountName;\r\n }\r\n } else {\r\n if (prop) {\r\n custodyProp[accountnum].BasicAccountId = value.AccountId;\r\n custodyProp[accountnum].BasicAccountName = value.AccountName;\r\n //custodyProp[accountnum].BasicAccountType = value.BasicAccountType\r\n } else {\r\n custody[accountnum].BasicAccountId = value.AccountId;\r\n custody[accountnum].BasicAccountName = value.AccountName;\r\n //custody[accountnum].BasicAccountType = value.BasicAccountType\r\n }\r\n }\r\n }\r\n } else {\r\n if (cd === \"EventAccountAmount\") {\r\n if (cp === \"Client\") {\r\n if (prop) {\r\n total =\r\n Number(Corpevent.PortfolioTotalPropClient) -\r\n Number(accountProp[accountnum].EventAccountAmount) +\r\n Number(value);\r\n accountProp[accountnum].EventAccountAmount = value;\r\n name = \"PortfolioTotalPropClient\";\r\n } else {\r\n total =\r\n Number(Corpevent.PortfolioTotalNoPropClient) -\r\n Number(account[accountnum].EventAccountAmount) +\r\n Number(value);\r\n account[accountnum].EventAccountAmount = value;\r\n name = \"PortfolioTotalNoPropClient\";\r\n }\r\n } else {\r\n if (prop) {\r\n total =\r\n Number(Corpevent.PortfolioTotalProp) -\r\n Number(custodyProp[accountnum].EventAccountAmount) +\r\n Number(value);\r\n custodyProp[accountnum].EventAccountAmount = value;\r\n name = \"PortfolioTotalProp\";\r\n } else {\r\n total =\r\n Number(Corpevent.PortfolioTotalNoProp) -\r\n Number(custody[accountnum].EventAccountAmount) +\r\n Number(value);\r\n custody[accountnum].EventAccountAmount = value;\r\n name = \"PortfolioTotalNoProp\";\r\n }\r\n }\r\n setEvent((Corpevent) => ({\r\n ...Corpevent,\r\n [name]: total,\r\n }));\r\n } else {\r\n if (Number(value) >= 0) {\r\n if (prop) {\r\n if (cp === \"Client\") {\r\n if (cd === \"Debit\") {\r\n if (accountProp[accountnum].FootPrintDebit[index].EventAccountIsWithholding) {\r\n name = \"WithholdingPropClient\";\r\n total =\r\n Number(Corpevent.WithholdingPropClient) -\r\n Number(accountProp[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n if (accountProp[accountnum].FootPrintDebit[index].EventAccountIsCommission) {\r\n name = \"CommissionPropClient\";\r\n total =\r\n Number(Corpevent.CommissionPropClient) -\r\n Number(accountProp[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (accountProp[accountnum].FootPrintDebit[index].EventAccountIsTax) {\r\n name = \"TaxPropClient\";\r\n total =\r\n Number(Corpevent.TaxPropClient) -\r\n Number(accountProp[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (accountProp[accountnum].FootPrintDebit[index].EventAccountIsFee) {\r\n name = \"FeePropClient\";\r\n total =\r\n Number(Corpevent.FeePropClient) -\r\n Number(accountProp[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (accountProp[accountnum].FootPrintDebit[index].EventAccountBaseForTax) {\r\n name = \"BasePropClient\";\r\n total =\r\n Number(Corpevent.BasePropClient) -\r\n Number(accountProp[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n accountProp[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume = value;\r\n accountProp[accountnum].FootPrintDebit[index].EventAccountModified = true;\r\n } else {\r\n if (accountProp[accountnum].FootPrintCredit[index].EventAccountIsWithholding) {\r\n name = \"WithholdingPropClient\";\r\n total =\r\n Number(Corpevent.WithholdingPropClient) -\r\n Number(accountProp[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n if (accountProp[accountnum].FootPrintCredit[index].EventAccountIsCommission) {\r\n name = \"CommissionPropClient\";\r\n total =\r\n Number(Corpevent.CommissionPropClient) -\r\n Number(accountProp[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (accountProp[accountnum].FootPrintCredit[index].EventAccountIsTax) {\r\n name = \"TaxPropClient\";\r\n total =\r\n Number(Corpevent.TaxPropClient) -\r\n Number(accountProp[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (accountProp[accountnum].FootPrintCredit[index].EventAccountIsFee) {\r\n name = \"FeePropClient\";\r\n total =\r\n Number(Corpevent.FeePropClient) -\r\n Number(accountProp[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (accountProp[accountnum].FootPrintCredit[index].EventAccountBaseForTax) {\r\n name = \"BasePropClient\";\r\n total =\r\n Number(Corpevent.BasePropClient) -\r\n Number(accountProp[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n accountProp[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume = value;\r\n accountProp[accountnum].FootPrintCredit[index].EventAccountModified = true;\r\n }\r\n } else {\r\n if (cd == \"Debit\") {\r\n if (custodyProp[accountnum].FootPrintDebit[index].EventAccountIsWithholding) {\r\n name = \"WithholdingProp\";\r\n total =\r\n Number(Corpevent.WithholdingProp) -\r\n Number(custodyProp[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (custodyProp[accountnum].FootPrintDebit[index].EventAccountIsCommission) {\r\n name = \"CommissionProp\";\r\n total =\r\n Number(Corpevent.CommissionProp) -\r\n Number(custodyProp[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (\r\n custodyProp[accountnum].FootPrintDebit[index].EventAccountTicker === \"UYU TAX (Executed)\"\r\n ) {\r\n name = \"TaxProp\";\r\n total =\r\n Number(Corpevent.TaxProp) -\r\n Number(custodyProp[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (custodyProp[accountnum].FootPrintDebit[index].EventAccountIsFee) {\r\n name = \"FeeProp\";\r\n total =\r\n Number(Corpevent.FeeProp) -\r\n Number(custodyProp[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (custodyProp[accountnum].FootPrintDebit[index].EventAccountBaseForTax) {\r\n name = \"BaseProp\";\r\n total =\r\n Number(Corpevent.BaseProp) -\r\n Number(custodyProp[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n custodyProp[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume = value;\r\n custodyProp[accountnum].FootPrintDebit[index].EventAccountModified = true;\r\n } else {\r\n if (custodyProp[accountnum].FootPrintCredit[index].EventAccountIsWithholding) {\r\n name = \"WithholdingProp\";\r\n total =\r\n Number(Corpevent.WithholdingProp) -\r\n Number(custodyProp[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (custodyProp[accountnum].FootPrintCredit[index].EventAccountIsCommission) {\r\n name = \"CommissionProp\";\r\n total =\r\n Number(Corpevent.CommissionProp) -\r\n Number(custodyProp[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (\r\n custodyProp[accountnum].FootPrintCredit[index].EventAccountTicker === \"UYU TAX (Executed)\"\r\n ) {\r\n name = \"TaxProp\";\r\n total =\r\n Number(Corpevent.TaxProp) -\r\n Number(custodyProp[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (custodyProp[accountnum].FootPrintCredit[index].EventAccountIsFee) {\r\n name = \"FeeProp\";\r\n total =\r\n Number(Corpevent.FeeProp) -\r\n Number(custodyProp[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (custodyProp[accountnum].FootPrintCredit[index].EventAccountBaseForTax) {\r\n name = \"BaseProp\";\r\n total =\r\n Number(Corpevent.BaseProp) -\r\n Number(custodyProp[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n custodyProp[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume = value;\r\n custodyProp[accountnum].FootPrintCredit[index].EventAccountModified = true;\r\n }\r\n }\r\n } else {\r\n if (cp == \"Client\") {\r\n if (cd == \"Debit\") {\r\n if (account[accountnum].FootPrintDebit[index].EventAccountIsWithholding) {\r\n name = \"WithholdingNoPropClient\";\r\n total =\r\n Number(Corpevent.WithholdingNoPropClient) -\r\n Number(account[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (account[accountnum].FootPrintDebit[index].EventAccountIsCommission) {\r\n name = \"CommissionNoPropClient\";\r\n total =\r\n Number(Corpevent.CommissionNoPropClient) -\r\n Number(account[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (account[accountnum].FootPrintDebit[index].EventAccountIsTax) {\r\n name = \"TaxNoPropClient\";\r\n total =\r\n Number(Corpevent.TaxNoPropClient) -\r\n Number(account[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (account[accountnum].FootPrintDebit[index].EventAccountIsFee) {\r\n name = \"FeeNoPropClient\";\r\n total =\r\n Number(Corpevent.FeeNoPropClient) -\r\n Number(account[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (account[accountnum].FootPrintDebit[index].EventAccountBaseForTax) {\r\n name = \"BaseNoPropClient\";\r\n total =\r\n Number(Corpevent.BaseNoPropClient) -\r\n Number(account[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n account[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume = value;\r\n } else {\r\n if (account[accountnum].FootPrintCredit[index].EventAccountIsWithholding) {\r\n name = \"WithholdingNoPropClient\";\r\n total =\r\n Number(Corpevent.WithholdingNoPropClient) -\r\n Number(account[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (account[accountnum].FootPrintCredit[index].EventAccountIsCommission) {\r\n name = \"CommissionNoPropClient\";\r\n total =\r\n Number(Corpevent.CommissionNoPropClient) -\r\n Number(account[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (account[accountnum].FootPrintCredit[index].EventAccountIsTax) {\r\n name = \"TaxNoPropClient\";\r\n total =\r\n Number(Corpevent.TaxNoPropClient) -\r\n Number(account[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (account[accountnum].FootPrintCredit[index].EventAccountIsFee) {\r\n name = \"FeeNoPropClient\";\r\n total =\r\n Number(Corpevent.FeeNoPropClient) -\r\n Number(account[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (account[accountnum].FootPrintCredit[index].EventAccountBaseForTax) {\r\n name = \"BaseNoPropClient\";\r\n total =\r\n Number(Corpevent.BaseNoPropClient) -\r\n Number(account[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n account[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume = value;\r\n\r\n account[accountnum].FootPrintCredit[index].EventAccountModified = true;\r\n }\r\n } else {\r\n if (cd == \"Debit\") {\r\n if (custody[accountnum].FootPrintDebit[index].EventAccountIsWithholding) {\r\n name = \"WithholdingNoProp\";\r\n total =\r\n Number(Corpevent.WithholdingNoProp) -\r\n Number(custody[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (custody[accountnum].FootPrintDebit[index].EventAccountIsCommission) {\r\n name = \"CommissionNoProp\";\r\n total =\r\n Number(Corpevent.CommissionNoProp) -\r\n Number(custody[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (custody[accountnum].FootPrintDebit[index].EventAccountIsTax) {\r\n name = \"TaxClientNoProp\";\r\n total =\r\n Number(Corpevent.TaxClientNoProp) -\r\n Number(custody[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (custody[accountnum].FootPrintDebit[index].EventAccountIsFee) {\r\n name = \"FeeClientNoProp\";\r\n total =\r\n Number(Corpevent.FeeClientNoProp) -\r\n Number(custody[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (custody[accountnum].FootPrintDebit[index].EventAccountBaseForTax) {\r\n name = \"BaseNoProp\";\r\n total =\r\n Number(Corpevent.BaseNoProp) -\r\n Number(custody[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n custody[accountnum].FootPrintDebit[index].EventAccountDebitCreditVolume = value;\r\n } else {\r\n if (custody[accountnum].FootPrintCredit[index].EventAccountIsWithholding) {\r\n name = \"WithholdingNoProp\";\r\n total =\r\n Number(Corpevent.WithholdingNoProp) -\r\n Number(custody[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (custody[accountnum].FootPrintCredit[index].EventAccountIsCommission) {\r\n name = \"CommissionNoProp\";\r\n total =\r\n Number(Corpevent.CommissionNoProp) -\r\n Number(custody[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (custody[accountnum].FootPrintCredit[index].EventAccountTicker === \"UYU TAX (Executed)\") {\r\n name = \"TaxNoProp\";\r\n total =\r\n Number(Corpevent.TaxNoProp) -\r\n Number(custody[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (custody[accountnum].FootPrintCredit[index].EventAccountIsFee) {\r\n name = \"FeeNoProp\";\r\n total =\r\n Number(Corpevent.FeeNoProp) -\r\n Number(custody[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n if (custody[accountnum].FootPrintCredit[index].EventAccountBaseForTax) {\r\n name = \"BaseNoProp\";\r\n total =\r\n Number(Corpevent.BaseNoProp) -\r\n Number(custody[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume) +\r\n Number(value);\r\n }\r\n\r\n custody[accountnum].FootPrintCredit[index].EventAccountDebitCreditVolume = value;\r\n custody[accountnum].FootPrintCredit[index].EventAccountModified = true;\r\n }\r\n }\r\n }\r\n setEvent((Corpevent) => ({\r\n ...Corpevent,\r\n [name]: total,\r\n }));\r\n } else {\r\n seterrorbook((errorbook) => ({\r\n ...errorbook,\r\n open: true,\r\n desc: \"Amount should be positive\",\r\n }));\r\n }\r\n }\r\n }\r\n };\r\n\r\n const onChangeCurrency = (name, value) => {\r\n var id = Number(value);\r\n let baseCurrency = Corpevent.CurrencyId;\r\n var p = currencies;\r\n let iso1 = \"\";\r\n\r\n if (name == \"CorporateEventTaxCurrency\") {\r\n for (var i = 0; i < p.length; i++) {\r\n if (p[i].id == Corpevent.CorporateEventSettlementCurrency) {\r\n iso1 = p[i].description;\r\n baseCurrency = Corpevent.CorporateEventSettlementCurrency;\r\n }\r\n }\r\n }\r\n\r\n let date = new Date(Date.parse(Corpevent.BookDate) - 1 * 24 * 1 * 1 * 1000).toDateLocal();\r\n\r\n services.fetchCurrencyFX({ baseCurrency: baseCurrency, targetCurrency: id, date: date }).then((r) => {\r\n var p = currencies;\r\n let fx = \"\";\r\n let fxclient = \"\";\r\n let price = Number(r.FX.price).toFixed(4);\r\n let divides = r.FX.divides;\r\n var id = Number(value);\r\n let label = \"Multiply\";\r\n let iso = \"\";\r\n for (var i = 0; i < p.length; i++) {\r\n if (p[i].id == value) {\r\n iso = p[i].description;\r\n }\r\n }\r\n\r\n if (divides) label = \"divides\";\r\n if (name === \"CorporateEventSettlementCurrency\") {\r\n fx = \"CorporateEventFX\";\r\n setCurrencyPairs({\r\n labelsett: Corpevent.CurrencyISO + \"/\" + iso + \" \" + label,\r\n labelcomm: currencypairs.labelcomm,\r\n labeltax: currencypairs.labeltax,\r\n });\r\n setEvent((corpevent) => ({\r\n ...corpevent,\r\n [name]: id,\r\n [fx]: price,\r\n CorporateEventSettlementCurrencyISO: iso,\r\n }));\r\n }\r\n\r\n if (name === \"CorporateEventCommissionCurrency\") {\r\n fx = \"CorporateEventCommissionFX\";\r\n setCurrencyPairs({\r\n labelcomm: Corpevent.CurrencyISO + \"/\" + iso + \" \" + label,\r\n labelsett: currencypairs.labelsett,\r\n labeltax: currencypairs.labeltax,\r\n });\r\n setEvent((corpevent) => ({\r\n ...corpevent,\r\n [name]: id,\r\n [fx]: price,\r\n CorporateEventCommissionCurrencyISO: iso,\r\n }));\r\n }\r\n\r\n if (name === \"CorporateEventTaxCurrency\") {\r\n fx = \"CorporateEventTaxFX\";\r\n fxclient = \"CorporateEventClientTaxFX\";\r\n setCurrencyPairs({\r\n labeltax: iso1 + \"/\" + iso + \" \" + label,\r\n labelcomm: currencypairs.labelcomm,\r\n labelsett: currencypairs.labelsett,\r\n });\r\n setEvent((corpevent) => ({\r\n ...corpevent,\r\n [name]: id,\r\n [fx]: price,\r\n [fxclient]: price,\r\n CorporateEventTaxCurrencyISO: iso,\r\n }));\r\n }\r\n });\r\n };\r\n\r\n const onChangeCurrencyDate = (name, value, date) => {\r\n var id = Number(value);\r\n let baseCurrency = Corpevent.CurrencyId;\r\n var p = currencies;\r\n let iso1 = \"\";\r\n\r\n if (name == \"CorporateEventTaxCurrency\") {\r\n for (var i = 0; i < p.length; i++) {\r\n if (p[i].id == Corpevent.CorporateEventSettlementCurrency) {\r\n iso1 = p[i].description;\r\n baseCurrency = Corpevent.CorporateEventSettlementCurrency;\r\n }\r\n }\r\n }\r\n\r\n services.fetchCurrencyFX({ baseCurrency: baseCurrency, targetCurrency: id, date: date }).then((r) => {\r\n var p = currencies;\r\n let fx = \"\";\r\n let fxclient = \"\";\r\n let price = Number(r.FX.price).toFixed(4);\r\n let divides = r.FX.divides;\r\n var id = Number(value);\r\n let label = \"Multiply\";\r\n let iso = \"\";\r\n for (var i = 0; i < p.length; i++) {\r\n if (p[i].id == value) {\r\n iso = p[i].description;\r\n }\r\n }\r\n\r\n if (divides) label = \"divides\";\r\n if (name === \"CorporateEventSettlementCurrency\") {\r\n fx = \"CorporateEventFX\";\r\n setCurrencyPairs({\r\n labelsett: Corpevent.CurrencyISO + \"/\" + iso + \" \" + label,\r\n labelcomm: currencypairs.labelcomm,\r\n labeltax: currencypairs.labeltax,\r\n });\r\n setEvent((corpevent) => ({\r\n ...corpevent,\r\n [name]: id,\r\n [fx]: price,\r\n }));\r\n }\r\n\r\n if (name === \"CorporateEventCommissionCurrency\") {\r\n fx = \"CorporateEventCommissionFX\";\r\n setCurrencyPairs({\r\n labelcomm: Corpevent.CurrencyISO + \"/\" + iso + \" \" + label,\r\n labelsett: currencypairs.labelsett,\r\n labeltax: currencypairs.labeltax,\r\n });\r\n setEvent((corpevent) => ({\r\n ...corpevent,\r\n [name]: id,\r\n [fx]: price,\r\n }));\r\n }\r\n\r\n if (name === \"CorporateEventTaxCurrency\") {\r\n fx = \"CorporateEventTaxFX\";\r\n fxclient = \"CorporateEventClientTaxFX\";\r\n setCurrencyPairs({\r\n labeltax: iso1 + \"/\" + iso + \" \" + label,\r\n labelcomm: currencypairs.labelcomm,\r\n labelsett: currencypairs.labelsett,\r\n });\r\n setEvent((corpevent) => ({\r\n ...corpevent,\r\n [name]: id,\r\n [fx]: price,\r\n [fxclient]: price,\r\n }));\r\n }\r\n });\r\n };\r\n\r\n const recalculate = (i) => {\r\n // if ((Number(Corpevent.PortfolioTotalProp) !== Number(Corpevent.PortfolioTotalPropClient)) || (Number(Corpevent.PortfolioTotalNoProp) !== Number(Corpevent.PortfolioTotalNoPropClient))){\r\n\r\n // setLabel(\"Error\");\r\n // seterrorbook(errorbook => ({\r\n // ...errorbook,\r\n // open: true,\r\n // desc: \"Portfolios are different\"\r\n // }));\r\n // }\r\n // else{\r\n setLoading(true);\r\n setWizzard(i);\r\n let Account = [];\r\n\r\n Account = [...custody];\r\n\r\n Account = Account.concat(account);\r\n\r\n Account = Account.concat(custodyProp);\r\n\r\n Account = Account.concat(accountProp);\r\n\r\n let corpevent = {\r\n Account,\r\n };\r\n\r\n corpevent.id = Corpevent.id;\r\n corpevent.AssetId = Corpevent.AssetId;\r\n corpevent.Date = Corpevent.Date;\r\n corpevent.name = Corpevent.name;\r\n corpevent.CorporateEventType = Corpevent.CorporateEventType;\r\n corpevent.CorporateEventSettlementCurrency = Corpevent.CorporateEventSettlementCurrency;\r\n corpevent.CorporateEventFX = Corpevent.CorporateEventFX;\r\n corpevent.CorporateEventCommissionCurrency = Corpevent.CorporateEventCommissionCurrency;\r\n corpevent.CorporateEventCommissionFX = Corpevent.CorporateEventCommissionFX;\r\n corpevent.CorporateEventTaxFX = Corpevent.CorporateEventTaxFX;\r\n corpevent.CorporateEventTaxCurrency = Corpevent.CorporateEventTaxCurrency;\r\n corpevent.CorporateEventClientTaxFX = Corpevent.CorporateEventClientTaxFX;\r\n corpevent.CorporateEventTaxPercentage = Corpevent.CorporateEventTaxPercentage;\r\n corpevent.BookDate = Corpevent.BookDate;\r\n corpevent.RecordDate = Corpevent.RecordDate;\r\n corpevent.CorporateEventWithholdingP = Corpevent.CorporateEventWithholdingP;\r\n\r\n for (var j = 0; j < corpevent.Account.length; j++) {\r\n let FootPrint = [];\r\n if (Account[j].FootPrintCredit != undefined) {\r\n FootPrint = [...Account[j].FootPrintCredit];\r\n if (Account[j].FootPrintDebit != undefined) FootPrint = FootPrint.concat(Account[j].FootPrintDebit);\r\n } else if (Account[j].FootPrintDebit != undefined) FootPrint = [...Account[j].FootPrintDebit];\r\n corpevent.Account[j].Footprint = FootPrint;\r\n }\r\n\r\n services.fetchRecalculateEvent({ corpevent }).then((re) => {\r\n services\r\n .fetchGetCorporateEventSingle({\r\n corporateeventid: props.event.CorporateEventId,\r\n })\r\n .then((r) => {\r\n //This line is to persist the BookDate\r\n setEvent((oldState) => ({ ...r, BookDate: oldState.BookDate }));\r\n\r\n let custodyProp1 = r.Account.filter((account) => account.IsProp);\r\n let custody1 = r.Account.filter((account) => !account.IsProp);\r\n let account1 = r.Account.filter((account) => !account.IsProp);\r\n let accountProp1 = r.Account.filter((account) => account.IsProp);\r\n\r\n let custodyProp = custodyProp1.filter((item) => item.BasicAccountType == \"Bank\");\r\n let custody = custody1.filter((item) => item.BasicAccountType == \"Bank\");\r\n let account = account1.filter((item) => item.BasicAccountType == \"Customer\");\r\n let accountProp = accountProp1.filter(\r\n (item) => item.BasicAccountType == \"InBalance\" || item.BasicAccountType == \"Fund\"\r\n );\r\n setCustody(custody);\r\n setCustodyProp(custodyProp);\r\n setAccount(account);\r\n setAccountProp(accountProp);\r\n setEvent((oldState) => ({ ...r, BookDate: oldState.BookDate }));\r\n setLoading(false);\r\n });\r\n });\r\n //}\r\n };\r\n\r\n const recalculateBeforeSend = () => {\r\n let errors = \"\";\r\n if (Corpevent.CorporateEventReleased) {\r\n if (Number(Corpevent.WithholdingNoProp) - Number(Corpevent.WithholdingNoPropClient) > 1) {\r\n errors += \"WithholdingNoProp should be equal to WithholdingNoPropClient \";\r\n }\r\n if (Number(Corpevent.WithholdingProp) - Number(Corpevent.WithholdingPropClient) > 1) {\r\n errors += \"WithholdingProp should be equal to WithholdingPropClient \";\r\n }\r\n if (Number(Corpevent.BaseNoProp) - Number(Corpevent.BaseNoPropClient) > 1) {\r\n errors += \"BaseNoProp should be equal to BaseNoPropClient \";\r\n }\r\n if (Number(Corpevent.BaseProp) - Number(Corpevent.BasePropClient) > 1) {\r\n errors += \"BaseProp should be equal to BasePropClient \";\r\n }\r\n if (errors !== \"\") {\r\n setSending(false);\r\n setLabel(\"Error\");\r\n seterrorbook((errorbook) => ({\r\n ...errorbook,\r\n open: true,\r\n desc: errors,\r\n }));\r\n if (newE) {\r\n toggleEvent();\r\n }\r\n } else {\r\n let Account = [];\r\n\r\n Account = [...custody];\r\n\r\n Account = Account.concat(account);\r\n\r\n Account = Account.concat(custodyProp);\r\n\r\n Account = Account.concat(accountProp);\r\n\r\n let corpevent = {\r\n Account,\r\n };\r\n\r\n corpevent.id = Corpevent.id;\r\n corpevent.AssetId = Corpevent.AssetId;\r\n corpevent.Date = Corpevent.Date;\r\n corpevent.name = Corpevent.name;\r\n corpevent.CorporateEventType = Corpevent.CorporateEventType;\r\n corpevent.CorporateEventSettlementCurrency = Corpevent.CorporateEventSettlementCurrency;\r\n corpevent.CorporateEventFX = Corpevent.CorporateEventFX;\r\n corpevent.CorporateEventCommissionCurrency = Corpevent.CorporateEventCommissionCurrency;\r\n corpevent.CorporateEventCommissionFX = Corpevent.CorporateEventCommissionFX;\r\n corpevent.CorporateEventTaxFX = Corpevent.CorporateEventTaxFX;\r\n corpevent.CorporateEventTaxCurrency = Corpevent.CorporateEventTaxCurrency;\r\n corpevent.CorporateEventClientTaxFX = Corpevent.CorporateEventClientTaxFX;\r\n corpevent.CorporateEventTaxPercentage = Corpevent.CorporateEventTaxPercentage;\r\n corpevent.BookDate = Corpevent.BookDate;\r\n corpevent.RecordDate = Corpevent.RecordDate;\r\n corpevent.CorporateEventWithholdingP = Corpevent.CorporateEventWithholdingP;\r\n corpevent.CorporateEventReleased = Corpevent.CorporateEventReleased;\r\n\r\n for (var j = 0; j < corpevent.Account.length; j++) {\r\n let FootPrint = [];\r\n if (Account[j].FootPrintCredit != undefined) {\r\n FootPrint = [...Account[j].FootPrintCredit];\r\n if (Account[j].FootPrintDebit != undefined)\r\n FootPrint = FootPrint.concat(Account[j].FootPrintDebit);\r\n } else if (Account[j].FootPrintDebit != undefined) FootPrint = [...Account[j].FootPrintDebit];\r\n corpevent.Account[j].Footprint = FootPrint;\r\n }\r\n\r\n services.fetchRecalculateEvent({ corpevent }).then((re) => {\r\n services\r\n .fetchGetCorporateEventSingle({\r\n corporateeventid: props.event.CorporateEventId,\r\n })\r\n .then((r) => {\r\n setEvent((oldState) => ({ ...r, BookDate: oldState.BookDate }));\r\n let custodyProp1 = r.Account.filter((account) => account.IsProp);\r\n let custody1 = r.Account.filter((account) => !account.IsProp);\r\n let account1 = r.Account.filter((account) => !account.IsProp);\r\n let accountProp1 = r.Account.filter((account) => account.IsProp);\r\n\r\n let custodyProp = custodyProp1.filter((item) => item.BasicAccountType == \"Bank\");\r\n let custody = custody1.filter((item) => item.BasicAccountType == \"Bank\");\r\n let account = account1.filter((item) => item.BasicAccountType == \"Customer\");\r\n let accountProp = accountProp1.filter(\r\n (item) => item.BasicAccountType == \"InBalance\" || item.BasicAccountType == \"Fund\"\r\n );\r\n setCustody(custody);\r\n setCustodyProp(custodyProp);\r\n setAccount(account);\r\n setAccountProp(accountProp);\r\n setEvent((oldState) => ({ ...r, BookDate: oldState.BookDate }));\r\n\r\n seterrorbook((errorbook) => ({\r\n ...errorbook,\r\n open: false,\r\n desc: \"\",\r\n }));\r\n\r\n let errors = \"\";\r\n\r\n if (Number(Corpevent.WithholdingNoProp) - Number(Corpevent.WithholdingNoPropClient) > 5) {\r\n errors += \"WithholdingNoProp should be equal to WithholdingNoPropClient \";\r\n }\r\n if (Number(Corpevent.WithholdingProp) - Number(Corpevent.WithholdingPropClient) > 5) {\r\n errors += \"WithholdingProp should be equal to WithholdingPropClient \";\r\n }\r\n if (Number(Corpevent.BaseNoProp) - Number(Corpevent.BaseNoPropClient) > 5) {\r\n errors += \"BaseNoProp should be equal to BaseNoPropClient \";\r\n }\r\n if (Number(Corpevent.BaseProp) - Number(Corpevent.BasePropClient) > 5) {\r\n errors += \"BaseProp should be equal to BasePropClient \";\r\n }\r\n if (errors !== \"\") {\r\n setSending(false);\r\n seterrorbook((errorbook) => ({\r\n ...errorbook,\r\n open: true,\r\n desc: errors,\r\n }));\r\n if (newE) {\r\n toggleEvent();\r\n }\r\n } else {\r\n services.fetchExecuteEvent({ corporateeventid: Corpevent.id }).then((re) => {\r\n setSending(false);\r\n if (re.result.Code == 400) {\r\n seterrorbook((errorbook) => ({\r\n ...errorbook,\r\n open: true,\r\n desc: re.result.Description,\r\n }));\r\n } else {\r\n setSending(false);\r\n searchEvents();\r\n toggle();\r\n if (newE) {\r\n toggleEvent();\r\n }\r\n }\r\n });\r\n }\r\n });\r\n });\r\n }\r\n } else {\r\n let Account = [];\r\n\r\n Account = [...custody];\r\n\r\n Account = Account.concat(account);\r\n\r\n Account = Account.concat(custodyProp);\r\n\r\n Account = Account.concat(accountProp);\r\n\r\n let corpevent = {\r\n Account,\r\n };\r\n\r\n corpevent.id = Corpevent.id;\r\n corpevent.AssetId = Corpevent.AssetId;\r\n corpevent.Date = Corpevent.Date;\r\n corpevent.name = Corpevent.name;\r\n corpevent.CorporateEventType = Corpevent.CorporateEventType;\r\n corpevent.CorporateEventSettlementCurrency = Corpevent.CorporateEventSettlementCurrency;\r\n corpevent.CorporateEventFX = Corpevent.CorporateEventFX;\r\n corpevent.CorporateEventCommissionCurrency = Corpevent.CorporateEventCommissionCurrency;\r\n corpevent.CorporateEventCommissionFX = Corpevent.CorporateEventCommissionFX;\r\n corpevent.CorporateEventTaxFX = Corpevent.CorporateEventTaxFX;\r\n corpevent.CorporateEventTaxCurrency = Corpevent.CorporateEventTaxCurrency;\r\n corpevent.CorporateEventClientTaxFX = Corpevent.CorporateEventClientTaxFX;\r\n corpevent.CorporateEventTaxPercentage = Corpevent.CorporateEventTaxPercentage;\r\n corpevent.BookDate = Corpevent.BookDate;\r\n corpevent.RecordDate = Corpevent.RecordDate;\r\n corpevent.CorporateEventWithholdingP = Corpevent.CorporateEventWithholdingP;\r\n corpevent.CorporateEventReleased = Corpevent.CorporateEventReleased;\r\n\r\n for (var j = 0; j < corpevent.Account.length; j++) {\r\n let FootPrint = [];\r\n if (Account[j].FootPrintCredit != undefined) {\r\n FootPrint = [...Account[j].FootPrintCredit];\r\n if (Account[j].FootPrintDebit != undefined) FootPrint = FootPrint.concat(Account[j].FootPrintDebit);\r\n } else if (Account[j].FootPrintDebit != undefined) FootPrint = [...Account[j].FootPrintDebit];\r\n corpevent.Account[j].Footprint = FootPrint;\r\n }\r\n\r\n services.fetchRecalculateEvent({ corpevent }).then((re) => {\r\n services\r\n .fetchGetCorporateEventSingle({\r\n corporateeventid: props.event.CorporateEventId,\r\n })\r\n .then((r) => {\r\n setEvent((oldState) => ({ ...r, BookDate: oldState.BookDate }));\r\n let custodyProp1 = r.Account.filter((account) => account.IsProp);\r\n let custody1 = r.Account.filter((account) => !account.IsProp);\r\n let account1 = r.Account.filter((account) => !account.IsProp);\r\n let accountProp1 = r.Account.filter((account) => account.IsProp);\r\n\r\n let custodyProp = custodyProp1.filter((item) => item.BasicAccountType == \"Bank\");\r\n let custody = custody1.filter((item) => item.BasicAccountType == \"Bank\");\r\n let account = account1.filter((item) => item.BasicAccountType == \"Customer\");\r\n let accountProp = accountProp1.filter(\r\n (item) => item.BasicAccountType == \"InBalance\" || item.BasicAccountType == \"Fund\"\r\n );\r\n setCustody(custody);\r\n setCustodyProp(custodyProp);\r\n setAccount(account);\r\n setAccountProp(accountProp);\r\n setEvent((oldState) => ({ ...r, BookDate: oldState.BookDate }));\r\n\r\n seterrorbook((errorbook) => ({\r\n ...errorbook,\r\n open: false,\r\n desc: \"\",\r\n }));\r\n\r\n let errors = \"\";\r\n\r\n if (Number(Corpevent.WithholdingNoProp) - Number(Corpevent.WithholdingNoPropClient) > 5) {\r\n errors += \"WithholdingNoProp should be equal to WithholdingNoPropClient \";\r\n }\r\n if (Number(Corpevent.WithholdingProp) - Number(Corpevent.WithholdingPropClient) > 5) {\r\n errors += \"WithholdingProp should be equal to WithholdingPropClient \";\r\n }\r\n if (Number(Corpevent.BaseNoProp) - Number(Corpevent.BaseNoPropClient) > 5) {\r\n errors += \"BaseNoProp should be equal to BaseNoPropClient \";\r\n }\r\n if (Number(Corpevent.BaseProp) - Number(Corpevent.BasePropClient) > 5) {\r\n errors += \"BaseProp should be equal to BasePropClient \";\r\n }\r\n if (errors !== \"\") {\r\n setSending(false);\r\n seterrorbook((errorbook) => ({\r\n ...errorbook,\r\n open: true,\r\n desc: errors,\r\n }));\r\n if (newE) {\r\n toggleEvent();\r\n }\r\n } else {\r\n services.fetchExecuteEvent({ corporateeventid: Corpevent.id }).then((re) => {\r\n setSending(false);\r\n if (re.result.Code == 400) {\r\n seterrorbook((errorbook) => ({\r\n ...errorbook,\r\n open: true,\r\n desc: re.result.Description,\r\n }));\r\n } else {\r\n setSending(false);\r\n searchEvents();\r\n toggle();\r\n if (newE) {\r\n toggleEvent();\r\n }\r\n }\r\n });\r\n }\r\n //setLoading(false);\r\n });\r\n });\r\n }\r\n };\r\n\r\n const sendEvent = () => {\r\n setSending(true);\r\n recalculateBeforeSend();\r\n };\r\n\r\n const saveEvent = () => {\r\n setSaving(true);\r\n let error = \"\";\r\n\r\n let Account = [];\r\n\r\n Account = [...custody];\r\n\r\n Account = Account.concat(account);\r\n\r\n Account = Account.concat(custodyProp);\r\n\r\n Account = Account.concat(accountProp);\r\n\r\n let corpevent = {\r\n Account,\r\n };\r\n\r\n if (Account == null || Account.length == 0) error = \"Add some accounts\";\r\n\r\n for (var j = 0; j < corpevent.Account.length; j++) {\r\n if (!Account[j].BasicAccountId) error = \"Select all accounts\";\r\n else {\r\n let FootPrint = [];\r\n if (Account[j].FootPrintCredit != undefined) {\r\n FootPrint = [...Account[j].FootPrintCredit];\r\n if (Account[j].FootPrintDebit != undefined) FootPrint = FootPrint.concat(Account[j].FootPrintDebit);\r\n } else if (Account[j].FootPrintDebit != undefined) FootPrint = [...Account[j].FootPrintDebit];\r\n corpevent.Account[j].Footprint = FootPrint;\r\n }\r\n }\r\n\r\n if (error == \"\") {\r\n corpevent.id = Corpevent.id;\r\n corpevent.AssetId = Corpevent.AssetId;\r\n corpevent.Date = Corpevent.Date;\r\n corpevent.name = Corpevent.name;\r\n corpevent.CorporateEventType = Corpevent.CorporateEventType;\r\n corpevent.CorporateEventSettlementCurrency = Corpevent.CorporateEventSettlementCurrency;\r\n corpevent.CorporateEventFX = Corpevent.CorporateEventFX;\r\n corpevent.CorporateEventCommissionCurrency = Corpevent.CorporateEventCommissionCurrency;\r\n corpevent.CorporateEventCommissionFX = Corpevent.CorporateEventCommissionFX;\r\n corpevent.CorporateEventTaxFX = Corpevent.CorporateEventTaxFX;\r\n corpevent.CorporateEventTaxCurrency = Corpevent.CorporateEventTaxCurrency;\r\n corpevent.CorporateEventClientTaxFX = Corpevent.CorporateEventClientTaxFX;\r\n corpevent.CorporateEventTaxPercentage = Corpevent.CorporateEventTaxPercentage;\r\n corpevent.BookDate = Corpevent.BookDate;\r\n corpevent.RecordDate = Corpevent.RecordDate;\r\n corpevent.CorporateEventWithholdingP = Corpevent.CorporateEventWithholdingP;\r\n corpevent.CorporateEventReleased = Corpevent.CorporateEventReleased;\r\n\r\n services.fetchRecalculateEvent({ corpevent }).then((re) => {\r\n if (re.result.Code === 200) {\r\n setLabel(\"\");\r\n seterrorbook((errorbook) => ({\r\n ...errorbook,\r\n open: true,\r\n desc: \"Corporate event saved\",\r\n }));\r\n } else {\r\n seterrorbook((errorbook) => ({\r\n ...errorbook,\r\n open: true,\r\n desc: re.desc,\r\n }));\r\n }\r\n\r\n setSaving(false);\r\n });\r\n } else {\r\n seterrorbook((errorbook) => ({\r\n ...errorbook,\r\n open: true,\r\n desc: error,\r\n }));\r\n setSaving(false);\r\n }\r\n };\r\n\r\n const removeCustody = (accounts, propia, type, index, accountid) => {\r\n let accountaux = [];\r\n let indexCorp = 0;\r\n let remove = {};\r\n\r\n indexCorp = Corpevent.Account.indexOf(accountid);\r\n Corpevent.Account.splice(indexCorp, 1);\r\n\r\n if (type === \"Customer\") {\r\n if (propia) {\r\n //Corpevent.Account = Corpevent.Account.concat(paracambiar)\r\n accountaux = [...accountProp];\r\n remove = accountaux.splice(index, 1);\r\n for (var j = 0; j < remove[0].FootPrintDebit.length; j++) {\r\n onChangeGrid(\"Debit\", \"Client\", propia, index, j, 0);\r\n }\r\n\r\n for (var j = 0; j < remove[0].FootPrintCredit.length; j++) {\r\n onChangeGrid(\"Credit\", \"Client\", propia, index, j, 0);\r\n }\r\n onChangeGrid(\"EventAccountAmount\", \"Client\", propia, index, 0, 0);\r\n setAccountProp(accountaux);\r\n } else {\r\n accountaux = [...account];\r\n remove = accountaux.splice(index, 1);\r\n\r\n for (var j = 0; j < remove[0].FootPrintDebit.length; j++) {\r\n onChangeGrid(\"Debit\", \"Client\", propia, index, j, 0);\r\n }\r\n\r\n for (var j = 0; j < remove[0].FootPrintCredit.length; j++) {\r\n onChangeGrid(\"Credit\", \"Client\", propia, index, j, 0);\r\n }\r\n onChangeGrid(\"EventAccountAmount\", \"Client\", propia, index, 0, 0);\r\n setAccount(accountaux);\r\n }\r\n } else {\r\n if (propia) {\r\n accountaux = [...custodyProp];\r\n remove = accountaux.splice(index, 1);\r\n\r\n for (var j = 0; j < remove[0].FootPrintDebit.length; j++) {\r\n onChangeGrid(\"Debit\", \"Custody\", propia, index, j, 0);\r\n }\r\n\r\n for (var j = 0; j < remove[0].FootPrintCredit.length; j++) {\r\n onChangeGrid(\"Credit\", \"Custody\", propia, index, j, 0);\r\n }\r\n onChangeGrid(\"EventAccountAmount\", \"Custody\", propia, index, 0, 0);\r\n setCustodyProp(accountaux);\r\n } else {\r\n accountaux = [...custody];\r\n remove = accountaux.splice(index, 1);\r\n\r\n for (var j = 0; j < remove[0].FootPrintDebit.length; j++) {\r\n onChangeGrid(\"Debit\", \"Custody\", propia, index, j, 0);\r\n }\r\n\r\n for (var j = 0; j < remove[0].FootPrintCredit.length; j++) {\r\n onChangeGrid(\"Credit\", \"Custody\", propia, index, j, 0);\r\n }\r\n onChangeGrid(\"EventAccountAmount\", \"Custody\", propia, index, 0, 0);\r\n setCustody(accountaux);\r\n }\r\n }\r\n };\r\n\r\n const addCustody = (accounts, propia, type) => {\r\n let accountaux = [];\r\n\r\n if (type === \"Customer\") {\r\n let item = JSON.parse(JSON.stringify(auxaccount));\r\n\r\n let paracambiar = { ...item };\r\n\r\n paracambiar.BasicAccountId = 0;\r\n paracambiar.BasicAccountName = \"\";\r\n paracambiar.BasicAccountNumber = \"\";\r\n paracambiar.IsProp = propia;\r\n paracambiar.added = true;\r\n\r\n if (propia) {\r\n item.BasicAccountType = \"InBalance\";\r\n\r\n Corpevent.Account = Corpevent.Account.concat(paracambiar);\r\n accountaux = [...accountProp];\r\n\r\n accountaux = accountaux.concat(paracambiar);\r\n setAccountProp(accountaux);\r\n } else {\r\n item.BasicAccountType = \"Customer\";\r\n\r\n Corpevent.Account = Corpevent.Account.concat(paracambiar);\r\n accountaux = [...account];\r\n accountaux = accountaux.concat(paracambiar);\r\n setAccount(accountaux);\r\n //account = account.concat([item])\r\n }\r\n }\r\n if (type === \"Custody\") {\r\n let item = JSON.parse(JSON.stringify(custodyaux));\r\n\r\n let paracambiar = { ...item };\r\n\r\n paracambiar.BasicAccountType = \"Custody\";\r\n paracambiar.BasicAccountId = 0;\r\n paracambiar.BasicAccountName = \"\";\r\n paracambiar.BasicAccountNumber = \"\";\r\n paracambiar.IsProp = propia;\r\n\r\n if (propia) {\r\n Corpevent.Account = Corpevent.Account.concat(paracambiar);\r\n accountaux = [...custodyProp];\r\n accountaux = accountaux.concat(paracambiar);\r\n setCustodyProp(accountaux);\r\n } else {\r\n Corpevent.Account = Corpevent.Account.concat(paracambiar);\r\n accountaux = [...custody];\r\n accountaux = accountaux.concat(paracambiar);\r\n setCustody(accountaux);\r\n }\r\n }\r\n };\r\n\r\n function downloadExcel() {\r\n let sheetCustody = [];\r\n\r\n sheetCustody = [...custody];\r\n\r\n sheetCustody = sheetCustody.concat(custodyProp);\r\n\r\n let sheetClient = [];\r\n\r\n sheetClient = sheetClient.concat(account);\r\n\r\n sheetClient = sheetClient.concat(accountProp);\r\n\r\n const data = {\r\n custodyTotal: [...sheetCustody],\r\n clientTotal: [...sheetClient],\r\n };\r\n\r\n const camelCase = (str) => {\r\n return str.substring(0, 1).toUpperCase() + str.substring(1);\r\n };\r\n\r\n const filterColumns = (data) => {\r\n // Get column names\r\n const columns = Object.keys(data.clientTotal[0]);\r\n\r\n // Remove by key (firstname)\r\n const filterColsByKey = columns.shift();\r\n\r\n //columns.filter(c => c !== 'BasicAccountId');\r\n\r\n // OR use the below line instead of the above if you want to filter by index\r\n // columns.shift()\r\n\r\n return filterColsByKey; // OR return columns\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n {filterColumns(data).map((col) => {\r\n return ;\r\n })}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {data.map((item) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n })}\r\n \r\n
    AccountNumber
    {item.BasicAccountId}
    \r\n
    \r\n );\r\n }\r\n\r\n const concatData = async () => {\r\n setdownloading(true);\r\n let client = [];\r\n\r\n client = [...account];\r\n\r\n client = client.concat(accountProp);\r\n\r\n let custodies = [];\r\n\r\n custodies = [...custodyProp];\r\n\r\n custodies = custodies.concat(custody);\r\n\r\n let clientdata = [];\r\n\r\n for (var j = 0; j < client.length; j++) {\r\n let item = {};\r\n item = {\r\n account: client[j].BasicAccountNumber,\r\n accountPortfolio: client[j].EventAccountAmount,\r\n };\r\n\r\n let Footprints = client[j].FootPrintCredit;\r\n for (var i = 0; i < Footprints.length; i++) {\r\n let name = Footprints[i].Tooltip;\r\n let rounded = Number(4);\r\n if (Footprints[i].EventAccountIsCurrency === true) rounded = Number(2);\r\n item = {\r\n ...item,\r\n [name]: Number(Number(Footprints[i].EventAccountDebitCreditVolume).toFixed(rounded)),\r\n };\r\n }\r\n let Footprints2 = client[j].FootPrintDebit;\r\n for (var i = 0; i < Footprints2.length; i++) {\r\n let name = Footprints2[i].Tooltip;\r\n let rounded = Number(4);\r\n if (Footprints2[i].EventAccountIsCurrency === true) rounded = Number(2);\r\n item = {\r\n ...item,\r\n [name]: Number(Number(Footprints2[i].EventAccountDebitCreditVolume).toFixed(rounded)),\r\n };\r\n }\r\n clientdata.push(item);\r\n }\r\n\r\n let custodydata = [];\r\n\r\n for (var j = 0; j < custodies.length; j++) {\r\n let item = {};\r\n item = {\r\n account: custodies[j].BasicAccountName,\r\n accountPortfolio: custodies[j].EventAccountAmount,\r\n };\r\n let Footprints = custodies[j].FootPrintCredit;\r\n for (var i = 0; i < Footprints.length; i++) {\r\n let name = Footprints[i].Tooltip;\r\n let rounded = Number(4);\r\n if (Footprints[i].EventAccountIsCurrency === true) rounded = Number(2);\r\n item = {\r\n ...item,\r\n [name]: Number(Number(Footprints[i].EventAccountDebitCreditVolume).toFixed(rounded)),\r\n };\r\n }\r\n let Footprints2 = custodies[j].FootPrintDebit;\r\n for (var i = 0; i < Footprints2.length; i++) {\r\n let name = Footprints2[i].Tooltip;\r\n let rounded = Number(4);\r\n if (Footprints2[i].EventAccountIsCurrency === true) rounded = Number(2);\r\n item = {\r\n ...item,\r\n [name]: Number(Number(Footprints2[i].EventAccountDebitCreditVolume).toFixed(rounded)),\r\n };\r\n }\r\n custodydata.push(item);\r\n }\r\n\r\n let header = [];\r\n\r\n let headeritem = {\r\n book: Corpevent.BookDate,\r\n date: Corpevent.Date,\r\n record: Corpevent.RecordDate,\r\n asset: Corpevent.AssetTicker,\r\n isin: Corpevent.AssetIsin,\r\n event: Corpevent.CorporateEventType,\r\n settcurrency: Corpevent.CorporateEventSettlementCurrencyISO,\r\n settcurrencyfx: Corpevent.CorporateEventFX,\r\n commcurrency: Corpevent.CorporateEventCommissionCurrencyISO,\r\n commcurrencyfx: Corpevent.CorporateEventCommissionFX,\r\n taxcurrency: Corpevent.CorporateEventTaxCurrencyISO,\r\n taxcurrencyfx: Corpevent.CorporateEventTaxFX,\r\n };\r\n\r\n header.push(headeritem);\r\n header.push({});\r\n\r\n let response = undefined;\r\n let body = {\r\n id: Corpevent.id,\r\n clients: clientdata,\r\n custody: custodydata,\r\n header: headeritem,\r\n };\r\n\r\n await services\r\n .corporateEventXLSX(body)\r\n .then((r) => {\r\n if (r.response.count > 0) {\r\n response = r.response.buffer.data;\r\n\r\n try {\r\n const blob = new Blob([new Uint8Array(response)], {\r\n type: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;\",\r\n });\r\n const link = document.createElement(\"a\");\r\n link.href = window.URL.createObjectURL(blob);\r\n link.download = \"CorporateEvent\" + String(Corpevent.id) + \".xlsx\";\r\n link.click();\r\n setdownloading(false);\r\n } catch (ex) {}\r\n }\r\n })\r\n .catch((e) => {});\r\n //setReportResponse(response);\r\n };\r\n\r\n return (\r\n \r\n Corporate Event\r\n \r\n
    \r\n \r\n {errorbook.open ? (\r\n \r\n ) : (\r\n
    \r\n )}\r\n {Corpevent.CorporateEventWarning && Corpevent.CorporateEventWarning.length > 0 && (\r\n \r\n \r\n \r\n There are some warnings, if it's important, create the event again.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {Corpevent.CorporateEventWarning &&\r\n Corpevent.CorporateEventWarning.map((rep) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n })}\r\n \r\n
    AccountInfoReason
    {rep.key}{rep.value}{rep.description}
    \r\n \r\n
    \r\n )}\r\n\r\n \r\n \r\n \r\n \r\n \r\n onChange(name, value)}\r\n value={parseDate(Corpevent.BookDate)}\r\n />\r\n {/* onChange(\"BookDate\", e.target.value)}\r\n /> */}\r\n \r\n\r\n \r\n onChange(name, value)}\r\n disabled={true}\r\n value={parseDate(Corpevent.RecordDate)}\r\n />\r\n {/* onChange(\"RecordDate\", e.target.value)}\r\n /> */}\r\n \r\n\r\n \r\n onChange(name, value)}\r\n disabled={true}\r\n value={parseDate(Corpevent.Date)}\r\n />\r\n {/* onChange(\"Date\", e.target.value)}\r\n /> */}\r\n \r\n\r\n {Corpevent.CorporateEventType == \"Coupon\" && (\r\n \r\n \r\n \r\n )}\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n {currencies == undefined ? (\r\n
    \r\n ) : currencies.length == 0 ? (\r\n
    \r\n ) : (\r\n onChangeCurrency(\"CorporateEventSettlementCurrency\", v)}\r\n />\r\n )}\r\n
    \r\n\r\n \r\n {currencies == undefined ? (\r\n
    \r\n ) : currencies.length == 0 ? (\r\n
    \r\n ) : (\r\n onChangeCurrency(\"CorporateEventCommissionCurrency\", v)}\r\n />\r\n )}\r\n
    \r\n\r\n \r\n {currencies == undefined ? (\r\n
    \r\n ) : currencies.length == 0 ? (\r\n
    \r\n ) : (\r\n onChangeCurrency(\"CorporateEventTaxCurrency\", v)}\r\n />\r\n )}\r\n
    \r\n \r\n\r\n \r\n \r\n onChange(\"CorporateEventFX\", v)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n\r\n \r\n onChange(\"CorporateEventCommissionFX\", v)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n\r\n \r\n onChange(\"CorporateEventTaxFX\", v)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n\r\n \r\n onChange(\"CorporateEventClientTaxFX\", v)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n
    \r\n \r\n
    \r\n\r\n \r\n \r\n \r\n onChange(\"name\", v.target.value)}\r\n //invalid={!!errors.volume}\r\n />\r\n \r\n \r\n \r\n \r\n onChange({Type: v})}\r\n //invalid={!!errors.volume}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n onChange(\"CorporateEventReleased\", !Corpevent.CorporateEventReleased)}\r\n //defaultChecked={!!recalculate.value}\r\n value={Corpevent.CorporateEventReleased}\r\n disabled={Corpevent.CorporateEventReleased}\r\n />\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n {wizzard === 1 && !loading && (\r\n \r\n \r\n account.BasicAccountType == 'Bank')}\r\n //custody = {state.event.Account.filter(account => account.isProp, account.BasicAccountType == 'Bank')}\r\n propia={true}\r\n onChange={onChangeGrid}\r\n fetchSearchAccount={services.fetchSearchBankProp}\r\n readOnly={!Corpevent.CorporateEventReleased || Corpevent.Status === \"Executed\"}\r\n addCustody={addCustody}\r\n removeCustody={removeCustody}\r\n isFundsXSystem={isFundsXSystem}\r\n />\r\n \r\n \r\n account.BasicAccountType == 'Bank')}\r\n //custody = {state.event.Account.filter(account => !account.isProp, account.BasicAccountType == 'Bank')}\r\n propia={false}\r\n onChange={onChangeGrid}\r\n fetchSearchAccount={services.fetchSearchBank}\r\n readOnly={!Corpevent.CorporateEventReleased || Corpevent.Status === \"Executed\"}\r\n addCustody={addCustody}\r\n removeCustody={removeCustody}\r\n isFundsXSystem={isFundsXSystem}\r\n />\r\n \r\n \r\n )}\r\n {wizzard === 2 && !loading && (\r\n \r\n \r\n { return (account.isProp ,account.BasicAccountType == 'Customer')\r\n // })}\r\n account={accountProp} //{accountProp.filter(item => item.BasicAccountType == 'Customer')}\r\n propia={true}\r\n onChange={onChangeGrid}\r\n fetchSearchAccount={services.fetchSearchAccountProp}\r\n readOnly={!Corpevent.CorporateEventReleased || Corpevent.Status === \"Executed\"}\r\n addCustody={addCustody}\r\n removeCustody={removeCustody}\r\n isFundsXSystem={isFundsXSystem}\r\n />\r\n \r\n\r\n \r\n !account.isProp, account.BasicAccountType == 'Customer')}\r\n account={account} //{account.filter(item => item.BasicAccountType == 'Customer')}\r\n propia={false}\r\n onChange={onChangeGrid}\r\n readOnly={!Corpevent.CorporateEventReleased || Corpevent.Status === \"Executed\"}\r\n fetchSearchAccount={services.fetchSearchAccount}\r\n addCustody={addCustody}\r\n removeCustody={removeCustody}\r\n isFundsXSystem={isFundsXSystem}\r\n />\r\n \r\n \r\n )}\r\n {loading && }\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n concatData()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n \r\n \r\n {Corpevent.Status == \"Initiated\" ? (\r\n deleteEvent()}\r\n className=\"btn btn-ladda btn-primary\"\r\n loading={deleting}\r\n disabled={false}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {\"Delete\"}\r\n \r\n ) : (\r\n
    \r\n )}\r\n\r\n {Corpevent.Status == \"Initiated\" && Corpevent.CorporateEventReleased ? (\r\n saveEvent()}\r\n className=\"btn btn-ladda btn-primary\"\r\n loading={saving}\r\n disabled={false}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {\"Save\"}\r\n \r\n ) : (\r\n
    \r\n )}\r\n\r\n {Corpevent.Status == \"Initiated\" ? (\r\n sendEvent()}\r\n className=\"btn btn-ladda btn-primary\"\r\n loading={sending}\r\n disabled={false}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {Corpevent.CorporateEventReleased ? \"Book\" : \"Recalculate&Book\"}\r\n \r\n ) : (\r\n \r\n )}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst EmptyTable = ({ loading }) => (\r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default CorpEvents;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"CorpEvents-module_modal_1xkVB\",\"body\":\"CorpEvents-module_body_1FVBl\",\"form\":\"CorpEvents-module_form_1mW6T\",\"fileList\":\"CorpEvents-module_fileList_2WUou\",\"link\":\"CorpEvents-module_link_1uLea\",\"box\":\"CorpEvents-module_box_16pRG\",\"table\":\"CorpEvents-module_table_H0EwV\"};","import React, { Component } from \"react\";\r\nimport { FormGroup } from \"reactstrap\";\r\nimport style from \"./../../Order/Field/Field.module.scss\";\r\nimport Holders from \"../../Order/Field/Account/Holders\";\r\nimport { Combobox, Field } from \"../../Order/Field/Field\";\r\nimport Autosuggest from \"../../../Autosuggest/Autosuggest\";\r\nimport CircularProgress from \"../../../CircularProgress/CircularProgress\";\r\n\r\nclass Account extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n const { AccountId } = props;\r\n this.state = {\r\n loadingHolders: AccountId != null,\r\n holders: null,\r\n };\r\n }\r\n\r\n componentWillMount() {\r\n const { AccountId } = this.props;\r\n\r\n if (!this.props.hideHolder && AccountId != null) {\r\n this.requestAccountHolders({ AccountId });\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n this._isMounted = true;\r\n const { AccountId, AccountName, AccountNumber, HolderId } = this.props;\r\n\r\n // Cuando se ve una orden ya viene precargados los valores\r\n if (!isEmpty(AccountId) && isEmpty(HolderId)) {\r\n this.onChange(\"\", {\r\n id: AccountId,\r\n name: AccountName,\r\n number: AccountNumber,\r\n });\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n this._isMounted = false;\r\n }\r\n\r\n onSuggestionsFetchRequested = ({ value }) => {\r\n const { sendingAccountId } = this.props;\r\n const { fetchSearchAccount, fetchSearchTransfer } = this.props.services;\r\n const filter = this.props.filter || [];\r\n if (sendingAccountId && sendingAccountId > 0) {\r\n return fetchSearchTransfer({\r\n text: value,\r\n sendingAccountId: sendingAccountId,\r\n })\r\n .then((r) => r.response.accounts)\r\n .then((accounts) =>\r\n accounts\r\n .map((a) => {\r\n const accountAttrs = JSON.parse(a.Value);\r\n\r\n return {\r\n id: a.Id,\r\n name: accountAttrs.value,\r\n number: accountAttrs.key,\r\n };\r\n })\r\n .filter((a) => !filter.includes(a.id))\r\n );\r\n } else {\r\n return fetchSearchAccount({ text: value })\r\n .then((r) => r.response.accounts)\r\n .then((accounts) =>\r\n accounts\r\n .map((a) => {\r\n const accountAttrs = JSON.parse(a.Value);\r\n\r\n return {\r\n id: a.Id,\r\n name: accountAttrs.value,\r\n number: accountAttrs.key,\r\n };\r\n })\r\n .filter((a) => !filter.includes(a.id))\r\n );\r\n }\r\n };\r\n\r\n renderSuggestion = (suggestion) => (\r\n
    {this.props.custody ? suggestion.name : suggestion.number}
    \r\n );\r\n\r\n getSuggestionValue = (suggestion) => (this.props.custody ? `${suggestion.name}` : `${suggestion.number}`);\r\n\r\n onChangeAccountHolder = (value) => {\r\n const holderItem = getItemById(this.state.holders, value);\r\n\r\n this.props.onChange({\r\n HolderId: holderItem.id,\r\n HolderName: holderItem.description,\r\n });\r\n };\r\n\r\n requestAccountHolders = ({ AccountId }) => {\r\n const { fetchAccountHolders } = this.props.services;\r\n\r\n fetchAccountHolders({ accountId: AccountId })\r\n .then((r) => r.response.holders)\r\n .then((holders) => {\r\n let _holders = holders.map((h) => ({\r\n isMain: h.IsMain,\r\n description: h.PersonName,\r\n id: h.PersonId,\r\n }));\r\n\r\n const selectedHolder = _holders.find((h) => h.isMain) || (_holders.length ? _holders[0] : null);\r\n\r\n this._isMounted &&\r\n this.setState(\r\n {\r\n holders: _holders,\r\n loadingHolders: false,\r\n },\r\n () => {\r\n const { holderId } = this.props;\r\n\r\n if (holderId == null && selectedHolder) {\r\n const { id, description } = selectedHolder;\r\n\r\n this.props.onChange({\r\n HolderId: id,\r\n HolderName: description,\r\n });\r\n }\r\n }\r\n );\r\n });\r\n };\r\n\r\n onChange = (method, value) => {\r\n let _value = defaultAccountValue;\r\n\r\n if (method != \"type\" && value.id) {\r\n _value = {\r\n AccountNumber: value.number,\r\n AccountName: value.name,\r\n AccountId: value.id,\r\n };\r\n\r\n if (!this.props.hideHolder) {\r\n this.requestAccountHolders({ AccountId: value.id });\r\n }\r\n\r\n this.setState({ holders: null, loadingHolders: true });\r\n } else {\r\n this.setState({ holders: null });\r\n _value.AccountName = value;\r\n }\r\n\r\n this.props.onChange(_value);\r\n };\r\n\r\n render() {\r\n const { AccountName, AccountNumber, HolderId, HolderName, readonly, errors, hideHolder, label, custody } =\r\n this.props;\r\n\r\n const inputProps = {\r\n placeholder: \"Account\",\r\n disabled: readonly.AccountName,\r\n invalid: !!errors.AccountName,\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n\r\n {!hideHolder && (\r\n \r\n {this.state.loadingHolders ? (\r\n \r\n ) : (\r\n
    \r\n \r\n \r\n \r\n
    \r\n )}\r\n
    \r\n )}\r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst defaultAccountValue = {\r\n AccountId: null,\r\n AccountName: \"\",\r\n HolderId: null,\r\n HolderName: null,\r\n};\r\n\r\nconst getItemById = (items, id) => {\r\n return items.find((e) => e.id == id);\r\n};\r\n\r\nconst isEmpty = (value) => value == undefined || value == \"\";\r\n\r\nexport default Account;\r\n","import React from \"react\";\r\nimport { useState, useEffect } from \"react\";\r\nimport {\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Container,\r\n Row,\r\n Label,\r\n Col,\r\n Input,\r\n FormGroup,\r\n Form,\r\n Table,\r\n Button,\r\n Badge,\r\n} from \"reactstrap\";\r\nimport style from \"./style.module.scss\";\r\n\r\nconst value = {\r\n date: \"\",\r\n type: \"\",\r\n id: 0,\r\n name: \"\",\r\n splitfrom: 0,\r\n splitto: 0,\r\n couponnumber: 0,\r\n corpEvent: 0,\r\n};\r\n\r\nconst Errors = ({ toggle, bookerror, label, ...props }) => {\r\n const [modalerror, setmodalerror] = useState({ open: bookerror.open, desc: bookerror.desc });\r\n\r\n const toggleModal = () => {\r\n const value = false;\r\n setmodalerror((modalerror) => ({\r\n ...modalerror,\r\n open: value,\r\n desc: \" \",\r\n }));\r\n };\r\n\r\n useEffect(() => {\r\n setmodalerror((modalerror) => ({\r\n ...modalerror,\r\n open: bookerror.open,\r\n desc: bookerror.desc,\r\n }));\r\n }, [bookerror]);\r\n\r\n return (\r\n \r\n {label}\r\n \r\n \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default Errors;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"desk\":\"Grid-module_desk_2WdR3\",\"table\":\"Grid-module_table_2FVax\",\"actions\":\"Grid-module_actions_ue1uM\",\"dropdown\":\"Grid-module_dropdown_1mfV0\",\"icon\":\"Grid-module_icon_2TFkr\"};","import React, { useState, useEffect } from \"react\";\r\nimport { Table, Input } from \"reactstrap\";\r\nimport CircularProgress from \"../../../CircularProgress/CircularProgress\";\r\nimport style from \"./Grid.module.scss\";\r\nimport * as ItemUI from \"./../../../../components/Custody/Items\";\r\nimport { Numeric } from \"../../Order/Field/Field\";\r\nimport Account from \"../Items/Account\";\r\nimport { Button } from \"reactstrap\";\r\n\r\nconst Grid = ({\r\n account,\r\n propia,\r\n readOnly,\r\n addCustody,\r\n removeCustody,\r\n actions,\r\n fetchs,\r\n fetchSearchAccount,\r\n onChange,\r\n isFundsXSystem = false,\r\n}) => {\r\n let debit = 0;\r\n if (account !== undefined && account.length !== 0) {\r\n if (!readOnly) debit = account[0].Coldebit + 1;\r\n else debit = account[0].Coldebit;\r\n }\r\n\r\n return (\r\n
    \r\n {!readOnly && (\r\n addCustody(account, propia, \"Customer\")}\r\n className={style.iconBtn}\r\n >\r\n \r\n \r\n )}\r\n\r\n \r\n \r\n {propia ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n {account == null ? (\r\n \r\n ) : account.length == 0 ? (\r\n \r\n ) : account[0].Coldebit == 0 ? (\r\n \r\n ) : (\r\n account[0].FootPrintDebit.map((d, j) => (\r\n // \r\n \r\n // \r\n\r\n //\r\n ))\r\n )}\r\n {account == null ? (\r\n \r\n ) : account.length == 0 ? (\r\n \r\n ) : account[0].Colcredit == 0 ? (\r\n \r\n ) : (\r\n account[0].FootPrintCredit.map((d, j) => (\r\n // \r\n \r\n // \r\n\r\n //\r\n ))\r\n )}\r\n \r\n {!readOnly && }\r\n \r\n \r\n {account == null ? (\r\n \r\n ) : account.length == 0 ? (\r\n \r\n ) : (\r\n account.map((c, i) => (\r\n \r\n \r\n \r\n \r\n {c.Coldebit == 0 ? (\r\n
    \r\n ) : (\r\n c.FootPrintDebit.map((d, j) => (\r\n // \r\n \r\n ))\r\n )}\r\n {c.Colcredit == 0 ? (\r\n
    \r\n ) : (\r\n c.FootPrintCredit.map((d, j) => (\r\n \r\n ))\r\n )}\r\n {!readOnly && (\r\n \r\n )}\r\n \r\n ))\r\n )}\r\n \r\n
    {isFundsXSystem ? \"Funds\" : \"Prop Clients\"}\r\n Debit\r\n Credit
    Clients\r\n Debit\r\n Credit
    AccountBalance TypePortfolio
    {`${d.Tooltip}`}{`${d.Tooltip}`}
    {`${d.Tooltip}`}{`${d.Tooltip}`}
    \r\n onChange(\"Account\", \"Client\", propia, i, 0, v)}\r\n filter={[]}\r\n hideInstruction={true}\r\n hideHolder={true}\r\n custody={false}\r\n readonly={{\r\n AccountName: readOnly,\r\n }}\r\n errors={\r\n {\r\n // AccountName: '',\r\n // AccountNumber: 0,\r\n }\r\n }\r\n services={{\r\n fetchSearchAccount: fetchSearchAccount,\r\n }}\r\n />\r\n {c.EventBalanceType}\r\n onChange(\"EventAccountAmount\", \"Client\", propia, i, 0, v)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n
    \r\n onChange(\"Debit\", \"Client\", propia, i, j, v)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n onChange(\"Credit\", \"Client\", propia, i, j, v)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n removeCustody(account, propia, \"Customer\", i, c.BasicAccountId)}\r\n className={style.iconBtn}\r\n >\r\n \r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst EmptyTable = ({ loading, pro }) => (\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n
    \r\n {pro ? (\r\n

    No Prop Clients

    \r\n ) : (\r\n

    No Clients

    \r\n )}\r\n
    \r\n )}\r\n \r\n \r\n);\r\n\r\nexport default Grid;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Table, Input } from \"reactstrap\";\r\nimport CircularProgress from \"../../../CircularProgress/CircularProgress\";\r\nimport style from \"./Grid.module.scss\";\r\nimport * as ItemUI from \"./../../../../components/Custody/Items\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport { Numeric } from \"../../Order/Field/Field\";\r\nimport Account from \"../Items/Account\";\r\nimport { Button } from \"reactstrap\";\r\n\r\nconst Grid = ({\r\n custody,\r\n propia,\r\n readOnly,\r\n addCustody,\r\n removeCustody,\r\n actions,\r\n fetchs,\r\n fetchSearchAccount,\r\n onChange,\r\n isFundsXSystem = false,\r\n}) => {\r\n let debit = 0;\r\n if (custody !== undefined && custody.length !== 0) {\r\n if (!readOnly) debit = custody[0].Coldebit + 1;\r\n else debit = custody[0].Coldebit;\r\n }\r\n\r\n const custodyObj = custody[0];\r\n\r\n const isCashCustodianDifferent =\r\n custodyObj &&\r\n custodyObj.EventCashCustAccountId != 0 &&\r\n custodyObj.EventCashCustAccountId != custodyObj.BasicAccountId;\r\n\r\n return (\r\n
    \r\n {!readOnly && (\r\n addCustody(custody, propia, \"Custody\")}\r\n className={style.iconBtn}\r\n >\r\n \r\n \r\n )}\r\n\r\n \r\n \r\n {propia ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n {isCashCustodianDifferent && }\r\n \r\n \r\n {custody == null ? (\r\n \r\n ) : custody.length == 0 ? (\r\n \r\n ) : custody[0].Coldebit == 0 ? (\r\n \r\n ) : (\r\n custody[0].FootPrintDebit.map((d, j) => (\r\n // \r\n \r\n // \r\n\r\n //\r\n ))\r\n )}\r\n {custody == null ? (\r\n \r\n ) : custody.length == 0 ? (\r\n \r\n ) : custody[0].Colcredit == 0 ? (\r\n \r\n ) : (\r\n custody[0].FootPrintCredit.map((d, j) => (\r\n // \r\n \r\n // \r\n\r\n //\r\n ))\r\n )}\r\n {!readOnly && }\r\n \r\n \r\n \r\n {custody == null ? (\r\n \r\n ) : custody.length == 0 ? (\r\n \r\n ) : (\r\n custody.map((c, i) => (\r\n \r\n \r\n {isCashCustodianDifferent && (\r\n \r\n )}\r\n\r\n \r\n \r\n {c.Coldebit == 0 ? (\r\n
    \r\n ) : (\r\n c.FootPrintDebit.map((d, j) => (\r\n \r\n ))\r\n )}\r\n {c.Colcredit == 0 ? (\r\n
    \r\n ) : (\r\n c.FootPrintCredit.map((d, j) => (\r\n \r\n ))\r\n )}\r\n {!readOnly && (\r\n \r\n )}\r\n \r\n ))\r\n )}\r\n \r\n
    {isFundsXSystem ? \"Funds Custodians\" : \"Prop Custodians\"}\r\n Debit\r\n Credit
    Custodians\r\n Debit\r\n Credit
    AccountCash CustodyBalance TypePortfolio
    {`${d.Tooltip}`}{`${d.Tooltip}`}
    {`${d.Tooltip}`}{`${d.Tooltip}`}
    \r\n onChange(\"Account\", \"Custody\", propia, i, 0, v)}\r\n filter={[]}\r\n hideInstruction={true}\r\n hideHolder={true}\r\n custody={true}\r\n readonly={{\r\n AccountName: readOnly,\r\n }}\r\n errors={\r\n {\r\n // AccountName: '',\r\n // AccountNumber: 0,\r\n }\r\n }\r\n services={{\r\n fetchSearchAccount: fetchSearchAccount,\r\n }}\r\n />\r\n \r\n onChange(\"Account\", \"CustodyCash\", propia, i, 0, v)}\r\n filter={[]}\r\n hideInstruction={true}\r\n hideHolder={true}\r\n custody={true}\r\n readonly={{\r\n AccountName: readOnly,\r\n }}\r\n errors={\r\n {\r\n // AccountName: '',\r\n // AccountNumber: 0,\r\n }\r\n }\r\n services={{\r\n fetchSearchAccount: fetchSearchAccount,\r\n }}\r\n />\r\n {c.EventBalanceType}\r\n onChange(\"EventAccountAmount\", \"Custody\", propia, i, 0, v)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n onChange(\"Debit\", \"Custody\", propia, i, j, v)}\r\n />\r\n \r\n onChange(\"Credit\", \"Custody\", propia, i, j, v)}\r\n />\r\n \r\n removeCustody(custody, propia, \"Custody\", i, c.BasicAccountId)}\r\n className={style.iconBtn}\r\n >\r\n \r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst EmptyTable = ({ loading, pro }) => (\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n
    \r\n {pro ? (\r\n

    No Prop Custodians

    \r\n ) : (\r\n

    No Custodians

    \r\n )}\r\n
    \r\n )}\r\n \r\n \r\n);\r\n\r\nexport default Grid;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"style-module_modal_2j_8T\",\"body\":\"style-module_body_2Q0aC\",\"status\":\"style-module_status_3e_OF\",\"lines\":\"style-module_lines_3QgbL\",\"line\":\"style-module_line_3lasl\",\"labelValue\":\"style-module_labelValue_3j9WR\",\"taxing\":\"style-module_taxing_ZZFrm\",\"totals\":\"style-module_totals_27RmR\"};","import { mergeDeep } from \"../../../../utils/Helper\";\r\n//import { validations } from \"./Custody\";\r\n\r\nexport const defaultState = () => ({\r\n event:{\r\n id: \"0\",\r\n CorporateEventType: \"\",\r\n Date: \"0000-00-00\",\r\n name: \"\",\r\n CurrencyId: \"0\",\r\n CurrencyISO: '',\r\n \"AssetId\": \"0\",\r\n \"AssetName\": \"\",\r\n \"AssetTicker\": \"\",\r\n \"CorporateEventSplitFrom\": 0,\r\n \"CorporateEventSplitTo\": 0,\r\n \"CorporateEventExDividendDate\": \"0000-00-00\",\r\n \"Status\": \"\",\r\n \"CorporateEventSettlementCurrency\": 0,\r\n \"CorporateEventCommissionCurrency\": 0,\r\n \"CorporateEventFX\": 0.00000000,\r\n \"CorporateEventCommissionFX\": 0.00000000,\r\n \"CorporateEventTaxCurrency\": '',\r\n \"CorporateEventTaxFX\": 0.00000000,\r\n \"CorporateEventIsCovered\": false,\r\n \"CorporateEventIsCoverable\": false,\r\n Account : [\r\n {\r\n \"BasicAccountId\": \"0\",\r\n \"BasicAccountName\": \"\",\r\n \"EventBalanceType\": \"\",\r\n \"EventAccountAmount\": \"0.0000\",\r\n Debit : [{\r\n \"EventAccountFootprintId\": \"0\",\r\n \"EventAccountDebitCreditVolume\": \"0.00000000\",\r\n \"EventAccountIsCurrency\": false,\r\n \"EventAccountSecurityId\": \"0\",\r\n \"EventAccountTicker\": \"\",\r\n \"EventAccountIsCommission\": false,\r\n \"EventAccountIsTax\": false,\r\n \"EventAccountIsWithholding\": false\r\n }],\r\n Credit : [{\r\n \"EventAccountFootprintId\": \"0\",\r\n \"EventAccountDebitCreditVolume\": \"0.00000000\",\r\n \"EventAccountIsCurrency\": false,\r\n \"EventAccountSecurityId\": \"0\",\r\n \"EventAccountTicker\": \"\",\r\n \"EventAccountIsCommission\": false,\r\n \"EventAccountIsTax\": false,\r\n \"EventAccountIsWithholding\": false\r\n}]\r\n }\r\n ]\r\n },\r\n// clearingHouseItem:{\r\n// clearingHouseId:0,\r\n// clearingHouseSettlementInstructions:'',\r\n// clearingHouseDefault:false,\r\n// clearingHouseCode:'',\r\n// name:''\r\n// },\r\n// fields: {\r\n// readonly: {},\r\n// errors:{}\r\n// },\r\n// buttons: {\r\n// confirm: {\r\n// loading: false\r\n// }\r\n// },\r\n// editClearingHouse:false,\r\n// editClearingHouseId:false,\r\n// saveEditClearingHouseId:0,\r\n// saveEditClearingHouseCode:0,\r\n// initialized:true,\r\n// buttons: {\r\n// confirm: {\r\n// loading: false\r\n// }\r\n// },\r\n// error:true,\r\n// errors: {\r\n// name:false,\r\n// currencyNumber:false,\r\n// feeSchema:false,\r\n// description:false\r\n// },\r\n// message:'',\r\n// sentAuthorization:false\r\n})\r\n\r\nexport const EventSimpleReducer = (state, action) => {\r\n switch (action.type) {\r\n case 'SET_EVENT':\r\n return InitializeValues(state, action);\r\n case 'EDIT_CLEARING_HOUSE':\r\n return editClearingHouse(state, action);\r\n case 'CLEARING_HOUSES_FIELDS':\r\n return processChangeClearingHousesFields(state, action.fields);\r\n case 'CLOSE_CLEARING_HOUSE':\r\n return closeClearingHouse(state);\r\n case 'ADD_CLEARING_HOUSE':\r\n return AddClearingHouses(state, action)\r\n case 'EDIT_CLEARING_HOUSE_ID':\r\n return EditClearingHouseId(state, action);\r\n case 'SAVE_EDIT_CLEARING_HOUSE':\r\n return SaveEditClearingHouse(state, action);\r\n case 'INITIALIZE_VALUES':\r\n return InitializeValues(state, action);\r\n case 'CHANGE_FIELDS_ACCOUNT_TYPE':\r\n return ChangeAccountType(state, action.fields);\r\n case 'UPDATE_BUTTONS':\r\n return processUpdateButtons(state, action.buttons);\r\n case 'VALIDATE_FIELDS':\r\n return validateForm(state);\r\n case 'SENT_AUTHORIZATION':\r\n return SentAuthorization(state,action);\r\n case 'RESET_CLOSE':\r\n return ResetClose(state, action);\r\n default:\r\n return state;\r\n }\r\n}\r\n\r\n// export const initialize = (props) => {\r\n// return (initialState) => {\r\n// return {\r\n// ...initialState,\r\n// }\r\n// }\r\n// }\r\n\r\n// export function editClearingHouse(state, props){\r\n// const {editClearingHouse, counterparty} = state;\r\n// return mergeDeep(\r\n// {...state},\r\n// {\r\n// editClearingHouse:true,\r\n// editClearingHouseId:false,\r\n// clearingHouseItem:{\r\n// clearingHouseCode:0,\r\n// name:props.clearingHouses[0].name,\r\n// clearingHouseId:props.clearingHouses[0].id,\r\n// clearingHouseSettlementInstructions:'',\r\n// clearingHouseDefault:false\r\n// }\r\n// }\r\n// )\r\n// }\r\n\r\n// function processChangeClearingHousesFields(state, fields) {\r\n// const errors = Object.keys(fields)\r\n// .reduce((f, name) => {\r\n// f[name] = undefined;\r\n// return f;\r\n// }, {});\r\n\r\n// return mergeDeep(\r\n// { ...state },\r\n// {\r\n// clearingHouseItem:{\r\n// ...fields\r\n// },\r\n// fields: {\r\n// errors\r\n// },\r\n// }\r\n// );\r\n// }\r\n\r\n// function processChangeFields(state, fields) {\r\n// const errors = Object.keys(fields)\r\n// .reduce((f, name) => {\r\n// f[name] = undefined;\r\n// return f;\r\n// }, {});\r\n \r\n// return mergeDeep(\r\n// { ...state },\r\n// {\r\n// custody: {\r\n// ...fields\r\n// },\r\n// fields: {\r\n// errors\r\n// },\r\n// }\r\n// );\r\n// }\r\n\r\n// function ChangeAccountType(state, fields) {\r\n// var isProp = false\r\n// if (fields.accountType==2){\r\n// isProp=true\r\n// }\r\n// return mergeDeep(\r\n// { ...state },\r\n// {\r\n// custody: {\r\n// accountType:fields.accountType,\r\n// isProp:isProp\r\n// }\r\n// }\r\n// );\r\n// }\r\n\r\n// export function closeClearingHouse(state){\r\n// const {editClearingHouse} = state;\r\n// return mergeDeep(\r\n// {...state},\r\n// {\r\n// editClearingHouse:false,\r\n// editClearingHouseId:false,\r\n// clearingHouseItem:{\r\n// clearingHouseCode:0,\r\n// name:'',\r\n// clearingHouseId:0,\r\n// clearingHouseSettlementInstructions:'',\r\n// clearingHouseDefault:false\r\n// }\r\n// }\r\n// )\r\n// }\r\n\r\n// export function AddClearingHouses(state, action){\r\n// const {counterparty, fields, clearingHouseItem, clearingHouses, editClearingHouse} = state;\r\n// var name=''\r\n// for(var j=0; j0){\r\n // entity=action.custodianEntity[0].id\r\n // }\r\n // if (action.currencies.length>0){\r\n // currency=action.currencies[0].currencyId\r\n // }\r\n // if (action.imputableAccounts.length>0){\r\n // account=action.imputableAccounts[0].id\r\n // }\r\n return mergeDeep(\r\n {...state},\r\n {\r\n event: action.event\r\n } \r\n \r\n \r\n )\r\n }\r\n\r\n// export function processUpdateButtons(state, buttons) {\r\n// return mergeDeep(\r\n// {...state},\r\n// {\r\n// buttons\r\n// }\r\n// )\r\n// }\r\n \r\n// export function validateForm(state) {\r\n// var name = false\r\n// var feeSchema = false\r\n// var description = false\r\n// var currencyNumber = false\r\n// if (state.custody.name == ''){\r\n// name=true\r\n// }\r\n// if (state.custody.description == ''){\r\n// description = true\r\n// }\r\n// if (state.custody.feeSchema ==''){\r\n// feeSchema = true\r\n// }\r\n// if (state.custody.currencyNumber == ''){\r\n// currencyNumber =true\r\n// }\r\n// var errors={\r\n// name:name,\r\n// description:description,\r\n// feeSchema:feeSchema,\r\n// currencyNumber:currencyNumber\r\n// }\r\n// return mergeDeep(\r\n// {...state},\r\n// {\r\n// errors:errors,\r\n// }\r\n// )\r\n// }\r\n\r\n// export function validateErr(state) {\r\n// var error = false\r\n// if (state.custody.name == ''){\r\n// error=true\r\n// }\r\n// if (state.custody.description == ''){\r\n// error=true\r\n// }\r\n// if (state.custody.feeSchema ==''){\r\n// error=true\r\n// }\r\n// if (state.custody.currencyNumber == ''){\r\n// error=true\r\n// }\r\n// return error\r\n// } \r\n\r\n// export function SentAuthorization(state, response){\r\n// var message=\"\"\r\n// if (response.response.result.Code == 200){\r\n// message=\"Custody sent for authorization\"\r\n// }else{\r\n// message=response.response.result.Description\r\n// }\r\n// var button={\r\n// confirm:{\r\n// loading:false\r\n// }\r\n// }\r\n// return mergeDeep(\r\n// {...state},\r\n// {\r\n// sentAuthorization:true,\r\n// buttons:button,\r\n// message:message\r\n// }\r\n// )\r\n// }\r\n\r\n// export function ResetClose(state, action){\r\n// action.onClickClose()\r\n// return mergeDeep(\r\n// {...state},\r\n// {\r\n// custody:{\r\n// name:'',\r\n// entityId:0,\r\n// custodiesCash:false,\r\n// custodiesValues:false,\r\n// description:'',\r\n// feeSchema:'',\r\n// currencyId:0,\r\n// isProp:false,\r\n// currencyNumber:'',\r\n// currencyImputableAccount:0,\r\n// isLocalBank:false,\r\n// clearingHouse:[],\r\n// accountType:1\r\n// },\r\n// clearingHouseItem:{\r\n// clearingHouseId:0,\r\n// clearingHouseSettlementInstructions:'',\r\n// clearingHouseDefault:false,\r\n// clearingHouseCode:'',\r\n// name:''\r\n// },\r\n// fields: {\r\n// readonly: {},\r\n// errors:{}\r\n// },\r\n// buttons: {\r\n// confirm: {\r\n// loading: false\r\n// }\r\n// },\r\n// editClearingHouse:false,\r\n// editClearingHouseId:false,\r\n// saveEditClearingHouseId:0,\r\n// saveEditClearingHouseCode:0,\r\n// initialized:true,\r\n// buttons: {\r\n// confirm: {\r\n// loading: false\r\n// }\r\n// },\r\n// error:true,\r\n// errors: {\r\n// name:false,\r\n// currencyNumber:false,\r\n// feeSchema:false,\r\n// description:false\r\n// },\r\n// message:'',\r\n// sentAuthorization:false\r\n// }\r\n// )\r\n// }","import React from 'react';\r\nimport { Mode } from '../../../../utils';\r\nimport { mergeDeep } from '../../../../utils/Helper';\r\nimport { CustodyLock, CustodyIntStatus } from '../../../Custody/types';\r\n\r\nexport const initialize = (props) => {\r\n\treturn (initialState) => {\r\n let state = mergeDeep(\r\n {...initialState},\r\n {\r\n ui: {\r\n mode: props.mode || Mode.EDIT,\r\n loading: props.retriveAsync\r\n },\r\n custody: {\r\n ...props.custody,\r\n actualstatus: props.custody.internalstatus\r\n } \r\n }\r\n );\r\n\r\n if (state.ui.mode == Mode.READONLY) {\r\n Object.keys(state.custody).forEach(f => {\r\n state.fields.readonly[f] = true;\r\n })\r\n\r\n state.buttons.precheck.readonly = true;\r\n }\r\n\r\n return state;\r\n }\r\n}\r\n\r\nexport const defaultState = () => ({\r\n event:{\r\n id: 0,\r\n CorporateEventType: \"\",\r\n Date: \"0000-00-00\",\r\n name: \"\",\r\n CurrencyId: \"0\",\r\n CurrencyISO: \"\",\r\n \"AssetId\": \"0\",\r\n \"AssetName\": \"\",\r\n \"AssetTicker\": \"\",\r\n \"CorporateEventSplitFrom\": 0,\r\n \"CorporateEventSplitTo\": 0,\r\n \"CorporateEventExDividendDate\": \"0000-00-00\",\r\n \"Status\": \"\",\r\n \"CorporateEventSettlementCurrency\": 0,\r\n \"CorporateEventCommissionCurrency\": 0,\r\n \"CorporateEventFX\": 0.00000000,\r\n \"CorporateEventCommissionFX\": 0.00000000,\r\n \"CorporateEventTaxCurrency\": 0,\r\n \"CorporateEventTaxFX\": 0.00000000,\r\n \"CorporateEventIsCovered\": false,\r\n \"CorporateEventIsCoverable\": false,\r\n Account : [\r\n {\r\n \"BasicAccountId\": \"0\",\r\n \"BasicAccountName\": \"\",\r\n \"EventBalanceType\": \"\",\r\n \"EventAccountAmount\": \"0.0000\",\r\n Footprint : [{\r\n \"EventAccountFootprintId\": \"0\",\r\n \"EventAccountDebitCredit\": 0,\r\n \"EventAccountDebitCreditVolume\": \"0.00000000\",\r\n \"EventAccountIsCurrency\": false,\r\n \"EventAccountSecurityId\": \"0\",\r\n \"EventAccountTicker\": \"\",\r\n \"EventAccountIsCommission\": false,\r\n \"EventAccountIsTax\": false,\r\n \"EventAccountIsWithholding\": false\r\n }]\r\n }\r\n ]\r\n },\r\n})","import React, { useEffect, useState } from \"react\";\r\nimport {\r\n Table,\r\n Card,\r\n CardBody,\r\n CardHeader,\r\n CardTitle,\r\n UncontrolledDropdown,\r\n Row,\r\n Col,\r\n Progress,\r\n Form,\r\n FormGroup,\r\n Label,\r\n Input,\r\n InputGroup,\r\n InputGroupAddon,\r\n InputGroupButtonDropdown,\r\n Button,\r\n ButtonGroup,\r\n Dropdown,\r\n DropdownToggle,\r\n DropdownMenu,\r\n DropdownItem,\r\n ListGroup,\r\n ListGroupItem,\r\n} from \"reactstrap\";\r\nimport styles from \"./style.module.scss\";\r\nimport { addDay, addMonth, DateField, toFormatDate } from \"../../../utils\";\r\nimport CounterParty from \"../CounterPartySet/CounterParty\";\r\nimport Autosuggest from \"../../Autosuggest/Autosuggest\";\r\nimport GridCounterParty from \"./grids/GridCounterParty\";\r\nimport GridCustodian from \"./grids/GridCustodian\";\r\nimport { ChartsCounterParty } from \"./grids/ChartCounterPartyFailling\";\r\nimport CircularProgress from \"../../CircularProgress/CircularProgress\";\r\n\r\nconst initialState = {\r\n dropdownMonthOpen: false,\r\n counterparties: [],\r\n loadingCP: true,\r\n custodians: [],\r\n loadingCU: true,\r\n loadingGP: true,\r\n topMonthSelected: 10,\r\n faillings: [],\r\n selectedCP: {\r\n id: 0,\r\n name: undefined,\r\n },\r\n selectedCU: {\r\n id: 0,\r\n name: undefined,\r\n },\r\n counterpartiesSuggested: [],\r\n searchBar: \"\",\r\n fromDate: addMonth(new Date(), -1).toLocaleDateString(\"en\"),\r\n toDate: addDay(new Date(), 5).toLocaleDateString(\"en\"),\r\n openCounterParty: false,\r\n loadingCountry: false,\r\n countries: [],\r\n clearinghouses: [],\r\n countriesloading: false,\r\n clearinghousesloading: false,\r\n};\r\n\r\nconst CounterPartyRanking = ({ fetchs, callApiProxy, Flag, AddNew }) => {\r\n const [state, setState] = useState(initialState);\r\n const [graphicdata, setGraphicdata] = useState([]);\r\n\r\n const CounterPartyForm = () => {\r\n setState({\r\n ...state,\r\n openCounterParty: true,\r\n loadingCountry: true,\r\n countriesloading: true,\r\n clearinghousesloading: true,\r\n });\r\n fetchs.getCountryCounterParty().then((r) => {\r\n setState({\r\n ...state,\r\n openCounterParty: true,\r\n countries: r.countries,\r\n countriesloading: false,\r\n });\r\n });\r\n fetchs.getClearingHouseCounterParty().then((c) => {\r\n setState({\r\n ...state,\r\n openCounterParty: true,\r\n clearinghouses: c.clearingHouses,\r\n clearinghousesloading: false,\r\n });\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n setState({\r\n ...state,\r\n loadingCP: true,\r\n });\r\n fetchs\r\n .fetchCounterPartyRank({\r\n page: state.topMonthSelected,\r\n id: state.selectedCP.id,\r\n })\r\n .then((r) => {\r\n setState({\r\n ...state,\r\n loadingCP: false,\r\n counterparties: r.response.collection,\r\n\r\n selectedCU: {\r\n id:\r\n state.selectedCP.id ||\r\n (r.response.collection.length > 0 && r.response.collection[0].Id\r\n ? r.response.collection[0].Id\r\n : 0),\r\n name: (r.response.collection[0] && r.response.collection[0].Name) || undefined,\r\n },\r\n });\r\n });\r\n }, [state.topMonthSelected, state.selectedCP.id]);\r\n\r\n const handleChangeTop = (newTop) => {\r\n setState({\r\n ...state,\r\n topMonthSelected: newTop,\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n setState({\r\n ...state,\r\n loadingCU: true,\r\n });\r\n fetchs\r\n .fetchCounterPartyTrades({\r\n counterParty: state.selectedCU.id,\r\n from: toFormatDate(state.fromDate),\r\n to: toFormatDate(state.toDate),\r\n })\r\n .then((r) => {\r\n setState({\r\n ...state,\r\n custodians: r.response.trades,\r\n loadingCU: false,\r\n });\r\n });\r\n }, [state.selectedCU.id, state.fromDate, state.toDate]);\r\n\r\n const handleSelectCounterParty = (id, name) => {\r\n setState({\r\n ...state,\r\n selectedCU: {\r\n id: id,\r\n name: name,\r\n },\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n let date = new Date();\r\n let day = date.getDate() - 1;\r\n let month = date.getMonth() + 1;\r\n let year = date.getFullYear();\r\n\r\n const fecha = year + \"-\" + month + \"-\" + day;\r\n fetchs.getMostFaillings({ date: fecha }).then((r) => {\r\n setGraphicdata(r);\r\n });\r\n }, []);\r\n\r\n const getSuggestionValue = (suggestion) => {\r\n return suggestion.name;\r\n };\r\n\r\n const onSuggestionsFetchRequested = ({ value }) => {\r\n return fetchs.fetchAutoSuggestCounterParty({ name: value }).then((response) => {\r\n const suggestions = [];\r\n if (response && response.response && response.response.suggestions) {\r\n response.response.suggestions.map((s) => {\r\n suggestions.push({\r\n id: s.Id,\r\n name: s.Name,\r\n });\r\n });\r\n }\r\n return suggestions;\r\n });\r\n };\r\n\r\n const renderSuggestion = (suggestion) => (\r\n \r\n {suggestion.name}\r\n
    \r\n );\r\n\r\n const handleSelectSearchCounterParty = (m, value) => {\r\n if (value == \"\") {\r\n setState({\r\n ...state,\r\n topMonthSelected: 20,\r\n selectedCP: {\r\n ...state.selectedCP,\r\n id: 0,\r\n },\r\n });\r\n } else {\r\n if (m != \"type\" && value.id) {\r\n setState({\r\n ...state,\r\n selectedCP: {\r\n ...state.selectedCP,\r\n id: value.id,\r\n },\r\n });\r\n }\r\n }\r\n };\r\n\r\n const handleChangeRange = (name, value) => {\r\n setState({\r\n ...state,\r\n [name]: value,\r\n });\r\n };\r\n\r\n const onClickClose = () => {\r\n setState({\r\n ...state,\r\n openCounterParty: false,\r\n });\r\n };\r\n\r\n return (\r\n
    \r\n {state.openCounterParty && (\r\n \r\n )}\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n handleSelectSearchCounterParty(m, v)}\r\n />\r\n \r\n \r\n \r\n \r\n Top {state.topMonthSelected}\r\n \r\n handleChangeTop(20)}>Top 20 month\r\n handleChangeTop(10)}>Top 10 month\r\n handleChangeTop(5)}>Top 5 month\r\n \r\n \r\n \r\n \r\n
    \r\n { !(AddNew) ?\r\n \r\n : (\r\n \r\n \r\n \r\n )}\r\n
    \r\n \r\n
    \r\n
    \r\n\r\n \r\n {graphicdata.length < 1 ? (\r\n \r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n handleChangeRange(name, value)}\r\n value={state.fromDate}\r\n />\r\n \r\n \r\n \r\n \r\n {\" \"}\r\n \r\n handleChangeRange(name, value)}\r\n value={state.toDate}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default CounterPartyRanking;\r\n","import React from \"react\";\r\nimport ReactEcharts from \"echarts-for-react\";\r\n\r\nexport const ChartsCounterParty = ({ data }) => {\r\n const monthNames = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\r\n\r\n const month = new Date();\r\n var count = 1;\r\n var legendMonth = [];\r\n legendMonth.push(month.getMonth());\r\n var m = new Date();\r\n if (data.count !== undefined || data.length !== 0) {\r\n data.series.map(() => {\r\n if (m.getMonth) {\r\n m.setMonth(m.getMonth() - 1);\r\n legendMonth.push(m.getMonth());\r\n }\r\n count = count + 1;\r\n });\r\n }\r\n\r\n let option = {\r\n title: {\r\n text: \"Failing trades\",\r\n },\r\n tooltip: {\r\n trigger: \"axis\",\r\n formatter: \"\",\r\n },\r\n legend: {\r\n data: data.name,\r\n },\r\n xAxis: {\r\n type: \"category\",\r\n boundaryGap: false,\r\n //data: [\"Oct\", \"Nov\", \"Dec\", \"Jan\", \"Feb\"],\r\n data: [\r\n monthNames[legendMonth[4]],\r\n monthNames[legendMonth[3]],\r\n monthNames[legendMonth[2]],\r\n monthNames[legendMonth[1]],\r\n monthNames[legendMonth[0]],\r\n ],\r\n },\r\n yAxis: {\r\n type: \"value\",\r\n },\r\n series: data.series,\r\n };\r\n return ;\r\n};\r\n","import React, { useEffect, useReducer, useState } from \"react\";\r\nimport {\r\n Table,\r\n UncontrolledDropdown,\r\n Progress,\r\n DropdownToggle,\r\n DropdownMenu,\r\n DropdownItem,\r\n} from \"reactstrap\";\r\nimport style from \"../style.module.scss\";\r\nimport CircularProgress from \"../../../CircularProgress/CircularProgress\";\r\nimport CustodianEntity from \"../../CustodianEntity/CustodianEntity\";\r\nimport {\r\n CounterPartySimpleReducer,\r\n defaultState,\r\n initialize,\r\n validateForm,\r\n} from \"../../CounterPartySet/reducer\";\r\nimport { addDay, addMonth, DateField, toFormatDate } from \"../../../../utils\";\r\nimport CounterParty from \"../../CounterPartySet/CounterParty\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\n\r\nconst initialState = {\r\n dropdownMonthOpen: false,\r\n counterparties: [],\r\n loadingCP: true,\r\n custodians: [],\r\n loadingCU: true,\r\n topMonthSelected: 10,\r\n selectedCP: {\r\n id: 0,\r\n name: undefined,\r\n },\r\n selectedCU: {\r\n id: 0,\r\n name: undefined,\r\n },\r\n counterpartiesSuggested: [],\r\n searchBar: \"\",\r\n fromDate: addMonth(new Date(), -1).toLocaleDateString(\"en\"),\r\n toDate: addDay(new Date(), 5).toLocaleDateString(\"en\"),\r\n openCounterParty: false,\r\n loadingCountry: false,\r\n countries: [],\r\n clearinghouses: [],\r\n countriesloading: false,\r\n clearinghousesloading: false,\r\n counterPartyId: 0,\r\n};\r\n\r\nconst GridCounterParty = ({ rows, loading, selectedCP, selectCP, Flag, ...props }) => {\r\n const [state, setState] = useState(initialState);\r\n\r\n const CounterPartyForm = (id) => {\r\n setState({\r\n ...state,\r\n openCounterParty: true,\r\n loadingCountry: true,\r\n countriesloading: true,\r\n clearinghousesloading: true,\r\n counterPartyId: id,\r\n });\r\n props.fetchs.getCountryCounterParty().then((r) => {\r\n setState({\r\n ...state,\r\n openCounterParty: true,\r\n countries: r.countries,\r\n countriesloading: false,\r\n });\r\n });\r\n props.fetchs.getClearingHouseCounterParty().then((c) => {\r\n setState({\r\n ...state,\r\n openCounterParty: true,\r\n clearinghouses: c.clearingHouses,\r\n clearinghousesloading: false,\r\n });\r\n });\r\n };\r\n\r\n const onClickClose = () => {\r\n setState({\r\n ...state,\r\n openCounterParty: false,\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {\r\n //\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {loading ? (\r\n \r\n \r\n \r\n ) : (\r\n rows.map((d, i) => {\r\n return (\r\n \r\n \r\n \r\n {/**/}\r\n \r\n \r\n \r\n \r\n );\r\n })\r\n )}\r\n \r\n {state.openCounterParty && (\r\n \r\n )}\r\n
    \r\n \r\n Counter PartyCountryUsageFailing YOYSuccessful YOY
    \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n selectCP(d.Id, d.Name)}>\r\n Check Trades\r\n \r\n CounterPartyForm(d.Id)}>\r\n Edit Counter Party\r\n \r\n \r\n \r\n {d.Name}\r\n \r\n \r\n
    \r\n {parseFloat(d.percentage)}%\r\n \r\n {parseFloat(d.creditLine)} / {parseFloat(d.Limits)}K\r\n \r\n
    \r\n \r\n
    \r\n

    \r\n {\" \"}\r\n {d.failingnumber} trades\r\n

    \r\n

    \r\n {\" \"}\r\n \r\n USD \r\n \r\n

    \r\n
    \r\n

    \r\n {\" \"}\r\n {d.trades} trades\r\n

    \r\n

    \r\n {\" \"}\r\n \r\n USD \r\n \r\n

    \r\n
    \r\n );\r\n};\r\nexport default GridCounterParty;\r\n","import React, { useEffect } from \"react\";\r\nimport {\r\n Table,\r\n Card,\r\n CardBody,\r\n CardHeader,\r\n CardTitle,\r\n UncontrolledDropdown,\r\n Row,\r\n Col,\r\n Progress,\r\n Form,\r\n FormGroup,\r\n Label,\r\n Input,\r\n InputGroup,\r\n InputGroupAddon,\r\n InputGroupButtonDropdown,\r\n Button,\r\n ButtonGroup,\r\n Dropdown,\r\n DropdownToggle,\r\n DropdownMenu,\r\n DropdownItem,\r\n ListGroup,\r\n ListGroupItem,\r\n} from \"reactstrap\";\r\nimport styles from \"../style.module.scss\";\r\nimport CircularProgress from \"../../../CircularProgress/CircularProgress\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport { parseDate } from \"../../../../utils\";\r\n\r\nconst GridCustodian = ({ rows, loading, Flag }) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {loading ? (\r\n \r\n \r\n \r\n ) : (\r\n rows.map((d, i) => {\r\n const expected = new Date(d.TradeValueDate);\r\n const today = new Date();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n })\r\n )}\r\n \r\n
    #CustodySymbolSideExecutedTradeSettlementFailingStatus
    \r\n \r\n
    {d.TradeId}\r\n {d.TradeBasicAccountId}\r\n {\" - \"}\r\n {d.TradeBasicAccountName}\r\n {d.TradeAssetTicker}\r\n {d.TradeSide}\r\n \r\n {} @{\" \"}\r\n {}\r\n \r\n \r\n \r\n \r\n {d.TradeDaysDiferenceFailing} days{d.TradeStatus}
    \r\n );\r\n};\r\nexport default GridCustodian;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"logo\":\"style-module_logo_evDtq\",\"flag\":\"style-module_flag_3yz9g\",\"labelSide\":\"style-module_labelSide_3ApL9\",\"toolbar\":\"style-module_toolbar_2MRAk\",\"totalOrders\":\"style-module_totalOrders_3q5VY\",\"filterDropdown\":\"style-module_filterDropdown_14XfR\",\"dropdown\":\"style-module_dropdown_p-MT6\",\"export\":\"style-module_export_1Ug4J\",\"advanced\":\"style-module_advanced_1aIFK\",\"inputs\":\"style-module_inputs_2UlG3\"};","import React, { useReducer, Fragment, useEffect, useState } from \"react\";\r\nimport { CounterPartySimpleReducer, defaultState, initialize, validateForm } from \"./reducer\";\r\nimport {\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Container,\r\n Row,\r\n Col,\r\n Input,\r\n Button,\r\n Table,\r\n Label,\r\n UncontrolledDropdown,\r\n DropdownMenu,\r\n DropdownItem,\r\n DropdownToggle,\r\n} from \"reactstrap\";\r\nimport style from \"./CounterParty.module.scss\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport classnames from \"classnames\";\r\nimport { Field, Combobox } from \"../Order/Field/Field\";\r\nimport CircularProgress from \"../../CircularProgress/CircularProgress\";\r\nimport CustodianEntity from \"../CustodianEntity/CustodianEntity\";\r\nimport { CounterPartyStatus } from \"../../../utils/Helper\";\r\nimport { NumberFormatInput } from \"../../NumberFormatInput/NumberFormatInput\";\r\n\r\nconst CounterParty = ({ open, toggle, fetchs, ...props }) => {\r\n const [state, dispatch] = useReducer(CounterPartySimpleReducer, defaultState(), initialize(props));\r\n const {\r\n counterparty,\r\n buttons,\r\n clearinghouse,\r\n clearingHouses,\r\n editClearingHouse,\r\n editClearingHouseId,\r\n conf,\r\n errors,\r\n sentAuthorization,\r\n message,\r\n custodianEntity,\r\n custodianEntityId,\r\n isEditCustodianEntity,\r\n openCustodianEntity,\r\n } = state;\r\n const [validCounterParty, setValidCounterParty] = useState({\r\n show: false,\r\n message: \"\",\r\n });\r\n\r\n useEffect(() => {\r\n props.callApiProxy(\"GetCounterParty\", { counterPartyId: props.counterPartyId }).then((response) => {\r\n dispatch({ type: \"SET_COUNTER_PARTY\", response });\r\n });\r\n props.callApiProxy(\"GetCustodianEntity\", {}).then((response) => {\r\n const custodianEntities = response.custodianEntity.filter((c) => c.id > 0);\r\n dispatch({ type: \"GET_CUSTODIAN_ENTITY\", response: { custodianEntity: custodianEntities } });\r\n });\r\n }, []);\r\n\r\n const RechargeCustodianEntity = (id) => {\r\n props.callApiProxy(\"GetCustodianEntity\", {}).then((response) => {\r\n dispatch({ type: \"RECHARGE_CUSTODIAN_ENTITY\", response, id });\r\n });\r\n };\r\n\r\n const OpenCustodianEntity = () => {\r\n dispatch({ type: \"OPEN_CUSTODIAN_ENTITY\", ...props });\r\n };\r\n\r\n const EditCustodianEntity = () => {\r\n dispatch({ type: \"EDIT_CUSTODIAN_ENTITY\", ...props });\r\n };\r\n\r\n const CloseCustodianEntity = () => {\r\n dispatch({ type: \"CLOSE_CUSTODIAN_ENTITY\", ...props });\r\n };\r\n\r\n const update = () => {\r\n setValidCounterParty({\r\n ...validCounterParty,\r\n show: false,\r\n message: \"\",\r\n });\r\n props\r\n .callApiProxy(\"ValidCustodianEntity\", {\r\n custodianEntityId: custodianEntityId,\r\n })\r\n .then((response) => {\r\n if (response.result.Code == 200) {\r\n dispatch({ type: \"CONFIRM_COUNTER_PARTY\" });\r\n if (counterparty.title !== \"\" && counterparty.limit !== 0) {\r\n dispatch({ type: \"LOADING_COUNTER_PARTY\" });\r\n var body = {\r\n counterPartyIn: {\r\n ...counterparty,\r\n CustodianEntityId: custodianEntityId,\r\n },\r\n };\r\n props.callApiProxy(\"UpdateCounterParty\", body).then((response) => {\r\n dispatch({ type: \"SENT_AUTHORIZATION_UPDATE\", response });\r\n });\r\n }\r\n }\r\n });\r\n };\r\n\r\n const confirm = () => {\r\n setValidCounterParty({\r\n ...validCounterParty,\r\n show: false,\r\n message: \"\",\r\n });\r\n const errors = validateForm(state);\r\n if (errors != false) {\r\n dispatch({ type: \"SET_ERRORS_COUNTER_PARTY\", errors: errors });\r\n return;\r\n }\r\n props\r\n .callApiProxy(\"ValidCustodianEntity\", {\r\n custodianEntityId: custodianEntityId,\r\n })\r\n .then((response) => {\r\n if (response.result.Code == 200) {\r\n dispatch({ type: \"CONFIRM_COUNTER_PARTY\" });\r\n if (counterparty.title !== \"\" && counterparty.limit !== 0) {\r\n dispatch({ type: \"LOADING_COUNTER_PARTY\" });\r\n var body = {\r\n counterParty: {\r\n name: counterparty.CounterPartyName,\r\n email: counterparty.CounterPartyEmail,\r\n limit: counterparty.CounterPartyLimit,\r\n CustodianEntityId: custodianEntityId,\r\n clearingHouse: clearingHouses,\r\n },\r\n };\r\n props.callApiProxy(\"SetCounterParty\", body).then((response) => {\r\n dispatch({ type: \"SENT_AUTHORIZATION\", response });\r\n });\r\n }\r\n } else {\r\n setValidCounterParty({\r\n ...validCounterParty,\r\n show: true,\r\n message: response.result.Description,\r\n });\r\n }\r\n });\r\n };\r\n\r\n const onChange = (fields) => dispatch({ type: \"CHANGE_FIELDS\", fields });\r\n\r\n const updateFields = (fields) => dispatch({ type: \"UPDATE_FIELDS\", fields });\r\n\r\n const ResetClose = () => {\r\n dispatch({ type: \"RESET_CLOSE\", ...props });\r\n };\r\n\r\n const onChangeCounterParty = (fields) => dispatch({ type: \"UPDATE_COUNTERPARTY\", fields });\r\n\r\n const globalReadOnly = buttons.confirm.loading;\r\n return (\r\n
    \r\n \r\n \r\n {props.editCounterParty ? \"Edit Counter Party\" : \"New Counter Party\"}\r\n \r\n {props.countriesloading || props.clearinghousesloading ? (\r\n \r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n onChange({ CounterPartyName: e.target.value })}\r\n />\r\n \r\n \r\n {props.editCounterParty == false && (\r\n \r\n \r\n onChange({ CounterPartyEmail: e.target.value })}\r\n />\r\n \r\n \r\n )}\r\n \r\n {props.editCounterParty && (\r\n \r\n \r\n \r\n onChange({ CounterPartyEmail: e.target.value })}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n onChange({\r\n CounterPartyStatus: v,\r\n })\r\n }\r\n items={Object.values(CounterPartyStatus).map((key, index) => ({\r\n id: key.id,\r\n description: key.name,\r\n }))}\r\n />\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n {custodianEntity && custodianEntity.length > 0 ? (\r\n updateFields({ custodianEntityId: v })}\r\n items={Object.values(custodianEntity).map((key, index) => ({\r\n id: key.id,\r\n description: key.name,\r\n }))}\r\n />\r\n ) : (\r\n

    There are not Custodian Entities.

    \r\n )}\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n OpenCustodianEntity()}>New\r\n EditCustodianEntity()}>Edit\r\n \r\n \r\n \r\n \r\n \r\n onChange({ CounterPartyLimit: e.value })}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n )}\r\n {props.countriesloading || props.clearinghousesloading ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n {sentAuthorization ? (\r\n
    \r\n
    {message}
    \r\n \r\n
    \r\n ) : (\r\n
    \r\n {validCounterParty.show ? (\r\n
    \r\n
    {validCounterParty.message}
    \r\n \r\n confirm()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {props.editCounterParty ? \"Update\" : \"Confirm\"}\r\n \r\n
    \r\n ) : (\r\n
    \r\n \r\n {props.editCounterParty ? (\r\n update()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {\"Update\"}\r\n \r\n ) : (\r\n confirm()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {\"Confirm\"}\r\n \r\n )}\r\n
    \r\n )}\r\n
    \r\n )}\r\n
    \r\n )}\r\n
    \r\n {openCustodianEntity ? (\r\n \r\n ) : (\r\n
    \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nconst EmptyClearingHouses = () => (\r\n \r\n \r\n
    No Clearing Houses
    \r\n \r\n \r\n);\r\n\r\nexport function validations(alert) {\r\n return {\r\n CounterPartyName: { empty: true },\r\n CounterPartyEmail: { empty: true },\r\n CounterPartyLimit: { empty: true },\r\n CustodianEntityId: { empty: true, autosuggestId: \"CustodianEntityId\" },\r\n };\r\n}\r\n\r\nexport default CounterParty;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"CounterParty-module_modal_2Ho2D\",\"body\":\"CounterParty-module_body_1F7bm\",\"table\":\"CounterParty-module_table_qKouk\",\"error\":\"CounterParty-module_error_xN2Gv\",\"empty\":\"CounterParty-module_empty_3fMKK\",\"btnAdd\":\"CounterParty-module_btnAdd_2NZ31\",\"title\":\"CounterParty-module_title_1bm8B\",\"backdrop\":\"CounterParty-module_backdrop_1tWbI\",\"edit\":\"CounterParty-module_edit_KJF9R\",\"actions\":\"CounterParty-module_actions_1x9gL\",\"errorText\":\"CounterParty-module_errorText_2oQLY\",\"AlignRight\":\"CounterParty-module_AlignRight_2SMFh\",\"FixPaddingCol\":\"CounterParty-module_FixPaddingCol_1zDnL\",\"sentCounterParty\":\"CounterParty-module_sentCounterParty_147Mw\"};","import {mergeDeep} from \"../../../utils/Helper\";\r\nimport {validations} from \"./CounterParty\";\r\n\r\nexport const defaultState = () => ({\r\n custodianEntityId: 0,\r\n counterparty: {\r\n CounterPartyId: 0,\r\n CounterPartyName: \"\",\r\n CounterPartyLimit: 0,\r\n CounterPartyStatus: \"\",\r\n CounterPartyEmail: \"\",\r\n CustodianEntityId: 0,\r\n custodianEntity: []\r\n },\r\n fields: {\r\n readonly: {},\r\n errors: {}\r\n },\r\n buttons: {\r\n confirm: {\r\n loading: false\r\n }\r\n },\r\n clearinghouse: {\r\n code: 0,\r\n name: \"\",\r\n clearinghouse: 0,\r\n settlementins: \"\",\r\n default: false\r\n },\r\n clearingHouses: [],\r\n editClearingHouse: false,\r\n editClearingHouseId: false,\r\n saveEditClearingHouseId: 0,\r\n saveEditClearingHouseCode: 0,\r\n conf: false,\r\n errors: {\r\n title: false,\r\n limit: false,\r\n code: false,\r\n name: false,\r\n clearinghouse: false,\r\n settlementins: false\r\n },\r\n sentAuthorization: false,\r\n message: \"\",\r\n entities: []\r\n});\r\n\r\nexport const CounterPartySimpleReducer = (state, action) => {\r\n switch (action.type) {\r\n case \"CHANGE_FIELDS\":\r\n return processChangeFields(state, action.fields);\r\n case \"UPDATE_FIELDS\":\r\n return processFields(state, action.fields);\r\n case \"CLEARING_HOUSES_FIELDS\":\r\n return processChangeClearingHousesFields(state, action.fields);\r\n case \"ADD_CLEARING_HOUSE\":\r\n return AddClearingHouses(state, action);\r\n case \"EDIT_CLEARING_HOUSE\":\r\n return editClearingHouse(state, action);\r\n case \"CLOSE_CLEARING_HOUSE\":\r\n return closeClearingHouse(state);\r\n case \"DEFAULT_CLEARING_HOUSE\":\r\n return DefaultClearingHouses(state, action.fields);\r\n case \"EDIT_CLEARING_HOUSE_ID\":\r\n return EditClearingHouseId(state, action);\r\n case \"UPDATE_BUTTONS\":\r\n return processUpdateButtons(state, action.buttons);\r\n case \"FORCE_UPDATE_VALIDATION\":\r\n return forceUpdateValidation(state, action);\r\n case \"SAVE_EDIT_CLEARING_HOUSE\":\r\n return SaveEditClearingHouse(state, action);\r\n case \"CONFIRM_COUNTER_PARTY\":\r\n return ConfirmCounterParty(state);\r\n case \"SENT_AUTHORIZATION\":\r\n return SentAuthorization(state, action);\r\n case \"RESET_CLOSE\":\r\n return ResetClose(state, action);\r\n case \"LOADING_COUNTER_PARTY\":\r\n return LoadingCounterParty(state, action);\r\n case \"GET_CUSTODIAN_ENTITY\":\r\n return GetCustodianEntity(state, action);\r\n case \"OPEN_CUSTODIAN_ENTITY\":\r\n return OpenCustodianEntity(state, action);\r\n case \"EDIT_CUSTODIAN_ENTITY\":\r\n return EditCustodianEntity(state, action);\r\n case \"CLOSE_CUSTODIAN_ENTITY\":\r\n return CloseCustodianEntity(state, action);\r\n case \"RECHARGE_CUSTODIAN_ENTITY\":\r\n return RechargeCustodianEntity(state, action);\r\n case \"CUSTODIAN_ENTITY_ID\":\r\n return DefineCustodianEntityId(state, action);\r\n case \"SET_COUNTER_PARTY\":\r\n return SetCounterParty(state, action);\r\n case \"SENT_AUTHORIZATION_UPDATE\":\r\n return SentAuthorizationUpdate(state, action);\r\n case \"SET_ERRORS_COUNTER_PARTY\":\r\n return SetErrorsCounterParty(state, action);\r\n default:\r\n return state;\r\n }\r\n};\r\n\r\nexport function LoadingCounterParty(state, {errors}) {\r\n return mergeDeep(\r\n {...state},\r\n {\r\n buttons: {\r\n confirm: {\r\n loading: true\r\n }\r\n }\r\n }\r\n );\r\n}\r\n\r\nfunction processFields(state, fields) {\r\n return mergeDeep(\r\n {...state},\r\n {\r\n ...fields\r\n }\r\n );\r\n}\r\n\r\nfunction SetErrorsCounterParty(state, fields) {\r\n return {...state, errors: fields.errors}\r\n}\r\n\r\nfunction processChangeFields(state, fields) {\r\n const errors = Object.keys(fields).reduce((f, name) => {\r\n f[name] = undefined;\r\n return f;\r\n }, {});\r\n\r\n return mergeDeep(\r\n {...state},\r\n {\r\n counterparty: {\r\n ...fields\r\n },\r\n fields: {\r\n errors\r\n }\r\n }\r\n );\r\n}\r\n\r\nfunction DefaultClearingHouses(state, fields) {\r\n var bool = false;\r\n if (fields == \"Yes\") {\r\n bool = true;\r\n }\r\n return mergeDeep(\r\n {...state},\r\n {\r\n clearinghouse: {\r\n default: bool\r\n }\r\n }\r\n );\r\n}\r\n\r\nfunction EditClearingHouseId(state, c) {\r\n var clear = {\r\n code: 0,\r\n name: \"\",\r\n clearinghouse: 0,\r\n settlementins: \"\",\r\n default: false\r\n };\r\n for (var i = 0; i < state.clearingHouses.length; i++) {\r\n if (\r\n state.clearingHouses[i].clearingHouseId == c.c.clearingHouseId &&\r\n state.clearingHouses[i].clearingHouseCode == c.c.clearingHouseCode\r\n ) {\r\n clear = {\r\n code: state.clearingHouses[i].clearingHouseCode,\r\n name: state.clearingHouses[i].name,\r\n clearinghouse: state.clearingHouses[i].clearingHouseId,\r\n settlementins:\r\n state.clearingHouses[i].clearingHouseSettlementInstructions,\r\n default: state.clearingHouses[i].clearingHouseDefault\r\n };\r\n }\r\n }\r\n return mergeDeep(\r\n {...state},\r\n {\r\n editClearingHouseId: true,\r\n clearinghouse: clear,\r\n saveEditClearingHouseId: c.c.clearingHouseId,\r\n saveEditClearingHouseCode: c.c.clearingHouseCode\r\n }\r\n );\r\n}\r\n\r\nfunction processChangeClearingHousesFields(state, fields) {\r\n const errors = Object.keys(fields).reduce((f, name) => {\r\n f[name] = undefined;\r\n return f;\r\n }, {});\r\n\r\n return mergeDeep(\r\n {...state},\r\n {\r\n clearinghouse: {\r\n ...fields\r\n },\r\n fields: {\r\n errors\r\n }\r\n }\r\n );\r\n}\r\n\r\nexport function validateForm(state) {\r\n const {counterparty, fields, clearinghouse} = state;\r\n\r\n const errors = {};\r\n\r\n Object.entries(validations(counterparty)).forEach(entry => {\r\n const [name, value] = entry;\r\n\r\n if (!fields.readonly[name]) {\r\n if (value.empty) {\r\n if (counterparty[name] == undefined || counterparty[name] === \"\") {\r\n errors[name] = \"Required field\";\r\n } else if (\r\n value.autosuggestId &&\r\n (counterparty[value.autosuggestId] == undefined || counterparty[value.autosuggestId] == 0)\r\n ) {\r\n errors[name] = \"Must select a value from list\";\r\n }\r\n }\r\n }\r\n });\r\n\r\n // has Errors only add errors to state\r\n if (Object.keys(errors).length !== 0) {\r\n return errors;\r\n }\r\n\r\n return false;\r\n}\r\n\r\nexport function forceUpdateValidation(state, {errors}) {\r\n return {\r\n ...state,\r\n fields: {\r\n ...state.fields,\r\n errors\r\n }\r\n };\r\n}\r\n\r\nexport function processUpdateButtons(state, buttons) {\r\n return mergeDeep(\r\n {...state},\r\n {\r\n buttons\r\n }\r\n );\r\n}\r\n\r\nexport const initialize = props => {\r\n return initialState => {\r\n return {\r\n counterparty: {\r\n CounterPartyId: 0,\r\n CounterPartyName: \"\",\r\n CounterPartyLimit: 0,\r\n CounterPartyStatus: \"\",\r\n CounterPartyEmail: \"\",\r\n CustodianEntityId: 0\r\n },\r\n fields: {\r\n readonly: {},\r\n errors: {}\r\n },\r\n buttons: {\r\n confirm: {\r\n loading: false\r\n }\r\n },\r\n clearinghouse: {\r\n code: 0,\r\n name: \"\",\r\n clearinghouse: 0,\r\n settlementins: \"\",\r\n default: false\r\n },\r\n clearingHouses: [],\r\n editClearingHouse: false,\r\n editClearingHouseId: false,\r\n saveEditClearingHouseId: 0,\r\n saveEditClearingHouseCode: 0,\r\n conf: false,\r\n errors: {\r\n title: false,\r\n limit: false,\r\n code: false,\r\n name: false,\r\n clearinghouse: false,\r\n settlementins: false\r\n },\r\n sentAuthorization: false,\r\n message: \"\",\r\n custodianEntity: [],\r\n custodianEntityId: 0,\r\n isEditCustodianEntity: false,\r\n openCustodianEntity: false\r\n };\r\n };\r\n};\r\n\r\nexport function AddClearingHouses(state, action) {\r\n const {\r\n counterparty,\r\n fields,\r\n clearinghouse,\r\n clearingHouses,\r\n editClearingHouse\r\n } = state;\r\n var name = \"\";\r\n var totalerror = true;\r\n var edit = false;\r\n var error = {\r\n title: false,\r\n limit: false,\r\n code: false,\r\n name: false,\r\n clearinghouse: false,\r\n settlementins: false\r\n };\r\n if (clearinghouse.code == 0) {\r\n error.code = true;\r\n edit = true;\r\n totalerror = false;\r\n }\r\n if (clearinghouse.settlementins == \"\") {\r\n (error.settlementins = true), (edit = true), (totalerror = false);\r\n }\r\n if (edit) {\r\n return mergeDeep(\r\n {...state},\r\n {\r\n editClearingHouse: edit,\r\n editClearingHouseId: edit,\r\n errors: error\r\n }\r\n );\r\n } else {\r\n for (var j = 0; j < action.clearinghouses.length; j++) {\r\n if (action.clearinghouses[j].id == clearinghouse.clearinghouse) {\r\n name = action.clearinghouses[j].name;\r\n }\r\n }\r\n return mergeDeep(\r\n {...state},\r\n {\r\n clearingHouses: [\r\n ...state.clearingHouses,\r\n {\r\n clearingHouseId: clearinghouse.clearinghouse,\r\n clearingHouseCode: clearinghouse.code,\r\n clearingHouseSettlementInstructions: clearinghouse.settlementins,\r\n clearingHouseDefault: clearinghouse.default,\r\n name: name\r\n }\r\n ],\r\n editClearingHouse: edit,\r\n editClearingHouseId: edit,\r\n errors: error\r\n }\r\n );\r\n }\r\n}\r\n\r\nexport function SaveEditClearingHouse(state, action) {\r\n const {\r\n counterparty,\r\n fields,\r\n clearinghouse,\r\n saveEditClearingHouseId,\r\n saveEditClearingHouseCode,\r\n errors\r\n } = state;\r\n var totalerror = true;\r\n var edit = false;\r\n var error = {\r\n title: false,\r\n limit: false,\r\n code: false,\r\n name: false,\r\n clearinghouse: false,\r\n settlementins: false\r\n };\r\n if (clearinghouse.code == 0) {\r\n error.code = true;\r\n edit = true;\r\n totalerror = false;\r\n }\r\n if (clearinghouse.settlementins == \"\") {\r\n (error.settlementins = true), (edit = true), (totalerror = false);\r\n }\r\n var name = \"\";\r\n var clearing = state.clearingHouses;\r\n for (var i = 0; i < clearing.length; i++) {\r\n if (\r\n clearing[i].clearingHouseId == saveEditClearingHouseId &&\r\n clearing[i].clearingHouseCode == saveEditClearingHouseCode\r\n ) {\r\n for (var j = 0; j < action.clearinghouses.length; j++) {\r\n if (action.clearinghouses[j].id == clearinghouse.clearinghouse) {\r\n name = action.clearinghouses[j].name;\r\n }\r\n }\r\n clearing[i] = {\r\n clearingHouseCode: clearinghouse.code,\r\n name: name,\r\n clearingHouseId: clearinghouse.clearinghouse,\r\n clearingHouseSettlementInstructions: clearinghouse.settlementins,\r\n clearingHouseDefault: clearinghouse.default\r\n };\r\n }\r\n }\r\n return mergeDeep(\r\n {...state},\r\n {\r\n errors: error,\r\n clearingHouses: clearing,\r\n editClearingHouse: edit,\r\n editClearingHouseId: edit,\r\n saveEditClearingHouseId: 0,\r\n saveEditClearingHouseCode: 0,\r\n conf: totalerror\r\n }\r\n );\r\n}\r\n\r\nexport function ConfirmCounterParty(state) {\r\n const {conf, counterparty, errors} = state;\r\n var totalerror = true;\r\n var error = {\r\n title: false,\r\n limit: false,\r\n code: false,\r\n name: false,\r\n clearinghouse: false,\r\n settlementins: false\r\n };\r\n if (counterparty.limit == 0) {\r\n error.limit = true;\r\n totalerror = false;\r\n }\r\n if (counterparty.title == \"\") {\r\n (error.title = true), (totalerror = false);\r\n }\r\n var button = {\r\n confirm: {\r\n loading: totalerror\r\n }\r\n };\r\n return mergeDeep(\r\n {...state},\r\n {\r\n errors: error,\r\n conf: totalerror\r\n // buttons:button\r\n }\r\n );\r\n}\r\n\r\nexport function editClearingHouse(state, props) {\r\n const {editClearingHouse, counterparty} = state;\r\n return mergeDeep(\r\n {...state},\r\n {\r\n editClearingHouse: true,\r\n editClearingHouseId: false,\r\n clearinghouse: {\r\n code: 0,\r\n name: props.clearinghouses[0].name,\r\n clearinghouse: props.clearinghouses[0].id,\r\n settlementins: \"\",\r\n default: false\r\n }\r\n }\r\n );\r\n}\r\n\r\nexport function SentAuthorization(state, response) {\r\n const {editClearingHouse, counterparty} = state;\r\n var message = \"\";\r\n if (response.response.code == 200) {\r\n message = \"Counter Party sent for authorization\";\r\n } else {\r\n message = response.response.message;\r\n }\r\n var button = {\r\n confirm: {\r\n loading: false\r\n }\r\n };\r\n return mergeDeep(\r\n {...state},\r\n {\r\n sentAuthorization: true,\r\n buttons: button,\r\n message: message,\r\n buttons: {\r\n confirm: {\r\n loading: false\r\n }\r\n }\r\n }\r\n );\r\n}\r\n\r\nexport function SentAuthorizationUpdate(state, response) {\r\n const {editClearingHouse, counterparty} = state;\r\n var message = \"\";\r\n if (response.response.result.Code == 200) {\r\n message = \"Counterparty successfully updated\";\r\n } else {\r\n message = response.response.result.Decription;\r\n }\r\n var button = {\r\n confirm: {\r\n loading: false\r\n }\r\n };\r\n return mergeDeep(\r\n {...state},\r\n {\r\n sentAuthorization: true,\r\n buttons: button,\r\n message: message,\r\n buttons: {\r\n confirm: {\r\n loading: false\r\n }\r\n }\r\n }\r\n );\r\n}\r\n\r\nexport function ResetClose(state, action) {\r\n action.onClickClose();\r\n return mergeDeep(\r\n {...state},\r\n {\r\n counterparty: {\r\n CounterPartyId: 0,\r\n CounterPartyName: \"\",\r\n CounterPartyLimit: 0,\r\n CounterPartyStatus: \"\",\r\n CounterPartyEmail: \"\",\r\n CustodianEntityId: 0\r\n },\r\n fields: {\r\n readonly: {},\r\n errors: {}\r\n },\r\n buttons: {\r\n confirm: {\r\n loading: false\r\n }\r\n },\r\n clearinghouse: {\r\n code: 0,\r\n name: \"\",\r\n clearinghouse: 0,\r\n settlementins: \"\",\r\n default: false\r\n },\r\n clearingHouses: [],\r\n custodianEntity: [],\r\n editClearingHouse: false,\r\n editClearingHouseId: false,\r\n saveEditClearingHouseId: 0,\r\n saveEditClearingHouseCode: 0,\r\n conf: false,\r\n errors: {\r\n title: false,\r\n limit: false,\r\n code: false,\r\n name: false,\r\n clearinghouse: false,\r\n settlementins: false\r\n },\r\n sentAuthorization: false,\r\n message: \"\"\r\n }\r\n );\r\n}\r\n\r\nexport function closeClearingHouse(state) {\r\n const {editClearingHouse} = state;\r\n return mergeDeep(\r\n {...state},\r\n {\r\n editClearingHouse: false,\r\n editClearingHouseId: false,\r\n clearinghouse: {\r\n code: 0,\r\n name: \"\",\r\n clearinghouse: 0,\r\n settlementins: \"\",\r\n default: false\r\n }\r\n }\r\n );\r\n}\r\n\r\nexport function GetCustodianEntity(state, action) {\r\n var id = 0;\r\n if (state.custodianEntityId == 0) {\r\n if (action.response.custodianEntity.length > 0) {\r\n id = action.response.custodianEntity[0].id;\r\n }\r\n } else {\r\n id = state.custodianEntityId;\r\n }\r\n return mergeDeep(\r\n {...state},\r\n {\r\n counterparty: {...state.counterparty, CustodianEntityId: id},\r\n custodianEntity: action.response.custodianEntity,\r\n custodianEntityId: id\r\n }\r\n );\r\n}\r\n\r\nexport function SetCounterParty(state, action) {\r\n return mergeDeep(\r\n {...state},\r\n {\r\n counterparty: action.response.counterPartyOut,\r\n custodianEntityId: state.custodianEntityId == 0 ? action.response.counterPartyOut.CustodianEntityId : state.custodianEntityId\r\n }\r\n );\r\n}\r\n\r\nexport function OpenCustodianEntity(state, action) {\r\n return mergeDeep(\r\n {...state},\r\n {\r\n isEditCustodianEntity: false,\r\n openCustodianEntity: true\r\n }\r\n );\r\n}\r\n\r\nfunction EditCustodianEntity(state, action) {\r\n return mergeDeep(\r\n {...state},\r\n {\r\n isEditCustodianEntity: true,\r\n openCustodianEntity: true\r\n }\r\n );\r\n}\r\n\r\nexport function CloseCustodianEntity(state) {\r\n return mergeDeep(\r\n {...state},\r\n {\r\n openCustodianEntity: false\r\n }\r\n );\r\n}\r\n\r\nexport function RechargeCustodianEntity(state, action) {\r\n return mergeDeep(\r\n {...state},\r\n {\r\n custodianEntity: action.response.custodianEntity,\r\n custodianEntityId: action.id\r\n }\r\n );\r\n}\r\n\r\nexport function DefineCustodianEntityId(state, action) {\r\n return mergeDeep(\r\n {...state},\r\n {\r\n custodianEntityId: action.id\r\n }\r\n );\r\n}\r\n","import React, { Component, Fragment, useEffect, useState } from \"react\"\r\nimport {\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Button,\r\n Alert,\r\n Input,\r\n Row,\r\n Col,\r\n Table,\r\n CustomInput,\r\n} from \"reactstrap\"\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\"\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\"\r\nimport { NumberFormatInput } from \"../../NumberFormatInput/NumberFormatInput\"\r\nimport classnames from \"classnames\"\r\nimport { OrderStatus, OrderAction, CommonsHelper, getBaseAndPriceCurrencies } from \"../../../utils\"\r\nimport { OrderPriceType } from \"../../../utils/Order/Order\"\r\nimport CircularProgress from \"../../CircularProgress/CircularProgress\"\r\nimport OrderInlineDetail from \"../../Order/InlineDetail\"\r\nimport { Field, Combobox, Switch } from \"../Order/Field/Field\"\r\nimport { showToast } from \"../../../utils/Helper\"\r\nimport { CouponPayments } from \"../../Asset/Tabs/Contracts/Contracts\"\r\nimport ItemRow from \"./ItemRow\"\r\nimport style from \"./Cross.module.scss\"\r\nimport { setLoading } from \"../../Quotebar/_state\"\r\nimport { useDebounce } from \"../../../utils/hooks\"\r\nimport { TradingRoutes } from \"../Trading/FormFields\"\r\nconst { localDateToGMT } = CommonsHelper\r\n\r\nconst Cross = ({ onToggle, open, order, orders, services }) => {\r\n const [accounts, setAccounts] = useState(null)\r\n const [items, setItems] = useState({\r\n a1: { enabled: false, error_account: \"\" },\r\n })\r\n const [confirm, setConfirm] = useState({\r\n enabled: false,\r\n loading: false,\r\n })\r\n const [totals, setTotals] = useState({\r\n crossingQuantity: null,\r\n crossingAverage: null,\r\n buySide: null,\r\n sellSide: null,\r\n Fees: undefined,\r\n })\r\n const [fx, setFx] = useState(1)\r\n const [manualFX, setManualFX] = useState(false)\r\n const [valueDate, setValueDate] = useState(new Date().toDatetimeLocal())\r\n const [type, setType] = useState(\"Internal\")\r\n const [date, setDate] = useState(new Date().toDatetimeLocal())\r\n const [error, setError] = useState(null)\r\n const [settlementCurrencies, setSettlementCurrencies] = useState([])\r\n const [maxDecimals, setMaxDecimals] = useState(4)\r\n const [parValue, setParValue] = useState(1)\r\n const [contractdata, setContractdata] = useState(false)\r\n const [closingLeg, setClosingLeg] = useState(0)\r\n const [allowSelection, setAllowSelection] = useState(true)\r\n const [calculatingLegs, setCalculatingLegs] = useState(false)\r\n const [errors, setErrors] = useState({})\r\n const [showFees, setShowFees] = useState(false)\r\n const [sideStr, setSideStr] = useState()\r\n const [accountsSelected, setAccountsSelected] = useState([])\r\n const [isFX, setIsFX] = useState(false)\r\n const [baseCurrency, setBaseCurrency] = useState()\r\n const [priceCurrency, setPriceCurrency] = useState()\r\n const [hasDifferentCurrencies, setHasDifferentCurrencies] = useState()\r\n const [loadingItem, setLoadingItem] = useState({})\r\n const debItems = useDebounce(items, 300)\r\n const [itemsFees, setItemsFees] = useState({})\r\n const [first, setFirst] = useState(true)\r\n const [tradingRoutes, setTradingRoutes] = useState([])\r\n const [tradingRouteSelected, setTradingRouteSelected] = useState({})\r\n const [tradersNames, setTradersNames] = useState([])\r\n const [selectedTrader, setSelectedTrader] = useState()\r\n const [showTraderName, setshowTraderName] = useState(true)\r\n const [paymentToBorrower, setPaymentToBorrower] = useState (false)\r\n\r\n const handleSelectedTrader = (name) => {\r\n setSelectedTrader(name)\r\n }\r\n\r\n useEffect(() => {\r\n if (order) {\r\n order.OrderSide.toLowerCase()\r\n setTotals((prev) => ({\r\n ...prev,\r\n [`${sideStr}Side`]: +order.stats.pending,\r\n }))\r\n\r\n setIsFX(order.AssetClassForm == \"Forex\")\r\n\r\n const newHasDifferentCurrencies =\r\n order.OrderCurrencySymbol !== \"\" &&\r\n order.OrderSettlementCurrencySymbol != \"\" &&\r\n order.OrderCurrencySymbol != order.OrderSettlementCurrencySymbol\r\n\r\n setHasDifferentCurrencies(newHasDifferentCurrencies)\r\n }\r\n }, [order])\r\n\r\n useEffect(() => {\r\n if (order) {\r\n const currencies = getBaseAndPriceCurrencies(\r\n settlementCurrencies,\r\n order.OrderCurrencySymbol,\r\n order.OrderSettlementCurrencySymbol\r\n )\r\n\r\n setBaseCurrency(currencies.baseCurrency)\r\n setPriceCurrency(currencies.priceCurrency)\r\n }\r\n }, [order, settlementCurrencies])\r\n\r\n useEffect(() => {\r\n if (orders) {\r\n const newFilteredOrders = filterOrders(orders).length > 0 || (items[\"a1\"] && items[\"a1\"].enabled)\r\n setAccountsSelected(() => newFilteredOrders)\r\n }\r\n }, [orders, items])\r\n\r\n useEffect(() => {\r\n if (tradingRouteSelected.TradingRouteId) {\r\n getRepoDefaultPaymentToBorrower(tradingRouteSelected.TradingRouteId);\r\n }\r\n }, [tradingRouteSelected])\r\n\r\n useEffect(() => {\r\n getTradingRoutes()\r\n const trader_name_input =\r\n window.___APP_CONFIG___ && window.___APP_CONFIG___.TRADER_NAME_INPUT\r\n ? window.___APP_CONFIG___.TRADER_NAME_INPUT\r\n : false\r\n setshowTraderName((prevState) => ({ ...prevState, showTraderName: trader_name_input }))\r\n\r\n if (trader_name_input) {\r\n getAuthorizedTraders()\r\n }\r\n }, [])\r\n\r\n useEffect(() => {\r\n const newTotals = calcTotals(debItems)\r\n services\r\n .fetchGetCalculator({\r\n assetId: order.AssetId,\r\n isSecurity: true,\r\n quantity: newTotals.crossingQuantity || 1,\r\n price: newTotals.crossingAverage || 1,\r\n date: date,\r\n })\r\n .then((res2) => {\r\n const ExecutionTotal2 = res2.calculator.total\r\n const payload = {\r\n crossType: \"\",\r\n execution: {\r\n ExecutionQuantity: newTotals.crossingQuantity || 0,\r\n ExecutionPrice: contractdata.marketValue || 0,\r\n ExecutionValueDate: valueDate,\r\n ExecutionTotal: ExecutionTotal2,\r\n SettlementCurrencyId: order.OrderSettlementCurrencyId,\r\n TradingRouteId: tradingRouteSelected.TradingRouteId,\r\n },\r\n }\r\n\r\n if (order.AssetClassForm === \"Repo\" && contractdata)\r\n payload.execution.contractdata = { ...contractdata, closing: closingLeg }\r\n services\r\n .getExecutionFees(payload)\r\n .then(({ response }) => {\r\n newTotals.Fees = response.execution.Fees\r\n newTotals.ExecutionTotal = ExecutionTotal2\r\n setTotals(() => newTotals)\r\n setError(() => undefined)\r\n })\r\n .catch((err) => {\r\n console.error(err)\r\n showToast(\"Error fetching fees\")\r\n })\r\n })\r\n .catch((err) => {\r\n console.error(err)\r\n showToast(\"Error fetching fees\")\r\n })\r\n\r\n const promises = Object.entries(debItems).map((entry) => {\r\n const [name, value] = entry\r\n\r\n return services\r\n .fetchGetCalculator({\r\n assetId: order.AssetId,\r\n isSecurity: true,\r\n quantity: value.quantity || 1,\r\n price: value.price || 1,\r\n date: date,\r\n })\r\n .then((res) => {\r\n const ExecutionTotal = res.calculator.total\r\n const payload = {\r\n crossType: \"\",\r\n execution: {\r\n ExecutionQuantity: value.quantity || 0,\r\n ExecutionPrice: value.price || 0,\r\n ExecutionValueDate: date,\r\n ExecutionTotal: ExecutionTotal,\r\n SettlementCurrencyId: order.OrderSettlementCurrencyId,\r\n TradingRouteId: tradingRouteSelected.TradingRouteId,\r\n },\r\n }\r\n\r\n if (order.AssetClassForm === \"Repo\" && contractdata)\r\n payload.execution.contractdata = { ...contractdata, closing: closingLeg }\r\n return services\r\n .getExecutionFees(payload)\r\n .then(({ response }) => {\r\n value.Fees = response.execution.Fees\r\n value.ExecutionTotal = ExecutionTotal\r\n\r\n return {\r\n name,\r\n value,\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err)\r\n showToast(\"Error fetching fees\")\r\n })\r\n })\r\n .catch((err) => {\r\n console.error(err)\r\n showToast(\"Error fetching fees\")\r\n })\r\n })\r\n\r\n Promise.all(promises).then((itemFee) => {\r\n setItemsFees((prev) => ({\r\n ...prev,\r\n [itemFee[0].name]: {\r\n Fees: itemFee[0].value.Fees,\r\n ExecutionTotal: itemFee[0].value.ExecutionTotal,\r\n },\r\n }))\r\n })\r\n }, [debItems])\r\n\r\n useEffect(() => {\r\n getAccounts()\r\n getSettlementCurrencies(true, true)\r\n }, [])\r\n\r\n useEffect(() => {\r\n Object.keys(items).forEach((key) => {\r\n const currentItem = items[key]\r\n if (currentItem.enabled) {\r\n services\r\n .fetchGetCalculator({\r\n assetId: order.AssetId,\r\n isSecurity: true,\r\n quantity: currentItem.quantity || 1,\r\n price: currentItem.price || 1,\r\n date: date,\r\n })\r\n .then((res) => {\r\n const ExecutionTotal = res.calculator.total\r\n const payload = {\r\n crossType: \"\",\r\n execution: {\r\n ExecutionQuantity: currentItem.quantity || 0,\r\n ExecutionPrice: currentItem.price || 0,\r\n ExecutionValueDate: date,\r\n ExecutionTotal: ExecutionTotal,\r\n SettlementCurrencyId: order.OrderSettlementCurrencyId,\r\n TradingRouteId: tradingRouteSelected.TradingRouteId,\r\n },\r\n }\r\n\r\n if (order.AssetClassForm === \"Repo\" && contractdata)\r\n payload.execution.contractdata = { ...contractdata, closing: closingLeg }\r\n\r\n services\r\n .getExecutionFees(payload)\r\n .then(({ response }) => {\r\n currentItem.Fees = response.execution.Fees\r\n currentItem.ExecutionTotal = ExecutionTotal\r\n\r\n setItems((prev) => ({\r\n ...prev,\r\n [key]: currentItem,\r\n }))\r\n })\r\n .catch((err) => {\r\n console.error(err)\r\n showToast(\"Error fetching fees\")\r\n })\r\n })\r\n .catch((err) => {\r\n console.error(err)\r\n showToast(\"Error fetching fees\")\r\n })\r\n }\r\n })\r\n }, [date, type, order, tradingRouteSelected])\r\n\r\n useEffect(() => {\r\n getSettlementCurrencies(true, !manualFX)\r\n }, [manualFX])\r\n\r\n useEffect(() => {\r\n if (order.AssetClassForm === \"Repo\") {\r\n handleGetLegs()\r\n }\r\n }, [\r\n contractdata.price,\r\n contractdata.appraisal,\r\n contractdata.quantity,\r\n contractdata.marketValue,\r\n contractdata.CollateralQuantity,\r\n contractdata.maturity,\r\n contractdata.rate,\r\n contractdata.paymenttoborrower,\r\n allowSelection,\r\n ])\r\n\r\n useEffect(() => {\r\n if (order.AssetClassForm === \"Repo\") {\r\n if (contractdata && !calculatingLegs) {\r\n const newTotals = calcTotals(debItems)\r\n services\r\n .fetchGetCalculator({\r\n assetId: order.AssetId,\r\n isSecurity: true,\r\n quantity: newTotals.crossingQuantity || 1,\r\n price: newTotals.crossingAverage || 1,\r\n date: date,\r\n })\r\n .then((res) => {\r\n const ExecutionTotal2 = res.calculator.total\r\n const payload = {\r\n crossType: \"\",\r\n execution: {\r\n ExecutionQuantity: newTotals.crossingQuantity || 0,\r\n ExecutionPrice: contractdata.marketValue || 0,\r\n ExecutionValueDate: valueDate,\r\n ExecutionTotal: ExecutionTotal2,\r\n SettlementCurrencyId: order.OrderSettlementCurrencyId,\r\n TradingRouteId: tradingRouteSelected.TradingRouteId,\r\n },\r\n }\r\n\r\n if (order.AssetClassForm === \"Repo\" && contractdata)\r\n payload.execution.contractdata = { ...contractdata, closing: closingLeg }\r\n services\r\n .getExecutionFees(payload)\r\n .then(({ response }) => {\r\n newTotals.Fees = response.execution.Fees\r\n newTotals.ExecutionTotal = ExecutionTotal2\r\n setTotals(() => newTotals)\r\n setError(() => undefined)\r\n })\r\n .catch((err) => {\r\n console.error(err)\r\n showToast(\"Error fetching fees\")\r\n })\r\n })\r\n .catch((err) => {\r\n console.error(err)\r\n showToast(\"Error fetching fees\")\r\n })\r\n }\r\n }\r\n }, [contractdata, closingLeg])\r\n\r\n useEffect(() => {\r\n if (order.AssetClassForm === \"Repo\") {\r\n if (contractdata && !calculatingLegs) {\r\n const newTotals = calcTotals(debItems)\r\n services\r\n .fetchGetCalculator({\r\n assetId: order.AssetId,\r\n isSecurity: true,\r\n quantity: newTotals.crossingQuantity || 1,\r\n price: newTotals.crossingAverage || 1,\r\n date: date,\r\n })\r\n .then((res) => {\r\n const ExecutionTotal2 = res.calculator.total\r\n const payload = {\r\n crossType: \"\",\r\n execution: {\r\n ExecutionQuantity: newTotals.crossingQuantity || 0,\r\n ExecutionPrice: newTotals.crossingAverage || 0,\r\n ExecutionValueDate: date,\r\n ExecutionTotal: ExecutionTotal2,\r\n SettlementCurrencyId: order.OrderSettlementCurrencyId,\r\n TradingRouteId: tradingRouteSelected.TradingRouteId,\r\n },\r\n }\r\n\r\n if (order.AssetClassForm === \"Repo\" && contractdata)\r\n payload.execution.contractdata = { ...contractdata, closing: closingLeg }\r\n services\r\n .getExecutionFees(payload)\r\n .then(({ response }) => {\r\n newTotals.Fees = response.execution.Fees\r\n newTotals.ExecutionTotal = ExecutionTotal2\r\n setTotals(() => newTotals)\r\n setError(() => undefined)\r\n })\r\n .catch((err) => {\r\n console.error(err)\r\n showToast(\"Error fetching fees\")\r\n })\r\n })\r\n .catch((err) => {\r\n console.error(err)\r\n showToast(\"Error fetching fees\")\r\n })\r\n }\r\n }\r\n }, [contractdata, closingLeg])\r\n\r\n const getAuthorizedTraders = () => {\r\n const { getAuthorizedTraders } = services\r\n if (getAuthorizedTraders) {\r\n getAuthorizedTraders().then((r) => {\r\n if (r.response) {\r\n setTradersNames(r.response.authUsers)\r\n }\r\n })\r\n }\r\n }\r\n\r\n const getRepoDefaultPaymentToBorrower = (id) => {\r\n if (services.getRepoDefaultPaymentsCorrespondent) {\r\n services.getRepoDefaultPaymentsCorrespondent(id).then(({ response }) => {\r\n const data = response ? response.execution : null;\r\n const paymentToBorrower = data && data.contractdata ? data.contractdata.paymenttoborrower : 0;\r\n setPaymentToBorrower(paymentToBorrower)\r\n if (contractdata)\r\n handleChangeContractData(\"paymenttoborrower\", paymentToBorrower)\r\n });\r\n }\r\n };\r\n\r\n const getAccounts = () => {\r\n const { fetchSearchAccount } = services\r\n\r\n fetchSearchAccount({ text: \"\", length: 99 }).then((res) => {\r\n const newAccounts = res.response.accounts.map((a) => ({\r\n id: a.Id,\r\n description: JSON.parse(a.Value).value,\r\n }))\r\n setAccounts(() => newAccounts)\r\n })\r\n }\r\n\r\n const getTradingRoutes = () => {\r\n const { OrderId } = order\r\n const { fetchTradingRoutes } = services\r\n\r\n fetchTradingRoutes({ processId: OrderId, quantity: order.OrderQuantity })\r\n .then((res) => ({\r\n routes: res.response.sorroutes,\r\n logs: res.response.keyvalues,\r\n }))\r\n .then(({ routes, logs }) => {\r\n //remove duplicates\r\n let uniqueRoutes = []\r\n\r\n let preferredRouteId = -1\r\n let betterPreference = 9999\r\n\r\n routes.forEach((r) => {\r\n if (r.name != \"\") {\r\n if (uniqueRoutes.find((e) => e.id == r.id) == undefined) {\r\n uniqueRoutes.push(r)\r\n if (r.preference < betterPreference) {\r\n preferredRouteId = r.id\r\n betterPreference = r.preference\r\n }\r\n }\r\n }\r\n })\r\n\r\n if (uniqueRoutes.find((e) => e.id == tradingRouteSelected.TradingRouteId) == undefined) {\r\n setTradingRouteSelected({ TradingRouteId: preferredRouteId })\r\n }\r\n\r\n setTradingRoutes(\r\n uniqueRoutes.map((r) => ({\r\n id: r.id,\r\n description: r.name,\r\n }))\r\n )\r\n })\r\n }\r\n\r\n const getSettlementCurrencies = (updateValueDate, updateFX) => {\r\n const { fetchOrderAssetInfo } = services\r\n\r\n const data = {\r\n tradeDate: date,\r\n orderForm: order.AssetClassForm,\r\n assetId: order.AssetId,\r\n assetTicker: order.AssetTicker,\r\n tradeCurrencyId: order.OrderCurrencyId,\r\n settleCurrencyId: order.OrderSettlementCurrencyId,\r\n }\r\n\r\n fetchOrderAssetInfo(data).then((res) => {\r\n const { settlementCurrency, items } = res.response.assetorderdata\r\n\r\n if (settlementCurrency && updateFX) {\r\n const settleCurrency = settlementCurrency.find(\r\n (c) => c.currencyInfo.currencyId == order.OrderSettlementCurrencyId\r\n )\r\n\r\n setSettlementCurrencies(() => settlementCurrency)\r\n setFx(() => parseFloat(settleCurrency.fx))\r\n }\r\n\r\n if (updateValueDate && items.find((i) => i.key == \"SettlementDayDate\")) {\r\n setValueDate(() => items.find((i) => i.key == \"SettlementDayDate\").value)\r\n }\r\n\r\n if (items.find((i) => i.key == \"MaxDecimals\")) {\r\n setMaxDecimals(parseInt(items.find((i) => i.key == \"MaxDecimals\").value, 10))\r\n }\r\n\r\n if (items.find((i) => i.key == \"ParValue\")) {\r\n setParValue(() => parseFloat(items.find((i) => i.key == \"ParValue\").value))\r\n }\r\n })\r\n }\r\n\r\n const toggleItem = (itemId) => {\r\n setLoadingItem((prev) => ({ ...prev, [itemId]: true }))\r\n const _item = items[itemId]\r\n\r\n let item = _item || { enabled: false }\r\n\r\n // suma todas las quantity enabled\r\n const promiseSumQty = new Promise((resolveQty) => {\r\n if (!item.enabled) {\r\n const { fetchChangeOrderStatus } = services\r\n\r\n let promiseAck = Promise.resolve()\r\n\r\n if (itemId != \"a1\") {\r\n if (orders[itemId].OrderStatus === OrderStatus.ROUTED) {\r\n item.loading = true\r\n\r\n setItems((prev) => ({\r\n ...prev,\r\n [itemId]: {\r\n ...item,\r\n },\r\n }))\r\n\r\n promiseAck = new Promise((resolve) => {\r\n fetchChangeOrderStatus({ action: OrderAction.ACK, itemId, form: order.AssetClassForm }).then(\r\n (res) => resolve(res)\r\n )\r\n })\r\n }\r\n }\r\n\r\n promiseAck.then((ackRes) => {\r\n const sumQty = Object.entries(items).reduce((sum, entry) => {\r\n const [name, v] = entry\r\n\r\n if (v.enabled && name !== itemId) {\r\n return sum + (v.quantity != \"\" ? parseFloat(v.quantity) : 0)\r\n }\r\n\r\n return sum\r\n }, 0)\r\n\r\n if (itemId != \"a1\") {\r\n item.quantity = Math.min(orders[itemId].stats.pending, Math.max(order.stats.pending - sumQty, 0))\r\n } else {\r\n item.quantity = Math.max(order.stats.pending - sumQty, 0)\r\n }\r\n\r\n resolveQty()\r\n })\r\n } else {\r\n resolveQty()\r\n }\r\n })\r\n\r\n promiseSumQty.then((presult) => {\r\n services\r\n .fetchGetCalculator({\r\n assetId: order.AssetId,\r\n isSecurity: true,\r\n quantity: item.quantity || 1,\r\n price: item.price || 1,\r\n date: date,\r\n })\r\n .then((res) => {\r\n const ExecutionTotal = res.calculator.total\r\n\r\n const payload = {\r\n crossType: \"\",\r\n execution: {\r\n ExecutionQuantity: item.quantity || 0,\r\n ExecutionPrice: item.price || 0,\r\n ExecutionValueDate: date,\r\n ExecutionTotal: ExecutionTotal,\r\n SettlementCurrencyId: order.OrderSettlementCurrencyId,\r\n TradingRouteId: tradingRouteSelected.TradingRouteId,\r\n },\r\n }\r\n\r\n if (order.AssetClassForm === \"Repo\" && contractdata)\r\n payload.execution.contractdata = { ...contractdata, closing: closingLeg }\r\n\r\n services\r\n .getExecutionFees(payload)\r\n .then(({ response }) => {\r\n item.Fees = response.execution.Fees\r\n let orderPrice = 0\r\n if (order.OrderType === \"Limit\") orderPrice = order.OrderPrice\r\n if (order.OrderType === \"Stop\") orderPrice = order.OrderStopPrice\r\n setItems((prev) => ({\r\n ...prev,\r\n [itemId]: {\r\n ...item,\r\n loading: false,\r\n enabled: !item.enabled,\r\n error_price: item.enabled ? undefined : item.error_price,\r\n error_quantity: item.enabled ? undefined : item.error_quantity,\r\n ExecutionTotal: ExecutionTotal,\r\n price: orderPrice,\r\n },\r\n }))\r\n setLoadingItem((prev) => ({ ...prev, [itemId]: false }))\r\n })\r\n .catch((err) => {\r\n console.error(err)\r\n showToast(\"Error fetching fees\")\r\n })\r\n })\r\n .catch((err) => {\r\n console.error(err)\r\n showToast(\"Error fetching fees\")\r\n })\r\n })\r\n\r\n if (order.AssetClassForm === \"Repo\") {\r\n // es repo, crear contractdata y bloquear la selección del resto de ordenes\r\n const selectedOrder = orders[itemId]\r\n const mainOrder = order\r\n\r\n const newContractdata = {\r\n ContractType: \"Repo\",\r\n term: mainOrder.OrderTerm,\r\n margin: 0,\r\n RefAssetid: mainOrder.AssetId,\r\n price: 0,\r\n rate: mainOrder.OrderType === \"Limit\" ? +mainOrder.OrderPrice : 0,\r\n limit: mainOrder.OrderType === \"Limit\" ? +mainOrder.OrderPrice : 0,\r\n appraisal: 100,\r\n marketValue: 0,\r\n currency: mainOrder.OrderCurrencySymbol,\r\n open: false,\r\n opening: 0,\r\n closing: 0,\r\n CollateralAssetid: 0,\r\n CollateralAssetTicker: \"\",\r\n CollateralQuantity: 0,\r\n couponPayments: [],\r\n paymenttoborrower: paymentToBorrower,\r\n }\r\n\r\n services\r\n .fetchGetAssetQuote({\r\n assetquote_in: {\r\n assetid:\r\n mainOrder.OrderSide === \"Sell\"\r\n ? mainOrder.CurrentAccount.Collateral[0].AssetId\r\n : selectedOrder.CurrentAccount.Collateral[0].AssetId,\r\n Date: date,\r\n AssetQuotePrice: true,\r\n },\r\n })\r\n .then(({ response }) => {\r\n let collateral =\r\n mainOrder.OrderSide === \"Sell\"\r\n ? mainOrder.CurrentAccount.Collateral[0]\r\n : selectedOrder.CurrentAccount.Collateral[0]\r\n\r\n newContractdata.price = response.assetquote_out.AssetQuotePrice\r\n newContractdata.CollateralAssetid = collateral.AssetId\r\n newContractdata.CollateralAssetTicker = collateral.AssetTicker\r\n newContractdata.CollateralQuantity = collateral.CollateralQuantity\r\n\r\n setContractdata(() => newContractdata)\r\n setAllowSelection(() => false)\r\n })\r\n .catch((err) => {\r\n console.error(err)\r\n showToast(\"Error fetching collateral asset price\", true)\r\n })\r\n }\r\n }\r\n\r\n const changeItem = (itemId, name, value) => {\r\n setItems((prevItems) => ({\r\n ...prevItems,\r\n [itemId]: {\r\n ...prevItems[itemId],\r\n [name]: isNaN(value) || value == \"\" ? value : +value,\r\n [`error_${name}`]: undefined,\r\n },\r\n }))\r\n }\r\n\r\n const validate = () => {\r\n const { crossingAverage } = totals\r\n let _items = Object.assign({}, debItems)\r\n let hasItems = false\r\n let hasErrors = false\r\n let newError\r\n\r\n if (date === undefined || date === null) {\r\n newError = \"Trade date is a required field\"\r\n hasErrors = true\r\n }\r\n if (valueDate === undefined || valueDate === null) {\r\n newError = \"Value date is a required field\"\r\n hasErrors = true\r\n }\r\n\r\n if (\r\n (order.OrderType == OrderPriceType.LIMIT || order.OrderType == OrderPriceType.STOPLIMIT) &&\r\n order.AssetClassForm !== \"Repo\"\r\n ) {\r\n if (order.OrderSide == \"Buy\" && +order.OrderPrice < +crossingAverage) {\r\n newError = \"Invalid price upper limit\"\r\n hasErrors = true\r\n }\r\n if (order.OrderSide == \"Sell\" && +order.OrderPrice > +crossingAverage) {\r\n newError = \"Invalid price above limit\"\r\n hasErrors = true\r\n }\r\n }\r\n\r\n let dateAux = new Date(date)\r\n dateAux = new Date(`${dateAux.toDateLocal()}T00:00`)\r\n const valueDateAux = new Date(`${valueDate}T00:00`)\r\n if (dateAux > valueDateAux) {\r\n newError = \"Value date should be after or at trade date\"\r\n hasErrors = true\r\n }\r\n\r\n Object.entries(debItems).forEach((entry) => {\r\n const [name, value] = entry\r\n\r\n if (value.enabled) {\r\n if (order.AssetClassForm !== \"Repo\") {\r\n if (value.quantity === undefined || value.quantity === \"\" || value.quantity === 0) {\r\n _items[name].error_quantity = \"Required field\"\r\n hasErrors = true\r\n } else if (order) {\r\n const orderIsCash = order.OrderQuantityIsCash\r\n const quantityInCashOrShares = orderIsCash\r\n ? +value.quantity * +value.price * parValue\r\n : +value.quantity\r\n if (quantityInCashOrShares > +order.stats.pending) {\r\n _items[name].error_quantity = orderIsCash\r\n ? \"Quantity * Price is over order\"\r\n : \"Quantity is over order\"\r\n hasErrors = true\r\n }\r\n }\r\n\r\n if (value.price === undefined || value.price === \"\") {\r\n _items[name].error_price = \"Required field\"\r\n hasErrors = true\r\n }\r\n\r\n if (\r\n order &&\r\n (order.OrderType == OrderPriceType.LIMIT || order.OrderType == OrderPriceType.STOPLIMIT)\r\n ) {\r\n if (order.OrderSide == \"Buy\" && +order.OrderPrice < +value.price) {\r\n _items[name].error_price = \"Invalid price upper limit\"\r\n hasErrors = true\r\n }\r\n if (order.OrderSide == \"Sell\" && +order.OrderPrice > +value.price) {\r\n _items[name].error_price = \"Invalid price above limit\"\r\n hasErrors = true\r\n }\r\n }\r\n\r\n const selectedOrder = Object.values(orders).filter((order) => order.OrderId === name)\r\n if (order && selectedOrder.length > 0) {\r\n if (selectedOrder[0].OrderType === OrderPriceType.LIMIT) {\r\n if (\r\n order.OrderSide === \"Buy\" &&\r\n parseFloat(items[selectedOrder[0].OrderId].price) < parseFloat(selectedOrder[0].OrderPrice)\r\n ) {\r\n _items[name].error_price = \"Price above limit\"\r\n hasErrors = true\r\n } else if (\r\n order.OrderSide === \"Sell\" &&\r\n parseFloat(items[selectedOrder[0].OrderId].price) > parseFloat(selectedOrder[0].OrderPrice)\r\n ) {\r\n _items[name].error_price = \"Price upper limit\"\r\n hasErrors = true\r\n }\r\n }\r\n }\r\n }\r\n\r\n hasItems = true\r\n }\r\n })\r\n\r\n if (_items[\"a1\"].enabled && _items[\"a1\"].account == undefined) {\r\n _items[\"a1\"].error_account = \"Required field\"\r\n hasErrors = true\r\n }\r\n\r\n if (!hasItems) {\r\n newError = \"Empty crossing\"\r\n hasErrors = true\r\n } else if (totals.buySide < 0 || totals.sellSide < 0) {\r\n newError = \"Total execution quantity is over order quanttiy\"\r\n hasErrors = true\r\n }\r\n\r\n setItems(() => _items)\r\n setError(() => newError)\r\n\r\n if (order.AssetClassForm === \"Repo\") {\r\n const newErrors = {}\r\n\r\n if (+order.OrderPrice > 0 && +order.OrderPrice < +contractdata.rate) {\r\n newErrors[\"CollateralRate\"] = \"Invalid rate above limit\"\r\n hasErrors = true\r\n }\r\n\r\n if (+contractdata.CollateralQuantity === 0) {\r\n newErrors[\"CollateralQuantity\"] = \"Invalid quantity cannot be 0\"\r\n hasErrors = true\r\n }\r\n\r\n if (+contractdata.appraisal > 100 || +contractdata.appraisal < 0) {\r\n newErrors[\"CollateralAppraisal\"] = \"Invalid appraisal outside limits\"\r\n hasErrors = true\r\n }\r\n\r\n if (+contractdata.margin > 100 || +contractdata.margin < 0) {\r\n newErrors[\"CollateralHaircut\"] = \"Invalid haircut outside limits\"\r\n hasErrors = true\r\n }\r\n\r\n if (+contractdata.appraisal + +contractdata.margin !== 100) {\r\n newErrors[\"CollateralAppraisal\"] = \"Invalid haircut/appraisal balance\"\r\n newErrors[\"CollateralHaircut\"] = \"Invalid haircut/appraisal balance\"\r\n hasErrors = true\r\n }\r\n\r\n if (contractdata.maturity === undefined || contractdata.maturity === null) {\r\n newErrors[\"CollateralMaturity\"] = \"Required field\"\r\n hasErrors = true\r\n }\r\n\r\n setErrors(() => newErrors)\r\n }\r\n\r\n return !hasErrors\r\n }\r\n\r\n const onCross = () => {\r\n setConfirm(() => ({ loading: true }))\r\n if (validate()) {\r\n const { fetchAddExecutions } = services\r\n\r\n let executions = []\r\n let propExecution = { ExecutionId: 0 }\r\n const newTotals = calcTotals(debItems)\r\n services\r\n .fetchGetCalculator({\r\n assetId: order.AssetId,\r\n isSecurity: true,\r\n quantity: newTotals.crossingQuantity || 1,\r\n price: newTotals.crossingAverage || 1,\r\n // setTotals(() => newTotals);\r\n // setError(() => undefined);\r\n // ahora por cada uno\r\n date: date,\r\n })\r\n .then((res2) => {\r\n const ExecutionTotal2 = res2.calculator.total\r\n const payload = {\r\n crossType: \"\",\r\n execution: {\r\n ExecutionQuantity: newTotals.crossingQuantity || 0,\r\n ExecutionPrice: newTotals.crossingAverage || 0,\r\n ExecutionValueDate: date,\r\n ExecutionTotal: ExecutionTotal2,\r\n SettlementCurrencyId: order.OrderSettlementCurrencyId,\r\n TradingRouteId: tradingRouteSelected.TradingRouteId,\r\n ExecutionTrader: selectedTrader,\r\n },\r\n }\r\n\r\n if (order.AssetClassForm === \"Repo\" && contractdata) {\r\n payload.execution.contractdata = { ...contractdata, closing: closingLeg }\r\n }\r\n\r\n services\r\n .getExecutionFees(payload)\r\n .then(({ response }) => {\r\n newTotals.Fees = response.execution.Fees\r\n newTotals.ExecutionTotal = ExecutionTotal2\r\n\r\n const promises = Object.entries(debItems).map((entry) => {\r\n const [name, value] = entry\r\n\r\n return services\r\n .fetchGetCalculator({\r\n assetId: order.AssetId,\r\n isSecurity: true,\r\n quantity: value.quantity || 1,\r\n price: value.price || 1,\r\n date: date,\r\n })\r\n .then((res) => {\r\n const ExecutionTotal = res.calculator.total\r\n const payload2 = {\r\n crossType: \"\",\r\n execution: {\r\n ExecutionQuantity: value.quantity || 0,\r\n ExecutionPrice: value.price || 0,\r\n ExecutionValueDate: date,\r\n ExecutionTotal: ExecutionTotal,\r\n SettlementCurrencyId: order.OrderSettlementCurrencyId,\r\n TradingRouteId: tradingRouteSelected.TradingRouteId,\r\n ExecutionTrader: selectedTrader,\r\n },\r\n }\r\n\r\n if (order.AssetClassForm === \"Repo\" && contractdata) {\r\n payload2.execution.contractdata = { ...contractdata, closing: closingLeg }\r\n }\r\n\r\n return services\r\n .getExecutionFees(payload2)\r\n .then(({ response }) => {\r\n value.Fees = response.execution.Fees\r\n value.ExecutionTotal = ExecutionTotal\r\n return { name, value }\r\n })\r\n .catch((err) => {\r\n console.error(err)\r\n showToast(\"Error fetching fees\")\r\n })\r\n })\r\n .catch((err) => {\r\n console.error(err)\r\n showToast(\"Error fetching fees\")\r\n })\r\n })\r\n\r\n const newItems = {}\r\n Promise.all(promises).then((itemFee) => {\r\n newItems[itemFee[0].name] = {\r\n Fees: itemFee[0].value.Fees,\r\n ExecutionTotal: itemFee[0].value.ExecutionTotal,\r\n }\r\n\r\n const fixedItems = {}\r\n Object.entries(debItems).forEach((entry) => {\r\n let [name, value] = entry\r\n value = { ...value, ...newItems[name] }\r\n fixedItems[name] = value\r\n })\r\n //aca estaria todo\r\n Object.entries(fixedItems).forEach((entry) => {\r\n let [name, value] = entry\r\n\r\n if (value.enabled) {\r\n if (name != \"a1\") {\r\n const auxExecution = {\r\n ExecutionId: name,\r\n ExecutionQuantity: value.quantity,\r\n ExecutionPrice: value.price,\r\n ExecutionTotal: value.ExecutionTotal,\r\n Fees: value.Fees || [],\r\n ExecutionTrader: selectedTrader,\r\n }\r\n\r\n if (order.AssetClassForm === \"Repo\") {\r\n auxExecution.contractdata = {\r\n ...contractdata,\r\n closing: closingLeg,\r\n contractCounterParty: order.CurrentAccount.AccountId,\r\n }\r\n auxExecution.ExecutionQuantity = 1\r\n auxExecution.ExecutionPrice = 1\r\n auxExecution.ExecutionTotal = 1\r\n }\r\n executions.push(auxExecution)\r\n }\r\n }\r\n })\r\n\r\n const executionToAdd = {\r\n ExecutionId: order.OrderId,\r\n ExecutionQuantity: totals.crossingQuantity,\r\n ExecutionPrice: totals.crossingAverage,\r\n ExecutionTotal: totals.ExecutionTotal,\r\n Fees: totals.Fees || [],\r\n ExecutionTrader: selectedTrader,\r\n }\r\n\r\n if (order.AssetClassForm === \"Repo\") {\r\n executionToAdd.contractdata = contractdata\r\n executionToAdd.contractdata.closing = closingLeg\r\n executionToAdd.ExecutionQuantity = 1\r\n executionToAdd.ExecutionPrice = 1\r\n }\r\n\r\n executions.push(executionToAdd)\r\n\r\n if (fixedItems[\"a1\"].enabled) {\r\n propExecution = {\r\n ExecutionId: fixedItems[\"a1\"].account,\r\n ExecutionQuantity: fixedItems[\"a1\"].quantity,\r\n ExecutionPrice: fixedItems[\"a1\"].price,\r\n ExecutionTotal: fixedItems[\"a1\"].ExecutionTotal,\r\n Fees: fixedItems[\"a1\"].Fees || [],\r\n ExecutionTrader: selectedTrader,\r\n }\r\n }\r\n\r\n let fxMultiplies = true\r\n const settleCurrencyInfo = settlementCurrencies.find(\r\n (c) => c.currencyInfo.currencyId == order.OrderSettlementCurrencyId\r\n )\r\n\r\n if (settleCurrencyInfo) {\r\n fxMultiplies = settleCurrencyInfo.multiplies\r\n }\r\n\r\n fetchAddExecutions({\r\n executions,\r\n propExecution,\r\n refOrderId: order.OrderId,\r\n crossType: String(tradingRouteSelected.TradingRouteId),\r\n dateTime: localDateToGMT(date),\r\n valueDate,\r\n fx,\r\n fxMultiplies,\r\n }).then((res) => {\r\n const { result } = res.response\r\n if (result.Code == 200) {\r\n onToggle()\r\n } else {\r\n alert(result.Description)\r\n setConfirm(() => ({ loading: false }))\r\n }\r\n })\r\n })\r\n })\r\n .catch((err) => {\r\n console.error(err)\r\n showToast(\"Error fetching fees\")\r\n })\r\n })\r\n .catch((err) => {\r\n console.error(err)\r\n showToast(\"Error fetching fees\")\r\n })\r\n } else {\r\n setConfirm(() => ({ loading: false }))\r\n }\r\n }\r\n\r\n const calcTotals = (items) => {\r\n const isBuy = order.OrderSide == \"Buy\"\r\n const isCash = order.OrderQuantityIsCash\r\n const isRepo = order.AssetClassForm == \"Repo\"\r\n\r\n let totals = {\r\n crossingQuantity: null,\r\n crossingAverage: null,\r\n buySide: null,\r\n sellSide: null,\r\n }\r\n\r\n let totalQtyPendingOrders = 0,\r\n totalQtyCross = 0,\r\n totalQtyMultPrice = 0\r\n\r\n Object.entries(items).forEach((entry) => {\r\n const [name, value] = entry\r\n\r\n if (value.enabled && !isNaN(value.quantity) && !isNaN(value.price)) {\r\n if (name != \"a1\") {\r\n const order2 = orders[name]\r\n const order2PendingQty =\r\n +order2.stats.pending -\r\n (order2.OrderQuantityIsCash ? +value.quantity * +value.price * parValue : +value.quantity)\r\n totalQtyPendingOrders += order2PendingQty\r\n }\r\n totalQtyCross += +value.quantity\r\n totalQtyMultPrice += +value.quantity * +value.price\r\n }\r\n })\r\n\r\n const sideOrder = isBuy ? \"buySide\" : \"sellSide\"\r\n const sideCross = sideOrder == \"buySide\" ? \"sellSide\" : \"buySide\"\r\n\r\n totals[sideOrder] = isRepo\r\n ? 1\r\n : +order.stats.pending - (isCash ? totalQtyMultPrice * parValue : totalQtyCross)\r\n\r\n if (totalQtyCross > 0) {\r\n totals[sideCross] = isRepo ? 1 : totalQtyPendingOrders\r\n totals.crossingQuantity = totalQtyCross\r\n totals.crossingAverage = totalQtyCross ? (totalQtyMultPrice / totalQtyCross).toFixed(8) : null\r\n }\r\n\r\n return totals\r\n }\r\n\r\n const handleChangeContractData = (name, value) => {\r\n setContractdata((prev) => ({\r\n ...prev,\r\n [name]: value,\r\n }))\r\n }\r\n\r\n const handleChangeClosingLeg = (value) => {\r\n setClosingLeg(() => value)\r\n }\r\n\r\n const handleGetLegs = () => {\r\n if (contractdata) {\r\n setCalculatingLegs(() => true)\r\n services\r\n .fetchGetOpeningAndClosingLegs({\r\n execution: {\r\n ExecutionValueDate: valueDate,\r\n TradingRouteId: tradingRouteSelected.TradingRouteId,\r\n contractdata: { ...contractdata, closing: closingLeg },\r\n },\r\n })\r\n .then(({ response }) => {\r\n const newLegs = {\r\n opening: response.openingleg,\r\n marketValue: response.marketvalue,\r\n couponPayments: response.cashflow_outs.map((payment) => ({\r\n ContractPaymentDate: payment.date,\r\n ContractPaymentName: payment.name,\r\n ContractPaymentAmmount: payment.payment,\r\n ContractPaymentAdjustedAmmount: payment.adjusted,\r\n })),\r\n }\r\n\r\n setClosingLeg(() => response.closingleg)\r\n\r\n setContractdata((prev) => ({\r\n ...prev,\r\n ...newLegs,\r\n }))\r\n })\r\n .catch((err) => {\r\n console.error(err)\r\n showToast(\"Error fetching opening and closing legs\", true)\r\n })\r\n .finally(() => {\r\n setCalculatingLegs(() => false)\r\n setFirst(() => false)\r\n })\r\n }\r\n }\r\n\r\n const handleChangeAppraisal = (event) => {\r\n const value = event.value\r\n setContractdata((prev) => ({\r\n ...prev,\r\n appraisal: value,\r\n margin: 100 - +value,\r\n }))\r\n }\r\n\r\n const handleChangeHaircut = (event) => {\r\n const value = event.value\r\n setContractdata((prev) => ({\r\n ...prev,\r\n margin: value,\r\n appraisal: 100 - +value,\r\n }))\r\n }\r\n\r\n const handleChangeTradingRoute = (id) => {\r\n setTradingRouteSelected({ TradingRouteId: id })\r\n }\r\n\r\n const toggleShowFees = () => {\r\n setShowFees((prev) => !prev)\r\n }\r\n\r\n const handleChangeType = (v) => {\r\n setType(() => v)\r\n if (order.AssetClassForm == \"Repo\" && contractdata) {\r\n let isInternal = v == \"Internal\"\r\n setContractdata({ ...contractdata, paymenttoborrower: isInternal })\r\n }\r\n }\r\n\r\n const handleChangeDate = (v) => {\r\n setDate(v)\r\n }\r\n\r\n const handleChangeValueDate = (v) => {\r\n setValueDate(v)\r\n }\r\n\r\n return (\r\n \r\n \r\n Order Cross\r\n \r\n \r\n \r\n \r\n {!isFX && hasDifferentCurrencies && (\r\n \r\n \r\n \r\n setManualFX(v)} />\r\n \r\n \r\n \r\n \r\n setFx(() => e.value)}\r\n dataTypeDecimalName='currency'\r\n placeholder={\"FX\"}\r\n disabled={!manualFX}\r\n />\r\n \r\n \r\n \r\n )}\r\n \r\n\r\n {allowSelection && (\r\n \r\n \r\n {filterOrders(orders).map((o, index) => (\r\n \r\n ))}\r\n\r\n {order.AssetClassForm !== \"Repo\" && (\r\n \r\n \r\n \r\n )}\r\n \r\n )}\r\n\r\n {filterOrders(orders).length == 0 && (\r\n
    No orders for crossing
    \r\n )}\r\n\r\n {order.AssetClassForm == \"Repo\" && contractdata && (\r\n \r\n )}\r\n\r\n \r\n {totals.Fees && (\r\n \r\n \r\n Show fees\r\n \r\n {showFees && }\r\n \r\n )}\r\n {error && (\r\n \r\n
    \r\n \r\n {error}\r\n \r\n
    \r\n )}\r\n
    \r\n\r\n \r\n \r\n\r\n \r\n {accountsSelected && (\r\n \r\n Cross\r\n \r\n )}\r\n \r\n
    \r\n )\r\n}\r\n\r\nconst RepoCross = ({\r\n errors,\r\n contractdata,\r\n calculatingLegs,\r\n handleChangeContractData,\r\n handleChangeAppraisal,\r\n handleChangeHaircut,\r\n closingLeg,\r\n handleChangeClosingLeg,\r\n maxDecimals,\r\n}) => {\r\n // cross trade for repo, contract info\r\n return (\r\n \r\n \r\n \r\n Contract Details\r\n \r\n
    \r\n \r\n \r\n \r\n {}}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n handleChangeContractData(\"CollateralQuantity\", e.value)\r\n }}\r\n dataTypeDecimalName='quantity'\r\n placeholder='Quantity'\r\n />\r\n \r\n \r\n @\r\n \r\n \r\n {\r\n handleChangeContractData(\"price\", e.value)\r\n }}\r\n decimalScale={maxDecimals}\r\n dataTypeDecimalName='price'\r\n placeholder='Price'\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n handleChangeContractData(\"marketValue\", e.value)\r\n }}\r\n dataTypeDecimalName='quantity'\r\n disabled\r\n placeholder='Quantity'\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n handleChangeContractData(\"maturity\", e.target.value)}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n handleChangeContractData(\"rate\", e.value)\r\n }}\r\n dataTypeDecimalName='percentage'\r\n placeholder='Rate'\r\n suffix='%'\r\n />\r\n \r\n \r\n handleChangeContractData(\"paymenttoborrower\", !contractdata.paymenttoborrower)\r\n }\r\n />\r\n \r\n \r\n
    \r\n Opening leg {contractdata.currency}{\" \"}\r\n {calculatingLegs ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
    \r\n
    \r\n Closing leg {contractdata.currency}{\" \"}\r\n {calculatingLegs ? (\r\n \r\n ) : (\r\n {\r\n handleChangeClosingLeg(e.value)\r\n }}\r\n dataTypeDecimalName='currency'\r\n placeholder='Closing Leg'\r\n />\r\n )}\r\n
    \r\n \r\n \r\n
    \r\n \r\n
    \r\n {/* \r\n \r\n \r\n \r\n */}\r\n
    \r\n \r\n
    \r\n )\r\n}\r\n\r\nconst DateAndCrossingType = ({\r\n type,\r\n date,\r\n valueDate,\r\n error,\r\n tradersNames,\r\n execution,\r\n enabled,\r\n onChangeType,\r\n onChangeDate,\r\n onChangeValueDate,\r\n tradingRoutes,\r\n onChangeTradingRoute,\r\n tradingRouteSelected,\r\n onHandleSelectedTrader,\r\n selectedTrader,\r\n showTraderName,\r\n}) => (\r\n
    \r\n
    \r\n
    \r\n 0 ? tradingRoutes : null}\r\n />\r\n
    \r\n\r\n {/* */}\r\n {/* \r\n */}\r\n \r\n onChangeDate(e.target.value)}\r\n style={{ width: \"100%\" }}\r\n />\r\n \r\n \r\n onChangeValueDate(e.target.value)}\r\n style={{ width: \"100%\" }}\r\n />\r\n \r\n
    \r\n {showTraderName && (\r\n \r\n onHandleSelectedTrader(e.target.value)}\r\n >\r\n \r\n {tradersNames &&\r\n tradersNames.map((option, index) => (\r\n \r\n ))}\r\n \r\n \r\n )}\r\n
    \r\n
    \r\n
    \r\n)\r\n\r\nconst Number = ({ value, dataTypeDecimalName }) => {\r\n if (value === null) {\r\n return \"-\"\r\n }\r\n return \r\n}\r\n\r\nconst AccountsField = ({ accounts, id, onChange, item, items }) => {\r\n if (!item) return \r\n const error_account = item.error_account || \"\"\r\n\r\n return accounts == null || !item ? (\r\n \r\n ) : (\r\n \r\n onChange(id, \"account\", v)}\r\n emptyLabel='Account'\r\n />\r\n \r\n )\r\n}\r\n\r\nconst Line = ({ mb = \"4px\" }) => (\r\n \r\n)\r\n\r\nconst FooterTotals = ({ totals }) => (\r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    Crossing quantity\r\n \r\n
    Average\r\n \r\n
    \r\n
    \r\n\r\n
    \r\n Leftovers\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    Buy side\r\n \r\n
    Sell side\r\n \r\n
    \r\n
    \r\n
    \r\n)\r\n\r\nconst filterOrders = (orders) => Object.values(orders).filter((o) => true)\r\n\r\nconst Fees = ({ fees }) => {\r\n return (\r\n
    \r\n \r\n \r\n {fees.map((feeItem, idx) => (\r\n \r\n \r\n \r\n ))}\r\n \r\n
    \r\n {feeItem.Description}:{\" \"}\r\n \r\n
    \r\n
    \r\n )\r\n}\r\n\r\nexport default Cross\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"Cross-module_modal_v9Jmp\",\"alert\":\"Cross-module_alert_cuBhW\",\"crossingType\":\"Cross-module_crossingType_3aPQ_\",\"gridContainer\":\"Cross-module_gridContainer_20oa2\",\"item\":\"Cross-module_item_236tp\",\"showFeesLink\":\"Cross-module_showFeesLink_3hnw4\",\"active\":\"Cross-module_active_35aU0\",\"fields\":\"Cross-module_fields_rnVRA\",\"checkbox\":\"Cross-module_checkbox_kzGFj\",\"loadingCbox\":\"Cross-module_loadingCbox_15bDh\",\"arroba\":\"Cross-module_arroba_FnwVO\",\"order\":\"Cross-module_order_2ncKz\",\"line\":\"Cross-module_line_36Fiw\",\"footerTotals\":\"Cross-module_footerTotals_2fc6X\",\"totalLine\":\"Cross-module_totalLine_2TqJN\",\"buy\":\"Cross-module_buy_33bfl\",\"sell\":\"Cross-module_sell_1Pi-a\",\"loading\":\"Cross-module_loading_c2Wfj\",\"spinner\":\"Cross-module_spinner_1xwUn\",\"contractDetailsWrapper\":\"Cross-module_contractDetailsWrapper_3ujhn\",\"openCheckbox\":\"Cross-module_openCheckbox_3osOb\",\"suggestionItem\":\"Cross-module_suggestionItem_1vK-m\",\"leg\":\"Cross-module_leg_2mLYC\",\"opening\":\"Cross-module_opening_lfY27\",\"closing\":\"Cross-module_closing_Y5STs\",\"feesContainer\":\"Cross-module_feesContainer_XDOYb\",\"feesTable\":\"Cross-module_feesTable_5YjJd\",\"showOwnFeesLink\":\"Cross-module_showOwnFeesLink_tBUcV\"};","import React, { useState, useEffect } from \"react\";\r\nimport { CustomInput, Input, Table } from \"reactstrap\";\r\nimport { NumberFormatInput } from \"../../NumberFormatInput/NumberFormatInput\";\r\nimport * as OrderItemUI from \"../../Order/Item\";\r\nimport classnames from \"classnames\";\r\nimport style from \"./Cross.module.scss\";\r\nimport { Field } from \"../Order/Field/Field\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\n\r\nconst ItemRow = ({\r\n order,\r\n id,\r\n actions,\r\n title = \"\",\r\n maxDecimals = 4,\r\n loading,\r\n fees = { Fees: null },\r\n ...props\r\n}) => {\r\n const [showQuantity, setShowQuantity] = useState(false);\r\n const enabled = props.item && props.item.enabled;\r\n const readonly = props.item && props.item.readonly;\r\n const [showFees, setShowFees] = useState(false);\r\n const item = props.item || {};\r\n let timer = null;\r\n\r\n const toggleShowFees = () => {\r\n setShowFees((prev) => !prev);\r\n };\r\n\r\n // Show price by default\r\n const showPrice = props.showPrice === undefined || props.showPrice === true;\r\n\r\n useEffect(() => {\r\n // calculates whether or not to show the quantity fields\r\n if (!order || (order && order.AssetClassForm !== \"Repo\")) {\r\n setShowQuantity(true);\r\n }\r\n }, [order]);\r\n\r\n useEffect(() => {\r\n // calculates whether or not to show the quantity fields\r\n if (!order || (order && order.AssetClassForm !== \"Repo\")) {\r\n setShowQuantity(true);\r\n }\r\n }, [order]);\r\n\r\n const updateValues = (component, data) => {\r\n actions.change(id, component, data);\r\n };\r\n\r\n return (\r\n \r\n {title != \"\" ?
    {title}
    : null}\r\n
    \r\n
    \r\n {item.loading || loading ? (\r\n \r\n ) : (\r\n actions.toggle(id)}\r\n />\r\n )}{\" \"}\r\n {showQuantity && (\r\n \r\n \r\n updateValues(\"quantity\", e.value)}\r\n placeholder={\"Quantity\"}\r\n dataTypeDecimalName=\"quantity\"\r\n />\r\n \r\n {showPrice && (\r\n \r\n @\r\n \r\n updateValues(\"price\", e.value)}\r\n decimalScale={maxDecimals}\r\n dataTypeDecimalName=\"price\"\r\n placeholder={\"Price\"}\r\n />\r\n \r\n \r\n )}\r\n \r\n )}\r\n
    \r\n {order && }\r\n {fees.Fees && (\r\n \r\n \r\n Show fees\r\n \r\n {showFees && }\r\n \r\n )}\r\n {props.children}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport const OrderDetail = ({ order, loading }) => {\r\n return (\r\n
    \r\n
    \r\n {order.OrderId && order.OrderId > 0 && (\r\n \r\n #{order.OrderId}{\" \"}\r\n \r\n )}\r\n {OrderItemUI.renderOrderSide(order)} {OrderItemUI.renderOrderQuantity(order)}{\" \"}\r\n {OrderItemUI.renderOrderQuantityType(order)} {OrderItemUI.renderOrderSymbol(order)}\r\n {\" @ \"}\r\n {OrderItemUI.renderOrderPrice(order)} {OrderItemUI.renderOrderTimeFrame(order)}{\" \"}\r\n \r\n {order.OrderAdvisorName}/{order.OrderTraderName != \"\" ? order.OrderTraderName : \"-\"}\r\n {\" \"}\r\n {OrderItemUI.renderOrderAccount(order)}{\" \"}\r\n
    \r\n\r\n
    \r\n\r\n
    \r\n
    \r\n {loading ? : OrderItemUI.renderOrderStatus(order)}{\" \"}\r\n {OrderItemUI.renderExecutionsAvg(order)}\r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst Fees = ({ fees }) => {\r\n return (\r\n
    \r\n \r\n \r\n {fees.map((feeItem, idx) => (\r\n \r\n \r\n \r\n ))}\r\n \r\n
    \r\n {feeItem.Description}:{\" \"}\r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default ItemRow;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport {\r\n Input,\r\n InputGroup,\r\n Col,\r\n DropdownMenu,\r\n DropdownToggle,\r\n DropdownItem,\r\n UncontrolledDropdown,\r\n Button,\r\n Row,\r\n} from \"reactstrap\";\r\nimport Grid from \"./Item/Grid\";\r\nimport style from \"./style.module.scss\";\r\nimport InfiniteScroll from \"react-infinite-scroller\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\n\r\nconst loader = (\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n);\r\n\r\nconst CrossReferenceSearch = ({ fetchs, Link }) => {\r\n const [crossReference, setCrossReference] = useState({\r\n arr: [],\r\n loading: true,\r\n hasMore: false,\r\n });\r\n const [processes, setProcesses] = useState({ arr: [], selected: \"All\" });\r\n const [search, setSearch] = useState(\"\");\r\n\r\n useEffect(() => {\r\n fetchs.getProcesses({}).then((r) => {\r\n setProcesses({ ...processes, arr: r.processes });\r\n });\r\n fetchs\r\n .getCrossReferenceSearch({\r\n text: search,\r\n fromRow: 0,\r\n process: processes.selected,\r\n })\r\n .then((r) => {\r\n var hasMore = true;\r\n if (r.crossReferences.length < 50) {\r\n hasMore = false;\r\n }\r\n setCrossReference({\r\n ...crossReference,\r\n arr: r.crossReferences,\r\n loading: false,\r\n hasMore: hasMore,\r\n });\r\n });\r\n }, []);\r\n\r\n const searchCrossReference = (event) => {\r\n setCrossReference({\r\n ...crossReference,\r\n arr: [],\r\n loading: true,\r\n });\r\n fetchs\r\n .getCrossReferenceSearch({\r\n text: search,\r\n fromRow: 0,\r\n process: processes.selected,\r\n })\r\n .then((r) => {\r\n var hasMore = true;\r\n if (r.crossReferences.length < 50) {\r\n hasMore = false;\r\n }\r\n setCrossReference({\r\n ...crossReference,\r\n arr: r.crossReferences,\r\n loading: false,\r\n hasMore: hasMore,\r\n });\r\n });\r\n };\r\n\r\n const filterList = (event) => {\r\n setSearch(event.target.value);\r\n };\r\n\r\n const loadItems = () => {\r\n fetchs\r\n .getCrossReferenceSearch({\r\n text: search,\r\n fromRow: crossReference.arr.length,\r\n process: processes.selected,\r\n })\r\n .then((r) => {\r\n let temp = crossReference.arr;\r\n var hasMore = true;\r\n if (r.crossReferences.length !== 0) {\r\n r.crossReferences.forEach((elem) => temp.push(elem));\r\n }\r\n if (r.crossReferences.length < 50) {\r\n hasMore = false;\r\n }\r\n setCrossReference({\r\n ...crossReference,\r\n arr: temp,\r\n loading: false,\r\n hasMore: hasMore,\r\n });\r\n });\r\n };\r\n\r\n const changeProcess = (event) => {\r\n setProcesses({\r\n ...processes,\r\n selected: event.target.value,\r\n });\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n \r\n
    \r\n\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n {processes.selected}\r\n \r\n {\r\n return {\r\n ...data,\r\n styles: {\r\n ...data.styles,\r\n overflow: \"auto\",\r\n maxHeight: \"300px\",\r\n },\r\n };\r\n },\r\n },\r\n }}\r\n >\r\n {processes.arr.map((item, index) => (\r\n \r\n {item}\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n searchCrossReference()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Search\r\n \r\n \r\n
    \r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default CrossReferenceSearch;\r\n","import React, { Component } from \"react\";\r\nimport style from \"./style.module.scss\";\r\nimport { Row, Col, Container, Table } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport CircularProgress from \"../../../CircularProgress/CircularProgress\";\r\n\r\nconst Grid = ({ crossReferences, loading, Link }) => {\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {crossReferences.length == 0 ? (\r\n \r\n ) : (\r\n crossReferences.map((cross, index) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))\r\n )}\r\n \r\n
    IdMain ProcessMain Process IdMain Sub Process Id
    \r\n {cross.id}\r\n \r\n \r\n {cross.mainProcess}\r\n \r\n \r\n \r\n {cross.mainProcessId}\r\n \r\n \r\n \r\n {cross.mainSubProcessId}\r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst EmptyTable = ({ loading }) => (\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n

    No CrossReferences

    \r\n )}\r\n \r\n \r\n);\r\n\r\nGrid.propTypes = {\r\n crossReferences: PropTypes.array.isRequired,\r\n loading: PropTypes.bool.isRequired,\r\n Link: PropTypes.any.isRequired,\r\n};\r\n\r\nexport default Grid;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"rowStyle\":\"style-module_rowStyle_3se5C\",\"titleStyle\":\"style-module_titleStyle_2owJm\",\"rowPadding\":\"style-module_rowPadding_2ARae\",\"dropdownStyle\":\"style-module_dropdownStyle_3M230\",\"desk\":\"style-module_desk_1O9Hm\",\"table\":\"style-module_table_qYBkh\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"toolbar\":\"style-module_toolbar_10A7i\",\"formGroup\":\"style-module_formGroup_QffM-\",\"downloadPortfolio\":\"style-module_downloadPortfolio_N7f4M\",\"searchBar\":\"style-module_searchBar_1P5C8\",\"button\":\"style-module_button_3R0I3\",\"inlineDate\":\"style-module_inlineDate_6hMMI\",\"table\":\"style-module_table_4qr2Y\",\"row\":\"style-module_row_kimT8\",\"imgFormat\":\"style-module_imgFormat_2nFqK\",\"imgFormatCard\":\"style-module_imgFormatCard_b0JaU\",\"alignMarginTop\":\"style-module_alignMarginTop_2VRJX\",\"smallCardFormat\":\"style-module_smallCardFormat_2NtJd\",\"smallCardFormatResponsive\":\"style-module_smallCardFormatResponsive_35FSu\",\"cardFormat\":\"style-module_cardFormat_2S5It\",\"cardFormatResponsive\":\"style-module_cardFormatResponsive_2Y7I_\",\"cardFormatExpand\":\"style-module_cardFormatExpand_1XTsR\",\"cardFormatChart\":\"style-module_cardFormatChart_2P_2T\",\"slidein\":\"style-module_slidein_2_eI4\",\"assetNameColor\":\"style-module_assetNameColor_20Nwt\",\"infinite\":\"style-module_infinite_3-0th\",\"spinner\":\"style-module_spinner_2_Kr_\",\"sk-bouncedelay\":\"style-module_sk-bouncedelay_2IuwM\",\"bounce1\":\"style-module_bounce1_1hX5U\",\"bounce2\":\"style-module_bounce2_2sOv_\",\"expandFormat\":\"style-module_expandFormat_3QQU3\",\"chartFormatDisplay\":\"style-module_chartFormatDisplay_3_cpF\",\"chartFormatDisplayResponsive\":\"style-module_chartFormatDisplayResponsive_19_GE\",\"ContainerChart\":\"style-module_ContainerChart_2hDpI\",\"graphicFormat\":\"style-module_graphicFormat_2Zw1c\",\"rowAlign\":\"style-module_rowAlign_9rFUd\",\"detailDataFormat\":\"style-module_detailDataFormat_1Af3Y\",\"detailDataFormatResponsive\":\"style-module_detailDataFormatResponsive_3xKTB\",\"detailDataFormatExpandResponsive\":\"style-module_detailDataFormatExpandResponsive_3cL3z\",\"detailDataFormatExpand\":\"style-module_detailDataFormatExpand_3g5sr\",\"alignTitle\":\"style-module_alignTitle_1whmJ\",\"alignBox\":\"style-module_alignBox_1F0zk\",\"alignRight\":\"style-module_alignRight_1w6aq\",\"buttonFormat\":\"style-module_buttonFormat_38jp-\"};","import React, { useReducer, Fragment, useEffect, useState } from \"react\";\r\nimport {\r\n CustodianEntityReducer,\r\n initializeCustodianEntity,\r\n defaultStateEntity,\r\n ValidateCustodianEntity,\r\n resetClearingHouse,\r\n} from \"./reducer\";\r\nimport {\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Container,\r\n Row,\r\n Col,\r\n Input,\r\n Button,\r\n Table,\r\n Label,\r\n UncontrolledDropdown,\r\n DropdownMenu,\r\n DropdownItem,\r\n DropdownToggle,\r\n} from \"reactstrap\";\r\nimport style from \"./CustodianEntity.module.scss\";\r\nimport CircularProgress from \"../../CircularProgress/CircularProgress\";\r\nimport { Field, Combobox } from \"../Order/Field/Field\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport classnames from \"classnames\";\r\nimport CustodianEntityContact from \"./CustodianEntityContact\";\r\nimport CustodianEntityClearingHouse from \"./CustodianEntityClearingHouse\";\r\nimport CustodianEntityCodeType from \"./CustodianEntityCodeType\";\r\n\r\nconst CustodianEntity = ({ open, toggle, fetchs, ...props }) => {\r\n const [state, dispatch] = useReducer(\r\n CustodianEntityReducer,\r\n defaultStateEntity(),\r\n initializeCustodianEntity(props)\r\n );\r\n const {\r\n custodian,\r\n errors,\r\n openCustodianEntityContact,\r\n openCustodianEntityClearingHouse,\r\n openCustodianEntityCodeType,\r\n EditClearingHouse,\r\n EditCodeType,\r\n EditContact,\r\n loadingConfirmCustodianEntity,\r\n messageConfirmCustodianEntity,\r\n } = state;\r\n const [loading, setLoading] = useState(false);\r\n const [messageErrors, setMessageErrors] = useState([]);\r\n\r\n useEffect(() => {\r\n setLoading(true);\r\n dispatch({ type: \"RESET_CUSTODIAN_ENTITY\" });\r\n\r\n if (props.isEditCustodianEntity) {\r\n props.callApi(\"GetTaxDocument\", {}).then((response) => {\r\n dispatch({ type: \"SET_TAX_DOCUMENT\", response });\r\n\r\n props.callApi(\"GetCountries\", {}).then((response) => {\r\n dispatch({ type: \"SET_COUNTRIES\", response });\r\n\r\n props\r\n .callApi(\"GetCustodianEntityEdit\", {\r\n custodianEntityId: props.entityId,\r\n })\r\n .then((response) => {\r\n dispatch({ type: \"GET_CUSTODIAN_ENTITY\", response });\r\n setLoading(false);\r\n });\r\n });\r\n });\r\n } else {\r\n props.callApi(\"GetTaxDocument\", {}).then((response) => {\r\n dispatch({ type: \"SET_TAX_DOCUMENT\", response });\r\n props.callApi(\"GetCountries\", {}).then((response) => {\r\n dispatch({ type: \"SET_COUNTRIES\", response });\r\n setLoading(false);\r\n });\r\n });\r\n }\r\n }, []);\r\n\r\n const confirm = () => {\r\n const errors = ValidateCustodianEntity(state);\r\n if (errors == false) {\r\n dispatch({ type: \"UPDATE_VALIDATION_CONTACT_FORM\", errors });\r\n dispatch({\r\n type: \"UPDATE_FIELDS\",\r\n fields: { loadingConfirmCustodianEntity: true },\r\n });\r\n //fijarnos si hay por lo menos un clearing house y un contact\r\n if (props.isEditCustodianEntity) {\r\n props\r\n .callApi(\"UpdateCustodianEntity\", {\r\n custodianEntityId: props.entityId,\r\n custodianEntity: custodian,\r\n })\r\n .then((response) => {\r\n if (response.result.length > 0) {\r\n setMessageErrors(response.result);\r\n }\r\n dispatch({\r\n type: \"UPDATE_FIELDS\",\r\n fields: {\r\n loadingConfirmCustodianEntity: false,\r\n messageConfirmCustodianEntity: true,\r\n },\r\n });\r\n });\r\n } else {\r\n props.callApi(\"SetCustodianEntity\", { custodianEntity: custodian }).then((response) => {\r\n if (response.result.length > 0) {\r\n setMessageErrors(response.result);\r\n }\r\n dispatch({\r\n type: \"UPDATE_FIELDS\",\r\n fields: {\r\n loadingConfirmCustodianEntity: false,\r\n messageConfirmCustodianEntity: true,\r\n },\r\n });\r\n props.RechargeCustodianEntity(response.custodianEntityId);\r\n });\r\n }\r\n } else {\r\n dispatch({ type: \"UPDATE_VALIDATION_CONTACT_FORM\", errors });\r\n }\r\n };\r\n const onChange = (fields) => dispatch({ type: \"CHANGE_FIELDS\", fields });\r\n const onChangeUpdate = (fields) => dispatch({ type: \"UPDATE_FIELDS\", fields });\r\n const setContact = (action) => dispatch({ type: \"SET_CONTACT\", action });\r\n const setClearingHouse = (action) => dispatch({ type: \"SET_CLEARING_HOUSE_FORM\", action });\r\n const updateClearingHouse = (action) => dispatch({ type: \"UPDATE_CLEARING_HOUSE\", action });\r\n const updateCodeType = (action) => dispatch({ type: \"UPDATE_CODE_TYPE\", action });\r\n const setCodeType = (action) => dispatch({ type: \"SET_CODE_TYPE_FORM\", action });\r\n const updateContact = (action) => dispatch({ type: \"UPDATE_CONTACT\", action });\r\n const deleteContact = (action) => dispatch({ type: \"DELETE_CONTACT\", action });\r\n const deleteClearingHouse = (action) => dispatch({ type: \"DELETE_CLEARING_HOUSE\", action });\r\n const deleteCodeType = (action) => dispatch({ type: \"DELETE_CODE_TYPE\", action });\r\n\r\n return (\r\n \r\n \r\n {props.isEditCustodianEntity ? \"Update Custodian Entity\" : \"New Custodian Entity\"}\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n \r\n \r\n \r\n \r\n onChange({ CustodianEntityName: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ LegalInstitutionCode: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ LegalCustodianCode: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange({ CountryId: v })}\r\n items={Object.values(custodian.countries).map((key, index) => ({\r\n id: key.id,\r\n description: key.name,\r\n }))}\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ CustodianEntityAddress: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ CustodianEntityURL: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange({ CustodianEntityTaxDocument: v })}\r\n items={Object.values(custodian.taxDocument).map((key, index) => ({\r\n id: [key],\r\n description: [key],\r\n }))}\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ CustodianEntityTAXId: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ CustodianEntityPendingLimit: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange({ CustodianEntitySwift: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ CustodianEntityIntroducedBy: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ CustodianEntityReference: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange({ CustodianEntityNotes: e.target.value })}\r\n />\r\n \r\n \r\n \r\n {openCustodianEntityContact ? (\r\n
    \r\n ) : (\r\n \r\n \r\n {\r\n onChangeUpdate({\r\n openCustodianEntityContact: true,\r\n });\r\n }}\r\n >\r\n \r\n {\"\\u00A0\"} Add Custodian Entity Contact\r\n \r\n \r\n \r\n )}\r\n \r\n {openCustodianEntityClearingHouse ? (\r\n
    \r\n ) : (\r\n \r\n \r\n {\r\n onChangeUpdate({\r\n openCustodianEntityClearingHouse: true,\r\n });\r\n }}\r\n >\r\n \r\n {\"\\u00A0\"} Add Custodian Entity Clearing House\r\n \r\n \r\n \r\n )}\r\n\r\n \r\n\r\n {openCustodianEntityCodeType ? (\r\n
    \r\n ) : (\r\n \r\n \r\n {\r\n onChangeUpdate({\r\n openCustodianEntityCodeType: true,\r\n });\r\n }}\r\n >\r\n \r\n {\"\\u00A0\"} Add Custodian Entity Code Type\r\n \r\n \r\n \r\n )}\r\n\r\n \r\n
    \r\n )}\r\n
    \r\n\r\n \r\n {messageConfirmCustodianEntity ? (\r\n
    \r\n {messageErrors.length > 0 ? (\r\n \r\n {messageErrors.map((m, index) => (\r\n
    {m.Description}
    \r\n ))}\r\n
    \r\n ) : (\r\n \r\n {props.isEditCustodianEntity\r\n ? \"Custodian Entity was successfully updated\"\r\n : \"Custodian Entity was successfully created\"}\r\n \r\n )}\r\n
    \r\n ) : (\r\n
    \r\n )}\r\n \r\n {messageConfirmCustodianEntity ? (\r\n
    \r\n ) : (\r\n confirm()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {props.isEditCustodianEntity ? \"Update\" : \"Confirm\"}\r\n \r\n )}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst EmptyClearingHouses = () => (\r\n \r\n \r\n
    No Clearing Houses
    \r\n \r\n \r\n);\r\n\r\nexport function validationsCustodianEntity() {\r\n return {\r\n CustodianEntityName: { empty: true },\r\n LegalInstitutionCode: { empty: true },\r\n LegalCustodianCode: { empty: true },\r\n // CustodianEntityAddress: {empty: true},\r\n // CustodianEntityURL: {empty: true},\r\n CustodianEntityPendingLimit: { empty: true },\r\n CountryId: { empty: true },\r\n CustodianEntityTAXId: { empty: true },\r\n //CustodianEntityIntroducedBy: {empty: true},\r\n //CustodianEntitySwift: {empty: true},\r\n //CustodianEntityNotes: {empty: true}\r\n };\r\n}\r\n\r\nexport default CustodianEntity;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"AlignRadioButton\":\"CustodianEntity-module_AlignRadioButton_31sJs\",\"modal\":\"CustodianEntity-module_modal_1yEFn\",\"body\":\"CustodianEntity-module_body_34956\",\"table\":\"CustodianEntity-module_table_1hOiN\",\"error\":\"CustodianEntity-module_error_1C3Jx\",\"empty\":\"CustodianEntity-module_empty_2x8vG\",\"btnAdd\":\"CustodianEntity-module_btnAdd_3Ch_1\",\"alignCombo\":\"CustodianEntity-module_alignCombo_EuJOy\",\"title\":\"CustodianEntity-module_title_1ENBS\",\"backdrop\":\"CustodianEntity-module_backdrop_3bPp7\",\"edit\":\"CustodianEntity-module_edit_10iAS\",\"actions\":\"CustodianEntity-module_actions_1ATOP\",\"errorText\":\"CustodianEntity-module_errorText_19BxS\",\"AlignRight\":\"CustodianEntity-module_AlignRight_2Iqqd\",\"FixPaddingCol\":\"CustodianEntity-module_FixPaddingCol_iErb9\",\"sentCounterParty\":\"CustodianEntity-module_sentCounterParty_2V_sS\"};","import React, { useReducer, Fragment, useEffect, useState } from \"react\";\r\nimport {\r\n defaultStateEntity,\r\n initializeCustodianEntity,\r\n CustodianEntityReducer,\r\n ValidateClearingHouse,\r\n} from \"./reducer\";\r\nimport {\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Container,\r\n Row,\r\n Col,\r\n Input,\r\n Button,\r\n Table,\r\n Label,\r\n UncontrolledDropdown,\r\n DropdownMenu,\r\n DropdownItem,\r\n DropdownToggle,\r\n} from \"reactstrap\";\r\nimport style from \"./CustodianEntity.module.scss\";\r\nimport CircularProgress from \"../../CircularProgress/CircularProgress\";\r\nimport { Field, Combobox } from \"../Order/Field/Field\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport classnames from \"classnames\";\r\nimport ModalConfirm from \"../../Asset/Modals/ModalConfirm\";\r\nimport { CustodianEntityStatus } from \"../../../utils/Helper\";\r\n\r\nconst CustodianEntityClearingHouse = ({ openClearingHouse, toggle, fetchs, ...props }) => {\r\n const [state, dispatch] = useReducer(\r\n CustodianEntityReducer,\r\n defaultStateEntity(),\r\n initializeCustodianEntity(props)\r\n );\r\n const [modal, setModal] = useState({ open: false, indexContact: 0 });\r\n const { errors, custodianClearingHouse, custodian } = state;\r\n useEffect(() => {\r\n props.callApi(\"GetClearingHouses\", {}).then((response) => {\r\n dispatch({\r\n type: \"SET_CUSTODIAN_CLEARING_HOUSE\",\r\n response,\r\n });\r\n });\r\n }, []);\r\n\r\n const confirmClearingHouse = () => {\r\n const errors = ValidateClearingHouse(state);\r\n if (errors == false) {\r\n dispatch({ type: \"UPDATE_VALIDATION_CONTACT_FORM\", errors });\r\n if (props.EditClearingHouse) {\r\n props.updateClearingHouse({ custodianClearingHouse });\r\n props.onChangeUpdate({\r\n EditClearingHouse: false,\r\n });\r\n } else {\r\n props.setClearingHouse({ custodianClearingHouse });\r\n }\r\n dispatch({ type: \"RESET_CLEARING_HOUSE\" });\r\n props.onChangeUpdate({\r\n openCustodianEntityClearingHouse: false,\r\n });\r\n } else {\r\n dispatch({ type: \"UPDATE_VALIDATION_CONTACT_FORM\", errors });\r\n }\r\n };\r\n const onChangeClearingHouse = (fields) => dispatch({ type: \"SET_CLEARING_HOUSE\", fields });\r\n\r\n const ClickEditClearingHouses = (e, index) => {\r\n props.onChangeUpdate({\r\n EditClearingHouse: true,\r\n IndexEditClearingHouse: index,\r\n });\r\n dispatch({ type: \"GET_CLEARING_HOUSE\", e });\r\n props.onChangeUpdate({\r\n openCustodianEntityClearingHouse: true,\r\n });\r\n };\r\n\r\n const cancelClearingHouse = () => {\r\n dispatch({ type: \"RESET_CLEARING_HOUSE\" });\r\n props.onChangeUpdate({\r\n EditClearingHouse: false,\r\n openCustodianEntityClearingHouse: false,\r\n });\r\n };\r\n\r\n const ClickDeleteClearingHouse = (e, index) => {\r\n setModal({ ...modal, open: true, indexContact: index });\r\n };\r\n\r\n const toggleModal = (name, props = {}) => {\r\n setModal({ ...modal, open: false });\r\n };\r\n\r\n const onConfirm = (name) => {\r\n props.deleteClearingHouse(modal.indexContact);\r\n };\r\n\r\n return (\r\n
    \r\n toggleModal(\"confirm\", {})}\r\n onConfirm={() => onConfirm()}\r\n />\r\n {openClearingHouse ? (\r\n
    \r\n \r\n \r\n \r\n \r\n onChangeClearingHouse({\r\n CustodyClearingHouseCode: e.target.value,\r\n })\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n onChangeClearingHouse({ ClearingHouseId: v })}\r\n items={Object.values(custodianClearingHouse.clearingHouseNames).map((key, index) => ({\r\n id: key.id,\r\n description: key.name,\r\n }))}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n onChangeClearingHouse({\r\n CustodianEntityClearingHouseStatus: v,\r\n })\r\n }\r\n items={Object.values(CustodianEntityStatus).map((key, index) => ({\r\n id: key.id,\r\n description: key.name,\r\n }))}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n onChangeClearingHouse({\r\n CustodyClearingHouseSettlementInstructions: e.target.value,\r\n })\r\n }\r\n />\r\n \r\n \r\n \r\n
    \r\n {\" \"}\r\n confirmClearingHouse()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {props.EditClearingHouse ? \"Edit\" : \"Save\"}\r\n \r\n
    \r\n
    \r\n ) : (\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {props.clearingHouses.length == 0 ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n {props.clearingHouses.map((c, index) => (\r\n \r\n {c.CustodyClearingHouseChangeType !== \"Delete\" && (\r\n \r\n \r\n \r\n \r\n \r\n {c.CustodianEntityClearingHouseStatus == \"Blocked\" ||\r\n c.CustodianEntityClearingHouseStatus == \"Inactive\" ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n )}\r\n \r\n ))}\r\n \r\n )}\r\n
    CodeDef.StatusEditDel.
    {c.CustodyClearingHouseCode}{c.CustodyClearingHouseIsDefault == true ? \"true\" : \"false\"}{c.CustodianEntityClearingHouseStatus} ClickEditClearingHouses(c, index)}>\r\n \r\n ClickDeleteClearingHouse(c, index)}>\r\n \r\n
    \r\n
    \r\n
    \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nconst EmptyClearingHouses = () => (\r\n \r\n \r\n
    No Clearing Houses
    \r\n \r\n \r\n);\r\n\r\nexport function validationsClearingHouse() {\r\n return {\r\n CustodyClearingHouseCode: { empty: true },\r\n };\r\n}\r\n\r\nexport default CustodianEntityClearingHouse;\r\n","import React, { useReducer, Fragment, useEffect, useState } from \"react\";\r\nimport {\r\n defaultStateEntity,\r\n initializeCustodianEntity,\r\n CustodianEntityReducer,\r\n ValidateCodeTypes,\r\n} from \"./reducer\";\r\nimport { Row, Col, Input, Button, Table } from \"reactstrap\";\r\nimport style from \"./CustodianEntity.module.scss\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport classnames from \"classnames\";\r\nimport ModalConfirm from \"../../Asset/Modals/ModalConfirm\";\r\nimport { Field, Combobox } from \"../Order/Field/Field\";\r\n\r\nconst CustodianEntityCodeType = ({ openCodeType, ...props }) => {\r\n const [state, dispatch] = useReducer(\r\n CustodianEntityReducer,\r\n defaultStateEntity(),\r\n initializeCustodianEntity(props)\r\n );\r\n const [modal, setModal] = useState({ open: false, indexContact: 0 });\r\n const { errors, custodianCodeType, CodeTypeNames } = state;\r\n useEffect(() => {\r\n props.callApi(\"getCodeTypes\", {}).then((response) => {\r\n dispatch({\r\n type: \"SET_CUSTODIAN_CODE_TYPE\",\r\n response,\r\n });\r\n });\r\n }, []);\r\n\r\n const confirmCodeType = () => {\r\n const errors = ValidateCodeTypes(state, props.CodeTypes, props.EditCodeType);\r\n if (errors == false) {\r\n dispatch({ type: \"UPDATE_VALIDATION_CODE_FORM\", errors });\r\n if (props.EditCodeType) {\r\n props.updateCodeType({ custodianCodeType });\r\n props.onChangeUpdate({\r\n EditCodeType: false,\r\n });\r\n } else {\r\n props.setCodeType({ custodianCodeType });\r\n }\r\n dispatch({ type: \"RESET_CODE_TYPE\" });\r\n props.onChangeUpdate({\r\n openCustodianEntityCodeType: false,\r\n });\r\n } else {\r\n dispatch({ type: \"UPDATE_VALIDATION_CONTACT_FORM\", errors });\r\n }\r\n };\r\n\r\n const onChangeCodeType = (fields) => dispatch({ type: \"SET_CODE_TYPE\", fields });\r\n\r\n const ClickEditCodeType = (e, index) => {\r\n props.onChangeUpdate({\r\n EditCodeType: true,\r\n IndexEditCodeType: index,\r\n });\r\n dispatch({ type: \"GET_CODE_TYPE\", e });\r\n props.onChangeUpdate({\r\n openCustodianEntityCodeType: true,\r\n });\r\n };\r\n\r\n const cancelCodeType = () => {\r\n dispatch({ type: \"RESET_CODE_TYPE\" });\r\n props.onChangeUpdate({\r\n EditCodeType: false,\r\n openCustodianEntityCodeType: false,\r\n });\r\n };\r\n\r\n const ClickDeleteCodeType = (e, index) => {\r\n setModal({ ...modal, open: true, indexContact: index });\r\n };\r\n\r\n const toggleModal = (name, props = {}) => {\r\n setModal({ ...modal, open: false });\r\n };\r\n\r\n const onConfirm = (name) => {\r\n props.deleteCodeType(modal.indexContact);\r\n };\r\n\r\n return (\r\n
    \r\n toggleModal(\"confirm\", {})}\r\n onConfirm={() => onConfirm()}\r\n />\r\n {openCodeType ? (\r\n
    \r\n \r\n \r\n \r\n onChangeCodeType({ CodeTypeId: v })}\r\n items={CodeTypeNames.map((e) => ({\r\n id: e.CodeTypeId,\r\n description: e.CodeTypeName,\r\n }))}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n onChangeCodeType({\r\n CodeTypeValue: e.target.value,\r\n })\r\n }\r\n />\r\n \r\n \r\n \r\n\r\n
    \r\n {\" \"}\r\n confirmCodeType()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {props.EditCodeType ? \"Edit\" : \"Save\"}\r\n \r\n
    \r\n
    \r\n ) : (\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {props.CodeTypes.length == 0 ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n {CodeTypeNames &&\r\n CodeTypeNames.length > 0 &&\r\n props.CodeTypes &&\r\n props.CodeTypes.map((c, index) => (\r\n \r\n {c.CodeTypeChangeType !== \"Delete\" && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n ))}\r\n \r\n )}\r\n
    Code TypeCode ValueEditDel.
    {CodeTypeNames.find((e) => e.CodeTypeId == c.CodeTypeId).CodeTypeName}{c.CodeTypeValue} ClickEditCodeType(c, index)}>\r\n \r\n ClickDeleteCodeType(c, index)}>\r\n \r\n
    \r\n
    \r\n
    \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nconst EmptyCodeTypes = () => (\r\n \r\n \r\n
    No Code Types
    \r\n \r\n \r\n);\r\n\r\nexport function validationsCodeTypes() {\r\n return {\r\n CodeTypeId: { empty: true },\r\n CodeTypeValue: { empty: true },\r\n };\r\n}\r\n\r\nexport default CustodianEntityCodeType;\r\n","import React, { useReducer, Fragment, useEffect, useState } from \"react\";\r\nimport {\r\n CustodianEntityReducer,\r\n initializeCustodianEntity,\r\n defaultStateEntity,\r\n ValidateContactForm,\r\n} from \"./reducer\";\r\nimport {\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Container,\r\n Row,\r\n Col,\r\n Input,\r\n Button,\r\n Table,\r\n Label,\r\n UncontrolledDropdown,\r\n DropdownMenu,\r\n DropdownItem,\r\n DropdownToggle,\r\n} from \"reactstrap\";\r\nimport style from \"./CustodianEntity.module.scss\";\r\nimport CircularProgress from \"../../CircularProgress/CircularProgress\";\r\nimport { Field, Combobox } from \"../Order/Field/Field\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport classnames from \"classnames\";\r\nimport ModalConfirm from \"../../Asset/Modals/ModalConfirm\";\r\n\r\nconst CustodianEntityContact = ({ openContact, toggle, fetchs, ...props }) => {\r\n const [state, dispatch] = useReducer(\r\n CustodianEntityReducer,\r\n defaultStateEntity(),\r\n initializeCustodianEntity(props)\r\n );\r\n const [modal, setModal] = useState({ open: false, indexContact: 0 });\r\n\r\n const { custody, errors, custodianContact, custodian } = state;\r\n useEffect(() => {\r\n props.callApi(\"GetCustodianContactType\", {}).then((response) => {\r\n dispatch({\r\n type: \"SET_CUSTODIAN_CONTACT_TYPE\",\r\n response,\r\n });\r\n });\r\n }, []);\r\n\r\n const onChangeContact = (fields) => dispatch({ type: \"SET_ENTITY_CONTACT\", fields });\r\n\r\n const confirmContact = () => {\r\n const errors = ValidateContactForm(state);\r\n if (errors == false) {\r\n dispatch({ type: \"UPDATE_VALIDATION_CONTACT_FORM\", errors });\r\n if (props.EditContact) {\r\n props.updateContact({ custodianContact });\r\n props.onChangeUpdate({\r\n EditContact: false,\r\n });\r\n } else {\r\n props.setContact({ custodianContact });\r\n }\r\n dispatch({ type: \"RESET_CONTACT\" });\r\n props.onChangeUpdate({\r\n openCustodianEntityContact: false,\r\n });\r\n } else {\r\n dispatch({ type: \"UPDATE_VALIDATION_CONTACT_FORM\", errors });\r\n }\r\n };\r\n\r\n const ClickEditContact = (e, index) => {\r\n props.onChangeUpdate({\r\n EditContact: true,\r\n IndexEditContact: index,\r\n });\r\n dispatch({ type: \"GET_CONTACT\", e });\r\n props.onChangeUpdate({\r\n openCustodianEntityContact: true,\r\n });\r\n };\r\n\r\n const ClickDeleteContact = (e, index) => {\r\n setModal({ ...modal, open: true, indexContact: index });\r\n };\r\n\r\n const cancelContact = () => {\r\n dispatch({ type: \"RESET_CONTACT\" });\r\n props.onChangeUpdate({\r\n EditContact: false,\r\n openCustodianEntityContact: false,\r\n });\r\n };\r\n\r\n const toggleModal = (name, props = {}) => {\r\n setModal({ ...modal, open: false });\r\n };\r\n\r\n const onConfirm = (name) => {\r\n props.deleteContact(modal.indexContact);\r\n };\r\n\r\n return (\r\n
    \r\n toggleModal(\"confirm\", {})}\r\n onConfirm={() => onConfirm()}\r\n />\r\n {openContact ? (\r\n
    \r\n \r\n \r\n \r\n \r\n onChangeContact({\r\n CustodianEntityContactName: e.target.value,\r\n })\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n onChangeContact({ CustodianEntityContactType: v })}\r\n items={Object.values(custodianContact.contactTypes).map((key, index) => ({\r\n id: [key],\r\n description: [key],\r\n }))}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n onChangeContact({\r\n CustodianEntityContactEmail1: e.target.value,\r\n })\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n onChangeContact({\r\n CustodianEntityContactEmail2: e.target.value,\r\n })\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n onChangeContact({\r\n CustodianEntityContactTel1: e.target.value,\r\n })\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n onChangeContact({\r\n CustodianEntityContactTel2: e.target.value,\r\n })\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n onChangeContact({\r\n CustodianEntityContactNotes: e.target.value,\r\n })\r\n }\r\n />\r\n \r\n \r\n \r\n
    \r\n {\" \"}\r\n confirmContact()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {props.EditContact ? \"Edit\" : \"Save\"}\r\n \r\n
    \r\n
    \r\n ) : (\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {props.contacts.length == 0 ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n {props.contacts.map((c, index) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n )}\r\n
    NameEmailTelEditDel.
    {c.CustodianEntityContactName}{c.CustodianEntityContactEmail1}{c.CustodianEntityContactTel1} ClickEditContact(c, index)}>\r\n \r\n ClickDeleteContact(c, index)}>\r\n \r\n
    \r\n
    \r\n
    \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nconst EmptyContact = () => (\r\n \r\n \r\n
    No Contacts
    \r\n \r\n \r\n);\r\n\r\nexport function validationsContact() {\r\n return {\r\n CustodianEntityContactName: { empty: true },\r\n CustodianEntityContactEmail1: { empty: true },\r\n };\r\n}\r\n\r\nexport default CustodianEntityContact;\r\n","import {mergeDeep} from \"../../../utils/Helper\";\r\nimport {validationsContact} from \"../CustodianEntity/CustodianEntityContact\";\r\nimport {validationsClearingHouse} from \"../CustodianEntity/CustodianEntityClearingHouse\";\r\nimport {validationsCustodianEntity} from \"../CustodianEntity/CustodianEntity\";\r\nimport { validationsCodeTypes } from \"../CustodianEntity/CustodianEntityCodeType\";\r\n\r\nexport const defaultStateEntity = () => ({\r\n custodian: {\r\n CustodianEntityId: 0,\r\n CustodianEntityName: \"\",\r\n LegalInstitutionCode: \"\",\r\n CountryId: 0,\r\n CountryName: \"\",\r\n CustodianEntityLogo: \"\",\r\n CustodianEntityFileType: \"\",\r\n CustodianEntityAddress: \"\",\r\n CustodianEntityTAXId: \"\",\r\n CustodianEntityTaxDocument: \"\",\r\n CustodianEntityURL: \"\",\r\n CustodianEntityIntroducedBy: \"\",\r\n CustodianEntitySwift: \"\",\r\n CustodianEntityNotes: \"\",\r\n CustodianEntityPendingLimit: 0,\r\n CustodianEntityIsExchangeListed: false,\r\n CustodianEntityHasInvestmentGrade: false,\r\n CustodianEntityIsBank: false,\r\n LegalCustodianCode: \"\",\r\n CustodianEntityReference:\"\",\r\n countries: [],\r\n taxDocument: [],\r\n Contact: [],\r\n ClearingHouse: [],\r\n CodeType: []\r\n },\r\n custodianContact: {\r\n CustodianEntityContactName: \"\",\r\n CustodianEntityContactEmail1: \"\",\r\n CustodianEntityContactEmail2: \"\",\r\n CustodianEntityContactTel1: \"\",\r\n CustodianEntityContactTel2: \"\",\r\n CustodianEntityContactType: \"\",\r\n contactTypes: [],\r\n CustodianEntityContactNotes: \"\",\r\n CustodianEntityContactTicketConfirmation: false,\r\n CustodianEntityContactChangeType: \"\"\r\n },\r\n custodianClearingHouse: {\r\n CustodyClearingHouseCode: \"\",\r\n ClearingHouseId: \"\",\r\n clearingHouseName: \"\",\r\n clearingHouseNames: [],\r\n CustodyClearingHouseIsDefault: false,\r\n CustodyClearingHouseSettlementInstructions: \"\",\r\n CustodianEntityClearingHouseStatus: \"Active\",\r\n CustodianEntityClearingHouseCodeChange: \"\",\r\n CustodyClearingHouseChangeType: \"\"\r\n },\r\n custodianCodeType: {\r\n CodeTypeId: 0,\r\n CodeTypeValue: \"\",\r\n CodeTypeChangeType: \"\"\r\n },\r\n fields: {\r\n readonly: {},\r\n errors: {}\r\n },\r\n loadingConfirmCustodianEntity: false,\r\n messageConfirmCustodianEntity: false,\r\n error: true,\r\n errors: {},\r\n EditClearingHouse: false,\r\n IndexEditClearingHouse: 0,\r\n EditCodeType: false,\r\n IndexEditCodeType: 0,\r\n EditContact: false,\r\n IndexEditContact: 0,\r\n openCustodianEntity: false,\r\n openCustodianEntityContact: false,\r\n openCustodianEntityClearingHouse: false,\r\n openCustodianEntityCodeType: false\r\n});\r\n\r\nexport const CustodianEntityReducer = (state, action) => {\r\n switch (action.type) {\r\n case \"CHANGE_FIELDS\":\r\n return processChangeFields(state, action.fields);\r\n case \"SET_COUNTRIES\":\r\n return SetCountries(state, action);\r\n case \"UPDATE_FIELDS\":\r\n return processFields(state, action.fields);\r\n case \"SET_TAX_DOCUMENT\":\r\n return SetTaxDocument(state, action);\r\n case \"SET_CUSTODIAN_CONTACT_TYPE\":\r\n return SetCustodianContactType(state, action);\r\n case \"SET_CUSTODIAN_CLEARING_HOUSE\":\r\n return SetCustodianClearingHouse(state, action);\r\n case \"SET_CUSTODIAN_CODE_TYPE\":\r\n return SetCustodianCodeType(state, action);\r\n case \"SET_ENTITY_CONTACT\":\r\n return processChangeContactFields(state, action.fields);\r\n case \"SET_CLEARING_HOUSE\":\r\n return processChangeClearingHouse(state, action.fields);\r\n case \"SET_CODE_TYPE\":\r\n return processChangeCodeType(state, action.fields);\r\n case \"UPDATE_VALIDATION_CONTACT_FORM\":\r\n return forceUpdateValidationContact(state, action);\r\n case \"UPDATE_VALIDATION_CODE_FORM\":\r\n return forceUpdateValidationContact(state, action);\r\n case \"SET_CONTACT\":\r\n return SetContact(state, action);\r\n case \"SET_CLEARING_HOUSE_FORM\":\r\n return SetClearingHouse(state, action);\r\n case \"SET_CODE_TYPE_FORM\":\r\n return SetCodeType(state, action);\r\n case \"GET_CLEARING_HOUSE\":\r\n return GetClearingHouse(state, action);\r\n case \"GET_CODE_TYPE\":\r\n return GetCodeType(state, action);\r\n case \"UPDATE_CLEARING_HOUSE\":\r\n return UpdateClearingHouse(state, action);\r\n case \"UPDATE_CODE_TYPE\":\r\n return UpdateCodeType(state, action);\r\n case \"DELETE_CLEARING_HOUSE\":\r\n return DeleteClearingHouse(state, action);\r\n case \"DELETE_CODE_TYPE\":\r\n return DeleteCodeType(state, action);\r\n case \"GET_CONTACT\":\r\n return GetContact(state, action);\r\n case \"UPDATE_CONTACT\":\r\n return UpdateContact(state, action);\r\n case \"DELETE_CONTACT\":\r\n return DeleteContact(state, action);\r\n case \"RESET_CLEARING_HOUSE\":\r\n return resetClearingHouse(state, action);\r\n case \"RESET_CODE_TYPE\":\r\n return resetCodeType(state, action);\r\n case \"RESET_CONTACT\":\r\n return resetContact(state, action);\r\n case \"GET_CUSTODIAN_ENTITY\":\r\n return getCustodianEntity(state, action);\r\n case \"RESET_CUSTODIAN_ENTITY\":\r\n return resetCustodianEntity(state, action);\r\n default:\r\n return state;\r\n }\r\n};\r\n\r\nexport const initializeCustodianEntity = props => {\r\n return initialState => {\r\n return {\r\n ...initialState\r\n };\r\n };\r\n};\r\n\r\nfunction processChangeFields(state, fields) {\r\n const errors = Object.keys(fields).reduce((f, name) => {\r\n f[name] = undefined;\r\n return f;\r\n }, {});\r\n\r\n return mergeDeep(\r\n {...state},\r\n {\r\n custodian: {\r\n ...fields\r\n },\r\n fields: {\r\n errors\r\n }\r\n }\r\n );\r\n}\r\n\r\nfunction processFields(state, fields) {\r\n return mergeDeep(\r\n {...state},\r\n {\r\n ...fields\r\n }\r\n );\r\n}\r\n\r\nexport function SetCountries(state, action) {\r\n var countryId = 0;\r\n var countryName = \"\";\r\n if (action.response.countries.length > 0) {\r\n countryId = action.response.countries[0].id;\r\n countryName = action.response.countries[0].name;\r\n }\r\n return mergeDeep(\r\n {...state},\r\n {\r\n custodian: {\r\n countries: action.response.countries,\r\n CountryId: countryId,\r\n CountryName: countryName\r\n }\r\n }\r\n );\r\n}\r\n\r\nexport function SetTaxDocument(state, action) {\r\n var taxId = \"\";\r\n if (action.response.taxDocument.length > 0) {\r\n taxId = action.response.taxDocument[0];\r\n }\r\n return mergeDeep(\r\n {...state},\r\n {\r\n custodian: {\r\n taxDocument: action.response.taxDocument,\r\n CustodianEntityTaxDocument: taxId\r\n }\r\n }\r\n );\r\n}\r\n\r\nexport function SetCustodianContactType(state, action) {\r\n var contactType = \"\";\r\n if (action.response.custodianType.length > 0) {\r\n contactType = action.response.custodianType[0];\r\n }\r\n return mergeDeep(\r\n {...state},\r\n {\r\n custodianContact: {\r\n contactTypes: action.response.custodianType,\r\n CustodianEntityContactType: contactType\r\n }\r\n }\r\n );\r\n}\r\n\r\nexport function SetCustodianClearingHouse(state, action) {\r\n var clearingHouse = \"\";\r\n var clearingHouseName = \"\";\r\n if (action.response.clearingHouses.length > 0) {\r\n clearingHouse = action.response.clearingHouses[0].id;\r\n clearingHouseName = action.response.clearingHouses[0].name;\r\n }\r\n return mergeDeep(\r\n {...state},\r\n {\r\n custodianClearingHouse: {\r\n clearingHouseNames: action.response.clearingHouses,\r\n ClearingHouseId: clearingHouse,\r\n clearingHouseName: clearingHouseName\r\n }\r\n }\r\n );\r\n}\r\n\r\nexport function SetCustodianCodeType(state, action) {\r\n var CodeType = \"\";\r\n var CodeTypeName = \"\";\r\n if (action.response.CodeTypes.length > 0) {\r\n CodeType = action.response.CodeTypes[0].CodeTypeId;\r\n CodeTypeName = action.response.CodeTypes[0].CodeTypeName;\r\n }\r\n return mergeDeep(\r\n {...state},\r\n {\r\n CodeTypeNames: action.response.CodeTypes,\r\n custodianCodeType: {\r\n CodeTypeId: CodeType,\r\n CodeTypeName: CodeTypeName\r\n }\r\n }\r\n );\r\n}\r\n\r\nfunction processChangeContactFields(state, fields) {\r\n const errors = Object.keys(fields).reduce((f, name) => {\r\n f[name] = undefined;\r\n return f;\r\n }, {});\r\n return mergeDeep(\r\n {...state},\r\n {\r\n custodianContact: {\r\n ...fields\r\n },\r\n fields: {\r\n errors\r\n }\r\n }\r\n );\r\n}\r\n\r\nfunction processChangeClearingHouse(state, fields) {\r\n const errors = Object.keys(fields).reduce((f, name) => {\r\n f[name] = undefined;\r\n return f;\r\n }, {});\r\n return mergeDeep(\r\n {...state},\r\n {\r\n custodianClearingHouse: {\r\n ...fields\r\n },\r\n fields: {\r\n errors\r\n }\r\n }\r\n );\r\n}\r\n\r\nfunction processChangeCodeType(state, fields) {\r\n const errors = Object.keys(fields).reduce((f, name) => {\r\n f[name] = undefined;\r\n return f;\r\n }, {});\r\n return mergeDeep(\r\n {...state},\r\n {\r\n custodianCodeType: {\r\n ...fields\r\n },\r\n fields: {\r\n errors\r\n }\r\n }\r\n );\r\n}\r\n\r\nexport function ValidateContactForm(state) {\r\n const {custodianContact, fields} = state;\r\n\r\n const errors = {};\r\n\r\n Object.entries(validationsContact(custodianContact)).forEach(entry => {\r\n const [name, value] = entry;\r\n\r\n if (value.empty) {\r\n if (\r\n custodianContact[name] == undefined ||\r\n custodianContact[name] === \"\"\r\n ) {\r\n errors[name] = \"Required field\";\r\n }\r\n // else if (value.autosuggestId && custodianContact[value.autosuggestId] == undefined) {\r\n // errors[name] = 'Must select a value from list'\r\n }\r\n });\r\n\r\n // has Errors only add errors to state\r\n if (Object.keys(errors).length !== 0) {\r\n return errors;\r\n }\r\n\r\n return false;\r\n}\r\n\r\nexport function ValidateClearingHouse(state) {\r\n const {custodianClearingHouse, fields} = state;\r\n\r\n const errors = {};\r\n\r\n Object.entries(validationsClearingHouse(custodianClearingHouse)).forEach(\r\n entry => {\r\n const [name, value] = entry;\r\n\r\n if (value.empty) {\r\n if (\r\n custodianClearingHouse[name] == undefined ||\r\n custodianClearingHouse[name] === \"\"\r\n ) {\r\n errors[name] = \"Required field\";\r\n }\r\n // else if (value.autosuggestId && custodianContact[value.autosuggestId] == undefined) {\r\n // errors[name] = 'Must select a value from list'\r\n }\r\n }\r\n );\r\n\r\n // has Errors only add errors to state\r\n if (Object.keys(errors).length !== 0) {\r\n return errors;\r\n }\r\n\r\n return false;\r\n}\r\n\r\nexport function ValidateCodeTypes(state, CodeTypes, EditCodeType) {\r\n const {custodianCodeType} = state;\r\n const errors = {};\r\n\r\n Object.entries(validationsCodeTypes(custodianCodeType)).forEach(\r\n entry => {\r\n const [name, value] = entry;\r\n\r\n if (value.empty) {\r\n if (\r\n custodianCodeType[name] == undefined ||\r\n custodianCodeType[name] === \"\"\r\n ) {\r\n errors[name] = \"Required field\";\r\n }\r\n }\r\n }\r\n );\r\n if (!EditCodeType && CodeTypes.some(e => e.CodeTypeChangeType !== \"Delete\" && e.CodeTypeId == custodianCodeType.CodeTypeId)){\r\n errors.unique = \"Code Type must be unique.\"\r\n }\r\n\r\n // has Errors only add errors to state\r\n if (Object.keys(errors).length !== 0) {\r\n return errors;\r\n }\r\n\r\n return false;\r\n}\r\n\r\nexport function ValidateCustodianEntity(state) {\r\n const {custodian, fields} = state;\r\n\r\n const errors = {};\r\n\r\n Object.entries(validationsCustodianEntity(custodian)).forEach(entry => {\r\n const [name, value] = entry;\r\n\r\n if (value.empty) {\r\n if (custodian[name] == undefined || custodian[name] === \"\") {\r\n errors[name] = \"Required field\";\r\n }\r\n if (name == \"CountryId\" && custodian.CountryId <= 0)\r\n errors.CountryId = \"Required field\";\r\n // else if (value.autosuggestId && custodianContact[value.autosuggestId] == undefined) {\r\n // errors[name] = 'Must select a value from list'\r\n }\r\n });\r\n\r\n // has Errors only add errors to state\r\n if (Object.keys(errors).length !== 0) {\r\n return errors;\r\n }\r\n\r\n return false;\r\n}\r\n\r\nexport function forceUpdateValidationContact(state, {errors}) {\r\n return {\r\n ...state,\r\n errors: errors\r\n };\r\n}\r\n\r\nexport function SetContact(state, action) {\r\n return {\r\n ...state,\r\n custodian: {\r\n ...state.custodian,\r\n Contact: [...state.custodian.Contact, action.action.custodianContact]\r\n }\r\n };\r\n}\r\n\r\nexport function SetClearingHouse(state, action) {\r\n action.action.custodianClearingHouse.CustodyClearingHouseChangeType = \"New\";\r\n return {\r\n ...state,\r\n custodian: {\r\n ...state.custodian,\r\n ClearingHouse: [\r\n ...state.custodian.ClearingHouse,\r\n action.action.custodianClearingHouse\r\n ]\r\n }\r\n };\r\n}\r\n\r\nexport function SetCodeType(state, action) {\r\n action.action.custodianCodeType.CodeTypeChangeType = \"New\";\r\n return {\r\n ...state,\r\n custodian: {\r\n ...state.custodian,\r\n CodeType: [\r\n ...state.custodian.CodeType,\r\n action.action.custodianCodeType\r\n ]\r\n }\r\n };\r\n}\r\nexport function GetClearingHouse(state, action) {\r\n return {\r\n ...state,\r\n custodianClearingHouse: {\r\n ...state.custodianClearingHouse,\r\n CustodyClearingHouseCode: action.e.CustodyClearingHouseCode,\r\n ClearingHouseId: action.e.ClearingHouseId,\r\n clearingHouseName: action.e.clearingHouseName,\r\n CustodyClearingHouseIsDefault: action.e.CustodyClearingHouseIsDefault,\r\n CustodyClearingHouseSettlementInstructions:\r\n action.e.CustodyClearingHouseSettlementInstructions,\r\n CustodianEntityClearingHouseStatus:\r\n action.e.CustodianEntityClearingHouseStatus,\r\n CustodianEntityClearingHouseCodeChange:\r\n action.e.CustodianEntityClearingHouseCodeChange,\r\n CustodyClearingHouseChangeType: action.e.CustodyClearingHouseChangeType\r\n }\r\n };\r\n}\r\n\r\nexport function GetCodeType(state, action) {\r\n return {\r\n ...state,\r\n custodianCodeType: {\r\n ...state.custodianCodeType,\r\n CodeTypeId: action.e.CodeTypeId,\r\n OldCodeTypeId: action.e.CodeTypeId,\r\n\r\n CodeTypeName: action.e.CodeTypeName,\r\n OldCodeTypeName: action.e.CodeTypeName,\r\n\r\n CodeTypeValue: action.e.CodeTypeValue\r\n }\r\n };\r\n}\r\n\r\n\r\nexport function UpdateClearingHouse(state, action) {\r\n var lastClearingHouseCode = \"\";\r\n var ClearingHouses = state.custodian.ClearingHouse;\r\n lastClearingHouseCode =\r\n ClearingHouses[state.IndexEditClearingHouse].CustodyClearingHouseCode;\r\n ClearingHouses[state.IndexEditClearingHouse] =\r\n action.action.custodianClearingHouse;\r\n ClearingHouses[\r\n state.IndexEditClearingHouse\r\n ].CustodianEntityClearingHouseCodeChange = lastClearingHouseCode;\r\n action.action.custodianClearingHouse;\r\n ClearingHouses[state.IndexEditClearingHouse].CustodyClearingHouseChangeType =\r\n \"Edit\";\r\n return {\r\n ...state,\r\n custodian: {\r\n ...state.custodian,\r\n ClearingHouse: ClearingHouses\r\n }\r\n };\r\n}\r\n\r\nexport function UpdateCodeType(state, action) {\r\n var lastCodeId = \"\";\r\n var CodeTypes = state.custodian.CodeType;\r\n lastCodeId = CodeTypes[state.IndexEditCodeType].CodeTypeId;\r\n CodeTypes[state.IndexEditCodeType] = action.action.custodianCodeType;\r\n CodeTypes[state.IndexEditCodeType].CustodianEntityCodeTypeChange = lastCodeId;\r\n action.action.custodianCodeType;\r\n CodeTypes[state.IndexEditCodeType].CustodyCodeTypeChangeType =\r\n \"Edit\";\r\n return {\r\n ...state,\r\n custodian: {\r\n ...state.custodian,\r\n CodeType: CodeTypes\r\n }\r\n };\r\n}\r\n\r\nexport function DeleteClearingHouse(state, action) {\r\n var CustodianClearingHouses = state.custodian.ClearingHouse;\r\n CustodianClearingHouses[action.action].CustodyClearingHouseChangeType =\r\n \"Delete\";\r\n\r\n return {\r\n ...state,\r\n custodian: {\r\n ...state.custodian,\r\n ClearingHouse: CustodianClearingHouses\r\n }\r\n };\r\n}\r\n\r\nexport function DeleteCodeType(state, action) {\r\n var CustodianCodeTypes = state.custodian.CodeType;\r\n CustodianCodeTypes[action.action].CodeTypeChangeType =\r\n \"Delete\";\r\n CustodianCodeTypes[action.action].CodeTypeDelete = true;\r\n\r\n return {\r\n ...state,\r\n custodian: {\r\n ...state.custodian,\r\n CodeType: CustodianCodeTypes,\r\n CodeTypeChangeType: \"\"\r\n }\r\n };\r\n}\r\n\r\nexport function GetContact(state, action) {\r\n return {\r\n ...state,\r\n custodianContact: {\r\n ...state.custodianContact,\r\n CustodianEntityContactName: action.e.CustodianEntityContactName,\r\n CustodianEntityContactEmail1: action.e.CustodianEntityContactEmail1,\r\n CustodianEntityContactEmail2: action.e.CustodianEntityContactEmail2,\r\n CustodianEntityContactTel1: action.e.CustodianEntityContactTel1,\r\n CustodianEntityContactTel2: action.e.CustodianEntityContactTel2,\r\n CustodianEntityContactType: action.e.CustodianEntityContactType,\r\n CustodianEntityContactNotes: action.e.CustodianEntityContactNotes,\r\n CustodianEntityContactTicketConfirmation:\r\n action.e.CustodianEntityContactTicketConfirmation,\r\n CustodianEntityContactChangeType:\r\n action.e.CustodianEntityContactChangeType\r\n }\r\n };\r\n}\r\n\r\nexport function UpdateContact(state, action) {\r\n var Contacts = state.custodian.Contact;\r\n Contacts[state.IndexEditContact] = action.action.custodianContact;\r\n return {\r\n ...state,\r\n custodian: {\r\n ...state.custodian,\r\n Contact: Contacts\r\n }\r\n };\r\n}\r\n\r\nexport function DeleteContact(state, action) {\r\n var CustodianContacts = [];\r\n CustodianContacts = state.custodian.Contact.splice(action.action, 1);\r\n return {\r\n ...state,\r\n custodian: {\r\n ...state.custodian,\r\n Contact: state.custodian.Contact\r\n }\r\n };\r\n}\r\n\r\nexport function resetClearingHouse(state, action) {\r\n var clearingHouse = \"\";\r\n var clearingHouseName = \"\";\r\n if (state.custodianClearingHouse.clearingHouseNames.length > 0) {\r\n clearingHouse = state.custodianClearingHouse.clearingHouseNames[0].id;\r\n clearingHouseName = state.custodianClearingHouse.clearingHouseNames[0].name;\r\n }\r\n return {\r\n ...state,\r\n custodianClearingHouse: {\r\n ...state.custodianClearingHouse,\r\n CustodyClearingHouseCode: \"\",\r\n ClearingHouseId: clearingHouse,\r\n clearingHouseName: clearingHouseName,\r\n CustodyClearingHouseIsDefault: false,\r\n CustodyClearingHouseSettlementInstructions: \"\",\r\n CustodianEntityClearingHouseStatus: \"Active\",\r\n CustodianEntityClearingHouseCodeChange: \"\",\r\n CustodyClearingHouseChangeType: \"\"\r\n }\r\n };\r\n}\r\n\r\nexport function resetCodeType(state, action) {\r\n var CodeTypeId = \"\";\r\n var CodeTypeName = \"\";\r\n if (state.CodeTypeNames.length > 0) {\r\n CodeTypeId = state.CodeTypeNames[0].CodeTypeId;\r\n CodeTypeName = state.CodeTypeNames[0].CodeTypeName;\r\n }\r\n return {\r\n ...state,\r\n custodianCodeType: {\r\n ...state.custodianCodeType,\r\n CodeTypeId: CodeTypeId,\r\n CodeTypeName: CodeTypeName,\r\n CodeTypeValue: \"\",\r\n CodeTypeChangeType: \"\"\r\n }\r\n };\r\n}\r\n\r\nexport function resetContact(state, action) {\r\n var contactType = \"\";\r\n if (state.custodianContact.contactTypes.length > 0) {\r\n contactType = state.custodianContact.contactTypes[0];\r\n }\r\n return {\r\n ...state,\r\n custodianContact: {\r\n ...state.custodianContact,\r\n CustodianEntityContactName: \"\",\r\n CustodianEntityContactEmail1: \"\",\r\n CustodianEntityContactEmail2: \"\",\r\n CustodianEntityContactTel1: \"\",\r\n CustodianEntityContactTel2: \"\",\r\n CustodianEntityContactType: contactType,\r\n CustodianEntityContactNotes: \"\",\r\n CustodianEntityContactTicketConfirmation: false\r\n }\r\n };\r\n}\r\n\r\nexport function getCustodianEntity(state, action) {\r\n var contacts = [];\r\n var clearingHouses = [];\r\n var codeTypes = [];\r\n if (action.response.custodianEntity.Contact !== undefined) {\r\n contacts = action.response.custodianEntity.Contact;\r\n }\r\n if (action.response.custodianEntity.ClearingHouse !== undefined) {\r\n clearingHouses = action.response.custodianEntity.ClearingHouse;\r\n }\r\n if (action.response.custodianEntity.CodeType !== undefined) {\r\n codeTypes = action.response.custodianEntity.CodeType;\r\n }\r\n return {\r\n ...state,\r\n custodian: {\r\n ...state.custodian,\r\n CustodianEntityId: 0,\r\n CustodianEntityName: action.response.custodianEntity.CustodianEntityName,\r\n LegalInstitutionCode:\r\n action.response.custodianEntity.LegalInstitutionCode,\r\n CountryId: action.response.custodianEntity.CountryId,\r\n CountryName: action.response.custodianEntity.CountryName,\r\n CustodianEntityLogo: action.response.custodianEntity.CustodianEntityLogo,\r\n CustodianEntityFileType:\r\n action.response.custodianEntity.CustodianEntityFileType,\r\n CustodianEntityAddress:\r\n action.response.custodianEntity.CustodianEntityAddress,\r\n CustodianEntityTAXId:\r\n action.response.custodianEntity.CustodianEntityTAXId,\r\n CustodianEntityTaxDocument:\r\n action.response.custodianEntity.CustodianEntityTaxDocument,\r\n CustodianEntityURL: action.response.custodianEntity.CustodianEntityURL,\r\n CustodianEntityIntroducedBy:\r\n action.response.custodianEntity.CustodianEntityIntroducedBy,\r\n CustodianEntitySwift:\r\n action.response.custodianEntity.CustodianEntitySwift,\r\n CustodianEntityNotes:\r\n action.response.custodianEntity.CustodianEntityNotes,\r\n CustodianEntityPendingLimit:\r\n action.response.custodianEntity.CustodianEntityPendingLimit,\r\n CustodianEntityIsExchangeListed:\r\n action.response.custodianEntity.CustodianEntityIsExchangeListed,\r\n CustodianEntityHasInvestmentGrade:\r\n action.response.custodianEntity.CustodianEntityHasInvestmentGrade,\r\n CustodianEntityIsBank:\r\n action.response.custodianEntity.CustodianEntityIsBank,\r\n LegalCustodianCode: action.response.custodianEntity.LegalCustodianCode,\r\n CustodianEntityReference:action.response.custodianEntity.CustodianEntityReference,\r\n Contact: contacts,\r\n ClearingHouse: clearingHouses,\r\n CodeType: codeTypes\r\n }\r\n };\r\n}\r\n\r\nexport function resetCustodianEntity(state, action) {\r\n return {\r\n ...state,\r\n custodian: {\r\n CustodianEntityId: 0,\r\n CustodianEntityName: \"\",\r\n LegalInstitutionCode: \"\",\r\n CountryId: 0,\r\n CountryName: \"\",\r\n CustodianEntityLogo: \"\",\r\n CustodianEntityFileType: \"\",\r\n CustodianEntityAddress: \"\",\r\n CustodianEntityTAXId: \"\",\r\n CustodianEntityTaxDocument: \"\",\r\n CustodianEntityURL: \"\",\r\n CustodianEntityIntroducedBy: \"\",\r\n CustodianEntitySwift: \"\",\r\n CustodianEntityNotes: \"\",\r\n CustodianEntityPendingLimit: 0,\r\n CustodianEntityIsExchangeListed: false,\r\n CustodianEntityHasInvestmentGrade: false,\r\n CustodianEntityIsBank: false,\r\n LegalCustodianCode: \"\",\r\n CustodianEntityReference:\"\",\r\n countries: [],\r\n taxDocument: [],\r\n Contact: [],\r\n ClearingHouse: [],\r\n CodeType: []\r\n },\r\n custodianContact: {\r\n CustodianEntityContactName: \"\",\r\n CustodianEntityContactEmail1: \"\",\r\n CustodianEntityContactEmail2: \"\",\r\n CustodianEntityContactTel1: \"\",\r\n CustodianEntityContactTel2: \"\",\r\n CustodianEntityContactType: \"\",\r\n contactTypes: [],\r\n CustodianEntityContactNotes: \"\",\r\n CustodianEntityContactTicketConfirmation: false,\r\n CustodianEntityContactChangeType: \"\"\r\n },\r\n custodianClearingHouse: {\r\n CustodyClearingHouseCode: \"\",\r\n ClearingHouseId: \"\",\r\n clearingHouseName: \"\",\r\n clearingHouseNames: [],\r\n CustodyClearingHouseIsDefault: false,\r\n CustodyClearingHouseSettlementInstructions: \"\",\r\n CustodianEntityClearingHouseStatus: \"\",\r\n CustodianEntityClearingHouseCodeChange: \"\",\r\n CustodyClearingHouseChangeType: \"\"\r\n },\r\n custodianCodeType: {\r\n CodeTypeId: 0,\r\n CodeTypeValue: \"\",\r\n CodeTypeChangeType: \"\"\r\n },\r\n CodeTypeNames: [],\r\n loadingConfirmCustodianEntity: false,\r\n messageConfirmCustodianEntity: false,\r\n errors: {}\r\n };\r\n}\r\n","import React, { useReducer, useEffect, useState } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Col, Row, Container, Input, Label } from \"reactstrap\";\r\nimport { initialize, defaultState } from \"./store/store\";\r\nimport style from \"./Custody.module.scss\";\r\nimport { custodyReducer, validateForm } from \"./store/reducer\";\r\nimport Footer from \"./Footer\";\r\nimport { Numeric, Combobox, Field } from \"../Order/Field/Field\";\r\nimport Symbol from \"../IO/Fields/Symbol\";\r\nimport Account from \"../IO/Fields/Account\";\r\nimport { CustodyLock, getIntStatusName, CustodyIntStatus } from \"../../Custody/types\";\r\nimport { Mode } from \"../../../utils\";\r\nimport { getEnabledStatus } from \"./utils\";\r\nimport { InternalStatus } from \"./../../Custody/Items\";\r\nimport CircularProgress from \"../../CircularProgress/CircularProgress\";\r\nimport { showToast } from \"../../../utils/Helper\";\r\n\r\nconst Custody = ({ open, toggle, services, role, opsViewAccountName, ...props }) => {\r\n const [state, dispatch] = useReducer(custodyReducer, defaultState(), initialize(props));\r\n const { fields, custody, ui } = state;\r\n const { errors, readonly } = fields;\r\n\r\n const [AssetPhysicalDenomination, setAssetPhysicalDenomination] = useState(false);\r\n const [denominationsUsed, setDenominationsUsed] = useState([]);\r\n const [denominations, setDenominations] = useState([]);\r\n const [custodyHasDenomination, setHasDenomination] = useState(\r\n custody.custodyHasDenomination ? custody.custodyHasDenomination : true\r\n );\r\n\r\n useEffect(() => {\r\n if (props.retriveAsync && ui.loading) {\r\n services.fetchGetCustody({ id: custody.id }).then((r) => {\r\n dispatch({ type: \"SET_CUSTODY\", custody: r.custody });\r\n });\r\n }\r\n\r\n dispatch({ type: \"SET_INITIALS_READONLY\" });\r\n }, []);\r\n\r\n const onChange = (fields) => {\r\n dispatch({ type: \"CHANGE_FIELDS\", fields });\r\n };\r\n\r\n const precheck = () => {\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.PRECHECK });\r\n const hasErrors = validateForm(state);\r\n\r\n if (!hasErrors) {\r\n let order = {\r\n OrderQuantityIsCash: \"false\",\r\n OrderSide: \"Sell\",\r\n AssetId: state.custody.assetid,\r\n CurrentAccount: {\r\n AccountId: state.custody.AccountId,\r\n Quantity: state.custody.volume,\r\n },\r\n };\r\n let custodysdt = {\r\n ...custody,\r\n externaldate:\r\n custody.externaldate === \"0000-00-00\" || custody.externaldate === \"\"\r\n ? custody.date\r\n : custody.externaldate,\r\n };\r\n services.precheck({ custodysdt, order }).then((r) => {\r\n if (r.validation.result.Code == 200) {\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.CONFIRM });\r\n } else {\r\n showToast(r.validation.result.Description, true);\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.EDIT });\r\n }\r\n });\r\n }\r\n };\r\n\r\n const confirm = () => {\r\n dispatch({ type: \"CHANGE_BUTTON_PROPS\", props: { confirm: { loading: true } } });\r\n\r\n services\r\n .fetchUpdateCustody({\r\n k2btrnmode: custody.id ? \"UPD\" : \"INS\",\r\n custody: {\r\n ...custody,\r\n assetid: custody.assetid,\r\n externaldate: custody.externaldate === \"0000-00-00\" ? custody.date : custody.externaldate,\r\n denominations: custody.denominationUsed,\r\n },\r\n })\r\n .then((r) => {\r\n if (r.result.Code === 200) toggle();\r\n //alert(\"Ok: \" + r.result.Description);\r\n else {\r\n showToast(\"Error: \" + r.result.Description, \"error\");\r\n dispatch({ type: \"CHANGE_BUTTON_PROPS\", props: { confirm: { loading: false } } });\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.PRECHECK });\r\n }\r\n });\r\n };\r\n\r\n const downloadFile = (type) => {\r\n services.fetchCustodyPdf({ id: custody.id });\r\n };\r\n\r\n useEffect(() => {\r\n if (custody) {\r\n if (custody.assetid) {\r\n services.fetchGetAssetInformation({ assetId: custody.assetid }).then((response) => {\r\n setAssetPhysicalDenomination(response.info.AssetPhysicalDenomination);\r\n onChange({ assetHasDenomination: response.info.AssetPhysicalDenomination });\r\n });\r\n }\r\n }\r\n }, [custody.assetid]);\r\n\r\n useEffect(() => {\r\n if (AssetPhysicalDenomination && custody.id) {\r\n const payload = {\r\n custodyLockReleaseId: custody.id,\r\n };\r\n services\r\n .getDenominationsByCustodyLock(payload)\r\n .then((response) => {\r\n setDenominationsUsed(response.denominations);\r\n //setDenominations(response.denominations);\r\n onChange({ denominationUsed: response.denominations });\r\n })\r\n .catch((err) => console.error(\"Error: \", err));\r\n //setDenominationsUsed(trade.denominationsUsed);\r\n }\r\n }, [AssetPhysicalDenomination]);\r\n\r\n useEffect(() => {\r\n if (AssetPhysicalDenomination && custody.accountId && custody.assetid) {\r\n const payload = {\r\n BasicAccountId: custody.accountId,\r\n AssetId: custody.assetid,\r\n BalanceType: custody.balancetype ? custody.balancetype : \"Current\",\r\n BookType: \"Self\",\r\n };\r\n services.getAvailableDenominationsByAccount(payload).then((response) => {\r\n setDenominations(response.response ? response.response.denominations : response.denominations);\r\n });\r\n }\r\n }, [AssetPhysicalDenomination, custody.accountId, custody.assetid]);\r\n\r\n useEffect(() => {\r\n if (custody.custodyHasDenomination != undefined) {\r\n setHasDenomination(custody.custodyHasDenomination);\r\n }\r\n }, [custody.custodyHasDenomination]);\r\n\r\n const onChangeDenomination = (checked, value, index) => {\r\n let denominationResult = denominationsUsed;\r\n if (checked) {\r\n const denominationAdd = [...denominationsUsed, { key: index, DenominationId: value }];\r\n setDenominationsUsed(denominationAdd);\r\n denominationResult = denominationAdd;\r\n } else {\r\n const updatedDenomination = denominationsUsed.filter((item) => item.DenominationId !== value);\r\n setDenominationsUsed(updatedDenomination);\r\n denominationResult = updatedDenomination;\r\n }\r\n onChange({ denominationUsed: denominationResult });\r\n };\r\n\r\n return (\r\n \r\n Custody\r\n \r\n
    \r\n {ui.loading && }\r\n {!ui.loading && (\r\n \r\n \r\n {/* Left */}\r\n \r\n {/* Date */}\r\n \r\n onChange({ date: e.target.value })}\r\n />\r\n \r\n\r\n {/* ##### Volume ###### */}\r\n \r\n onChange({ volume: v })}\r\n invalid={!!errors.volume}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n\r\n {/* ##### Symbol ###### */}\r\n \r\n onChange({\r\n assetid: v.AssetId,\r\n assetticker: v.AssetTicker,\r\n })\r\n }\r\n error={errors.assetticker}\r\n disabled={readonly.assetticker}\r\n value={custody.assetticker}\r\n fetchSearchSymbol={services.fetchSearchSymbol}\r\n />\r\n {custody.id != undefined && (\r\n \r\n \r\n \r\n
    {InternalStatus(custody.actualstatus)}
    \r\n
    \r\n \r\n \r\n \r\n ({\r\n id: key,\r\n description: getIntStatusName(key),\r\n }))}\r\n disabled={custody.actualstatus == CustodyIntStatus.Returned || role == \"Advisor\"}\r\n invalid={!!errors.internalstatus}\r\n onChange={(v) => onChange({ internalstatus: v })}\r\n emptyLabel={\"Internal Status\"}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n
    \r\n )}\r\n \r\n\r\n {/* Right */}\r\n \r\n {/* ##### Account ###### */}\r\n onChange(dispatch, f)}\r\n filter={[]}\r\n hideInstruction={true}\r\n hideHolder={true}\r\n readonly={{\r\n AccountName: readonly.accountName,\r\n }}\r\n errors={{\r\n AccountName: errors.accountName,\r\n }}\r\n services={{\r\n fetchSearchAccount: services.fetchSearchAccount,\r\n }}\r\n />\r\n\r\n {custody.internalstatus != CustodyIntStatus.ClientRequest &&\r\n custody.internalstatus != CustodyIntStatus.CustodianRequest && (\r\n \r\n {/* Date */}\r\n \r\n onChange({ externaldate: e.target.value })}\r\n />\r\n \r\n\r\n {/* Reference */}\r\n \r\n onChange({ reference: e.target.value })}\r\n />\r\n \r\n\r\n {/* Doc Reference */}\r\n \r\n onChange({ docreference: e.target.value })}\r\n />\r\n \r\n \r\n )}\r\n\r\n {/* Documents */}\r\n {custody.internalstatus != CustodyIntStatus.ClientRequest && (\r\n \r\n
    \r\n downloadFile(\"detail\")}>\r\n \r\n {\"Custody detail PDF\"}\r\n \r\n
    \r\n
    \r\n )}\r\n \r\n
    \r\n \r\n {AssetPhysicalDenomination && custodyHasDenomination && (\r\n // && isGeneratedFrom == \"Default\"\r\n
    \r\n
    \r\n
    \r\n \r\n Denomination\r\n \r\n \r\n
    \r\n\r\n
    \r\n {denominations.map((denomination, key) => {\r\n const isChecked = denominationsUsed.some(\r\n (item) => item.DenominationId === denomination.DenominationId\r\n );\r\n return (\r\n
    \r\n \r\n \r\n item.tradeIsAlreadyConfirmed === true)\r\n // : false\r\n }\r\n onChange={(e) => {\r\n onChangeDenomination(e.target.checked, denomination.DenominationId, key);\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n )}\r\n
    \r\n
    \r\n )}\r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport function validation(custody) {\r\n if (!custody.assetHasDenomination) {\r\n if (custody.accountNumber === null){\r\n return {\r\n AccountNumber: {empty: true},\r\n AccountName: {empty: false},\r\n volume: { empty: true },\r\n assetticker: { empty: true, autosuggestId: \"assetid\" },\r\n };\r\n }\r\n else{\r\n return {\r\n accountNumber: {empty: true},\r\n accountName: {empty: false},\r\n volume: { empty: true },\r\n assetticker: { empty: true, autosuggestId: \"assetid\" },\r\n };\r\n }\r\n } else {\r\n return {\r\n accountNumber: {empty: true},\r\n accountName: {empty: false},\r\n volume: { empty: true },\r\n assetticker: { empty: true, autosuggestId: \"assetid\" },\r\n denominationUsed: {\r\n empty: !custody.assetHasDenomination ? false : true,\r\n hasdenomination: true,\r\n },\r\n };\r\n }\r\n}\r\n\r\nexport default Custody;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"Custody-module_modal_32m5I\",\"body\":\"Custody-module_body_39ZFx\",\"form\":\"Custody-module_form_1TZ6Z\",\"fileList\":\"Custody-module_fileList_3OaeS\",\"link\":\"Custody-module_link_Qd5Ss\",\"box\":\"Custody-module_box_3w5TQ\"};","import React, { useContext } from \"react\";\r\nimport { Button } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport classnames from \"classnames\";\r\nimport style from \"./Custody.module.scss\";\r\nimport { Mode } from \"../../../utils\";\r\n\r\nconst Footer = ({ toggle, buttons, actions, dispatch }) => {\r\n const { precheck, modify, confirm } = buttons;\r\n\r\n return (\r\n
    \r\n {\" \"}\r\n {modify.visible && (\r\n \r\n )}{\" \"}\r\n {precheck.visible && (\r\n actions.precheck()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {\"Pre check\"}\r\n \r\n )}\r\n {confirm.visible && (\r\n actions.confirm()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {\"Confirm\"}\r\n \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nexport default Footer;\r\n","import React, { useReducer, useEffect, useState } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Col, Row, Container, Input, Label } from \"reactstrap\";\r\nimport { initialize, defaultState } from \"./store/store\";\r\nimport style from \"./Custody.module.scss\";\r\nimport { custodyReducer, validateForm } from \"./store/reducer\";\r\nimport Footer from \"./Footer\";\r\nimport { Numeric, Combobox, Field } from \"../Order/Field/Field\";\r\nimport Symbol from \"./components/Symbol\";\r\nimport Account from \"../IO/Fields/Account\";\r\nimport { Mode } from \"../../../utils\";\r\nimport CircularProgress from \"../../CircularProgress/CircularProgress\";\r\nimport { showToast } from \"../../../utils/Helper\";\r\n\r\nconst Custody = ({ open, toggle, updateCustodies, services, role, ...props }) => {\r\n const [state, dispatch] = useReducer(custodyReducer, defaultState(), initialize(props));\r\n const { fields, custody, ui } = state;\r\n const { errors, readonly } = fields;\r\n const [displayMessage, setDisplayMessage] = React.useState(false);\r\n\r\n const [AssetPhysicalDenomination, setAssetPhysicalDenomination] = useState(false);\r\n const [denominationsUsed, setDenominationsUsed] = useState([]);\r\n const [denominations, setDenominations] = useState([]);\r\n\r\n const todayDate = new Date().toDateLocal();\r\n state.custody.internalstatus = \"Executed\";\r\n state.custody.externalstatus = \"Printed\";\r\n useEffect(() => {\r\n if (props.retriveAsync && ui.loading) {\r\n services.fetchGetCustody({ id: custody.id }).then((r) => {\r\n dispatch({ type: \"SET_CUSTODY\", custody: r.custody });\r\n });\r\n }\r\n\r\n dispatch({ type: \"SET_INITIALS_READONLY\" });\r\n }, []);\r\n\r\n const onChange = (fields) => {\r\n setDisplayMessage(false);\r\n dispatch({ type: \"CHANGE_FIELDS\", fields });\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.EDIT });\r\n };\r\n\r\n const precheck = () => {\r\n state.fields.errors = {};\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.PRECHECK });\r\n let hasErrors = validateForm(state);\r\n if (!hasErrors) {\r\n let order = {\r\n OrderQuantityIsCash: \"false\",\r\n OrderSide: \"Sell\",\r\n AssetId: state.custody.assetid,\r\n CurrentAccount: {\r\n AccountId: state.custody.AccountId,\r\n Quantity: state.custody.volume,\r\n },\r\n };\r\n let custodysdt = {\r\n ...custody,\r\n externaldate:\r\n custody.externaldate === \"0000-00-00\" || custody.externaldate === \"\"\r\n ? custody.date\r\n : custody.externaldate,\r\n };\r\n services.precheck({ custodysdt, order }).then((r) => {\r\n if (r.validation.result.Code == 200) {\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.CONFIRM });\r\n } else {\r\n showToast(r.validation.result.Description, true);\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.EDIT });\r\n }\r\n });\r\n }\r\n };\r\n\r\n const confirm = () => {\r\n dispatch({\r\n type: \"CHANGE_FIELDS\",\r\n fields: { assetid: custody.AssetId, accountId: state.custody.AccountId },\r\n });\r\n dispatch({ type: \"CHANGE_BUTTON_PROPS\", props: { confirm: { loading: true } } });\r\n services\r\n .fetchUpdateCustody({\r\n k2btrnmode: \"INS\",\r\n custody: {\r\n ...custody,\r\n accountId: custody.AccountId,\r\n assetid: custody.assetid,\r\n externaldate: custody.externaldate === \"0000-00-00\" ? custody.date : custody.externaldate,\r\n denominations: custody.denominationUsed,\r\n },\r\n })\r\n .then((r) => {\r\n if (r.result.Code === 200) {\r\n toggle();\r\n updateCustodies();\r\n showToast(\"Ok: custody addded with the id: \" + r.id, false);\r\n } else {\r\n showToast(r.result.Description, true);\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.EDIT });\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n if (custody) {\r\n if (custody.assetid) {\r\n services.fetchGetAssetInformation({ assetId: custody.assetid }).then((response) => {\r\n setAssetPhysicalDenomination(response.info.AssetPhysicalDenomination);\r\n onChange({ assetHasDenomination: response.info.AssetPhysicalDenomination });\r\n });\r\n }\r\n }\r\n }, [custody.assetid]);\r\n\r\n useEffect(() => {\r\n if (AssetPhysicalDenomination && custody.id) {\r\n const payload = {\r\n custodyLockReleaseId: custody.id,\r\n };\r\n // getDenominationsByCustody(payload)\r\n // .then((response) => {\r\n // setDenominationsUsed(response.response.denominations);\r\n // })\r\n // .catch((err) => console.Error(\"Error: \", err));\r\n //setDenominationsUsed(trade.denominationsUsed);\r\n }\r\n }, [AssetPhysicalDenomination, custody]);\r\n\r\n useEffect(() => {\r\n if (AssetPhysicalDenomination && custody.AccountId && custody.assetid) {\r\n const payload = {\r\n BasicAccountId: custody.AccountId,\r\n AssetId: custody.assetid,\r\n BalanceType: \"Current\",\r\n BookType: \"Self\",\r\n };\r\n services.getAvailableDenominationsByAccount(payload).then((response) => {\r\n setDenominations(response.denominations);\r\n });\r\n }\r\n }, [AssetPhysicalDenomination, custody.AccountId, custody.assetid]);\r\n\r\n const onChangeDenomination = (checked, value, index) => {\r\n let denominationResult = denominationsUsed;\r\n if (checked) {\r\n const denominationAdd = [...denominationsUsed, { key: index, DenominationId: value }];\r\n setDenominationsUsed(denominationAdd);\r\n denominationResult = denominationAdd;\r\n } else {\r\n const updatedDenomination = denominationsUsed.filter((item) => item.DenominationId !== value);\r\n setDenominationsUsed(updatedDenomination);\r\n denominationResult = updatedDenomination;\r\n }\r\n onChange({ denominationUsed: denominationResult });\r\n };\r\n\r\n return (\r\n \r\n Custody\r\n \r\n
    \r\n {ui.loading && }\r\n {!ui.loading && (\r\n \r\n \r\n {/* Left */}\r\n \r\n {/* Date */}\r\n \r\n onChange({ date: e.target.value })}\r\n />\r\n \r\n\r\n {/* ##### Volume ###### */}\r\n \r\n onChange({ volume: v })}\r\n invalid={!!errors.volume}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n\r\n {/* ##### Symbol ###### */}\r\n \r\n onChange({\r\n assetid: v.AssetId,\r\n assetticker: v.AssetTicker,\r\n })\r\n }\r\n error={errors.assetticker}\r\n value={custody.assetticker}\r\n accountId={custody.AccountId}\r\n fetchSearchSymbol={services.fetchSearchSymbol}\r\n />\r\n {\r\n \r\n \r\n \r\n
    \r\n {\"-\"}\r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n {\"Executed\"}\r\n
    \r\n
    \r\n \r\n
    \r\n }\r\n \r\n\r\n {/* Right */}\r\n \r\n {/* ##### Account ###### */}\r\n onChange(f)}\r\n filter={[]}\r\n hideInstruction={true}\r\n hideHolder={true}\r\n readonly={{\r\n AccountNumber: true,\r\n AccountName: false,\r\n }}\r\n errors={{\r\n AccountNumber: errors.AccountNumber,\r\n AccountName: errors.AccountName,\r\n }}\r\n services={{\r\n fetchSearchAccount: services.fetchSearchAccount,\r\n }}\r\n />\r\n {\r\n \r\n {/* Date */}\r\n \r\n onChange({ externaldate: e.target.value })}\r\n />\r\n \r\n\r\n {/* Reference */}\r\n \r\n onChange({ reference: e.target.value })}\r\n />\r\n \r\n\r\n {/* Doc Reference */}\r\n \r\n onChange({ docreference: e.target.value })}\r\n />\r\n \r\n \r\n }\r\n \r\n
    \r\n \r\n {AssetPhysicalDenomination && (\r\n
    \r\n
    \r\n
    \r\n \r\n Denomination\r\n \r\n \r\n
    \r\n\r\n
    \r\n {denominations.map((denomination, key) => {\r\n const isChecked = denominationsUsed.some(\r\n (item) => item.DenominationId === denomination.DenominationId\r\n );\r\n return (\r\n
    \r\n \r\n \r\n item.tradeIsAlreadyConfirmed === true)\r\n : false\r\n }\r\n onChange={(e) => {\r\n onChangeDenomination(e.target.checked, denomination.DenominationId, key);\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n )}\r\n
    \r\n
    \r\n )}\r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport function validation(custody) {\r\n return {\r\n accountNumber: {empty: true},\r\n accountName: {empty: false},\r\n volume: { empty: true },\r\n assetticker: { empty: true, autosuggestId: \"assetid\" },\r\n };\r\n}\r\n\r\nexport default Custody;\r\n","import React from \"react\";\r\nimport style from \"./../../IO/Fields/Fields.module.scss\";\r\nimport { Field } from \"../../Order/Field/Field\";\r\nimport Autosuggest from \"../../../Autosuggest/Autosuggest\";\r\nimport { IOType } from \"../../../IO/types\";\r\n\r\nconst Symbol = ({ ioType, isCurrency, value, error, disabled, accountId, onChange, fetchSearchSymbol }) => {\r\n const fetchSearch = ({ value }) => {\r\n return fetchSearchSymbol({\r\n type: \"Event\",\r\n text: value,\r\n length: 10,\r\n accountId: ioType != null && ioType != IOType.Deposit ? accountId : 0,\r\n })\r\n .then((r) => r.response.symbols)\r\n .then((symbols) =>\r\n symbols.map((s) => ({\r\n id: s.Id,\r\n name: `${s.Ticker} ${isCurrency ? `- ${s.Description}` : \"\"}`,\r\n decimal: Number(s.decimal),\r\n Price: s.price,\r\n }))\r\n );\r\n };\r\n\r\n const internalOnChange = (method, value) => {\r\n const _value = {\r\n CurrencyId: null,\r\n CurrencyISO: \"\",\r\n AssetId: null,\r\n AssetTicker: \"\",\r\n decimal: 2,\r\n };\r\n if (method != \"type\" && value.id) {\r\n if (isCurrency) {\r\n _value.CurrencyId = value.id;\r\n _value.CurrencyISO = value.name;\r\n _value.decimal = 2;\r\n } else {\r\n _value.AssetId = value.id;\r\n _value.AssetTicker = value.name;\r\n _value.decimal = value.decimal;\r\n _value.Price = value.Price;\r\n }\r\n }\r\n\r\n onChange(_value);\r\n };\r\n\r\n return (\r\n \r\n (\r\n
    \r\n {suggestion.name}\r\n
    \r\n )}\r\n getSuggestionValue={(s) => `${s.name}`}\r\n onSuggestionsFetchRequested={fetchSearch}\r\n value={value || \"\"}\r\n inputProps={{\r\n placeholder: isCurrency ? \"Currency\" : \"Asset\",\r\n invalid: !!error,\r\n disabled: disabled || (ioType != null && ioType != IOType.Deposit && !accountId),\r\n }}\r\n onChange={(m, v) => internalOnChange(m, v)}\r\n />\r\n \r\n );\r\n};\r\n\r\nexport default Symbol;\r\n","import { mergeDeep } from \"../../../../utils/Helper\";\r\nimport { Mode } from \"../../../../utils\";\r\nimport { validation } from \"../Custody\";\r\nimport { CustodyIntStatus } from \"../../../Custody/types\";\r\n\r\nexport const custodyReducer = (state, action) => {\r\n switch (action.type) {\r\n case \"CHANGE_MODE\":\r\n switch (action.mode) {\r\n case Mode.EDIT:\r\n return processEdit(state);\r\n case Mode.PRECHECK:\r\n return processPrecheck(state);\r\n case Mode.CONFIRM:\r\n return processConfirm(state);\r\n default:\r\n return state;\r\n }\r\n case \"SET_CUSTODY\":\r\n return processSetCustody(state, action.custody);\r\n\r\n case \"SET_INITIALS_READONLY\":\r\n return processSetInitialsReadOnly(state);\r\n case \"CHANGE_FIELDS\":\r\n return processChangeFields(state, action.fields);\r\n case \"CHANGE_BUTTON_PROPS\":\r\n return changeButtonProps(state, action);\r\n default:\r\n return state;\r\n }\r\n};\r\n\r\nfunction processSetCustody(state, custody) {\r\n const { mode } = state.ui;\r\n const readonly = {};\r\n if (mode == Mode.READONLY) {\r\n Object.keys(custody).forEach((f) => {\r\n readonly[f] = true;\r\n });\r\n }\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n loading: false,\r\n },\r\n custody: {\r\n ...custody,\r\n actualstatus: custody.internalstatus,\r\n },\r\n fields: {\r\n readonly,\r\n },\r\n buttons: {\r\n precheck: { visible: mode != Mode.READONLY },\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction processChangeFields(state, fields) {\r\n const errors = Object.keys(fields).reduce((f, name) => {\r\n //f[name] = undefined;\r\n return f;\r\n }, {});\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n custody: {\r\n ...fields,\r\n },\r\n fields: {\r\n errors,\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction processSetInitialsReadOnly(state) {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n fields: {\r\n readonly: {\r\n accountName: true,\r\n assetticker: true,\r\n volume: state.custody.internalstatus != CustodyIntStatus.ClientRequest,\r\n date: true,\r\n },\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction processEdit(state) {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n mode: Mode.EDIT,\r\n },\r\n buttons: {\r\n precheck: {\r\n visible: true,\r\n loading: false,\r\n },\r\n modify: {\r\n visible: false,\r\n },\r\n confirm: {\r\n visible: false,\r\n loading: false,\r\n },\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction processPrecheck(state) {\r\n const errors = validateForm(state);\r\n\r\n if (errors == false) {\r\n const readonly = {};\r\n\r\n Object.keys(state.custody).forEach((f) => {\r\n readonly[f] = true;\r\n });\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n mode: Mode.PRECHECK,\r\n },\r\n buttons: {\r\n precheck: {\r\n loading: true,\r\n },\r\n },\r\n fields: {\r\n readonly,\r\n },\r\n }\r\n );\r\n } else {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n fields: {\r\n errors,\r\n },\r\n }\r\n );\r\n }\r\n}\r\n\r\nfunction processConfirm(state) {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n buttons: {\r\n precheck: {\r\n visible: false,\r\n loading: false,\r\n },\r\n modify: {\r\n visible: true,\r\n },\r\n confirm: {\r\n visible: true,\r\n loading: false,\r\n },\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction changeButtonProps(state, { props }) {\r\n return mergeDeep({ ...state }, { buttons: { ...props } });\r\n}\r\n\r\nexport function validateForm(state) {\r\n const { custody, fields } = state;\r\n const { hiddens } = fields;\r\n const errors = {};\r\n\r\n const validations = validation(custody);\r\n\r\n Object.entries(validations).forEach((entry) => {\r\n const [name, value] = entry;\r\n\r\n if (!hiddens[name]) {\r\n if (value.empty) {\r\n if (custody[name] == undefined || custody[name] === \"\") {\r\n errors[name] = \"Required field\";\r\n } else if (value.autosuggestId && custody[value.autosuggestId] == undefined) {\r\n errors[name] = \"Must select a value from list\";\r\n } else if (!value.hasdenomination && custody[name] <= 0) {\r\n errors[name] = \"the value must be positive\";\r\n } else if (value.hasdenomination && custody[name].length != custody[\"volume\"]) {\r\n errors[name] =\r\n \"Must select \" + parseInt(custody.volume) + \" denominations for the volume selected.\";\r\n }\r\n }\r\n }\r\n });\r\n\r\n // has Errors only add errors to state\r\n if (Object.keys(errors).length !== 0) {\r\n return errors;\r\n }\r\n\r\n return false;\r\n}\r\n","import React from \"react\";\r\nimport { Mode } from \"../../../../utils\";\r\nimport { mergeDeep } from \"../../../../utils/Helper\";\r\nimport { CustodyLock, CustodyIntStatus } from \"../../../Custody/types\";\r\n\r\nexport const initialize = (props) => {\r\n return (initialState) => {\r\n let state = mergeDeep(\r\n { ...initialState },\r\n {\r\n ui: {\r\n mode: props.mode || Mode.EDIT,\r\n loading: props.retriveAsync,\r\n },\r\n custody: {\r\n ...props.custody,\r\n actualstatus: props.custody.internalstatus,\r\n },\r\n }\r\n );\r\n if (state.ui.mode == Mode.READONLY) {\r\n Object.keys(state.custody).forEach((f) => {\r\n state.fields.readonly[f] = true;\r\n });\r\n\r\n state.buttons.precheck.readonly = true;\r\n }\r\n\r\n return state;\r\n };\r\n};\r\n\r\nexport const defaultState = () => ({\r\n ui: {\r\n title: \"Custody\",\r\n mode: Mode.EDIT,\r\n },\r\n fields: {\r\n errors: {},\r\n readonly: {},\r\n hiddens: {},\r\n },\r\n custody: {\r\n id: null,\r\n assetid: null,\r\n assetticker: null,\r\n accountId: null,\r\n accountName: null,\r\n accountNumber: null,\r\n internalstatus: CustodyIntStatus.ClientRequest,\r\n date: new Date().toDateLocal(),\r\n volume: null,\r\n reference: null,\r\n docreference: null,\r\n externaldate: \"0000-00-00\",\r\n type: CustodyLock.LockSelf,\r\n denominationUsed: [],\r\n },\r\n buttons: {\r\n confirm: {\r\n visible: false,\r\n },\r\n precheck: {\r\n visible: true,\r\n },\r\n modify: {\r\n visible: false,\r\n },\r\n },\r\n});\r\n","import { CustodyIntStatus } from \"../../Custody/types\";\r\n\r\n\r\nexport function getEnabledStatus(custody) {\r\n let allInternalStatus = Object.values(CustodyIntStatus);\r\n let skipItems = [];\r\n\r\n if (custody.internalstatus == CustodyIntStatus.CustodianRequest) {\r\n skipItems = [CustodyIntStatus.ClientRequest];\r\n }\r\n else if (custody.internalstatus != CustodyIntStatus.ClientRequest ) {\r\n skipItems = [\r\n CustodyIntStatus.ClientRequest, \r\n CustodyIntStatus.CustodianRequest\r\n ];\r\n }\r\n \r\n if (custody.internalstatus == CustodyIntStatus.Returned) {\r\n skipItems = [...skipItems, CustodyIntStatus.ReturnRequested];\r\n }\r\n\r\n allInternalStatus = allInternalStatus.filter(\r\n s => skipItems.includes(s) == false\r\n );\r\n\r\n return allInternalStatus;\r\n}","import React, { useState } from \"react\";\r\nimport style from \"./styles.module.scss\";\r\nimport { Table, Button, Row, Col, Input } from \"reactstrap\";\r\nimport { Combobox, Field } from \"../../Order/Field/Field\";\r\nimport { Mode } from \"../../../Asset/types\";\r\nimport { BookTypes } from \"../../../../utils/Helper\";\r\n\r\nconst emptyItem = {\r\n currencyId: null,\r\n currencyISO: \"\",\r\n currencyNumber: \"\",\r\n imputableAccountId: null,\r\n imputableAccountName: \"\",\r\n};\r\n\r\nconst CurrencyList = ({ onChange, loadings, items, currencies, imputableAccounts }) => {\r\n const [edit, setEdit] = useState({\r\n open: false,\r\n mode: Mode.Insert,\r\n fields: {},\r\n errors: {},\r\n });\r\n\r\n const openEdit = (item) => {\r\n if (item) {\r\n setEdit({\r\n open: true,\r\n mode: Mode.Update,\r\n fields: { ...item },\r\n errors: {},\r\n });\r\n } else {\r\n setEdit({\r\n open: true,\r\n mode: Mode.Insert,\r\n fields: { ...emptyItem },\r\n errors: {},\r\n });\r\n }\r\n };\r\n\r\n const closeEdit = ({ confirm }) => {\r\n if (confirm) {\r\n const errors = validate(edit, items);\r\n\r\n if (Object.keys(errors).length === 0) {\r\n if (edit.mode === Mode.Insert) {\r\n handleAction(Mode.Insert);\r\n } else {\r\n handleAction(Mode.Update);\r\n }\r\n } else {\r\n setEdit({ ...edit, errors });\r\n return;\r\n }\r\n }\r\n\r\n setEdit({});\r\n };\r\n\r\n const handleAction = (action, item) => {\r\n if (action === Mode.Delete) {\r\n let deletedItem = {\r\n ...item,\r\n };\r\n deletedItem.imputableAccountId = \"\";\r\n deletedItem.currencyNumber = \"\";\r\n deletedItem.imputableAccountId = \"\";\r\n deletedItem.imputableAccountName = \"\";\r\n\r\n onChange({\r\n currencyAccounts: items.map((it) => {\r\n if (item.currencyId == it.currencyId && item.bookType == it.bookType) {\r\n return deletedItem;\r\n }\r\n return it;\r\n }),\r\n });\r\n } else {\r\n const imputableAccount = imputableAccounts.find((e) => e.id == edit.fields.imputableAccountId) || {};\r\n const currency = currencies.find((e) => e.currencyId == edit.fields.currencyId);\r\n const nextFields = {\r\n ...edit.fields,\r\n imputableAccountName: imputableAccount.name,\r\n currencyISO: currency.currencyISO,\r\n };\r\n if (action === Mode.Insert) {\r\n onChange({ currencyAccounts: [...items, nextFields] });\r\n } else if (action === Mode.Update) {\r\n onChange({\r\n currencyAccounts: items.map((item) => {\r\n if (item.currencyId == edit.fields.currencyId && item.bookType == edit.fields.bookType) {\r\n return nextFields;\r\n }\r\n return item;\r\n }),\r\n });\r\n }\r\n }\r\n };\r\n\r\n const handleOnChangeEdit = (fields) => {\r\n setEdit({ ...edit, fields: { ...edit.fields, ...fields } });\r\n };\r\n\r\n if (loadings.imputableAccounts || loadings.currencies) {\r\n return null;\r\n }\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n
    \r\n {edit.open && (\r\n \r\n )}\r\n {!edit.open && (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {items\r\n .map((item, index) => {\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n })}\r\n \r\n
    CurrencyCurrency numberBook typeImputable Account\r\n
    {item.currencyISO}{item.currencyNumber}{item.bookType}{item.imputableAccountName}\r\n \r\n handleAction(Mode.Delete, item)}\r\n >\r\n \r\n \r\n
    \r\n
    \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nconst Edit = ({ mode, item, errors, currencies, imputableAccounts, onChange, toggle }) => {\r\n const filterImputableAccounts = (imputableAccounts, currencySelectedISO) => {\r\n return imputableAccounts.filter((account) => account.currencyIso === currencySelectedISO);\r\n };\r\n \r\n\r\n return (\r\n
    \r\n \r\n {mode === Mode.Insert ? \"Adding new row\" : \"Editing row\"}\r\n \r\n \r\n \r\n \r\n {\r\n const currencySelected = currencies.find((currency) => currency.currencyId === v);\r\n onChange({\r\n currencyId: v,\r\n currencyISO: currencySelected ? currencySelected.currencyISO : \"\",\r\n });\r\n }}\r\n items={Object.values(currencies).map((k) => ({\r\n id: k.currencyId,\r\n description: k.currencyISO,\r\n }))}\r\n />\r\n \r\n \r\n onChange({ currencyNumber: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ imputableAccountId: v })}\r\n emptyLabel=\"Not selected\"\r\n items={[{id : '', description:\"Not selected\"}, ...filterImputableAccounts(imputableAccounts, item.currencyISO).map((key) => ({\r\n id: key.id,\r\n description: key.name,\r\n }))]}\r\n />\r\n \r\n \r\n onChange({ bookType: v })}\r\n emptyLabel=\"Not selected\"\r\n items={Object.keys(BookTypes).map((key) => ({\r\n id: BookTypes[key],\r\n description: BookTypes[key],\r\n }))}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nfunction validate(edit, allItems) {\r\n const errors = {};\r\n const { fields, mode } = edit;\r\n\r\n if (fields.currencyId == \"\" || !fields.currencyId) {\r\n errors.currencyId = \"Required field\";\r\n }\r\n\r\n if (fields.bookType == \"\" || !fields.bookType){\r\n errors.bookType = \"Required field\";\r\n }\r\n\r\n\r\n if (mode === Mode.Insert) {\r\n if (allItems.some((e) => e.currencyId == fields.currencyId && e.bookType == fields.bookType)) {\r\n errors.currencyId = \"Already exists record with this currency\";\r\n errors.bookType = \"Already exists record with this book type\";\r\n }\r\n }\r\n\r\n return errors;\r\n}\r\n\r\nexport default CurrencyList;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"table\":\"styles-module_table_2Nxf5\",\"edit\":\"styles-module_edit_1mhG5\",\"buttons\":\"styles-module_buttons_XcNm9\"};","import React, { useReducer, useEffect, useRef, useState } from \"react\";\r\nimport { defaultState, initialize, CustodySimpleReducer, validateErr } from \"./reducer\";\r\nimport {\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Container,\r\n Row,\r\n Col,\r\n Input,\r\n Button,\r\n Spinner,\r\n UncontrolledDropdown,\r\n DropdownMenu,\r\n DropdownItem,\r\n DropdownToggle,\r\n CustomInput,\r\n FormGroup,\r\n Alert,\r\n} from \"reactstrap\";\r\nimport style from \"./Custody.module.scss\";\r\nimport { Field, Combobox } from \"../Order/Field/Field\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport CustodianEntity from \"../CustodianEntity/CustodianEntity\";\r\nimport { Mode } from \"../../Asset/types\";\r\nimport { LoadingMessage } from \"../Authorization/Processes\";\r\nimport CurrencyList from \"./CurrencyList/CurrencyList\";\r\nimport AutosuggestFund from \"../../Autosuggest/Autosuggest\";\r\nimport CustodyRateTable from \"./CustodyRateRange/CustodyRateTable\";\r\nimport { Numeric } from \"../Order/Field/Field\";\r\nimport CustomAutosuggest from \"./CustomAutosuggest\";\r\n\r\nconst CustodySet = ({ open, custodyRateTable, id, toggle, fetchs, ...props }) => {\r\n const titleRef = useRef();\r\n const [state, dispatch] = useReducer(CustodySimpleReducer, defaultState(), initialize(props));\r\n const [fundManager, setFundManager] = useState(false);\r\n const [errorMsg, setErrorMsg] = useState(null);\r\n const [fund, setFund] = useState({ FundId: 0, FundName: \"\" });\r\n const {\r\n dialogMode,\r\n globalError,\r\n custody,\r\n buttons,\r\n initialized,\r\n errors,\r\n message,\r\n sentAuthorization,\r\n openCustodianEntity,\r\n isEditCustodianEntity,\r\n custodianEntity,\r\n custodianEntityId,\r\n custodianEntityName,\r\n } = state;\r\n\r\n const accountType = [\r\n { id: 1, description: \"Customer\", name: \"Customer\", prop: false },\r\n { id: 2, description: \"In Balance\", name: \"InBalance\", prop: true },\r\n ];\r\n const RechargeCustodianEntity = (id) => {\r\n props.callApi(\"GetCustodianEntity\", {}).then((response) => {\r\n dispatch({ type: \"RECHARGE_CUSTODIAN_ENTITY\", response, id });\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n props.services.isFundManagerSistem().then((r) => {\r\n if (\r\n r.response &&\r\n r.response.SdtParametersData &&\r\n parseInt(r.response.SdtParametersData.ParameterNumericValue) === 1\r\n )\r\n setFundManager(true);\r\n });\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (open && !id) {\r\n dispatch({ type: \"CHANGE_FIELDS\", fields: { currencyAccounts: [] } });\r\n dispatch({ type: \"CHANGE_FIELDS\", fields: { rateRanges: [] } });\r\n }\r\n }, [open]);\r\n\r\n useEffect(() => {\r\n props.callApi(\"GetCustodianEntity\", {}).then((response) => {\r\n dispatch({ type: \"GET_CUSTODIAN_ENTITY\", response });\r\n });\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (id) {\r\n dispatch({ type: \"CHANGE_DIALOG_MODE\", nextMode: Mode.Update });\r\n props.callApi(\"GetCustodyAccount\", { id }).then(({ custody, result }) => {\r\n if (result.Code === 200) {\r\n dispatch({ type: \"LOAD_FOR_EDIT_CUSTODY\", fields: custody });\r\n if (custody.CustodianRelatedAccountId > 0) {\r\n setFund({ FundId: custody.fundCode, FundName: custody.fundName });\r\n }\r\n } else {\r\n dispatch({ type: \"LOAD_FOR_EDIT_CUSTODY\", fields: custody });\r\n alert(result.Description);\r\n }\r\n });\r\n }\r\n }, [id]);\r\n\r\n useEffect(() => {\r\n if (!id) {\r\n if (custodianEntity && custodianEntity.length > 0) {\r\n if (props.currencies && props.currencies.length > 0) {\r\n if (props.imputableAccounts && props.imputableAccounts.length > 0) {\r\n dispatch({ type: \"INITIALIZE_VALUES\", ...props });\r\n }\r\n }\r\n }\r\n }\r\n }, [id, custodianEntity, props.currencies, props.imputableAccounts]);\r\n\r\n const renderSuggestion = (suggestion) => (\r\n
    \r\n {suggestion.isin}\r\n {\" - \"}\r\n {suggestion.name}\r\n
    \r\n );\r\n\r\n const getSuggestionValue = (suggestion) => `${suggestion.isin} - ${suggestion.name}`;\r\n\r\n const onSuggestionsFetchRequested = ({ value }) =>\r\n props.services.fetchGetFunds({ filter: { text: value, offset: 0, length: 20 } }).then((response) =>\r\n response.response.items.map((a) => {\r\n return {\r\n isin: a.AssetISIN,\r\n name: a.AssetName,\r\n id: a.AssetId,\r\n };\r\n })\r\n );\r\n\r\n const onChangeFund = (method, newValue) => {\r\n if (newValue && (method == \"click\" || method == \"enter\")) {\r\n setFund({\r\n FundId: newValue.id,\r\n FundName: newValue.name,\r\n });\r\n onChange({ CustodianRelatedAccountId: newValue.id });\r\n }\r\n };\r\n\r\n const confirm = () => {\r\n dispatch({ type: \"VALIDATE_FIELDS\", ...props });\r\n const error = validateErr(state, fundManager);\r\n if (error == \"\") {\r\n setErrorMsg(null);\r\n dispatch({\r\n type: \"UPDATE_BUTTONS\",\r\n buttons: { confirm: { loading: true } },\r\n });\r\n const action = dialogMode === Mode.Update ? \"UPD\" : \"INS\";\r\n var body = {\r\n action,\r\n custody: { ...custody, entityId: custodianEntityId },\r\n };\r\n props.onSetCustody(\"SetCustody\", body).then((response) => {\r\n if (dialogMode === Mode.Update) {\r\n dispatch({\r\n type: \"UPDATE_BUTTONS\",\r\n buttons: { confirm: { loading: false } },\r\n });\r\n if (response.result.Code === 200) {\r\n props.onClickClose();\r\n } else {\r\n titleRef.current.scrollIntoView();\r\n titleRef.current.focus();\r\n dispatch({\r\n type: \"UPDATE_FIELDS\",\r\n fields: { globalError: response.result.Description },\r\n });\r\n }\r\n } else {\r\n dispatch({ type: \"SENT_AUTHORIZATION\", response });\r\n }\r\n });\r\n } else {\r\n setErrorMsg(error);\r\n }\r\n };\r\n\r\n const onChange = (fields) => dispatch({ type: \"CHANGE_FIELDS\", fields });\r\n\r\n const EditClearingHouse = () => {\r\n dispatch({ type: \"EDIT_CLEARING_HOUSE\", ...props });\r\n };\r\n const onChangeClearingHouse = (fields) => dispatch({ type: \"CLEARING_HOUSES_FIELDS\", fields });\r\n const CancelClearingHouse = () => {\r\n dispatch({ type: \"CLOSE_CLEARING_HOUSE\" });\r\n };\r\n const addClearingHouse = () => {\r\n dispatch({ type: \"ADD_CLEARING_HOUSE\", ...props });\r\n };\r\n const EditClearingHouseId = (c) => dispatch({ type: \"EDIT_CLEARING_HOUSE_ID\", c, ...props });\r\n const SaveEditClearingHouse = () => {\r\n dispatch({ type: \"SAVE_EDIT_CLEARING_HOUSE\", ...props });\r\n };\r\n const onChangeAccountType = (fields) => {\r\n dispatch({ type: \"CHANGE_FIELDS_ACCOUNT_TYPE\", fields });\r\n };\r\n const InitializeValues = () => {\r\n dispatch({ type: \"INITIALIZE_VALUES\", ...props });\r\n };\r\n const ResetClose = () => {\r\n dispatch({ type: \"RESET_CLOSE\", ...props });\r\n };\r\n const OpenCustodianEntity = () => {\r\n dispatch({ type: \"OPEN_CUSTODIAN_ENTITY\", ...props });\r\n };\r\n const CloseCustodianEntity = () => {\r\n dispatch({ type: \"CLOSE_CUSTODIAN_ENTITY\", ...props });\r\n };\r\n const EditCustodianEntity = () => {\r\n dispatch({ type: \"EDIT_CUSTODIAN_ENTITY\", ...props });\r\n };\r\n const UpdateFields = (fields) => {\r\n dispatch({ type: \"UPDATE_FIELDS\", fields });\r\n };\r\n\r\n const isEditing = dialogMode === Mode.Update;\r\n\r\n if (!open) {\r\n return null;\r\n }\r\n\r\n return (\r\n
    \r\n \r\n ResetClose()}>\r\n
    {isEditing ? \"Edit custody account\" : \"New custody account\"}
    \r\n
    \r\n \r\n {dialogMode === Mode.Update && initialized === false ? (\r\n
    \r\n \r\n
    \r\n ) : (\r\n \r\n {!!globalError && (\r\n \r\n {globalError}\r\n \r\n )}\r\n {isEditing && custody.currencyAccounts.length == 0 && (\r\n \r\n Imputable accounts is empty\r\n \r\n )}\r\n \r\n \r\n \r\n onChange({ name: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n onChangeAccountType({ accountType: v })}\r\n items={Object.values(accountType).map((key, index) => ({\r\n id: key.id,\r\n description: key.description,\r\n }))}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n OpenCustodianEntity()}>New\r\n EditCustodianEntity()}>Edit\r\n \r\n \r\n \r\n \r\n {custodyRateTable ? (\r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n \r\n onChange({ CustodianMoneyMarketRate: e })}\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ CustodianMarginRate: e })}\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ CustodianMoneyMarketRateMin: e })}\r\n />\r\n \r\n \r\n \r\n )}\r\n\r\n {fundManager && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange({ custodiesCash: !custody.custodiesCash })}\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ custodiesValues: !custody.custodiesValues })}\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ isLocalBank: !custody.isLocalBank })}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange({ feeSchema: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange({ description: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n )}\r\n
    \r\n \r\n {errorMsg && (\r\n \r\n {errorMsg}\r\n \r\n )}\r\n {sentAuthorization ? (\r\n
    \r\n \r\n {message}\r\n \r\n \r\n
    \r\n ) : (\r\n
    \r\n \r\n\r\n confirm()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Confirm\r\n \r\n
    \r\n )}\r\n
    \r\n
    \r\n {openCustodianEntity ? (\r\n \r\n ) : (\r\n
    \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nconst LoadingWrapper = ({ children, loading }) =>\r\n loading ? : children;\r\n\r\nconst EmptyClearingHouses = () => (\r\n \r\n \r\n
    No Clearing Houses
    \r\n \r\n \r\n);\r\n\r\nexport default CustodySet;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"AlignRadioButton\":\"Custody-module_AlignRadioButton_mxcOc\",\"modal\":\"Custody-module_modal_jW2YA\",\"body\":\"Custody-module_body_10n2F\",\"table\":\"Custody-module_table_2cFmZ\",\"error\":\"Custody-module_error_22-fV\",\"empty\":\"Custody-module_empty_2KUD6\",\"btnAdd\":\"Custody-module_btnAdd_dlHtr\",\"alignCombo\":\"Custody-module_alignCombo_3oyFr\",\"title\":\"Custody-module_title_1pLbZ\",\"backdrop\":\"Custody-module_backdrop_eoAnO\",\"edit\":\"Custody-module_edit_3x9St\",\"actions\":\"Custody-module_actions_3TBVr\",\"errorText\":\"Custody-module_errorText_3uCgg\",\"AlignRight\":\"Custody-module_AlignRight_25F85\",\"FixPaddingCol\":\"Custody-module_FixPaddingCol_39K5A\",\"sentCounterParty\":\"Custody-module_sentCounterParty_3-G74\"};","import React, { useState } from \"react\";\r\nimport style from \"./styles.module.scss\";\r\nimport { Table, Button, Row, Col, Input } from \"reactstrap\";\r\nimport { Combobox, Field } from \"../../Order/Field/Field\";\r\nimport { Mode } from \"../../../Asset/types\";\r\nimport { Numeric } from \"../../Order/Field/Field\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport { showToast } from \"../../../../utils/Helper\";\r\n\r\nconst emptyItem = {\r\n CustodyRateRangesPositiveRate: null,\r\n CustodyRateRangesNegativeRate: null,\r\n CustodyRateRangesMax: null,\r\n CustodyRateRangesMin: null,\r\n};\r\n\r\nconst CurrencyList = ({ onChange, loadings, items, currencies, imputableAccounts, custody, errors }) => {\r\n const [edit, setEdit] = useState({\r\n open: false,\r\n mode: Mode.Insert,\r\n fields: {},\r\n errors: {},\r\n });\r\n\r\n const openEdit = (item) => {\r\n if (item) {\r\n setEdit({\r\n open: true,\r\n mode: Mode.Update,\r\n fields: { ...item },\r\n errors: {},\r\n });\r\n } else {\r\n setEdit({\r\n open: true,\r\n mode: Mode.Insert,\r\n fields: { ...emptyItem },\r\n errors: {},\r\n });\r\n }\r\n };\r\n\r\n const closeEdit = ({ confirm }) => {\r\n if (confirm) {\r\n if (validateRanges(edit.fields)) {\r\n if (edit.mode === Mode.Insert) {\r\n handleAction(Mode.Insert);\r\n } else {\r\n handleAction(Mode.Update);\r\n }\r\n } else {\r\n showToast(\"The ranges are not consistent. Please check the values.\", true);\r\n }\r\n }\r\n\r\n setEdit({});\r\n };\r\n\r\n const validateRanges = (newRange) => {\r\n if (newRange.CustodyRateRangesMin >= newRange.CustodyRateRangesMax) return false;\r\n for (let item of items) {\r\n if (\r\n item.CustodyRateRangesLineId !== newRange.CustodyRateRangesLineId &&\r\n ((newRange.CustodyRateRangesMin <= item.CustodyRateRangesMax &&\r\n newRange.CustodyRateRangesMin >= item.CustodyRateRangesMin) ||\r\n (newRange.CustodyRateRangesMax <= item.CustodyRateRangesMax &&\r\n newRange.CustodyRateRangesMax >= item.CustodyRateRangesMin))\r\n ) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n\r\n const handleAction = (action, item) => {\r\n let updatedItems = [];\r\n\r\n if (action === Mode.Delete) {\r\n updatedItems = items.filter((it) => it.CustodyRateRangesLineId !== item.CustodyRateRangesLineId);\r\n } else {\r\n if (action === Mode.Insert) {\r\n let maxCustodyRateRangesLineIdItem = items.reduce((maxItem, currentItem) => {\r\n return currentItem.CustodyRateRangesLineId > maxItem.CustodyRateRangesLineId\r\n ? currentItem\r\n : maxItem;\r\n }, items[0]);\r\n\r\n let newFields = edit.fields;\r\n newFields.CustodyRateRangesLineId = maxCustodyRateRangesLineIdItem\r\n ? parseInt(maxCustodyRateRangesLineIdItem.CustodyRateRangesLineId) + 1\r\n : 1;\r\n\r\n updatedItems = [...items, newFields];\r\n } else if (action === Mode.Update) {\r\n updatedItems = items.map((item) => {\r\n if (item.CustodyRateRangesLineId === edit.fields.CustodyRateRangesLineId) {\r\n return edit.fields;\r\n }\r\n return item;\r\n });\r\n }\r\n }\r\n\r\n updatedItems.sort((a, b) => a.CustodyRateRangesMin - b.CustodyRateRangesMin);\r\n\r\n onChange({ rateRanges: updatedItems });\r\n };\r\n\r\n const handleOnChangeEdit = (fields) => {\r\n setEdit({ ...edit, fields: { ...edit.fields, ...fields } });\r\n };\r\n\r\n if (loadings.imputableAccounts || loadings.currencies) {\r\n return null;\r\n }\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n
    \r\n {edit.open && (\r\n \r\n )}\r\n {!edit.open && (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {items.length > 0 &&\r\n items.map((item, index) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n
    Positive RateNegative RateMoney Market Rate MinMoney Market Rate Max\r\n
    \r\n \r\n {\"%\"}\r\n \r\n \r\n {\"%\"}\r\n \r\n {\" \"}\r\n \r\n {\" \"}\r\n {\" \"}\r\n \r\n \r\n handleAction(Mode.Delete, item)}\r\n >\r\n \r\n \r\n
    \r\n
    \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nconst Edit = ({ mode, item, errors, currencies, imputableAccounts, onChange, toggle, custody }) => {\r\n return (\r\n
    \r\n \r\n {mode === Mode.Insert ? \"Adding new row\" : \"Editing row\"}\r\n \r\n \r\n \r\n \r\n onChange({ CustodyRateRangesPositiveRate: e })}\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ CustodyRateRangesNegativeRate: e })}\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ CustodyRateRangesMin: e })}\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ CustodyRateRangesMax: e })}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default CurrencyList;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"table\":\"styles-module_table_3RmdV\",\"edit\":\"styles-module_edit_1syXE\",\"buttons\":\"styles-module_buttons_41cdu\"};","import React, { useEffect, useState } from \"react\";\r\nimport Autosuggest from \"react-autosuggest\";\r\n\r\nconst getSuggestions = (value, items) => {\r\n const inputValue = value.trim().toLowerCase();\r\n const inputLength = inputValue.length;\r\n\r\n return inputLength === 0 ? [] : items.filter((item) => item.name.toLowerCase().includes(inputValue));\r\n};\r\n\r\nconst getSuggestionValue = (suggestion) => suggestion.name;\r\n\r\nconst renderSuggestion = (suggestion) => {\r\n return (\r\n
    \r\n {suggestion.name}\r\n
    \r\n );\r\n};\r\nconst CustomAutosuggest = ({\r\n custodianEntity,\r\n custodianEntityId,\r\n custodianEntityName,\r\n isEditing,\r\n errors,\r\n UpdateFields,\r\n}) => {\r\n const [suggestions, setSuggestions] = useState([]);\r\n useEffect(() => {\r\n const name = getCustodyName(custodianEntityId);\r\n UpdateFields({ custodianEntityName: name });\r\n }, [custodianEntityId]);\r\n\r\n const handleChange = (event, { newValue }) => {\r\n if (event.type == \"change\") {\r\n UpdateFields({ custodianEntityName: newValue });\r\n } else if (event.type == \"click\") {\r\n const selected = Object.values(custodianEntity).filter((item) => item.name.includes(newValue));\r\n\r\n UpdateFields({ custodianEntityId: selected[0].id });\r\n }\r\n };\r\n\r\n const handleSuggestionsFetchRequested = ({ value }) => {\r\n setSuggestions(getSuggestions(value, Object.values(custodianEntity)));\r\n };\r\n\r\n const handleSuggestionsClearRequested = () => {\r\n setSuggestions([]);\r\n };\r\n const getCustodyName = (id) => {\r\n const items = Object.values(custodianEntity);\r\n const selectedItem = items.filter((item) => item.id == id);\r\n return selectedItem[0].name;\r\n };\r\n\r\n const inputProps = {\r\n placeholder: \"Select ... \",\r\n value: custodianEntityName || \"\",\r\n onChange: handleChange,\r\n disabled: isEditing,\r\n style: { background: \"#edf9ff\", fontWeight: 500 },\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default CustomAutosuggest;\r\n","import { mergeDeep } from \"../../../utils/Helper\";\r\nimport { Mode } from \"../../Asset/types\";\r\n\r\nexport const defaultState = () => ({\r\n dialogMode: Mode.Insert,\r\n globalError: null,\r\n custodianEntityId: 0,\r\n custodianEntity: [],\r\n custody: {\r\n name: \"\",\r\n entityId: 0,\r\n custodiesCash: false,\r\n custodiesValues: false,\r\n description: \"\",\r\n feeSchema: \"\",\r\n currencyId: 0,\r\n isProp: false,\r\n isLocalBank: false,\r\n currencyAccounts: [],\r\n clearingHouse: [],\r\n accountType: 1,\r\n CustodianMoneyMarketRate: 0,\r\n CustodianMarginRate: 0,\r\n CustodianRelatedAccountId: 0,\r\n CustodianMoneyMarketRateMin: 0,\r\n },\r\n clearingHouseItem: {\r\n clearingHouseId: 0,\r\n clearingHouseSettlementInstructions: \"\",\r\n clearingHouseDefault: false,\r\n clearingHouseCode: \"\",\r\n name: \"\",\r\n },\r\n fields: {\r\n readonly: {},\r\n errors: {},\r\n },\r\n buttons: {\r\n confirm: {\r\n loading: false,\r\n },\r\n },\r\n editClearingHouse: false,\r\n editClearingHouseId: false,\r\n saveEditClearingHouseId: 0,\r\n saveEditClearingHouseCode: 0,\r\n initialized: true,\r\n buttons: {\r\n confirm: {\r\n loading: false,\r\n },\r\n },\r\n error: true,\r\n errors: {\r\n name: false,\r\n currencyNumber: false,\r\n feeSchema: false,\r\n description: false,\r\n CustodianMoneyMarketRate: false,\r\n CustodianMarginRate: false,\r\n CustodianRelatedAccountId: false,\r\n CustodianMoneyMarketRateMin: false,\r\n custodianEntityId: false,\r\n },\r\n message: \"\",\r\n sentAuthorization: false,\r\n openCustodianEntity: false,\r\n Countries: [],\r\n isEditCustodianEntity: false,\r\n});\r\n\r\nexport const CustodySimpleReducer = (state, action) => {\r\n switch (action.type) {\r\n case \"LOAD_FOR_EDIT_CUSTODY\":\r\n return processLoadForEditCustody(state, action.fields);\r\n case \"CHANGE_DIALOG_MODE\":\r\n return processChangeDialogMode(state, action.nextMode);\r\n case \"CHANGE_FIELDS\":\r\n return processChangeFields(state, action.fields);\r\n case \"UPDATE_FIELDS\":\r\n return processFields(state, action);\r\n case \"EDIT_CLEARING_HOUSE\":\r\n return editClearingHouse(state, action);\r\n case \"CLEARING_HOUSES_FIELDS\":\r\n return processChangeClearingHousesFields(state, action.fields);\r\n case \"CLOSE_CLEARING_HOUSE\":\r\n return closeClearingHouse(state);\r\n case \"ADD_CLEARING_HOUSE\":\r\n return AddClearingHouses(state, action);\r\n case \"EDIT_CLEARING_HOUSE_ID\":\r\n return EditClearingHouseId(state, action);\r\n case \"SAVE_EDIT_CLEARING_HOUSE\":\r\n return SaveEditClearingHouse(state, action);\r\n case \"INITIALIZE_VALUES\":\r\n return InitializeValues(state, action);\r\n case \"CHANGE_FIELDS_ACCOUNT_TYPE\":\r\n return ChangeAccountType(state, action.fields);\r\n case \"UPDATE_BUTTONS\":\r\n return processUpdateButtons(state, action.buttons);\r\n case \"VALIDATE_FIELDS\":\r\n return validateForm(state);\r\n case \"SENT_AUTHORIZATION\":\r\n return SentAuthorization(state, action);\r\n case \"RESET_CLOSE\":\r\n return ResetClose(state, action);\r\n case \"OPEN_CUSTODIAN_ENTITY\":\r\n return OpenCustodianEntity(state, action);\r\n case \"CLOSE_CUSTODIAN_ENTITY\":\r\n return CloseCustodianEntity(state, action);\r\n case \"SET_COUNTRIES\":\r\n return SetCountries(state, action);\r\n case \"EDIT_CUSTODIAN_ENTITY\":\r\n return EditCustodianEntity(state, action);\r\n case \"RECHARGE_CUSTODIAN_ENTITY\":\r\n return RechargeCustodianEntity(state, action);\r\n case \"GET_CUSTODIAN_ENTITY\":\r\n return GetCustodianEntity(state, action);\r\n default:\r\n return state;\r\n }\r\n};\r\n\r\nexport const initialize = (props) => {\r\n return (initialState) => {\r\n return {\r\n ...initialState,\r\n };\r\n };\r\n};\r\n\r\nexport function editClearingHouse(state, props) {\r\n const { editClearingHouse, counterparty } = state;\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n editClearingHouse: true,\r\n editClearingHouseId: false,\r\n clearingHouseItem: {\r\n clearingHouseCode: 0,\r\n name: props.clearingHouses[0].name,\r\n clearingHouseId: props.clearingHouses[0].id,\r\n clearingHouseSettlementInstructions: \"\",\r\n clearingHouseDefault: false,\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction processChangeDialogMode(state, nextMode) {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n initialized: false,\r\n dialogMode: nextMode,\r\n }\r\n );\r\n}\r\n\r\nfunction processLoadForEditCustody(state, fields) {\r\n const { entityId, ...props } = fields;\r\n const accountType = props.isProp ? 2 : 1;\r\n const currencyImputableAccount =\r\n props.currencyImputableAccount === \"0\" ? null : props.currencyImputableAccount;\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n initialized: true,\r\n custodianEntityId: entityId,\r\n custody: {\r\n ...state.custody,\r\n ...props,\r\n accountType,\r\n currencyImputableAccount,\r\n rateRanges: fields.rateRanges || [],\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction processChangeClearingHousesFields(state, fields) {\r\n const errors = Object.keys(fields).reduce((f, name) => {\r\n f[name] = undefined;\r\n return f;\r\n }, {});\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n clearingHouseItem: {\r\n ...fields,\r\n },\r\n fields: {\r\n errors,\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction processFields(state, fields) {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ...fields.fields,\r\n }\r\n );\r\n}\r\n\r\nfunction processChangeFields(state, fields) {\r\n const errors = Object.keys(fields).reduce((f, name) => {\r\n f[name] = undefined;\r\n return f;\r\n }, {});\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n custody: {\r\n ...fields,\r\n },\r\n errors,\r\n }\r\n );\r\n}\r\n\r\nfunction ChangeAccountType(state, fields) {\r\n var isProp = false;\r\n if (fields.accountType == 2) {\r\n isProp = true;\r\n }\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n custody: {\r\n accountType: fields.accountType,\r\n isProp: isProp,\r\n },\r\n }\r\n );\r\n}\r\n\r\nexport function closeClearingHouse(state) {\r\n const { editClearingHouse } = state;\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n editClearingHouse: false,\r\n editClearingHouseId: false,\r\n clearingHouseItem: {\r\n clearingHouseCode: 0,\r\n name: \"\",\r\n clearingHouseId: 0,\r\n clearingHouseSettlementInstructions: \"\",\r\n clearingHouseDefault: false,\r\n },\r\n }\r\n );\r\n}\r\n\r\nexport function OpenCustodianEntity(state) {\r\n const { editClearingHouse } = state;\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n isEditCustodianEntity: false,\r\n openCustodianEntity: true,\r\n }\r\n );\r\n}\r\n\r\nexport function CloseCustodianEntity(state) {\r\n const { editClearingHouse } = state;\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n openCustodianEntity: false,\r\n }\r\n );\r\n}\r\n\r\nexport function AddClearingHouses(state, action) {\r\n const { counterparty, fields, clearingHouseItem, clearingHouses, editClearingHouse } = state;\r\n var name = \"\";\r\n for (var j = 0; j < action.clearingHouses.length; j++) {\r\n if (action.clearingHouses[j].id == clearingHouseItem.clearingHouseId) {\r\n name = action.clearingHouses[j].name;\r\n }\r\n }\r\n var clearingHouse = {\r\n clearingHouseId: clearingHouseItem.clearingHouseId,\r\n clearingHouseSettlementInstructions: clearingHouseItem.clearingHouseSettlementInstructions,\r\n clearingHouseDefault: clearingHouseItem.clearingHouseDefault,\r\n clearingHouseCode: clearingHouseItem.clearingHouseCode,\r\n name: name,\r\n };\r\n var custody = {\r\n ...state.custody,\r\n clearingHouse: [...state.custody.clearingHouse, clearingHouse],\r\n };\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n custody: custody,\r\n editClearingHouse: false,\r\n editClearingHouseId: false,\r\n }\r\n );\r\n}\r\n\r\nfunction EditClearingHouseId(state, c) {\r\n var clear = {\r\n clearingHouseId: 0,\r\n clearingHouseSettlementInstructions: \"\",\r\n clearingHouseDefault: false,\r\n clearingHouseCode: \"\",\r\n name: \"\",\r\n };\r\n for (var i = 0; i < state.custody.clearingHouse.length; i++) {\r\n if (\r\n state.custody.clearingHouse[i].clearingHouseId == c.c.clearingHouseId &&\r\n state.custody.clearingHouse[i].clearingHouseCode == c.c.clearingHouseCode\r\n ) {\r\n clear = {\r\n clearingHouseCode: state.custody.clearingHouse[i].clearingHouseCode,\r\n name: state.custody.clearingHouse[i].name,\r\n clearingHouseId: state.custody.clearingHouse[i].clearingHouseId,\r\n clearingHouseSettlementInstructions:\r\n state.custody.clearingHouse[i].clearingHouseSettlementInstructions,\r\n clearingHouseDefault: state.custody.clearingHouse[i].clearingHouseDefault,\r\n };\r\n }\r\n }\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n editClearingHouseId: true,\r\n clearingHouseItem: clear,\r\n saveEditClearingHouseId: c.c.clearingHouseId,\r\n saveEditClearingHouseCode: c.c.clearingHouseCode,\r\n }\r\n );\r\n}\r\n\r\nexport function SaveEditClearingHouse(state, action) {\r\n const {\r\n counterparty,\r\n fields,\r\n clearingHouseItem,\r\n saveEditClearingHouseId,\r\n saveEditClearingHouseCode,\r\n errors,\r\n } = state;\r\n var name = \"\";\r\n var clearing = state.custody.clearingHouse;\r\n for (var i = 0; i < clearing.length; i++) {\r\n if (\r\n clearing[i].clearingHouseId == saveEditClearingHouseId &&\r\n clearing[i].clearingHouseCode == saveEditClearingHouseCode\r\n ) {\r\n for (var j = 0; j < action.clearingHouses.length; j++) {\r\n if (action.clearingHouses[j].id == clearingHouseItem.clearingHouseId) {\r\n name = action.clearingHouses[j].name;\r\n }\r\n }\r\n clearing[i] = {\r\n clearingHouseCode: clearingHouseItem.clearingHouseCode,\r\n name: name,\r\n clearingHouseId: clearingHouseItem.clearingHouseId,\r\n clearingHouseSettlementInstructions: clearingHouseItem.clearingHouseSettlementInstructions,\r\n clearingHouseDefault: clearingHouseItem.clearingHouseDefault,\r\n };\r\n }\r\n }\r\n var custody = { ...state.custody, clearingHouse: clearing };\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n clearingHouses: custody,\r\n editClearingHouse: false,\r\n editClearingHouseId: false,\r\n saveEditClearingHouseId: 0,\r\n saveEditClearingHouseCode: 0,\r\n }\r\n );\r\n}\r\n\r\nexport function InitializeValues(state, action) {\r\n const { editClearingHouse } = state;\r\n var entity = 0;\r\n var currency = 0;\r\n var account = 0;\r\n if (action.custodianEntity.length > 0) {\r\n entity = action.custodianEntity[0].id;\r\n }\r\n if (action.currencies.length > 0) {\r\n currency = action.currencies[0].currencyId;\r\n }\r\n if (action.imputableAccounts.length > 0) {\r\n account = action.imputableAccounts[0].id;\r\n }\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n initialized: false,\r\n custody: {\r\n entityId: entity,\r\n currencyId: currency,\r\n currencyImputableAccount: account,\r\n },\r\n }\r\n );\r\n}\r\n\r\nexport function processUpdateButtons(state, buttons) {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n buttons,\r\n }\r\n );\r\n}\r\n\r\nexport function validateForm(state) {\r\n let errors = {};\r\n if (state.custody.name == \"\") {\r\n errors.name = \"Required field\";\r\n }\r\n if (state.custody.description == \"\") {\r\n errors.description = \"Required field\";\r\n }\r\n if (state.custody.CustodianMoneyMarketRate < 0) {\r\n errors.CustodianMoneyMarketRate = \"Must be a positive number\";\r\n }\r\n if (state.custody.CustodianMarginRate < 0) {\r\n errors.CustodianMarginRate = \"Must be a positive number\";\r\n }\r\n if (state.custody.CustodianMoneyMarketRateMin < 0) {\r\n errors.CustodianMoneyMarketRateMin = \"Must be a positive number\";\r\n }\r\n if (state.custody.CustodianRelatedAccountId == 0) {\r\n errors.CustodianRelatedAccountId = \"Required field\";\r\n }\r\n if (state.custody.custodianEntityId == 0) {\r\n errors.custodianEntityId = \"Required field\";\r\n }\r\n // if (state.custody.feeSchema == \"\") {\r\n // errors.feeSchema = 'Required field';\r\n // }\r\n // if (state.custody.currencyNumber == \"\") {\r\n // errors.currencyNumber = 'Required field';\r\n // }\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n errors: errors,\r\n }\r\n );\r\n}\r\n\r\nexport function validateErr(state, isFundManagerSistem) {\r\n var error = \"\";\r\n if (state.custody.name == \"\") {\r\n error = \"You must enter a name\";\r\n }\r\n if (state.custody.description == \"\") {\r\n error = \"You must enter a description\";\r\n }\r\n if (state.custody.CustodianMoneyMarketRate < 0 && isFundManagerSistem) {\r\n error = \"You must enter a positive number for Custodian Money Market Rate\";\r\n }\r\n if (state.custody.CustodianMarginRate < 0 && isFundManagerSistem) {\r\n error = \"You must enter a positive number for Custodian Margin Rate\";\r\n }\r\n if (state.custody.CustodianMoneyMarketRateMin < 0 && isFundManagerSistem) {\r\n error = \"You must enter a positive number for Custodian Money Market Rate Min\";\r\n }\r\n if (state.custody.CustodianRelatedAccountId == 0 && isFundManagerSistem) {\r\n error = \"You must select a Custodian Related Account\";\r\n }\r\n if (state.custody.custodianEntityId == 0) {\r\n error = \"You must select a Custodian Entity\";\r\n }\r\n // if (state.custody.feeSchema == \"\") {\r\n // error = true;\r\n // }\r\n // if (state.custody.currencyNumber == \"\") {\r\n // error = true;\r\n // }\r\n return error;\r\n}\r\n\r\nexport function SentAuthorization(state, response) {\r\n var message = \"\";\r\n if (response.response.result.Code == 200) {\r\n message = \"Custody sent for authorization\";\r\n } else {\r\n message = response.response.result.Description;\r\n }\r\n var button = {\r\n confirm: {\r\n loading: false,\r\n },\r\n };\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n sentAuthorization: true,\r\n buttons: button,\r\n message: message,\r\n }\r\n );\r\n}\r\n\r\nexport function ResetClose(state, action) {\r\n action.onClickClose();\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n dialogMode: Mode.Insert,\r\n globalError: null,\r\n custody: {\r\n name: \"\",\r\n entityId: 0,\r\n custodiesCash: false,\r\n custodiesValues: false,\r\n description: \"\",\r\n feeSchema: \"\",\r\n currencyId: 0,\r\n isProp: false,\r\n currencyNumber: \"\",\r\n currencyImputableAccount: 0,\r\n isLocalBank: false,\r\n clearingHouse: [],\r\n accountType: 1,\r\n CustodianMoneyMarketRate: 0,\r\n CustodianMarginRate: 0,\r\n CustodianRelatedAccountId: 0,\r\n CustodianMoneyMarketRateMin: 0,\r\n },\r\n clearingHouseItem: {\r\n clearingHouseId: 0,\r\n clearingHouseSettlementInstructions: \"\",\r\n clearingHouseDefault: false,\r\n clearingHouseCode: \"\",\r\n name: \"\",\r\n },\r\n fields: {\r\n readonly: {},\r\n errors: {},\r\n },\r\n buttons: {\r\n confirm: {\r\n loading: false,\r\n },\r\n },\r\n editClearingHouse: false,\r\n editClearingHouseId: false,\r\n saveEditClearingHouseId: 0,\r\n saveEditClearingHouseCode: 0,\r\n initialized: true,\r\n buttons: {\r\n confirm: {\r\n loading: false,\r\n },\r\n },\r\n error: true,\r\n errors: {\r\n name: false,\r\n currencyNumber: false,\r\n feeSchema: false,\r\n description: false,\r\n CustodianMoneyMarketRate: false,\r\n CustodianMarginRate: false,\r\n CustodianRelatedAccountId: false,\r\n CustodianMoneyMarketRateMin: false,\r\n custodianEntityId: false,\r\n },\r\n message: \"\",\r\n sentAuthorization: false,\r\n }\r\n );\r\n}\r\n\r\nfunction SetCountries(state, action) {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n Countries: action.response.countries,\r\n }\r\n );\r\n}\r\n\r\nfunction EditCustodianEntity(state, action) {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n isEditCustodianEntity: true,\r\n openCustodianEntity: true,\r\n }\r\n );\r\n}\r\n\r\nexport function RechargeCustodianEntity(state, action) {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n custodianEntity: action.response.custodianEntity,\r\n custodianEntityId: action.id,\r\n }\r\n );\r\n}\r\n\r\nexport function GetCustodianEntity(state, action) {\r\n var id = 0;\r\n if (action.response.custodianEntity.length > 0) {\r\n id = action.response.custodianEntity[0].id;\r\n }\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n custodianEntity: action.response.custodianEntity,\r\n custodianEntityId: id,\r\n }\r\n );\r\n}\r\n","import React, { Component } from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\n\r\nclass EnvironmentSign extends Component {\r\n render() {\r\n const { color, text } = this.props;\r\n\r\n const leftPad = text.length * 45;\r\n // return null;\r\n return ReactDOM.createPortal(\r\n
    \r\n \r\n {text}\r\n \r\n
    ,\r\n document.getElementById(\"modal-env-sign\")\r\n );\r\n }\r\n}\r\n\r\nexport default EnvironmentSign;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Button } from \"reactstrap\";\r\nimport style from \"./Execution.module.scss\";\r\n\r\nexport default ({ logs }) => {\r\n const [open, setOpen] = useState(false);\r\n\r\n useEffect(() => {\r\n if (logs) {\r\n }\r\n }, []);\r\n\r\n if (!logs) {\r\n return null;\r\n }\r\n\r\n return (\r\n
    \r\n \r\n\r\n {open && (\r\n
    \r\n {logs.map((value, index) => (\r\n
    \r\n {value.key}\r\n {value.value}\r\n
    \r\n ))}\r\n
    \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nfunction getClassTitle(key) {\r\n if (key.match(/candidate discarded/i)) {\r\n return \"text-danger\";\r\n }\r\n if (key.match(/candidate with warning/i)) {\r\n return \"text-warning\";\r\n }\r\n if (key.match(/candidate/i)) {\r\n return \"text-buy\";\r\n }\r\n return \"text-primary\";\r\n}\r\n","import React, { Component, Fragment, useState, useEffect } from \"react\";\r\nimport {\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Container,\r\n Row,\r\n Col,\r\n Input,\r\n Button,\r\n Alert,\r\n Table,\r\n CustomInput,\r\n} from \"reactstrap\";\r\nimport { NumberFormatInput } from \"../../NumberFormatInput/NumberFormatInput\";\r\nimport LaddaButton, { SLIDE_LEFT } from \"react-ladda\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\n\r\nimport { getBaseAndPriceCurrencies, ProcessingMode } from \"../../../utils/Order/Order\";\r\nimport { accountProps, customFetchAssetInfo, customFetchAccountInfo } from \"../Order/Form/commons\";\r\nimport OrderInlineDetail from \"../../Order/InlineDetail\";\r\nimport ExecutionsTable from \"../../ExecutionsTable/ExecutionsTable\";\r\nimport { Field, Combobox, Switch, Symbol } from \"../Order/Field/Field\";\r\nimport { TradingRoutes, fetchCParties, CounterpartySuggest } from \"../Trading/FormFields\";\r\nimport { OrderStatus, getOrderStats } from \"../../../utils\";\r\nimport { debounce, showToast } from \"../../../utils/Helper\";\r\nimport TradingRoutesLogs from \"./Controls\";\r\nimport CircularProgress from \"../../CircularProgress/CircularProgress\";\r\nimport { CouponPayments } from \"../../Asset/Tabs/Contracts/Contracts\";\r\nimport Autosuggest from \"../../Autosuggest/Autosuggest\";\r\nimport * as _state from \"./_state\";\r\n\r\nimport style from \"./Execution.module.scss\";\r\n\r\nclass Execution extends Component {\r\n constructor(props) {\r\n super(props);\r\n _state.initialize.call(this, {\r\n ...props.order,\r\n manualFX: false,\r\n maxDecimals: 4,\r\n parValue: 1,\r\n total: undefined,\r\n calculatingTotal: false,\r\n isWritten: false,\r\n calculatingLegs: false,\r\n decimalAmount: undefined,\r\n newSymbol: false,\r\n });\r\n }\r\n\r\n calculateTotal() {\r\n const { order, services } = this.props;\r\n const { fetchGetCalculator, fetchCurrencyFXbyDate } = services;\r\n\r\n this.setState((prevState) => ({ ...prevState, calculatingTotal: true }));\r\n if (order.AssetClassForm != \"Forex\") {\r\n const body = {\r\n assetId: order.AssetId,\r\n isSecurity: true,\r\n date: this.state.execution.ExecutionValueDate,\r\n price: parseFloat(this.state.execution.ExecutionPrice),\r\n quantity: this.state.execution.ExecutionQuantity,\r\n priceisclean: false,\r\n priceisdirty: false,\r\n };\r\n fetchGetCalculator(body).then((res) => {\r\n this.setState((prevState) => ({\r\n ...prevState,\r\n total: res.calculator.total,\r\n calculatingTotal: false,\r\n execution: { ...prevState.execution, ExecutionTotal: res.calculator.total },\r\n }));\r\n });\r\n } else {\r\n const body = {\r\n baseCurrency: order.OrderCurrencyId,\r\n targetCurrency: order.OrderSettlementCurrencyId,\r\n date: this.state.execution.ExecutionValueDate,\r\n };\r\n\r\n fetchCurrencyFXbyDate(body).then((res) => {\r\n let total;\r\n if (res.FX.divides)\r\n total =\r\n parseFloat(this.state.execution.ExecutionQuantity) /\r\n parseFloat(this.state.execution.ExecutionPrice);\r\n else\r\n total =\r\n parseFloat(this.state.execution.ExecutionQuantity) *\r\n parseFloat(this.state.execution.ExecutionPrice);\r\n\r\n total = isNaN(total) ? 0 : total;\r\n this.setState((prevState) => ({\r\n ...prevState,\r\n total: total,\r\n calculatingTotal: false,\r\n execution: { ...prevState.execution, ExecutionTotal: total },\r\n }));\r\n });\r\n }\r\n }\r\n\r\n getEntities() {\r\n const { entities, saveEntities } = this.props;\r\n\r\n const isStoredData =\r\n entities && entities.counterparties && Object.entries(entities.counterparties).length > 0;\r\n\r\n //Si los datos ya se encuentran guardados, no llamamos a la API.\r\n if (isStoredData || entities.isLoading) {\r\n return;\r\n }\r\n\r\n //Se llama a la API y se almacena en redux.\r\n saveEntities && saveEntities();\r\n }\r\n\r\n componentDidMount() {\r\n const trader_name_input =\r\n window.___APP_CONFIG___ && window.___APP_CONFIG___.TRADER_NAME_INPUT\r\n ? window.___APP_CONFIG___.TRADER_NAME_INPUT\r\n : false;\r\n this.setState((prevState) => ({ ...prevState, showTraderName: trader_name_input }));\r\n this.getTradingRoutes();\r\n this.getTradesAllowedTimeSpan();\r\n if (trader_name_input) {\r\n this.getAuthorizedTraders();\r\n }\r\n this.getEntities();\r\n if (this.props.order) {\r\n this.getSettlementCurrencies(true, true);\r\n if (this.props.order.AssetClassForm === \"Repo\") {\r\n const newContractdata = {\r\n ContractType: \"Repo\",\r\n term: this.props.order.OrderTerm,\r\n margin: 0,\r\n RefAssetid: this.props.order.AssetId,\r\n price: 0,\r\n rate: this.props.order.OrderType === \"Limit\" ? +this.props.order.OrderPrice : 0,\r\n limit: this.props.order.OrderType === \"Limit\" ? +this.props.order.OrderPrice : 0,\r\n appraisal: 100,\r\n marketValue: 0,\r\n currency: this.props.order.OrderCurrencySymbol,\r\n open: false,\r\n opening: 0,\r\n closing: 0,\r\n couponPayments: [],\r\n CollateralAssetid: 0,\r\n CollateralAssetTicker: \"\",\r\n CollateralQuantity: 0,\r\n paymenttoborrower: 0,\r\n };\r\n\r\n this.setState((prevState) => {\r\n return {\r\n ...prevState,\r\n execution: {\r\n ...prevState.execution,\r\n contractdata: newContractdata,\r\n },\r\n };\r\n });\r\n\r\n if (this.props.order.OrderSide === \"Sell\") {\r\n this.props.services\r\n .fetchGetAssetInformation({ assetId: this.props.order.CurrentAccount.Collateral[0].AssetId })\r\n .then((response) => {\r\n this.setState((prevState) => ({\r\n ...prevState,\r\n decimalAmount: response.info.SubAssetClassDecimalPlaces,\r\n }));\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error fetching the Asset Class Information\", true);\r\n });\r\n\r\n this.props.services\r\n .fetchGetAssetQuote({\r\n assetquote_in: {\r\n assetid: this.props.order.CurrentAccount.Collateral[0].AssetId,\r\n Date: this.state.execution.ExecutionDate,\r\n AssetQuotePrice: true,\r\n },\r\n })\r\n .then(({ response }) => {\r\n if (this.props.order.CurrentAccount.Collateral) {\r\n this.setState(\r\n (prevState) => ({\r\n ...prevState,\r\n execution: {\r\n ...prevState.execution,\r\n contractdata: {\r\n ...prevState.execution.contractdata,\r\n price: response.assetquote_out.AssetQuotePrice,\r\n CollateralAssetid: this.props.order.CurrentAccount.Collateral[0].AssetId,\r\n CollateralAssetTicker: this.props.order.CurrentAccount.Collateral[0].AssetTicker,\r\n CollateralQuantity: this.props.order.CurrentAccount.Collateral[0].CollateralQuantity,\r\n },\r\n },\r\n }),\r\n () => this.handleGetLegs()\r\n );\r\n } else {\r\n showToast(\"Error fetching order data, no collateral information found\", true);\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error fetching collateral asset price\", true);\r\n });\r\n }\r\n\r\n //Looks for who is the default contract side that takes the repo payments\r\n if (this.props.services.getRepoDefaultPaymentsCorrespondent) {\r\n const { execution } = this.state;\r\n this.getRepoDefaultPaymentToBorrower(execution.TradingRouteId);\r\n }\r\n } else {\r\n this.props.services\r\n .fetchGetAssetInformation({ assetId: this.props.order.AssetId })\r\n .then((response) => {\r\n const isFXOrder = this.props.order.AssetClassForm == \"Forex\";\r\n this.setState((prevState) => ({\r\n ...prevState,\r\n decimalAmount: isFXOrder ? 2 : response.info.SubAssetClassDecimalPlaces,\r\n }));\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error fetching the Asset Class Information\", true);\r\n });\r\n }\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n const { order: prevOrder } = prevProps;\r\n const { order } = this.props;\r\n const { execution: prevExecution } = prevState;\r\n const { execution, manualFX } = this.state;\r\n if (\r\n order.OrderCurrencyId != prevOrder.OrderCurrencyId ||\r\n order.OrderSettlementCurrencyId != prevOrder.OrderSettlementCurrencyId ||\r\n prevOrder.AssetId != order.AssetId ||\r\n prevExecution.ExecutionDate != execution.ExecutionDate ||\r\n prevExecution.ExecutionValueDate != execution.ExecutionValueDate\r\n ) {\r\n const updateValueDate =\r\n prevOrder.AssetId != order.AssetId || prevExecution.ExecutionDate != execution.ExecutionDate;\r\n\r\n const updateFX = !manualFX;\r\n\r\n this.getSettlementCurrencies(updateValueDate, updateFX);\r\n }\r\n\r\n if (prevExecution.ExecutionTotal != execution.ExecutionTotal) {\r\n this.handleGetFees();\r\n }\r\n\r\n if (prevExecution.ExecutionDate != execution.ExecutionDate) {\r\n this.getTradesAllowedTimeSpan();\r\n }\r\n\r\n if (prevExecution.TradingRouteId !== execution.TradingRouteId) {\r\n this.handleGetFees();\r\n this.getRepoDefaultPaymentToBorrower(execution.TradingRouteId);\r\n }\r\n }\r\n\r\n onChange = (values) => {\r\n _state.changeValues.call(this, values);\r\n };\r\n\r\n updateSettlementDate = () => {\r\n if (this.props.order.AssetClassForm == \"Repo\" && this.state.execution.contractdata) {\r\n this.handleGetLegs();\r\n }\r\n };\r\n\r\n delayedUpdateFilterValue = (name, value) => {\r\n this.setState((prevState) => ({\r\n delayedFilter: {\r\n ...prevState.delayedFilter,\r\n [name]: value,\r\n },\r\n }));\r\n\r\n this.handleFilterDebounced();\r\n };\r\n\r\n getRepoDefaultPaymentToBorrower = (id) => {\r\n if (this.props.services.getRepoDefaultPaymentsCorrespondent) {\r\n this.props.services.getRepoDefaultPaymentsCorrespondent(id).then(({ response }) => {\r\n const data = response ? response.execution : null;\r\n const paymentToBorrower = data && data.contractdata ? data.contractdata.paymenttoborrower : 0;\r\n return this.setState((prevState) => {\r\n return {\r\n ...prevState,\r\n execution: {\r\n ...prevState.execution,\r\n contractdata: { ...prevState.execution.contractdata, paymenttoborrower: paymentToBorrower },\r\n },\r\n };\r\n });\r\n });\r\n }\r\n };\r\n\r\n confirm = () => {\r\n // validate\r\n const noErrors = _state.validate.call(this, this.props.order);\r\n\r\n if (noErrors) {\r\n this.setState((prevState) => ({ ...prevState, loading: true }));\r\n\r\n const { orderId, order, relatedOrder, services } = this.props;\r\n const { fetchAddExecution } = services;\r\n const { settlementCurrencies, total } = this.state;\r\n\r\n const settleCurrencyInfo = settlementCurrencies.find(\r\n (c) => c.currencyInfo.currencyISO == order.OrderSettlementCurrencySymbol\r\n );\r\n\r\n const execution = {\r\n ...this.state.execution,\r\n ExecutionFXMultiplies: settleCurrencyInfo ? settleCurrencyInfo.multiplies : true,\r\n ExecutionTotal: total,\r\n contractdata: {\r\n ...this.state.execution.contractdata,\r\n contractCounterParty: this.state.execution.CounterPartyId,\r\n },\r\n };\r\n\r\n fetchAddExecution({\r\n execution,\r\n orderId,\r\n })\r\n .then((res) => res.response)\r\n .then((res) => {\r\n if (res.result.Code !== 200) {\r\n alert(res.result.Description);\r\n this.setState((prevState) => ({ ...prevState, loading: false }));\r\n } else {\r\n const qtyPending = _state.calculateAvailableQty(order) - execution.ExecutionQuantity;\r\n\r\n if (qtyPending == 0 && relatedOrder != null) {\r\n _state.clear.call(this);\r\n this.props.onToggle(true, { order: relatedOrder });\r\n } else {\r\n _state.clear.call(this, qtyPending > 0 ? { ExecutionQuantity: qtyPending } : {});\r\n }\r\n }\r\n });\r\n }\r\n };\r\n\r\n getTradingRoutes = () => {\r\n const { order, services } = this.props;\r\n const { OrderId } = order;\r\n const { fetchTradingRoutes } = services;\r\n const { execution } = this.state;\r\n\r\n fetchTradingRoutes({ processId: OrderId, quantity: this.state.execution.ExecutionQuantity })\r\n .then((res) => ({\r\n routes: res.response.sorroutes,\r\n logs: res.response.keyvalues,\r\n }))\r\n .then(({ routes, logs }) => {\r\n //remove duplicates\r\n let uniqueRoutes = [];\r\n\r\n let preferredRouteId = -1;\r\n let betterPreference = 9999;\r\n\r\n routes.forEach((r) => {\r\n if (r.name != \"\") {\r\n if (uniqueRoutes.find((e) => e.id == r.id) == undefined) {\r\n uniqueRoutes.push(r);\r\n if (r.preference < betterPreference) {\r\n preferredRouteId = r.id;\r\n betterPreference = r.preference;\r\n }\r\n }\r\n }\r\n });\r\n\r\n if (uniqueRoutes.find((e) => e.id == execution.TradingRouteId) == undefined) {\r\n this.onChange({ TradingRouteId: preferredRouteId });\r\n }\r\n\r\n _state.setTradeRoutes.call(\r\n this,\r\n uniqueRoutes.map((r) => ({\r\n id: r.id,\r\n description: r.name,\r\n })),\r\n logs\r\n );\r\n });\r\n };\r\n\r\n getAuthorizedTraders = () => {\r\n if (this.props.services.getAuthorizedTraders) {\r\n this.props.services.getAuthorizedTraders().then((r) => {\r\n r.response &&\r\n this.setState((prevState) => ({\r\n ...prevState,\r\n authUsers: r.response.authUsers,\r\n execution: { ...prevState.execution, ExecutionTrader: \"\" },\r\n }));\r\n });\r\n }\r\n };\r\n\r\n getTradesAllowedTimeSpan = () => {\r\n const { services } = this.props;\r\n const { execution } = this.state;\r\n\r\n services\r\n .getTradesTimeSpan({ date: execution.ExecutionDate })\r\n .then(({ response }) => {\r\n this.setState((state) => ({\r\n ...state,\r\n minTradeDate: response.startingTime,\r\n maxTradeDate: response.endingTime,\r\n restricted: response.restricted,\r\n }));\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n });\r\n };\r\n\r\n getSettlementCurrencies = (updateValueDate, updateFX) => {\r\n const { order, services } = this.props;\r\n const { fetchOrderAssetInfo } = services;\r\n const { execution } = this.state;\r\n\r\n const data = {\r\n tradeDate: execution.ExecutionDate,\r\n valueDate: execution.ExecutionValueDate,\r\n useValueDate: !updateValueDate,\r\n orderForm: order.AssetClassForm,\r\n assetId: order.AssetId,\r\n assetTicker: order.AssetTicker,\r\n tradeCurrencyId: order.OrderCurrencyId,\r\n settleCurrencyId: order.OrderSettlementCurrencyId,\r\n };\r\n\r\n const isFXOrder = order.AssetClassForm == \"Forex\";\r\n\r\n fetchOrderAssetInfo(data).then((res) => {\r\n const { settlementCurrency: settlementCurrencies, items } = res.response.assetorderdata;\r\n let fx;\r\n let valueDate;\r\n\r\n if (settlementCurrencies) {\r\n fx = isFXOrder ? execution.ExecutionPrice : execution.ExecutionFX;\r\n if (updateFX) {\r\n const settleCurrency = settlementCurrencies.find(\r\n (c) => c.currencyInfo.currencyId == order.OrderSettlementCurrencyId\r\n );\r\n fx ? parseFloat(settleCurrency.fx) : null;\r\n }\r\n }\r\n\r\n if (updateValueDate && items.find((i) => i.key == \"SettlementDayDate\")) {\r\n valueDate = items.find((i) => i.key == \"SettlementDayDate\").value;\r\n }\r\n\r\n let maxDecimals = 4;\r\n if (items.find((i) => i.key == \"MaxDecimals\")) {\r\n maxDecimals = parseInt(items.find((i) => i.key == \"MaxDecimals\").value, 10);\r\n }\r\n\r\n let parValue = 1.0;\r\n if (items.find((i) => i.key == \"ParValue\")) {\r\n parValue = parseFloat(items.find((i) => i.key == \"ParValue\").value);\r\n }\r\n\r\n this.setState((state) => {\r\n const newExecution = {\r\n ...state.execution,\r\n ExecutionValueDate: valueDate || state.execution.ExecutionValueDate,\r\n ExecutionFX: fx || state.execution.ExecutionFX,\r\n };\r\n\r\n if (!this.state.isWritten) {\r\n newExecution.ExecutionPrice = fx || state.execution.ExecutionPrice;\r\n }\r\n // this.setState({ isWritten: true }); ¿?\r\n return {\r\n ...state,\r\n isWritten: true,\r\n settlementCurrencies: settlementCurrencies ? settlementCurrencies : state.settlementCurrencies,\r\n maxDecimals,\r\n parValue,\r\n execution: newExecution,\r\n };\r\n });\r\n });\r\n };\r\n\r\n delete = (execution, callback = () => {}) => {\r\n const { orderId, order, services } = this.props;\r\n const { fetchRemoveExecution } = services;\r\n const executionId = execution.ExecutionId;\r\n const childId = execution.childId;\r\n\r\n fetchRemoveExecution({ executionId, childId, orderId }).then((response) => {\r\n if (response.response.result.Code == 200) {\r\n const qtyPending = order.stats.pending - +execution.ExecutionQuantity;\r\n _state.clear.call(this, qtyPending > 0 ? { ExecutionQuantity: qtyPending } : {});\r\n } else {\r\n alert(response.response.result.Description);\r\n\r\n const qtyPending = order.stats.pending;\r\n _state.clear.call(this, qtyPending > 0 ? { ExecutionQuantity: qtyPending } : {});\r\n }\r\n callback();\r\n });\r\n };\r\n\r\n onToggle = () => {\r\n _state.clear.call(this);\r\n this.props.onToggle();\r\n };\r\n\r\n renderSuggestion = (suggestion) => {\r\n return (\r\n
    \r\n {suggestion.Ticker}\r\n {\" - \"}\r\n {suggestion.Description}\r\n
    \r\n );\r\n };\r\n\r\n getSuggestionValue = (suggestion) => suggestion.Ticker;\r\n\r\n onSuggestionsFetchRequested = ({ value }) => {\r\n return this.props.services\r\n .fetchSearchSymbol({\r\n type: \"Forex\",\r\n text: value,\r\n })\r\n .then((response) => response.response.symbols);\r\n };\r\n\r\n handleGetLegs = () => {\r\n if (this.props.services.fetchGetOpeningAndClosingLegs) {\r\n this.setState((prevState) => ({ ...prevState, calculatingLegs: true }));\r\n this.props.services\r\n .fetchGetOpeningAndClosingLegs({ execution: this.state.execution })\r\n .then(({ response }) => {\r\n this.onChange({ ExecutionPrice: response.openingleg });\r\n this.setState((prevState) => ({\r\n ...prevState,\r\n execution: {\r\n ...prevState.execution,\r\n contractdata: {\r\n ...prevState.execution.contractdata,\r\n closing: response.closingleg,\r\n opening: response.openingleg,\r\n marketValue: response.marketvalue,\r\n couponPayments: response.cashflow_outs.map((payment) => ({\r\n ContractPaymentDate: payment.date,\r\n ContractPaymentName: payment.name,\r\n ContractPaymentAmmount: payment.payment,\r\n ContractPaymentAdjustedAmmount: payment.adjusted,\r\n })),\r\n },\r\n },\r\n }));\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error fetching opening and closing legs\", true);\r\n })\r\n .finally(() => {\r\n this.setState((prevState) => ({ ...prevState, calculatingLegs: false }));\r\n this.handleGetFees();\r\n });\r\n }\r\n };\r\n\r\n handleGetCollateralPrice = () => {\r\n this.props.services\r\n .fetchGetAssetInformation({ assetId: this.state.execution.contractdata.CollateralAssetid })\r\n .then((response) => {\r\n this.setState((prevState) => ({\r\n ...prevState,\r\n decimalAmount: response.info.SubAssetClassDecimalPlaces,\r\n }));\r\n });\r\n this.props.services\r\n .fetchGetAssetQuote({\r\n assetquote_in: {\r\n assetid: this.state.execution.contractdata.CollateralAssetid,\r\n Date: this.state.execution.ExecutionDate,\r\n AssetQuotePrice: true,\r\n },\r\n })\r\n .then(({ response }) => {\r\n this.setState(\r\n (prevState) => ({\r\n ...prevState,\r\n execution: {\r\n ...prevState.execution,\r\n contractdata: {\r\n ...prevState.execution.contractdata,\r\n price: response.assetquote_out.AssetQuotePrice,\r\n },\r\n },\r\n }),\r\n () => this.handleGetLegs()\r\n );\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error fetching collateral asset price\", true);\r\n });\r\n\r\n this.setState((prevState) => ({ ...prevState, calculatingPrice: true }));\r\n this.props.services\r\n .fetchGetOpeningAndClosingLegs({ execution: this.state.execution })\r\n .then(({ response }) => {\r\n this.setState((prevState) => ({\r\n ...prevState,\r\n execution: {\r\n ...prevState.execution,\r\n contractdata: {\r\n ...prevState.execution.contractdata,\r\n closing: response.closing,\r\n opening: response.openingleg,\r\n marketValue: response.marketvalue,\r\n couponPayments: response.cashflow_outs.map((payment) => ({\r\n ContractPaymentDate: payment.date,\r\n ContractPaymentName: payment.name,\r\n ContractPaymentAmmount: payment.payment,\r\n ContractPaymentAdjustedAmmount: payment.adjusted,\r\n })),\r\n },\r\n },\r\n }));\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error fetching opening and closing legs\", true);\r\n })\r\n .finally(() => {\r\n this.setState((prevState) => ({ ...prevState, calculatingPrice: false }));\r\n });\r\n };\r\n\r\n handleChangeAppraisal = (event) => {\r\n const value = event.value;\r\n this.setState(\r\n (prevState) => ({\r\n ...prevState,\r\n execution: {\r\n ...prevState.execution,\r\n contractdata: {\r\n ...prevState.execution.contractdata,\r\n appraisal: value,\r\n margin: 100 - +value,\r\n },\r\n },\r\n }),\r\n () => this.handleGetLegs()\r\n );\r\n };\r\n\r\n handleChangeHaircut = (event) => {\r\n const value = event.value;\r\n this.setState(\r\n (prevState) => ({\r\n ...prevState,\r\n execution: {\r\n ...prevState.execution,\r\n contractdata: {\r\n ...prevState.execution.contractdata,\r\n margin: value,\r\n appraisal: 100 - +value,\r\n },\r\n },\r\n }),\r\n () => this.handleGetLegs()\r\n );\r\n };\r\n\r\n handleChangeContractData = (name, value) => {\r\n return this.setState(\r\n (prevState) => {\r\n return {\r\n ...prevState,\r\n execution: {\r\n ...prevState.execution,\r\n contractdata: {\r\n ...prevState.execution.contractdata,\r\n [name]: value,\r\n },\r\n },\r\n };\r\n },\r\n () => this.handleGetLegs()\r\n );\r\n };\r\n\r\n handleChangeClosingLeg = (name, value) => {\r\n this.setState((prevState) => ({\r\n ...prevState,\r\n execution: {\r\n ...prevState.execution,\r\n contractdata: {\r\n ...prevState.execution.contractdata,\r\n [name]: value,\r\n },\r\n },\r\n }));\r\n };\r\n\r\n onChangeCollateral = (v) => {\r\n this.setState(\r\n (prevState) => ({\r\n ...prevState,\r\n execution: {\r\n ...prevState.execution,\r\n contractdata: {\r\n ...prevState.execution.contractdata,\r\n CollateralAssetid: v.AssetId,\r\n CollateralAssetTicker: v.AssetTicker,\r\n },\r\n },\r\n }),\r\n () => this.handleGetCollateralPrice()\r\n );\r\n };\r\n\r\n handleGetFees = () => {\r\n const execution = {\r\n ...this.state.execution,\r\n SettlementCurrencyId: this.props.order.OrderSettlementCurrencyId,\r\n };\r\n this.props.services\r\n .getExecutionFees({ execution })\r\n .then(({ response }) => {\r\n this.setState((prevState) => ({\r\n ...prevState,\r\n execution: {\r\n ...prevState.execution,\r\n Fees: response.execution.Fees,\r\n },\r\n }));\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error fetching fees\");\r\n });\r\n };\r\n\r\n handleSelectedTrader = (name) => {\r\n this.setState((prevState) => ({\r\n ...prevState,\r\n execution: { ...prevState.execution, ExecutionTrader: name },\r\n }));\r\n };\r\n\r\n onChangeTradeDate(e) {\r\n const { order, applySetDefaultExecTime, tradeDateStartTime, tradeDateEndTime } = this.props;\r\n const isBuy = order.OrderSide == \"Buy\";\r\n const dateTime = e.target.value;\r\n const inputRef = e.target;\r\n\r\n const tradeDateStartTimeHasValue = this.isValidTimeString(tradeDateStartTime);\r\n const tradeDateEndTimeHasValue = this.isValidTimeString(tradeDateEndTime);\r\n\r\n if (!applySetDefaultExecTime) {\r\n this.onChange({ ExecutionDate: dateTime });\r\n return;\r\n }\r\n\r\n const newTradeDate = new Date(dateTime);\r\n const previousExecutionDate = new Date(this.state.execution.ExecutionDate);\r\n const initialDate = new Date(this.state.initialDate);\r\n\r\n if (this.shouldApplyDefaultTime(newTradeDate, previousExecutionDate, initialDate)) {\r\n const time = this.getTime(\r\n isBuy,\r\n tradeDateStartTimeHasValue,\r\n tradeDateEndTimeHasValue,\r\n tradeDateStartTime,\r\n tradeDateEndTime\r\n );\r\n\r\n newTradeDate.setHours(time.hours, time.minutes, 0, 0);\r\n inputRef.blur();\r\n }\r\n\r\n this.onChange({ ExecutionDate: newTradeDate.toDatetimeLocal() });\r\n }\r\n\r\n getTime(isBuy, tradeDateStartTimeHasValue, tradeDateEndTimeHasValue, tradeDateStartTime, tradeDateEndTime) {\r\n //Default values\r\n let hours = isBuy ? 10 : 15;\r\n let minutes = 0;\r\n\r\n //Si la fecha es correcta, nos quedamos con el valor dependiendo si es compra o venta.\r\n const timeString = isBuy\r\n ? tradeDateStartTimeHasValue\r\n ? tradeDateStartTime\r\n : null\r\n : tradeDateEndTimeHasValue\r\n ? tradeDateEndTime\r\n : null;\r\n\r\n //La hora esta en formato {hh:mm}\r\n if (timeString) {\r\n hours = Number(timeString.slice(0, 2));\r\n minutes = Number(timeString.slice(2));\r\n }\r\n\r\n return { hours, minutes };\r\n }\r\n\r\n isValidTimeString(timeStr) {\r\n return timeStr && timeStr.length >= 4 && timeStr !== \"0000\";\r\n }\r\n\r\n shouldApplyDefaultTime(newTradeDate, previousExecutionDate, initialDate) {\r\n const hasChangedTime =\r\n newTradeDate.getHours() !== previousExecutionDate.getHours() ||\r\n newTradeDate.getMinutes() !== previousExecutionDate.getMinutes();\r\n\r\n const hasChangedInitialTime =\r\n newTradeDate.getHours() !== initialDate.getHours() ||\r\n newTradeDate.getMinutes() !== initialDate.getMinutes();\r\n\r\n return newTradeDate < initialDate && !hasChangedTime && !hasChangedInitialTime;\r\n }\r\n\r\n render() {\r\n const { order, entities, applyMarkupTrader } = this.props;\r\n\r\n const { fetchSearchSymbol, fetchSearchRepoSymbol, fetchYahooOptions, fetchOrderAssetInfo } =\r\n this.props.services;\r\n\r\n if (order == null) {\r\n return null;\r\n }\r\n\r\n if (!order.stats) {\r\n order.stats = getOrderStats(order);\r\n }\r\n\r\n const {\r\n OrderLowTouchEnabled: enabledLT,\r\n OrderQuantityIsCash: quantityIsCash,\r\n OrderCurrencySymbol,\r\n OrderSettlementCurrencySymbol,\r\n } = order;\r\n\r\n const {\r\n execution,\r\n errors,\r\n loading,\r\n tradeRoutes,\r\n tradeRoutesLogs,\r\n availableQty,\r\n settlementCurrencies,\r\n maxDecimals,\r\n parValue,\r\n manualFX,\r\n } = this.state;\r\n\r\n const { baseCurrency, priceCurrency } = getBaseAndPriceCurrencies(\r\n settlementCurrencies,\r\n OrderCurrencySymbol,\r\n OrderSettlementCurrencySymbol\r\n );\r\n\r\n let executions = [];\r\n\r\n let executedQuantity = 0;\r\n\r\n if (order.Childs) {\r\n order.Childs.forEach((child) => {\r\n executedQuantity += quantityIsCash\r\n ? parseFloat(child.ChildOrderQuantity) * parseFloat(child.ChildOrderPrice) * parValue\r\n : parseFloat(child.ChildOrderQuantity);\r\n\r\n if (child.Executions) {\r\n child.Executions.forEach((exec) => {\r\n executions.push({\r\n ...exec,\r\n childId: child.ChildOrderId,\r\n disabled:\r\n child.ChildProcessingMode != \"\" && child.ChildProcessingMode != ProcessingMode.HighTouch,\r\n });\r\n });\r\n }\r\n });\r\n }\r\n\r\n const pendingQuantity = order.OrderQuantity - executedQuantity;\r\n\r\n // The OrderStatus is undefined if the order is a new order created by the trader.\r\n const isManualAndActive =\r\n (!order.OrderIsAutomatic &&\r\n order.OrderIsActive &&\r\n ![OrderStatus.EXPIRED, OrderStatus.CANCELED, OrderStatus.REJECTED].includes(order.OrderStatus)) ||\r\n order.OrderStatus == undefined;\r\n\r\n return (\r\n
    \r\n \r\n \r\n {isManualAndActive ? \"New execution\" : \"Executions\"}\r\n \r\n \r\n \r\n \r\n {isManualAndActive && (\r\n \r\n {enabledLT && (\r\n {`Available HighTouch quantity: ${availableQty}`}\r\n )}\r\n {quantityIsCash && (\r\n \r\n \r\n \r\n
    \r\n \r\n {\"Order quantity is cash\"}\r\n \r\n
    \r\n
    \r\n Pending cash:\r\n \r\n
    \r\n
    \r\n Pending shares at selected price:\r\n {isNaN(execution.ExecutionPrice) || execution.ExecutionPrice == \"\" ? (\r\n \"-\"\r\n ) : (\r\n \r\n )}\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n )}\r\n\r\n {order.AssetClassForm !== \"Repo\" && (\r\n \r\n \r\n \r\n {\r\n this.onChange({ ExecutionQuantity: e.value });\r\n }}\r\n dataTypeDecimalName=\"quantity\"\r\n placeholder={\"Quantity\"}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n {\r\n this.onChange({ ExecutionPrice: e.value });\r\n }}\r\n decimalScale={this.state.decimalAmount}\r\n dataTypeDecimalName=\"price\"\r\n disabled={loading}\r\n placeholder={order.AssetClassForm == \"Forex\" ? `Exchange rate` : `Price`}\r\n />\r\n \r\n \r\n \r\n )}\r\n\r\n {order.AssetClassForm !== \"Forex\" &&\r\n order.OrderCurrencySymbol !== order.OrderSettlementCurrencySymbol && (\r\n \r\n \r\n \r\n this.onChange({ ExecutionFXRoute: v })}\r\n emptyLabel={\"\"}\r\n invalid={!!errors[\"ExecutionFXRoute\"]}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n \r\n {execution[\"ExecutionFXRoute\"] == \"FXThroughCpty\" && (\r\n \r\n this.setState({ manualFX: v })}\r\n />\r\n \r\n )}\r\n \r\n \r\n {execution[\"ExecutionFXRoute\"] == \"FXThroughCpty\" && (\r\n \r\n {\r\n this.onChange({ ExecutionFX: e.value });\r\n }}\r\n disabled={loading || !manualFX}\r\n placeholder={\"FX\"}\r\n decimalScale={this.state.decimalAmount}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n )}\r\n \r\n \r\n )}\r\n\r\n \r\n \r\n {tradeRoutes != null && tradeRoutes.length < 1 ? (\r\n
    \r\n \r\n Unreachable trading route\r\n \r\n
    \r\n ) : (\r\n this.onChange({ TradingRouteId: id })}\r\n tradeRoutes={tradeRoutes && tradeRoutes.length > 0 ? tradeRoutes : null}\r\n />\r\n )}\r\n \r\n\r\n {applyMarkupTrader && (\r\n \r\n \r\n {\r\n this.onChange({ ExecutionMarkupPrice: e.value });\r\n }}\r\n decimalScale={this.state.decimalAmount}\r\n dataTypeDecimalName=\"price\"\r\n disabled={loading}\r\n placeholder={\"Markup Price\"}\r\n />\r\n \r\n \r\n )}\r\n\r\n \r\n \r\n this.onChange({\r\n CounterPartyId: v.counterpartyId,\r\n CounterPartyName: v.counterpartyName,\r\n })\r\n }\r\n error={errors.CounterPartyId}\r\n fetchItems={(v) => fetchCParties(v, entities.counterparties)}\r\n />\r\n \r\n
    \r\n\r\n {tradeRoutesLogs && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n {execution.Fees && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n this.onChangeTradeDate(e)}\r\n />\r\n \r\n \r\n \r\n \r\n {\r\n this.onChange({\r\n ExecutionValueDate: e.target.value,\r\n });\r\n this.updateSettlementDate();\r\n }}\r\n />\r\n \r\n \r\n {this.state.showTraderName && (\r\n \r\n \r\n this.handleSelectedTrader(e.target.value)}\r\n >\r\n \r\n {this.state.authUsers &&\r\n this.state.authUsers.map((option, index) => (\r\n \r\n ))}\r\n \r\n \r\n \r\n )}\r\n \r\n {order.AssetClassForm == \"Repo\" && execution.contractdata && (\r\n \r\n \r\n \r\n Contract Details\r\n \r\n
    \r\n \r\n \r\n \r\n {order.OrderSide === \"Sell\" ? (\r\n \r\n this.handleChangeContractData(\"CollateralAssetTicker\", e.target.value)\r\n }\r\n />\r\n ) : (\r\n \r\n customFetchAssetInfo(\r\n dispatch,\r\n { assetInfo: fetchOrderAssetInfo },\r\n order\r\n )\r\n }\r\n />\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n this.handleChangeContractData(\"CollateralQuantity\", e.value);\r\n }}\r\n dataTypeDecimalName=\"quantity\"\r\n disabled={loading}\r\n placeholder=\"Quantity\"\r\n />\r\n \r\n \r\n @\r\n \r\n \r\n {\r\n this.handleChangeContractData(\"price\", e.value);\r\n }}\r\n decimalScale={this.state.decimalAmount}\r\n dataTypeDecimalName=\"price\"\r\n disabled={loading}\r\n placeholder=\"Price\"\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n this.handleChangeContractData(\"marketValue\", e.value);\r\n }}\r\n dataTypeDecimalName=\"price\"\r\n disabled\r\n placeholder=\"Market Value\"\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n this.handleChangeContractData(\"maturity\", e.target.value)}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n this.handleChangeContractData(\"rate\", e.value);\r\n }}\r\n dataTypeDecimalName=\"percentage\"\r\n disabled={loading}\r\n placeholder=\"Rate\"\r\n suffix=\"%\"\r\n />\r\n \r\n \r\n this.handleChangeContractData(\r\n \"paymenttoborrower\",\r\n !execution.contractdata.paymenttoborrower\r\n )\r\n }\r\n />\r\n \r\n \r\n
    \r\n Opening leg{\" \"}\r\n {execution.contractdata.currency}{\" \"}\r\n {this.state.calculatingLegs ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
    \r\n
    \r\n Closing leg{\" \"}\r\n {execution.contractdata.currency}{\" \"}\r\n {this.state.calculatingLegs ? (\r\n \r\n ) : (\r\n {\r\n this.handleChangeClosingLeg(\"closing\", e.value);\r\n }}\r\n dataTypeDecimalName=\"currency\"\r\n placeholder=\"Closing Leg\"\r\n />\r\n )}\r\n
    \r\n \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n )}\r\n \r\n \r\n this.confirm()}\r\n style={{ marginTop: \"8px\" }}\r\n data-style={SLIDE_LEFT}\r\n >\r\n {\"Confirm execution\"}\r\n \r\n \r\n \r\n
    \r\n )}\r\n\r\n
    \r\n\r\n null}\r\n executions={executions}\r\n showDelete={isManualAndActive}\r\n decimalAmount={this.state.decimalAmount}\r\n minimumFractionDigits={quantityIsCash ? maxDecimals : 2}\r\n />\r\n
    \r\n
    \r\n \r\n {this.state.calculatingTotal ? (\r\n \r\n ) : (\r\n this.state.total && (\r\n

    \r\n Total \r\n

    \r\n )\r\n )}\r\n\r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst Fees = ({ fees }) => {\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {fees.map((feeItem, idx) => (\r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n
    DescriptionAmount
    {feeItem.Description}\r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default Execution;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"Execution-module_modal_1Hrrk\",\"suggestionItem\":\"Execution-module_suggestionItem_35IZX\",\"cashInfo\":\"Execution-module_cashInfo_3A7JO\",\"content\":\"Execution-module_content_3L0zo\",\"routesLogs\":\"Execution-module_routesLogs_2_oLt\",\"row\":\"Execution-module_row_AGUhV\",\"contractDetailsWrapper\":\"Execution-module_contractDetailsWrapper_Gm8_O\",\"openCheckbox\":\"Execution-module_openCheckbox_2iNqk\",\"leg\":\"Execution-module_leg_2E048\",\"opening\":\"Execution-module_opening_1L7Ig\",\"closing\":\"Execution-module_closing_NThd4\",\"feesContainer\":\"Execution-module_feesContainer_1A63g\",\"feesTable\":\"Execution-module_feesTable_3954-\"};","import { OrderPriceType, ProcessingMode } from \"../../../utils/Order/Order\";\r\nimport { getOrderStats } from \"../../../utils\";\r\nimport { showToast } from \"../../../utils/Helper\";\r\n\r\nexport function calculateAvailableQty(order) {\r\n let orderStats = order.stats;\r\n if (!orderStats) {\r\n orderStats = getOrderStats(order);\r\n }\r\n\r\n let availableQty = +orderStats.pending;\r\n\r\n if (order.OrderQuantityIsCash) {\r\n availableQty = +order.OrderQuantity;\r\n }\r\n\r\n if (order.OrderLowTouchEnabled) {\r\n const { Childs } = order;\r\n\r\n availableQty = 0;\r\n\r\n if (Childs) {\r\n Childs.forEach((child) => {\r\n if (child.ChildProcessingMode == ProcessingMode.HighTouch) {\r\n availableQty += +child.ChildOrderQuantity;\r\n if (child.Executions) {\r\n child.Executions.forEach((execution) => {\r\n availableQty -= +execution.ExecutionQuantity;\r\n });\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n return availableQty;\r\n}\r\n\r\nexport function initialize(order) {\r\n let cashQuantity = \"\";\r\n let availableQty = calculateAvailableQty(order);\r\n let orderPrice = \"\";\r\n let currentDate = new Date().toDatetimeLocal();\r\n\r\n if (order.OrderQuantityIsCash) {\r\n cashQuantity = +order.OrderQuantity;\r\n availableQty = \"\";\r\n }\r\n\r\n if (order.AssetClassForm === \"Repo\") {\r\n cashQuantity = +order.OrderQuantity;\r\n availableQty = +order.OrderQuantity;\r\n }\r\n\r\n if (order.OrderType === \"Limit\") {\r\n orderPrice = order.OrderPrice;\r\n }\r\n\r\n if (order.OrderType === \"Stop\") {\r\n orderPrice = order.OrderStopPrice;\r\n }\r\n\r\n this.state = {\r\n execution: {\r\n ExecutionDate: currentDate,\r\n ExecutionQuantity: availableQty,\r\n ExecutionCashQuantity: cashQuantity,\r\n ExecutionPrice: orderPrice,\r\n ExecutionFXRoute: \"FXThroughCpty\",\r\n ExecutionFX: \"\",\r\n CounterPartyId: null,\r\n CounterPartyName: \"\",\r\n ExecutionMarkupPrice: \"\",\r\n },\r\n errors: {},\r\n loading: false,\r\n tradeRoutes: null,\r\n availableQty,\r\n initialDate: currentDate,\r\n };\r\n}\r\n\r\nexport function setTradeRoutes(tradeRoutes, tradeRoutesLogs) {\r\n this.setState({ tradeRoutes, tradeRoutesLogs });\r\n}\r\n\r\nexport function changeValues(values, callback) {\r\n let newState = this.state;\r\n\r\n if (values.TradingRouteId !== -1) {\r\n Object.entries(values).forEach((entry) => {\r\n const [name, value] = entry;\r\n newState = {\r\n execution: {\r\n ...newState.execution,\r\n [name]: value,\r\n },\r\n errors: {\r\n ...newState.errors,\r\n [name]: undefined,\r\n },\r\n };\r\n });\r\n this.setState({ ...newState }, this.calculateTotal);\r\n }\r\n}\r\n\r\nexport function clear(initValues) {\r\n this.setState({\r\n execution: {\r\n ExecutionDate: new Date().toDatetimeLocal(),\r\n ExecutionQuantity: \"\",\r\n ExecutionPrice: \"\",\r\n BrokerId: null,\r\n CounterPartyId: null,\r\n CounterPartyName: \"\",\r\n ExecutionMarkupPrice: \"\",\r\n ...initValues,\r\n },\r\n sharesQuantity: null,\r\n errors: {},\r\n loading: false,\r\n });\r\n}\r\n\r\nexport function validate(order) {\r\n const { execution, availableQty } = this.state;\r\n\r\n let errors = {};\r\n\r\n if (execution.ExecutionPrice == \"\") {\r\n errors[\"ExecutionPrice\"] = \"Required field\";\r\n } else if (order.OrderType == OrderPriceType.LIMIT || order.OrderType == OrderPriceType.STOPLIMIT) {\r\n if (order.OrderSide == \"Buy\" && +order.OrderPrice < +execution.ExecutionPrice) {\r\n if (order.AssetClassForm !== \"Repo\") {\r\n errors[\"ExecutionPrice\"] = \"Invalid price upper limit\";\r\n }\r\n }\r\n if (order.OrderSide == \"Sell\" && +order.OrderPrice > +execution.ExecutionPrice) {\r\n if (order.AssetClassForm !== \"Repo\") {\r\n errors[\"ExecutionPrice\"] = \"Invalid price above limit\";\r\n }\r\n }\r\n }\r\n\r\n if (order.AssetClassForm === \"Repo\") {\r\n if (!execution.contractdata.CollateralAssetTicker) {\r\n errors[\"CollateralAsset\"] = \"Required field\";\r\n }\r\n\r\n if (+order.OrderPrice > 0 && +order.OrderPrice < +execution.contractdata.rate) {\r\n errors[\"CollateralRate\"] = \"Invalid rate above limit\";\r\n }\r\n\r\n if (+execution.contractdata.CollateralQuantity === 0) {\r\n errors[\"CollateralQuantity\"] = \"Invalid quantity cannot be 0\";\r\n }\r\n\r\n if (+execution.contractdata.appraisal > 100 || +execution.contractdata.appraisal < 0) {\r\n errors[\"CollateralAppraisal\"] = \"Invalid appraisal outside limits\";\r\n }\r\n\r\n if (+execution.contractdata.margin > 100 || +execution.contractdata.margin < 0) {\r\n errors[\"CollateralHaircut\"] = \"Invalid haircut outside limits\";\r\n }\r\n\r\n if (+execution.contractdata.appraisal + +execution.contractdata.margin !== 100) {\r\n errors[\"CollateralAppraisal\"] = \"Invalid haircut/appraisal balance\";\r\n errors[\"CollateralHaircut\"] = \"Invalid haircut/appraisal balance\";\r\n }\r\n\r\n if (execution.contractdata.maturity === undefined || execution.contractdata.maturity === null) {\r\n errors[\"CollateralMaturity\"] = \"Required field\";\r\n }\r\n }\r\n\r\n if (execution.ExecutionQuantity == \"\") {\r\n errors[\"ExecutionQuantity\"] = \"Required field\";\r\n } else if (+execution.ExecutionQuantity > +order.stats.pending) {\r\n if (!order.OrderQuantityIsCash) {\r\n errors[\"ExecutionQuantity\"] = `Must be less or equal than ${order.stats.pending}`;\r\n }\r\n // has an execution\r\n else if (order.OrderQuantityIsCash && order.Childs && order.Childs.length > 0) {\r\n if (order.Childs[0].Executions.length > 0) {\r\n errors[\"ExecutionQuantity\"] = `Already filled`;\r\n }\r\n }\r\n }\r\n\r\n // check only when lt enabled\r\n if (order.OrderLowTouchEnabled) {\r\n if (+execution.ExecutionQuantity > availableQty) {\r\n errors[\"ExecutionQuantity\"] = `Must be less or equal than ${availableQty}`;\r\n }\r\n }\r\n\r\n if (order.AssetClassForm !== \"Forex\" && order.OrderCurrencySymbol !== order.OrderSettlementCurrencySymbol) {\r\n // The order trade currency is different from the settle currency, so the trader must indicate an FX.\r\n if (execution.ExecutionFXRoute == \"\") {\r\n errors[\"ExecutionFXRoute\"] = \"Required field\";\r\n } else {\r\n if (\r\n execution.ExecutionFXRoute == \"FXThroughCpty\" &&\r\n (execution.ExecutionFX == \"\" || execution.ExecutionFX <= 0)\r\n ) {\r\n errors[\"ExecutionFX\"] = \"Required field\";\r\n }\r\n }\r\n }\r\n\r\n if (isNaN(new Date(execution.ExecutionDate))) {\r\n errors[\"ExecutionDate\"] = \"Invalid value\";\r\n }\r\n\r\n if (execution.TradingRouteId === -1) errors[\"TradingRouteId\"] = \"Required field\";\r\n if (!execution.CounterPartyId) errors[\"CounterPartyId\"] = \"Required field\";\r\n\r\n if (execution.ExecutionDate === undefined || execution.ExecutionDate === null) {\r\n errors.ExecutionDate = \"Required field\";\r\n }\r\n if (execution.ExecutionValueDate === undefined || execution.ExecutionValueDate === null) {\r\n errors.ExecutionValueDate = \"Required field\";\r\n }\r\n\r\n let ExecutionDateAux = new Date(execution.ExecutionDate);\r\n ExecutionDateAux = new Date(`${ExecutionDateAux.toDateLocal()}T00:00`);\r\n const ExecutionValueDateAux = new Date(`${execution.ExecutionValueDate}T00:00`);\r\n if (ExecutionDateAux > ExecutionValueDateAux) {\r\n errors.ExecutionDate = \"Trade date should be before or at value date\";\r\n errors.ExecutionValueDate = \"Value date should be after or at trade date\";\r\n }\r\n\r\n const { minTradeDate, maxTradeDate, restricted } = this.state;\r\n let ExecutionDateAux2 = new Date(execution.ExecutionDate);\r\n let minExecutionDate = new Date(minTradeDate);\r\n let maxExecutionDate = new Date(maxTradeDate);\r\n if (ExecutionDateAux2 < minExecutionDate || ExecutionDateAux2 > maxExecutionDate) {\r\n if (restricted) {\r\n errors.ExecutionDate = `Trade date outside allowed time range (${minExecutionDate.toLocaleTimeString()}-${maxExecutionDate.toLocaleTimeString()})`;\r\n } else {\r\n showToast(\r\n `The trade date was updated because it was outside allowed time range (${minExecutionDate.toLocaleTimeString()}-${maxExecutionDate.toLocaleTimeString()})`\r\n );\r\n let newExecutionDate = minTradeDate;\r\n if (ExecutionDateAux2 > maxExecutionDate) newExecutionDate = maxTradeDate;\r\n this.setState((state) => ({\r\n ...state,\r\n execution: {\r\n ...state.execution,\r\n ExecutionDate: newExecutionDate,\r\n },\r\n }));\r\n }\r\n }\r\n\r\n if (this.props.applyMarkupTrader && order.OrderType == \"Limit\") {\r\n const totalPrice = parseFloat(execution.ExecutionPrice) + parseFloat(execution.ExecutionMarkupPrice);\r\n const differencePrice = parseFloat(execution.ExecutionPrice) - parseFloat(execution.ExecutionMarkupPrice);\r\n\r\n if (order.OrderSide === \"Buy\" && totalPrice > order.OrderPrice) {\r\n errors.ExecutionMarkupPrice = \"Markup price may not be higher than the limit price\";\r\n } else if (order.OrderSide === \"Sell\" && differencePrice < order.OrderPrice) {\r\n errors.ExecutionMarkupPrice = \"Markup price may not be lower than the limit price\";\r\n }\r\n }\r\n this.setState({ errors });\r\n\r\n return !Object.keys(errors).length;\r\n}\r\n","import { CommissionType, ProductType } from \"../../../../utils/Order/Order\";\r\n\r\nexport const clientPrice = (side, markupType, markup, price, isDiscount) => {\r\n if (\r\n side != undefined &&\r\n markupType != undefined &&\r\n markup != undefined &&\r\n markup !== \"\" &&\r\n price != undefined &&\r\n price !== \"\"\r\n ) {\r\n const sideSign = (side == \"Buy\" && !isDiscount) || (side == \"Sell\" && isDiscount) ? 1 : -1;\r\n\r\n if (markupType == CommissionType.FaceValueCash) {\r\n return +price + sideSign * +markup;\r\n }\r\n\r\n return +price + sideSign * +price * (+markup / 100);\r\n }\r\n\r\n return null;\r\n};\r\n\r\nexport const clientRate = (side, markupType, markup, rate) => {\r\n if (\r\n side != undefined &&\r\n markupType != undefined &&\r\n markup != undefined &&\r\n markup !== \"\" &&\r\n rate != undefined &&\r\n rate !== \"\"\r\n ) {\r\n const sideSign = side == \"Buy\" ? -1 : 1;\r\n\r\n if (markupType == CommissionType.FaceValueCash) {\r\n return +rate + sideSign * +markup;\r\n }\r\n\r\n return +rate + sideSign * +rate * (+markup / 100);\r\n }\r\n\r\n return null;\r\n};\r\n\r\nexport const accountProps = ({ order, readonly, errors }) => {\r\n return {\r\n order,\r\n account: order.CurrentAccount,\r\n hasAttachment: order.CurrentAccount.HasFileUploadPending\r\n ? { uploadPending: true }\r\n : order.CurrentAccount.AttachmentFileType,\r\n readonly,\r\n errors,\r\n };\r\n};\r\n\r\nexport const commissionSuffix = (commissionType, currencySymbol = \"\") => {\r\n if (commissionType == CommissionType.PrincipalPercentage) {\r\n return { suffix: \"%\" };\r\n }\r\n if (commissionType == CommissionType.FaceValueCash && currencySymbol !== \"\") {\r\n return { prefix: `${currencySymbol} ` };\r\n }\r\n\r\n return null;\r\n};\r\n\r\nexport const customFetchAssetInfo = (dispatch, services, order) => {\r\n const assetInfoData = {\r\n tradeDate: order.OrderInitDate,\r\n valueDate: order.OrderFutureSettlmentDate,\r\n fixedValueDate: true,\r\n orderForm: order.AssetClassForm,\r\n assetId:\r\n order.AssetClassForm === ProductType.REPO && order.CurrentAccount.Collateral\r\n ? order.CurrentAccount.Collateral[0].AssetId\r\n : order.AssetId,\r\n assetTicker:\r\n order.AssetClassForm === ProductType.REPO && order.CurrentAccount.Collateral\r\n ? order.CurrentAccount.Collateral[0].AssetTicker\r\n : order.AssetTicker,\r\n tradeCurrencyId: order.OrderCurrencyId,\r\n settleCurrencyId: order.OrderSettlementCurrencyId,\r\n };\r\n\r\n return services.assetInfo(assetInfoData).then((response) => {\r\n const { assetorderdata } = response.response;\r\n\r\n dispatch({ type: \"FETCH_ASSET_INFO\", data: assetorderdata });\r\n\r\n return assetorderdata;\r\n });\r\n};\r\n\r\nexport const customFetchAccountInfo = (dispatch, services, params, updateOrderValues) => {\r\n const fetchTasks = [services.accountInfo(params), services.commissionInfo(params)];\r\n\r\n return Promise.all(fetchTasks).then((taskResults) => {\r\n const { kvpItems } = taskResults[1].response;\r\n\r\n dispatch({ type: \"FETCH_ACCOUNT_INFO\", items: kvpItems, updateOrderValues });\r\n\r\n return taskResults[0];\r\n });\r\n};\r\n","import React, { Component } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport style from \"./History.module.scss\";\r\nimport {\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Container,\r\n Card,\r\n CardBody,\r\n Button,\r\n Table,\r\n} from \"reactstrap\";\r\nimport { FormattedDate, FormattedTime } from \"react-intl\";\r\nimport { CircularProgress, OrderInlineDetail, ExecutionsTable } from \"../..\";\r\nimport { localDateTime } from \"../../../utils/Helper\";\r\n\r\nclass History extends Component {\r\n state = {\r\n histories: null,\r\n loading: true,\r\n };\r\n\r\n componentWillReceiveProps(nextProps, nextState) {\r\n const { orderId } = nextProps;\r\n\r\n if (orderId && !this.state.histories) {\r\n this.props.onHistoryRequest({ orderId }).then((response) => {\r\n this.setState({\r\n loading: false,\r\n histories: response.response.histories,\r\n });\r\n });\r\n }\r\n }\r\n\r\n toggle = () => {\r\n this.props.onToggle();\r\n this.setState({ histories: null, loading: true });\r\n };\r\n\r\n render() {\r\n const { order, open } = this.props;\r\n\r\n let executions = [];\r\n\r\n if (!open) {\r\n return null;\r\n }\r\n\r\n order.Childs &&\r\n order.Childs.forEach(\r\n (child) =>\r\n child.Executions &&\r\n child.Executions.forEach((exec) => executions.push({ ...exec, childId: child.ChildOrderId }))\r\n );\r\n\r\n return (\r\n
    \r\n \r\n \r\n Order history\r\n \r\n \r\n \r\n \r\n \r\n\r\n
    History
    \r\n {this.state.loading ? (\r\n \r\n ) : (\r\n
    \r\n {this.state.histories\r\n .filter((item) => item.HistoryType != \"Debug\")\r\n .map((item) => (\r\n
    \r\n
    \r\n {item.HistoryUserName}\r\n\r\n \r\n {\" \"}\r\n \r\n \r\n
    \r\n

    {item.HistoryDetails.trim()}

    \r\n
    \r\n ))}\r\n
    \r\n )}\r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport default History;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"subtitle\":\"History-module_subtitle_247jD\",\"tableExecutions\":\"History-module_tableExecutions_197FR\",\"histories\":\"History-module_histories_dD19g\",\"item\":\"History-module_item_2FO74\",\"header\":\"History-module_header_1CI7f\",\"time\":\"History-module_time_2xdic\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"subtitle\":\"History-module_subtitle_1nH6F\",\"tableExecutions\":\"History-module_tableExecutions_1k86A\",\"histories\":\"History-module_histories_2hTDo\",\"item\":\"History-module_item_bnInW\",\"header\":\"History-module_header_1fgQT\",\"time\":\"History-module_time_2KL_i\"};","import React, { Component } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport style from \"./History.module.scss\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Container, Button } from \"reactstrap\";\r\nimport { FormattedDate, FormattedTime } from \"react-intl\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport { CircularProgress } from \"../..\";\r\nimport { localDateTime } from \"../../../utils/Helper\";\r\n\r\nclass HistoryDefault extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n histories: null,\r\n loading: true,\r\n };\r\n \r\n const { process, processCharId, processId } = props || {};\r\n if (process || processCharId || processId) {\r\n this.props.onHistoryRequest({ process, processCharId, processId }).then((response) => {\r\n this.setState({\r\n loading: false,\r\n histories: response.response.histories,\r\n });\r\n });\r\n }\r\n }\r\n\r\n componentWillReceiveProps(nextProps, nextState) {\r\n const { processId, process } = nextProps;\r\n if (processId && !this.state.histories) {\r\n this.props.onHistoryRequest({ process, processId }).then((response) => {\r\n this.setState({\r\n loading: false,\r\n histories: response.response.histories,\r\n });\r\n });\r\n }\r\n }\r\n\r\n toggle = () => {\r\n this.props.onToggle();\r\n this.setState({ histories: null, loading: true });\r\n };\r\n\r\n render() {\r\n const { process, open } = this.props;\r\n\r\n if (!open) {\r\n return null;\r\n }\r\n\r\n return (\r\n
    \r\n \r\n {process} history\r\n \r\n \r\n
    History
    \r\n {this.state.loading ? (\r\n \r\n ) : (\r\n
    \r\n {this.state.histories.length == 0 && (\r\n Empty history\r\n )}\r\n {this.state.histories.map((item) => (\r\n
    \r\n
    \r\n {item.HistoryUserName}\r\n\r\n \r\n {\" \"}\r\n \r\n \r\n
    \r\n\r\n

    \r\n {item.HistoryDetails.trim()\r\n .split(\"\\\\n\")\r\n .map((line, index) => (\r\n \r\n {line}\r\n
    \r\n
    \r\n ))}\r\n

    \r\n
    \r\n ))}\r\n
    \r\n )}\r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport default HistoryDefault;\r\n","import React, { Component } from \"react\";\r\nimport { FormGroup } from \"reactstrap\";\r\nimport style from \"./Fields.module.scss\";\r\nimport Holders from \"../../Order/Field/Account/Holders\";\r\nimport { Combobox, Field } from \"../../Order/Field/Field\";\r\nimport Autosuggest from \"../../../Autosuggest/Autosuggest\";\r\nimport CircularProgress from \"../../../CircularProgress/CircularProgress\";\r\nimport Balance from \"../../Order/Field/Account/Balance\";\r\n\r\nclass Account extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n const { AccountId, opsViewAccountName } = props;\r\n\r\n this.state = {\r\n loadingHolders: AccountId != null,\r\n holders: null,\r\n };\r\n }\r\n\r\n componentWillMount() {\r\n const { AccountId } = this.props;\r\n\r\n if (!this.props.hideHolder && AccountId != null) {\r\n this.requestAccountHolders({ AccountId });\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n this._isMounted = true;\r\n const { AccountId, AccountName, AccountNumber, HolderId } = this.props;\r\n\r\n // Cuando se ve una orden ya viene precargados los valores\r\n if (!isEmpty(AccountId) && isEmpty(HolderId)) {\r\n this.onChange(\"\", {\r\n id: AccountId,\r\n name: AccountName,\r\n number: AccountNumber,\r\n });\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n this._isMounted = false;\r\n }\r\n\r\n onSuggestionsFetchRequested = ({ value }) => {\r\n const { sendingAccountId } = this.props;\r\n const { fetchSearchAccount, fetchSearchTransfer } = this.props.services;\r\n const filter = this.props.filter || [];\r\n if (sendingAccountId && sendingAccountId > 0) {\r\n return fetchSearchTransfer({\r\n text: value,\r\n sendingAccountId: sendingAccountId,\r\n })\r\n .then((r) => r.response.accounts)\r\n .then((accounts) =>\r\n accounts\r\n .map((a) => {\r\n const accountAttrs = JSON.parse(a.Value);\r\n\r\n return {\r\n id: a.Id,\r\n name: accountAttrs.value,\r\n number: accountAttrs.key,\r\n };\r\n })\r\n .filter((a) => !filter.includes(a.id))\r\n );\r\n } else {\r\n return fetchSearchAccount({ text: value })\r\n .then((r) => r.response.accounts)\r\n .then((accounts) =>\r\n accounts\r\n .map((a) => {\r\n const accountAttrs = JSON.parse(a.Value);\r\n\r\n return {\r\n id: a.Id,\r\n name: accountAttrs.value,\r\n number: accountAttrs.key,\r\n };\r\n })\r\n .filter((a) => !filter.includes(a.id))\r\n );\r\n }\r\n };\r\n\r\n onChangeAccountHolder = (value) => {\r\n const holderItem = getItemById(this.state.holders, value);\r\n\r\n this.props.onChange({\r\n HolderId: holderItem.id,\r\n HolderName: holderItem.description,\r\n });\r\n };\r\n\r\n requestAccountHolders = ({ AccountId }) => {\r\n const { fetchAccountHolders } = this.props.services;\r\n\r\n fetchAccountHolders({ accountId: AccountId })\r\n .then((r) => r.response.holders)\r\n .then((holders) => {\r\n let _holders = holders.map((h) => ({\r\n isMain: h.IsMain,\r\n description: h.PersonName,\r\n id: h.PersonId,\r\n }));\r\n\r\n const selectedHolder = _holders.find((h) => h.isMain) || (_holders.length ? _holders[0] : null);\r\n\r\n this._isMounted &&\r\n this.setState(\r\n {\r\n holders: _holders,\r\n loadingHolders: false,\r\n },\r\n () => {\r\n const { holderId } = this.props;\r\n\r\n if (holderId == null && selectedHolder) {\r\n const { id, description } = selectedHolder;\r\n\r\n this.props.onChange({\r\n HolderId: id,\r\n HolderName: description,\r\n });\r\n }\r\n }\r\n );\r\n });\r\n };\r\n\r\n onChange = (method, value) => {\r\n let _value = defaultAccountValue;\r\n\r\n if (method != \"type\" && value.id) {\r\n _value = {\r\n AccountNumber: value.number,\r\n AccountName: value.name,\r\n AccountId: value.id,\r\n };\r\n\r\n if (!this.props.hideHolder) {\r\n this.requestAccountHolders({ AccountId: value.id });\r\n }\r\n\r\n this.setState({ holders: null, loadingHolders: true });\r\n } else {\r\n this.setState({ holders: null });\r\n _value.AccountName = value;\r\n }\r\n\r\n this.props.onChange(_value);\r\n };\r\n\r\n render() {\r\n const { AccountName, AccountNumber, HolderId, HolderName, readonly, errors, hideHolder, label, noLabel, opsViewAccountName } =\r\n this.props;\r\n\r\n const inputProps = {\r\n placeholder: \"Account\",\r\n disabled: readonly.AccountName,\r\n invalid: !!errors.AccountNumber,\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n\r\n {!hideHolder && (\r\n \r\n {this.state.loadingHolders ? (\r\n \r\n ) : (\r\n
    \r\n \r\n \r\n \r\n {this.props.balance && this.props.balance.loading ? (\r\n \r\n ) : (\r\n this.props.balance &&\r\n this.props.balance.data.length > 0 && \r\n )}\r\n
    \r\n )}\r\n
    \r\n )}\r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst defaultAccountValue = {\r\n AccountId: null,\r\n AccountName: \"\",\r\n HolderId: null,\r\n HolderName: null,\r\n};\r\n\r\nconst renderSuggestion = (suggestion) => (\r\n
    \r\n {suggestion.number}\r\n {\" - \"}\r\n {suggestion.name}\r\n
    \r\n);\r\n\r\nconst getSuggestionValue = (suggestion) => `${suggestion.number} - ${suggestion.name}`;\r\n\r\nconst getItemById = (items, id) => {\r\n return items.find((e) => e.id == id);\r\n};\r\n\r\nconst isEmpty = (value) => value == undefined || value == \"\";\r\n\r\nexport default Account;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"localINTL\":\"Fields-module_localINTL_dItoB\",\"off\":\"Fields-module_off_u61tJ\",\"local\":\"Fields-module_local_uRLjw\",\"INTL\":\"Fields-module_INTL_1lg21\",\"localINTLRO\":\"Fields-module_localINTLRO_lFvtp\",\"suggestionItem\":\"Fields-module_suggestionItem_1-1ep\"};","import React, { useState } from \"react\";\r\nimport style from \"./Files.module.scss\";\r\nimport { Button } from \"reactstrap\";\r\nimport { Field } from \"../../../Order/Field/Field\";\r\n\r\nconst Files = ({ ioType, id, dispatch, readonly, files, downloadFile }) => {\r\n const [plus100, setplus100] = useState(false);\r\n const uploadFiles = () => {\r\n const addedFiles = Object.values(event.target.files).map((f) => ({\r\n id: Math.random().toString(36).substring(2, 15),\r\n name: f.name,\r\n type: f.type,\r\n data: f,\r\n }));\r\n let hasError = false;\r\n for (var i = 0; i < addedFiles.length; i++) {\r\n if (addedFiles[i].name.length > 100) {\r\n hasError = true;\r\n setplus100(true);\r\n }\r\n }\r\n if (!hasError) {\r\n setplus100(false);\r\n dispatch({\r\n type: \"UPDATE_FILES\",\r\n props: { type: \"Add\", files: addedFiles },\r\n });\r\n }\r\n };\r\n\r\n const deleteFile = (id) => {\r\n dispatch({\r\n type: \"UPDATE_FILES\",\r\n props: { type: \"Delete\", id },\r\n });\r\n };\r\n\r\n const doDownloadFile = (fileId) => {\r\n downloadFile({\r\n id,\r\n ioType,\r\n fileId,\r\n })\r\n .then((r) => r.response)\r\n .then((r) => {\r\n if (r.url != \"\") {\r\n window.open(r.url);\r\n }\r\n });\r\n };\r\n\r\n return (\r\n \r\n
    \r\n
    \r\n {files.length == 0 ? (\r\n No documents (name length less than 100 characters)\r\n ) : (\r\n \r\n {!readonly && (\r\n \r\n Select document(s) to upload (name length less than 100 characters)\r\n \r\n )}\r\n \r\n )}\r\n {!readonly && (\r\n \r\n \r\n \r\n \r\n )}\r\n

    The name is longer than 100 characters

    \r\n
    \r\n\r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst FileList = ({ files, readonly, deleteFile, downloadFile }) => {\r\n return (\r\n
    \r\n {files.map((f) => (\r\n
    \r\n downloadFile(f.id)}>\r\n \r\n {f.name}\r\n \r\n {!readonly && (\r\n deleteFile(f.id)}\r\n style={{ color: \"#d83737\" }}\r\n >\r\n \r\n \r\n )}\r\n
    \r\n
    \r\n ))}\r\n
    \r\n );\r\n};\r\n\r\nexport default Files;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"root\":\"Files-module_root_g8z92\",\"empty\":\"Files-module_empty_2o8kg\",\"inputFile\":\"Files-module_inputFile_3fg4N\",\"upload\":\"Files-module_upload_2_l3x\",\"list\":\"Files-module_list_3wp6w\",\"attachment\":\"Files-module_attachment_1m5qJ\",\"link\":\"Files-module_link_3CXKO\",\"fileName\":\"Files-module_fileName__UOfM\",\"error\":\"Files-module_error_2YVSK\",\"error2\":\"Files-module_error2_VEhNp\"};","import React from \"react\";\r\nimport { Button } from \"reactstrap\";\r\nimport classnames from \"classnames\";\r\nimport style from \"./Fields.module.scss\";\r\n\r\nconst LocalINTL = ({ isLocal, oneSide, onChange, ...props }) => {\r\n const { readonly } = props;\r\n\r\n if (readonly || oneSide) {\r\n return ;\r\n }\r\n\r\n return (\r\n
    \r\n onChange({ Local: true })}\r\n className={classnames(style.local, !isLocal ? \"\" : style.off)}\r\n disabled={!!isLocal}\r\n >\r\n Local\r\n \r\n\r\n onChange({ Local: false })}\r\n className={classnames(style.INTL, isLocal ? \"\" : style.off)}\r\n disabled={!!isLocal == false}\r\n >\r\n INTL\r\n \r\n
    \r\n );\r\n};\r\n\r\nconst ReadOnly = ({ isLocal }) =>
    {isLocal ? \"Local\" : \"INTL\"}
    ;\r\n\r\nexport default LocalINTL;\r\n","import React from \"react\";\r\nimport style from \"./Fields.module.scss\";\r\nimport { Field } from \"../../Order/Field/Field\";\r\nimport Autosuggest from \"../../../Autosuggest/Autosuggest\";\r\n\r\nconst SimpleSuggest = ({ value, error, disabled, onChange, label, noLabel, service }) => {\r\n const fetchSearch = ({ value }) => {\r\n return service({\r\n text: value,\r\n length: 10,\r\n })\r\n .then((r) => (r.response ? r.response : r))\r\n .then((r) => r[Object.keys(r)[0]])\r\n .then((values) =>\r\n values.slice(0, 9).map((s) => ({\r\n id: s.Id,\r\n name: `${s.Name || s.Value}`,\r\n }))\r\n );\r\n };\r\n\r\n const internalOnChange = (method, value) => {\r\n const _value = {\r\n id: null,\r\n name: \"\",\r\n };\r\n\r\n if (method != \"type\" && value.id) {\r\n _value.id = value.id;\r\n _value.name = value.name;\r\n }\r\n onChange(_value);\r\n };\r\n\r\n return (\r\n \r\n (\r\n
    \r\n {suggestion.name}\r\n
    \r\n )}\r\n getSuggestionValue={(s) => `${s.name}`}\r\n onSuggestionsFetchRequested={fetchSearch}\r\n value={value || \"\"}\r\n inputProps={{\r\n placeholder: label,\r\n invalid: !!error,\r\n disabled,\r\n }}\r\n onChange={(m, v) => internalOnChange(m, v)}\r\n />\r\n
    \r\n );\r\n};\r\n\r\nexport default SimpleSuggest;\r\n","import React from \"react\";\r\nimport style from \"./Fields.module.scss\";\r\nimport { Field } from \"../../Order/Field/Field\";\r\nimport Autosuggest from \"../../../Autosuggest/Autosuggest\";\r\nimport { ProductType } from \"../../../../utils\";\r\nimport { IOType } from \"../../../IO/types\";\r\n\r\nconst Symbol = ({ ioType, isCurrency, value, error, disabled, accountId, onChange, fetchSearchSymbol }) => {\r\n const fetchSearch = ({ value }) => {\r\n return fetchSearchSymbol({\r\n form: isCurrency ? ProductType.FOREX : \"\",\r\n text: value,\r\n length: 10,\r\n accountId: ioType != null && ioType != IOType.Deposit ? accountId : 0,\r\n })\r\n .then((r) => (r && r.response ? r.response.symbols : []))\r\n .then((symbols) =>\r\n symbols.map((s) => ({\r\n id: s.Id,\r\n name: `${s.Ticker} ${isCurrency ? `- ${s.Description}` : \"\"}`,\r\n decimal: Number(s.decimal),\r\n Price: s.price,\r\n AssetPhysicalDenomination: s.AssetPhysicalDenomination,\r\n AssetSheetSize: s.AssetSheetSize,\r\n }))\r\n );\r\n };\r\n\r\n const internalOnChange = (method, value) => {\r\n const _value = {\r\n CurrencyId: null,\r\n CurrencyISO: \"\",\r\n AssetId: null,\r\n AssetTicker: \"\",\r\n decimal: 2,\r\n };\r\n if (method != \"type\" && value.id) {\r\n if (isCurrency) {\r\n _value.CurrencyId = value.id;\r\n _value.CurrencyISO = value.name;\r\n _value.decimal = 2;\r\n } else {\r\n _value.AssetId = value.id;\r\n _value.AssetTicker = value.name;\r\n _value.decimal = value.decimal;\r\n _value.Price = value.Price;\r\n _value.AssetPhysicalDenomination = value.AssetPhysicalDenomination;\r\n _value.AssetSheetSize = value.AssetSheetSize;\r\n }\r\n }\r\n\r\n onChange(_value);\r\n };\r\n\r\n return (\r\n \r\n (\r\n
    \r\n {suggestion.name}\r\n
    \r\n )}\r\n getSuggestionValue={(s) => `${s.name}`}\r\n onSuggestionsFetchRequested={fetchSearch}\r\n value={value || \"\"}\r\n inputProps={{\r\n placeholder: isCurrency ? \"Currency\" : \"Asset\",\r\n invalid: !!error,\r\n disabled: disabled || (ioType != null && ioType != IOType.Deposit && !accountId),\r\n }}\r\n onChange={(m, v) => internalOnChange(m, v)}\r\n />\r\n \r\n );\r\n};\r\n\r\nexport default Symbol;\r\n","import LocalINTL from './LocalINTL';\r\nimport SimpleSuggest from './SimpleSuggest';\r\n\r\nexport {\r\n LocalINTL,\r\n SimpleSuggest\r\n}","import React, { useContext } from \"react\";\r\nimport { Button } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport classnames from \"classnames\";\r\nimport { Dispatch } from \"./store/store\";\r\nimport style from \"./IO.module.scss\";\r\nimport { onChangeMode } from \"./IO\";\r\nimport { Mode } from \"../../../utils\";\r\n\r\nconst Footer = ({ toggle, buttons, actions }) => {\r\n const { dispatch } = useContext(Dispatch);\r\n const { precheck, modify, confirm } = buttons;\r\n\r\n if (precheck.loading) {\r\n setTimeout(() => {\r\n onChangeMode(dispatch, Mode.CONFIRM);\r\n }, 300);\r\n }\r\n\r\n return (\r\n
    \r\n {\" \"}\r\n {modify.visible && (\r\n \r\n )}{\" \"}\r\n {precheck.visible && (\r\n onChangeMode(dispatch, Mode.PRECHECK)}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {\"Pre check\"}\r\n \r\n )}\r\n {confirm.visible && (\r\n \r\n {\"Confirm\"}\r\n \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nexport default Footer;\r\n","/* eslint-disable react/prop-types */\r\nimport React, { useState } from \"react\";\r\nimport { Table, Button } from \"reactstrap\";\r\nimport { FormattedNumber } from \"react-intl\";\r\nimport style from \"./Bulk.module.scss\";\r\nimport Edit from \"./Edit\";\r\nimport { IOType, IOMode } from \"../../../../IO/types\";\r\nimport { updateAccountBanks } from \"../Default\";\r\n\r\nconst Assets = ({ error, itemsHeader, items, isCurrency, ioType, ioMode, readonly, dispatch, ...props }) => {\r\n const [edit, setEdit] = useState({\r\n open: false,\r\n item: { IsCurrency: isCurrency },\r\n });\r\n\r\n const toggleEdit = (item = { IsCurrency: isCurrency }) => {\r\n setEdit({\r\n open: !edit.open,\r\n item,\r\n });\r\n };\r\n\r\n const onEdit = (item) => {\r\n dispatch({ type: \"EDIT_BULK_ITEM\", item });\r\n };\r\n\r\n const onDelete = (itemId) => {\r\n dispatch({ type: \"DELETE_BULK_ITEM\", itemId });\r\n };\r\n\r\n if (edit.open) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n
    \r\n \r\n toggleEdit()}\r\n disabled={readonly}\r\n >\r\n \r\n {\"\\u00A0\"} Add {isCurrency ? \"Currency\" : \"Asset\"}\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n {ioType == IOType.Withdraw && ioMode == IOMode.MultipleAccounts && }\r\n \r\n \r\n \r\n {items.map((i, ind) => (\r\n onDelete(i.Id)}\r\n toggleEdit={() => toggleEdit(i)}\r\n readonly={readonly}\r\n />\r\n ))}\r\n \r\n
    Quantity{isCurrency ? \"Currency\" : \"Asset\"}Bank Account\r\n
    \r\n
    \r\n {error && (\r\n
    \r\n {error}\r\n
    \r\n )}\r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst Item = ({ item, readonly, ioType, ioMode, local, onDelete, toggleEdit }) => (\r\n \r\n \r\n \r\n \r\n {item.IsCurrency ? item.CurrencyISO : item.AssetTicker}\r\n {ioType == IOType.Withdraw && ioMode == IOMode.MultipleAccounts && (\r\n \r\n {local\r\n ? `${item.BankAccountName} ${item.BankAccountNumber}`\r\n : `${item.BankAccountName} ${item.BankAccountNumber}`}\r\n \r\n )}\r\n \r\n \r\n onDelete(item.Id)}\r\n style={{ color: \"#d83737\" }}\r\n >\r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default Assets;\r\n","import React, { useState, useContext } from \"react\";\r\nimport style from \"./Bulk.module.scss\";\r\nimport { Dispatch } from \"../../store/store\";\r\nimport Assets from \"./Assets\";\r\n\r\nconst Bulk = ({ ...props }) => {\r\n const { dispatch, services, state } = useContext(Dispatch);\r\n const { io, fields, entities } = state;\r\n const { errors, readonly } = fields;\r\n\r\n const header = io.itemsHeader;\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default Bulk;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"table\":\"Bulk-module_table_15WFa\",\"error\":\"Bulk-module_error_25Iio\",\"btnAdd\":\"Bulk-module_btnAdd_3ONOr\",\"Deposit\":\"Bulk-module_Deposit_1n_Gw\",\"Withdraw\":\"Bulk-module_Withdraw_3_MZx\",\"title\":\"Bulk-module_title_1ebPI\",\"edit\":\"Bulk-module_edit_20EvM\",\"form\":\"Bulk-module_form_ehQHr\",\"actions\":\"Bulk-module_actions_S2zSm\"};","import React, { useState, useEffect, useContext, useRef } from \"react\";\r\nimport { Input, Button, Row, Col, Label } from \"reactstrap\";\r\nimport style from \"./Bulk.module.scss\";\r\nimport Symbol from \"../../Fields/Symbol\";\r\nimport { Field, Numeric, Combobox } from \"../../../Order/Field/Field\";\r\nimport { SimpleSuggest } from \"../../Fields\";\r\nimport { IOType, IOMode } from \"../../../../IO/types\";\r\nimport { onChangeHeader } from \"../../IO\";\r\nimport { Dispatch } from \"../../store/store\";\r\nimport { FormField } from \"../../../../../utils\";\r\n\r\nconst Edit = ({ toggle, item, services, ioType, ioMode, local, edit, entities, accountId }) => {\r\n const { dispatch, state } = useContext(Dispatch);\r\n const { io } = state;\r\n const [fields, setFields] = useState(item || {});\r\n const [errors, setErrors] = useState({});\r\n const [primerFetch, setPrimerFetch] = useState();\r\n const [balance, setBalance] = useState({\r\n loading: false,\r\n data: [],\r\n });\r\n //primeraVez.current = false\r\n\r\n const simpleItem = fields;\r\n const [denominations, setDenominations] = useState([]);\r\n const [denominationsItem, setDenominationsItem] = useState([]);\r\n const [denominationsDeposit, setDenominationsDeposit] = useState([]);\r\n const [denominationsReturn, setDenominationsReturn] = useState([]);\r\n const [assetDenominationInfo, setAssetDenominationInfo] = useState({ AssetPhysicalDenomination: false });\r\n const [segundoFetch, setSegundoFetch] = useState();\r\n const onChange = (newFields) => {\r\n setFields({\r\n ...fields,\r\n ...newFields,\r\n });\r\n\r\n const cleanedErrors = {};\r\n\r\n Object.keys(newFields).forEach((key) => (cleanedErrors[key] = undefined));\r\n\r\n setErrors({\r\n ...errors,\r\n ...cleanedErrors,\r\n });\r\n };\r\n\r\n const onEdit = () => {\r\n let newErrors = {};\r\n if (fields.Quantity == undefined || fields.Quantity === \"\") {\r\n newErrors[\"Quantity\"] = \"Required field\";\r\n }\r\n if (fields.IsCurrency==false && fields.denominationsTrue == false && assetDenominationInfo.AssetPhysicalDenomination) {\r\n newErrors[\"Denominations\"] = \"Must select \" + fields.slots + \" denominations for the quantity selected\";\r\n }\r\n if (ioType == IOType.Deposit && fields.IsCurrency==false && assetDenominationInfo.AssetPhysicalDenomination==true) {\r\n if (\r\n denominationsDeposit.some((item) => item.DenominationId === \"\") ||\r\n denominationsDeposit.length === 0\r\n ) {\r\n newErrors[\"DenominationsDeposit\"] = \"Must complete all fields\";\r\n }\r\n }\r\n if (fields.IsCurrency) {\r\n if (fields.CurrencyId == undefined || fields.CurrencyId == \"\") {\r\n newErrors[\"CurrencyISO\"] = \"Required field\";\r\n }\r\n } else {\r\n if (fields.AssetId == undefined || fields.AssetId == \"\") {\r\n newErrors[\"AssetTicker\"] = \"Required field\";\r\n }\r\n }\r\n\r\n if (ioType == IOType.Withdraw && ioMode == IOMode.MultipleAccounts) {\r\n if (local) {\r\n if (fields.BankAccountName == undefined || fields.BankAccountName == \"\") {\r\n newErrors[\"BankAccountName\"] = \"Required field\";\r\n }\r\n } else {\r\n if (fields.BankAccountName == undefined || fields.BankAccountName == \"\") {\r\n newErrors[\"BankAccountName\"] = \"Required field\";\r\n }\r\n\r\n if (fields.BankAccountNumber == undefined || fields.BankAccountNumber == \"\") {\r\n newErrors[\"BankAccountNumber\"] = \"Required field\";\r\n }\r\n }\r\n }\r\n\r\n if (Object.keys(newErrors).length) {\r\n setErrors(newErrors);\r\n } else {\r\n edit(fields);\r\n toggle();\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n //console.log(\"antes\", denominationsDeposit);\r\n fields.Denominations !== undefined && setDenominationsItem(fields.Denominations);\r\n fields.Denominations !== undefined && setDenominationsDeposit(fields.Denominations);\r\n //console.log(fields);\r\n //console.log(\"despues\", denominationsDeposit);\r\n services\r\n .GetDenominations({\r\n AssetId: fields.AssetId,\r\n AccountId: accountId,\r\n WithdrawId: 0,\r\n DepositId: 0,\r\n itemId: 0,\r\n TransferId: 0,\r\n })\r\n .then((response) => {\r\n let responseDenominations = response.denominations;\r\n for (let i = 0; i < io.items.length; i++) {\r\n if(io.items[i].Denominations!==undefined){\r\n let currentItemDenominations = io.items[i].Denominations;\r\n if (item.Denominations !== undefined) {\r\n if (\r\n !item.Denominations.some((obj2) =>\r\n currentItemDenominations.some((obj1) => obj1.DenominationId === obj2.DenominationId)\r\n )\r\n ) {\r\n responseDenominations = responseDenominations.filter(\r\n (element) =>\r\n !currentItemDenominations.some((obj2) => obj2.DenominationId === element.DenominationId)\r\n );\r\n }\r\n } else {\r\n if(currentItemDenominations !== undefined){\r\n responseDenominations = responseDenominations.filter(\r\n (element) =>\r\n !currentItemDenominations.some((obj2) => obj2.DenominationId === element.DenominationId)\r\n );\r\n }\r\n }\r\n }\r\n }\r\n setDenominations(responseDenominations);\r\n onChange({\r\n DenominationsTotal: responseDenominations,\r\n slots: 0,\r\n });\r\n setSegundoFetch(true);\r\n //console.log(responseDenominations);\r\n });\r\n }, [fields.AssetId, accountId]);\r\n\r\n useEffect(() => {\r\n //console.log(io.Id);\r\n if (io.Id !== undefined && fields.Denominations === undefined && ioType == IOType.Withdraw) {\r\n services\r\n .GetDenominations({\r\n AssetId: fields.AssetId,\r\n AccountId: accountId,\r\n WithdrawId: io.Id,\r\n DepositId: -1,\r\n itemId: fields.Id,\r\n TransferId: -1,\r\n })\r\n .then((response) => {\r\n const responseDenominations = response.denominations;\r\n //console.log(responseDenominations);\r\n setDenominationsItem(responseDenominations);\r\n onChange({\r\n Denominations: responseDenominations,\r\n });\r\n });\r\n } else {\r\n if (io.Id !== undefined && fields.Denominations === undefined && ioType == IOType.Deposit) {\r\n services\r\n .GetDenominations({\r\n AssetId: fields.AssetId,\r\n AccountId: accountId,\r\n WithdrawId: -1,\r\n DepositId: io.Id,\r\n itemId: fields.Id,\r\n TransferId: -1,\r\n })\r\n .then((response) => {\r\n const responseDenominations = response.denominations;\r\n //console.log(responseDenominations);\r\n setDenominationsDeposit(responseDenominations);\r\n onChange({\r\n Denominations: [...io.Denominations, responseDenominations],\r\n });\r\n });\r\n }\r\n }\r\n //console.log(fields);\r\n }, [segundoFetch]);\r\n\r\n useEffect(() => {\r\n if (accountId && !fields.IsCurrency && fields.AssetId) {\r\n setBalance({ ...balance, loading: true });\r\n services\r\n .fetchAccountSellingPower({ accountId: accountId, assetId: fields.AssetId })\r\n .then((response) => {\r\n const { sellingpower } = response.response;\r\n setBalance({ ...balance, data: sellingpower });\r\n });\r\n } else {\r\n setBalance({ ...balance, data: [] });\r\n }\r\n setBalance({ ...balance, loading: false });\r\n services.fetchGetAssetInformation({ assetId: fields.AssetId }).then((response) => {\r\n if (response.info.AssetPhysicalDenomination) {\r\n setAssetDenominationInfo({\r\n AssetPhysicalDenomination: response.info.AssetPhysicalDenomination,\r\n AssetSheetSize: response.info.AssetSheetSize,\r\n SlotsQuantity: 0,\r\n });\r\n setPrimerFetch(true);\r\n } else {\r\n setAssetDenominationInfo({\r\n AssetPhysicalDenomination: false,\r\n AssetSheetSize: 0,\r\n SlotsQuantity: 0,\r\n });\r\n }\r\n //console.log(\"response:\", response.info);\r\n //setDecimalAmount(response.info.SubAssetClassDecimalPlaces);\r\n });\r\n }, [fields.AssetId]);\r\n\r\n useEffect(() => {\r\n if (assetDenominationInfo.AssetPhysicalDenomination && ioType == IOType.Withdraw && fields.Quantity) {\r\n let slots = Math.ceil(fields.Quantity / assetDenominationInfo.AssetSheetSize);\r\n setAssetDenominationInfo({\r\n ...assetDenominationInfo,\r\n SlotsQuantity: slots,\r\n });\r\n let i;\r\n if (slots > denominationsReturn.length) {\r\n //selecciono menos denominations de los marcados en cantidad\r\n i = false;\r\n } else if (slots < denominationsReturn.length) {\r\n //seleciono mas denominations de los marcados en cantidad\r\n i = false;\r\n } else {\r\n i = true;\r\n }\r\n onChange({\r\n denominationsTrue: i,\r\n slots: slots,\r\n });\r\n }\r\n }, [fields.Quantity, denominationsReturn.length, fields.AssetId]);\r\n\r\n useEffect(() => {\r\n //console.log(fields, assetDenominationInfo, ioType);\r\n if (assetDenominationInfo.AssetPhysicalDenomination && ioType == IOType.Deposit && fields.Quantity) {\r\n let slots = Math.ceil(fields.Quantity / assetDenominationInfo.AssetSheetSize);\r\n //console.log(slots, fields.Quantity);\r\n setAssetDenominationInfo({\r\n ...assetDenominationInfo,\r\n SlotsQuantity: slots,\r\n });\r\n\r\n if (slots > denominationsDeposit.length) {\r\n for (let i = 0; i < slots; i++) {\r\n denominationsDeposit[i] = denominationsDeposit[i]\r\n ? denominationsDeposit[i]\r\n : { key: i, DenominationId: \"\" };\r\n }\r\n } else {\r\n //remove the last elements of the array\r\n denominationsDeposit.splice(slots, denominationsDeposit.length - slots);\r\n }\r\n onChange({\r\n Denominations: denominationsDeposit,\r\n });\r\n }\r\n }, [fields.Quantity, fields.AssetId, primerFetch]);\r\n\r\n const onChangeDenomination = (checked, value, index) => {\r\n let denominationResult = denominationsReturn;\r\n if (checked) {\r\n denominationsReturn.push({ key: index, DenominationId: value });\r\n } else {\r\n const updatedDenomination = denominationsReturn.filter((item) => item.key !== index);\r\n setDenominationsReturn(updatedDenomination);\r\n denominationResult = updatedDenomination;\r\n }\r\n onChange({\r\n Denominations: denominationResult,\r\n });\r\n };\r\n\r\n const onChangeDenominationDeposit = (value, index) => {\r\n denominationsDeposit[index].DenominationId = value;\r\n onChange({\r\n Denominations: denominationsDeposit,\r\n });\r\n };\r\n return (\r\n
    \r\n
    \r\n {/* ##### Quantity ###### */}\r\n \r\n onChange({ Quantity: v })}\r\n invalid={!!errors.Quantity}\r\n dataTypeDecimalName=\"quantity\"\r\n />\r\n \r\n\r\n {/* ##### Symbol ###### */}\r\n onChange(values)}\r\n error={fields.IsCurrency ? errors.CurrencyISO : errors.AssetTicker}\r\n disabled={false}\r\n value={fields.IsCurrency ? fields.CurrencyISO : fields.AssetTicker}\r\n fetchSearchSymbol={services.fetchSearchSymbol}\r\n />\r\n\r\n \r\n {assetDenominationInfo.AssetPhysicalDenomination && ioType == IOType.Withdraw && (\r\n
    \r\n \r\n Denominations\r\n {\" \"}\r\n {!fields.denominationsTrue && }\r\n
    \r\n
    \r\n {segundoFetch && (\r\n \r\n {denominations.map((denomination, key) => (\r\n \r\n
    \r\n item.DenominationId == denomination.DenominationId\r\n )\r\n }\r\n type=\"checkbox\"\r\n style={{\r\n cursor: \"pointer\",\r\n position: \"relative\", \r\n marginLeft: \"0rem\", \r\n margin: 0,\r\n }}\r\n onChange={(e) =>\r\n onChangeDenomination(e.target.checked, denomination.DenominationId, key)\r\n }\r\n />\r\n \r\n
    \r\n \r\n ))}\r\n
    \r\n )}\r\n
    \r\n
    \r\n )}\r\n
    \r\n \r\n {assetDenominationInfo.AssetPhysicalDenomination && ioType == IOType.Deposit && (\r\n
    \r\n \r\n Denominations\r\n {\" \"}\r\n
    \r\n
    \r\n \r\n {segundoFetch &&\r\n denominationsDeposit.map((denomination, index) => (\r\n \r\n onChangeDenominationDeposit(value, index)}\r\n />\r\n \r\n ))}\r\n \r\n
    \r\n
    \r\n )}\r\n
    \r\n\r\n {/* ##### Bank Account ##### */}\r\n {ioType == IOType.Withdraw && ioMode == IOMode.MultipleAccounts && (\r\n \r\n {local && (\r\n \r\n ({\r\n id: a.BankAccountItemId,\r\n description: `${a.BankAccountName} - ${a.BankAccountNumber}`,\r\n }))}\r\n disabled={false}\r\n invalid={!!errors.BankAccountName}\r\n onChange={(id) => onChange(entities.accountBanks.find((a) => a.BankAccountItemId == id))}\r\n emptyLabel={\"Bank Account\"}\r\n />\r\n \r\n )}\r\n\r\n {!local && (\r\n \r\n \r\n onChange({ BankAccountName: e.target.value })}\r\n disabled={false}\r\n />\r\n \r\n \r\n onChange({ BankAccountNumber: e.target.value })}\r\n disabled={false}\r\n />\r\n \r\n\r\n {/* ##### ABA/SWIFT ###### */}\r\n \r\n onChange({ ABASWIFT: e.target.value })}\r\n disabled={false}\r\n />\r\n \r\n\r\n {/* ##### Intermediary Bank ###### */}\r\n \r\n onChange({ IntermediaryBank: e.target.value })}\r\n disabled={false}\r\n />\r\n \r\n\r\n {/* ##### Intermediary ABA/SWIFT ###### */}\r\n \r\n onChange({ IntermediaryABASwift: e.target.value })}\r\n disabled={false}\r\n />\r\n \r\n\r\n {/* ##### Country ###### */}\r\n \r\n onChange({ CountryName: e.target.value })}\r\n invalid={!!errors.CountryName}\r\n disabled={false}\r\n />\r\n \r\n \r\n )}\r\n \r\n )}\r\n \r\n {\" \"}\r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default Edit;\r\n","import React, { useEffect } from \"react\";\r\nimport { IOMode, IOType } from \"../../../IO/types\";\r\nimport Deposit, { DepositValidations } from \"./Deposit/Deposit\";\r\nimport Withdrawal, { WithdrawalValidations } from \"./Withdrawal/Withdrawal\";\r\nimport { Redemption, RedemptionValidations } from \"./Redemption/Redemption\";\r\nimport { Subscription, SubscriptionValidations } from \"./Subscription/Subscription\";\r\nimport Transfer, { TransferValidations } from \"./Transfer/Transfer\";\r\nimport DepositBulk from \"./Deposit/DepositBulk\";\r\nimport WithdrawalBulk from \"./Withdrawal/WithdrawalBulk\";\r\nimport style from \"../IO.module.scss\";\r\n\r\nexport const isEmpty = (value) => value == undefined || value == \"\" || value == 0;\r\n\r\nconst Default = ({ ioType, ioMode, account, opsViewAccountName }) => {\r\n\r\n if (ioType == IOType.Deposit) {\r\n return (\r\n
    {ioMode == IOMode.MultipleAssets ? : }
    \r\n );\r\n }\r\n\r\n if (ioType == IOType.Withdraw) {\r\n return (\r\n
    \r\n {ioMode == IOMode.MultipleAssets ? : }\r\n
    \r\n );\r\n }\r\n\r\n if (ioType == IOType.Subscription) {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n\r\n if (ioType == IOType.Redemption) {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n\r\n if (ioType == IOType.Transfer) {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n};\r\n\r\nexport const updateAccountBanks = (accountId, currencyId, dispatch, fetchGetAccountBanks) => {\r\n fetchGetAccountBanks({ accountId, currencyId })\r\n .then((r) => r.response)\r\n .then((r) => {\r\n dispatch({ type: \"UPDATE_ACCOUNT_BANKS\", accountBanks: r.accountBanks });\r\n });\r\n};\r\n\r\nexport function validations(io, userType) {\r\n let validations = {};\r\n\r\n if (io.IOType == IOType.Deposit) {\r\n validations = DepositValidations(io, userType);\r\n } else if (io.IOType == IOType.Withdraw) {\r\n validations = WithdrawalValidations(io);\r\n } else if (io.IOType == IOType.Redemption) {\r\n validations = RedemptionValidations(io);\r\n } else if (io.IOType == IOType.Subscription) {\r\n validations = SubscriptionValidations(io);\r\n } else if (io.IOType == IOType.Transfer) {\r\n validations = TransferValidations(io);\r\n }\r\n\r\n return {\r\n ...validations.form,\r\n simple: {\r\n ...validations.simple,\r\n },\r\n subForm: {\r\n ...validations.subForm,\r\n },\r\n };\r\n}\r\n\r\nexport default Default;\r\n","import React, { useState, useContext, useEffect } from \"react\";\r\nimport { Input, Row, Col, Container, CustomInput, Label } from \"reactstrap\";\r\nimport Symbol from \"../../Fields/Symbol\";\r\nimport { onChangeHeader, onChange, onChangeItem } from \"../../IO\";\r\nimport Files from \"../../Fields/Files/Files\";\r\nimport { LocalINTL, SimpleSuggest } from \"../../Fields\";\r\nimport { CurrencyAsset, IOMode, IOType, IOTransferType } from \"../../../../IO/types\";\r\nimport { Combobox, Numeric, Field } from \"../../../Order/Field/Field\";\r\nimport { Dispatch } from \"../../store/store\";\r\nimport Account from \"../../Fields/Account\";\r\nimport { commissionSuffix } from \"../../../Order/Form/commons\";\r\nimport { isEmpty } from \"../Default\";\r\nimport NoFormatNumberInput from \"../../../../NoFormatNumberInput/NoFormatNumberInput\";\r\nimport { FormField } from \"../../../../../utils\";\r\n\r\nconst Deposit = ({}) => {\r\n const { dispatch, services, state } = useContext(Dispatch);\r\n const { io, fields, entities, permissions } = state;\r\n const { errors, readonly } = fields;\r\n const { allowValues, allowCash } = permissions;\r\n const header = io.itemsHeader;\r\n const simpleItem = io.items[0];\r\n const [balance, setBalance] = useState({\r\n loading: false,\r\n data: [],\r\n });\r\n const [denominations, setDenominations] = useState([]);\r\n const onChangeDenomination = (value, index) => {\r\n denominations[index].DenominationId = value;\r\n onChangeItem(dispatch, simpleItem.Id, {\r\n Denominations: denominations,\r\n });\r\n };\r\n const [primerFetch, setPrimerFetch] = useState();\r\n\r\n // XOR operator\r\n const readOnlyTypeSelector = allowValues ? !allowCash : allowCash;\r\n const accountEmpty = isEmpty(header.AccountId);\r\n const currencyEmpty = isEmpty(simpleItem.CurrencyId);\r\n const [decimalAmount, setDecimalAmount] = useState();\r\n const [assetDenominationInfo, setAssetDenominationInfo] = useState({ AssetPhysicalDenomination: false });\r\n useEffect(() => {\r\n if (header.IsCurrency && !header.BankAccountIsThirdParty) {\r\n if (!isEmpty(header.AccountId) && !isEmpty(simpleItem.CurrencyId)) {\r\n if (state.io.Status === \"Filled\") {\r\n dispatch({\r\n type: \"UPDATE_ACCOUNT_BANKS\",\r\n accountBanks: [\r\n {\r\n BankAccountHolders: header.BankAccountHolders,\r\n BankAccountId: header.BankAccountId,\r\n BankAccountItemId: header.BankAccountItemId,\r\n BankAccountName: header.BankAccountName,\r\n BankAccountNumber: header.BankAccountNumber,\r\n },\r\n ],\r\n });\r\n } else {\r\n services\r\n .fetchGetAccountBanks({\r\n accountId: header.AccountId,\r\n currencyId: simpleItem.CurrencyId,\r\n fundIncomesOnly: true,\r\n })\r\n .then((r) => r.response)\r\n .then((r) => {\r\n dispatch({\r\n type: \"UPDATE_ACCOUNT_BANKS\",\r\n accountBanks: r.accountBanks,\r\n });\r\n let item;\r\n if (header.BankAccountItemId === null && r.accountBanks) {\r\n item = r.accountBanks[0];\r\n onChangeHeader(dispatch, {\r\n ...item,\r\n });\r\n } else {\r\n item = r.accountBanks.find((a) => a.BankAccountItemId === header.BankAccountItemId);\r\n onChangeHeader(dispatch, {\r\n ...item,\r\n });\r\n }\r\n\r\n if (item) {\r\n onChangeHeader(dispatch, {\r\n ThirdPartyPersonName: item.BankAccountHolders,\r\n });\r\n }\r\n });\r\n }\r\n } else {\r\n dispatch({ type: \"UPDATE_ACCOUNT_BANKS\", accountBanks: [] });\r\n onChangeHeader(dispatch, {\r\n BankAccountItemId: null,\r\n BankAccountName: null,\r\n });\r\n }\r\n }\r\n }, [header.AccountId, simpleItem.CurrencyId]);\r\n\r\n useEffect(() => {\r\n //console.log(io);\r\n if (header.AccountId) {\r\n setBalance({ ...balance, loading: true });\r\n services.fetchAccountBuyingPower({ accountId: header.AccountId }).then((response) => {\r\n const { buyingpower } = response.response;\r\n setBalance({ ...balance, data: buyingpower });\r\n });\r\n } else {\r\n setBalance({ ...balance, data: [] });\r\n }\r\n setBalance({ ...balance, loading: false });\r\n }, [header.AccountId, header.IsCurrency]);\r\n\r\n useEffect(() => {\r\n if (header.IsCurrency == true) {\r\n setAssetDenominationInfo({\r\n AssetPhysicalDenomination: false,\r\n AssetSheetSize: 0,\r\n SlotsQuantity: 0,\r\n });\r\n onChangeItem(dispatch, simpleItem.Id, {\r\n Denominations: undefined,\r\n });\r\n }\r\n }, [header.IsCurrency]);\r\n\r\n useEffect(() => {\r\n if (header.AccountId && !header.IsCurrency && simpleItem.AssetId) {\r\n setBalance({ ...balance, loading: true });\r\n services\r\n .fetchAccountSellingPower({ accountId: header.AccountId, assetId: simpleItem.AssetId })\r\n .then((response) => {\r\n const { sellingpower } = response.response;\r\n setBalance({ ...balance, data: sellingpower });\r\n });\r\n } else {\r\n setBalance({ ...balance, data: [] });\r\n }\r\n setBalance({ ...balance, loading: false });\r\n services.fetchGetAssetInformation({ assetId: simpleItem.AssetId }).then((response) => {\r\n if (response.info.AssetPhysicalDenomination) {\r\n setAssetDenominationInfo({\r\n AssetPhysicalDenomination: response.info.AssetPhysicalDenomination,\r\n AssetSheetSize: response.info.AssetSheetSize,\r\n SlotsQuantity: 0,\r\n });\r\n setPrimerFetch(true);\r\n } else {\r\n setAssetDenominationInfo({\r\n AssetPhysicalDenomination: false,\r\n AssetSheetSize: 0,\r\n SlotsQuantity: 0,\r\n });\r\n onChangeItem(dispatch, simpleItem.Id, {\r\n Denominations: undefined,\r\n });\r\n }\r\n //console.log(\"response:\", response.info);\r\n setDecimalAmount(response.info.SubAssetClassDecimalPlaces);\r\n });\r\n }, [simpleItem.AssetId]);\r\n\r\n //check slots quantity if the quantity changes\r\n useEffect(() => {\r\n simpleItem.Denominations !== undefined && setDenominations(simpleItem.Denominations);\r\n if (assetDenominationInfo.AssetPhysicalDenomination && simpleItem.Quantity) {\r\n //console.log(\"io\", io);\r\n //console.log(simpleItem.Quantity);\r\n let slots = Math.ceil(simpleItem.Quantity / assetDenominationInfo.AssetSheetSize);\r\n setAssetDenominationInfo({\r\n ...assetDenominationInfo,\r\n SlotsQuantity: slots,\r\n });\r\n\r\n if (slots > denominations.length) {\r\n for (let i = 0; i < slots; i++) {\r\n denominations[i] = denominations[i] ? denominations[i] : { key: i, DenominationId: \"\" };\r\n }\r\n } else {\r\n //remove the last elements of the array\r\n denominations.splice(slots, denominations.length - slots);\r\n }\r\n onChangeItem(dispatch, simpleItem.Id, {\r\n Denominations: denominations,\r\n });\r\n }\r\n }, [simpleItem.Quantity, simpleItem.AssetId, primerFetch]);\r\n\r\n useEffect(() => {\r\n //console.log(simpleItem.AssetId, header.AccountId);\r\n if (io.Id !== undefined) {\r\n //console.log(io.Id);\r\n services\r\n .GetDenominations({\r\n AssetId: simpleItem.AssetId,\r\n AccountId: header.AccountId,\r\n WithdrawId: -1,\r\n DepositId: io.Id,\r\n itemId: 0,\r\n TransferId: -1,\r\n })\r\n .then((response) => {\r\n //console.log(\"sin id\");\r\n const responseDenominations = response.denominations;\r\n setDenominations(responseDenominations);\r\n onChange(dispatch, {\r\n DenominationsTotal: responseDenominations,\r\n });\r\n });\r\n //console.log(io);\r\n //console.log(denominations);\r\n }\r\n }, []);\r\n\r\n const checkPrice = (SimpleItemId, values) => {\r\n onChangeItem(dispatch, SimpleItemId, values);\r\n onChangeHeader(dispatch, { Price: values.Price });\r\n\r\n checkSettlementDate(io.Date, values.AssetId);\r\n };\r\n\r\n const checkSettlementDate = (tradedate, AssetId) => {\r\n let settlementvalue = 1;\r\n //let AssetId = 0;\r\n let inchange = false;\r\n\r\n onChange(dispatch, { Date: tradedate });\r\n // Disparar el onChangeItem\r\n /*\r\n if (SimpleItemId && values) {\r\n onChangeItem(dispatch, SimpleItemId, values);\r\n inchange = true;\r\n }\r\n */\r\n if (header.IsCurrency === false) {\r\n if (inchange) {\r\n // AssetId = values.AssetId;\r\n services.GetAssetSettlement({ AssetId }).then((r) => {\r\n executeSettlement(AssetId, r.DefaultSettlement, tradedate);\r\n });\r\n } else {\r\n //AssetId = simpleItem.AssetId;\r\n services.GetAssetSettlement({ AssetId }).then((r) => {\r\n executeSettlement(AssetId, r.DefaultSettlement, tradedate);\r\n });\r\n }\r\n } else {\r\n settlementvalue = 1;\r\n AssetId = 0;\r\n executeSettlement(AssetId, settlementvalue, tradedate);\r\n }\r\n };\r\n\r\n const executeSettlement = (Asset, settlementvalue, tradedate) => {\r\n const getdata = {\r\n tradedate: tradedate,\r\n assetId: Asset,\r\n ist0: false,\r\n settlement: settlementvalue,\r\n };\r\n services\r\n .GetIOSettlementDate(getdata)\r\n .then((r) => onChange(dispatch, { SettlementDate: r.settlementday }));\r\n };\r\n\r\n return (\r\n \r\n \r\n {/* Left */}\r\n \r\n \r\n \r\n onChange(dispatch, v)}\r\n />\r\n \r\n \r\n \r\n onChangeHeader(dispatch, {\r\n IsCurrency: v == CurrencyAsset.Cash,\r\n })\r\n }\r\n value={header.IsCurrency ? CurrencyAsset.Cash : CurrencyAsset.Asset}\r\n items={Object.values(CurrencyAsset).map((key, index) => ({\r\n id: key,\r\n description: key,\r\n }))}\r\n />\r\n \r\n \r\n\r\n {/* ##### Symbol ###### */}\r\n checkPrice(simpleItem.Id, values)} // onChangeItem(dispatch, simpleItem.Id, values)\r\n error={header.IsCurrency ? errors.simple_CurrencyISO : errors.simple_AssetTicker}\r\n disabled={header.IsCurrency ? readonly.simple_CurrencyISO : readonly.simple_AssetTicker}\r\n value={header.IsCurrency ? simpleItem.CurrencyISO : simpleItem.AssetTicker}\r\n fetchSearchSymbol={services.fetchSearchSymbol}\r\n />\r\n\r\n {/* ##### Quantity ###### */}\r\n \r\n onChangeItem(dispatch, simpleItem.Id, { Quantity: v })}\r\n invalid={!!errors.simple_Quantity}\r\n disabled={readonly.simple_Quantity}\r\n dataTypeDecimalName=\"quantity\"\r\n />\r\n \r\n\r\n {/* ##### Price ###### */}\r\n {!header.IsCurrency && (\r\n \r\n onChangeHeader(dispatch, { Price: v })}\r\n invalid={!!errors.header_Price}\r\n disabled={readonly.header_Price}\r\n />\r\n \r\n )}\r\n\r\n {/* ##### Date ##### */}\r\n \r\n {\r\n checkSettlementDate(e.target.value, simpleItem.Id);\r\n }}\r\n />\r\n \r\n\r\n {/* ##### Settlement Date ##### */}\r\n \r\n onChange(dispatch, { SettlementDate: e.target.value })}\r\n />\r\n \r\n \r\n\r\n {/* Right */}\r\n \r\n {/* ##### Account ###### */}\r\n onChangeHeader(dispatch, values)}\r\n balance={balance}\r\n readonly={{\r\n AccountNumber:readonly.header_AccountNumber,\r\n AccountName: readonly.header_AccountName,\r\n HolderName: readonly.header_HolderName,\r\n }}\r\n errors={{\r\n AccountNumber: errors.header_AccountNumber,\r\n AccountName: errors.header_AccountName,\r\n HolderName: errors.header_HolderName,\r\n }}\r\n services={{\r\n fetchAccountHolders: services.fetchAccountHolders,\r\n fetchSearchAccount: services.fetchSearchAccount,\r\n }}\r\n />\r\n\r\n \r\n\r\n {/* ##### Custodian ###### */}\r\n onChange(dispatch, { CustodianId: id, CustodianName: name })}\r\n />\r\n\r\n {header.IsCurrency && io.Local && (\r\n \r\n \r\n onChangeHeader(dispatch, { TransferType: v })}\r\n emptyLabel={\"Type\"}\r\n />\r\n \r\n\r\n {/* ##### Bank Account ##### */}\r\n {header.TransferType === IOTransferType.Transfer && (\r\n \r\n
    \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountIsThirdParty: !header.BankAccountIsThirdParty,\r\n })\r\n }\r\n />\r\n
    \r\n {header.BankAccountIsThirdParty ? (\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountId: id,\r\n BankAccountName: name,\r\n })\r\n }\r\n />\r\n\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.simple_Quantity}\r\n />\r\n \r\n\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ThirdPartyPersonName: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ThirdPartyIdentificationNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n {\r\n onChangeHeader(dispatch, {\r\n ThirdPartyCountryId: id,\r\n ThirdPartyCountryName: name,\r\n });\r\n }}\r\n />\r\n \r\n ) : (\r\n
    \r\n \r\n ({\r\n id: a.BankAccountItemId,\r\n description: `${a.BankAccountName} - ${a.BankAccountNumber}`,\r\n }))}\r\n disabled={accountEmpty || currencyEmpty || readonly.simple_Quantity}\r\n invalid={!!errors.header_BankAccountName}\r\n onChange={(id) => {\r\n onChangeHeader(dispatch, {\r\n ThirdPartyPersonName: entities.accountBanks.find(\r\n (a) => a.BankAccountItemId == id\r\n ).BankAccountHolders,\r\n ...entities.accountBanks.find((a) => a.BankAccountItemId == id),\r\n });\r\n }}\r\n emptyLabel={\"Bank Account\"}\r\n />\r\n \r\n {header.BankAccountItemId && (\r\n \r\n
    \r\n {header.ThirdPartyPersonName}\r\n \r\n )}\r\n
    \r\n )}\r\n \r\n )}\r\n\r\n {/* ##### Cheque ##### */}\r\n {header.TransferType === IOTransferType.Cheque && (\r\n \r\n {/* ##### Third party bank ###### */}\r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountId: id,\r\n BankAccountName: name,\r\n })\r\n }\r\n />\r\n\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ChequeNumber: parseInt(e.target.value),\r\n })\r\n }\r\n disabled={readonly.simple_Quantity}\r\n hasDecimals={false}\r\n />\r\n \r\n \r\n )}\r\n \r\n )}\r\n\r\n \r\n {/* ##### Commission ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, { Commission: v })}\r\n invalid={!!errors.header_Commission}\r\n {...commissionSuffix(null)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n\r\n {/* ##### CommissionType ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, { CommissionType: v })}\r\n emptyLabel={\"Type\"}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n {!header.isCurrency && assetDenominationInfo.AssetPhysicalDenomination && (\r\n
    \r\n \r\n Denominations\r\n {\" \"}\r\n
    \r\n
    \r\n \r\n {denominations.map((denomination, index) => (\r\n \r\n onChangeDenomination(value, index)}\r\n />\r\n \r\n ))}\r\n \r\n
    \r\n
    \r\n )}\r\n\r\n {!io.Local && (\r\n \r\n \r\n \r\n \r\n
    \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountIsThirdParty: !header.BankAccountIsThirdParty,\r\n })\r\n }\r\n />\r\n
    \r\n \r\n
    \r\n \r\n \r\n {/* ##### Account ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n {/* ##### Bank ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountName: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n {/* ##### Intermediary Bank ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n IntermediaryBank: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n invalid={!!errors.header_IntermediaryBank}\r\n />\r\n \r\n \r\n\r\n \r\n {/* ##### Country ###### */}\r\n {\r\n onChangeHeader(dispatch, {\r\n CountryId: id,\r\n CountryName: name,\r\n });\r\n }}\r\n />\r\n\r\n {/* ##### ABA/SWIFT ###### */}\r\n \r\n onChangeHeader(dispatch, { ABASWIFT: e.target.value })}\r\n invalid={!!errors.header_ABASWIFT}\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n {/* ##### Intermediary ABA/SWIFT ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n IntermediaryABASwift: e.target.value,\r\n })\r\n }\r\n invalid={!!errors.header_IntermediaryABASwift}\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n \r\n \r\n {header.BankAccountIsThirdParty && (\r\n \r\n \r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ThirdPartyPersonName: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ThirdPartyIdentificationNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n
    \r\n \r\n \r\n )}\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport const DepositValidations = (io, userType) => {\r\n const header = io.itemsHeader;\r\n const isBulk = io.IOMode == IOMode.MultipleAssets;\r\n const isThirdPartyAccount =\r\n header.TransferType == IOTransferType.Transfer && header.BankAccountIsThirdParty;\r\n\r\n if (isBulk) {\r\n return {\r\n form: {\r\n CustodianName: { empty: !userType || userType != \"Advisor\" },\r\n },\r\n simple: {},\r\n subForm: {\r\n AccountName: { empty: false },\r\n AccountNumber: { empty: true },\r\n HolderName: { empty: true },\r\n BankAccountItemId: {\r\n empty:\r\n io.Local &&\r\n header.IsCurrency &&\r\n header.TransferType == IOTransferType.Transfer &&\r\n !isThirdPartyAccount,\r\n },\r\n BankAccountId: {\r\n empty:\r\n io.Local &&\r\n header.IsCurrency &&\r\n ((header.TransferType == IOTransferType.Transfer && isThirdPartyAccount) ||\r\n header.TransferType == IOTransferType.Cheque),\r\n },\r\n BankAccountName: {\r\n empty: io.Local && header.IsCurrency && header.TransferType != IOTransferType.Cash,\r\n },\r\n BankAccountNumber: {\r\n empty: io.Local && header.IsCurrency && header.TransferType == IOTransferType.Transfer,\r\n },\r\n ChequeNumber: {\r\n empty: io.Local && header.IsCurrency && header.TransferType == IOTransferType.Cheque,\r\n },\r\n IntermediaryBank: { empty: !io.Local },\r\n CountryName: { empty: !io.Local },\r\n ABASWIFT: { empty: !io.Local },\r\n IntermediaryABASwift: { empty: !io.Local },\r\n },\r\n };\r\n }\r\n\r\n return {\r\n form: {\r\n CustodianName: { empty: !userType || userType != \"Advisor\" },\r\n },\r\n simple: {\r\n Quantity: { empty: true },\r\n AssetTicker: {\r\n empty: header.IsCurrency == false,\r\n autosuggestId: \"AssetId\",\r\n },\r\n CurrencyISO: {\r\n empty: header.IsCurrency == true,\r\n autosuggestId: \"CurrencyId\",\r\n },\r\n //Denominations: { empty: true },\r\n },\r\n subForm: {\r\n AccountName: { empty: false },\r\n AccountNumber: { empty: true },\r\n HolderName: { empty: true },\r\n Price: { empty: header.IsCurrency == false },\r\n BankAccountItemId: {\r\n empty:\r\n io.Local &&\r\n header.IsCurrency &&\r\n header.TransferType == IOTransferType.Transfer &&\r\n !isThirdPartyAccount,\r\n },\r\n BankAccountId: {\r\n empty:\r\n io.Local &&\r\n header.IsCurrency &&\r\n ((header.TransferType == IOTransferType.Transfer && isThirdPartyAccount) ||\r\n header.TransferType == IOTransferType.Cheque),\r\n },\r\n BankAccountName: {\r\n empty:\r\n (!io.Local && header.IsCurrency && header.TransferType != IOTransferType.Cash) ||\r\n (io.Local && header.IsCurrency && header.TransferType == IOTransferType.Transfer),\r\n },\r\n BankAccountNumber: {\r\n empty:\r\n // !io.Local &&\r\n header.IsCurrency && header.TransferType == IOTransferType.Transfer,\r\n },\r\n ChequeNumber: {\r\n empty: io.Local && header.IsCurrency && header.TransferType == IOTransferType.Cheque,\r\n },\r\n // IntermediaryBank: {empty: !io.Local},\r\n CountryName: { empty: !io.Local },\r\n ABASWIFT: { empty: !io.Local },\r\n // IntermediaryABASwift: {empty: !io.Local},\r\n // ThirdPartyPersonName: {\r\n // empty:\r\n // (io.Local &&\r\n // header.IsCurrency &&\r\n // header.TransferType == IOTransferType.Transfer &&\r\n // isThirdPartyAccount) ||\r\n // (!io.Local && header.IsCurrency)\r\n // },\r\n // ThirdPartyIdentificationNumber: {\r\n // empty:\r\n // (io.Local &&\r\n // header.IsCurrency &&\r\n // header.TransferType == IOTransferType.Transfer &&\r\n // isThirdPartyAccount) ||\r\n // (!io.Local && header.IsCurrency)\r\n // },\r\n ThirdPartyCountryName: {\r\n empty:\r\n io.Local &&\r\n header.IsCurrency &&\r\n header.TransferType == IOTransferType.Transfer &&\r\n isThirdPartyAccount,\r\n },\r\n },\r\n };\r\n};\r\n\r\nexport default Deposit;\r\n","import React, { useEffect, useContext } from \"react\";\r\nimport { Input, Row, Col, Container, CustomInput } from \"reactstrap\";\r\nimport { onChangeHeader, onChange } from \"../../IO\";\r\nimport Files from \"../../Fields/Files/Files\";\r\nimport { LocalINTL, SimpleSuggest } from \"../../Fields\";\r\nimport { CurrencyAsset, IOTransferType } from \"../../../../IO/types\";\r\nimport { Combobox, Numeric, Field } from \"../../../Order/Field/Field\";\r\nimport { Dispatch } from \"../../store/store\";\r\nimport Account from \"../../Fields/Account\";\r\nimport { commissionSuffix } from \"../../../Order/Form/commons\";\r\nimport Bulk from \"../Bulk/Bulk\";\r\nimport { updateAccountBanks, isEmpty } from \"../Default\";\r\n\r\nconst DepositBulk = ({opsViewAccountName}) => {\r\n const { dispatch, services, state } = useContext(Dispatch);\r\n const { ui, io, fields, entities, permissions } = state;\r\n const { errors, readonly, hiddens } = fields;\r\n const { allowValues, allowCash } = permissions;\r\n const header = io.itemsHeader;\r\n\r\n useEffect(() => {\r\n //console.log(io);\r\n if (header.IsCurrency && !header.BankAccountIsThirdParty) {\r\n if (!isEmpty(header.AccountId) ) {\r\n if (state.io.Status === \"Filled\"){\r\n dispatch({\r\n type: \"UPDATE_ACCOUNT_BANKS\",\r\n accountBanks: [{\r\n BankAccountHolders: header.BankAccountHolders,\r\n BankAccountId: header.BankAccountId,\r\n BankAccountItemId: header.BankAccountItemId,\r\n BankAccountName: header.BankAccountName,\r\n BankAccountNumber: header.BankAccountNumber,\r\n }],\r\n });\r\n }else{\r\n services\r\n .fetchGetAccountBanks({\r\n accountId: header.AccountId,\r\n currencyId: 0,\r\n })\r\n .then((r) => r.response)\r\n .then((r) => {\r\n dispatch({\r\n type: \"UPDATE_ACCOUNT_BANKS\",\r\n accountBanks: r.accountBanks,\r\n });\r\n if (header.BankAccountItemId === null && r.accountBanks) {\r\n const item = r.accountBanks[0];\r\n onChangeHeader(dispatch, {\r\n ...item,\r\n });\r\n } else {\r\n const item = r.accountBanks.find(\r\n (a) => a.BankAccountItemId === header.BankAccountItemId,\r\n );\r\n onChangeHeader(dispatch, {\r\n ...item,\r\n });\r\n }\r\n });\r\n }\r\n } else {\r\n dispatch({ type: \"UPDATE_ACCOUNT_BANKS\", accountBanks: [] });\r\n onChangeHeader(dispatch, {\r\n BankAccountItemId: null,\r\n BankAccountName: null,\r\n });\r\n }\r\n }\r\n }, [header.AccountId]);\r\n\r\n // XOR operator\r\n const readOnlyTypeSelector = allowValues ? !allowCash : allowCash;\r\n const accountEmpty = header.AccountId == null || header.AccountId == 0;\r\n const currencyEmpty = header.CurrencyId == null || header.CurrencyId == 0;\r\n\r\n return (\r\n \r\n \r\n {/* Left */}\r\n \r\n \r\n \r\n onChange(dispatch, v)}\r\n />\r\n \r\n \r\n \r\n onChangeHeader(dispatch, {\r\n IsCurrency: v == CurrencyAsset.Cash,\r\n })\r\n }\r\n value={\r\n header.IsCurrency ? CurrencyAsset.Cash : CurrencyAsset.Asset\r\n }\r\n items={Object.values(CurrencyAsset).map((key, index) => ({\r\n id: key,\r\n description: key,\r\n }))}\r\n />\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {/* Date */}\r\n \r\n onChange(dispatch, { Date: e.target.value })}\r\n />\r\n \r\n\r\n {/* Settlement Date */}\r\n \r\n \r\n onChange(dispatch, { SettlementDate: e.target.value })\r\n }\r\n />\r\n \r\n \r\n\r\n {/* Right */}\r\n \r\n {/* ##### Account ###### */}\r\n onChangeHeader(dispatch, values)}\r\n readonly={{\r\n AccountNumber:readonly.header_AccountNumber,\r\n AccountName: readonly.header_AccountName,\r\n HolderName: readonly.header_HolderName,\r\n }}\r\n errors={{\r\n AccountNumber: errors.header_AccountNumber,\r\n AccountName: errors.header_AccountName,\r\n HolderName: errors.header_HolderName,\r\n }}\r\n services={{\r\n fetchAccountHolders: services.fetchAccountHolders,\r\n fetchSearchAccount: services.fetchSearchAccount,\r\n }}\r\n opsViewAccountName={opsViewAccountName}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {header.IsCurrency && io.Local && (\r\n \r\n \r\n \r\n onChangeHeader(dispatch, { TransferType: v })\r\n }\r\n emptyLabel={\"Type\"}\r\n />\r\n \r\n\r\n {/* ##### Bank Account ##### */}\r\n {header.TransferType === IOTransferType.Transfer && (\r\n \r\n
    \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountIsThirdParty: !header.BankAccountIsThirdParty,\r\n })\r\n }\r\n />\r\n
    \r\n {header.BankAccountIsThirdParty ? (\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountId: id,\r\n BankAccountName: name,\r\n })\r\n }\r\n />\r\n\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n \r\n ) : (\r\n \r\n ({\r\n id: a.BankAccountItemId,\r\n description: `${a.BankAccountName} - ${a.BankAccountNumber}`,\r\n }))}\r\n disabled={\r\n accountEmpty ||\r\n currencyEmpty ||\r\n readonly.header_Quantity\r\n }\r\n invalid={!!errors.header_BankAccountName}\r\n onChange={(id) =>\r\n onChangeHeader(\r\n dispatch,\r\n entities.accountBanks.find(\r\n (a) => a.BankAccountItemId == id\r\n )\r\n )\r\n }\r\n emptyLabel={\"Bank Account\"}\r\n />\r\n \r\n )}\r\n
    \r\n )}\r\n\r\n {/* ##### Cheque ##### */}\r\n {header.TransferType === IOTransferType.Cheque && (\r\n \r\n {/* ##### Third party bank ###### */}\r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountId: id,\r\n BankAccountName: name,\r\n })\r\n }\r\n />\r\n\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ChequeNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n \r\n )}\r\n
    \r\n )}\r\n\r\n \r\n {/* ##### Commission ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, { Commission: v })}\r\n invalid={!!errors.header_Commission}\r\n {...commissionSuffix(null)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n\r\n {/* ##### CommissionType ###### */}\r\n \r\n \r\n \r\n onChangeHeader(dispatch, { CommissionType: v })\r\n }\r\n emptyLabel={\"Type\"}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {/* ##### Custodian ###### */}\r\n {\r\n onChange(dispatch, { CustodianId: id, CustodianName: name });\r\n }}\r\n />\r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default DepositBulk;\r\n","import React, { useContext, useEffect, useState } from \"react\";\r\nimport { Container, Row, Col, Input, CustomInput } from \"reactstrap\";\r\nimport { Dispatch } from \"../../store/store\";\r\nimport Symbol from \"../../Fields/Symbol\";\r\nimport { onChangeHeader, onChange, onChangeItem } from \"../../IO\";\r\nimport { LocalINTL, SimpleSuggest } from \"../../Fields\";\r\nimport { Field, Numeric, Combobox } from \"../../../Order/Field/Field\";\r\nimport { CurrencyAsset, IOMode, IOType, IOTransferType } from \"../../../../IO/types\";\r\nimport { commissionSuffix } from \"../../../Order/Form/commons\";\r\nimport Account from \"../../Fields/Account\";\r\nimport Files from \"../../Fields/Files/Files\";\r\nimport { isEmpty } from \"../Default\";\r\n\r\nexport const Redemption = ({ account }) => {\r\n const { dispatch, services, state } = useContext(Dispatch);\r\n const { io, fields, entities, permissions } = state;\r\n const { errors, readonly } = fields;\r\n const { allowValues, allowCash } = permissions;\r\n const header = io.itemsHeader;\r\n const simpleItem = io.items[0];\r\n const [balance, setBalance] = useState({\r\n loading: false,\r\n data: [],\r\n });\r\n\r\n useEffect(() => {\r\n if (account && simpleItem.Id) {\r\n onChange(dispatch, { isSubscriptionOrRedemption: true, IOType: IOType.Withdraw });\r\n onChangeHeader(dispatch, {\r\n AccountNumber: account.AccountNumber,\r\n AccountName: account.AccountName,\r\n AccountId: account.AccountId,\r\n AssetId: null,\r\n AssetTicker: \"\",\r\n CurrencyISO: \"USD - DOLAR AMERICANO\",\r\n CurrencyId: \"1\",\r\n decimal: 2,\r\n IOType: IOType.Withdraw,\r\n });\r\n onChangeItem(dispatch, simpleItem.Id, { AssetId: null, AssetTicker: \"\", CurrencyISO: \"USD - DOLAR AMERICANO\", CurrencyId: \"1\", decimal: 2 });\r\n }\r\n }, [account]);\r\n\r\n // XOR operator\r\n const readOnlyTypeSelector = allowValues ? !allowCash : allowCash;\r\n const accountEmpty = isEmpty(header.AccountId);\r\n const currencyEmpty = isEmpty(simpleItem.CurrencyId);\r\n\r\n useEffect(() => {\r\n if (header.IsCurrency && !header.BankAccountIsThirdParty) {\r\n if (!isEmpty(header.AccountId) && !isEmpty(simpleItem.CurrencyId)) {\r\n services\r\n .fetchGetAccountBanks({\r\n accountId: header.AccountId,\r\n currencyId: simpleItem.CurrencyId,\r\n })\r\n .then((r) => r.response)\r\n .then((r) => {\r\n dispatch({\r\n type: \"UPDATE_ACCOUNT_BANKS\",\r\n accountBanks: r.accountBanks,\r\n });\r\n if (header.BankAccountItemId === null && r.accountBanks) {\r\n const item = r.accountBanks[0];\r\n onChangeHeader(dispatch, {\r\n ...item,\r\n });\r\n } else {\r\n const item = r.accountBanks.find((a) => a.BankAccountItemId === header.BankAccountItemId);\r\n onChangeHeader(dispatch, {\r\n ...item,\r\n });\r\n }\r\n });\r\n } else {\r\n dispatch({ type: \"UPDATE_ACCOUNT_BANKS\", accountBanks: [] });\r\n onChangeHeader(dispatch, {\r\n BankAccountItemId: null,\r\n BankAccountName: null,\r\n });\r\n }\r\n }\r\n }, [header.AccountId, simpleItem.CurrencyId]);\r\n\r\n useEffect(() => {\r\n if (header.AccountId) {\r\n setBalance({ ...balance, loading: true });\r\n services.fetchAccountBuyingPower({ accountId: header.AccountId }).then((response) => {\r\n const { buyingpower } = response.response;\r\n setBalance({ ...balance, data: buyingpower });\r\n });\r\n } else {\r\n setBalance({ ...balance, data: [] });\r\n }\r\n setBalance({ ...balance, loading: false });\r\n }, [header.AccountId, header.IsCurrency]);\r\n\r\n useEffect(() => {\r\n if (header.AccountId && !header.IsCurrency && simpleItem.AssetId) {\r\n setBalance({ ...balance, loading: true });\r\n services.fetchAccountSellingPower({ accountId: header.AccountId, assetId: simpleItem.AssetId }).then((response) => {\r\n const { sellingpower } = response.response;\r\n setBalance({ ...balance, data: sellingpower });\r\n });\r\n } else {\r\n setBalance({ ...balance, data: [] });\r\n }\r\n setBalance({ ...balance, loading: false });\r\n }, [simpleItem.AssetId]);\r\n\r\n return (\r\n \r\n \r\n {/* Left */}\r\n \r\n \r\n \r\n onChange(dispatch, v)} />\r\n \r\n \r\n \r\n onChangeHeader(dispatch, {\r\n IsCurrency: v == CurrencyAsset.Cash,\r\n })\r\n }\r\n value={header.IsCurrency ? CurrencyAsset.Cash : CurrencyAsset.Asset}\r\n items={Object.values(CurrencyAsset).map((key, index) => ({\r\n id: key,\r\n description: key,\r\n }))}\r\n />\r\n \r\n \r\n\r\n {/* ##### Symbol ###### */}\r\n onChangeItem(dispatch, simpleItem.Id, values)}\r\n error={header.IsCurrency ? errors.simple_CurrencyISO : errors.simple_AssetTicker}\r\n disabled\r\n value={header.IsCurrency ? header.CurrencyISO : header.AssetTicker}\r\n fetchSearchSymbol={services.fetchSearchSymbol}\r\n />\r\n\r\n {/* ##### Quantity ###### */}\r\n \r\n onChangeItem(dispatch, simpleItem.Id, { Quantity: v })}\r\n invalid={!!errors.simple_Quantity}\r\n disabled={readonly.simple_Quantity}\r\n dataTypeDecimalName=\"quantity\"\r\n />\r\n \r\n\r\n {/* ##### Date ##### */}\r\n \r\n onChange(dispatch, { Date: e.target.value })}\r\n />\r\n \r\n\r\n {/* ##### Settlement Date ##### */}\r\n \r\n onChange(dispatch, { SettlementDate: e.target.value })}\r\n />\r\n \r\n \r\n\r\n {/* Right */}\r\n \r\n {/* ##### Account ###### */}\r\n onChangeHeader(dispatch, values)}\r\n balance={balance}\r\n readonly={{\r\n AccountName: true,\r\n HolderName: readonly.HolderName,\r\n }}\r\n errors={{\r\n AccountName: errors.header_AccountName,\r\n HolderName: errors.header_HolderName,\r\n }}\r\n services={{\r\n fetchAccountHolders: services.fetchAccountHolders,\r\n fetchSearchAccount: services.fetchSearchAccount,\r\n }}\r\n />\r\n\r\n \r\n\r\n {header.IsCurrency && io.Local && (\r\n \r\n \r\n onChangeHeader(dispatch, { TransferType: v })}\r\n emptyLabel={\"Type\"}\r\n />\r\n \r\n\r\n {/* ##### Bank Account ##### */}\r\n {header.TransferType === IOTransferType.Transfer && (\r\n \r\n
    \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountIsThirdParty: !header.BankAccountIsThirdParty,\r\n })\r\n }\r\n />\r\n
    \r\n {header.BankAccountIsThirdParty ? (\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountId: id,\r\n BankAccountName: name,\r\n })\r\n }\r\n />\r\n\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ThirdPartyPersonName: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ThirdPartyIdentificationNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n {\r\n onChangeHeader(dispatch, {\r\n ThirdPartyCountryId: id,\r\n ThirdPartyCountryName: name,\r\n });\r\n }}\r\n />\r\n \r\n ) : (\r\n
    \r\n \r\n ({\r\n id: a.BankAccountItemId,\r\n description: `${a.BankAccountName} - ${a.BankAccountNumber}`,\r\n }))}\r\n disabled={accountEmpty || currencyEmpty || readonly.header_Quantity}\r\n invalid={!!errors.header_BankAccountName}\r\n onChange={(id) =>\r\n onChangeHeader(\r\n dispatch,\r\n entities.accountBanks.find((a) => a.BankAccountItemId == id)\r\n )\r\n }\r\n emptyLabel={\"Bank Account\"}\r\n />\r\n \r\n {header.BankAccountItemId && (\r\n \r\n
    \r\n {header.BankAccountHolders}\r\n \r\n )}\r\n
    \r\n )}\r\n \r\n )}\r\n\r\n {/* ##### Cheque ##### */}\r\n {header.TransferType === IOTransferType.Cheque && (\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountId: id,\r\n BankAccountName: name,\r\n })\r\n }\r\n />\r\n\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ChequeNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n \r\n )}\r\n \r\n )}\r\n\r\n \r\n {/* ##### Commission ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, { Commission: v })}\r\n invalid={!!errors.header_Commission}\r\n {...commissionSuffix(null)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n\r\n {/* ##### CommissionType ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, { CommissionType: v })}\r\n emptyLabel={\"Type\"}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n\r\n {!io.Local && (\r\n \r\n \r\n \r\n {/* ##### Account ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n {/* ##### Bank ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountName: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n {/* ##### Intermediary Bank ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n IntermediaryBank: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n invalid={!!errors.header_IntermediaryBank}\r\n />\r\n \r\n \r\n\r\n \r\n {/* ##### Country ###### */}\r\n {\r\n onChangeHeader(dispatch, {\r\n CountryId: id,\r\n CountryName: name,\r\n });\r\n }}\r\n />\r\n\r\n {/* ##### ABA/SWIFT ###### */}\r\n \r\n onChangeHeader(dispatch, { ABASWIFT: e.target.value })}\r\n invalid={!!errors.header_ABASWIFT}\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n {/* ##### Intermediary ABA/SWIFT ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n IntermediaryABASwift: e.target.value,\r\n })\r\n }\r\n invalid={!!errors.header_IntermediaryABASwift}\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ThirdPartyPersonName: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ThirdPartyIdentificationNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport const RedemptionValidations = (io) => {\r\n const header = io.itemsHeader;\r\n const isBulk = io.IOMode == IOMode.MultipleAssets;\r\n const isThirdPartyAccount = header.TransferType == IOTransferType.Transfer && header.BankAccountIsThirdParty;\r\n\r\n if (isBulk) {\r\n return {\r\n form: {},\r\n simple: {},\r\n subForm: {\r\n AccountName: { empty: true },\r\n HolderName: { empty: true },\r\n BankAccountItemId: {\r\n empty: io.Local && header.IsCurrency && header.TransferType == IOTransferType.Transfer && !isThirdPartyAccount,\r\n },\r\n BankAccountId: {\r\n empty: io.Local && header.IsCurrency && ((header.TransferType == IOTransferType.Transfer && isThirdPartyAccount) || header.TransferType == IOTransferType.Cheque),\r\n },\r\n BankAccountName: {\r\n empty: !io.Local,\r\n },\r\n ChequeNumber: {\r\n empty: io.Local && header.IsCurrency && header.TransferType == IOTransferType.Cheque,\r\n },\r\n BankAccountNumber: {\r\n empty: (header.IsCurrency && header.TransferType == IOTransferType.Transfer) || !io.Local,\r\n },\r\n\r\n IntermediaryBank: { empty: !io.Local },\r\n CountryName: { empty: !io.Local },\r\n ABASWIFT: { empty: !io.Local },\r\n IntermediaryABASwift: { empty: !io.Local },\r\n },\r\n };\r\n }\r\n\r\n return {\r\n form: {},\r\n simple: {\r\n Quantity: { empty: true },\r\n AssetTicker: {\r\n empty: header.IsCurrency == false,\r\n autosuggestId: \"AssetId\",\r\n },\r\n CurrencyISO: {\r\n empty: header.IsCurrency == true,\r\n autosuggestId: \"CurrencyId\",\r\n },\r\n },\r\n subForm: {\r\n AccountName: { empty: true },\r\n HolderName: { empty: true },\r\n BankAccountItemId: {\r\n empty: io.Local && header.IsCurrency && header.TransferType == IOTransferType.Transfer && !isThirdPartyAccount,\r\n },\r\n BankAccountName: {\r\n empty: header.IsCurrency && header.TransferType == IOTransferType.Transfer,\r\n },\r\n BankAccountId: {\r\n empty: io.Local && header.IsCurrency && ((header.TransferType == IOTransferType.Transfer && isThirdPartyAccount) || header.TransferType == IOTransferType.Cheque),\r\n },\r\n BankAccountNumber: {\r\n empty: !io.Local || (header.IsCurrency && header.TransferType == IOTransferType.Transfer),\r\n },\r\n ChequeNumber: {\r\n empty: io.Local && header.IsCurrency && header.TransferType == IOTransferType.Cheque,\r\n },\r\n // IntermediaryBank: {empty: !io.Local},\r\n CountryName: { empty: !io.Local },\r\n // ABASWIFT: {empty: !io.Local},\r\n // IntermediaryABASwift: {empty: !io.Local},\r\n // ThirdPartyPersonName: {\r\n // empty:\r\n // (io.Local &&\r\n // header.IsCurrency &&\r\n // header.TransferType == IOTransferType.Transfer &&\r\n // isThirdPartyAccount) ||\r\n // (header.IsCurrency && !io.Local)\r\n // },\r\n // ThirdPartyIdentificationNumber: {\r\n // empty:\r\n // (io.Local &&\r\n // header.IsCurrency &&\r\n // header.TransferType == IOTransferType.Transfer &&\r\n // isThirdPartyAccount) ||\r\n // (header.IsCurrency && !io.Local)\r\n // },\r\n ThirdPartyCountryName: {\r\n empty: io.Local && header.IsCurrency && header.TransferType == IOTransferType.Transfer && isThirdPartyAccount,\r\n },\r\n },\r\n };\r\n};\r\n","import React, { useState, useContext, useEffect } from \"react\";\r\nimport { Input, Row, Col, Container, CustomInput, Label } from \"reactstrap\";\r\nimport Symbol from \"../../Fields/Symbol\";\r\nimport { onChangeHeader, onChange, onChangeItem } from \"../../IO\";\r\nimport Files from \"../../Fields/Files/Files\";\r\nimport { LocalINTL, SimpleSuggest } from \"../../Fields\";\r\nimport { CurrencyAsset, IOMode, IOType, IOTransferType } from \"../../../../IO/types\";\r\nimport { Combobox, Numeric, Field } from \"../../../Order/Field/Field\";\r\nimport { Dispatch } from \"../../store/store\";\r\nimport Account from \"../../Fields/Account\";\r\nimport { commissionSuffix } from \"../../../Order/Form/commons\";\r\nimport { isEmpty } from \"../Default\";\r\n\r\nexport const Subscription = ({ account }) => {\r\n const { dispatch, services, state } = useContext(Dispatch);\r\n const { io, fields, entities, permissions } = state;\r\n const { errors, readonly } = fields;\r\n const { allowValues, allowCash } = permissions;\r\n const header = io.itemsHeader;\r\n const simpleItem = io.items[0];\r\n const [balance, setBalance] = useState({\r\n loading: false,\r\n data: [],\r\n });\r\n const [decimalAmount, setDecimalAmount] = useState();\r\n\r\n useEffect(() => {\r\n if (account && simpleItem.Id) {\r\n onChange(dispatch, { isSubscriptionOrRedemption: true, IOType: IOType.Deposit });\r\n onChangeHeader(dispatch, {\r\n AccountNumber: account.AccountNumber,\r\n AccountName: account.AccountName,\r\n AccountId: account.AccountId,\r\n AssetId: null,\r\n AssetTicker: \"\",\r\n CurrencyISO: \"USD - DOLAR AMERICANO\",\r\n CurrencyId: \"1\",\r\n decimal: 2,\r\n IOType: IOType.Deposit,\r\n });\r\n onChangeItem(dispatch, simpleItem.Id, { AssetId: null, AssetTicker: \"\", CurrencyISO: \"USD - DOLAR AMERICANO\", CurrencyId: \"1\", decimal: 2 });\r\n }\r\n }, [account]);\r\n\r\n // XOR operator\r\n const readOnlyTypeSelector = allowValues ? !allowCash : allowCash;\r\n const accountEmpty = isEmpty(header.AccountId);\r\n const currencyEmpty = isEmpty(simpleItem.CurrencyId);\r\n\r\n useEffect(() => {\r\n if (header.IsCurrency && !header.BankAccountIsThirdParty) {\r\n if (!isEmpty(header.AccountId) && !isEmpty(simpleItem.CurrencyId)) {\r\n services\r\n .fetchGetAccountBanks({\r\n accountId: account.AccountId,\r\n currencyId: simpleItem.CurrencyId,\r\n fundIncomesOnly: true,\r\n })\r\n .then((r) => r.response)\r\n .then((r) => {\r\n dispatch({\r\n type: \"UPDATE_ACCOUNT_BANKS\",\r\n accountBanks: r.accountBanks,\r\n });\r\n if (header.BankAccountItemId === null && r.accountBanks) {\r\n const item = r.accountBanks[0];\r\n onChangeHeader(dispatch, {\r\n ...item,\r\n });\r\n } else {\r\n const item = r.accountBanks.find((a) => a.BankAccountItemId === header.BankAccountItemId);\r\n onChangeHeader(dispatch, {\r\n ...item,\r\n });\r\n }\r\n });\r\n } else {\r\n dispatch({ type: \"UPDATE_ACCOUNT_BANKS\", accountBanks: [] });\r\n onChangeHeader(dispatch, {\r\n BankAccountItemId: null,\r\n BankAccountName: null,\r\n });\r\n }\r\n }\r\n }, [header.AccountId, simpleItem.CurrencyId]);\r\n\r\n useEffect(() => {\r\n if (header.AccountId) {\r\n setBalance({ ...balance, loading: true });\r\n services.fetchAccountBuyingPower({ accountId: header.AccountId }).then((response) => {\r\n const { buyingpower } = response.response;\r\n setBalance({ ...balance, data: buyingpower });\r\n });\r\n } else {\r\n setBalance({ ...balance, data: [] });\r\n }\r\n setBalance({ ...balance, loading: false });\r\n }, [header.AccountId, header.IsCurrency]);\r\n\r\n useEffect(() => {\r\n if (header.AccountId && !header.IsCurrency && simpleItem.AssetId) {\r\n setBalance({ ...balance, loading: true });\r\n services.fetchAccountSellingPower({ accountId: header.AccountId, assetId: simpleItem.AssetId }).then((response) => {\r\n const { sellingpower } = response.response;\r\n setBalance({ ...balance, data: sellingpower });\r\n });\r\n } else {\r\n setBalance({ ...balance, data: [] });\r\n }\r\n setBalance({ ...balance, loading: false });\r\n services.fetchGetAssetInformation({ assetId: simpleItem.AssetId }).then((response) => {\r\n setDecimalAmount(response.info.SubAssetClassDecimalPlaces);\r\n });\r\n }, [simpleItem.AssetId]);\r\n\r\n return (\r\n \r\n \r\n {/* Left */}\r\n \r\n \r\n \r\n onChange(dispatch, v)} />\r\n \r\n \r\n \r\n onChangeHeader(dispatch, {\r\n IsCurrency: v == CurrencyAsset.Cash,\r\n })\r\n }\r\n value={header.IsCurrency ? CurrencyAsset.Cash : CurrencyAsset.Asset}\r\n items={Object.values(CurrencyAsset).map((key, index) => ({\r\n id: key,\r\n description: key,\r\n }))}\r\n />\r\n \r\n \r\n\r\n {/* ##### Symbol ###### */}\r\n onChangeItem(dispatch, simpleItem.Id, values)}\r\n error={header.IsCurrency ? errors.simple_CurrencyISO : errors.simple_AssetTicker}\r\n disabled\r\n value={header.IsCurrency ? simpleItem.CurrencyISO : simpleItem.AssetTicker}\r\n fetchSearchSymbol={services.fetchSearchSymbol}\r\n />\r\n {/* ##### Quantity ###### */}\r\n \r\n onChangeItem(dispatch, simpleItem.Id, { Quantity: v })}\r\n invalid={!!errors.simple_Quantity}\r\n disabled={readonly.simple_Quantity}\r\n dataTypeDecimalName=\"quantity\"\r\n />\r\n \r\n\r\n {/* ##### Price ###### */}\r\n {!header.IsCurrency && (\r\n \r\n onChangeHeader(dispatch, { Price: v })}\r\n invalid={!!errors.header_Price}\r\n disabled={readonly.header_Price}\r\n />\r\n \r\n )}\r\n\r\n {/* ##### Date ##### */}\r\n \r\n onChange(dispatch, { Date: e.target.value })}\r\n />\r\n \r\n\r\n {/* ##### Settlement Date ##### */}\r\n \r\n onChange(dispatch, { SettlementDate: e.target.value })}\r\n />\r\n \r\n \r\n\r\n {/* Right */}\r\n \r\n {/* ##### Account ###### */}\r\n onChangeHeader(dispatch, values)}\r\n balance={balance}\r\n readonly={{\r\n AccountName: true,\r\n HolderName: false,\r\n }}\r\n errors={{\r\n AccountName: errors.header_AccountName,\r\n HolderName: errors.header_HolderName,\r\n }}\r\n services={{\r\n fetchAccountHolders: services.fetchAccountHolders,\r\n fetchSearchAccount: services.fetchSearchAccount,\r\n }}\r\n />\r\n\r\n \r\n\r\n {/* ##### Custodian ###### */}\r\n onChange(dispatch, { CustodianId: id, CustodianName: name })}\r\n />\r\n\r\n {header.IsCurrency && io.Local && (\r\n \r\n \r\n onChangeHeader(dispatch, { TransferType: v })}\r\n emptyLabel={\"Type\"}\r\n />\r\n \r\n\r\n {/* ##### Bank Account ##### */}\r\n {header.TransferType === IOTransferType.Transfer && (\r\n \r\n
    \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountIsThirdParty: !header.BankAccountIsThirdParty,\r\n })\r\n }\r\n />\r\n
    \r\n {header.BankAccountIsThirdParty ? (\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountId: id,\r\n BankAccountName: name,\r\n })\r\n }\r\n />\r\n\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.simple_Quantity}\r\n />\r\n \r\n\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ThirdPartyPersonName: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ThirdPartyIdentificationNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n {\r\n onChangeHeader(dispatch, {\r\n ThirdPartyCountryId: id,\r\n ThirdPartyCountryName: name,\r\n });\r\n }}\r\n />\r\n \r\n ) : (\r\n
    \r\n \r\n ({\r\n id: a.BankAccountItemId,\r\n description: `${a.BankAccountName} - ${a.BankAccountNumber}`,\r\n }))}\r\n disabled={accountEmpty || currencyEmpty || readonly.simple_Quantity}\r\n invalid={!!errors.header_BankAccountName}\r\n onChange={(id) =>\r\n onChangeHeader(\r\n dispatch,\r\n entities.accountBanks.find((a) => a.BankAccountItemId == id)\r\n )\r\n }\r\n emptyLabel={\"Bank Account\"}\r\n />\r\n \r\n {header.BankAccountItemId && (\r\n \r\n
    \r\n {header.BankAccountHolders}\r\n \r\n )}\r\n
    \r\n )}\r\n \r\n )}\r\n\r\n {/* ##### Cheque ##### */}\r\n {header.TransferType === IOTransferType.Cheque && (\r\n \r\n {/* ##### Third party bank ###### */}\r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountId: id,\r\n BankAccountName: name,\r\n })\r\n }\r\n />\r\n\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ChequeNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.simple_Quantity}\r\n />\r\n \r\n \r\n )}\r\n \r\n )}\r\n\r\n \r\n {/* ##### Commission ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, { Commission: v })}\r\n invalid={!!errors.header_Commission}\r\n {...commissionSuffix(null)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n\r\n {/* ##### CommissionType ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, { CommissionType: v })}\r\n emptyLabel={\"Type\"}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n {!io.Local && (\r\n \r\n \r\n \r\n {/* ##### Account ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n {/* ##### Bank ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountName: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n {/* ##### Intermediary Bank ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n IntermediaryBank: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n invalid={!!errors.header_IntermediaryBank}\r\n />\r\n \r\n \r\n\r\n \r\n {/* ##### Country ###### */}\r\n {\r\n onChangeHeader(dispatch, {\r\n CountryId: id,\r\n CountryName: name,\r\n });\r\n }}\r\n />\r\n\r\n {/* ##### ABA/SWIFT ###### */}\r\n \r\n onChangeHeader(dispatch, { ABASWIFT: e.target.value })}\r\n invalid={!!errors.header_ABASWIFT}\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n {/* ##### Intermediary ABA/SWIFT ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n IntermediaryABASwift: e.target.value,\r\n })\r\n }\r\n invalid={!!errors.header_IntermediaryABASwift}\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ThirdPartyPersonName: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ThirdPartyIdentificationNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport const SubscriptionValidations = (io, userType) => {\r\n const header = io.itemsHeader;\r\n const isBulk = io.IOMode == IOMode.MultipleAssets;\r\n const isThirdPartyAccount = header.TransferType == IOTransferType.Transfer && header.BankAccountIsThirdParty;\r\n\r\n if (isBulk) {\r\n return {\r\n form: {\r\n CustodianName: { empty: !userType || userType != \"Advisor\" },\r\n },\r\n simple: {},\r\n subForm: {\r\n AccountName: { empty: true },\r\n HolderName: { empty: true },\r\n BankAccountItemId: {\r\n empty: io.Local && header.IsCurrency && header.TransferType == IOTransferType.Transfer && !isThirdPartyAccount,\r\n },\r\n BankAccountId: {\r\n empty: io.Local && header.IsCurrency && ((header.TransferType == IOTransferType.Transfer && isThirdPartyAccount) || header.TransferType == IOTransferType.Cheque),\r\n },\r\n BankAccountName: {\r\n empty: io.Local && header.IsCurrency && header.TransferType != IOTransferType.Cash,\r\n },\r\n BankAccountNumber: {\r\n empty: io.Local && header.IsCurrency && header.TransferType == IOTransferType.Transfer,\r\n },\r\n ChequeNumber: {\r\n empty: io.Local && header.IsCurrency && header.TransferType == IOTransferType.Cheque,\r\n },\r\n IntermediaryBank: { empty: !io.Local },\r\n CountryName: { empty: !io.Local },\r\n ABASWIFT: { empty: !io.Local },\r\n IntermediaryABASwift: { empty: !io.Local },\r\n },\r\n };\r\n }\r\n\r\n return {\r\n form: {\r\n CustodianName: { empty: !userType || userType != \"Advisor\" },\r\n },\r\n simple: {\r\n Quantity: { empty: true },\r\n AssetTicker: {\r\n empty: header.IsCurrency == false,\r\n autosuggestId: \"AssetId\",\r\n },\r\n CurrencyISO: {\r\n empty: header.IsCurrency == true,\r\n autosuggestId: \"CurrencyId\",\r\n },\r\n },\r\n subForm: {\r\n AccountName: { empty: true },\r\n HolderName: { empty: true },\r\n Price: { empty: header.IsCurrency == false },\r\n BankAccountItemId: {\r\n empty: io.Local && header.IsCurrency && header.TransferType == IOTransferType.Transfer && !isThirdPartyAccount,\r\n },\r\n BankAccountId: {\r\n empty: io.Local && header.IsCurrency && ((header.TransferType == IOTransferType.Transfer && isThirdPartyAccount) || header.TransferType == IOTransferType.Cheque),\r\n },\r\n BankAccountName: {\r\n empty: (!io.Local && header.IsCurrency && header.TransferType != IOTransferType.Cash) || (io.Local && header.IsCurrency && header.TransferType == IOTransferType.Transfer),\r\n },\r\n BankAccountNumber: {\r\n empty: header.IsCurrency && header.TransferType == IOTransferType.Transfer,\r\n },\r\n ChequeNumber: {\r\n empty: io.Local && header.IsCurrency && header.TransferType == IOTransferType.Cheque,\r\n },\r\n CountryName: { empty: !io.Local },\r\n ThirdPartyCountryName: {\r\n empty: io.Local && header.IsCurrency && header.TransferType == IOTransferType.Transfer && isThirdPartyAccount,\r\n },\r\n },\r\n };\r\n};\r\n","import React, { useContext, useEffect, useState } from \"react\";\r\nimport { Input, Button, Row, Col, Label } from \"reactstrap\";\r\nimport { FormField } from \"../../../../../utils\";\r\nimport { Dispatch } from \"../../store/store\";\r\nimport style from \"../Bulk/Bulk.module.scss\";\r\nimport Symbol from \"../../Fields/Symbol\";\r\nimport { Combobox, Field, Numeric } from \"../../../Order/Field/Field\";\r\nimport { CurrencyAsset, IOType } from \"../../../../IO/types\";\r\n//import { Denominations } from \"../../../../Asset/Tabs/Denominations/Denominations\";\r\n\r\nconst Edit = ({ accountId, toggle, item, edit, fetchSearchSymbol, fetchGetAssetInformation }) => {\r\n const [fields, setFields] = useState(item || {});\r\n const [errors, setErrors] = useState({});\r\n const [decimalAmount, setDecimalAmount] = useState();\r\n const { dispatch, services, state } = useContext(Dispatch);\r\n const { io } = state;\r\n\r\n const [balance, setBalance] = useState({\r\n loading: false,\r\n data: [],\r\n });\r\n const simpleItem = fields;\r\n const [denominations, setDenominations] = useState([]);\r\n const [denominationsReturn, setDenominationsReturn] = useState([]);\r\n const [assetDenominationInfo, setAssetDenominationInfo] = useState({ AssetPhysicalDenomination: false });\r\n const [segundoFetch, setSegundoFetch] = useState();\r\n const [asset, setAsset] = useState([]);\r\n const onChange = (newFields) => {\r\n setFields({\r\n ...fields,\r\n ...newFields,\r\n });\r\n const cleanedErrors = {};\r\n\r\n Object.keys(newFields).forEach((key) => (cleanedErrors[key] = undefined));\r\n\r\n setErrors({\r\n ...errors,\r\n ...cleanedErrors,\r\n });\r\n //console.log(fields);\r\n };\r\n\r\n const onEdit = () => {\r\n let newErrors = {};\r\n\r\n if (fields.Quantity == undefined || fields.Quantity === \"\") {\r\n newErrors[\"Quantity\"] = \"Required field\";\r\n }\r\n if (fields.denominationsTrue == false) {\r\n newErrors[\"Denominations\"] = \"Must select \" + fields.slots + \" denominations for the quantity selected\";\r\n }\r\n if (fields.IsCurrency) {\r\n if (fields.CurrencyId == undefined || fields.CurrencyId == \"\") {\r\n newErrors[\"CurrencyISO\"] = \"Required field\";\r\n }\r\n } else {\r\n if (fields.AssetId == undefined || fields.AssetId == \"\") {\r\n newErrors[\"AssetTicker\"] = \"Required field\";\r\n }\r\n }\r\n\r\n if (Object.keys(newErrors).length) {\r\n setErrors(newErrors);\r\n } else {\r\n edit({\r\n ...item,\r\n ...fields,\r\n });\r\n toggle();\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (fields.AssetId) {\r\n fetchGetAssetInformation({ assetId: fields.AssetId }).then((response) => {\r\n setAsset(response.info);\r\n });\r\n }\r\n }, [fields.AssetId]);\r\n\r\n useEffect(() => {\r\n if (simpleItem.AssetId != 0) {\r\n services\r\n .GetDenominations({\r\n AssetId: simpleItem.AssetId,\r\n AccountId: accountId,\r\n WithdrawId: 0,\r\n DepositId: 0,\r\n itemId: 0,\r\n TransferId: 0,\r\n })\r\n .then((response) => {\r\n let responseDenominations = response.denominations;\r\n for (let i = 0; i < io.items.length; i++) {\r\n let currentItemDenominations = io.items[i].Denominations;\r\n if (item.Denominations !== undefined) {\r\n if (\r\n !item.Denominations.some((obj2) =>\r\n currentItemDenominations.some((obj1) => obj1.DenominationId === obj2.DenominationId)\r\n )\r\n ) {\r\n responseDenominations = responseDenominations.filter(\r\n (element) =>\r\n !currentItemDenominations.some((obj2) => obj2.DenominationId === element.DenominationId)\r\n );\r\n }\r\n } else {\r\n responseDenominations = responseDenominations.filter(\r\n (element) =>\r\n !currentItemDenominations.some((obj2) => obj2.DenominationId === element.DenominationId)\r\n );\r\n }\r\n }\r\n setDenominations(responseDenominations);\r\n onChange({\r\n DenominationsTotal: responseDenominations,\r\n slots: 0,\r\n });\r\n setSegundoFetch(true);\r\n });\r\n }\r\n }, [simpleItem.AssetId, accountId]);\r\n\r\n useEffect(() => {\r\n if (io.Id !== undefined && fields.Denominations === undefined) {\r\n services\r\n .GetDenominations({\r\n AssetId: fields.AssetId,\r\n AccountId: accountId,\r\n WithdrawId: -1,\r\n DepositId: -1,\r\n itemId: fields.Id,\r\n TransferId: io.Id,\r\n })\r\n .then((response) => {\r\n const responseDenominations = response.denominations;\r\n //console.log(responseDenominations);\r\n //setDenominations(responseDenominations);\r\n onChange({\r\n Denominations: responseDenominations,\r\n });\r\n });\r\n }\r\n }, [segundoFetch]);\r\n\r\n useEffect(() => {\r\n if (accountId && !fields.IsCurrency && simpleItem.AssetId) {\r\n setBalance({ ...balance, loading: true });\r\n services\r\n .fetchAccountSellingPower({ accountId: accountId, assetId: simpleItem.AssetId })\r\n .then((response) => {\r\n const { sellingpower } = response.response;\r\n setBalance({ ...balance, data: sellingpower });\r\n });\r\n } else {\r\n setBalance({ ...balance, data: [] });\r\n }\r\n setBalance({ ...balance, loading: false });\r\n services.fetchGetAssetInformation({ assetId: simpleItem.AssetId }).then((response) => {\r\n if (response.info.AssetPhysicalDenomination) {\r\n setAssetDenominationInfo({\r\n AssetPhysicalDenomination: response.info.AssetPhysicalDenomination,\r\n AssetSheetSize: response.info.AssetSheetSize,\r\n SlotsQuantity: 0,\r\n });\r\n } else {\r\n setAssetDenominationInfo({\r\n AssetPhysicalDenomination: false,\r\n AssetSheetSize: 0,\r\n SlotsQuantity: 0,\r\n });\r\n }\r\n //console.log(\"response:\", response.info);\r\n //setDecimalAmount(response.info.SubAssetClassDecimalPlaces);\r\n });\r\n }, [simpleItem.AssetId]);\r\n\r\n useEffect(() => {\r\n if (assetDenominationInfo.AssetPhysicalDenomination && fields.Quantity) {\r\n let slots = Math.ceil(fields.Quantity / assetDenominationInfo.AssetSheetSize);\r\n setAssetDenominationInfo({\r\n ...assetDenominationInfo,\r\n SlotsQuantity: slots,\r\n });\r\n let i;\r\n if (slots > denominationsReturn.length) {\r\n //selecciono menos denominations de los marcados en cantidad\r\n i = false;\r\n } else if (slots < denominationsReturn.length) {\r\n //seleciono mas denominations de los marcados en cantidad\r\n i = false;\r\n } else {\r\n i = true;\r\n }\r\n onChange({\r\n denominationsTrue: i,\r\n slots: slots,\r\n });\r\n }\r\n }, [fields.Quantity, denominationsReturn.length]);\r\n\r\n const onChangeDenomination = (checked, value, index) => {\r\n let denominationResult = denominationsReturn;\r\n if (checked) {\r\n denominationsReturn.push({ key: index, DenominationId: value });\r\n } else {\r\n const updatedDenomination = denominationsReturn.filter((item) => item.key !== index);\r\n setDenominationsReturn(updatedDenomination);\r\n denominationResult = updatedDenomination;\r\n }\r\n onChange({\r\n Denominations: denominationResult,\r\n });\r\n };\r\n useEffect(() => {\r\n if (fields.AssetId) {\r\n setDecimalAmount(asset.SubAssetClassDecimalPlaces);\r\n }\r\n }, [fields.Price]);\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n onChange({ IsCurrency: v == CurrencyAsset.Cash })}\r\n value={fields.IsCurrency ? CurrencyAsset.Cash : CurrencyAsset.Asset}\r\n items={Object.values(CurrencyAsset).map((key, index) => ({ id: key, description: key }))}\r\n />\r\n \r\n {/* ##### Quantity ###### */}\r\n \r\n onChange({ Quantity: v })}\r\n invalid={!!errors.Quantity}\r\n />\r\n \r\n\r\n {/* ##### Price ###### */}\r\n \r\n onChange({ Price: v })}\r\n invalid={!!errors.Price}\r\n decimalScale={decimalAmount}\r\n dataTypeDecimalName=\"price\"\r\n />\r\n \r\n\r\n {/* ##### Symbol ###### */}\r\n onChange(values)}\r\n error={fields.IsCurrency ? errors.CurrencyISO : errors.AssetTicker}\r\n disabled={false}\r\n value={fields.IsCurrency ? fields.CurrencyISO : fields.AssetTicker}\r\n fetchSearchSymbol={fetchSearchSymbol}\r\n />\r\n \r\n {assetDenominationInfo.AssetPhysicalDenomination && (\r\n
    \r\n
    \r\n \r\n Denomination\r\n {\" \"}\r\n {!fields.denominationsTrue && }\r\n
    \r\n
    \r\n {segundoFetch &&\r\n denominations.map((denomination, key) => (\r\n
    \r\n \r\n \r\n item.DenominationId == denomination.DenominationId\r\n )\r\n }\r\n key={key}\r\n type=\"checkbox\"\r\n style={{\r\n position: \"relative\",\r\n cursor: \"pointer\",\r\n left: \"25px\",\r\n }}\r\n onChange={(e) =>\r\n onChangeDenomination(e.target.checked, denomination.DenominationId, key)\r\n }\r\n />\r\n \r\n\r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n ))}\r\n
    \r\n
    \r\n
    \r\n )}\r\n
    \r\n
    \r\n\r\n
    \r\n {\" \"}\r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default Edit;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Table, Button } from \"reactstrap\";\r\nimport style from \"../Bulk/Bulk.module.scss\";\r\nimport Edit from \"./Edit\";\r\nimport { FormattedNumber } from \"../../../../FormattedNumber/FormattedNumber\";\r\n\r\nconst Securities = ({ error, items, isCurrency, readonly, dispatch, ...props }) => {\r\n const [edit, setEdit] = useState({\r\n open: false,\r\n item: { IsCurrency: isCurrency },\r\n });\r\n\r\n const toggleEdit = (item = { IsCurrency: isCurrency }) => {\r\n setEdit({\r\n open: !edit.open,\r\n item,\r\n });\r\n };\r\n\r\n const onEdit = (item) => {\r\n dispatch({ type: \"EDIT_BULK_ITEM\", item });\r\n };\r\n\r\n const onDelete = (itemId) => {\r\n dispatch({ type: \"DELETE_BULK_ITEM\", itemId });\r\n };\r\n\r\n if (edit.open) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n
    \r\n Securities\r\n \r\n toggleEdit()}\r\n disabled={readonly}\r\n >\r\n \r\n {\"\\u00A0\"} Add Security\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {items\r\n .filter((i, ind) => i.Quantity != null)\r\n .map((i, ind) => (\r\n onDelete(i.Id)}\r\n onEdit={() => toggleEdit(i)}\r\n readonly={readonly}\r\n accountType={props.accountType}\r\n />\r\n ))}\r\n \r\n
    QuantityPriceSecurity
    \r\n
    \r\n {error && (\r\n
    \r\n {error}\r\n
    \r\n )}\r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst Item = ({ item, readonly, onDelete, onEdit }) => {\r\n return (\r\n \r\n {item.IsCurrency ? \"C\" : \"A\"}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {item.IsCurrency ? item.CurrencyISO : item.AssetTicker}\r\n \r\n \r\n onDelete(item.Id)}\r\n style={{ color: \"#d83737\" }}\r\n >\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default Securities;\r\n","import React, { useState, useContext } from \"react\";\r\nimport { Input, Container, Row, Col } from \"reactstrap\";\r\nimport { onChangeItem, onChange } from \"../../IO\";\r\nimport Securities from \"./Securities\";\r\nimport Account from \"../../Fields/Account\";\r\nimport { Field, Combobox } from \"../../../Order/Field/Field\";\r\nimport { TransferType, CurrencyAsset } from \"../../../../IO/types\";\r\nimport { Dispatch } from \"../../store/store\";\r\nimport Files from \"../../Fields/Files/Files\";\r\n\r\nconst Transfer = ({opsViewAccountName}) => {\r\n const { dispatch, services, state } = useContext(Dispatch);\r\n const { ui, io, fields, entities } = state;\r\n const { errors, readonly } = fields;\r\n const header = io.itemsHeader;\r\n const checkSettlementDate = (tradedate, AssetId) => {\r\n let settlementvalue = 1;\r\n //let AssetId = 0;\r\n let inchange = false;\r\n\r\n onChange(dispatch, { Date: tradedate });\r\n\r\n if (header.IsCurrency === false) {\r\n if (inchange) {\r\n // AssetId = values.AssetId;\r\n services.GetAssetSettlement({ AssetId }).then((r) => {\r\n executeSettlement(AssetId, r.DefaultSettlement, tradedate);\r\n });\r\n } else {\r\n //AssetId = simpleItem.AssetId;\r\n services.GetAssetSettlement({ AssetId }).then((r) => {\r\n executeSettlement(AssetId, r.DefaultSettlement, tradedate);\r\n });\r\n }\r\n } else {\r\n settlementvalue = 1;\r\n AssetId = 0;\r\n executeSettlement(AssetId, settlementvalue, tradedate);\r\n }\r\n };\r\n const executeSettlement = (Asset, settlementvalue, tradedate) => {\r\n const getdata = {\r\n tradedate: tradedate,\r\n assetId: Asset,\r\n ist0: false,\r\n settlement: settlementvalue,\r\n };\r\n services\r\n .GetIOSettlementDate(getdata)\r\n .then((r) => onChange(dispatch, { SettlementDate: r.settlementday }));\r\n };\r\n\r\n return (\r\n \r\n \r\n {/* Left */}\r\n \r\n {/* ##### Date ##### */}\r\n \r\n checkSettlementDate(e.target.value, 0)}\r\n />\r\n \r\n\r\n {/* ##### Settlement Date ##### */}\r\n \r\n onChange(dispatch, { SettlementDate: e.target.value })}\r\n />\r\n \r\n\r\n \r\n \r\n {/* ##### Right ##### */}\r\n \r\n {/* ##### Account ###### */}\r\n {\r\n onChange(dispatch, {\r\n transfersendingId: f.AccountId,\r\n transfersendingName: f.AccountName,\r\n transfersendingNumber: f.AccountNumber,\r\n });\r\n }}\r\n filter={[io.transferreceivingId]}\r\n hideHolder={true}\r\n readonly={{\r\n AccountName: readonly.transfersendingName,\r\n }}\r\n errors={{\r\n AccountName: errors.transfersendingName,\r\n }}\r\n services={{\r\n fetchAccountHolders: services.fetchAccountHolders,\r\n fetchSearchAccount: services.fetchSearchAccount,\r\n }}\r\n opsViewAccountName={opsViewAccountName}\r\n />\r\n\r\n {/* ##### Account ###### */}\r\n {\r\n onChange(dispatch, {\r\n transferreceivingId: f.AccountId,\r\n transferreceivingName: f.AccountName,\r\n transferreceivingNumber: f.AccountNumber,\r\n });\r\n }}\r\n filter={[io.transfersendingId]}\r\n hideHolder={true}\r\n readonly={{\r\n AccountName: readonly.transferreceivingName,\r\n }}\r\n errors={{\r\n AccountNumber: errors.transferreceivingNumber,\r\n }}\r\n services={{\r\n fetchAccountHolders: services.fetchAccountHolders,\r\n fetchSearchAccount: services.fetchSearchAccount,\r\n fetchSearchTransfer: services.fetchSearchTransfer,\r\n }}\r\n sendingAccountId={io.transfersendingId > 0 ? io.transfersendingId : 0}\r\n opsViewAccountName={opsViewAccountName}\r\n />\r\n\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const TransferValidations = (io) => {\r\n return {\r\n form: {\r\n transfersendingName: { empty: true },\r\n transferreceivingNumber: { empty: true },\r\n },\r\n subForm: {},\r\n };\r\n};\r\n\r\nexport default Transfer;\r\n","import React, { useContext, useEffect, useState } from \"react\";\r\nimport { Container, Row, Col, Input, CustomInput, Form, Label } from \"reactstrap\";\r\nimport { Dispatch } from \"../../store/store\";\r\nimport Symbol from \"../../Fields/Symbol\";\r\nimport { onChangeHeader, onChange, onChangeItem } from \"../../IO\";\r\nimport { LocalINTL, SimpleSuggest } from \"../../Fields\";\r\nimport { Field, Numeric, Combobox } from \"../../../Order/Field/Field\";\r\nimport { CurrencyAsset, IOMode, IOType, IOTransferType } from \"../../../../IO/types\";\r\nimport { commissionSuffix } from \"../../../Order/Form/commons\";\r\nimport Account from \"../../Fields/Account\";\r\nimport Files from \"../../Fields/Files/Files\";\r\nimport { isEmpty } from \"../Default\";\r\nimport { processes } from \"../../../../../utils/Helper\";\r\nimport { FormField, SelectFormField } from \"../../../../../utils\";\r\n\r\nconst Withdrawal = ({}) => {\r\n const { dispatch, services, state } = useContext(Dispatch);\r\n const { io, fields, entities, permissions } = state;\r\n const { errors, readonly } = fields;\r\n const { allowValues, allowCash } = permissions;\r\n const header = io.itemsHeader;\r\n const simpleItem = io.items[0];\r\n const [denominationsReturn, setDenominationsReturn] = useState([]);\r\n const [balance, setBalance] = useState({\r\n loading: false,\r\n data: [],\r\n });\r\n const [reasons, setReasons] = useState([]);\r\n const [denominations, setDenominations] = useState([]);\r\n //console.log(\"io\", io);\r\n // XOR operator\r\n const readOnlyTypeSelector = allowValues ? !allowCash : allowCash;\r\n const accountEmpty = isEmpty(header.AccountId);\r\n const currencyEmpty = isEmpty(simpleItem.CurrencyId);\r\n const [assetDenominationInfo, setAssetDenominationInfo] = useState({ AssetPhysicalDenomination: false });\r\n useEffect(() => {\r\n //get reasons\r\n try {\r\n services.fetchGetReasons({ process: processes.WITHDRAW }).then((r) => {\r\n r ? setReasons(r.keyValues) : \"\";\r\n });\r\n } catch (e) {\r\n setReasons([]);\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (header.IsCurrency && !header.BankAccountIsThirdParty) {\r\n if (!isEmpty(header.AccountId) && !isEmpty(simpleItem.CurrencyId)) {\r\n if (state.io.Status === \"Filled\") {\r\n dispatch({\r\n type: \"UPDATE_ACCOUNT_BANKS\",\r\n accountBanks: [\r\n {\r\n BankAccountHolders: header.BankAccountHolders,\r\n BankAccountId: header.BankAccountId,\r\n BankAccountItemId: header.BankAccountItemId,\r\n BankAccountName: header.BankAccountName,\r\n BankAccountNumber: header.BankAccountNumber,\r\n },\r\n ],\r\n });\r\n } else {\r\n services\r\n .fetchGetAccountBanks({\r\n accountId: header.AccountId,\r\n currencyId: simpleItem.CurrencyId,\r\n })\r\n .then((r) => r.response)\r\n .then((r) => {\r\n dispatch({\r\n type: \"UPDATE_ACCOUNT_BANKS\",\r\n accountBanks: r.accountBanks,\r\n });\r\n let item;\r\n if (header.BankAccountItemId === null && r.accountBanks) {\r\n item = r.accountBanks[0];\r\n onChangeHeader(dispatch, {\r\n ...item,\r\n });\r\n } else {\r\n item = r.accountBanks.find((a) => a.BankAccountItemId === header.BankAccountItemId);\r\n onChangeHeader(dispatch, {\r\n ...item,\r\n });\r\n }\r\n\r\n if (item) {\r\n onChangeHeader(dispatch, {\r\n ThirdPartyPersonName: item.BankAccountHolders,\r\n });\r\n }\r\n });\r\n }\r\n } else {\r\n dispatch({ type: \"UPDATE_ACCOUNT_BANKS\", accountBanks: [] });\r\n onChangeHeader(dispatch, {\r\n BankAccountItemId: null,\r\n BankAccountName: null,\r\n });\r\n }\r\n }\r\n }, [header.AccountId, simpleItem.CurrencyId]);\r\n useEffect(() => {\r\n if (header.AccountId) {\r\n setBalance({ ...balance, loading: true });\r\n services.fetchAccountBuyingPower({ accountId: header.AccountId }).then((response) => {\r\n const { buyingpower } = response.response;\r\n setBalance({ ...balance, data: buyingpower });\r\n });\r\n } else {\r\n setBalance({ ...balance, data: [] });\r\n }\r\n setBalance({ ...balance, loading: false });\r\n }, [header.AccountId, header.IsCurrency]);\r\n\r\n useEffect(() => {\r\n if (header.AccountId && !header.IsCurrency && simpleItem.AssetId) {\r\n setBalance({ ...balance, loading: true });\r\n services\r\n .fetchAccountSellingPower({ accountId: header.AccountId, assetId: simpleItem.AssetId })\r\n .then((response) => {\r\n const { sellingpower } = response.response;\r\n setBalance({ ...balance, data: sellingpower });\r\n });\r\n } else {\r\n setBalance({ ...balance, data: [] });\r\n }\r\n setBalance({ ...balance, loading: false });\r\n }, [simpleItem.AssetId]);\r\n\r\n useEffect(() => {\r\n if (header.AccountId && !header.IsCurrency && simpleItem.AssetId) {\r\n setBalance({ ...balance, loading: true });\r\n services\r\n .fetchAccountSellingPower({ accountId: header.AccountId, assetId: simpleItem.AssetId })\r\n .then((response) => {\r\n const { sellingpower } = response.response;\r\n setBalance({ ...balance, data: sellingpower });\r\n });\r\n } else {\r\n setBalance({ ...balance, data: [] });\r\n }\r\n setBalance({ ...balance, loading: false });\r\n services.fetchGetAssetInformation({ assetId: simpleItem.AssetId }).then((response) => {\r\n if (response.info.AssetPhysicalDenomination) {\r\n setAssetDenominationInfo({\r\n AssetPhysicalDenomination: response.info.AssetPhysicalDenomination,\r\n AssetSheetSize: response.info.AssetSheetSize,\r\n SlotsQuantity: 0,\r\n });\r\n } else {\r\n setAssetDenominationInfo({\r\n AssetPhysicalDenomination: false,\r\n AssetSheetSize: 0,\r\n SlotsQuantity: 0,\r\n });\r\n }\r\n //console.log(\"response:\", response.info);\r\n //setDecimalAmount(response.info.SubAssetClassDecimalPlaces);\r\n });\r\n }, [simpleItem.AssetId]);\r\n\r\n //check slots quantity if the quantity changes\r\n useEffect(() => {\r\n //console.log(io);\r\n if (assetDenominationInfo.AssetPhysicalDenomination && simpleItem.Quantity) {\r\n let slots = Math.ceil(simpleItem.Quantity / assetDenominationInfo.AssetSheetSize);\r\n setAssetDenominationInfo({\r\n ...assetDenominationInfo,\r\n SlotsQuantity: slots,\r\n });\r\n let i;\r\n if (slots > denominationsReturn.length) {\r\n //selecciono menos denominations de los marcados en cantidad\r\n i = false;\r\n } else if (slots < denominationsReturn.length) {\r\n //seleciono mas denominations de los marcados en cantidad\r\n i = false;\r\n } else {\r\n i = true;\r\n }\r\n\r\n onChange(dispatch, {\r\n denominationsTrue: i,\r\n slots: slots,\r\n });\r\n }\r\n }, [simpleItem.Quantity, denominationsReturn.length]);\r\n\r\n const onChangeDenomination = (checked, value, index) => {\r\n let denominationResult = denominationsReturn;\r\n if (checked) {\r\n denominationsReturn.push({ key: index, DenominationId: value });\r\n } else {\r\n const updatedDenomination = denominationsReturn.filter((item) => item.key !== index);\r\n setDenominationsReturn(updatedDenomination);\r\n denominationResult = updatedDenomination;\r\n }\r\n onChangeItem(dispatch, simpleItem.Id, {\r\n Denominations: denominationResult,\r\n });\r\n };\r\n useEffect(() => {\r\n //console.log(simpleItem.AssetId, header.AccountId);\r\n //console.log(io);\r\n if (io.Id == undefined) {\r\n services\r\n .GetDenominations({\r\n AssetId: simpleItem.AssetId,\r\n AccountId: header.AccountId,\r\n WithdrawId: 0,\r\n DepositId: 0,\r\n itemId: 0,\r\n TransferId: 0,\r\n })\r\n .then((response) => {\r\n //console.log(\"sin id\");\r\n const responseDenominations = response.denominations;\r\n //console.log(responseDenominations);\r\n setDenominations(responseDenominations);\r\n onChange(dispatch, {\r\n DenominationsTotal: responseDenominations,\r\n slots: 0,\r\n });\r\n });\r\n } else {\r\n services\r\n .GetDenominations({\r\n AssetId: simpleItem.AssetId,\r\n AccountId: header.AccountId,\r\n WithdrawId: io.Id,\r\n DepositId: -1,\r\n itemId: 0,\r\n TransferId: -1,\r\n })\r\n .then((response) => {\r\n //console.log(\"con id\");\r\n const responseDenominations = response.denominations;\r\n //console.log(responseDenominations);\r\n setDenominations(responseDenominations);\r\n onChange(dispatch, {\r\n DenominationsTotal: responseDenominations,\r\n });\r\n });\r\n }\r\n }, [simpleItem.AssetId, header.AccountId]);\r\n\r\n const checkSettlementDate = (tradedate, SimpleItemId, values) => {\r\n let settlementvalue = 1;\r\n let AssetId = 0;\r\n let inchange = false;\r\n onChange(dispatch, { Date: tradedate });\r\n // Disparar el onChangeItem\r\n if (SimpleItemId && values) {\r\n //console.table(\"Me entro al if\", values);\r\n onChangeItem(dispatch, SimpleItemId, values);\r\n inchange = true;\r\n }\r\n\r\n if (header.IsCurrency === false) {\r\n if (inchange) {\r\n //console.table(\"True inchange:\", values);\r\n AssetId = values.AssetId;\r\n services.GetAssetSettlement({ AssetId }).then((r) => {\r\n executeSettlement(AssetId, r.DefaultSettlement, tradedate);\r\n });\r\n } else {\r\n //console.table(\"False inchange:\", values);\r\n AssetId = simpleItem.AssetId;\r\n services.GetAssetSettlement({ AssetId }).then((r) => {\r\n executeSettlement(AssetId, r.DefaultSettlement, tradedate);\r\n });\r\n }\r\n } else {\r\n settlementvalue = 1;\r\n AssetId = 0;\r\n executeSettlement(AssetId, settlementvalue, tradedate);\r\n }\r\n };\r\n\r\n const executeSettlement = (Asset, settlementvalue, tradedate) => {\r\n const getdata = {\r\n tradedate: tradedate,\r\n assetId: Asset,\r\n ist0: false,\r\n settlement: settlementvalue,\r\n };\r\n services\r\n .GetIOSettlementDate(getdata)\r\n .then((r) => onChange(dispatch, { SettlementDate: r.settlementday }));\r\n };\r\n\r\n return (\r\n \r\n \r\n {/* Left */}\r\n \r\n \r\n \r\n onChange(dispatch, v)}\r\n />\r\n \r\n \r\n \r\n onChangeHeader(dispatch, {\r\n IsCurrency: v == CurrencyAsset.Cash,\r\n })\r\n }\r\n value={header.IsCurrency ? CurrencyAsset.Cash : CurrencyAsset.Asset}\r\n items={Object.values(CurrencyAsset).map((key, index) => ({\r\n id: key,\r\n description: key,\r\n }))}\r\n />\r\n \r\n \r\n\r\n {/* ##### Symbol ###### */}\r\n checkSettlementDate(io.Date, simpleItem.Id, values)} //onChangeItem(dispatch, simpleItem.Id, values)\r\n error={header.IsCurrency ? errors.simple_CurrencyISO : errors.simple_AssetTicker}\r\n disabled={header.IsCurrency ? readonly.header_CurrencyISO : readonly.header_AssetTicker}\r\n value={header.IsCurrency ? header.CurrencyISO : header.AssetTicker}\r\n fetchSearchSymbol={services.fetchSearchSymbol}\r\n />\r\n\r\n {/* ##### Quantity ###### */}\r\n \r\n onChangeItem(dispatch, simpleItem.Id, { Quantity: v })}\r\n invalid={!!errors.simple_Quantity}\r\n disabled={readonly.simple_Quantity}\r\n dataTypeDecimalName=\"quantity\"\r\n />\r\n \r\n\r\n {/* ##### Date ##### */}\r\n \r\n {\r\n checkSettlementDate(e.target.value);\r\n }}\r\n />\r\n \r\n\r\n {/* ##### Settlement Date ##### */}\r\n \r\n onChange(dispatch, { SettlementDate: e.target.value })}\r\n />\r\n \r\n\r\n {reasons.length > 0 && (\r\n \r\n \r\n onChange(dispatch, {\r\n ReasonDescription: e.target.options[e.target.selectedIndex].text,\r\n ReasonId: +e.target.value,\r\n })\r\n }\r\n >\r\n \r\n {reasons.map((reason) => (\r\n \r\n ))}\r\n \r\n \r\n )}\r\n \r\n\r\n {/* Right */}\r\n \r\n {/* ##### Account ###### */}\r\n onChangeHeader(dispatch, values)}\r\n balance={balance}\r\n readonly={{\r\n AccountNumber:readonly.header_AccountNumber,\r\n AccountName: readonly.header_AccountName,\r\n HolderName: readonly.header_HolderName,\r\n }}\r\n errors={{\r\n AccountNumber: errors.header_AccountNumber,\r\n AccountName: errors.header_AccountName,\r\n HolderName: errors.header_HolderName,\r\n }}\r\n services={{\r\n fetchAccountHolders: services.fetchAccountHolders,\r\n fetchSearchAccount: services.fetchSearchAccount,\r\n }}\r\n />\r\n\r\n \r\n\r\n {header.IsCurrency && io.Local && (\r\n \r\n \r\n onChangeHeader(dispatch, { TransferType: v })}\r\n emptyLabel={\"Type\"}\r\n />\r\n \r\n\r\n {/* ##### Bank Account ##### */}\r\n {header.TransferType === IOTransferType.Transfer && (\r\n \r\n
    \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountIsThirdParty: !header.BankAccountIsThirdParty,\r\n })\r\n }\r\n />\r\n
    \r\n {header.BankAccountIsThirdParty ? (\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountId: id,\r\n BankAccountName: name,\r\n })\r\n }\r\n />\r\n\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ThirdPartyPersonName: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ThirdPartyIdentificationNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n
    \r\n\r\n {\r\n onChangeHeader(dispatch, {\r\n ThirdPartyCountryId: id,\r\n ThirdPartyCountryName: name,\r\n });\r\n }}\r\n />\r\n \r\n ) : (\r\n
    \r\n \r\n ({\r\n id: a.BankAccountItemId,\r\n description: `${a.BankAccountName} - ${a.BankAccountNumber}`,\r\n }))}\r\n disabled={accountEmpty || currencyEmpty || readonly.header_Quantity}\r\n invalid={!!errors.header_BankAccountName}\r\n onChange={(id) =>\r\n onChangeHeader(dispatch, {\r\n ThirdPartyPersonName: entities.accountBanks.find(\r\n (a) => a.BankAccountItemId == id\r\n ).BankAccountHolders,\r\n ...entities.accountBanks.find((a) => a.BankAccountItemId == id),\r\n })\r\n }\r\n emptyLabel={\"Bank Account\"}\r\n />\r\n \r\n {header.BankAccountItemId && (\r\n \r\n
    \r\n {header.BankAccountHolders}\r\n \r\n )}\r\n
    \r\n )}\r\n \r\n )}\r\n\r\n {/* ##### Cheque ##### */}\r\n {header.TransferType === IOTransferType.Cheque && (\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountId: id,\r\n BankAccountName: name,\r\n })\r\n }\r\n />\r\n\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ChequeNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n \r\n )}\r\n \r\n )}\r\n\r\n \r\n {/* ##### Commission ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, { Commission: v })}\r\n invalid={!!errors.header_Commission}\r\n {...commissionSuffix(null)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n\r\n {/* ##### CommissionType ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, { CommissionType: v })}\r\n emptyLabel={\"Type\"}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n\r\n {!io.Local && (\r\n \r\n \r\n \r\n \r\n
    \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountIsThirdParty: !header.BankAccountIsThirdParty,\r\n })\r\n }\r\n />\r\n
    \r\n \r\n
    \r\n \r\n \r\n {/* ##### Account ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n {/* ##### Bank ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountName: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n {/* ##### Intermediary Bank ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n IntermediaryBank: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n invalid={!!errors.header_IntermediaryBank}\r\n />\r\n \r\n \r\n\r\n \r\n {/* ##### Country ###### */}\r\n {\r\n onChangeHeader(dispatch, {\r\n CountryId: id,\r\n CountryName: name,\r\n });\r\n }}\r\n />\r\n\r\n {/* ##### ABA/SWIFT ###### */}\r\n \r\n onChangeHeader(dispatch, { ABASWIFT: e.target.value })}\r\n invalid={!!errors.header_ABASWIFT}\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n {/* ##### Intermediary ABA/SWIFT ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n IntermediaryABASwift: e.target.value,\r\n })\r\n }\r\n invalid={!!errors.header_IntermediaryABASwift}\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n \r\n \r\n {header.BankAccountIsThirdParty && (\r\n \r\n \r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ThirdPartyPersonName: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ThirdPartyIdentificationNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n
    \r\n \r\n \r\n )}\r\n \r\n )}\r\n \r\n {assetDenominationInfo.AssetPhysicalDenomination && (\r\n
    \r\n
    \r\n \r\n Denominations\r\n {\" \"}\r\n {!io.denominationsTrue && }\r\n
    \r\n
    \r\n
    \r\n \r\n {denominations.map((denomination, key) => (\r\n \r\n
    \r\n {io.Id === undefined && (\r\n {\r\n onChangeDenomination(e.target.checked, denomination.DenominationId, key);\r\n }}\r\n />\r\n )}\r\n \r\n
    \r\n \r\n ))}\r\n
    \r\n
    \r\n
    \r\n )}\r\n
    \r\n \r\n );\r\n};\r\n\r\nexport const WithdrawalValidations = (io) => {\r\n const header = io.itemsHeader;\r\n const isBulk = io.IOMode == IOMode.MultipleAssets;\r\n const isThirdPartyAccount =\r\n header.TransferType == IOTransferType.Transfer && header.BankAccountIsThirdParty;\r\n\r\n if (isBulk) {\r\n return {\r\n form: {},\r\n simple: {},\r\n subForm: {\r\n AccountName: { empty: false },\r\n AccountNumber: { empty: true },\r\n HolderName: { empty: true },\r\n BankAccountItemId: {\r\n empty:\r\n io.Local &&\r\n header.IsCurrency &&\r\n header.TransferType == IOTransferType.Transfer &&\r\n !isThirdPartyAccount,\r\n },\r\n BankAccountId: {\r\n empty:\r\n io.Local &&\r\n header.IsCurrency &&\r\n ((header.TransferType == IOTransferType.Transfer && isThirdPartyAccount) ||\r\n header.TransferType == IOTransferType.Cheque),\r\n },\r\n BankAccountName: {\r\n empty: !io.Local,\r\n },\r\n ChequeNumber: {\r\n empty: io.Local && header.IsCurrency && header.TransferType == IOTransferType.Cheque,\r\n },\r\n BankAccountNumber: {\r\n empty: (header.IsCurrency && header.TransferType == IOTransferType.Transfer) || !io.Local,\r\n },\r\n\r\n IntermediaryBank: { empty: !io.Local },\r\n CountryName: { empty: !io.Local },\r\n ABASWIFT: { empty: !io.Local },\r\n IntermediaryABASwift: { empty: !io.Local },\r\n },\r\n };\r\n }\r\n\r\n return {\r\n form: {},\r\n simple: {\r\n Quantity: { empty: true },\r\n AssetTicker: {\r\n empty: header.IsCurrency == false,\r\n autosuggestId: \"AssetId\",\r\n },\r\n CurrencyISO: {\r\n empty: header.IsCurrency == true,\r\n autosuggestId: \"CurrencyId\",\r\n },\r\n Denominations: { DenominationsSlots: io.denominationsTrue, slots: io.slots },\r\n },\r\n subForm: {\r\n AccountName: { empty: false },\r\n AccountNumber: { empty: true },\r\n HolderName: { empty: true },\r\n BankAccountItemId: {\r\n empty:\r\n io.Local &&\r\n header.IsCurrency &&\r\n header.TransferType == IOTransferType.Transfer &&\r\n !isThirdPartyAccount,\r\n },\r\n BankAccountName: {\r\n empty: header.IsCurrency && header.TransferType == IOTransferType.Transfer,\r\n },\r\n BankAccountId: {\r\n empty:\r\n io.Local &&\r\n header.IsCurrency &&\r\n ((header.TransferType == IOTransferType.Transfer && isThirdPartyAccount) ||\r\n header.TransferType == IOTransferType.Cheque),\r\n },\r\n BankAccountNumber: {\r\n empty: !io.Local || (header.IsCurrency && header.TransferType == IOTransferType.Transfer),\r\n },\r\n ChequeNumber: {\r\n empty: io.Local && header.IsCurrency && header.TransferType == IOTransferType.Cheque,\r\n },\r\n // IntermediaryBank: {empty: !io.Local},\r\n CountryName: { empty: !io.Local },\r\n ABASWIFT: { empty: !io.Local },\r\n // IntermediaryABASwift: {empty: !io.Local},\r\n // ThirdPartyPersonName: {\r\n // empty:\r\n // (io.Local &&\r\n // header.IsCurrency &&\r\n // header.TransferType == IOTransferType.Transfer &&\r\n // isThirdPartyAccount) ||\r\n // (header.IsCurrency && !io.Local)\r\n // },\r\n // ThirdPartyIdentificationNumber: {\r\n // empty:\r\n // (io.Local &&\r\n // header.IsCurrency &&\r\n // header.TransferType == IOTransferType.Transfer &&\r\n // isThirdPartyAccount) ||\r\n // (header.IsCurrency && !io.Local)\r\n // },\r\n ThirdPartyCountryName: {\r\n empty:\r\n io.Local &&\r\n header.IsCurrency &&\r\n header.TransferType == IOTransferType.Transfer &&\r\n isThirdPartyAccount,\r\n },\r\n },\r\n };\r\n};\r\n\r\nexport default Withdrawal;\r\n","import React, { useContext, useEffect,useState } from \"react\";\r\nimport { Container, Row, Col, Input, CustomInput } from \"reactstrap\";\r\nimport { Dispatch } from \"../../store/store\";\r\nimport { onChangeHeader, onChange } from \"../../IO\";\r\nimport { LocalINTL, SimpleSuggest } from \"../../Fields\";\r\nimport { Field, Numeric, Combobox } from \"../../../Order/Field/Field\";\r\nimport { CurrencyAsset, IOTransferType } from \"../../../../IO/types\";\r\nimport { commissionSuffix } from \"../../../Order/Form/commons\";\r\nimport Account from \"../../Fields/Account\";\r\nimport Files from \"../../Fields/Files/Files\";\r\nimport Bulk from \"../Bulk/Bulk\";\r\nimport { updateAccountBanks, isEmpty } from \"../Default\";\r\nimport { processes } from \"../../../../../utils/Helper\";\r\n\r\nconst WithdrawalBulk = ({opsViewAccountName}) => {\r\n const { dispatch, services, state } = useContext(Dispatch);\r\n const { io, fields, entities, permissions } = state;\r\n const { errors, readonly } = fields;\r\n const { allowValues, allowCash } = permissions;\r\n const header = io.itemsHeader;\r\n const simpleItem = io.items;\r\n const [reasons, setReasons] = useState([]);\r\n\r\n \r\n useEffect(() => {\r\n //get reasons\r\n try {\r\n services.fetchGetReasons({ process: processes.WITHDRAW }).then((r) => {\r\n r ? setReasons(r.keyValues) : \"\";\r\n });\r\n } catch (e) {\r\n setReasons([]);\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (header.IsCurrency && !header.BankAccountIsThirdParty) {\r\n if (!isEmpty(header.AccountId)) {\r\n if (state.io.Status === \"Filled\") {\r\n dispatch({\r\n type: \"UPDATE_ACCOUNT_BANKS\",\r\n accountBanks: [\r\n {\r\n BankAccountHolders: header.BankAccountHolders,\r\n BankAccountId: header.BankAccountId,\r\n BankAccountItemId: header.BankAccountItemId,\r\n BankAccountName: header.BankAccountName,\r\n BankAccountNumber: header.BankAccountNumber,\r\n },\r\n ],\r\n });\r\n } else {\r\n services\r\n .fetchGetAccountBanks({\r\n accountId: header.AccountId,\r\n currencyId: 0,\r\n })\r\n .then((r) => r.response)\r\n .then((r) => {\r\n dispatch({\r\n type: \"UPDATE_ACCOUNT_BANKS\",\r\n accountBanks: r.accountBanks,\r\n });\r\n if (header.BankAccountItemId === null && r.accountBanks) {\r\n const item = r.accountBanks[0];\r\n onChangeHeader(dispatch, {\r\n ...item,\r\n });\r\n } else {\r\n const item = r.accountBanks.find((a) => a.BankAccountItemId === header.BankAccountItemId);\r\n onChangeHeader(dispatch, {\r\n ...item,\r\n });\r\n }\r\n });\r\n }\r\n } else {\r\n dispatch({ type: \"UPDATE_ACCOUNT_BANKS\", accountBanks: [] });\r\n onChangeHeader(dispatch, {\r\n BankAccountItemId: null,\r\n BankAccountName: null,\r\n });\r\n }\r\n }\r\n }, [header.AccountId]);\r\n\r\n const checkSettlementDate = (tradedate, AssetId) => {\r\n let settlementvalue = 1;\r\n let inchange = false;\r\n onChange(dispatch, { Date: tradedate });\r\n\r\n if (header.IsCurrency === false) {\r\n if (inchange) {\r\n // AssetId = values.AssetId;\r\n services.GetAssetSettlement({ AssetId }).then((r) => {\r\n executeSettlement(AssetId, r.DefaultSettlement, tradedate);\r\n });\r\n } else {\r\n //AssetId = simpleItem.AssetId;\r\n services.GetAssetSettlement({ AssetId }).then((r) => {\r\n executeSettlement(AssetId, r.DefaultSettlement, tradedate);\r\n });\r\n }\r\n } else {\r\n settlementvalue = 1;\r\n AssetId = 0;\r\n executeSettlement(AssetId, settlementvalue, tradedate);\r\n }\r\n };\r\n\r\n const executeSettlement = (Asset, settlementvalue, tradedate) => {\r\n const getdata = {\r\n tradedate: tradedate,\r\n assetId: Asset,\r\n ist0: false,\r\n settlement: settlementvalue,\r\n };\r\n services\r\n .GetIOSettlementDate(getdata)\r\n .then((r) => onChange(dispatch, { SettlementDate: r.settlementday }));\r\n };\r\n\r\n // XOR operator\r\n const readOnlyTypeSelector = allowValues ? !allowCash : allowCash;\r\n const accountEmpty = header.AccountId == null || header.AccountId == 0;\r\n\r\n return (\r\n \r\n \r\n {/* Left */}\r\n \r\n \r\n \r\n onChange(dispatch, v)}\r\n />\r\n \r\n \r\n \r\n onChangeHeader(dispatch, {\r\n IsCurrency: v == CurrencyAsset.Cash,\r\n })\r\n }\r\n value={header.IsCurrency ? CurrencyAsset.Cash : CurrencyAsset.Asset}\r\n items={Object.values(CurrencyAsset).map((key, index) => ({\r\n id: key,\r\n description: key,\r\n }))}\r\n />\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {/* Date */}\r\n \r\n checkSettlementDate(e.target.value, 0)}\r\n />\r\n \r\n\r\n {/* Settlement Date */}\r\n \r\n onChange(dispatch, { SettlementDate: e.target.value })}\r\n />\r\n \r\n \r\n {/* Right */}\r\n \r\n {/* ##### Account ###### */}\r\n onChangeHeader(dispatch, values)}\r\n readonly={{\r\n AccountNumber:readonly.header_AccountNumber,\r\n AccountName: readonly.header_AccountName,\r\n HolderName: readonly.header_HolderName,\r\n }}\r\n errors={{\r\n AccountNumber: errors.header_AccountNumber,\r\n AccountName: errors.header_AccountName,\r\n HolderName: errors.header_HolderName,\r\n }}\r\n services={{\r\n fetchAccountHolders: services.fetchAccountHolders,\r\n fetchSearchAccount: services.fetchSearchAccount,\r\n }}\r\n opsViewAccountName={opsViewAccountName}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {header.IsCurrency && io.Local && (\r\n \r\n \r\n onChangeHeader(dispatch, { TransferType: v })}\r\n emptyLabel={\"Type\"}\r\n />\r\n \r\n\r\n {/* ##### Bank Account ##### */}\r\n {header.TransferType === IOTransferType.Transfer && (\r\n \r\n
    \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountIsThirdParty: !header.BankAccountIsThirdParty,\r\n })\r\n }\r\n />\r\n
    \r\n {header.BankAccountIsThirdParty ? (\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountId: id,\r\n BankAccountName: name,\r\n })\r\n }\r\n />\r\n\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n \r\n ) : (\r\n \r\n ({\r\n id: a.BankAccountItemId,\r\n description: `${a.BankAccountName} - ${a.BankAccountNumber}`,\r\n }))}\r\n disabled={accountEmpty || readonly.header_Quantity}\r\n invalid={!!errors.header_BankAccountName}\r\n onChange={(id) =>\r\n onChangeHeader(\r\n dispatch,\r\n entities.accountBanks.find((a) => a.BankAccountItemId == id)\r\n )\r\n }\r\n emptyLabel={\"Bank Account\"}\r\n />\r\n \r\n )}\r\n
    \r\n )}\r\n\r\n {/* ##### Cheque ##### */}\r\n {header.TransferType === IOTransferType.Cheque && (\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountId: id,\r\n BankAccountName: name,\r\n })\r\n }\r\n />\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n ChequeNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n \r\n )}\r\n
    \r\n )}\r\n {/* ##### Commission ###### */}\r\n \r\n \r\n \r\n onChangeHeader(dispatch, { Commission: v })}\r\n invalid={!!errors.header_Commission}\r\n {...commissionSuffix(null)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n\r\n {/* ##### CommissionType ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, { CommissionType: v })}\r\n emptyLabel={\"Type\"}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n {reasons.length > 0 && (\r\n \r\n \r\n onChange(dispatch, { ReasonDescription: e.target.options[e.target.selectedIndex].text,\r\n ReasonId: +e.target.value })\r\n } >\r\n \r\n {reasons.map((reason) => (\r\n \r\n ))}\r\n \r\n \r\n )}\r\n\r\n \r\n
    \r\n\r\n {!io.Local && (\r\n \r\n \r\n \r\n {/* ##### Account ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountNumber: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n {/* ##### Bank ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n BankAccountName: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n\r\n {/* ##### Intermediary Bank ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n IntermediaryBank: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n invalid={!!errors.header_IntermediaryBank}\r\n />\r\n \r\n \r\n\r\n \r\n {/* ##### Country ###### */}\r\n {\r\n onChangeHeader(dispatch, {\r\n CountryId: id,\r\n CountryName: name,\r\n });\r\n }}\r\n />\r\n\r\n {/* ##### ABA/SWIFT ###### */}\r\n \r\n onChangeHeader(dispatch, { ABASWIFT: e.target.value })}\r\n disabled={readonly.header_Quantity}\r\n invalid={!!errors.header_ABASWIFT}\r\n />\r\n \r\n\r\n {/* ##### Intermediary ABA/SWIFT ###### */}\r\n \r\n \r\n onChangeHeader(dispatch, {\r\n IntermediaryABASwift: e.target.value,\r\n })\r\n }\r\n disabled={readonly.header_Quantity}\r\n />\r\n \r\n \r\n \r\n \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nexport default WithdrawalBulk;\r\n","import Default from './Default';\r\nimport Deposit from './Deposit/Deposit';\r\nimport DepositBulk from './Bulk/Bulk';\r\n\r\nexport {\r\n Default,\r\n Deposit,\r\n DepositBulk\r\n}","import React, { useEffect, useReducer, useRef } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Container, Row, Col, Input } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport { inOutReducer } from \"./store/reducer\";\r\nimport { defaultState, Dispatch, initialize } from \"./store/store\";\r\nimport { Default } from \"./Forms\";\r\nimport Footer from \"./Footer\";\r\nimport Precheck from \"./Precheck/Precheck\";\r\nimport style from \"./IO.module.scss\";\r\nimport { Mode } from \"../../../utils\";\r\nimport { formatIOforUpdate } from \"../../IO/utils\";\r\nimport { IOExecution } from \"../..\";\r\nimport { TransactionStatus, getIOProcessName } from \"../../IO/types\";\r\nimport { showToast } from \"../../../utils/Helper\";\r\n\r\nexport const onChange = (dispatch, fields) => dispatch({ type: \"CHANGE_IO_FIELDS\", fields });\r\n\r\nexport const onChangeItem = (dispatch, itemId, fields) => {\r\n dispatch({ type: \"CHANGE_IO_ITEM_FIELDS\", payload: { itemId, fields } });\r\n};\r\nexport const onChangeHeader = (dispatch, fields) =>\r\n dispatch({ type: \"CHANGE_IO_ITEMS_HEADER\", payload: { fields } });\r\n\r\nexport const onChangeMode = (dispatch, mode) => dispatch({ type: \"CHANGE_MODE\", mode });\r\n\r\nconst InOut = ({ open, toggle, toggleInfo, services, userType, opsViewAccountName, ...props }) => {\r\n const [state, dispatch] = useReducer(inOutReducer, defaultState(), initialize(props));\r\n const { ui, io, fields, precheck } = state;\r\n const { readonly } = fields;\r\n const executionRef = useRef();\r\n\r\n const confirm = () => {\r\n if (ui.mode === Mode.EXECUTE) {\r\n execute();\r\n } else {\r\n const updIO = formatIOforUpdate(io);\r\n let hasErrors = false;\r\n\r\n // authorizations\r\n const authorizations = precheck.authorizations.map((auth) => {\r\n if (auth.text == null || !auth.text.length) {\r\n hasErrors = true;\r\n return { ...auth, error: \"Required field\", readonly: undefined };\r\n }\r\n\r\n return { ...auth, error: null, readonly: undefined };\r\n });\r\n\r\n if (!hasErrors) {\r\n authorizations.forEach((a) => (a.readonly = true));\r\n }\r\n\r\n dispatch({ type: \"UPDATE_PRECHECK\", fields: { authorizations } });\r\n\r\n if (!hasErrors) {\r\n // check if all authorizations can be authorized by self\r\n const allSelfAuth = precheck.authorizations.every((a) => a.role.toLowerCase() === \"self\");\r\n\r\n // if allSefAuth = true then order will has ROUTED status\r\n if (!allSelfAuth) {\r\n updIO.Status = TransactionStatus.AUTH_WAIT;\r\n } else if (io.Status === TransactionStatus.PARKED) {\r\n updIO.Status = TransactionStatus.ROUTED;\r\n }\r\n\r\n dispatch({\r\n type: \"CHANGE_BUTTON_PROPS\",\r\n props: { confirm: { loading: true }, modify: { visible: false } },\r\n });\r\n\r\n services\r\n .fetchUpdateIO({\r\n k2btrnmode: io.Id ? \"UPD\" : \"INS\",\r\n io: updIO,\r\n })\r\n .then((r) => r.response)\r\n .then((r) => {\r\n if (r.result.Code != 200) {\r\n dispatch({\r\n type: \"CHANGE_BUTTON_PROPS\",\r\n props: { confirm: { loading: false }, modify: { visible: true } },\r\n });\r\n showToast(r.result.Description, true);\r\n } else {\r\n if (io.Id) {\r\n const ioAccountsUpd = [];\r\n\r\n ui.addedItems &&\r\n ui.addedItems.forEach((itemId) => {\r\n ioAccountsUpd.push({\r\n ...updIO.items.find((item) => item.Correlative == itemId),\r\n mode: \"INS\",\r\n });\r\n });\r\n\r\n ui.changedItems &&\r\n ui.changedItems.forEach((itemId) => {\r\n ioAccountsUpd.push({\r\n ...updIO.items.find((item) => item.Correlative == itemId),\r\n mode: \"UPD\",\r\n });\r\n });\r\n\r\n ui.deletedItems &&\r\n ui.deletedItems.forEach((item) => {\r\n ioAccountsUpd.push({\r\n ...item,\r\n Id: io.Id,\r\n mode: \"DLT\",\r\n });\r\n });\r\n\r\n if (ioAccountsUpd.length > 0) {\r\n services.fetchUpdateIOAccount({\r\n id: io.Id,\r\n ioaccounts: ioAccountsUpd,\r\n });\r\n }\r\n }\r\n\r\n const processName = getIOProcessName(updIO);\r\n // create authorizations\r\n new Promise((resolve) => {\r\n const authorizations = precheck.authorizations.map((authorization) => ({\r\n ...authorization,\r\n refid: r.id || io.Id,\r\n process: processName,\r\n }));\r\n services.fetchAuthorizationCreate({ authorizations }).then((resp) => resolve(resp.response));\r\n });\r\n if (userType == \"BackOffice\")\r\n deleteFiles(io.id || r.id);\r\n uploadFiles(io.Id || r.id);\r\n toggle();\r\n }\r\n });\r\n }\r\n }\r\n };\r\n\r\n const uploadFiles = (ioId) => {\r\n const newFiles = io.files.filter((f) => f.hasOwnProperty(\"data\"));\r\n if (newFiles.length > 0) {\r\n const filesFD = new FormData();\r\n\r\n newFiles.forEach((f, i) => {\r\n filesFD.append(`file${i + 1}`, f.data);\r\n });\r\n services\r\n .fetchUploadIOAttachments({\r\n id: ioId,\r\n ioType: io.IOType,\r\n files: filesFD,\r\n })\r\n .then(() => null);\r\n }\r\n };\r\n\r\n const deleteFiles = (ioId) => {\r\n if (io.removedItem) {\r\n const files = io.files.filter((f) => !f.hasOwnProperty(\"data\"));\r\n const fileIds = files.map(file => file.id);\r\n services.DeleteFileIO({\r\n id: ioId,\r\n fileId: fileIds,\r\n ioType: io.IOType,\r\n })\r\n }\r\n }\r\n\r\n const execute = () => {\r\n const hasErrors = executionRef.current.validate();\r\n\r\n if (!hasErrors) {\r\n dispatch({\r\n type: \"CHANGE_BUTTON_PROPS\",\r\n props: { confirm: { loading: true }, modify: { visible: false } },\r\n });\r\n\r\n const updIO = formatIOforUpdate(io);\r\n\r\n services\r\n .fetchUpdateIO({\r\n k2btrnmode: io.Id ? \"UPD\" : \"INS\",\r\n io: updIO,\r\n })\r\n .then((r) => {\r\n if(r.response.result&& r.response.result.Code !== 200) {\r\n dispatch({\r\n type: \"CHANGE_BUTTON_PROPS\",\r\n props: { confirm: { loading: false }, modify: { visible: true } },\r\n });\r\n showToast(r.response.result.Description, true);\r\n return;\r\n }\r\n services\r\n .fetchChangeIOStatus({\r\n id: io.Id,\r\n ioType: io.IOType,\r\n newStatus: TransactionStatus.FILLED,\r\n parameter: JSON.stringify(executionRef.current.getValues()),\r\n })\r\n .then((r2) => {\r\n toggle();\r\n if (r2.error !== \"\") {\r\n toggleInfo({ message: r2.error });\r\n }\r\n });\r\n })\r\n .catch((e) => {\r\n dispatch({\r\n type: \"CHANGE_BUTTON_PROPS\",\r\n props: { confirm: { loading: false }, modify: { visible: true } },\r\n });\r\n });\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n {ui.title}\r\n \r\n {/* Precheck */}\r\n {ui.mode === Mode.PRECHECK && (\r\n \r\n )}\r\n {/* Form */}\r\n {ui.mode !== Mode.PRECHECK && (\r\n \r\n \r\n \r\n \r\n \r\n onChange(dispatch, { Description: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n )}\r\n {(ui.mode === Mode.EXECUTE || io.Status === TransactionStatus.FILLED) && (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nInOut.propTypes = {\r\n services: PropTypes.object.isRequired,\r\n open: PropTypes.bool.isRequired,\r\n toggle: PropTypes.func.isRequired,\r\n toggleInfo: PropTypes.func,\r\n};\r\n\r\nexport default InOut;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"IO-module_modal_3qK6f\",\"body\":\"IO-module_body_3NBGI\",\"form\":\"IO-module_form_3REF2\"};","import React from \"react\";\r\nimport { Input } from \"reactstrap\";\r\nimport style from \"./Precheck.module.scss\";\r\nimport { Field } from \"../../Order/Field/Field\";\r\n\r\nconst Authorization = ({ authorization, changeMessage }) => {\r\n const { error, readonly } = authorization;\r\n\r\n return (\r\n
    \r\n

    {authorization.name}

    \r\n \r\n changeMessage(authorization.name, e.target.value)}\r\n />\r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default Authorization;\r\n","import React, { Component, Fragment } from \"react\";\r\nimport { Alert } from \"reactstrap\";\r\nimport Validation from \"./Validation\";\r\nimport style from \"./Precheck.module.scss\";\r\nimport Authorization from \"./Authorization\";\r\nimport { IOMode, IOType } from \"../../../IO/types\";\r\nimport CircularProgress from \"../../../CircularProgress/CircularProgress\";\r\nimport { formatIOforUpdate } from \"../../../IO/utils\";\r\nimport { Mode } from \"../../../../utils\";\r\n\r\nclass Precheck extends React.PureComponent {\r\n state = {\r\n validations: null,\r\n status: null,\r\n waitingCounter: null,\r\n };\r\n\r\n componentDidMount() {\r\n this._isMounted = true;\r\n const { io, services } = this.props;\r\n\r\n services.fetchRiskvalidations({ process: getProcess(io.IOType, io.IOMode) }).then((resp) => {\r\n if (this._isMounted) {\r\n this.setState({\r\n validations: resp.response.validations.reduce((obj, v) => {\r\n obj[v.ValidationProgram] = v;\r\n return obj;\r\n }, {}),\r\n });\r\n this.validateRules();\r\n }\r\n });\r\n }\r\n\r\n componentWillUnmount() {\r\n this._isMounted = false;\r\n }\r\n\r\n validateRules = () => {\r\n const { validations } = this.state;\r\n const { services } = this.props;\r\n\r\n this.setState({ waitingCounter: Object.keys(validations).length });\r\n\r\n Object.values(validations).forEach((validation) => {\r\n const service = validation.ValidationProgram;\r\n const { actions, io } = this.props;\r\n\r\n services\r\n .fetchValidationsCheckRule({\r\n service,\r\n io: formatIOforUpdate(io),\r\n validation,\r\n })\r\n .then((resp) => {\r\n const { result } = resp.response.validation;\r\n const { history } = resp.response;\r\n\r\n let status = \"success\";\r\n let title;\r\n\r\n if (result.Code !== 200) {\r\n if (validation.OverrridableByAuthorization !== \"0\") {\r\n title = result.Description != \"\" ? result.Description : null;\r\n this.checkIfCanBeAuthorized(validation, title);\r\n return;\r\n } else {\r\n status = \"failed\";\r\n title = result.Description != \"\" ? result.Description : null;\r\n }\r\n }\r\n\r\n this.updateValidationStatus(\r\n {\r\n ...validation,\r\n history,\r\n },\r\n status,\r\n title\r\n );\r\n });\r\n });\r\n };\r\n\r\n updateValidationStatus = (validation, vStatus, title) => {\r\n const { validations, waitingCounter, status } = this.state;\r\n const { dispatch } = this.props;\r\n\r\n let globalStatus = status == \"failed\" ? status : vStatus;\r\n\r\n // Si fue la ultima validacion y no fallo\r\n if (globalStatus != \"failed\" && waitingCounter == 1) {\r\n globalStatus = \"completed\";\r\n }\r\n\r\n const _validations = {\r\n ...validations,\r\n [validation.ValidationProgram]: {\r\n ...validations[validation.ValidationProgram],\r\n status: vStatus,\r\n history: validation.history,\r\n title,\r\n },\r\n };\r\n\r\n if (waitingCounter == 1) {\r\n dispatch({\r\n type: \"UPDATE_PRECHECK\",\r\n fields: {\r\n histories: Object.values(_validations)\r\n .filter((v) => v.history != undefined)\r\n .map((v) => v.history),\r\n\r\n validations: _validations,\r\n status: globalStatus,\r\n },\r\n });\r\n\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.CONFIRM });\r\n }\r\n this._isMounted &&\r\n this.setState({\r\n validations: _validations,\r\n status: globalStatus,\r\n waitingCounter: waitingCounter - 1,\r\n });\r\n };\r\n\r\n checkIfCanBeAuthorized = (validation, title) => {\r\n const { dispatch, io } = this.props;\r\n const { services } = this.props;\r\n\r\n const authorizationdefinitionid = validation.OverrridableByAuthorization;\r\n const authorizationDesc = title;\r\n services\r\n .fetchAuthorizeCheckIO({\r\n authorizationdefinitionid,\r\n io: formatIOforUpdate(io),\r\n authorizationDescription: authorizationDesc,\r\n })\r\n .then((resp) => {\r\n const authorization = resp.authorizationsdt;\r\n const { precheck } = this.props;\r\n\r\n let status = \"failed\";\r\n\r\n if (authorization.canbeauthorized) {\r\n status = \"authorization\";\r\n\r\n dispatch({\r\n type: \"UPDATE_PRECHECK\",\r\n fields: {\r\n authorizations: [\r\n ...precheck.authorizations,\r\n { name: validation.ValidationName, ...authorization },\r\n ],\r\n },\r\n });\r\n }\r\n\r\n this.updateValidationStatus(validation, status, title);\r\n });\r\n };\r\n\r\n updateAuthorizationMessage = (name, text) => {\r\n const { dispatch, precheck } = this.props;\r\n\r\n const authorizations = precheck.authorizations.map((auth) => {\r\n if (auth.name === name) {\r\n return {\r\n ...auth,\r\n text,\r\n error: undefined,\r\n readonly: undefined,\r\n };\r\n }\r\n return auth;\r\n });\r\n\r\n dispatch({ type: \"UPDATE_PRECHECK\", fields: { authorizations } });\r\n };\r\n\r\n render() {\r\n const { precheck } = this.props;\r\n const { validations, status, waitingCounter } = this.state;\r\n\r\n return (\r\n
    \r\n {validations == null ? (\r\n \r\n ) : (\r\n
    \r\n

    Validations

    \r\n {Object.values(validations).map((v, index) => (\r\n \r\n ))}\r\n
    \r\n )}\r\n\r\n {status != null ? (\r\n status == \"failed\" ? (\r\n \r\n ) : (\r\n precheck.authorizations.length > 0 &&\r\n waitingCounter == 0 && (\r\n \r\n

    Authorizations

    \r\n
    \r\n {precheck.authorizations.map((a, index) => (\r\n \r\n ))}\r\n
    \r\n
    \r\n )\r\n )\r\n ) : null}\r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst getProcess = (type, mode) => {\r\n switch (type) {\r\n case IOType.Deposit:\r\n if (mode == IOMode.MultipleAssets) {\r\n return \"BulkDeposit\";\r\n }\r\n return \"Deposit\";\r\n\r\n case IOType.Withdraw:\r\n if (mode == IOMode.MultipleAssets) {\r\n return \"BulkWidhdraw\";\r\n } else {\r\n return \"Withdraw\";\r\n }\r\n case IOType.Transfer:\r\n return \"Transfer\";\r\n }\r\n};\r\n\r\nconst NoPassConditions = () => (\r\n \r\n
    \r\n \r\n IO declined by system.\r\n \r\n
    \r\n);\r\n\r\nexport const LoadingMessage = ({ text, ...props }) => (\r\n
    \r\n \r\n {text}\r\n
    \r\n);\r\n\r\nexport default Precheck;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"precheck\":\"Precheck-module_precheck_1UhLg\",\"alert\":\"Precheck-module_alert_2c1gO\",\"details\":\"Precheck-module_details_3JnvE\",\"totals\":\"Precheck-module_totals_i6BsN\",\"earnings\":\"Precheck-module_earnings_1qVI1\",\"bold\":\"Precheck-module_bold_3-rT5\",\"loadingMessage\":\"Precheck-module_loadingMessage_Cc78e\",\"validations\":\"Precheck-module_validations_19MR8\",\"validation\":\"Precheck-module_validation_ip-bX\",\"authorizations\":\"Precheck-module_authorizations_3MUuN\",\"authorization\":\"Precheck-module_authorization_2W6kZ\",\"account\":\"Precheck-module_account_iIRqg\"};","import React, { Component } from \"react\";\r\nimport { Alert } from \"reactstrap\";\r\nimport style from \"./Precheck.module.scss\";\r\nimport CircularProgress from \"../../../CircularProgress/CircularProgress\";\r\n\r\nclass Validation extends Component {\r\n render() {\r\n const { validation } = this.props;\r\n\r\n return (\r\n
    \r\n
    \r\n

    {validation.ValidationName}

    \r\n\r\n {validation.status ? (\r\n \r\n {\" \"}\r\n \r\n \r\n ) : (\r\n \r\n )}\r\n
    \r\n {validation.title && (\r\n \r\n {validation.title.includes(\"\\\\r\\\\n\") ? (\r\n validation.title.split(\"\\\\r\\\\n\").map((name) => {\r\n return
    {name}
    ;\r\n })\r\n ) : validation.title.includes(\"\\r\\n\") ? (\r\n validation.title.split(\"\\r\\n\").map((name, index) => {\r\n return
    {name}
    ;\r\n })\r\n ) : (\r\n

    {validation.title}

    \r\n )}\r\n
    \r\n )}\r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst getAlertColor = (status) => {\r\n switch (status) {\r\n case \"success\":\r\n return \"success\";\r\n case \"failed\":\r\n return \"danger\";\r\n case \"authorization\":\r\n return \"warning\";\r\n }\r\n};\r\n\r\nconst getIconName = (status) => {\r\n switch (status) {\r\n case \"success\":\r\n return \"icon-check\";\r\n case \"failed\":\r\n return \"icon-close\";\r\n case \"authorization\":\r\n return \"icon-exclamation\";\r\n }\r\n};\r\n\r\nexport default Validation;\r\n","import { validations } from \"../Forms/Default\";\r\nimport { mergeDeep } from \"../../../../utils/Helper\";\r\nimport { Mode } from \"../../../../utils\";\r\nimport { IOMode, IOType } from \"../../../IO/types\";\r\n\r\nexport const inOutReducer = (state, action) => {\r\n switch (action.type) {\r\n case \"CHANGE_MODE\":\r\n switch (action.mode) {\r\n case Mode.EDIT:\r\n return processEdit(state);\r\n case Mode.PRECHECK:\r\n return processPrecheck(state);\r\n case Mode.CONFIRM:\r\n return processConfirm(state);\r\n default:\r\n return state;\r\n }\r\n case \"UPDATE_ACCOUNT_BANKS\":\r\n return processUpdateAccountBanks(state, action.accountBanks);\r\n case \"UPDATE_FILES\":\r\n return processUpdateFiles(state, action);\r\n case \"UPDATE_PRECHECK\":\r\n return updatePrecheck(state, action.fields);\r\n case \"EDIT_BULK_ITEM\":\r\n return processEditBulkItem(state, action.item);\r\n case \"DELETE_BULK_ITEM\":\r\n return processDeleteBulkItem(state, action.itemId);\r\n case \"CHANGE_IO_FIELDS\":\r\n return processChangeIOFields(state, action.fields);\r\n case \"CHANGE_IO_ITEMS_HEADER\":\r\n return processChangeIOItemsHeader(state, action.payload.fields);\r\n case \"CHANGE_IO_ITEM_FIELDS\":\r\n return processChangeIOItem(state, action.payload.itemId || 0, action.payload.fields);\r\n case \"CHANGE_BUTTON_PROPS\":\r\n return changeButtonProps(state, action);\r\n default:\r\n return state;\r\n }\r\n};\r\n\r\nfunction processUpdateAccountBanks(state, accountBanks) {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n entities: {\r\n accountBanks,\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction processUpdateFiles(state, action) {\r\n const { type, files, id } = action.props;\r\n if (type == \"Add\") {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n io: {\r\n files: [...state.io.files, ...files],\r\n },\r\n }\r\n );\r\n } else if (type == \"Delete\"){\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n io: {\r\n files: state.io.files.filter((f) => f.id != id),\r\n removedItem: true,\r\n },\r\n }\r\n );\r\n } else {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n io: {\r\n files: state.io.files.filter((f) => f.id != id),\r\n },\r\n }\r\n );\r\n }\r\n}\r\n\r\nfunction processChangeIOFields(state, fields) {\r\n const errors = Object.keys(fields).reduce((f, name) => {\r\n f[name] = undefined;\r\n return f;\r\n }, {});\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n io: {\r\n ...fields,\r\n },\r\n fields: {\r\n errors,\r\n },\r\n }\r\n );\r\n}\r\n\r\nconst updatePrecheck = (state, props) => {\r\n const newProps = {\r\n precheck: {\r\n ...props,\r\n },\r\n };\r\n\r\n return mergeDeep({ ...state }, { ...newProps });\r\n};\r\n\r\nfunction processChangeIOItemsHeader(state, fields) {\r\n const errors = Object.keys(fields).reduce((f, name) => {\r\n f[`header_${name}`] = undefined;\r\n return f;\r\n }, {});\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n io: {\r\n itemsHeader: {\r\n ...fields,\r\n },\r\n },\r\n fields: {\r\n errors,\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction processChangeIOItem(state, itemId, fields) {\r\n const { Id, IOMode: ioMode } = state.io;\r\n const errors = {};\r\n\r\n let changedItems = state.ui.changedItems || [];\r\n\r\n // require update errors\r\n if (ioMode == IOMode.Simple) {\r\n Object.keys(fields).forEach((f) => (errors[`simple_${f}`] = undefined));\r\n }\r\n\r\n const items = state.io.items.map((i) => {\r\n if (i.Id == itemId) {\r\n return {\r\n ...i,\r\n ...fields,\r\n };\r\n }\r\n return i;\r\n });\r\n\r\n if (ioMode == IOMode.Simple && Id != undefined) {\r\n changedItems = [\"1\"];\r\n }\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n changedItems,\r\n },\r\n io: {\r\n items,\r\n },\r\n fields: {\r\n errors,\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction processDeleteBulkItem(state, itemId) {\r\n let deletedItems = state.ui.deletedItems || [];\r\n const item = state.io.items.find((i) => i.Id == itemId);\r\n\r\n if (!item.isNew) {\r\n deletedItems.push(item);\r\n }\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n deletedItems,\r\n },\r\n io: {\r\n items: state.io.items.filter((i) => i.Id != itemId),\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction processEditBulkItem(state, item) {\r\n const { io } = state;\r\n let changedItems = state.ui.changedItems || [];\r\n let addedItems = state.ui.addedItems || [];\r\n\r\n const updatedItems = io.items.map((i) => {\r\n if (i.Id == item.Id) return item;\r\n\r\n return i;\r\n });\r\n\r\n if (item.Id == undefined) {\r\n item.isNew = true;\r\n item.Id = Math.random().toString(36).substring(9);\r\n item.Correlative = item.Id;\r\n addedItems.push(item.Id);\r\n updatedItems.push(item);\r\n } else if (!item.isNew) {\r\n changedItems.push(item.Id);\r\n }\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n changedItems,\r\n addedItems,\r\n },\r\n io: {\r\n items: updatedItems,\r\n },\r\n fields: {\r\n errors: {\r\n items: undefined,\r\n },\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction processEdit(state) {\r\n // remove readonly\r\n const readonly = {};\r\n\r\n Object.keys(state.fields.readonly).forEach((f) => (readonly[f] = false));\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n mode: Mode.EDIT,\r\n },\r\n buttons: {\r\n precheck: {\r\n visible: true,\r\n },\r\n modify: {\r\n visible: false,\r\n },\r\n confirm: {\r\n visible: false,\r\n loading: false,\r\n },\r\n },\r\n fields: {\r\n readonly,\r\n },\r\n precheck: {\r\n authorizations: [],\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction processPrecheck(state) {\r\n const errors = validateForm(state);\r\n\r\n if (errors == false) {\r\n const readonly = {};\r\n const { itemsHeader, ...others } = state.io;\r\n\r\n Object.keys(others).forEach((f) => {\r\n readonly[f] = true;\r\n });\r\n\r\n Object.keys(itemsHeader).forEach((f) => {\r\n readonly[`header_${f}`] = true;\r\n });\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n mode: Mode.PRECHECK,\r\n },\r\n buttons: {\r\n precheck: {\r\n loading: true,\r\n },\r\n },\r\n fields: {\r\n readonly,\r\n },\r\n }\r\n );\r\n } else {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n fields: {\r\n errors,\r\n },\r\n }\r\n );\r\n }\r\n}\r\n\r\nfunction processConfirm(state) {\r\n const { precheck } = state;\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n buttons: {\r\n precheck: {\r\n visible: false,\r\n loading: false,\r\n },\r\n modify: {\r\n visible: true,\r\n },\r\n confirm: {\r\n visible: precheck.status != \"failed\",\r\n loading: false,\r\n },\r\n },\r\n }\r\n );\r\n}\r\n\r\nfunction validateForm(state) {\r\n const { io, fields, userType } = state;\r\n const { subForm, simple, ...form } = validations(io, userType);\r\n const { readonly } = fields;\r\n\r\n const errors = {};\r\n\r\n Object.entries(form).forEach((entry) => {\r\n const [name, value] = entry;\r\n if (!readonly[name]) {\r\n if (value.empty) {\r\n if (io[name] == undefined || io[name] === \"\") {\r\n errors[name] = \"Required field\";\r\n } else if (value.autosuggestId && io[value.autosuggestId] == undefined) {\r\n errors[name] = \"Must select a value from list\";\r\n }\r\n }\r\n }\r\n });\r\n\r\n Object.entries(simple).forEach((entry) => {\r\n const [name, value] = entry;\r\n if (!readonly[`simple_${name}`]) {\r\n if (value.empty) {\r\n if (io.items[0][name] == undefined || io.items[0][name] === \"\") {\r\n errors[`simple_${name}`] = \"Required field\";\r\n } else if (value.autosuggestId && io.items[0][value.autosuggestId] == undefined) {\r\n errors[`simple_${name}`] = \"Must select a value from list\";\r\n }\r\n }\r\n if (name == \"Denominations\") {\r\n if (value.DenominationsSlots == false) {\r\n errors[\"simple_Denominations\"] =\r\n \"Must select \" + value.slots + \" denominations for the quantity selected\";\r\n }\r\n }\r\n }\r\n });\r\n\r\n Object.entries(subForm).forEach((entry) => {\r\n const [name, value] = entry;\r\n if (!readonly[name]) {\r\n if (value.empty) {\r\n if (io.itemsHeader[name] == undefined || io.itemsHeader[name] === \"\") {\r\n errors[`header_${name}`] = \"Required field\";\r\n } else if (value.autosuggestId && io.itemsHeader[value.autosuggestId] == undefined) {\r\n errors[`header_${name}`] = \"Must select a value from list\";\r\n }\r\n }\r\n }\r\n });\r\n\r\n if (io.IOMode == IOMode.MultipleAssets || io.IOType == IOType.Transfer) {\r\n if (io.items.length == 0) {\r\n errors.items = \"Require at least 1 item\";\r\n }\r\n\r\n delete errors.CurrencyISO;\r\n delete errors.AssetTicker;\r\n delete errors.Quantity;\r\n }\r\n\r\n // has Errors only add errors to state\r\n if (Object.keys(errors).length !== 0) {\r\n return errors;\r\n }\r\n\r\n return false;\r\n}\r\n\r\nfunction changeButtonProps(state, { props }) {\r\n return mergeDeep({ ...state }, { buttons: { ...props } });\r\n}\r\n\r\nexport function getTitle({ IOType, mode }, uiMode) {\r\n let title = `New `;\r\n\r\n if (uiMode == Mode.READONLY) {\r\n title = `View `;\r\n }\r\n\r\n if (mode == IOMode.MultipleAssets) {\r\n title += `Bulk `;\r\n }\r\n\r\n return `${title} ${IOType}`;\r\n}\r\n","import React from 'react';\r\nimport { getTitle } from './reducer';\r\nimport { mergeDeep } from '../../../../utils/Helper';\r\nimport { Mode } from '../../../../utils';\r\nimport { IOMode, IOType, IOTransferType } from '../../../IO/types';\r\n\r\nexport const Dispatch = React.createContext(null);\r\n\r\nfunction addDays(date, days) {\r\n\treturn new Date(date.setDate(date.getDate() + days));\r\n}\r\n\r\nexport const initialize = ({ mode, io: originalIO, permissions, userType }) => initialState => {\r\n\tconst state = mergeDeep(\r\n\t\t{ ...initialState },\r\n\t\t{\r\n\t\t\tui: {\r\n\t\t\t\tmode,\r\n\t\t\t\ttitle: getTitle(originalIO, mode),\r\n\t\t\t},\r\n\t\t\tio: { ...originalIO },\r\n\r\n\t\t},\r\n\t);\r\n\tstate.userType = userType;\r\n\t\r\n\tlet { io, fields, ui, buttons } = state;\r\n\r\n\t// when create deposit and withdrawal simples require initialized item:0\r\n\tif (io.IOMode == IOMode.Simple && io.IOType != IOType.Transfer && io.items.length == 0) {\r\n\t\tio.items.push({Id: 1})\r\n\t}\r\n\r\n\t// store items commons properties in itemsHeader\r\n\tio.itemsHeader = { ...io.itemsHeader, ...io.items[0] };\r\n\r\n\t// delete redundant properties\r\n\tdelete io.itemsHeader.Id;\r\n\tdelete io.itemsHeader.Correlative;\r\n\r\n\t// backoffice roles can only add cash, value or both\r\n\tif (permissions) {\r\n\t\tconst { allowCash, allowValues } = permissions;\r\n\t\tstate.permissions = { ...permissions };\r\n\r\n\t\t// mode new\r\n\t\tif (!state.io.Id) {\r\n\t\t\tif (allowCash == false) {\r\n\t\t\t\tio.itemsHeader.IsCurrency = false;\r\n\t\t\t}\r\n\r\n\t\t\tif (allowValues == false) {\r\n\t\t\t\tio.itemsHeader.IsCurrency = true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Mode.READONLY\r\n\tif (ui.mode === Mode.READONLY || ui.mode === Mode.EXECUTE) {\r\n\t\tObject.keys(io).forEach(key => {\r\n\t\t\tfields.readonly[`${key}`] = true;\r\n\t\t});\r\n\r\n\t\tObject.keys(io.items[0]).forEach(key => {\r\n\t\t\tfields.readonly[`header_${key}`] = true;\r\n\t\t});\r\n\r\n\t\tif (io.IOMode == IOMode.Simple && io.IOType != IOType.Transfer) {\r\n\t\t\tObject.keys(io.items[0]).forEach(key => {\r\n\t\t\t\tfields.readonly[`simple_${key}`] = true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfields.readonly.SettlementDate = ui.mode !== Mode.EXECUTE;\r\n\t\tbuttons.precheck.visible = false;\r\n\t\tbuttons.confirm.visible = ui.mode === Mode.EXECUTE;\r\n\t}\r\n\r\n\treturn {\r\n\t\t...state,\r\n\t\tui,\r\n\t\tio,\r\n\t\tfields,\r\n\t\tbuttons,\r\n\t};\r\n};\r\n\r\nexport const defaultState = () => ({\r\n\tui: {\r\n\t\ttitle: 'New deposit',\r\n\t\tmode: Mode.EDIT,\r\n\t},\r\n\tio: {\r\n\t\tLocal: true,\r\n\t\tIOMode: IOMode.Simple,\r\n\t\tDate: new Date().toDateLocal(),\r\n\t\tSettlementDate: addDays(new Date(), 1).toDateLocal(),\r\n\t\titemsHeader: {\r\n\t\t\tIsCurrency: true,\r\n\t\t\tTransferType: IOTransferType.Transfer,\r\n\t\t},\r\n\t\titems: [],\r\n\t\tfiles: [],\r\n\t\tReasonId: \"\",\r\n\t},\r\n\tfields: {\r\n\t\terrors: {},\r\n\t\treadonly: {},\r\n\t},\r\n\tbuttons: {\r\n\t\tconfirm: { visible: false },\r\n\t\tprecheck: { visible: true },\r\n\t\tmodify: { visible: false },\r\n\t},\r\n\tentities: {\r\n\t\taccountBanks: [],\r\n\t},\r\n\tprecheck: {\r\n\t\tauthorizations: [],\r\n\t},\r\n\tpermissions: {\r\n\t\tallowValues: true,\r\n\t\tallowCash: true,\r\n\t},\r\n});\r\n","import React, { useState, useImperativeHandle, forwardRef } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Button } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport classnames from \"classnames\";\r\nimport style from \"./IOExecution.module.scss\";\r\nimport InlineDetail from \"../../IO/InlineItem\";\r\nimport { IOMode, IOType } from \"../../IO/types\";\r\nimport Securities, { validateSecurities } from \"./Securities\";\r\n\r\nconst IOExecution = forwardRef(({ io, services, validate }, ref) => {\r\n const [items, setItems] = useState(io.items);\r\n const [errors, setErrors] = useState({});\r\n\r\n useImperativeHandle(ref, () => ({\r\n validate() {\r\n let hasErrors = false;\r\n\r\n if (io.IOType != IOType.Transfer) {\r\n const newErrors = validateSecurities(items);\r\n\r\n setErrors(newErrors);\r\n\r\n Object.values(newErrors).forEach((f) => {\r\n Object.keys(f).forEach((e) => {\r\n if (e != undefined) {\r\n hasErrors = true;\r\n }\r\n });\r\n });\r\n }\r\n\r\n return hasErrors;\r\n },\r\n getValues() {\r\n if (io.IOType != IOType.Transfer) {\r\n return items.map((item) => ({\r\n key: item.Id,\r\n value: item.CustodianId,\r\n }));\r\n }\r\n },\r\n }));\r\n\r\n const onChange = (id, values) => {\r\n setItems(\r\n items.map((item) => {\r\n if (item.Id === id) {\r\n return {\r\n ...item,\r\n ...values,\r\n };\r\n }\r\n return item;\r\n })\r\n );\r\n\r\n const cleanedErrors = {};\r\n Object.keys(values).forEach((key) => (cleanedErrors[key] = undefined));\r\n\r\n const newErrors = {\r\n [id]: {\r\n ...(errors[id] || {}),\r\n ...cleanedErrors,\r\n },\r\n };\r\n\r\n setErrors(newErrors);\r\n return newErrors;\r\n };\r\n\r\n return (\r\n
    \r\n {true && }\r\n
    \r\n );\r\n});\r\n\r\nexport default IOExecution;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"content\":\"IOExecution-module_content_1r9aA\",\"viewIO\":\"IOExecution-module_viewIO_1gvL0\",\"securities\":\"IOExecution-module_securities_3xJi-\"};","import React, { useState } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Button, Table } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport classnames from \"classnames\";\r\nimport style from \"./IOExecution.module.scss\";\r\nimport InlineDetail from \"../../IO/InlineItem\";\r\nimport { IOMode, IOType, TransactionStatus } from \"../../IO/types\";\r\nimport { SimpleSuggest } from \"../IO/Fields\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\n\r\nconst Securities = ({ io, items, errors, onChange, services }) => {\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n {io.IOType != IOType.Transfer && }\r\n \r\n \r\n \r\n {items.map((item) => (\r\n \r\n \r\n \r\n {io.IOType != IOType.Transfer && (\r\n \r\n )}\r\n \r\n ))}\r\n \r\n
    QuantitySecurityCustodian
    \r\n \r\n {item.IsCurrency ? item.CurrencyISO : item.AssetTicker}\r\n {\r\n onChange(item.Id, { CustodianId: id, CustodianName: name });\r\n }}\r\n />\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport function validateSecurities(items) {\r\n const errors = {};\r\n\r\n items.forEach((item) => {\r\n errors[item.Id] = {};\r\n\r\n if (item.CustodianId == undefined || item.CustodianId == 0) {\r\n errors[item.Id].CustodianId = \"Required field\";\r\n }\r\n });\r\n\r\n return errors;\r\n}\r\n\r\nexport default Securities;\r\n","import React from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter } from \"reactstrap\";\r\nimport style from \"./style.module.scss\";\r\nimport Invoice from \"../../CrossReference/Forms/Invoice\";\r\n\r\nconst ModalInvoice = ({ open, toggle, invoiceInfo }) => (\r\n \r\n View Invoice\r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default ModalInvoice;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"style-module_modal_2npNM\",\"body\":\"style-module_body_3-C4l\",\"status\":\"style-module_status_9cI4j\",\"lines\":\"style-module_lines_1OOtL\",\"line\":\"style-module_line_ZHBSm\",\"labelValue\":\"style-module_labelValue_2dlsV\",\"taxing\":\"style-module_taxing_1Iisb\",\"totals\":\"style-module_totals_F1-BN\",\"desk\":\"style-module_desk_2b_fV\",\"table\":\"style-module_table_3h99n\",\"actions\":\"style-module_actions_1pJxV\",\"dropdown\":\"style-module_dropdown_1wkoX\",\"icon\":\"style-module_icon_1uBCK\"};","import React, { useEffect, useState } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Input, Row, Col } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\n\r\nimport style from \"../Alert/Alert.module.scss\";\r\nimport Side from \"../Order/Field/Side\";\r\nimport { Field } from \"../Order/Field/Field\";\r\nimport { NumberFormatInput } from \"../../NumberFormatInput/NumberFormatInput\";\r\n\r\nconst ModalInstruction = ({ open, toggle, alert, user, ...props }) => {\r\n const [closing, setClosing] = useState(false);\r\n const [decimalAmount, setDecimalAmount] = useState(false);\r\n const instruction = JSON.parse(alert.refTag);\r\n\r\n const handleClose = () => {\r\n const eventIN = { ...alert };\r\n eventIN.status = \"Closed\";\r\n setClosing(true);\r\n props.fetchs.updateAlert({ eventIN }, () => {\r\n setClosing(false);\r\n toggle();\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n if (instruction) {\r\n fetchGetAssetInformation({ assetId: instruction.price })\r\n .then((response) => {\r\n setDecimalAmount(response.info.SubAssetClassDecimalPlaces);\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error fetching the Asset Class Information\", true);\r\n });\r\n }\r\n }, []);\r\n\r\n return (\r\n \r\n \r\n
    {alert.trigger.trim()}
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {user && user.role === \"Advisor\" && alert.status === \"WorkingAdvisor\" && (\r\n \r\n {closing ? \"Closing...\" : \"Close\"}\r\n \r\n )}\r\n \r\n
    \r\n );\r\n};\r\n\r\nModalInstruction.propTypes = {\r\n open: PropTypes.bool.isRequired,\r\n toggle: PropTypes.func.isRequired,\r\n fetchs: PropTypes.object.isRequired,\r\n alert: PropTypes.object.isRequired,\r\n user: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default ModalInstruction;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport style from \"./Note.module.scss\";\r\nimport {\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Container,\r\n Row,\r\n Col,\r\n Input,\r\n Button,\r\n Table,\r\n} from \"reactstrap\";\r\nimport { FormattedDate, FormattedTime } from \"react-intl\";\r\nimport { CircularProgress, OrderInlineDetail } from \"../..\";\r\nimport LaddaButton, { SLIDE_LEFT } from \"react-ladda\";\r\nimport { localDateTime } from \"../../../utils/Helper\";\r\n\r\nconst Note = ({\r\n open,\r\n order,\r\n orderId,\r\n onNoteRequest,\r\n onAddRequest,\r\n onRemoveRequest,\r\n closeModalNote,\r\n dispatch,\r\n}) => {\r\n const [note, setNote] = useState(\"\");\r\n const [notes, setNotes] = useState(null);\r\n const [loading, setLoading] = useState(true);\r\n\r\n const componentWillReceiveProps = (nextProps, nextState) => {\r\n const { orderId } = nextProps;\r\n\r\n if (orderId && !notes) {\r\n onNoteRequest({ orderId }).then((response) => {\r\n setLoading(false);\r\n setNotes(response.response.notes);\r\n });\r\n }\r\n };\r\n\r\n const toggle = () => {\r\n dispatch(closeModalNote());\r\n setLoading(true);\r\n setNotes(null);\r\n };\r\n\r\n const addNote = () => {\r\n onAddRequest({ orderId, note: { text: note } }).then((response) => {\r\n setNote(\"\");\r\n setNotes((prevNotes) => {\r\n return [...prevNotes, response.response.note];\r\n });\r\n });\r\n };\r\n\r\n const deleteNote = (noteDate) => {\r\n onRemoveRequest({ orderId, noteDate }).then((response) => {\r\n const filteredNotes = notes.filter((item) => item.createdAt !== noteDate);\r\n setNotes(filteredNotes);\r\n });\r\n };\r\n\r\n const onChangeNote = (e) => {\r\n setNote(e.target.value);\r\n };\r\n\r\n if (!open) {\r\n return null;\r\n }\r\n\r\n return (\r\n
    \r\n \r\n \r\n Order note\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n {\"Confirm\"}\r\n \r\n \r\n \r\n
    Notes
    \r\n {loading ? (\r\n \r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n )}\r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst NotesRows = (props) => {\r\n if (!props.notes.length) {\r\n return (\r\n \r\n \r\n
    No Notes
    \r\n \r\n \r\n );\r\n }\r\n\r\n return props.notes.map((note) => {\r\n return (\r\n \r\n \r\n {note.createdBy}\r\n \r\n \r\n \r\n {\" \"}\r\n \r\n \r\n
    \r\n

    {note.text}

    \r\n \r\n \r\n props.delete(note.createdAt)}\r\n className={style.iconDelete}\r\n color=\"danger\"\r\n size=\"sm\"\r\n >\r\n \r\n \r\n \r\n \r\n );\r\n });\r\n};\r\n\r\nexport default Note;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"subtitle\":\"Note-module_subtitle_1Gwt4\",\"tableNote\":\"Note-module_tableNote_1g4B8\",\"user\":\"Note-module_user_hz-wN\",\"detail\":\"Note-module_detail_389Zm\"};","import React, { Component } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport style from \"./Note.module.scss\";\r\nimport {\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Container,\r\n Row,\r\n Col,\r\n Input,\r\n Button,\r\n Table,\r\n} from \"reactstrap\";\r\nimport { FormattedDate, FormattedNumber, FormattedTime } from \"react-intl\";\r\nimport { CircularProgress, OrderInlineDetail } from \"../..\";\r\nimport LaddaButton, { SLIDE_LEFT } from \"react-ladda\";\r\nimport { localDateTime } from \"../../../utils/Helper\";\r\n\r\nclass OldNote extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n note: \"\",\r\n notes: null,\r\n loading: true,\r\n };\r\n }\r\n\r\n componentWillReceiveProps(nextProps, nextState) {\r\n const { orderId } = nextProps;\r\n\r\n if (orderId && !this.state.notes) {\r\n this.props.onNoteRequest({ orderId }).then((response) => {\r\n this.setState({\r\n loading: false,\r\n notes: response.response.notes,\r\n });\r\n });\r\n }\r\n }\r\n\r\n toggle = () => {\r\n this.props.onToggle();\r\n this.setState({ notes: null, loading: true });\r\n };\r\n\r\n addNote = () => {\r\n const { orderId } = this.props;\r\n\r\n this.props.onAddRequest({ orderId, note: { text: this.state.note } }).then((response) => {\r\n this.setState({\r\n note: \"\",\r\n notes: [response.response.note, ...this.state.notes],\r\n });\r\n });\r\n };\r\n\r\n deleteNote = (noteDate) => {\r\n const { orderId } = this.props;\r\n\r\n this.props.onRemoveRequest({ orderId, noteDate }).then((response) => {\r\n this.setState({\r\n notes: this.state.notes.filter((item) => item.createdAt !== noteDate),\r\n });\r\n });\r\n };\r\n\r\n render() {\r\n const { order } = this.props;\r\n const { loading } = this.state;\r\n\r\n if (!this.props.open) {\r\n return null;\r\n }\r\n\r\n return (\r\n
    \r\n \r\n \r\n Order note\r\n \r\n \r\n \r\n \r\n \r\n \r\n this.setState({ note: e.target.value })}\r\n />\r\n\r\n this.addNote()}\r\n data-style={SLIDE_LEFT}\r\n >\r\n {\"Confirm\"}\r\n \r\n \r\n \r\n
    Notes
    \r\n {this.state.loading ? (\r\n \r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n )}\r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst NotesRows = (props) => {\r\n if (!props.notes.length) {\r\n return (\r\n \r\n \r\n
    No Notes
    \r\n \r\n \r\n );\r\n }\r\n\r\n return props.notes.map((note) => {\r\n return (\r\n \r\n \r\n {note.createdBy}\r\n \r\n \r\n \r\n {\" \"}\r\n \r\n \r\n
    \r\n

    {note.text}

    \r\n \r\n \r\n props.delete(note.createdAt)}\r\n className={style.iconDelete}\r\n color=\"danger\"\r\n size=\"sm\"\r\n >\r\n \r\n \r\n \r\n \r\n );\r\n });\r\n};\r\n\r\nexport default OldNote;\r\n","import React, { Fragment, Component } from \"react\";\r\nimport { FormGroup, Row, Col } from \"reactstrap\";\r\nimport Autosuggest from \"../../../../Autosuggest/Autosuggest\";\r\nimport styleF from \"../Field.module.scss\";\r\nimport { CircularProgress } from \"../../../..\";\r\nimport Holders from \"./Holders\";\r\nimport Instruction from \"./Instruction\";\r\nimport { clientPrice, commissionSuffix } from \"../../../Order/Form/commons\";\r\nimport {\r\n OrderPriceType,\r\n getCommissionItems,\r\n ProductType,\r\n CommissionType as ComType,\r\n getBaseAndPriceCurrencies,\r\n} from \"../../../../../utils/Order/Order\";\r\nimport { Field, Numeric, Combobox, Switch } from \"../Field\";\r\nimport QuantityHelper from \"../../Helper/QuantityHelper\";\r\nimport EarningsHelper from \"../../Helper/EarningsHelper\";\r\nimport Balance from \"./Balance\";\r\nimport { UserType } from \"../../../../../utils/Helper\";\r\nimport { Dispatch as Context } from \"../../store/store\";\r\nimport { formattedNumber } from \"../../../../FormattedNumber/FormattedNumber\";\r\n\r\nclass Account extends Component {\r\n constructor(props) {\r\n super(props);\r\n const { account, balanceReady } = props;\r\n const { AccountId } = account;\r\n\r\n Account.contextType = Context;\r\n\r\n this.state = {\r\n loadingHolders: AccountId != null,\r\n loadingBalance: AccountId != null && balanceReady,\r\n holders: null,\r\n balance: null,\r\n instructions: null,\r\n sendingMail: false,\r\n };\r\n }\r\n\r\n componentWillMount() {\r\n const { account } = this.props;\r\n const { AccountId } = account;\r\n\r\n if (AccountId != null) {\r\n this.requestAccountInfo();\r\n this.requestAccountHolders({ accountId: AccountId });\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n this._isMounted = true;\r\n const { account } = this.props;\r\n const { AccountId, AccountName, AccountNumber, HolderId } = account;\r\n\r\n if (AccountId != null) {\r\n this.requestAccountInfo({}, false);\r\n this.requestAccountHolders({ accountId: AccountId });\r\n }\r\n\r\n // Cuando se ve una orden ya viene precargados los valores\r\n if (!isEmpty(AccountId) && isEmpty(HolderId)) {\r\n this.onChange(\"\", {\r\n id: AccountId,\r\n name: AccountName,\r\n number: AccountNumber,\r\n });\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n const { account, balanceReady } = this.props;\r\n const { AccountId } = account;\r\n\r\n // Caso especifico cuando se elige el ticker del selector\r\n if (balanceReady && !prevProps.balanceReady && AccountId) {\r\n this.requestAccountInfo({}, true);\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n this._isMounted = false;\r\n }\r\n\r\n onSuggestionsFetchRequested = ({ value }) =>\r\n this.props.searchAccount({ text: value }).then((response) =>\r\n response.response.accounts.map((a) => {\r\n const accountAttrs = JSON.parse(a.Value);\r\n\r\n return {\r\n id: a.Id,\r\n name: accountAttrs.value,\r\n number: accountAttrs.key,\r\n };\r\n })\r\n );\r\n\r\n onChangeAccountHolder = (value) => {\r\n const holderItem = getItemById(this.state.holders, value);\r\n\r\n let currentInstruction = -1;\r\n if (this.props.order.CurrentAccount) {\r\n currentInstruction = this.props.order.CurrentAccount.Instruction;\r\n if (holderItem.instructions.find((ins) => ins.id == currentInstruction) === undefined) {\r\n // If the current instruction is not available to the new holder,\r\n // select the first instruction available to the holder.\r\n currentInstruction = holderItem.instructions[0].id;\r\n }\r\n }\r\n\r\n this.setState({\r\n instructions: holderItem.instructions,\r\n });\r\n\r\n this.props.onChange({\r\n HolderId: holderItem.id,\r\n HolderName: holderItem.description,\r\n Instruction: currentInstruction,\r\n });\r\n };\r\n\r\n onChangeInstruction = (value) => {\r\n const instructionItem = getItemById(this.state.instructions, value);\r\n\r\n this.props.onChange({\r\n Instruction: instructionItem.id,\r\n });\r\n };\r\n\r\n requestAccountInfo = (body, updateOrderValues) => {\r\n if (this.props.balanceReady) {\r\n const assetTicker = this.props.order.AssetTicker;\r\n\r\n this.setState({ loadingBalance: true });\r\n\r\n this.props.accountInfo({ ...body }, updateOrderValues).then((response) => {\r\n const { balance, accountInfo } = response.response.accountorderdata;\r\n const { AccountAsksCustody, AccountType, AccountInBalanceType, AccountUseMarkUP } = accountInfo;\r\n\r\n const assetBalanceItem = balance.find((item) => item.key == assetTicker);\r\n const assetBalance = assetBalanceItem ? parseFloat(assetBalanceItem.value) : 0.0;\r\n\r\n let modsOnAccount = {\r\n AccountAsksCustody,\r\n AccountType,\r\n AccountInBalanceType,\r\n AccountAssetBalance: assetBalance,\r\n AccountUseMarkUP,\r\n };\r\n if (AccountAsksCustody) {\r\n modsOnAccount.RequiresSpecialCustody = true;\r\n }\r\n\r\n if (this._isMounted) {\r\n this.setState({\r\n balance,\r\n loadingBalance: false,\r\n });\r\n this.props.onChange(modsOnAccount);\r\n }\r\n });\r\n }\r\n };\r\n\r\n requestAccountHolders = ({ accountId }) => {\r\n this.props.accountHolders({ accountId }).then((response) => {\r\n const { holders } = response.response;\r\n\r\n const _holders = holders\r\n .filter((h) => h.HoldersOrderNO || h.HoldersOrderW || h.HoldersOrderV || h.HoldersOrderL)\r\n .map((h) => ({\r\n isMain: h.IsMain,\r\n description: h.PersonName,\r\n instructions: getInstructions(h),\r\n id: h.PersonId,\r\n }));\r\n\r\n let selectedHolder = _holders.find((h) => h.isMain) || (_holders.length ? _holders[0] : null);\r\n\r\n if (this.props.order.CurrentAccount && this.props.order.CurrentAccount.HolderId > 0) {\r\n selectedHolder = _holders.find((h) => h.id == this.props.order.CurrentAccount.HolderId);\r\n if (selectedHolder === undefined) {\r\n selectedHolder = null;\r\n }\r\n }\r\n\r\n this._isMounted &&\r\n this.setState(\r\n {\r\n holders: _holders,\r\n loadingHolders: false,\r\n instructions: selectedHolder && selectedHolder.instructions,\r\n },\r\n () => {\r\n const { account } = this.props;\r\n const { HolderId } = account;\r\n\r\n if (HolderId == null && selectedHolder) {\r\n const { id, description, instructions } = selectedHolder;\r\n\r\n const instruction = instructions && instructions.length ? instructions[0] : null;\r\n\r\n this.props.onChange({\r\n HolderId: id,\r\n HolderName: description,\r\n Instruction: instruction ? instruction.description : null,\r\n });\r\n }\r\n }\r\n );\r\n });\r\n };\r\n\r\n onChange = (method, value) => {\r\n let _value = defaultAccountValue;\r\n\r\n if (method != \"type\" && value.id) {\r\n _value = {\r\n AccountNumber: value.number,\r\n AccountName: value.name,\r\n AccountId: value.id,\r\n };\r\n\r\n this.requestAccountInfo(_value, true);\r\n this.requestAccountHolders({ accountId: value.id });\r\n this.setState({ holders: null, balance: null, loadingHolders: true });\r\n } else {\r\n this.setState({ holders: null, balance: null, instructions: null });\r\n _value.AccountName = value;\r\n }\r\n\r\n this.props.onChange(_value);\r\n };\r\n\r\n onSetAttachment = (file) => {\r\n const { dispatch, account } = this.props;\r\n const { AccountId } = account;\r\n dispatch({ type: \"SET_ATTACHMENT\", payload: { id: AccountId, file } });\r\n };\r\n\r\n onResendAuth = (orderId, accountId) => {\r\n this.setState({ sendingMail: true });\r\n this.props.resendAuth(orderId, accountId);\r\n setTimeout(() => {\r\n this.setState({ sendingMail: false });\r\n }, 1000);\r\n };\r\n\r\n render() {\r\n const {\r\n order,\r\n account,\r\n readonly,\r\n hiddens,\r\n errors,\r\n balanceReady,\r\n attachContent,\r\n downloadAttachment,\r\n orderPdf,\r\n attachmentDisabled,\r\n hasAttachment,\r\n onChange,\r\n userType,\r\n } = this.props;\r\n const {\r\n AccountId,\r\n AccountName,\r\n AccountNumber,\r\n AccountType,\r\n HolderId,\r\n HolderName,\r\n Quantity,\r\n AccountAsksCustody,\r\n RequiresSpecialCustody,\r\n AccountUseMarkUP,\r\n Markup,\r\n MarkupType,\r\n FXMarkup,\r\n FXMarkupType,\r\n Commission,\r\n CommissionType,\r\n CurrentInfoDate,\r\n } = order.CurrentAccount;\r\n const {\r\n OrderId,\r\n OrderSide,\r\n AssetClassForm,\r\n AssetPriceIsDiscounted,\r\n OrderCurrencySymbol,\r\n OrderSettlementCurrencySymbol,\r\n AssetCanBeSelfCustodied,\r\n OrderQuantityIsCash,\r\n SubAssetClassDecimalPlaces,\r\n OrderAllowsMarkup,\r\n } = order;\r\n const { state: contextState } = this.context;\r\n const { entities: contextEntities } = contextState;\r\n const { settlementCurrencies } = contextEntities;\r\n\r\n const { baseCurrency, priceCurrency } = getBaseAndPriceCurrencies(\r\n settlementCurrencies,\r\n OrderCurrencySymbol,\r\n OrderSettlementCurrencySymbol\r\n );\r\n\r\n let custodyHidden = false;\r\n let markupHidden = false;\r\n let FXMarkupHidden = false;\r\n let commissionHidden = false;\r\n let custodyReadonly = false;\r\n if (\r\n (!AccountType && userType === UserType.Trader) ||\r\n (AccountType && AccountType.toLowerCase() !== \"customer\")\r\n ) {\r\n custodyHidden = true;\r\n markupHidden = true;\r\n FXMarkupHidden = true;\r\n commissionHidden = true;\r\n } else {\r\n switch (AssetClassForm) {\r\n case ProductType.FOREX:\r\n markupHidden = true;\r\n FXMarkupHidden = true;\r\n commissionHidden = true;\r\n break;\r\n case ProductType.MMARKET:\r\n FXMarkupHidden = true;\r\n break;\r\n default:\r\n break;\r\n }\r\n if (!OrderSettlementCurrencySymbol || OrderCurrencySymbol == OrderSettlementCurrencySymbol) {\r\n FXMarkupHidden = true;\r\n }\r\n if (OrderSide == \"Buy\" && AssetCanBeSelfCustodied) {\r\n custodyHidden = false;\r\n if (AccountAsksCustody) {\r\n custodyReadonly = true;\r\n }\r\n } else {\r\n custodyHidden = true;\r\n }\r\n }\r\n\r\n if ((OrderId && OrderAllowsMarkup === false) || AccountUseMarkUP === false) {\r\n markupHidden = true;\r\n FXMarkupHidden = true;\r\n }\r\n\r\n const modHiddens = {\r\n ...hiddens,\r\n RequiresSpecialCustody: custodyHidden,\r\n Markup: markupHidden,\r\n MarkupType: markupHidden,\r\n FXMarkup: FXMarkupHidden,\r\n FXMarkupType: FXMarkupHidden,\r\n Commission: commissionHidden,\r\n CommissionType: commissionHidden,\r\n };\r\n\r\n const currentDay = account.Day\r\n ? account.Day.find((day) => day.Date == CurrentInfoDate)\r\n : {\r\n AssignedQty: 0,\r\n ExecutionsAvgPrice: 0,\r\n ExecutionsAvgFX: 0,\r\n Status: \"New\",\r\n };\r\n\r\n const currentDayIsReadOnly = currentDay.Status == \"Booked\";\r\n\r\n const isExistingAccount = order.Accounts\r\n ? !!order.Accounts.find((acc) => acc.index === account.index)\r\n : false;\r\n\r\n let modReadonly = {\r\n ...readonly,\r\n RequiresSpecialCustody: readonly.RequiresSpecialCustody || custodyReadonly,\r\n Markup: readonly.Markup || currentDayIsReadOnly,\r\n MarkupType: readonly.MarkupType || currentDayIsReadOnly,\r\n FXMarkup: readonly.FXMarkup || currentDayIsReadOnly,\r\n FXMarkupType: readonly.FXMarkupType || currentDayIsReadOnly,\r\n Commission: readonly.Commission || currentDayIsReadOnly,\r\n CommissionType: readonly.CommissionType || currentDayIsReadOnly,\r\n AccountName: readonly.AccountName || isExistingAccount,\r\n };\r\n\r\n const userIsOwner =\r\n !AccountType ||\r\n AccountType == \"\" ||\r\n (userType == UserType.Trader && AccountType != \"Customer\") ||\r\n (userType == UserType.Advisor && AccountType == \"Customer\");\r\n\r\n if (!userIsOwner) {\r\n Object.keys(order.CurrentAccount).forEach((key) => {\r\n modReadonly[key] = true;\r\n });\r\n }\r\n\r\n let canResend = false;\r\n if (order.canResendAuthorizations) {\r\n if (account.Instruction === \"ViaLink\") {\r\n canResend = true;\r\n }\r\n }\r\n\r\n const hideHolders =\r\n (userType == UserType.Trader && AccountType != \"Customer\") ||\r\n (this.state.holders !== null && this.state.holders.length == 0);\r\n\r\n let quantities = [];\r\n let quantityTitle = Quantity;\r\n let markupTitle = {`Mark ${order.OrderSide == \"Buy\" ? \"Up\" : \"Down\"}`};\r\n let FXMarkupTitle = {`FX Mark ${order.OrderSide == \"Buy\" ? \"Up\" : \"Down\"}`};\r\n let commissionTitle = Commission;\r\n let isPartiallyBooked = false;\r\n if (account.Day) {\r\n quantities = account.Day.map((day) => {\r\n if (day.Status == \"Booked\") {\r\n // If account is booked at least for one day, then:\r\n // - We can't change the account.\r\n isPartiallyBooked = true;\r\n }\r\n return {\r\n date: day.Date,\r\n status: day.Status,\r\n quantity: parseFloat(day.AssignedQty),\r\n markup: parseFloat(day.Markup),\r\n markupType: day.MarkupType == ComType.FaceValueCash ? \"$ Cash\" : \"% Principal\",\r\n FXMarkup: parseFloat(day.FXMarkup),\r\n FXMarkupType: day.FXMarkupType == ComType.FaceValueCash ? \"$ Cash\" : \"% Principal\",\r\n commission: parseFloat(day.Commission),\r\n commissionType: day.CommissionType == ComType.FaceValueCash ? \"$ Cash\" : \"% Principal\",\r\n };\r\n });\r\n }\r\n quantityTitle = (\r\n \r\n Quantity\r\n {quantities.length > 0 && OrderId > 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n markupTitle = (\r\n \r\n {`Mark ${order.OrderSide == \"Buy\" ? \"Up\" : \"Down\"}`}\r\n {quantities.length > 0 && OrderId > 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n FXMarkupTitle = (\r\n \r\n {`FX Mark ${order.OrderSide == \"Buy\" ? \"Up\" : \"Down\"}`}\r\n {quantities.length > 0 && OrderId > 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n commissionTitle = (\r\n \r\n Commission\r\n {quantities.length > 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n\r\n if (isPartiallyBooked) {\r\n modReadonly = {\r\n ...modReadonly,\r\n AccountName: true,\r\n HolderName: true,\r\n Instruction: true,\r\n RequiresSpecialCustody: true,\r\n Quantity: true,\r\n };\r\n }\r\n\r\n const inputProps = {\r\n placeholder: \"Account\",\r\n disabled: modReadonly.AccountName,\r\n invalid: !!errors.AccountName,\r\n };\r\n\r\n const hasDifferentCurrencies = OrderCurrencySymbol !== OrderSettlementCurrencySymbol;\r\n\r\n const earningsTitle = `Values for ${CurrentInfoDate} (Q: ${formattedNumber(\r\n currentDay.AssignedQty,\r\n \"quantity\"\r\n )}; P: ${formattedNumber(currentDay.ExecutionsAvgPrice, \"price\")}${\r\n hasDifferentCurrencies\r\n ? `; FX [${baseCurrency}/${priceCurrency}]: ${formattedNumber(\r\n currentDay.ExecutionsAvgFX,\r\n \"currency\"\r\n )}`\r\n : \"\"\r\n }):`;\r\n\r\n let defaultMaxDecimals = 2;\r\n switch (order.AssetClassForm) {\r\n case ProductType.BOND:\r\n case ProductType.EQUITY:\r\n case ProductType.OPTION:\r\n defaultMaxDecimals = 0;\r\n break;\r\n case ProductType.MFUNDS:\r\n case ProductType.MMARKET:\r\n defaultMaxDecimals = 5;\r\n break;\r\n case ProductType.FOREX:\r\n defaultMaxDecimals = 2;\r\n break;\r\n default:\r\n defaultMaxDecimals = 2;\r\n }\r\n\r\n const quantityMaxDecimals = OrderQuantityIsCash ? 2 : SubAssetClassDecimalPlaces || defaultMaxDecimals;\r\n\r\n const showClientPrice =\r\n [OrderPriceType.LIMIT, OrderPriceType.STOPLIMIT].includes(order.OrderType) ||\r\n currentDay.ExecutionsAvgPrice != 0;\r\n const showClientFX = hasDifferentCurrencies && currentDay.ExecutionsAvgFX != 0;\r\n\r\n const originalPrice =\r\n currentDay.ExecutionsAvgPrice != 0 ? currentDay.ExecutionsAvgPrice : order.OrderPrice;\r\n\r\n const originalFX = currentDay.ExecutionsAvgFX;\r\n\r\n return (\r\n
    \r\n {/* ##### Quantity ###### */}\r\n {!modHiddens.Quantity && (\r\n \r\n onChange({ Quantity: v })}\r\n invalid={!!errors.Quantity}\r\n dataTypeDecimalName=\"quantity\"\r\n />\r\n \r\n )}\r\n\r\n {/* ##### Account ###### */}\r\n \r\n \r\n \r\n \r\n \r\n\r\n {this.state.loadingHolders ? (\r\n \r\n ) : (\r\n
    \r\n {!hideHolders && (\r\n \r\n \r\n \r\n )}\r\n {this.state.loadingBalance ? (\r\n \r\n ) : (\r\n balanceReady && this.state.balance != null && \r\n )}\r\n {!hideHolders && (\r\n \r\n )}\r\n
    \r\n )}\r\n {/* ##### Custody ###### */}\r\n {!modHiddens.RequiresSpecialCustody && (\r\n \r\n onChange({ RequiresSpecialCustody: v })}\r\n />\r\n \r\n )}\r\n\r\n {!(modHiddens.Markup && modHiddens.FXMarkup && modHiddens.Commission) && OrderId > 0 && (\r\n
    \r\n {earningsTitle}\r\n
    \r\n )}\r\n\r\n {!modHiddens.Markup && (\r\n \r\n \r\n {/* ##### Mark up/down ###### */}\r\n \r\n \r\n onChange({ Markup: v })}\r\n invalid={!!errors.Markup}\r\n {...commissionSuffix(MarkupType, order.OrderCurrencySymbol)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n\r\n {/* ##### Mark type ###### */}\r\n \r\n \r\n onChange({ MarkupType: v })}\r\n emptyLabel={\"Type\"}\r\n invalid={!!errors.MarkupType}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n \r\n\r\n {/* ##### Client Price ###### */}\r\n {showClientPrice && (\r\n \r\n null}\r\n disabled\r\n dataTypeDecimalName=\"price\"\r\n />\r\n \r\n )}\r\n\r\n {/* #### FX Mark up/down #### */}\r\n {!modHiddens.FXMarkup && readonly.FXMarkupAllowed && (\r\n \r\n \r\n \r\n onChange({ FXMarkup: v })}\r\n invalid={!!errors.FXMarkup}\r\n {...commissionSuffix(FXMarkupType, `${baseCurrency}/${priceCurrency}`)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n\r\n {/* ##### FX Mark type ###### */}\r\n \r\n \r\n onChange({ FXMarkupType: v })}\r\n emptyLabel={\"Type\"}\r\n invalid={!!errors.FXMarkupType}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n \r\n )}\r\n\r\n {/* ##### Client Price ###### */}\r\n {showClientFX && (\r\n \r\n null}\r\n disabled\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n )}\r\n \r\n )}\r\n {!modHiddens.Commission && (\r\n \r\n {/* ##### Commission ###### */}\r\n \r\n \r\n onChange({ Commission: v })}\r\n invalid={!!errors.Commission}\r\n {...commissionSuffix(CommissionType, order.OrderSettlementCurrencySymbol)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n\r\n {/* ##### CommissionType ###### */}\r\n \r\n \r\n onChange({ CommissionType: v })}\r\n emptyLabel={\"Type\"}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n \r\n )}\r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst defaultAccountValue = {\r\n AccountId: null,\r\n AccountName: \"\",\r\n HolderId: null,\r\n HolderName: null,\r\n Instruction: null,\r\n};\r\n\r\nconst renderSuggestion = (suggestion) => (\r\n
    \r\n {suggestion.number}\r\n {\" - \"}\r\n {suggestion.name}\r\n
    \r\n);\r\n\r\nconst getSuggestionValue = (suggestion) => `${suggestion.number} - ${suggestion.name}`;\r\n\r\nconst getInstructions = (holder) => {\r\n const instructions = [];\r\n if (holder.HoldersOrderNO) instructions.push({ id: \"Managed\", description: \"Managed\" });\r\n else {\r\n if (holder.HoldersOrderW) instructions.push({ id: \"Written\", description: \"Written\" });\r\n if (holder.HoldersOrderV) instructions.push({ id: \"Web\", description: \"Web\" });\r\n if (holder.HoldersOrderL) instructions.push({ id: \"ViaLink\", description: \"Via Link\" });\r\n }\r\n\r\n return instructions;\r\n};\r\n\r\nconst getItemById = (items, id) => items.find((e) => e.id === id);\r\n\r\nconst isEmpty = (value) => value === undefined || value === \"\";\r\n\r\nexport default Account;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"balance\":\"Account-module_balance_1IgMa\",\"title\":\"Account-module_title_2XZNk\",\"item\":\"Account-module_item_2Fado\",\"requeriments\":\"Account-module_requeriments_P9gcA\",\"line\":\"Account-module_line_2eNhp\",\"inputFile\":\"Account-module_inputFile_3a31u\",\"pdf\":\"Account-module_pdf_2-_2j\",\"upload\":\"Account-module_upload_3DAps\",\"pencil\":\"Account-module_pencil_4KTVV\",\"pending\":\"Account-module_pending_3pTM5\",\"fadein\":\"Account-module_fadein_LZa9y\"};","import React from \"react\";\r\nimport style from \"./Account.module.scss\";\r\nimport { FormattedNumber } from \"../../../../FormattedNumber/FormattedNumber\";\r\n\r\nconst Balance = ({ balance }) => {\r\n return (\r\n
    \r\n {balance.map(\r\n (item, index) =>\r\n item.key !== \"\" && (\r\n
    \r\n {item.key}\r\n \r\n
    \r\n )\r\n )}\r\n
    \r\n );\r\n};\r\n\r\nexport default Balance;\r\n","import React from 'react';\r\nimport Combobox from \"../Combobox\";\r\n\r\nconst Holders = (props) => {\r\n\r\n const items = () => {\r\n if (props.items == null) {\r\n return [{\r\n id: props.value,\r\n description: props.name\r\n }]\r\n }\r\n\r\n return props.items;\r\n }\r\n\r\n const isDisabled = props.disabled || !props.items;\r\n\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport default Holders;","import React, { useState } from \"react\";\r\nimport { Button, Row, Col, Tooltip } from \"reactstrap\";\r\nimport Combobox from \"../Combobox\";\r\nimport { Field } from \"../Field\";\r\nimport Requeriments from \"./Requeriments\";\r\nimport { UserType } from \"../../../../../utils/Helper\";\r\nimport CircularProgress from \"../../../../CircularProgress/CircularProgress\";\r\n\r\nconst Instruction = (props) => {\r\n const [tooltipOpen, setTooltipOpen] = useState(false);\r\n\r\n const toggleTooltip = () => setTooltipOpen(!tooltipOpen);\r\n\r\n const items = (() => {\r\n if (props.items == null || props.items.length == 0) {\r\n if (props.value != null) {\r\n return [\r\n {\r\n id: props.value,\r\n description: props.value,\r\n },\r\n ];\r\n }\r\n return [];\r\n }\r\n\r\n return props.items;\r\n })();\r\n\r\n const value = props.items != null ? props.value : items.length ? props.value : -1;\r\n\r\n const { error } = props;\r\n const {\r\n setAttachment,\r\n downloadAttachment,\r\n hasAttachment,\r\n attachmentDisabled,\r\n onResendAuth,\r\n orderPdf,\r\n orderId,\r\n accountId,\r\n onChangeOrder,\r\n userType,\r\n canResend,\r\n sendingMail,\r\n hasFile,\r\n ...restProps\r\n } = props;\r\n\r\n const setUploaded = (props) => {\r\n if (props.hasAttachment && props.hasAttachment.uploadPending) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {canResend && (\r\n \r\n {sendingMail ? (\r\n \r\n ) : (\r\n \r\n onResendAuth(orderId, accountId)}\r\n >\r\n \r\n \r\n \r\n Resend Authorization Mail\r\n \r\n \r\n )}\r\n \r\n )}\r\n \r\n {(!attachmentDisabled || userType === UserType.MiddleOffice) && value == \"Written\" && (\r\n onChangeOrder({ ...e, Instruction: restProps.value })}\r\n readonly={props.disabled && !userType === UserType.MiddleOffice}\r\n hasAttachment={hasAttachment}\r\n hasFile={hasFile}\r\n accountId={accountId}\r\n />\r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default Instruction;\r\n","import React, { Component } from \"react\";\r\nimport { Badge, Modal, ModalHeader, ModalBody, ModalFooter, Button, Input } from \"reactstrap\";\r\nimport style from \"./Account.module.scss\";\r\n\r\nclass Requeriments extends Component {\r\n constructor(props) {\r\n super(props);\r\n if (props.hasFile) {\r\n this.state = {\r\n open: false,\r\n text: \"\",\r\n uploaded: true,\r\n };\r\n } else {\r\n this.state = {\r\n open: false,\r\n text: \"\",\r\n uploaded: false,\r\n };\r\n }\r\n }\r\n\r\n toggle = (save) => {\r\n if (save) {\r\n this.handleFileUpload(this.state.text);\r\n }\r\n\r\n this.setState({ open: !this.state.open, text: \"\" });\r\n };\r\n\r\n resetState = () => {\r\n const { setAttachment, onChangeOrder } = this.props;\r\n setAttachment({\r\n file: null,\r\n });\r\n onChangeOrder({\r\n AttachmentFileName: undefined,\r\n AttachmentFileType: undefined,\r\n HasFileUploadPending: undefined,\r\n AttachmentFileUploadPending: undefined,\r\n });\r\n this.setState({ open: false, text: \"\", uploaded: false });\r\n };\r\n\r\n onChangeText = (text) => {\r\n this.setState({ text });\r\n };\r\n\r\n handleFileUpload = (event) => {\r\n const { setAttachment, onChangeOrder } = this.props;\r\n\r\n if (typeof event == \"string\") {\r\n setAttachment({\r\n file: new Blob([event], { type: \"plain/text\", endings: \"native\" }),\r\n });\r\n } else {\r\n setAttachment({ file: event.target.files[0] });\r\n }\r\n\r\n onChangeOrder({\r\n AttachmentFileName: Math.random().toString(36).substring(9),\r\n AttachmentFileType: \"none\",\r\n });\r\n\r\n this.setState({ uploaded: true });\r\n };\r\n\r\n render() {\r\n const { orderId, accountId, orderPdf, readonly, hasAttachment, downloadAttachment } = this.props;\r\n const { open, text, uploaded } = this.state;\r\n\r\n const attachmentInServer = hasAttachment && !hasAttachment.hasOwnProperty(\"uploadPending\");\r\n\r\n return (\r\n
    \r\n {orderId && (\r\n
    \r\n Download order as pdf\r\n orderPdf({ orderId })}\r\n >\r\n \r\n \r\n
    \r\n )}\r\n\r\n
    \r\n Attachment\r\n\r\n {!readonly && !this.state.uploaded && (\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {!readonly && !this.state.uploaded && (\r\n this.toggle()}\r\n >\r\n \r\n \r\n )}\r\n {!readonly && this.state.uploaded && (\r\n this.resetState()}\r\n >\r\n \r\n \r\n )}\r\n\r\n {!attachmentInServer && (\r\n \r\n {uploaded || (hasAttachment && hasAttachment.uploadPending) ? \"Uploaded\" : \"Pending\"}\r\n \r\n )}\r\n {attachmentInServer && (\r\n \r\n )}\r\n
    \r\n\r\n this.toggle(e)} open={open} text={text} onChangeText={this.onChangeText} />\r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst ModalText = ({ toggle, open, text, onChangeText }) => (\r\n \r\n toggle()}>Attachment\r\n \r\n onChangeText(e.target.value)}\r\n />\r\n \r\n \r\n {\" \"}\r\n \r\n \r\n \r\n);\r\n\r\nexport default Requeriments;\r\n","import React from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport { Input } from \"reactstrap\";\r\nimport style from \"./Field.module.scss\";\r\nimport { CounterPartySimpleReducer } from \"../../CounterPartySet/reducer\";\r\n\r\nconst Combobox = ({ value, items, emptyLabel, onChange, disabled, darken, ...restProps }) => (\r\n onChange(e.target.value)}\r\n disabled={disabled || !items}\r\n {...restProps}\r\n >\r\n {(value == undefined || value == -1) && (\r\n \r\n )}\r\n {(items || []).find((ins) => ins.id == value) === undefined && (\r\n \r\n )}\r\n {(items || []).map((value, index) => (\r\n \r\n ))}\r\n \r\n);\r\n\r\nconst darkenStyle = {\r\n background: \"#607d8b\",\r\n color: \"#fff\",\r\n fontWeight: 500,\r\n};\r\n\r\nexport default React.memo(Combobox);\r\n","import React from \"react\";\r\nimport { FormGroup, Label } from \"reactstrap\";\r\nimport styles from \"./Field.module.scss\";\r\nimport Symbol from \"./Symbol/Symbol\";\r\nimport Account from \"./Account/Account\";\r\nimport Numeric from \"./Numeric\";\r\nimport Combobox from \"./Combobox\";\r\nimport Switch from \"./Switch\";\r\nimport TimeForce from \"./TimeForce\";\r\nimport PriceType from \"./PriceType\";\r\nimport FormSelector from \"./FormSelector\";\r\nimport Side from \"./Side\";\r\n\r\nexport const Field = ({ children, label, error, description, style = {}, noLabel }) => (\r\n \r\n {!noLabel && }\r\n {children}\r\n
    \r\n {error}\r\n
    \r\n {!error && description && (\r\n
    \r\n {description}\r\n
    \r\n )}\r\n
    \r\n);\r\n\r\nexport { Symbol, Account, Numeric, Combobox, Switch, TimeForce, PriceType, FormSelector, Side };\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"side\":\"Field-module_side_2ozCr\",\"readonly\":\"Field-module_readonly_38XZ1\",\"buy\":\"Field-module_buy_5JTpg\",\"sell\":\"Field-module_sell_O42Fb\",\"buySell\":\"Field-module_buySell_2MONM\",\"off\":\"Field-module_off_2Jef1\",\"buySellOpenClose\":\"Field-module_buySellOpenClose_26RkB\",\"itemBuy\":\"Field-module_itemBuy_enzqg\",\"itemSell\":\"Field-module_itemSell_2_Dh2\",\"suggestionItem\":\"Field-module_suggestionItem_3yGeE\",\"switch\":\"Field-module_switch_3ObB7\",\"label\":\"Field-module_label_1mv9t\",\"field\":\"Field-module_field_1r3ks\",\"select\":\"Field-module_select_1Ln_h\"};","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Col } from 'reactstrap';\r\nimport Combobox from './Combobox';\r\n\r\nconst FormSelector = ({readonly, ...restProps}) => (\r\n \r\n \r\n \r\n)\r\n\r\nFormSelector.propTypes = {\r\n readonly: PropTypes.bool\r\n}\r\n\r\nexport default FormSelector;","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Input } from 'reactstrap';\r\nimport { NumberFormatInput } from '../../../NumberFormatInput/NumberFormatInput';\r\n\r\nconst Numeric = ({value, onChange, dataTypeDecimalName, decimalScale, ...restProps}) => (\r\n \tonChange(isNaN(e.floatValue) ? e.value : e.floatValue)}\r\n decimalScale={decimalScale}\r\n dataTypeDecimalName={dataTypeDecimalName}\r\n {...restProps}\r\n />\r\n)\r\n\r\nNumeric.propTypes = {\r\n value: PropTypes.oneOfType([\r\n PropTypes.number,\r\n PropTypes.string\r\n ]),\r\n onChange: PropTypes.func\r\n}\r\n\r\nconst formatNumber = (value) => {\r\n if (isNaN(value) || value === '') {\r\n return '';\r\n } else {\r\n return parseFloat(value);\r\n }\r\n}\r\n\r\nexport default React.memo(Numeric);","import React, { useContext } from \"react\";\r\nimport Numeric from \"./Numeric\";\r\nimport { Row, Col } from \"reactstrap\";\r\nimport { Field } from \"./Field\";\r\nimport Combobox from \"./Combobox\";\r\nimport {\r\n OrderPriceType,\r\n getOrderTypeName,\r\n ProductType,\r\n getBaseAndPriceCurrencies,\r\n} from \"../../../../utils/Order/Order\";\r\nimport { Dispatch as Context } from \"../store/store\";\r\n\r\nconst PriceType = (props) => {\r\n const { type, onChange, errors, readonly, form } = props;\r\n const { state } = useContext(Context);\r\n const { entities, order } = state;\r\n const { settlementCurrencies } = entities;\r\n const { OrderCurrencySymbol, OrderSettlementCurrencySymbol } = order;\r\n\r\n const items = Object.values(OrderPriceType).reduce((obj, key) => {\r\n obj[key] = { id: key, description: getOrderTypeName(key) };\r\n return obj;\r\n }, {});\r\n\r\n const { baseCurrency, priceCurrency } = getBaseAndPriceCurrencies(\r\n settlementCurrencies,\r\n OrderCurrencySymbol,\r\n OrderSettlementCurrencySymbol\r\n );\r\n\r\n const typeItems = {\r\n [ProductType.BOND]: [items[OrderPriceType.MARKET], items[OrderPriceType.LIMIT]],\r\n\r\n [ProductType.EQUITY]: [\r\n items[OrderPriceType.MARKETONOPEN],\r\n items[OrderPriceType.MARKETONCLOSE],\r\n items[OrderPriceType.MARKET],\r\n items[OrderPriceType.LIMIT],\r\n items[OrderPriceType.STOP],\r\n items[OrderPriceType.STOPLIMIT],\r\n ],\r\n\r\n [ProductType.OPTION]: [\r\n items[OrderPriceType.MARKETONOPEN],\r\n items[OrderPriceType.MARKET],\r\n items[OrderPriceType.LIMIT],\r\n items[OrderPriceType.STOP],\r\n items[OrderPriceType.STOPLIMIT],\r\n ],\r\n\r\n [ProductType.MFUNDS]: [items[OrderPriceType.MARKET]],\r\n\r\n [ProductType.MMARKET]: [items[OrderPriceType.MARKET], items[OrderPriceType.LIMIT]],\r\n\r\n [ProductType.FOREX]: [items[OrderPriceType.MARKET], items[OrderPriceType.LIMIT]],\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n onChange({ OrderType: v })}\r\n placeholder={\"Type\"}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nconst PriceField = (props) => {\r\n switch (props.type) {\r\n case OrderPriceType.MARKET:\r\n return null;\r\n case OrderPriceType.MARKETONOPEN:\r\n return null;\r\n case OrderPriceType.MARKETONCLOSE:\r\n return null;\r\n case OrderPriceType.LIMIT:\r\n return Single(props);\r\n case OrderPriceType.STOP:\r\n return Single(props);\r\n case OrderPriceType.STOPLIMIT:\r\n return StopLimit(props);\r\n default:\r\n return null;\r\n }\r\n};\r\n\r\nconst Single = ({\r\n type,\r\n form,\r\n label,\r\n values,\r\n onChange,\r\n readonly,\r\n errors,\r\n currency,\r\n baseCurrency,\r\n priceCurrency,\r\n}) => {\r\n const typePrice =\r\n type == OrderPriceType.LIMIT ||\r\n type == OrderPriceType.MARKETONOPEN ||\r\n type == OrderPriceType.MARKETONCLOSE\r\n ? \"limPrice\"\r\n : \"stopPrice\";\r\n const _label = label || ([ProductType.MMARKET, ProductType.FOREX].indexOf(form) >= 0 ? \"Rate\" : \"Price\");\r\n const precision = form == ProductType.FOREX ? 8 : 5;\r\n\r\n let prefix = \"\";\r\n if (form !== ProductType.FOREX) {\r\n prefix = currency && currency !== \"\" ? `${currency} ` : \"\";\r\n } else {\r\n prefix = `${baseCurrency}/${priceCurrency} `;\r\n }\r\n\r\n let dataTypeDecimalName = \"default\";\r\n\r\n if (_label) {\r\n _label.toLowerCase() === \"price\" || \"currency\" || \"percentage\" || \"quantity\"\r\n ? (dataTypeDecimalName = _label.toLowerCase())\r\n : null;\r\n }\r\n \r\n return (\r\n \r\n \r\n onChange({\r\n [type == OrderPriceType.LIMIT ||\r\n type == OrderPriceType.MARKETONOPEN ||\r\n type == OrderPriceType.MARKETONCLOSE\r\n ? \"OrderPrice\"\r\n : \"OrderStopPrice\"]: v,\r\n })\r\n }\r\n\r\n />\r\n \r\n );\r\n};\r\n\r\nconst StopLimit = ({ values, onChange, readonly, errors, currency, baseCurrency, priceCurrency }) => {\r\n const props = {\r\n onChange,\r\n values,\r\n errors,\r\n readonly,\r\n currency,\r\n baseCurrency,\r\n priceCurrency,\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default PriceType;\r\n","import React, { Component } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport {\r\n Button,\r\n Col,\r\n ButtonDropdown,\r\n DropdownToggle,\r\n DropdownMenu,\r\n DropdownItem,\r\n UncontrolledDropdown,\r\n} from \"reactstrap\";\r\nimport style from \"./Field.module.scss\";\r\nimport classnames from \"classnames\";\r\n\r\nconst Side = (props) => {\r\n const { readonly, withOpenClose } = props;\r\n\r\n let component = null;\r\n\r\n if (readonly) {\r\n component = ;\r\n } else {\r\n if (withOpenClose) {\r\n component = ;\r\n } else {\r\n component = ;\r\n }\r\n }\r\n\r\n return component;\r\n};\r\n\r\nSide.propTypes = {};\r\n\r\nconst SideReadOnly = ({ side, OrderOpenClose, withOpenClose }) => {\r\n return (\r\n \r\n {side}\r\n {withOpenClose ? OrderOpenClose : null}\r\n
    \r\n );\r\n};\r\n\r\nconst BuySellOpenClose = ({ side, openClose, onChange }) => {\r\n return (\r\n
    \r\n \r\n \r\n {side} {openClose}\r\n \r\n \r\n onChange({ OrderSide: \"Buy\", OrderOpenClose: \"Open\" })}\r\n className={style.itemBuy}\r\n >\r\n Buy Open\r\n \r\n onChange({ OrderSide: \"Buy\", OrderOpenClose: \"Close\" })}\r\n className={style.itemBuy}\r\n >\r\n Buy Close\r\n \r\n onChange({ OrderSide: \"Sell\", OrderOpenClose: \"Open\" })}\r\n className={style.itemSell}\r\n >\r\n Sell Open\r\n \r\n onChange({ OrderSide: \"Sell\", OrderOpenClose: \"Close\" })}\r\n className={style.itemSell}\r\n >\r\n Sell Close\r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nconst BuySell = ({ side, onChange }) => (\r\n
    \r\n onChange({ OrderSide: \"Buy\" })}\r\n className={`${style.buy} ${side == \"Buy\" ? \"\" : style.off}`}\r\n disabled={side == \"Buy\"}\r\n >\r\n Buy\r\n \r\n\r\n onChange({ OrderSide: \"Sell\" })}\r\n className={`${style.sell} ${side == \"Buy\" ? style.off : \"\"}`}\r\n disabled={side != \"Buy\"}\r\n >\r\n Sell\r\n \r\n
    \r\n);\r\n\r\nexport default React.memo(Side);\r\n","import React from \"react\";\r\nimport { Input, Label } from \"reactstrap\";\r\nimport style from \"./Field.module.scss\";\r\n\r\nconst Switch = ({ value, label, disabled, onChange }) => (\r\n
    \r\n \r\n\r\n \r\n
    \r\n);\r\n\r\nexport default React.memo(Switch);\r\n","import React, { useEffect, useState } from \"react\";\r\nimport style from \"./Info.module.scss\";\r\nimport MiniLineChart from \"./MiniLineChart\";\r\nimport { FormattedNumber } from \"../../../../../FormattedNumber/FormattedNumber\";\r\n\r\nconst BoxBonds = ({ items, series }) => {\r\n const [chart, setChart] = useState(null);\r\n\r\n useEffect(() => {\r\n const chart = { data: [], percent: 0 };\r\n\r\n series.forEach((serie) => {\r\n chart.data.push(+serie.Price);\r\n });\r\n\r\n if (chart.data.length > 1) {\r\n const v0 = chart.data[chart.data.length - 2];\r\n const v1 = chart.data[chart.data.length - 1];\r\n\r\n chart.percent = ((v1 - v0) / v0) * 100;\r\n\r\n setChart(chart);\r\n }\r\n }, [series]);\r\n\r\n return (\r\n
    \r\n \r\n \r\n {items.AssetName && (\r\n \r\n \r\n \r\n )}\r\n\r\n \r\n \r\n \r\n \r\n\r\n {(items[\"Ref Discount Rate\"] || items.Coupon) && (\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {(items[\"Fund Type\"] || items[\"Fund Reinvests\"]) && (\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {items[\"Settlment day\"] && items.days && (\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n {items.AssetName}\r\n
    \r\n {items.ISIN || \"-\"}\r\n \r\n {items[\"Ref Price\"] && (\r\n \r\n Ref Price:\r\n \r\n \r\n )}\r\n\r\n {items[\"Ref Discount Rate\"] && (\r\n \r\n Ref Discount Rate:\r\n {items[\"Ref Discount Rate\"]}\r\n \r\n )}\r\n
    \r\n Sett. Date:\r\n {items[\"Settlment day\"] || \"-\"}\r\n \r\n Coupon:\r\n \r\n
    \r\n Fund Type:\r\n {items[\"Fund Type\"] || \"-\"}\r\n \r\n Fund Reinvests:\r\n {items[\"Fund Reinvests\"] || \"-\"}\r\n
    \r\n Last Payment\r\n {items[\"Last coupon\"] || \"-\"}\r\n \r\n Days ago:\r\n {items.days || \"-\"}\r\n
    \r\n {items.Maturity && (\r\n \r\n Maturity\r\n {items.Maturity || \"-\"}\r\n \r\n )}\r\n {chart && }
    \r\n
    \r\n );\r\n};\r\n\r\nexport default BoxBonds;\r\n","import React, { Component, useState, useEffect } from \"react\";\r\nimport PriceHighlight from \"./PriceHighlight\";\r\nimport { wsOnReceive, wsSubscribeSymbol, wsUnsuscribeSymbol } from \"./IEX\";\r\nimport style from \"./Info.module.scss\";\r\nimport { debounce } from \"../../../../../../utils/Helper\";\r\nimport MiniLineChart from \"./MiniLineChart\";\r\n\r\nconst imgUrl = (value) => `https://storage.googleapis.com/iex/api/logos/${value}.png`;\r\n\r\nconst chart1dUrl = (value) => `https://api.iextrading.com/1.0/stock/${value}/chart/1d`;\r\n\r\nconst BoxEquity = ({ value, detailed, items, ...props }) => {\r\n const [chart, setChart] = useState(null);\r\n const [price, setPrice] = useState(null);\r\n\r\n useEffect(() => {\r\n fetch(chart1dUrl(value))\r\n .then((r) => r.json())\r\n .then((r) => {\r\n // ToDo fix IEX call with cloud IEX\r\n const chart = {\r\n data: [],\r\n percent: 0,\r\n };\r\n\r\n for (let i = 0; i < r.length; i += Math.trunc(r.length / 15)) {\r\n if (r[i] && r[i].average && r[i].average > 0) {\r\n chart.data.push(r[i].average);\r\n }\r\n }\r\n\r\n if (chart.data.length > 1) {\r\n const v0 = chart.data[chart.data.length - 2];\r\n const v1 = chart.data[chart.data.length - 1];\r\n\r\n chart.percent = ((v1 - v0) / v0) * 100;\r\n\r\n setChart(chart);\r\n }\r\n })\r\n .catch((reason) => props.series)\r\n .then((series) => {\r\n const chart = { data: [], percent: 0 };\r\n\r\n series.forEach((serie) => {\r\n chart.data.push(+serie.Price);\r\n });\r\n\r\n if (chart.data.length > 1) {\r\n const v0 = chart.data[chart.data.length - 2];\r\n const v1 = chart.data[chart.data.length - 1];\r\n\r\n chart.percent = ((v1 - v0) / v0) * 100;\r\n\r\n setChart(chart);\r\n }\r\n });\r\n }, [props.series, value]);\r\n\r\n const { provider, description } = props;\r\n\r\n return (\r\n
    \r\n
    \r\n \"\"\r\n \r\n {items.AssetName}\r\n
    \r\n {items.ISIN || \"-\"}\r\n
    \r\n\r\n {chart && }\r\n\r\n {provider == \"IEX\" && price != null ? {} : null}\r\n
    \r\n {detailed && }\r\n
    \r\n );\r\n};\r\n\r\nclass DetailedPrice extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.handleChgPriceDebounced = debounce(() => {\r\n this._isMounted &&\r\n this.setState({\r\n data: this.state.data_tmp,\r\n });\r\n }, 1000);\r\n\r\n // initialize values from corex\r\n let initialData = null;\r\n if (props.series.length > 0) {\r\n const lastValue = props.series[0];\r\n initialData = {\r\n ask: (+lastValue.Open).toFixed(2),\r\n bid: (+lastValue.Price).toFixed(2),\r\n last: (+lastValue.Close).toFixed(2),\r\n };\r\n }\r\n\r\n this.state = { data: initialData, old: null, loading: true };\r\n }\r\n\r\n componentDidMount() {\r\n this._isMounted = true;\r\n\r\n wsOnReceive((data) => {\r\n this._isMounted &&\r\n this.setState({\r\n data_tmp: data,\r\n loading: false,\r\n old: this.state.data,\r\n });\r\n\r\n this.handleChgPriceDebounced();\r\n\r\n this.props.changePrice({ price: data.last });\r\n });\r\n\r\n wsSubscribeSymbol(this.props.value);\r\n }\r\n\r\n componentWillUnmount() {\r\n this._isMounted = false;\r\n wsUnsuscribeSymbol(this.props.value);\r\n }\r\n\r\n getValues = (name) => {\r\n const { data, old } = this.state;\r\n\r\n const getValue = (root, name) => (root == null ? \"-\" : root[name]);\r\n\r\n return {\r\n oldValue: getValue(old, name),\r\n newValue: getValue(data, name),\r\n };\r\n };\r\n\r\n render() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    Bid\r\n \r\n Open\r\n \r\n
    Ask\r\n \r\n Close\r\n \r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport default BoxEquity;\r\n","import io from \"socket.io-client\";\r\n\r\nconst URL_IEX_SOCKET = \"https://ws-api.iextrading.com/1.0/tops\";\r\n\r\nlet _symbol = \"\";\r\nlet _onReceive = null;\r\nlet _socket = null;\r\n\r\nif (_socket) {\r\n _socket.on(\"message\", (data) => {\r\n const quote = JSON.parse(data);\r\n\r\n _onReceive &&\r\n _onReceive({\r\n symbol: quote.symbol,\r\n ask: quote.askPrice,\r\n bid: quote.bidPrice,\r\n last: quote.lastSalePrice,\r\n });\r\n });\r\n}\r\n\r\nexport const wsOnReceive = (callback) => {\r\n _onReceive = callback;\r\n};\r\n\r\nexport const wsSubscribeSymbol = (symbol) => {\r\n if (!_socket) _socket = io(URL_IEX_SOCKET, { reconnection: false });\r\n if (_symbol) {\r\n _socket.emit(\"unsubscribe\", _symbol);\r\n }\r\n\r\n _symbol = symbol;\r\n _socket.emit(\"subscribe\", _symbol);\r\n};\r\n\r\nexport const wsUnsuscribeSymbol = (symbol) => {\r\n if (!_socket) _socket = io(URL_IEX_SOCKET, { reconnection: false });\r\n _socket.emit(\"unsubscribe\", _symbol);\r\n _symbol = \"\";\r\n};\r\n","import React, { useState, useEffect, useContext } from \"react\";\r\n\r\nimport { ProductType } from \"../../../../../../utils/Order/Order\";\r\nimport BoxEquity from \"./BoxEquity\";\r\nimport BoxBonds from \"./BoxBonds\";\r\nimport style from \"./Info.module.scss\";\r\nimport CircularProgress from \"../../../../../CircularProgress/CircularProgress\";\r\nimport { Dispatch } from \"../../../store/store\";\r\nimport { FormattedNumber } from \"../../../../../FormattedNumber/FormattedNumber\";\r\n\r\nconst Info = ({ assetInfo, form, ...props }) => {\r\n const [itemsReq, setItemsReq] = useState({ items: null, tradeCurrencies: [], loading: true });\r\n const {\r\n state: {\r\n order: { AssetId },\r\n ui: { userRole },\r\n },\r\n } = useContext(Dispatch);\r\n\r\n useEffect(() => {\r\n assetInfo().then((assetorderdata) => {\r\n const items = assetorderdata.items.reduce((obj, item) => {\r\n obj[item.key] = item.value;\r\n return obj;\r\n }, {});\r\n\r\n setItemsReq({\r\n series: assetorderdata.timeseries,\r\n loading: false,\r\n items,\r\n tradeCurrencies: assetorderdata.settlementCurrency || [],\r\n });\r\n });\r\n }, []);\r\n\r\n if (itemsReq.loading) {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n\r\n const handleClick = () => {\r\n if ((userRole === \"Advisor\" || userRole === \"Trader\") && AssetId) {\r\n window.open(`/#/asset/${AssetId}/quotes`, \"_blank\");\r\n }\r\n };\r\n\r\n return (\r\n
    \r\n {\r\n {\r\n [ProductType.BOND]: ,\r\n [ProductType.MMARKET]: ,\r\n [ProductType.EQUITY]: (\r\n \r\n ),\r\n [ProductType.OPTION]: (\r\n \r\n ),\r\n [ProductType.FOREX]: (\r\n \r\n ),\r\n [ProductType.MFUNDS]: ,\r\n }[form]\r\n }\r\n
    \r\n );\r\n};\r\n\r\nconst BoxForex = ({ items, tradeCurrencies, value, value2 }) => {\r\n let baseCurrency = value;\r\n let priceCurrency = value2;\r\n\r\n const tradeCurrency = tradeCurrencies.find((c) => c.currencyInfo.currencyISO == value2);\r\n if (tradeCurrency && tradeCurrency.multiplies) {\r\n baseCurrency = value2;\r\n priceCurrency = value;\r\n }\r\n\r\n return (\r\n
    \r\n {baseCurrency}/{priceCurrency} {\" \"}\r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default Info;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"info\":\"Info-module_info_rTWly\",\"equity\":\"Info-module_equity_10fRe\",\"description\":\"Info-module_description_zYtul\",\"img\":\"Info-module_img_2S0i-\",\"tablePrice\":\"Info-module_tablePrice_3lXiX\",\"highlight\":\"Info-module_highlight_2Z8BZ\",\"bonds\":\"Info-module_bonds_1Wykd\",\"fadein\":\"Info-module_fadein_1R0_E\"};","import React from 'react';\r\nimport { Sparklines, SparklinesLine } from 'react-sparklines';\r\n\r\nconst MiniLineChart = ({data, percent}) => (\r\n
    \r\n
    \r\n {(percent).toFixed(2)}%\r\n
    \r\n \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n)\r\n\r\nconst styles = {\r\n container: {\r\n display: 'inline-flex',\r\n alignItems: 'end'\r\n },\r\n\r\n chart: {\r\n width: '50px',\r\n height: '20px'\r\n },\r\n\r\n change: {\r\n fontSize: '13px',\r\n marginRight: '3px'\r\n }\r\n}\r\n\r\nconst color = (v) => {\r\n if (v >= 0) return \"#19BE87\";\r\n else return \"#F72121\";\r\n}\r\n\r\nexport default MiniLineChart;\r\n","import React from \"react\";\r\nimport style from \"./Info.module.scss\";\r\nimport classnames from \"classnames\";\r\nimport { formattedNumber } from \"../../../../../FormattedNumber/FormattedNumber\";\r\n\r\nconst PriceHighlight = ({ oldValue, newValue }) => {\r\n const Status = {\r\n NONE: 0,\r\n UP: 1,\r\n DOWN: 2,\r\n };\r\n\r\n const nextStatus = isNaN(oldValue) ? Status.NONE : oldValue > newValue ? Status.DOWN : Status.UP;\r\n\r\n return (\r\n
    \r\n {formattedNumber(newValue, \"currency\")}\r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default PriceHighlight;\r\n","import React from \"react\";\r\nimport style from \"./Options.module.scss\";\r\nimport { Input } from \"reactstrap\";\r\n\r\nconst Filter = ({ selected, range, onChange, description }) => (\r\n
    \r\n Date\r\n onChange(+e.target.value)} className={style.date}>\r\n {range.map((settDate, index) => (\r\n \r\n ))}\r\n \r\n\r\n \r\n {description}\r\n \r\n
    \r\n);\r\n\r\nexport default Filter;\r\n","import React, { Component } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Container, Row, Col, Button } from \"reactstrap\";\r\nimport Filter from \"./Filter\";\r\nimport Table from \"./Table\";\r\nimport style from \"./Options.module.scss\";\r\nimport CircularProgress from \"../../../../../CircularProgress/CircularProgress\";\r\nimport { getOptionFieldsFromTicker } from \"../../../../../../utils/Order/Order\";\r\n\r\nclass Options extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = defaultState;\r\n }\r\n\r\n componentDidMount() {\r\n this.props.setValues(() => {\r\n this.setState(defaultState, () => this.fetchOptions());\r\n });\r\n }\r\n\r\n fetchOptions() {\r\n const { symbol } = this.props;\r\n\r\n this.props.fetchOptions({ date: this.state.selected, symbol }).then((response) => {\r\n const yahooData = JSON.parse(response.response);\r\n const optionChain = yahooData.optionChain;\r\n\r\n if (optionChain.result.length != 0 && optionChain.result[0].expirationDates.length != 0) {\r\n let rows = {};\r\n\r\n const calls = optionChain.result[0].options[0].calls;\r\n const puts = optionChain.result[0].options[0].puts;\r\n const strikes = optionChain.result[0].strikes;\r\n const range = optionChain.result[0].expirationDates.map((e) => {\r\n return { id: e, date: new Date(e * 1000) };\r\n });\r\n\r\n strikes.forEach((strike) => (rows[strike] = { call: {}, put: {} }));\r\n calls.forEach((call) => Object.assign(rows[call.strike].call, call));\r\n puts.forEach((put) => Object.assign(rows[put.strike].put, put));\r\n\r\n this.setState({\r\n rows,\r\n range,\r\n loading: false,\r\n description: optionChain.result[0].quote.longName,\r\n selected: optionChain.result[0].options[0].expirationDate,\r\n });\r\n } else {\r\n this.setState({ loading: false, rows: {} });\r\n }\r\n });\r\n }\r\n\r\n onChangeDate = (value) => {\r\n this.setState({ selected: value, loading: true }, () => this.fetchOptions());\r\n };\r\n\r\n useOption = (option) => {\r\n const optionFields = getOptionFieldsFromTicker(option.contractSymbol);\r\n this.props.onChange(optionFields);\r\n this.props.toggle();\r\n };\r\n\r\n render() {\r\n const { open, toggle } = this.props;\r\n const { range, selected, rows, description, loading } = this.state;\r\n\r\n return (\r\n
    \r\n \r\n Options List\r\n \r\n \r\n \r\n \r\n {range.length > 0 && (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n {loading ? : }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nconst defaultState = {\r\n range: [],\r\n selected: null,\r\n rows: {},\r\n description: null,\r\n loading: true,\r\n};\r\n\r\nexport default Options;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"Options-module_modal_1ENm3\",\"body\":\"Options-module_body_1gjO4\",\"filter\":\"Options-module_filter_39tI0\",\"date\":\"Options-module_date_1BVs5\",\"label\":\"Options-module_label_2SZPS\",\"table\":\"Options-module_table_21rtd\",\"link\":\"Options-module_link_2ujzW\",\"strike\":\"Options-module_strike_z5VKd\",\"put\":\"Options-module_put_2MpLg\"};","import React from \"react\";\r\nimport style from \"./Options.module.scss\";\r\nimport { FormattedNumber } from \"../../../../../FormattedNumber/FormattedNumber\";\r\n\r\nconst Table = ({ rows, useOption }) => {\r\n if (Object.keys(rows).length == 0) {\r\n return No options found it.;\r\n }\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {Object.keys(rows).map((key) => buildRow({ key, r: rows[key], useOption }))}\r\n
    LastChg.BidAskVol.StrikeLastChg.BidAskVol.
    \r\n
    \r\n );\r\n};\r\n\r\nconst buildRow = ({ key, r, useOption }) => (\r\n \r\n \r\n useOption(r.call)} className={style.link}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {key}\r\n\r\n useOption(r.put)} className={style.link}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nconst NumericItem = ({ value, dataTypeDecimalName }) => {\r\n if (value != undefined) {\r\n return ;\r\n }\r\n\r\n return \"-\";\r\n};\r\n\r\nexport default Table;\r\n","import React, { Component } from \"react\";\r\nimport { Row, Col, Button } from \"reactstrap\";\r\nimport { ProductType } from \"../../../../../utils/Order/Order\";\r\nimport Autosuggest from \"../../../../Autosuggest/Autosuggest\";\r\nimport styleF from \"./../Field.module.scss\";\r\nimport Options from \"./Options/Options\";\r\nimport Info from \"./Info/Info\";\r\n\r\nclass Symbol extends Component {\r\n constructor(props) {\r\n super(props);\r\n const { value, description, hideInfo } = props;\r\n\r\n const showInfo = !hideInfo && !!value;\r\n\r\n this.state = {\r\n showOptions: false,\r\n showInfo,\r\n };\r\n }\r\n\r\n componentWillReceiveProps(nextProps) {\r\n const { form, description, value, assetid } = this.props;\r\n if (form != nextProps.form) {\r\n this.setState({ showInfo: false });\r\n }\r\n /// case de forex se necesita pedir assetInfo si estan las dos monedas selccionadas de la lista\r\n else if (form == ProductType.FOREX) {\r\n this.setState({ showInfo: nextProps.hideInfo != undefined && !nextProps.hideInfo });\r\n }\r\n\r\n if (nextProps.assetid && assetid !== nextProps.assetid && nextProps.assetInfo != undefined) {\r\n nextProps.assetInfo();\r\n }\r\n\r\n // if (nextProps.description && description !== nextProps.description && nextProps.assetInfo != undefined) {\r\n // nextProps.assetInfo();\r\n // }\r\n }\r\n\r\n onSuggestionsFetchRequested = ({ value }) => {\r\n return this.props\r\n .searchSymbol({\r\n type: this.props.form,\r\n text: value,\r\n })\r\n .then((response) => response.response.symbols);\r\n };\r\n\r\n onChange = (method, value) => {\r\n const { attrId, attrTicker, attrDescription, attrProvider, hideInfo } = this.props;\r\n\r\n let _value = defaultSymbolValue({\r\n attrId,\r\n attrTicker,\r\n attrDescription,\r\n attrProvider,\r\n });\r\n\r\n if (method != \"type\") {\r\n _value = {\r\n [attrId]: value.Id,\r\n [attrTicker]: value.Ticker,\r\n [attrDescription]: value.Description,\r\n [attrProvider]: value.Provider,\r\n };\r\n } else {\r\n _value[attrTicker] = value;\r\n }\r\n\r\n this.props.onChange(_value, value);\r\n\r\n this.setState({ ...this.state, showInfo: method != \"type\" && !hideInfo });\r\n };\r\n\r\n toggleOptions = () => {\r\n if (!this.state.showOptions) {\r\n this.optionsMethod();\r\n }\r\n\r\n this.setState({ showOptions: !this.state.showOptions });\r\n };\r\n\r\n render() {\r\n const {\r\n form,\r\n placeholder,\r\n invalid,\r\n disabled,\r\n value,\r\n value2,\r\n description,\r\n provider,\r\n getYahooOptions,\r\n assetInfo,\r\n hideButtonOptn,\r\n } = this.props;\r\n\r\n const { showOptions, showInfo } = this.state;\r\n const inputProps = {\r\n placeholder,\r\n invalid,\r\n disabled,\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {form == ProductType.OPTION && !hideButtonOptn && (\r\n (this.optionsMethod = method)}\r\n onChange={this.props.onChange}\r\n disabled={disabled}\r\n />\r\n )}\r\n \r\n\r\n {showInfo && value != \"\" ? (\r\n \r\n ) : null}\r\n \r\n );\r\n }\r\n}\r\n\r\nconst defaultSymbolValue = ({ attrTicker, attrId, attrDescription, attrProvider }) => ({\r\n [attrId]: null,\r\n [attrTicker]: \"\",\r\n [attrDescription]: null,\r\n [attrProvider]: null,\r\n});\r\n\r\nconst renderSuggestion = (suggestion) => {\r\n return (\r\n
    \r\n {suggestion.Ticker}\r\n {\" - \"}\r\n {suggestion.Description}\r\n
    \r\n );\r\n};\r\n\r\nconst getSuggestionValue = (suggestion) => suggestion.Ticker;\r\n\r\nconst GetOptions = ({ symbol, toggle, open, setValues, fetchOptions, onChange, disabled }) => (\r\n \r\n \r\n {symbol && (\r\n \r\n )}\r\n \r\n);\r\n\r\nexport default Symbol;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Row, Col, Input } from 'reactstrap';\r\nimport { Field } from './Field';\r\nimport Combobox from './Combobox';\r\nimport { TimeFrame, getTimeFrameName, TimeFrameIsSelectable } from '../../../../utils/Order/Order';\r\n\r\nconst TimeForce = ({onChange, timeForce, date, errors, readonly}) => {\r\n\r\n /*\r\n TimeForce = OPG se utiliza si solo si el type es Market Open. \r\n Si el type != Market Open, se puede seleccionar cualquier TimeForce, excepto OPG.\r\n */\r\n const typeItems = timeForce == 'OPG' ? \r\n [{id: 'OPG', description: 'OPG'}]\r\n :\r\n Object.values(TimeFrame).filter(k => TimeFrameIsSelectable(k)).map((key, index) => (\r\n { id: key, description: getTimeFrameName(key) }\r\n ))\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n onChange({'OrderTimeInForce': v})}\r\n placeholder={'Time in force'}\r\n style={{background: '#edf9ff', fontWeight: 500}}\r\n />\r\n \r\n \r\n \r\n { timeForce == TimeFrame.GTD &&\r\n \r\n onChange({'OrderGTD': e.target.value})} \r\n value={date}\r\n disabled={readonly.date}\r\n style={{padding: '6px 4px'}}\r\n required\r\n />\r\n \r\n }\r\n \r\n \r\n
    \r\n )\r\n}\r\n\r\nexport default React.memo(TimeForce);","import React, { useContext } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport { Button } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport style from \"./Footer.module.scss\";\r\nimport classnames from \"classnames\";\r\nimport { Mode } from \"../../../../utils/Order/Order\";\r\nimport { Dispatch } from \"../store/store\";\r\n\r\nconst Footer = ({ actions, mode, side, buttons, wizzard }) => {\r\n const { dispatch } = useContext(Dispatch);\r\n const { precheck, modify, confirm, save } = buttons;\r\n\r\n return (\r\n
    \r\n \r\n
    \r\n {\" \"}\r\n {confirm.visible && !wizzard.enabled && (\r\n \r\n {confirm.label}\r\n \r\n )}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst onChangeMode = (dispatch, mode) => dispatch({ type: \"CHANGE_MODE\", mode });\r\n\r\nconst GoStepBack = ({ wizzard, dispatch }) => {\r\n if (wizzard.enabled && wizzard.activeStep != 0) {\r\n return (\r\n \r\n );\r\n } else return null;\r\n};\r\n\r\nexport default Footer;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"footer\":\"Footer-module_footer_2ll6j\",\"buttons\":\"Footer-module_buttons_1YrR5\",\"buy\":\"Footer-module_buy_3P3uY\",\"sell\":\"Footer-module_sell_3wktq\",\"totals\":\"Footer-module_totals_7TyyY\",\"totalsLoading\":\"Footer-module_totalsLoading_oj3t_\"};","import React from \"react\";\r\nimport { PopoverBody, UncontrolledPopover } from \"reactstrap\";\r\n\r\nimport style from \"./Helper.module.scss\";\r\n\r\nconst EarningsHelper = ({ children, quantities, earningCategoryName, earningTypeName }) => (\r\n
    \r\n {children}\r\n \r\n \r\n {quantities.map((item) => (\r\n
    \r\n {`${item.date}: ${item[earningCategoryName]} ${item[earningTypeName]} (status: ${item.status})`}\r\n
    \r\n ))}\r\n
    \r\n
    \r\n
    \r\n);\r\n\r\nexport default EarningsHelper;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"linkHelper\":\"Helper-module_linkHelper_OFA1W\",\"Helper\":\"Helper-module_Helper_15FUL\"};","import React from \"react\";\r\nimport { PopoverBody, UncontrolledPopover } from \"reactstrap\";\r\n\r\nimport style from \"./Helper.module.scss\";\r\n\r\nconst QuantityHelper = ({ children, quantities, name }) => (\r\n
    \r\n {children}\r\n \r\n \r\n {quantities.map((item) => (\r\n
    {`${item.date}: ${item.quantity} (status: ${item.status})`}
    \r\n ))}\r\n
    \r\n
    \r\n
    \r\n);\r\n\r\nexport default QuantityHelper;\r\n","import React, { useReducer, useEffect, useState } from \"react\";\r\nimport {\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Container,\r\n UncontrolledDropdown,\r\n DropdownToggle,\r\n DropdownMenu,\r\n DropdownItem,\r\n Row,\r\n Col,\r\n Input,\r\n Label,\r\n FormGroup,\r\n FormFeedback,\r\n CustomInput,\r\n Alert,\r\n} from \"reactstrap\";\r\nimport LaddaButton from \"react-ladda/dist/LaddaButton\";\r\nimport { SLIDE_LEFT } from \"react-ladda/dist/constants\";\r\nimport { defaultState, Dispatch, initialize } from \"./store/store\";\r\nimport { orderReducer, validateForm } from \"./store/reducer\";\r\nimport style from \"./Offer.module.scss\";\r\nimport { CommissionType, Mode } from \"../../../utils/Order/Order\";\r\nimport { Field, Numeric } from \"./Field/Field\";\r\nimport Footer from \"./Footer/Footer\";\r\nimport { Asset, OrderInlineDetail } from \"../..\";\r\nimport Execution from \"../Execution/Execution\";\r\nimport { customFetchAssetInfo } from \"./../Order/Form/commons\";\r\nimport { handleFileInput, showToast, valueIsEmpty } from \"../../../utils/Helper\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport { Result } from \"../../Asset/Calculator/Calculator\";\r\nimport { commissionSuffix } from \"../FundOrder/Form/commons\";\r\nimport { LoadingMessage } from \"../../Asset/Controls\";\r\nimport { NumberFormatInput } from \"../../NumberFormatInput/NumberFormatInput\";\r\nimport Balance from \"../Order/Field/Account/Balance\";\r\n\r\nconst Offer = ({ open, toggle, fetchGetAssetInformation, ...props }) => {\r\n const [state, dispatch] = useReducer(orderReducer, defaultState(), initialize(props));\r\n const [messageResponse, setMessageResponse] = useState(\"\");\r\n const [visible, setVisible] = useState(false);\r\n const [availableClients, setAvailableClients] = useState(0);\r\n const [availableAdvisors, setAvailableAdvisors] = useState(0);\r\n const [decimalAmount, setDecimalAmount] = useState();\r\n const [AssetPaymentRateFixed, setAssetPaymentRateFixed] = useState(0);\r\n const [assetTradesDirty, setAssetTradesDirty] = useState(null);\r\n const [assetName, setAssetName] = useState(\"\");\r\n const [assetIsQualified, setAssetIsQualified] = useState(\"\");\r\n const { ui, buttons } = state;\r\n const [order, setOrder] = useState(props.order);\r\n const [OfferCleanPrice, setOfferCleanPrice] = useState(0);\r\n const [OfferOriginalPrice, setOfferOriginalPrice] = useState(0);\r\n const postOffer = order.postOffer.postOffer;\r\n const update = order.update;\r\n const [offer, setOffer] = useState(() => {\r\n if (state.order.offer && state.order.offer.OfferId != undefined) {\r\n setOfferOriginalPrice(state.order.offer.OfferOriginalPrice);\r\n return {\r\n OfferQuantitytoAdvisor: state.order.offer.OfferQuantitytoAdvisor,\r\n OfferQuantitytoClient: state.order.offer.OfferQuantitytoClient,\r\n OfferPrice: state.order.offer.OfferOriginalPrice,\r\n OfferOfferQuantityTakenByAdvisor: state.order.offer.OfferOfferQuantityTakenByAdvisor,\r\n OfferQuantityTakenByClient: state.order.offer.OfferQuantityTakenByClient,\r\n OfferCleanPrice: state.order.offer.OfferCleanPrice,\r\n OfferOriginalPrice: state.order.offer.OfferOriginalPrice,\r\n OfferId: state.order.offer.OfferId,\r\n featured: state.order.offer.featured,\r\n AssetId: state.order.offer.AssetId,\r\n OfferDate: state.order.offer.OfferDate,\r\n sellingPower: state.order.sellingPower,\r\n balanceType: state.order.balanceType,\r\n bookType: state.order.bookType,\r\n OfferMinimumtoClient: state.order.offer.OfferMinimumtoClient\r\n };\r\n } else {\r\n return {\r\n sellingPower: state.order.sellingPower,\r\n balanceType: state.order.balanceType,\r\n bookType: state.order.bookType,\r\n OfferQuantitytoAdvisor: 0,\r\n OfferQuantitytoClient: 0,\r\n OfferPrice: state.order.CurrentPrice,\r\n OfferQuantityTakenByClient: 0,\r\n OfferOfferQuantityTakenByAdvisor: 0,\r\n OfferOriginalPrice: state.order.CurrentPrice,\r\n OfferCleanPrice: 0,\r\n OfferId: 0,\r\n featured: false,\r\n AssetId: state.order.AssetId,\r\n //set today date\r\n OfferDate: new Date().toISOString().slice(0, 10),\r\n OfferMinimumtoClient: 0,\r\n };\r\n }\r\n });\r\n\r\n const minimum_to_clients =\r\n window.___APP_CONFIG___ && window.___APP_CONFIG___.OFFER_MINIMUM_TO_CLIENTS\r\n ? window.___APP_CONFIG___.OFFER_MINIMUM_TO_CLIENTS\r\n : false;\r\n\r\n const rates = [\r\n { id: 1, name: \"Nom. Rate\" },\r\n { id: 2, name: \"XIRR\" },\r\n ];\r\n const [rateSelected, setRateSelected] = useState(rates.find((rate) => rate.id == 1));\r\n const [targetValue, setTargetValue] = useState(0);\r\n const [newOrderPrices, setNewOrderPrices] = useState({\r\n data: {\r\n principal: 0,\r\n accrual: 0,\r\n ytm: 0,\r\n TNA: 0,\r\n currentyield: 0,\r\n total: 0,\r\n duration: 0,\r\n days: 0,\r\n nominal: 0,\r\n events: [],\r\n },\r\n loading: false,\r\n error: null,\r\n });\r\n\r\n useEffect(() => {\r\n\r\n if (ui.quoteId) {\r\n customFetchAssetInfo(\r\n dispatch,\r\n { assetInfo: props.onOrderAssetInfo },\r\n {\r\n OrderInitDate: order.OrderInitDate,\r\n OrderFutureSettlmentDate: order.OrderFutureSettlmentDate,\r\n AssetClassForm: order.AssetClassForm,\r\n AssetId: order.AssetId,\r\n AssetTicker: order.AssetTicker,\r\n OrderCurrencyId: order.OrderCurrencyId,\r\n OrderSettlementCurrencyId: order.OrderSettlementCurrencyId,\r\n }\r\n );\r\n }\r\n if (order.OrderId != 0) {\r\n setAvailableAdvisors(offer.OfferQuantitytoAdvisor - offer.OfferOfferQuantityTakenByAdvisor);\r\n setAvailableClients(offer.OfferQuantitytoClient - offer.OfferQuantityTakenByClient);\r\n setOffer({\r\n ...offer,\r\n featured: offer.featured,\r\n });\r\n fetchGetAssetInformation({ assetId: order.assetId }).then((response) => {\r\n setDecimalAmount(response.info.SubAssetClassDecimalPlaces);\r\n setAssetPaymentRateFixed(response.info.AssetPaymentRateFixed);\r\n setAssetTradesDirty(response.info.AssetPricesDirty);\r\n setAssetName(response.info.AssetName);\r\n setAssetIsQualified(response.info.AssetIsQualified);\r\n });\r\n }\r\n }, [\r\n order.OrderInitDate,\r\n order.OrderFutureSettlmentDate,\r\n order.AssetClassForm,\r\n order.AssetId,\r\n order.AssetTicker,\r\n order.AdvisorQuantity,\r\n order.ClientQuantity,\r\n order.OrderCurrencyId,\r\n order.OrderSettlementCurrencyId,\r\n props.onOrderAssetInfo,\r\n ui.quoteId,\r\n ]);\r\n\r\n useEffect(() => {\r\n\r\n if (assetTradesDirty == null)\r\n return;\r\n\r\n let offerToSend = {\r\n ...offer,\r\n AssetId: order.assetId,\r\n OfferCleanPrice: targetValue > 0 && targetValue == AssetPaymentRateFixed ? 100 : OfferCleanPrice,\r\n OfferOriginalPrice: OfferOriginalPrice ? OfferOriginalPrice : offer.OfferPrice,\r\n };\r\n\r\n const calculatorRequest = {\r\n assetId: order.assetId,\r\n quantity: order.OrderQuantity,\r\n date: offer.OfferDate,\r\n price: offer.OfferPrice,\r\n priceisclean: !assetTradesDirty,\r\n priceisdirty: assetTradesDirty,\r\n ytm: true,\r\n };\r\n\r\n Promise.all([\r\n props.fetchPricesForOffer({ sdtOffer: offerToSend }),\r\n props.fetchGetCalculator(calculatorRequest),\r\n ]).then(([response1, response2]) => {\r\n if (response1.response.sdtOffer) {\r\n setOfferCleanPrice(response1.response.sdtOffer.OfferCleanPrice);\r\n offer.OfferId == 0 ? setOfferOriginalPrice(response1.response.sdtOffer.OfferPrice) : \"\";\r\n }\r\n if (response2.calculator) {\r\n setNewOrderPrices((prevState) => ({\r\n ...prevState,\r\n data: {\r\n ...response2.calculator,\r\n nominal: response2.calculator.assetParValue * order.OrderQuantity,\r\n },\r\n }));\r\n setTargetValue(rateSelected.id == 1 ? response2.calculator.TNA : response2.calculator.ytm);\r\n\r\n }\r\n });\r\n }, [offer.OfferPrice, assetTradesDirty]);\r\n\r\n const handleNewValueTNA = () => {\r\n if (targetValue == AssetPaymentRateFixed) {\r\n getPricesWhenTnaEqualsCoupon();\r\n return;\r\n }\r\n\r\n if (targetValue == newOrderPrices.data.TNA) return;\r\n\r\n const request = {\r\n assetId: order.assetId,\r\n quantity: order.OrderQuantity,\r\n targetValueTNA: targetValue,\r\n date: new Date().toISOString().slice(0, 10),\r\n isTargetTNA: rateSelected.id == 1,\r\n };\r\n\r\n setNewOrderPrices((prevState) => ({ ...prevState, loading: true }));\r\n\r\n props.fetchCalculatorDataForOffers(request).then(({ calculator_out, goalSeekResponse }) => {\r\n if (goalSeekResponse.Code !== 200) {\r\n setNewOrderPrices((prevState) => ({ ...prevState, error: true, loading: false }));\r\n return;\r\n }\r\n\r\n setQuantity({ OfferPrice: assetTradesDirty ? calculator_out.dirtyprice : calculator_out.cleanprice });\r\n setNewOrderPrices((prevState) => ({\r\n ...prevState,\r\n loading: false,\r\n error: false,\r\n }));\r\n });\r\n };\r\n\r\n const handleChangeRate = (rateId) => {\r\n const rateSelected = rates.find((rate) => rate.id == rateId);\r\n setRateSelected(rateSelected);\r\n setTargetValue(rateSelected.id == 1 ? newOrderPrices.data.TNA : newOrderPrices.data.ytm);\r\n };\r\n\r\n const getPricesWhenTnaEqualsCoupon = () => {\r\n const calculatorRequest = {\r\n assetId: order.assetId,\r\n quantity: order.OrderQuantity,\r\n date: new Date().toISOString().slice(0, 10),\r\n price: 100,\r\n priceisclean: true,\r\n priceisdirty: false,\r\n ytm: true,\r\n };\r\n\r\n if (!assetTradesDirty) {\r\n setQuantity({ OfferPrice: 100 });\r\n } else {\r\n setNewOrderPrices((prevState) => ({ ...prevState, loading: true }));\r\n\r\n props.fetchGetCalculator(calculatorRequest).then((response) => {\r\n if (response.result.Code != 200) {\r\n setNewOrderPrices((prevState) => ({ ...prevState, error: true, loading: false }));\r\n return;\r\n }\r\n\r\n setQuantity({ OfferPrice: response.calculator.dirtyprice });\r\n setNewOrderPrices((prevState) => ({\r\n ...prevState,\r\n loading: false,\r\n error: false,\r\n }));\r\n });\r\n }\r\n };\r\n\r\n const confirm = async () => {\r\n validateOffer();\r\n if (state.validOffer) {\r\n dispatch({\r\n type: \"CHANGE_BUTTON_PROPS\",\r\n props: { confirm: { loading: true } },\r\n });\r\n const { ui, precheck } = state;\r\n let hasErrors = false;\r\n let offerToSend = {\r\n OfferQuantitytoAdvisor: offer.OfferQuantitytoAdvisor,\r\n OfferQuantitytoClient: offer.OfferQuantitytoClient,\r\n OfferPrice: offer.OfferPrice,\r\n featured: offer.featured,\r\n AssetId: offer.AssetId,\r\n NominalRate: newOrderPrices.data.TNA,\r\n XIRR: newOrderPrices.data.ytm,\r\n booktype: offer.bookType,\r\n balancetype: offer.balanceType,\r\n OfferMinimumtoClient: offer.OfferMinimumtoClient\r\n };\r\n offer.OfferId == undefined ? \"\" : (offerToSend.OfferId = offer.OfferId);\r\n // check if any authorizations has error\r\n const authorizations = precheck.authorizations.map((auth) => {\r\n if (auth.text == null || !auth.text.length) {\r\n hasErrors = true;\r\n return { ...auth, error: \"Required field\", readonly: undefined };\r\n }\r\n\r\n return { ...auth, error: null, readonly: undefined };\r\n });\r\n offerToSend.AssetId == undefined ? (offerToSend.AssetId = order.assetId) : \"\";\r\n postOffer({\r\n offer: offerToSend,\r\n accountId: order.AccountId,\r\n k2btrnmode: \"UPD\",\r\n })\r\n .then((response) => {\r\n if (response.response.result.Code == 200) {\r\n update();\r\n toggle();\r\n showToast(\"success: Offer saved successfully\");\r\n } else {\r\n dispatch({\r\n type: \"CHANGE_BUTTON_PROPS\",\r\n props: { confirm: { loading: false } },\r\n });\r\n showToast(response.response.result.Description, true);\r\n }\r\n })\r\n .catch((error) => {\r\n dispatch({\r\n type: \"CHANGE_BUTTON_PROPS\",\r\n props: { confirm: { loading: false } },\r\n });\r\n showToast(error.response.result.Description, true);\r\n });\r\n }\r\n };\r\n\r\n const setQuantity = (value) => {\r\n if (value.AdvisorQuantity != undefined) {\r\n setOffer({\r\n ...offer,\r\n OfferQuantitytoAdvisor: value.AdvisorQuantity,\r\n });\r\n } else if (value.ClientQuantity != undefined) {\r\n setOffer({\r\n ...offer,\r\n OfferQuantitytoClient: value.ClientQuantity,\r\n });\r\n } else if (value.ClientMinimum != undefined) {\r\n setOffer({\r\n ...offer,\r\n OfferMinimumtoClient: value.ClientMinimum,\r\n });\r\n } else {\r\n setOfferOriginalPrice(value.OfferPrice);\r\n setOffer({\r\n ...offer,\r\n OfferPrice: value.OfferPrice,\r\n OfferDate: new Date().toISOString().slice(0, 10),\r\n });\r\n }\r\n };\r\n\r\n const updateOfferFeatued = (value) => {\r\n setOffer({\r\n ...offer,\r\n featured: value,\r\n });\r\n };\r\n const validateOffer = () => {\r\n if (\r\n parseInt(offer.OfferQuantitytoAdvisor) + parseInt(offer.OfferQuantitytoClient) >\r\n state.order.OrderQuantity ||\r\n parseInt(offer.OfferQuantitytoAdvisor) > state.order.OrderQuantity ||\r\n parseInt(offer.OfferQuantitytoClient) > state.order.OrderQuantity\r\n ) {\r\n setVisible(true);\r\n state.validOffer = false;\r\n setMessageResponse(\"the offer taken exceed the quantity offered available\");\r\n } else if (offer.OfferPrice <= 0) {\r\n state.validOffer = false;\r\n setVisible(true);\r\n setMessageResponse(\"the offer price must be greater than 0\");\r\n } else if (offer.OfferMinimumtoClient < 0) {\r\n state.validOffer = false;\r\n setVisible(true);\r\n setMessageResponse(\"The minimum quantity to client must be positive\");\r\n } else if (offer.OfferMinimumtoClient > offer.OfferQuantitytoClient) {\r\n state.validOffer = false;\r\n setVisible(true);\r\n setMessageResponse(\"The minimum quantity offered to clients must be less than the quantity offered to clients\");\r\n } else {\r\n state.validOffer = true;\r\n setVisible(false);\r\n }\r\n };\r\n\r\n const cstyle = (side) => {\r\n return {\r\n background: \"rgba(44, 177, 90, 0.08)\",\r\n border: \"solid 1px rgba(44, 177, 90, 1)\",\r\n marginRight: \"5px\",\r\n };\r\n };\r\n\r\n const handleChangeTargetValue = (value) => {\r\n setTargetValue(value)\r\n setNewOrderPrices(prev => ({ ...prev, error: null }));\r\n }\r\n\r\n return (\r\n \r\n \r\n toggle(order.OrderId)}>\r\n {ui.title}\r\n\r\n {(ui.mode === Mode.PRECHECK || ui.mode === Mode.CONFIRM || ui.mode === Mode.EXECUTE) && (\r\n \r\n )}\r\n \r\n \r\n {ui.mode == Mode.EXECUTE && (\r\n toggle(order.OrderId)}\r\n entities={props.entities}\r\n order={order}\r\n orderId={order.OrderId}\r\n services={fetchGetAssetInformation}\r\n />\r\n )}\r\n {\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n setQuantity({ OfferPrice: v })}\r\n decimalScale={4}\r\n dataTypeDecimalName=\"price\"\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n setOffer({ ...offer, OfferDate: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {rateSelected.name}\r\n \r\n \r\n {rates.map((rate) => (\r\n handleChangeRate(rate.id)}>\r\n {rate.name}\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Recalculate\r\n \r\n
    \r\n \r\n {newOrderPrices.error != null && (\r\n \r\n \r\n {newOrderPrices.error ? \"Value not reached\" : \"Value reached successfull\"}\r\n \r\n )}\r\n \r\n \r\n
    \r\n {/* Left */}\r\n \r\n \r\n \r\n setQuantity({ AdvisorQuantity: v })}\r\n dataTypeDecimalName=\"quantity\"\r\n />\r\n {messageResponse}\r\n \r\n \r\n\r\n {offer.OfferId != 0 && (\r\n
    \r\n \r\n {offer == undefined ? (\r\n 0\r\n ) : (\r\n \r\n )}\r\n \r\n\r\n \r\n {offer == undefined ? (\r\n 0\r\n ) : (\r\n \r\n )}\r\n \r\n
    \r\n )}\r\n \r\n
    \r\n \r\n \r\n
    \r\n {/* Left */}\r\n \r\n \r\n setQuantity({ ClientQuantity: v })}\r\n dataTypeDecimalName=\"quantity\"\r\n />\r\n \r\n {minimum_to_clients && \r\n setQuantity({ ClientMinimum: v })}\r\n dataTypeDecimalName=\"quantity\"\r\n />\r\n }\r\n\r\n {offer.OfferId != 0 && (\r\n
    \r\n \r\n {offer == undefined ? (\r\n 0\r\n ) : (\r\n \r\n )}\r\n \r\n\r\n \r\n {offer == undefined ? (\r\n 0\r\n ) : (\r\n \r\n )}\r\n \r\n
    \r\n )}\r\n \r\n
    \r\n \r\n
    \r\n \r\n updateOfferFeatued(e.target.checked)}\r\n />\r\n \r\n { assetIsQualified !== \"\" &&\r\n \r\n \r\n \r\n }\r\n \r\n \r\n {newOrderPrices.loading ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n {visible && }\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default Offer;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"column\":\"Offer-module_column_1GVvd\",\"empty\":\"Offer-module_empty_ZvxHz\",\"form\":\"Offer-module_form_3zpOi\"};","import { formProps } from \"./../../Order/Form\";\r\nimport {\r\n Mode,\r\n ProductType,\r\n Type,\r\n OrderPriceType,\r\n TimeFrame,\r\n CommissionType,\r\n} from \"../../../../utils/Order/Order\";\r\nimport { mergeDeep, UserType, toDateLocal } from \"./../../../../utils/Helper\";\r\nimport { defaultState } from \"./store\";\r\n\r\nexport const orderReducer = (state, action) => {\r\n switch (action.type) {\r\n case \"CHANGE_FORM\":\r\n return changeForm(state, action);\r\n\r\n case \"CHANGE_ORDER_FIELDS\":\r\n return processChangeOrderFields(state, action.fields);\r\n\r\n case \"CHANGE_ORDER_ACCOUNT_FIELDS\":\r\n return processChangeOrderAccountFields(state, action.fields);\r\n\r\n case \"FETCH_ASSET_INFO\":\r\n return processAssetInfo(state, action.data);\r\n\r\n case \"FETCH_ACCOUNT_INFO\":\r\n return processAccountInfo(state, action.items, action.updateOrderValues);\r\n\r\n case \"CHANGE_MODE\":\r\n switch (action.mode) {\r\n case Mode.EDIT:\r\n return processEdit(state);\r\n\r\n case Mode.PRECHECK:\r\n return processPrecheck(state);\r\n\r\n case Mode.CONFIRM:\r\n return processConfirm(state);\r\n\r\n case Mode.EXECUTE:\r\n return processExecute(state, action.id);\r\n\r\n default:\r\n return state;\r\n }\r\n\r\n case \"FORCE_UPDATE_VALIDATION\":\r\n return forceUpdateValidation(state, action);\r\n\r\n case \"UPDATE_PRECHECK\":\r\n return updatePrecheck(state, action.fields);\r\n\r\n case \"CHANGE_BUTTON_PROPS\":\r\n return changeButtonProps(state, action);\r\n\r\n case \"EDIT_ACCOUNT\":\r\n return editAccount(state, action);\r\n\r\n case \"SET_ATTACHMENT\":\r\n return setAttachment(state, action.payload);\r\n\r\n case \"DELETE_ACCOUNT\":\r\n return deleteAccount(state, action);\r\n\r\n case \"SELECT_ACCOUNT\":\r\n return selectAccount(state, action);\r\n\r\n case \"WIZZ_NEXT_STEP\":\r\n return wizzNextStep(state);\r\n\r\n case \"WIZZ_STEP_BACK\":\r\n return wizzStepBack(state);\r\n\r\n default:\r\n return state;\r\n }\r\n};\r\n\r\nconst changeForm = (state, { newForm }) => {\r\n // from trader can add basket order with empty accounts, when change form retain account setted\r\n const { OrderHierarchy, OrderIsBasket, OrderHasMultipleAccounts } = state.order;\r\n\r\n return {\r\n ...state,\r\n order: {\r\n ...formProps[newForm].defaults(),\r\n AssetClassForm: newForm,\r\n OrderHierarchy,\r\n OrderIsBasket,\r\n OrderHasMultipleAccounts,\r\n OrderSide: state.order.OrderSide || \"Buy\",\r\n OrderInitDate: new Date().toDateLocal(),\r\n OrderType: OrderPriceType.MARKET,\r\n OrderTimeInForce: TimeFrame.GTC,\r\n OrderGTD: toDateLocal(new Date()),\r\n OrderQuantity: state.order.OrderQuantity,\r\n CurrentAccount: state.order.CurrentAccount\r\n ? {\r\n ...state.order.CurrentAccount,\r\n Precheck: {},\r\n }\r\n : {},\r\n Accounts: state.order.Accounts\r\n ? state.order.Accounts.map((account) => ({\r\n ...account,\r\n Precheck: {},\r\n }))\r\n : [],\r\n },\r\n entities: {\r\n settlementCurrencies: null,\r\n },\r\n fields: {\r\n ...state.fields,\r\n hiddens: {\r\n ...state.fields.hiddens,\r\n RequiresSpecialCustody: true,\r\n },\r\n },\r\n };\r\n};\r\n\r\nconst changeButtonProps = (state, { props }) => {\r\n return mergeDeep({ ...state }, { buttons: { ...props } });\r\n};\r\n\r\nconst forceUpdateValidation = (state, { errors }) => {\r\n return {\r\n ...state,\r\n fields: {\r\n ...state.fields,\r\n errors,\r\n },\r\n };\r\n};\r\n\r\nconst processChangeOrderFields = (state, fields) => {\r\n const errors = Object.keys(fields).reduce((o, name) => {\r\n o[name] = undefined;\r\n return o;\r\n }, {});\r\n\r\n const entities = {};\r\n\r\n if (fields.hasOwnProperty(\"AssetId\") && !fields.AssetId) {\r\n entities.settlementCurrencies = null;\r\n fields.OrderSettlementCurrencyId = null;\r\n fields.OrderSettlementCurrencySymbol = null;\r\n }\r\n\r\n if (state.order.AssetClassForm != ProductType.FOREX) {\r\n if (fields.hasOwnProperty(\"OrderSettlementCurrencyId\") && fields.OrderSettlementCurrencyId) {\r\n const filteredCurrencies = state.entities.settlementCurrencies.filter(\r\n (c) => c.id == fields.OrderSettlementCurrencyId\r\n );\r\n if (filteredCurrencies.length > 0) {\r\n const newCurrency = filteredCurrencies[0];\r\n fields.OrderSettlementCurrencySymbol = newCurrency.description;\r\n }\r\n }\r\n }\r\n\r\n if (fields.hasOwnProperty(\"OrderType\")) {\r\n let moo = false;\r\n if (fields.OrderType == OrderPriceType.MARKETONOPEN) {\r\n fields.OrderTimeInForce = \"OPG\";\r\n moo = true;\r\n } else if (fields.OrderType == OrderPriceType.MARKETONCLOSE) {\r\n fields.OrderTimeInForce = TimeFrame.DAY;\r\n moo = true;\r\n } else {\r\n fields.OrderTimeInForce = TimeFrame.GTC;\r\n }\r\n\r\n if (moo)\r\n fields.readonly = {\r\n OrderTimeInForce: true,\r\n };\r\n else if (state.ui.mode != Mode.READONLY)\r\n fields.readonly = {\r\n OrderTimeInForce: false,\r\n };\r\n }\r\n\r\n return {\r\n ...state,\r\n order: {\r\n ...state.order,\r\n ...fields,\r\n },\r\n fields: {\r\n ...state.fields,\r\n errors: {\r\n ...state.fields.errors,\r\n ...errors,\r\n },\r\n readonly: {\r\n ...state.fields.readonly,\r\n ...fields.readonly,\r\n },\r\n },\r\n entities: {\r\n ...state.entities,\r\n ...entities,\r\n },\r\n };\r\n};\r\n\r\nconst processChangeOrderAccountFields = (state, fields) => {\r\n const errors = Object.keys(fields).reduce((o, name) => {\r\n o[name] = undefined;\r\n return o;\r\n }, {});\r\n\r\n const { order } = state;\r\n const { CurrentAccount, Accounts } = order;\r\n const { index } = CurrentAccount;\r\n\r\n let modFields = fields;\r\n\r\n let orderFields = {};\r\n if (modFields.hasOwnProperty(\"Quantity\")) {\r\n // Update order total quantity\r\n orderFields.OrderQuantity = 0;\r\n if (index >= 0) {\r\n if (Accounts) {\r\n Accounts.forEach((account) => {\r\n if (account.index !== index) {\r\n orderFields.OrderQuantity += parseFloat(account.Quantity);\r\n }\r\n });\r\n }\r\n }\r\n orderFields.OrderQuantity += modFields.Quantity;\r\n }\r\n\r\n // Full liquidation option\r\n if (modFields.hasOwnProperty(\"IsFullLiquidation\")) {\r\n // This option is valid only on single account orders.\r\n if (modFields.IsFullLiquidation) {\r\n orderFields.OrderQuantityIsCash = false;\r\n modFields.Quantity = CurrentAccount.AccountAssetBalance || 0;\r\n orderFields.OrderQuantity = modFields.Quantity;\r\n }\r\n }\r\n if (modFields.hasOwnProperty(\"AccountAssetBalance\")) {\r\n if (CurrentAccount.IsFullLiquidation) {\r\n // This option is valid only on single account orders.\r\n modFields.Quantity = modFields.AccountAssetBalance;\r\n orderFields.OrderQuantity = modFields.Quantity;\r\n }\r\n }\r\n\r\n if (modFields.AttachmentFileType) {\r\n modFields.HasFile = true;\r\n modFields.HasFileUploadPending = true;\r\n errors.Instruction = undefined;\r\n } else {\r\n modFields.HasFile = false;\r\n modFields.HasFileUploadPending = false;\r\n errors.Instruction = undefined;\r\n }\r\n\r\n if (modFields.hasOwnProperty(\"AccountUseMarkUP\")) {\r\n if (modFields.AccountUseMarkUP === false) {\r\n modFields.Markup = 0;\r\n modFields.FXMarkup = 0;\r\n }\r\n }\r\n\r\n return {\r\n ...state,\r\n order: {\r\n ...state.order,\r\n ...orderFields,\r\n CurrentAccount: {\r\n ...state.order.CurrentAccount,\r\n ...modFields,\r\n },\r\n },\r\n fields: {\r\n ...state.fields,\r\n errors: {\r\n ...state.fields.errors,\r\n ...errors,\r\n },\r\n },\r\n };\r\n};\r\n\r\nconst processConfirm_basket = (state) => {\r\n const { precheck, order } = state;\r\n\r\n let modifyLabel = \"Add Another account\";\r\n let precheckFailed = false;\r\n\r\n if (precheck.status == \"failed\") {\r\n precheckFailed = true;\r\n modifyLabel = \"Modify\";\r\n }\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n mode: Mode.PRECHECK,\r\n },\r\n order: {\r\n Accounts: order.Accounts.map((acc) => {\r\n if (acc.index == order.CurrentAccount.index) {\r\n return { ...acc, delete: precheckFailed };\r\n }\r\n return acc;\r\n }),\r\n CurrentAccount: {\r\n delete: precheckFailed,\r\n },\r\n },\r\n buttons: {\r\n confirm: {\r\n visible: precheck.status != \"failed\",\r\n label: \"Confirm\",\r\n },\r\n modify: {\r\n visible: true,\r\n label: modifyLabel,\r\n loading: false,\r\n },\r\n save: {\r\n visible: false,\r\n },\r\n },\r\n }\r\n );\r\n};\r\n\r\nconst processConfirm_bulk = (state) => {\r\n const { precheck, order } = state;\r\n\r\n let modifyLabel = \"Add another account\";\r\n let precheckFailed = false;\r\n\r\n if (precheck.status == \"failed\") {\r\n precheckFailed = true;\r\n modifyLabel = \"Modify\";\r\n }\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n mode: Mode.PRECHECK,\r\n },\r\n order: {\r\n Accounts: order.Accounts.map((acc) => {\r\n if (acc.index == order.CurrentAccount.index) {\r\n return { ...acc, delete: precheckFailed };\r\n }\r\n return acc;\r\n }),\r\n CurrentAccount: {\r\n delete: precheckFailed,\r\n },\r\n },\r\n buttons: {\r\n confirm: {\r\n visible: precheck.status != \"failed\",\r\n label: \"Confirm\",\r\n },\r\n modify: {\r\n visible: true,\r\n label: modifyLabel,\r\n },\r\n save: {\r\n visible: false,\r\n },\r\n },\r\n }\r\n );\r\n};\r\n\r\nconst processConfirm = (state) => {\r\n const { ui } = state;\r\n\r\n if (ui.isBasket) {\r\n return processConfirm_basket(state);\r\n }\r\n\r\n if (ui.isBulk) {\r\n return processConfirm_bulk(state);\r\n }\r\n\r\n let confirmLabel = \"Confirm\";\r\n\r\n if (\r\n Object.keys(state.precheck.authorizations).length !== 0 &&\r\n state.precheck.authorizations.filter((auth) => auth.role == \"SELF\").length !== 0\r\n ) {\r\n confirmLabel = \"Authorize and Confirm\";\r\n }\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n mode: Mode.CONFIRM,\r\n },\r\n buttons: {\r\n confirm: {\r\n visible: state.precheck.status != \"failed\",\r\n label: confirmLabel,\r\n },\r\n modify: { visible: true },\r\n },\r\n wizzard: {\r\n nextBtn: {\r\n ...state.wizzard.nextBtn,\r\n visible: state.precheck.status != \"failed\",\r\n },\r\n },\r\n }\r\n );\r\n};\r\n\r\nconst processPrecheck = (state) => {\r\n let errors = validateForm(state);\r\n const order = {};\r\n\r\n // check if order instruction is written and the file was uploaded\r\n const { AttachmentFileType, Instruction } = state.order.CurrentAccount;\r\n if (Instruction === \"Written\" && (AttachmentFileType == \"\" || !AttachmentFileType)) {\r\n if (errors === false) {\r\n errors = {};\r\n }\r\n errors.Instruction = \"Attachment required\";\r\n }\r\n\r\n if (errors === false) {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n mode: Mode.PRECHECK,\r\n },\r\n buttons: {\r\n save: { visible: false },\r\n precheck: { visible: false },\r\n confirm: { visible: false },\r\n },\r\n fields: {\r\n errors,\r\n },\r\n order,\r\n }\r\n );\r\n } else {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n fields: {\r\n errors,\r\n },\r\n }\r\n );\r\n }\r\n};\r\n\r\nconst processExecute = (state, orderId) => {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n mode: Mode.EXECUTE,\r\n },\r\n buttons: {\r\n save: { visible: false },\r\n precheck: { visible: false },\r\n confirm: { visible: false },\r\n modify: { visible: false },\r\n },\r\n order: {\r\n OrderId: orderId,\r\n },\r\n }\r\n );\r\n};\r\n\r\nconst processAccountInfo = (state, _items, updateOrderValues) => {\r\n const { ui, order, initFetchs } = state;\r\n const { CurrentAccount, AssetClassForm } = order;\r\n const items = _items.reduce((obj, item) => {\r\n obj[item.key] = item.value;\r\n return obj;\r\n }, {});\r\n\r\n const commissionDisabled = items[\"CommissionEnabled\"] == \"false\" ? \"HRO\" : undefined;\r\n const markupHidden = items[\"MarkupVisible\"] == \"false\" ? true : undefined;\r\n const FXMarkupAllowed = items[\"FXMarkupAllowed\"] == \"false\" ? false : true;\r\n const custodyHidden = items[\"AsksCustody\"] == \"false\" ? true : undefined;\r\n\r\n let commissionType = CurrentAccount.CommissionType;\r\n let commissionValue = CurrentAccount.Commission;\r\n\r\n let markupType = CurrentAccount.MarkupType;\r\n let markupValue = CurrentAccount.Markup;\r\n\r\n let FXMarkupType = CurrentAccount.FXMarkupType;\r\n let FXMarkupValue = CurrentAccount.FXMarkup;\r\n\r\n let currentInfoDate = CurrentAccount.CurrentInfoDate;\r\n\r\n const accountIsInOrder =\r\n order.Accounts && order.Accounts.find((acc) => acc.index == CurrentAccount.index) != undefined;\r\n const isMultiaccount = order.OrderHasMultipleAccounts;\r\n\r\n if (order.OrderId == undefined || initFetchs.accountInfo || (isMultiaccount && !accountIsInOrder)) {\r\n if (updateOrderValues) {\r\n markupValue = 0;\r\n markupType = CommissionType.FaceValueCash;\r\n FXMarkupValue = 0;\r\n FXMarkupType = CommissionType.FaceValueCash;\r\n if (order.OrderId == undefined) {\r\n currentInfoDate = new Date().toDateLocal();\r\n }\r\n\r\n if (commissionType == undefined) {\r\n commissionType = CommissionType.PrincipalPercentage;\r\n }\r\n if (commissionValue == undefined) {\r\n commissionValue = 0;\r\n }\r\n\r\n if ([ProductType.FOREX].indexOf(AssetClassForm) >= 0) {\r\n commissionValue = 0;\r\n } else {\r\n if (items[\"CommissionType\"]) {\r\n commissionType = items[\"CommissionType\"];\r\n }\r\n\r\n if (items[\"CommissionValue\"]) {\r\n commissionValue = +items[\"CommissionValue\"];\r\n }\r\n }\r\n }\r\n }\r\n\r\n const nextState = mergeDeep(\r\n { ...state },\r\n {\r\n order: {\r\n CurrentAccount: {\r\n Commission: commissionValue,\r\n CommissionType: commissionType,\r\n Markup: markupValue,\r\n MarkupType: markupType,\r\n FXMarkup: FXMarkupValue,\r\n FXMarkupType,\r\n CurrentInfoDate: currentInfoDate,\r\n },\r\n },\r\n precheck: {\r\n FXMarkupAllowed: FXMarkupAllowed,\r\n },\r\n fields: {\r\n readonly: {\r\n FXMarkupAllowed: FXMarkupAllowed,\r\n Commission: ui.mode == Mode.READONLY || commissionDisabled,\r\n CommissionType: ui.mode == Mode.READONLY || commissionDisabled,\r\n },\r\n hiddens: {\r\n MarkupType: markupHidden,\r\n Markup: markupHidden,\r\n RequiresSpecialCustody: state.fields.hiddens.RequiresSpecialCustody || custodyHidden,\r\n },\r\n },\r\n initFetchs: {\r\n accountInfo: true,\r\n },\r\n }\r\n );\r\n\r\n if (ui.mode == Mode.EDIT_COMMISSION) {\r\n if (!(commissionDisabled && markupHidden)) {\r\n nextState.buttons.confirm.visible = true;\r\n\r\n if (nextState.wizzard.enabled) {\r\n nextState.wizzard.nextBtn.visible = true;\r\n }\r\n }\r\n }\r\n\r\n return nextState;\r\n};\r\n\r\nconst processAssetInfo = (state, data) => {\r\n const { order } = state;\r\n\r\n let itemsDict = {};\r\n data.items.forEach((item) => {\r\n itemsDict[item.key] = item.value;\r\n });\r\n\r\n let defaultSettlementCurrency = {};\r\n let availableSettlementCurrencies = [];\r\n\r\n const settlementCurrencies = data.settlementCurrency.map((c) => {\r\n const { currencyInfo, multiplies, fx } = c;\r\n availableSettlementCurrencies.push(c.currencyInfo.currencyId);\r\n if (currencyInfo.CurrencyIsDefault) {\r\n defaultSettlementCurrency = {\r\n id: currencyInfo.currencyId,\r\n name: currencyInfo.currencyISO,\r\n };\r\n }\r\n return {\r\n id: currencyInfo.currencyId,\r\n description: currencyInfo.currencyISO,\r\n multiplies,\r\n fx,\r\n };\r\n });\r\n\r\n const orderPropsUpd = {};\r\n const errors = {};\r\n\r\n if (order.AssetClassForm != ProductType.FOREX) {\r\n if (\r\n !order.OrderSettlementCurrencyId ||\r\n !availableSettlementCurrencies.includes(order.OrderSettlementCurrencyId.toString())\r\n ) {\r\n orderPropsUpd.OrderSettlementCurrencyId = defaultSettlementCurrency.id;\r\n orderPropsUpd.OrderSettlementCurrencySymbol = defaultSettlementCurrency.name;\r\n errors.OrderSettlementCurrencySymbol = undefined;\r\n }\r\n\r\n order.OrderCurrencySymbol = itemsDict.Currency;\r\n order.AssetCanBeSelfCustodied = data.custody;\r\n }\r\n\r\n order.SubAssetClassDecimalPlaces = parseInt(itemsDict.MaxDecimals, 10);\r\n\r\n order.AssetPriceIsDiscounted = false;\r\n if (itemsDict.AssetPriceIsDiscounted !== undefined) {\r\n order.AssetPriceIsDiscounted = itemsDict.AssetPriceIsDiscounted.toLowerCase() === \"true\";\r\n }\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n order: {\r\n ...orderPropsUpd,\r\n },\r\n fields: {\r\n errors: {\r\n ...errors,\r\n },\r\n },\r\n entities: {\r\n settlementCurrencies,\r\n },\r\n }\r\n );\r\n};\r\n\r\nconst processEdit = (state) => {\r\n const multiAccount = state.ui.isBasket || state.ui.isBulk;\r\n\r\n let merge = mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n mode: Mode.EDIT,\r\n },\r\n buttons: {\r\n modify: { visible: false },\r\n precheck: { visible: !multiAccount, label: \"Precheck\" },\r\n confirm: { visible: multiAccount },\r\n save: {\r\n visible: state.ui.userRole == UserType.Advisor && !multiAccount && !state.precheck.validations,\r\n },\r\n },\r\n precheck: {\r\n authorizations: [],\r\n validations: null,\r\n histories: [],\r\n status: undefined,\r\n },\r\n }\r\n );\r\n\r\n if (multiAccount) {\r\n let editAccount = { AccountId: null };\r\n if (state.precheck.status == \"failed\") {\r\n editAccount = state.order.CurrentAccount;\r\n editAccount.delete = true;\r\n }\r\n merge.order.CurrentAccount = editAccount;\r\n }\r\n\r\n return merge;\r\n};\r\n\r\nconst validateForm = (state) => {\r\n const { ui, order, fields } = state;\r\n const { hiddens, readonly } = fields;\r\n const { validation } = formProps[order.AssetClassForm];\r\n\r\n const errors = {};\r\n\r\n Object.entries(validation(order, ui.userRole)).forEach(([name, value]) => {\r\n if (!hiddens[name] && !readonly[name]) {\r\n if (value.empty) {\r\n // Verify if value should be controlled for emptyness\r\n\r\n if (value.accountLevel) {\r\n // Value should be controlled in order accounts.\r\n if (order.OrderHasMultipleAccounts) {\r\n if (order.Accounts && order.Accounts.length > 0) {\r\n // View Accounts list\r\n order.Accounts.forEach((account) => {\r\n if (account.AccountId != 0) {\r\n if (account[name] == undefined || account[name] === \"\") {\r\n errors[name] = \"Required field\";\r\n } else if (value.autosuggestId && account[value.autosuggestId] == undefined) {\r\n errors[name] = \"Must select a value from list\";\r\n }\r\n }\r\n });\r\n }\r\n } else {\r\n // View CurrentAccount\r\n if (order.CurrentAccount[name] == undefined || order.CurrentAccount[name] === \"\") {\r\n errors[name] = \"Required field\";\r\n } else if (value.autosuggestId && order.CurrentAccount[value.autosuggestId] == undefined) {\r\n errors[name] = \"Must select a value from list\";\r\n }\r\n }\r\n } else {\r\n if (order[name] == undefined || order[name] === \"\") {\r\n errors[name] = \"Required field\";\r\n } else if (value.autosuggestId && order[value.autosuggestId] == undefined) {\r\n errors[name] = \"Must select a value from list\";\r\n }\r\n }\r\n }\r\n }\r\n });\r\n\r\n if (ui.userRole != UserType.Trader && ui.isBulk) {\r\n if (order.Accounts == undefined || order.Accounts.length == 0) {\r\n errors[\"Accounts\"] = \"Require an account\";\r\n }\r\n }\r\n\r\n if (ui.mode == Mode.REALLOCATE) {\r\n if (order.CurrentAccount.AccountId == order.CurrentAccountId) {\r\n errors[\"AccountName\"] = \"Must be different from the order being reallocated\";\r\n }\r\n }\r\n\r\n if (ui.type == Type.Cross) {\r\n // if second order form, check quantity over or equal than first order\r\n if (state.wizzard.enabled && state.wizzard.activeStep == 2) {\r\n if (!errors.OrderQuantity) {\r\n if (+state.wizzard.steps[0].context.order.OrderQuantity > +order.OrderQuantity) {\r\n errors[\r\n \"OrderQuantity\"\r\n ] = `Must be equal or grather than ${state.wizzard.steps[0].context.order.OrderQuantity}`;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // has Errors only add errors to state\r\n if (Object.keys(errors).length !== 0) {\r\n return errors;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nconst updatePrecheck = (state, props) => {\r\n const newProps = {};\r\n\r\n if (props.order) {\r\n const { order } = props;\r\n const { OrderChainOffsetCash, OrderChainOffsetCurrencyId, AssetId } = order;\r\n\r\n newProps.order = {\r\n OrderChainOffsetCash,\r\n OrderChainOffsetCurrencyId,\r\n CurrentAccount: {\r\n Precheck: order.CurrentAccount.Precheck,\r\n },\r\n AssetId,\r\n };\r\n\r\n newProps.precheck = order.CurrentAccount.Precheck;\r\n } else {\r\n newProps.precheck = {\r\n ...props,\r\n };\r\n }\r\n return mergeDeep({ ...state }, { ...newProps });\r\n};\r\n\r\nconst editAccount = (state, { props }) => {\r\n const { Accounts } = state.order;\r\n const { index } = props.account;\r\n const others = {};\r\n const errors = {};\r\n const order = {};\r\n\r\n const { account } = props;\r\n\r\n if (props.type == Type.Basket || props.type == Type.Bulk) {\r\n others.ui = {\r\n mode: Mode.PRECHECK,\r\n };\r\n\r\n others.buttons = {\r\n save: { visible: false },\r\n precheck: { visible: false },\r\n confirm: { visible: false },\r\n };\r\n\r\n //update errors\r\n errors.Accounts = undefined;\r\n errors.OrderQuantity = undefined;\r\n\r\n others.fields = { errors };\r\n\r\n account.pendingServerUpdate = true;\r\n }\r\n\r\n let newState = mergeDeep(\r\n { ...state },\r\n {\r\n ...others,\r\n }\r\n );\r\n\r\n if (props.type == Type.Basket || props.type == Type.Bulk) {\r\n newState.order.Accounts = Accounts || [];\r\n if (index >= 0) {\r\n newState.order.Accounts = newState.order.Accounts.filter((acc) => acc.index !== index);\r\n }\r\n newState.order.Accounts.push(account);\r\n }\r\n\r\n newState.order.OrderQuantity = newState.order.Accounts.reduce((sum, a) => sum + parseFloat(a.Quantity), 0);\r\n\r\n newState.order.CurrentAccount = account;\r\n\r\n return newState;\r\n};\r\n\r\nconst deleteAccount = (state, { accountIndex }) => {\r\n const { Accounts } = state.order;\r\n\r\n let accountId = -1;\r\n if (accountIndex >= 0 && Accounts) {\r\n Accounts.find((acc) => {\r\n if (acc.index === accountIndex) {\r\n accountId = acc.AccountId;\r\n return true;\r\n }\r\n return false;\r\n });\r\n }\r\n\r\n const accountsUpd = Accounts.filter((acc) => acc.index !== accountIndex);\r\n const OrderQuantity = accountsUpd.reduce((sum, a) => sum + parseFloat(a.Quantity), 0);\r\n\r\n return {\r\n ...state,\r\n order: {\r\n ...state.order,\r\n Accounts: accountsUpd,\r\n OrderQuantity,\r\n CurrentAccount: {},\r\n },\r\n attachments: {\r\n ...state.attachments,\r\n [accountId]: undefined,\r\n },\r\n };\r\n};\r\n\r\nconst selectAccount = (state, { props }) => {\r\n const { Accounts } = state.order;\r\n const { accountIndex } = props;\r\n\r\n const nextIndex = Accounts ? Accounts.length : 0;\r\n\r\n let account;\r\n\r\n if (accountIndex >= 0 && Accounts) {\r\n account = Accounts.find((acc) => acc.index === accountIndex);\r\n }\r\n\r\n if (account === undefined) {\r\n account = {\r\n index: nextIndex,\r\n CommissionType: CommissionType.PrincipalPercentage,\r\n MarkupType: CommissionType.FaceValueCash,\r\n FXMarkupType: CommissionType.FaceValueCash,\r\n CurrentInfoDate: toDateLocal(new Date()),\r\n };\r\n }\r\n\r\n return {\r\n ...state,\r\n order: {\r\n ...state.order,\r\n CurrentAccount: account,\r\n },\r\n };\r\n};\r\n\r\nconst setAttachment = (state, { file, id }) => {\r\n return {\r\n ...state,\r\n attachments: {\r\n ...state.attachments,\r\n [id]: file,\r\n },\r\n order: {\r\n ...state.order,\r\n AttachmentFileUploadPending: true,\r\n },\r\n buttons: {\r\n ...state.buttons,\r\n save: {\r\n ...state.buttons.confirm,\r\n label: \"Save\",\r\n visible: state.ui.userRole === UserType.MiddleOffice,\r\n },\r\n },\r\n };\r\n};\r\n\r\nconst wizzStepBack = (state) => {\r\n const { wizzard, ...actualState } = state;\r\n const { activeStep } = state.wizzard;\r\n\r\n return {\r\n ...wizzard.steps[activeStep - 1].context,\r\n\r\n wizzard: {\r\n ...wizzard,\r\n activeStep: activeStep - 1,\r\n nextBtn: {\r\n visible: true,\r\n label: wizzard.steps[activeStep - 1].nextLabel,\r\n },\r\n steps: {\r\n ...wizzard.steps,\r\n [activeStep]: {\r\n ...wizzard.steps[activeStep],\r\n context: actualState,\r\n },\r\n },\r\n },\r\n };\r\n};\r\n\r\nconst wizzNextStep = (state) => {\r\n const { wizzard, ...oldState } = state;\r\n const nextBtn = {};\r\n\r\n let nextState;\r\n\r\n if (state.wizzard.activeStep == 0) {\r\n // perform precheck first order\r\n nextState = processPrecheck(state);\r\n nextBtn.visible = false;\r\n\r\n // precheck failed\r\n if (nextState.ui.mode != Mode.PRECHECK) {\r\n return nextState;\r\n }\r\n } else if (state.wizzard.activeStep == 1) {\r\n // perform prepare form for second order\r\n const { buttons, fields, order, initFetchs, precheck } = defaultState();\r\n\r\n let copyProps = {};\r\n let readonly = { ...fields.readonly };\r\n\r\n if (state.ui.type == Type.Chained) {\r\n const { precheck } = state;\r\n copyProps = copyChainedOrderPropsNextStep(wizzard.steps[0].context.order, precheck);\r\n readonly.AccountName = true;\r\n }\r\n\r\n if (state.ui.type == Type.Cross) {\r\n copyProps = copyCrossOrderPropsNextStep(wizzard.steps[0].context.order);\r\n }\r\n\r\n nextBtn.visible = true;\r\n\r\n if (wizzard.steps[2].context != null) {\r\n nextState = mergeFirstStepChangesToNextStep(state);\r\n } else {\r\n nextState = {\r\n ui: {\r\n ...state.ui,\r\n mode: Mode.EDIT,\r\n },\r\n buttons,\r\n fields: {\r\n ...fields,\r\n readonly,\r\n },\r\n order: {\r\n ...order,\r\n ...formProps[state.order.AssetClassForm].defaults(Type.Default),\r\n ...copyProps,\r\n },\r\n entities: {\r\n ...wizzard.steps[0].context.entities,\r\n },\r\n initFetchs,\r\n precheck,\r\n };\r\n }\r\n\r\n nextState.wizzard = { ...state.wizzard };\r\n\r\n if (nextState.order.OrderHierarchy == Type.Chained) {\r\n const readOnlyAssetForm = readonly.AssetClassForm || state.order.OrderIsSwitch;\r\n nextState.fields.readonly.OrderSide = true;\r\n nextState.fields.readonly.AssetClassForm = readOnlyAssetForm;\r\n nextState.fields.readonly.OrderIsSwitch = true;\r\n\r\n nextState.order.OrderSide = \"Buy\";\r\n nextState.order.OrderIsSwitch = state.order.OrderIsSwitch;\r\n nextState.order.OrderChainOffsetCash = state.order.OrderChainOffsetCash;\r\n nextState.order.OrderChainOffsetCurrencyId = state.order.OrderChainOffsetCurrencyId;\r\n nextState.entities = {\r\n settlementCurrencies: null,\r\n };\r\n }\r\n\r\n if (nextState.order.OrderHierarchy == Type.Cross) {\r\n nextState.fields.readonly.OrderType = true;\r\n nextState.fields.readonly.OrderSide = true;\r\n nextState.fields.readonly.AssetTicker = true;\r\n nextState.fields.readonly.AssetClassForm = true;\r\n nextState.order.OrderSide = state.order.OrderSide == \"Buy\" ? \"Sell\" : \"Buy\";\r\n }\r\n } else if (state.wizzard.activeStep == 2) {\r\n // perform precheck second order\r\n nextState = processPrecheck(state);\r\n\r\n // precheck failed\r\n if (nextState.ui.mode != Mode.PRECHECK) {\r\n return nextState;\r\n }\r\n }\r\n\r\n const nextStep = nextState.wizzard.activeStep + 1;\r\n\r\n nextState.wizzard = {\r\n ...wizzard,\r\n activeStep: nextStep,\r\n nextBtn: {\r\n label: wizzard.steps[nextStep].nextLabel,\r\n ...nextBtn,\r\n },\r\n\r\n steps: {\r\n ...wizzard.steps,\r\n [wizzard.activeStep]: {\r\n ...wizzard.steps[wizzard.activeStep],\r\n context: oldState,\r\n },\r\n },\r\n };\r\n\r\n nextState.ui.title = getTitle({ ui: state.ui, wizzard: nextState.wizzard });\r\n\r\n return nextState;\r\n};\r\n\r\nconst getTitle = ({ ui, wizzard }) => {\r\n let typeName = \"\";\r\n if (ui.isBulk) {\r\n typeName = \" Bulk\";\r\n } else if (ui.isBasket) {\r\n typeName = \" Basket\";\r\n }\r\n\r\n if (ui.mode == Mode.REALLOCATE) {\r\n return `Reallocate Order`;\r\n }\r\n\r\n if (ui.type == Type.Chained || ui.type == Type.Cross) {\r\n if (ui.mode == Mode.EDIT_COMMISSION) {\r\n return `Offer (from ${ui.type})`;\r\n } else if (wizzard.enabled && ui.mode != Mode.READONLY) {\r\n return wizzard.steps[wizzard.activeStep].title;\r\n } else {\r\n return `View Order (from ${ui.type})`;\r\n }\r\n }\r\n\r\n if (wizzard.enabled && ui.mode != Mode.READONLY) {\r\n return wizzard.steps[wizzard.activeStep].title;\r\n } else if (ui.mode != Mode.READONLY) {\r\n return `Edit${typeName} Offer`;\r\n } else {\r\n return `View${typeName} Offer`;\r\n }\r\n};\r\n\r\nfunction copyChainedOrderPropsNextStep(order, precheck) {\r\n const { OrderHierarchy, OrderIsBasket, OrderHasMultipleAccounts, OrderIsSwitch } = order;\r\n\r\n const { AccountId, AccountNumber, AccountName, HolderId, HolderName, Instruction, IsFullLiquidation } =\r\n order.CurrentAccount;\r\n\r\n const switchProps = {};\r\n const switchAccountProps = {};\r\n\r\n // copy first order IsSwitch\r\n switchProps.OrderIsSwitch = OrderIsSwitch;\r\n\r\n if (OrderIsSwitch) {\r\n // order level props\r\n switchProps.OrderQuantity = precheck.Principal;\r\n switchProps.AssetClassForm = order.AssetClassForm;\r\n switchProps.OrderQuantityIsCash = true;\r\n // account props\r\n switchAccountProps.Quantity = precheck.Principal;\r\n switchAccountProps.IsFullLiquidation = false;\r\n }\r\n\r\n return {\r\n OrderHierarchy,\r\n OrderIsBasket,\r\n OrderHasMultipleAccounts,\r\n ...switchProps,\r\n CurrentAccount: {\r\n AccountId,\r\n AccountNumber,\r\n AccountName,\r\n HolderId,\r\n HolderName,\r\n Instruction,\r\n ...switchAccountProps,\r\n },\r\n };\r\n}\r\n\r\nfunction copyCrossOrderPropsNextStep(order) {\r\n const {\r\n OrderHierarchy,\r\n OrderIsBasket,\r\n OrderHasMultipleAccounts,\r\n AssetClassForm,\r\n AssetDescription,\r\n AssetId,\r\n AssetTicker,\r\n AssetSecurityProvider,\r\n OrderSettlementCurrencyId,\r\n OrderSettlementCurrencySymbol,\r\n } = order;\r\n return {\r\n OrderHierarchy,\r\n OrderIsBasket,\r\n OrderHasMultipleAccounts,\r\n AssetClassForm,\r\n AssetDescription,\r\n AssetId,\r\n AssetTicker,\r\n AssetSecurityProvider,\r\n OrderSettlementCurrencyId,\r\n OrderSettlementCurrencySymbol,\r\n };\r\n}\r\n\r\nfunction mergeFirstStepChangesToNextStep(state) {\r\n const { wizzard, precheck } = state;\r\n const step1_order = wizzard.steps[0].context.order;\r\n const step2 = { ...wizzard.steps[2].context };\r\n\r\n if (step1_order.OrderIsSwitch) {\r\n // copy fields again\r\n const copyProps = copyChainedOrderPropsNextStep(step1_order, precheck);\r\n return {\r\n ...step2,\r\n order: {\r\n ...step2.order,\r\n ...copyProps,\r\n },\r\n };\r\n }\r\n\r\n return step2;\r\n}\r\n\r\nexport { validateForm, getTitle };\r\n","/* eslint-disable no-cond-assign */\r\nimport React from 'react';\r\nimport { formProps } from '../../Order/Form';\r\nimport {\r\n Type, ProductType, Mode, OrderStatus, OrderPriceType, TimeFrame, CommissionType,\r\n} from '../../../../utils/Order/Order';\r\nimport { getTitle } from './reducer';\r\nimport { UserType, toDateLocal } from '../../../../utils/Helper';\r\n\r\nexport const Dispatch = React.createContext(null);\r\n\r\nexport const initialize = (props) => (initialState) => {\r\n const type = props.type || props.order.OrderHierarchy || initialState.ui.type;\r\n const form = props.order.AssetClassForm || initialState.order.AssetClassForm;\r\n const formDefaults = formProps[form].defaults();\r\n\r\n let CurrentAccount = {};\r\n if (props.order.CurrentAccount) {\r\n CurrentAccount = props.order.CurrentAccount;\r\n }\r\n\r\n let accounts = [];\r\n if (props.order.Accounts) {\r\n accounts = props.order.Accounts.map((account, index) => ({ ...account, index }));\r\n }\r\n\r\n const orderExists = props.order.OrderId > 0;\r\n const isBasket = orderExists ? props.order.OrderIsBasket : (type == Type.Basket);\r\n const isBulk = orderExists\r\n ? (props.order.OrderHasMultipleAccounts && !isBasket) : (type == Type.Bulk);\r\n\r\n\r\n const state = {\r\n ...initialState,\r\n ui: {\r\n ...initialState.ui,\r\n mode: props.mode || initialState.ui.mode,\r\n type,\r\n isBasket,\r\n isBulk,\r\n userRole: props.userType || initialState.ui.userRole,\r\n parameters: props.parameters || initialState.ui.parameters,\r\n },\r\n order: {\r\n ...initialState.order,\r\n ...formDefaults,\r\n ...props.order,\r\n CurrentAccount,\r\n OrderHierarchy: type,\r\n OrderIsBasket: isBasket,\r\n OrderHasMultipleAccounts: isBasket || isBulk,\r\n Accounts: accounts,\r\n },\r\n validOffer: true,\r\n };\r\n\r\n if (orderExists) {\r\n if (props.order.OrderType == OrderPriceType.MARKETONOPEN || \r\n props.order.OrderType == OrderPriceType.MARKETONCLOSE) {\r\n state.fields.readonly.OrderTimeInForce = true\r\n }\r\n }\r\n state.buttons.confirm.visible = true;\r\n state.buttons.confirm.label = 'Confirm';\r\n \r\n\r\n // dialog mode\r\n if (state.ui.mode === Mode.READONLY) {\r\n state.buttons.precheck.visible = false;\r\n state.buttons.save.visible = false;\r\n state.buttons.confirm.visible = false;\r\n\r\n state.fields = {\r\n ...state.fields,\r\n readonly: {},\r\n };\r\n\r\n Object.keys(state.order).forEach((key) => {\r\n state.fields.readonly[key] = true;\r\n });\r\n\r\n Object.keys(state.order.CurrentAccount).forEach((key) => {\r\n state.fields.readonly[key] = true;\r\n });\r\n\r\n if (state.wizzard.enabled) {\r\n state.wizzard.nextBtn.visible = false;\r\n }\r\n\r\n if ((props.userType == UserType.Trader && props.order.AccountType != 'Customer')\r\n || state.ui.isBasket) {\r\n state.fields.hiddens.Commission = true;\r\n state.fields.hiddens.CommissionType = true;\r\n state.fields.hiddens.Markup = true;\r\n state.fields.hiddens.MarkupType = true;\r\n }\r\n\r\n if (props.userType === UserType.Advisor && state.order.OrderId && state.order.OrderStatus === OrderStatus.AUTH_WAIT) {\r\n state.order.canResendAuthorizations = true;\r\n }\r\n } else if (state.ui.mode === Mode.EDIT) {\r\n const { order } = props;\r\n\r\n if (props.userType == UserType.Advisor && state.ui.type == Type.Default\r\n && (!order.OrderId || order.OrderStatus == OrderStatus.PARKED)) {\r\n state.buttons.save.visible = true;\r\n }\r\n\r\n if ((props.userType == UserType.Trader && props.order.AccountType != 'Customer')\r\n || state.ui.isBasket) {\r\n state.fields.hiddens.Commission = true;\r\n state.fields.hiddens.CommissionType = true;\r\n state.fields.hiddens.Markup = true;\r\n state.fields.hiddens.MarkupType = true;\r\n state.fields.hiddens.RequiresSpecialCustody = true;\r\n }\r\n } else if (state.ui.mode === Mode.EDIT_COMMISSION) {\r\n const {\r\n Markup, MarkupType, FXMarkup, FXMarkupType, Commission, CommissionType, ...tmpCurrentAccount\r\n } = state.order.CurrentAccount;\r\n Object.keys(tmpCurrentAccount).forEach((f) => {\r\n state.fields.readonly[f] = true;\r\n });\r\n Object.keys(state.order).forEach((f) => {\r\n state.fields.readonly[f] = true;\r\n });\r\n\r\n state.buttons.precheck.visible = false;\r\n state.buttons.confirm.visible = false;\r\n state.buttons.confirm.label = 'Confirm changes';\r\n\r\n if (state.wizzard.enabled) {\r\n state.wizzard.nextBtn.visible = false;\r\n state.wizzard.nextBtn.label = 'Confirm changes';\r\n }\r\n } else if (state.ui.mode == Mode.QUOTE) {\r\n state.fields.readonly.AssetTicker = true;\r\n state.fields.readonly.OrderPrice = true;\r\n state.fields.readonly.OrderQuantity = true;\r\n state.fields.readonly.Quantity = true;\r\n state.fields.readonly.OrderType = true;\r\n state.fields.readonly.OrderSide = true;\r\n\r\n state.ui.mode = Mode.EDIT;\r\n state.ui.quoteId = props.order.quoteId;\r\n } else if (state.ui.mode === Mode.REALLOCATE) {\r\n const {\r\n AccountName, HolderName, Instruction, Markup, MarkupType, FXMarkup, FXMarkupType, Commission,\r\n CommissionType, ...tmpCurrentAccount\r\n } = state.order.CurrentAccount;\r\n\r\n // Mark account level fields as read only\r\n Object.keys(tmpCurrentAccount).forEach((f) => {\r\n state.fields.readonly[f] = true;\r\n });\r\n\r\n // Mark order fields as read only\r\n Object.keys(state.order).forEach((f) => {\r\n state.fields.readonly[f] = true;\r\n });\r\n state.order.CurrentAccountId = state.order.AccountId;\r\n }\r\n\r\n // title\r\n state.ui.title = getTitle(state);\r\n\r\n return state;\r\n};\r\n\r\nexport const defaultState = () => ({\r\n ui: {\r\n title: 'New Order',\r\n mode: Mode.EDIT,\r\n type: Type.Default,\r\n userRole: 'Advisor',\r\n parameters: {},\r\n },\r\n\r\n buttons: {\r\n precheck: {\r\n visible: true,\r\n },\r\n modify: {\r\n visible: false,\r\n },\r\n confirm: {\r\n label: null,\r\n visible: false,\r\n loading: false,\r\n completed: false,\r\n },\r\n save: {\r\n visible: false,\r\n loading: false,\r\n completed: false,\r\n },\r\n },\r\n\r\n fields: {\r\n readonly: {},\r\n errors: {},\r\n hiddens: {},\r\n },\r\n\r\n order: {\r\n AssetClassForm: ProductType.BOND,\r\n OrderInitDate: toDateLocal(new Date()),\r\n OrderSide: 'Buy',\r\n OrderIsSwitch: false,\r\n OrderType: OrderPriceType.MARKET,\r\n OrderTimeInForce: TimeFrame.GTC,\r\n OrderGTD: toDateLocal(new Date()),\r\n CurrentAccount: {\r\n CommissionType: CommissionType.PrincipalPercentage,\r\n MarkupType: CommissionType.FaceValueCash,\r\n FXMarkupType: CommissionType.FaceValueCash,\r\n CurrentInfoDate: toDateLocal(new Date()),\r\n },\r\n },\r\n\r\n attachments: {},\r\n\r\n entities: {\r\n settlementCurrencies: null,\r\n },\r\n\r\n initFetchs: {},\r\n\r\n precheck: {\r\n authorizations: [],\r\n histories: [],\r\n },\r\n\r\n wizzard: {\r\n enabled: false,\r\n activeStep: null,\r\n nextBtn: {\r\n visible: true,\r\n loading: false,\r\n label: '',\r\n },\r\n steps: {},\r\n },\r\n});\r\n\r\nconst chainedWizzardDefault = () => ({\r\n enabled: true,\r\n activeStep: 0,\r\n nextBtn: {\r\n visible: true,\r\n loading: false,\r\n label: 'Precheck first order',\r\n },\r\n steps: {\r\n 0: {\r\n title: 'Chained step 1: First order',\r\n nextLabel: 'Precheck first order',\r\n context: null,\r\n },\r\n 1: {\r\n title: 'Chained step 2: Precheck first order',\r\n nextLabel: 'Confirm and Go to Step 3',\r\n context: null,\r\n },\r\n 2: {\r\n title: 'Chained step 3: Second order',\r\n nextLabel: 'Precheck second order',\r\n context: null,\r\n },\r\n 3: {\r\n title: 'Chained step 4: Precheck second order',\r\n nextLabel: 'Confirm chained',\r\n context: null,\r\n },\r\n },\r\n});\r\n\r\nconst crossWizzardDefault = () => ({\r\n enabled: true,\r\n activeStep: 0,\r\n nextBtn: {\r\n visible: true,\r\n loading: false,\r\n label: 'Precheck first order',\r\n },\r\n steps: {\r\n 0: {\r\n title: 'Cross Step 1: First order',\r\n nextLabel: 'Precheck first order',\r\n context: null,\r\n },\r\n 1: {\r\n title: 'Cross Step 2: Precheck first order',\r\n nextLabel: 'Confirm and Go to Step 3',\r\n context: null,\r\n },\r\n 2: {\r\n title: 'Cross Step 3: Second order',\r\n nextLabel: 'Precheck second order',\r\n context: null,\r\n },\r\n 3: {\r\n title: 'Cross Step 4: Precheck second order',\r\n nextLabel: 'Confirm cross',\r\n context: null,\r\n },\r\n },\r\n});\r\n","import React, { Fragment, useContext, useState } from \"react\";\r\nimport { Table, Form, Button, Label, Input, FormGroup, Col, Row } from \"reactstrap\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport { Dispatch } from \"../store/store\";\r\nimport { Type, CommissionType, getStatusName } from \"../../../../utils/Order/Order\";\r\nimport { toDateLocal, UserType } from \"../../../../utils/Helper\";\r\nimport style from \"./Basket.module.scss\";\r\nimport Edit from \"./Edit\";\r\nimport Order from \"../Order\";\r\nimport { orderReducer } from \"../store/reducer\";\r\nimport { useEffect } from \"react\";\r\nimport Numeric from \"../Field/Numeric\";\r\n\r\nconst Basket = ({\r\n canAddAccount,\r\n removeAccount,\r\n searchAccount,\r\n accountHolders,\r\n accountInfo,\r\n account,\r\n accounts,\r\n onChange,\r\n isReadOnly,\r\n canModifyComposition,\r\n readonly,\r\n balanceReady,\r\n error,\r\n hiddens,\r\n}) => {\r\n const nextAccountIndex = accounts ? accounts.length : 0;\r\n\r\n const [edit, setEdit] = useState({\r\n open: account.index >= 0,\r\n });\r\n\r\n const [offerAdvisors, setOfferAdvisors] = useState(0);\r\n const [offerClients, setOfferClients] = useState(0);\r\n const [offerFeatured, setOfferFeatured] = useState(false);\r\n\r\n const { dispatch, state, services } = useContext(Dispatch);\r\n const { ui, order } = state;\r\n\r\n const getStatus = () => {\r\n return order.isChecked;\r\n };\r\n\r\n const loadOffer = () => {\r\n dispatch({ type: \"CHANGE_ORDER_FIELDS\", fields: { offerGetted: true, isChecked: false } });\r\n if (order.OrderId || (order.offer ? order.offer.OrderId : \"\")) {\r\n let id = order.OrderId ? order.OrderId : order.offer.OrderId;\r\n if (typeof services.account.getOffer === \"function\") {\r\n services.account.getOffer({ orderId: id }).then((resp) => {\r\n if (\r\n resp &&\r\n resp.response.Offer &&\r\n (resp.response.Offer.OfferQuantitytoAdvisor != 0 ||\r\n resp.response.Offer.OfferQuantitytoClient != 0)\r\n ) {\r\n let offerM = {\r\n disabled: resp.response.Offer.disabled,\r\n OfferQuantitytoAdvisor: (\r\n Math.round(resp.response.Offer.OfferQuantitytoAdvisor * 100) / 100\r\n ).toFixed(2),\r\n OfferQuantitytoClient: (\r\n Math.round(resp.response.Offer.OfferQuantitytoClient * 100) / 100\r\n ).toFixed(2),\r\n OfferPrice: resp.response.Offer.OfferPrice,\r\n OfferId: resp.response.Offer.OfferId,\r\n featured: resp.response.Offer.featured,\r\n };\r\n dispatch({\r\n type: \"CHANGE_ORDER_FIELDS\",\r\n fields: { offer: offerM, offerLoaded: resp.response.Offer, isChecked: !offerM.disabled },\r\n });\r\n setOfferAdvisors(offerM.OfferQuantitytoAdvisor);\r\n setOfferClients(offerM.OfferQuantitytoClient);\r\n setOfferFeatured(offerM.featured);\r\n offerM.disabled ? clearFields() : \"\";\r\n } else {\r\n if (!resp) {\r\n resp.response.Offer.OfferId\r\n ? dispatch({\r\n type: \"CHANGE_ORDER_FIELDS\",\r\n fields: { offerLoaded: resp.response.Offer },\r\n })\r\n : \"\";\r\n }\r\n }\r\n });\r\n }\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n dispatch({ type: \"CHANGE_ORDER_FIELDS\", fields: { offer: { disabled: true } } });\r\n loadOffer();\r\n }, []);\r\n\r\n const onSelectAccount = (accountIndex = null) => {\r\n dispatch({\r\n type: \"SELECT_ACCOUNT\",\r\n props: {\r\n accountIndex,\r\n },\r\n });\r\n };\r\n\r\n const changeChecked = (state) => {\r\n dispatch({ type: \"CHANGE_ORDER_FIELDS\", fields: { isChecked: state } });\r\n if (!state) {\r\n clearFields();\r\n dispatch({ type: \"CHANGE_ORDER_FIELDS\", fields: { offer: { disabled: true } } });\r\n } else {\r\n if (order.offerLoaded) {\r\n let offerM = {\r\n ...order.offer,\r\n disabled: false,\r\n OfferQuantitytoAdvisor: (Math.round(order.offerLoaded.OfferQuantitytoAdvisor * 100) / 100).toFixed(\r\n 2\r\n ),\r\n OfferQuantitytoClient: (Math.round(order.offerLoaded.OfferQuantitytoClient * 100) / 100).toFixed(2),\r\n OfferPrice: order.Price,\r\n OfferId: order.offerLoaded.OfferId,\r\n featured: order.offerLoaded.featured,\r\n };\r\n\r\n dispatch({ type: \"CHANGE_ORDER_FIELDS\", fields: { offer: offerM } });\r\n setOfferFeatured(offerM.featured);\r\n setOfferAdvisors((Math.round(order.offerLoaded.OfferQuantitytoAdvisor * 100) / 100).toFixed(2));\r\n setOfferClients((Math.round(order.offerLoaded.OfferQuantitytoClient * 100) / 100).toFixed(2));\r\n }\r\n }\r\n };\r\n\r\n const clearFields = () => {\r\n let offerM = {\r\n ...order.offer,\r\n OfferQuantitytoAdvisor: 0,\r\n OfferQuantitytoClient: 0,\r\n OfferPrice: order.Price,\r\n featured: false,\r\n };\r\n setOfferClients(0);\r\n setOfferAdvisors(0);\r\n setOfferFeatured(false);\r\n dispatch({ type: \"CHANGE_ORDER_FIELDS\", fields: { offer: offerM } });\r\n };\r\n const toggleEdit = (accountIndex = null, discard) => {\r\n if (!edit.open) {\r\n if (canAddAccount()) {\r\n setEdit({ open: true });\r\n onSelectAccount(accountIndex);\r\n }\r\n } else {\r\n if (discard) {\r\n dispatch({ type: \"DELETE_ACCOUNT\", accountIndex });\r\n }\r\n\r\n setEdit({ open: false });\r\n }\r\n };\r\n\r\n const onEditAccount = (account) => {\r\n dispatch({\r\n type: \"EDIT_ACCOUNT\",\r\n props: {\r\n type: Type.Basket,\r\n account,\r\n },\r\n });\r\n };\r\n\r\n const onDownloadFile = (accountId) => {\r\n const { downloadAttachment } = services.account;\r\n const orderId = order.OrderId;\r\n downloadAttachment({ orderId, accountId });\r\n };\r\n\r\n const onDownloadPt = (accountId) => {\r\n const { orderPdf } = services.account;\r\n const orderId = order.OrderId;\r\n orderPdf({\r\n orderId: orderId,\r\n accountId: accountId,\r\n });\r\n };\r\n\r\n const setOfferClientsF = (value) => {\r\n let offerM = {\r\n ...order.offer,\r\n OfferQuantitytoClient: value,\r\n OfferPrice: order.Price,\r\n };\r\n setOfferClients(value);\r\n dispatch({ type: \"CHANGE_ORDER_FIELDS\", fields: { offer: offerM } });\r\n };\r\n\r\n const editOffer = (name, value) => {\r\n let offerM = {\r\n ...order.offer,\r\n [name]: value,\r\n };\r\n setOfferFeatured(value);\r\n dispatch({ type: \"CHANGE_ORDER_FIELDS\", fields: { offer: offerM } });\r\n };\r\n\r\n const setOfferAdvisorsF = (value) => {\r\n let offerM = {\r\n ...order.offer,\r\n OfferQuantitytoAdvisor: value,\r\n OfferPrice: order.Price,\r\n };\r\n setOfferAdvisors(value);\r\n dispatch({ type: \"CHANGE_ORDER_FIELDS\", fields: { offer: offerM } });\r\n };\r\n\r\n const onDeleteAccount = (accountIndex, accountId) => {\r\n if (window.confirm(`Are you sure to remove the account?`)) {\r\n if (order.OrderId > 0) {\r\n removeAccount({\r\n orderId: order.OrderId,\r\n accountId,\r\n }).then((res) => {\r\n dispatch({ type: \"DELETE_ACCOUNT\", accountIndex });\r\n });\r\n } else {\r\n dispatch({ type: \"DELETE_ACCOUNT\", accountIndex });\r\n }\r\n }\r\n };\r\n\r\n const { downloadAttachment, orderPdf } = services.account;\r\n const editProps = {\r\n toggle: toggleEdit,\r\n accountProps: {\r\n searchAccount,\r\n accountHolders,\r\n accountInfo,\r\n downloadAttachment,\r\n },\r\n };\r\n\r\n return (\r\n
    \r\n Accounts\r\n {edit.open ? (\r\n \r\n ) : (\r\n \r\n toggleEdit()}\r\n disabled={!canModifyComposition}\r\n >\r\n \r\n {\"\\u00A0\"} Add Account\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {accounts.length == 0 && }\r\n {accounts.map((account, i) => {\r\n const userIsOwner =\r\n (ui.userRole == UserType.Trader && account.AccountType != \"Customer\") ||\r\n (ui.userRole == UserType.Advisor && account.AccountType == \"Customer\");\r\n\r\n return (\r\n toggleEdit(account.index)}\r\n onDownloadPt={onDownloadPt}\r\n disabledEdit={order.offer && !order.offer.disabled}\r\n onDownloadFile={onDownloadFile}\r\n />\r\n );\r\n })}\r\n \r\n
    QuantityAccount
    \r\n
    \r\n
    \r\n
    \r\n {ui.userRole == \"Trader\" && (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n changeChecked(e.target.checked)}\r\n value={order.isChecked}\r\n checked={order.isChecked}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n editOffer(\"featured\", e.target.checked)}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n {error &&
    {error}
    }\r\n
    \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nconst AccountItem = ({ account, readonly, onDelete, onDownloadPt, onEdit, disabledEdit, onDownloadFile }) => (\r\n \r\n \r\n \r\n \r\n {account.AccountNumber}\r\n {account.AccountId > 0 && (\r\n \r\n {account.AccountId > 0 && account.HasFile && (\r\n onDownloadFile(account.AccountId)}\r\n >\r\n \r\n \r\n )}\r\n onDownloadPt(account.AccountId)}\r\n disabled={false}\r\n >\r\n \r\n \r\n \r\n onDelete(account.index, account.AccountId)}\r\n style={{ color: \"#d83737\" }}\r\n >\r\n \r\n \r\n \r\n )}\r\n \r\n);\r\n\r\nconst EmptyAccounts = () => (\r\n \r\n \r\n
    No Accounts
    \r\n \r\n \r\n);\r\n\r\nexport default Basket;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"table\":\"Basket-module_table_1xeGy\",\"error\":\"Basket-module_error_AwOmy\",\"empty\":\"Basket-module_empty_nwDwP\",\"btnAdd\":\"Basket-module_btnAdd_3B4F1\",\"title\":\"Basket-module_title_35Ob3\",\"backdrop\":\"Basket-module_backdrop_2d9zv\",\"edit\":\"Basket-module_edit_z4juw\",\"actions\":\"Basket-module_actions_38reG\",\"errorText\":\"Basket-module_errorText_3uhYZ\"};","import React, { useContext, useState } from \"react\";\r\nimport { Button } from \"reactstrap\";\r\nimport style from \"./Basket.module.scss\";\r\nimport Numeric from \"../Field/Numeric\";\r\nimport { Field } from \"../Field/Field\";\r\nimport Account from \"../Field/Account/Account\";\r\nimport { UserType } from \"../../../../utils/Helper\";\r\nimport { Dispatch } from \"../store/store\";\r\n\r\nconst Edit = ({ ...props }) => {\r\n const { services } = useContext(Dispatch);\r\n const [errors, setErrors] = useState({});\r\n\r\n const onEdit = () => {\r\n const { account } = props;\r\n\r\n let newErrors = {};\r\n let fields = [\"AccountName\", \"Quantity\"];\r\n\r\n if (props.userType != UserType.Trader) {\r\n fields = [...fields, \"HolderName\", \"Instruction\"];\r\n }\r\n\r\n fields.forEach((name) => {\r\n if (account[name] == undefined || account[name] === \"\") {\r\n newErrors[name] = \"Required field\";\r\n }\r\n });\r\n\r\n if (account.Instruction == \"Written\") {\r\n if (!account.HasFile && !account.HasFileUploadPending) {\r\n newErrors[\"Instruction\"] = \"Require an attachment\";\r\n } else if (props.parameters[\"MaxSubsWithWrittenInsBasket\"] != null) {\r\n const totalAccountsWithFile = props.accounts\r\n ? props.accounts.reduce(\r\n (sum, item) =>\r\n item.AccountId != account.AccountId && item.Instruction == \"Written\" ? sum + 1 : sum,\r\n 0\r\n )\r\n : 0;\r\n\r\n if (totalAccountsWithFile + 1 > +props.parameters[\"MaxSubsWithWrittenInsBasket\"]) {\r\n newErrors[\"Instruction\"] = \"Exceed maximum written accounts\";\r\n }\r\n }\r\n }\r\n\r\n if (Object.keys(newErrors).length) {\r\n setErrors(newErrors);\r\n } else {\r\n props.onEdit(account);\r\n props.toggle();\r\n }\r\n };\r\n\r\n const {\r\n balanceReady,\r\n accountProps,\r\n toggle,\r\n readonly,\r\n isReadOnly,\r\n dispatch,\r\n order,\r\n hiddens,\r\n onChange,\r\n account,\r\n orderPdf,\r\n } = props;\r\n\r\n const isExistingAccount = order.Accounts\r\n ? order.Accounts.find((acc) => acc.index === account.index)\r\n : false;\r\n\r\n return (\r\n
    \r\n {/* ##### Account ###### */}\r\n onChange(fields)}\r\n balanceReady={balanceReady}\r\n attachmentDisabled={false}\r\n hasAttachment={account.HasFileUploadPending ? { uploadPending: true } : account.HasFile}\r\n dispatch={dispatch}\r\n readonly={readonly}\r\n errors={{\r\n AccountName: errors.AccountName,\r\n HolderName: errors.HolderName,\r\n Instruction: errors.Instruction,\r\n Quantity: errors.Quantity,\r\n }}\r\n hiddens={hiddens}\r\n orderPdf={orderPdf}\r\n {...services.account}\r\n {...accountProps}\r\n />\r\n
    \r\n toggle(account.index, account && account.delete)}\r\n >\r\n {!isReadOnly ? \"Cancel\" : \"Close\"}\r\n {\" \"}\r\n {!isReadOnly && (\r\n \r\n )}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default Edit;\r\n","import React, { Fragment, useContext, useState } from \"react\";\r\nimport { Table, Badge, Button, Tooltip } from \"reactstrap\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport style from \"./Bulk.module.scss\";\r\nimport Edit from \"./Edit\";\r\nimport { Dispatch } from \"../store/store\";\r\nimport { Type, CommissionType } from \"../../../../utils/Order/Order\";\r\nimport CircularProgress from \"../../../CircularProgress/CircularProgress\";\r\nimport { toDateLocal, UserType } from \"../../../../utils/Helper\";\r\n\r\nconst Bulk = ({\r\n canAddAccount,\r\n removeAccount,\r\n searchAccount,\r\n accountHolders,\r\n accountInfo,\r\n accounts,\r\n onChange,\r\n isReadOnly,\r\n canModifyComposition,\r\n readonly,\r\n balanceReady,\r\n account,\r\n error,\r\n orderId,\r\n hiddens,\r\n}) => {\r\n const nextAccountIndex = accounts ? accounts.length : 0;\r\n\r\n const [edit, setEdit] = useState({\r\n open: account.index >= 0,\r\n });\r\n const [sending, setSending] = useState(false);\r\n\r\n const { dispatch, state, services } = useContext(Dispatch);\r\n const { ui, order } = state;\r\n\r\n const onSelectAccount = (accountIndex = null) => {\r\n dispatch({\r\n type: \"SELECT_ACCOUNT\",\r\n props: {\r\n accountIndex,\r\n },\r\n });\r\n };\r\n\r\n const toggleEdit = (accountIndex = null, discard) => {\r\n if (!edit.open) {\r\n if (canAddAccount()) {\r\n setEdit({ open: true });\r\n onSelectAccount(accountIndex);\r\n }\r\n } else {\r\n if (discard) {\r\n dispatch({ type: \"DELETE_ACCOUNT\", accountIndex });\r\n }\r\n\r\n setEdit({ open: false });\r\n }\r\n };\r\n\r\n const onEditAccount = (account) => {\r\n dispatch({\r\n type: \"EDIT_ACCOUNT\",\r\n props: {\r\n type: Type.Bulk,\r\n account,\r\n },\r\n });\r\n };\r\n\r\n const onDeleteAccount = (accountIndex, accountId) => {\r\n if (window.confirm(`Are you sure to remove the account?`)) {\r\n if (order.OrderId > 0) {\r\n removeAccount({\r\n orderId: order.OrderId,\r\n accountId,\r\n }).then((res) => {\r\n dispatch({ type: \"DELETE_ACCOUNT\", accountIndex });\r\n });\r\n } else {\r\n dispatch({ type: \"DELETE_ACCOUNT\", accountIndex });\r\n }\r\n }\r\n };\r\n\r\n const onDownloadFile = (accountId) => {\r\n const { downloadAttachment } = services.account;\r\n downloadAttachment({ orderId, accountId });\r\n };\r\n\r\n const onResendAuth = (accountId) => {\r\n const { resendAuth } = services.account;\r\n setSending(true);\r\n resendAuth(orderId, accountId);\r\n setTimeout(() => {\r\n setSending(false);\r\n }, 1000);\r\n };\r\n\r\n const { downloadAttachment, orderPdf } = services.account;\r\n const editProps = {\r\n toggle: toggleEdit,\r\n\r\n accountProps: {\r\n searchAccount,\r\n accountHolders,\r\n accountInfo,\r\n downloadAttachment,\r\n },\r\n };\r\n\r\n const orderCanResend = order.canResendAuthorizations;\r\n\r\n return (\r\n
    \r\n Accounts\r\n {edit.open ? (\r\n \r\n ) : (\r\n \r\n toggleEdit()}\r\n disabled={!canModifyComposition}\r\n >\r\n \r\n {\"\\u00A0\"} Add Account\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {accounts.length == 0 && }\r\n {accounts.map((account, i) => {\r\n const userIsOwner =\r\n (ui.userRole == UserType.Trader && account.AccountType != \"Customer\") ||\r\n (ui.userRole == UserType.Advisor && account.AccountType == \"Customer\");\r\n\r\n return (\r\n toggleEdit(account.index)}\r\n onDownloadFile={onDownloadFile}\r\n orderCanResend={orderCanResend}\r\n onResendAuth={onResendAuth}\r\n sendingMail={sending}\r\n />\r\n );\r\n })}\r\n \r\n
    QuantityAccount\r\n
    \r\n
    \r\n {error &&
    {error}
    }\r\n
    \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nconst AccountItem = ({\r\n account,\r\n readonly,\r\n onDelete,\r\n onEdit,\r\n onDownloadFile,\r\n onResendAuth,\r\n sendingMail,\r\n orderCanResend,\r\n}) => {\r\n const [tooltipOpen, setTooltipOpen] = useState(false);\r\n\r\n const toggleTooltip = () => setTooltipOpen(!tooltipOpen);\r\n\r\n const accountCanResend = account.Instruction === \"ViaLink\";\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {account.AccountNumber}\r\n {account.AccountId > 0 && (\r\n \r\n {account.HasFile && (\r\n onDownloadFile(account.AccountId)}\r\n >\r\n \r\n \r\n )}\r\n {orderCanResend && accountCanResend && (\r\n \r\n {sendingMail ? (\r\n \r\n ) : (\r\n \r\n onResendAuth(account.AccountId)}\r\n >\r\n \r\n \r\n \r\n Resend Authorization Mail\r\n \r\n \r\n )}\r\n \r\n )}\r\n \r\n onDelete(account.index, account.AccountId)}\r\n style={{ color: \"#d83737\" }}\r\n >\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nconst EmptyAccounts = () => (\r\n \r\n \r\n
    No Accounts
    \r\n \r\n \r\n);\r\n\r\nexport default Bulk;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"table\":\"Bulk-module_table_1ci1h\",\"error\":\"Bulk-module_error_2lsrH\",\"empty\":\"Bulk-module_empty_QF4KJ\",\"btnAdd\":\"Bulk-module_btnAdd_2Nr4b\",\"title\":\"Bulk-module_title_2vJ-m\",\"backdrop\":\"Bulk-module_backdrop_2BG6i\",\"edit\":\"Bulk-module_edit_3G0dC\",\"actions\":\"Bulk-module_actions_3IUo2\",\"errorText\":\"Bulk-module_errorText_3cYpp\"};","import React, { useContext, useState } from \"react\";\r\nimport { Button } from \"reactstrap\";\r\nimport style from \"./Bulk.module.scss\";\r\nimport Numeric from \"../Field/Numeric\";\r\nimport { Field } from \"../Field/Field\";\r\nimport Account from \"../Field/Account/Account\";\r\nimport { Dispatch } from \"../store/store\";\r\n\r\nconst Edit = ({ ...props }) => {\r\n const { services } = useContext(Dispatch);\r\n const [errors, setErrors] = useState({});\r\n\r\n const onEdit = () => {\r\n const { account } = props;\r\n\r\n let newErrors = {};\r\n\r\n const fields = [\"AccountName\", \"HolderName\", \"Instruction\", \"Quantity\"];\r\n\r\n fields.forEach((name) => {\r\n if (account[name] == undefined || account[name] === \"\") {\r\n newErrors[name] = \"Required field\";\r\n }\r\n });\r\n\r\n if (account.Instruction == \"Written\" && !account.HasFile) {\r\n newErrors[\"Instruction\"] = \"Require an attachment\";\r\n }\r\n\r\n if (Object.keys(newErrors).length) {\r\n setErrors(newErrors);\r\n } else {\r\n props.onEdit(account);\r\n props.toggle();\r\n }\r\n };\r\n\r\n const {\r\n balanceReady,\r\n accountProps,\r\n toggle,\r\n readonly,\r\n isReadOnly,\r\n dispatch,\r\n order,\r\n hiddens,\r\n onChange,\r\n account,\r\n orderPdf,\r\n } = props;\r\n\r\n const isExistingAccount = order.Accounts\r\n ? order.Accounts.find((acc) => acc.index === account.index)\r\n : false;\r\n\r\n return (\r\n
    \r\n {/* ##### Account ###### */}\r\n onChange(fields)}\r\n balanceReady={balanceReady}\r\n attachmentDisabled={false}\r\n dispatch={dispatch}\r\n hasAttachment={account.HasFileUploadPending ? { uploadPending: true } : account.HasFile}\r\n {...accountProps}\r\n readonly={readonly}\r\n errors={{\r\n AccountName: errors.AccountName,\r\n HolderName: errors.HolderName,\r\n Instruction: errors.Instruction,\r\n Quantity: errors.Quantity,\r\n }}\r\n hiddens={hiddens}\r\n orderPdf={orderPdf}\r\n {...services.account}\r\n />\r\n
    \r\n toggle(account.index, account && account.delete)}\r\n >\r\n {!isReadOnly ? \"Cancel\" : \"Close\"}\r\n {\" \"}\r\n {!isReadOnly && (\r\n \r\n )}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default Edit;\r\n","import React, { Fragment, Component } from \"react\";\r\nimport { FormGroup, Row, Col, Label, Input } from \"reactstrap\";\r\nimport Autosuggest from \"../../../../Autosuggest/Autosuggest\";\r\nimport styleF from \"../Field.module.scss\";\r\nimport { CircularProgress } from \"../../../..\";\r\nimport Holders from \"./Holders\";\r\nimport Instruction from \"./Instruction\";\r\nimport { clientPrice, commissionSuffix } from \"../../Form/commons\";\r\nimport {\r\n OrderPriceType,\r\n getCommissionItems,\r\n ProductType,\r\n OrderStatus,\r\n CommissionType as ComType,\r\n getBaseAndPriceCurrencies,\r\n} from \"../../../../../utils/Order/Order\";\r\nimport { Field, Numeric, Combobox, Switch } from \"../Field\";\r\nimport QuantityHelper from \"../../Helper/QuantityHelper\";\r\nimport EarningsHelper from \"../../Helper/EarningsHelper\";\r\nimport Balance from \"./Balance\";\r\nimport { UserType } from \"../../../../../utils/Helper\";\r\nimport { Dispatch as Context } from \"../../store/store\";\r\nimport { formattedNumber } from \"../../../../FormattedNumber/FormattedNumber\";\r\nimport { ExternalAccountWrapper } from \"./ExternalAccountsWrapper\";\r\nimport { CheckFormField } from \"../../../../../utils\";\r\n\r\nclass Account extends Component {\r\n constructor(props) {\r\n super(props);\r\n const { account, balanceReady, opsViewAccountName } = props;\r\n const { AccountId } = account;\r\n Account.contextType = Context;\r\n\r\n this.state = {\r\n loadingHolders: AccountId != null,\r\n loadingBalance: AccountId != null && balanceReady,\r\n holders: null,\r\n balance: null,\r\n instructions: null,\r\n sendingMail: false,\r\n clientBankAccounts: [],\r\n selectedBankAccount: null,\r\n useCashAccount: false,\r\n accountIsJuridical: false,\r\n ownPositionAccounts: [],\r\n };\r\n }\r\n \r\n // componentWillMount() {\r\n // const { account } = this.props;\r\n // const { AccountId } = account;\r\n\r\n // if (AccountId != null) {\r\n // this.requestAccountInfo();\r\n // this.requestAccountHolders({ accountId: AccountId });\r\n // }\r\n // }\r\n \r\n\r\n componentDidMount() {\r\n this._isMounted = true;\r\n const { account, userType, platformRole } = this.props;\r\n const { AccountId, AccountName, AccountNumber, HolderId } = account;\r\n\r\n if (AccountId != null) {\r\n this.requestAccountInfo({}, false);\r\n this.requestAccountHolders({ accountId: AccountId });\r\n }\r\n\r\n if (platformRole == \"Trader\" || platformRole == \"BackOffice\" || platformRole == \"MiddleOffice\") {\r\n this.props.fetchOwnPositionAccounts().then(({ accounts }) => {\r\n this.setState({ ownPositionAccounts: accounts });\r\n });\r\n }\r\n\r\n // Cuando se ve una orden ya viene precargados los valores\r\n if (!isEmpty(AccountId) && isEmpty(HolderId)) {\r\n this.onChange(\"\", {\r\n id: AccountId,\r\n name: AccountName,\r\n number: AccountNumber,\r\n });\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n const { account, balanceReady, updateAccount, order } = this.props;\r\n const { AccountId, HolderId, clientBankAccount } = account;\r\n // Caso especifico cuando se elige el ticker del selector\r\n if ((balanceReady && !prevProps.balanceReady && AccountId) || prevProps.updateAccount != updateAccount) {\r\n this.requestAccountInfo({}, true);\r\n }\r\n // if (\r\n // (this.props.getUserExternalAccounts &&\r\n // HolderId &&\r\n // prevProps.account &&\r\n // (prevProps.account.HolderId !== HolderId ||\r\n // (order.AssetId && prevProps.order.AssetId !== order.AssetId))) ||\r\n // order.OrderSide !== prevProps.order.OrderSide\r\n // ) {\r\n // this.props\r\n // .getUserExternalAccounts({ personId: HolderId, accountId: AccountId })\r\n // .then((res) => {\r\n // const { clientBankAccounts } = res.response;\r\n // if (clientBankAccounts.length > 0) {\r\n // const filteredAccounts = clientBankAccounts.filter(\r\n // (accounts) => accounts.currencyISO === order.OrderCurrencySymbol\r\n // );\r\n // this.props.onChange({\r\n // clientBankAccounts: filteredAccounts,\r\n // clientBankAccount: null,\r\n // useCashAccount: false,\r\n // });\r\n // } else {\r\n // this.props.onChange({ clientBankAccounts: [], clientBankAccount: null, useCashAccount: false });\r\n // }\r\n // })\r\n // .catch((e) => console.error(e));\r\n // } else {\r\n // if (order.OrderAssetData && order.CurrentAccount.useCashAccount) {\r\n // this.props.onChange({ clientBankAccount: null, useCashAccount: false });\r\n // }\r\n // }\r\n }\r\n\r\n componentWillUnmount() {\r\n this._isMounted = false;\r\n }\r\n\r\n onSuggestionsFetchRequested = ({ value }) =>\r\n this.props.searchAccount({ text: value }).then((response) =>\r\n response.response.accounts.map((a) => {\r\n const accountAttrs = JSON.parse(a.Value);\r\n return {\r\n id: a.Id,\r\n name: accountAttrs.value,\r\n number: accountAttrs.key,\r\n };\r\n })\r\n );\r\n\r\n onChangeAccountHolder = (value) => {\r\n const holderItem = getItemById(this.state.holders, value);\r\n\r\n let currentInstruction = -1;\r\n if (this.props.order.CurrentAccount) {\r\n currentInstruction = this.props.order.CurrentAccount.Instruction;\r\n if (holderItem.instructions.find((ins) => ins.id == currentInstruction) === undefined) {\r\n // If the current instruction is not available to the new holder,\r\n // select the first instruction available to the holder.\r\n currentInstruction = holderItem.instructions[0].id;\r\n }\r\n }\r\n\r\n this.setState({\r\n instructions: holderItem.instructions,\r\n accountIsJuridical: holderItem.HolderIsJuridical,\r\n isMainHolder: holderItem.isMain,\r\n });\r\n\r\n this.props.onChange({\r\n HolderId: holderItem.id,\r\n HolderName: holderItem.description,\r\n Instruction: currentInstruction,\r\n });\r\n //\r\n };\r\n\r\n onChangeInstruction = (value) => {\r\n const instructionItem = getItemById(this.state.instructions, value);\r\n\r\n this.props.onChange({\r\n Instruction: instructionItem.id,\r\n });\r\n };\r\n\r\n requestAccountInfo = (body, updateOrderValues) => {\r\n if (this.props.balanceReady) {\r\n const assetTicker =\r\n this.props.order.AssetClassForm === ProductType.REPO &&\r\n this.props.order.CurrentAccount.Collateral &&\r\n this.props.order.CurrentAccount.Collateral.length\r\n ? this.props.order.CurrentAccount.Collateral[0].AssetTicker\r\n : this.props.order.AssetTicker;\r\n\r\n this.setState({ loadingBalance: true });\r\n\r\n this.props.accountInfo({ ...body }, updateOrderValues).then((response) => {\r\n const { balance, accountInfo, balanceWithBooktype } = response.response.accountorderdata;\r\n const { AccountAsksCustody, AccountType, AccountInBalanceType, AccountUseMarkUP } = accountInfo;\r\n\r\n const assetBalanceItem = balance.find((item) => item.key == assetTicker);\r\n const assetBalance = assetBalanceItem ? parseFloat(assetBalanceItem.value) : 0.0;\r\n\r\n let modsOnAccount = {\r\n AccountAsksCustody,\r\n AccountType,\r\n AccountInBalanceType,\r\n AccountAssetBalance: assetBalance,\r\n AccountUseMarkUP,\r\n };\r\n if (AccountAsksCustody) {\r\n modsOnAccount.RequiresSpecialCustody = true;\r\n }\r\n\r\n if (this._isMounted) {\r\n this.setState({\r\n balance: balanceWithBooktype ? balanceWithBooktype : balance,\r\n loadingBalance: false,\r\n });\r\n this.props.onChange(modsOnAccount);\r\n }\r\n });\r\n }\r\n };\r\n\r\n requestAccountHolders = ({ accountId }) => {\r\n this.props.accountHolders({ accountId }).then((response) => {\r\n const { holders } = response.response;\r\n const _holders = holders\r\n .filter((h) => h.HoldersOrderNO || h.HoldersOrderW || h.HoldersOrderV || h.HoldersOrderL)\r\n .map((h) => ({\r\n isMain: h.IsMain,\r\n description: h.PersonName,\r\n instructions: getInstructions(h, this.props.order.OrderIsBasket),\r\n id: h.PersonId,\r\n isJuridical: h.HolderIsJuridical,\r\n }));\r\n\r\n let selectedHolder = _holders.find((h) => h.isMain) || (_holders.length ? _holders[0] : null);\r\n\r\n if (this.props.order.CurrentAccount && this.props.order.CurrentAccount.HolderId > 0) {\r\n selectedHolder = _holders.find((h) => h.id == this.props.order.CurrentAccount.HolderId);\r\n if (selectedHolder === undefined) {\r\n selectedHolder = null;\r\n }\r\n }\r\n\r\n this._isMounted &&\r\n this.setState(\r\n {\r\n holders: _holders,\r\n loadingHolders: false,\r\n instructions: selectedHolder && selectedHolder.instructions,\r\n accountIsJuridical: selectedHolder && selectedHolder.isJuridical,\r\n isMainHolder: selectedHolder && selectedHolder.isMain,\r\n },\r\n () => {\r\n const { account } = this.props;\r\n const { HolderId } = account;\r\n\r\n if (HolderId == null && selectedHolder) {\r\n const { id, description, instructions } = selectedHolder;\r\n\r\n const instruction = instructions && instructions.length ? instructions[0] : null;\r\n\r\n this.props.onChange({\r\n HolderId: id,\r\n HolderName: description,\r\n Instruction: instruction ? instruction.description : null,\r\n });\r\n }\r\n }\r\n );\r\n });\r\n };\r\n\r\n onChange = (method, value) => {\r\n let _value = defaultAccountValue;\r\n\r\n if (method != \"type\" && value.id) {\r\n _value = {\r\n AccountNumber: value.number,\r\n AccountName: value.name,\r\n AccountId: value.id,\r\n };\r\n\r\n this.requestAccountInfo(_value, true);\r\n this.requestAccountHolders({ accountId: value.id });\r\n this.setState({\r\n holders: null,\r\n balance: null,\r\n loadingHolders: true,\r\n });\r\n } else {\r\n this.setState({\r\n holders: null,\r\n balance: null,\r\n instructions: null,\r\n });\r\n _value.AccountName = value;\r\n }\r\n\r\n this.props.onChange(_value);\r\n };\r\n\r\n onSetAttachment = (file) => {\r\n const { dispatch, account } = this.props;\r\n const { AccountId } = account;\r\n dispatch({ type: \"SET_ATTACHMENT\", payload: { id: AccountId, file } });\r\n };\r\n\r\n onResendAuth = (orderId, accountId) => {\r\n this.setState({ sendingMail: true });\r\n this.props.resendAuth(orderId, accountId);\r\n setTimeout(() => {\r\n this.setState({ sendingMail: false });\r\n }, 1000);\r\n };\r\n\r\n onSelectedAccountChange = (accountNumber) => {\r\n const changes = { clientBankAccount: accountNumber };\r\n if (this.props.order.OrderSide === \"Sell\" && accountNumber) {\r\n changes.useCashAccount = false;\r\n }\r\n this.props.onChange(changes);\r\n };\r\n\r\n onCheckCashAccount = (evt) => {\r\n const changes = { useCashAccount: !!!this.props.order.CurrentAccount.useCashAccount };\r\n if (this.props.order.OrderSide === \"Sell\") {\r\n changes.clientBankAccount = null;\r\n }\r\n this.props.onChange(changes);\r\n };\r\n\r\n onChangeAvailableAccounts = (accounts) => {\r\n const changes = { clientBankAccounts: accounts };\r\n this.props.onChange(changes);\r\n }\r\n \r\n render() {\r\n const {\r\n order,\r\n account,\r\n readonly,\r\n hiddens,\r\n errors,\r\n balanceReady,\r\n attachContent,\r\n downloadAttachment,\r\n orderPdf,\r\n attachmentDisabled,\r\n hasAttachment,\r\n onChange,\r\n onChangeOrder,\r\n userType,\r\n imgSource,\r\n opsViewAccountName\r\n } = this.props;\r\n\r\n const {\r\n AccountId,\r\n AccountName,\r\n AccountNumber,\r\n AccountType,\r\n HolderId,\r\n HolderName,\r\n Quantity,\r\n AccountAsksCustody,\r\n RequiresSpecialCustody,\r\n AccountUseMarkUP,\r\n Markup,\r\n MarkupType,\r\n FXMarkup,\r\n FXMarkupType,\r\n Commission,\r\n CommissionType,\r\n CurrentInfoDate,\r\n clientBankAccounts,\r\n clientBankAccount,\r\n useCashAccount,\r\n differCommissionPayment,\r\n Advice,\r\n } = order.CurrentAccount;\r\n const {\r\n OrderId,\r\n OrderSide,\r\n AssetClassForm,\r\n AssetPriceIsDiscounted,\r\n OrderCurrencySymbol,\r\n OrderSettlementCurrencySymbol,\r\n AssetCanBeSelfCustodied,\r\n OrderQuantityIsCash,\r\n SubAssetClassDecimalPlaces,\r\n OrderAllowsMarkup,\r\n OrderTerm,\r\n OrderAssetData,\r\n } = order;\r\n const { state: contextState } = this.context;\r\n const { entities: contextEntities } = contextState;\r\n const { settlementCurrencies } = contextEntities;\r\n\r\n let showBankAccounts = true;\r\n if (OrderAssetData && OrderAssetData.items[\"FundX\"]) {\r\n showBankAccounts = false;\r\n }\r\n\r\n const { baseCurrency, priceCurrency } = getBaseAndPriceCurrencies(\r\n settlementCurrencies,\r\n OrderCurrencySymbol,\r\n OrderSettlementCurrencySymbol\r\n );\r\n\r\n let custodyHidden = false;\r\n let markupHidden = false;\r\n let FXMarkupHidden = false;\r\n let commissionHidden = false;\r\n let custodyReadonly = false;\r\n let commissionPaymentHidden = false;\r\n if (\r\n (!AccountType && userType === UserType.Trader) ||\r\n (AccountType && AccountType.toLowerCase() !== \"customer\")\r\n ) {\r\n custodyHidden = true;\r\n markupHidden = true;\r\n FXMarkupHidden = true;\r\n commissionHidden = true;\r\n commissionPaymentHidden = true;\r\n } else {\r\n switch (AssetClassForm) {\r\n case ProductType.FOREX:\r\n markupHidden = true;\r\n FXMarkupHidden = true;\r\n commissionHidden = true;\r\n commissionPaymentHidden = true;\r\n break;\r\n case ProductType.MMARKET:\r\n FXMarkupHidden = true;\r\n break;\r\n default:\r\n break;\r\n }\r\n if (!OrderSettlementCurrencySymbol || OrderCurrencySymbol == OrderSettlementCurrencySymbol) {\r\n FXMarkupHidden = true;\r\n }\r\n if (OrderSide == \"Buy\" && AssetCanBeSelfCustodied) {\r\n custodyHidden = false;\r\n if (AccountAsksCustody) {\r\n custodyReadonly = true;\r\n }\r\n } else {\r\n custodyHidden = true;\r\n }\r\n }\r\n\r\n if (\r\n (OrderId && OrderAllowsMarkup === false) ||\r\n AccountUseMarkUP === false ||\r\n [ProductType.REPO, ProductType.FUTURE].includes(AssetClassForm)\r\n ) {\r\n markupHidden = true;\r\n FXMarkupHidden = true;\r\n }\r\n\r\n const modHiddens = {\r\n ...hiddens,\r\n RequiresSpecialCustody: custodyHidden,\r\n Markup: markupHidden,\r\n MarkupType: markupHidden,\r\n FXMarkup: FXMarkupHidden,\r\n FXMarkupType: FXMarkupHidden,\r\n Commission: commissionHidden,\r\n CommissionType: commissionHidden,\r\n DifferCommissionPayment: commissionPaymentHidden,\r\n };\r\n\r\n const currentDayData = account.Day ? account.Day.find((day) => day.Date === CurrentInfoDate) : undefined;\r\n\r\n const currentDay = currentDayData\r\n ? {\r\n AssignedQty: currentDayData.AssignedQty || 0,\r\n ExecutionsAvgPrice: currentDayData.ExecutionsAvgPrice || 0,\r\n ExecutionsAvgFX: currentDayData.ExecutionsAvgFX || 0,\r\n Status: currentDayData.Status || \"New\",\r\n }\r\n : {\r\n AssignedQty: 0,\r\n ExecutionsAvgPrice: 0,\r\n ExecutionsAvgFX: 0,\r\n Status: \"New\",\r\n };\r\n\r\n const currentDayIsReadOnly = currentDay.Status == \"Booked\";\r\n\r\n const isExistingAccount = order.Accounts\r\n ? !!order.Accounts.find((acc) => acc.index === account.index)\r\n : false;\r\n\r\n let modReadonly = {\r\n ...readonly,\r\n RequiresSpecialCustody: readonly.RequiresSpecialCustody || custodyReadonly,\r\n Markup: readonly.Markup || currentDayIsReadOnly,\r\n MarkupType: readonly.MarkupType || currentDayIsReadOnly,\r\n FXMarkup: readonly.FXMarkup || currentDayIsReadOnly,\r\n FXMarkupType: readonly.FXMarkupType || currentDayIsReadOnly,\r\n Commission: readonly.Commission || currentDayIsReadOnly,\r\n CommissionType: readonly.CommissionType || currentDayIsReadOnly,\r\n AccountName: readonly.AccountName || isExistingAccount,\r\n differCommissionPayment: readonly.differCommissionPayment || currentDayIsReadOnly,\r\n };\r\n\r\n const userIsOwner =\r\n !AccountType ||\r\n AccountType == \"\" ||\r\n (userType == UserType.Trader && AccountType != \"Customer\") ||\r\n (userType == UserType.Advisor && AccountType == \"Customer\");\r\n\r\n if (!userIsOwner) {\r\n Object.keys(order.CurrentAccount).forEach((key) => {\r\n modReadonly[key] = true;\r\n });\r\n }\r\n\r\n let canResend = false;\r\n if (order.canResendAuthorizations) {\r\n if (account.Instruction === \"ViaLink\") {\r\n canResend = true;\r\n }\r\n }\r\n\r\n const isProp =\r\n account.AccountId && this.state.ownPositionAccounts.find((accountId) => accountId == account.AccountId);\r\n\r\n const hideHolders = this.state.holders !== null && this.state.holders.length == 0 && !isProp;\r\n\r\n let quantities = [];\r\n let quantityTitle = Quantity;\r\n let markupTitle = {`Mark ${order.OrderSide == \"Buy\" ? \"Up\" : \"Down\"}`};\r\n let FXMarkupTitle = {`FX Mark ${order.OrderSide == \"Buy\" ? \"Up\" : \"Down\"}`};\r\n let commissionTitle = Commission;\r\n let differCommissionPaymentTitle = Differ Commission Payment;\r\n let isPartiallyBooked = false;\r\n if (account.Day) {\r\n quantities = account.Day.map((day) => {\r\n if (day.Status == \"Booked\") {\r\n // If account is booked at least for one day, then:\r\n // - We can't change the account.\r\n isPartiallyBooked = true;\r\n }\r\n return {\r\n date: day.Date,\r\n status: day.Status,\r\n quantity: parseFloat(day.AssignedQty),\r\n markup: parseFloat(day.Markup),\r\n markupType: day.MarkupType == ComType.FaceValueCash ? \"$ Cash\" : \"% Principal\",\r\n FXMarkup: parseFloat(day.FXMarkup),\r\n FXMarkupType: day.FXMarkupType == ComType.FaceValueCash ? \"$ Cash\" : \"% Principal\",\r\n commission: parseFloat(day.Commission),\r\n commissionType: day.CommissionType == ComType.FaceValueCash ? \"$ Cash\" : \"% Principal\",\r\n };\r\n });\r\n }\r\n quantityTitle = (\r\n \r\n Quantity\r\n {quantities.length > 0 && OrderId > 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n markupTitle = (\r\n \r\n {`Mark ${order.OrderSide == \"Buy\" ? \"Up\" : \"Down\"}`}\r\n {quantities.length > 0 && OrderId > 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n FXMarkupTitle = (\r\n \r\n {`FX Mark ${order.OrderSide == \"Buy\" ? \"Up\" : \"Down\"}`}\r\n {quantities.length > 0 && OrderId > 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n commissionTitle = (\r\n \r\n Commission\r\n {quantities.length > 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n differCommissionPaymentTitle = (\r\n \r\n Differ Commission Payment\r\n \r\n );\r\n\r\n if (isPartiallyBooked) {\r\n modReadonly = {\r\n ...modReadonly,\r\n AccountName: true,\r\n HolderName: true,\r\n Instruction: true,\r\n RequiresSpecialCustody: true,\r\n Quantity: true,\r\n };\r\n }\r\n\r\n const inputProps = {\r\n placeholder: \"Account\",\r\n disabled: modReadonly.AccountName,\r\n invalid: !!errors.AccountName,\r\n };\r\n\r\n const hasDifferentCurrencies = OrderCurrencySymbol !== OrderSettlementCurrencySymbol;\r\n\r\n const earningsTitle = `Values for ${CurrentInfoDate} (Q: ${formattedNumber(\r\n currentDay.AssignedQty,\r\n \"quantity\"\r\n )}; P: ${formattedNumber(currentDay.ExecutionsAvgPrice, \"price\")}${\r\n hasDifferentCurrencies\r\n ? `; FX [${baseCurrency}/${priceCurrency}]: ${formattedNumber(\r\n currentDay.ExecutionsAvgFX,\r\n \"currency\"\r\n )}`\r\n : \"\"\r\n }):`;\r\n\r\n let defaultMaxDecimals = 2;\r\n switch (order.AssetClassForm) {\r\n case ProductType.BOND:\r\n case ProductType.EQUITY:\r\n case ProductType.OPTION:\r\n defaultMaxDecimals = 0;\r\n break;\r\n case ProductType.MFUNDS:\r\n case ProductType.MMARKET:\r\n defaultMaxDecimals = 5;\r\n break;\r\n case ProductType.FOREX:\r\n defaultMaxDecimals = 2;\r\n break;\r\n default:\r\n defaultMaxDecimals = 2;\r\n }\r\n\r\n const quantityMaxDecimals = OrderQuantityIsCash ? 2 : SubAssetClassDecimalPlaces || defaultMaxDecimals;\r\n\r\n const showClientPrice =\r\n [OrderPriceType.LIMIT, OrderPriceType.STOPLIMIT].includes(order.OrderType) ||\r\n currentDay.ExecutionsAvgPrice != 0;\r\n const showClientFX = hasDifferentCurrencies && currentDay.ExecutionsAvgFX != 0;\r\n\r\n const originalPrice =\r\n currentDay.ExecutionsAvgPrice != 0 ? currentDay.ExecutionsAvgPrice : order.OrderPrice;\r\n\r\n const originalFX = currentDay.ExecutionsAvgFX;\r\n\r\n return (\r\n
    \r\n {/* ##### Quantity ###### */}\r\n {!modHiddens.Quantity && (\r\n \r\n onChange({ Quantity: v })}\r\n invalid={!!errors.Quantity}\r\n dataTypeDecimalName=\"quantity\"\r\n />\r\n \r\n )}\r\n\r\n {/* ##### Account ###### */}\r\n \r\n \r\n \r\n \r\n \r\n\r\n {this.state.loadingHolders ? (\r\n \r\n ) : (\r\n
    \r\n {!hideHolders && !isProp && (\r\n \r\n \r\n \r\n )}\r\n\r\n \r\n\r\n {this.state.loadingBalance ? (\r\n \r\n ) : (\r\n balanceReady && this.state.balance != null && \r\n )}\r\n {!hideHolders && (\r\n \r\n )}\r\n
    \r\n )}\r\n {/* ##### Custody ###### */}\r\n {!modHiddens.RequiresSpecialCustody && (\r\n \r\n onChange({ RequiresSpecialCustody: v })}\r\n />\r\n \r\n )}\r\n\r\n {!(modHiddens.Markup && modHiddens.FXMarkup && modHiddens.Commission) && OrderId > 0 && (\r\n
    \r\n {earningsTitle}\r\n
    \r\n )}\r\n\r\n {!modHiddens.Markup && (\r\n \r\n \r\n {/* ##### Mark up/down ###### */}\r\n \r\n \r\n onChange({ Markup: v })}\r\n invalid={!!errors.Markup}\r\n {...commissionSuffix(MarkupType, order.OrderCurrencySymbol)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n\r\n {/* ##### Mark type ###### */}\r\n \r\n \r\n onChange({ MarkupType: v })}\r\n emptyLabel={\"Type\"}\r\n invalid={!!errors.MarkupType}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n \r\n\r\n {/* ##### Client Price ###### */}\r\n {showClientPrice && !modHiddens.showClientPrice && (\r\n \r\n null}\r\n disabled\r\n dataTypeDecimalName=\"price\"\r\n />\r\n \r\n )}\r\n\r\n {/* #### FX Mark up/down #### */}\r\n {!modHiddens.FXMarkup && readonly.FXMarkupAllowed && (\r\n \r\n \r\n \r\n onChange({ FXMarkup: v })}\r\n invalid={!!errors.FXMarkup}\r\n {...commissionSuffix(FXMarkupType, `${baseCurrency}/${priceCurrency}`)}\r\n dataTypeDecimalName={\r\n FXMarkupType == ComType.PrincipalPercentage ? \"percenttage\" : \"default\"\r\n }\r\n />\r\n \r\n \r\n\r\n {/* ##### FX Mark type ###### */}\r\n \r\n \r\n onChange({ FXMarkupType: v })}\r\n emptyLabel={\"Type\"}\r\n invalid={!!errors.FXMarkupType}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n \r\n )}\r\n\r\n {/* ##### Client Price ###### */}\r\n {showClientFX && (\r\n \r\n null}\r\n disabled\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n )}\r\n \r\n )}\r\n\r\n {AssetClassForm == ProductType.REPO && (\r\n \r\n {/* ##### Term ###### */}\r\n \r\n \r\n onChangeOrder({ OrderTerm: v })}\r\n invalid={!!errors.OrderTerm}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n \r\n )}\r\n\r\n {!modHiddens.Commission && (\r\n \r\n {/* ##### Commission ###### */}\r\n \r\n \r\n onChange({ Commission: v })}\r\n invalid={!!errors.Commission}\r\n {...commissionSuffix(CommissionType, order.OrderSettlementCurrencySymbol)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n\r\n {/* ##### CommissionType ###### */}\r\n \r\n \r\n {\r\n onChange({ CommissionType: v });\r\n }}\r\n emptyLabel={\"Type\"}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n \r\n )}\r\n {!modHiddens.DifferCommissionPayment && this.state.accountIsJuridical && this.state.isMainHolder && (\r\n \r\n \r\n \r\n \r\n \r\n {\r\n onChange({ differCommissionPayment: v });\r\n }}\r\n />\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n onChange({ Advice: e.target.checked })}\r\n defaultChecked={!!Advice}\r\n value={!!Advice}\r\n />\r\n \r\n \r\n \r\n \r\n Advice\r\n \r\n \r\n \r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst defaultAccountValue = {\r\n AccountId: null,\r\n AccountName: \"\",\r\n HolderId: null,\r\n HolderName: null,\r\n Instruction: null,\r\n differCommissionPayment: false,\r\n};\r\n\r\nconst renderSuggestion = (suggestion) => (\r\n
    \r\n {suggestion.number}\r\n {\" - \"}\r\n {suggestion.name}\r\n
    \r\n);\r\n\r\nconst getSuggestionValue = (suggestion) => `${suggestion.number} - ${suggestion.name}`;\r\n\r\nconst getInstructions = (holder, isBasket) => {\r\n const instructions = [];\r\n if (holder.HoldersOrderNO) instructions.push({ id: \"Managed\", description: \"Managed\" });\r\n else {\r\n if (holder.HoldersOrderW) instructions.push({ id: \"Written\", description: \"Written\" });\r\n if (holder.HoldersOrderV && !isBasket) instructions.push({ id: \"Web\", description: \"Web\" });\r\n if (holder.HoldersOrderL) instructions.push({ id: \"ViaLink\", description: \"Via Link\" });\r\n }\r\n\r\n return instructions;\r\n};\r\n\r\nconst getItemById = (items, id) => items.find((e) => e.id === id);\r\n\r\nconst isEmpty = (value) => value === undefined || value === \"\";\r\n\r\nexport default Account;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"balance\":\"Account-module_balance_aa9pZ\",\"title\":\"Account-module_title_236lc\",\"item\":\"Account-module_item_nxeVv\",\"bankAccounts\":\"Account-module_bankAccounts_3sX3g\",\"selected\":\"Account-module_selected_1h2_-\",\"logo\":\"Account-module_logo_34OOq\",\"info\":\"Account-module_info_rUbEZ\",\"data\":\"Account-module_data_19-OR\",\"checkbox\":\"Account-module_checkbox_2AjVM\",\"cash\":\"Account-module_cash_2JwZm\",\"requeriments\":\"Account-module_requeriments_2qE0t\",\"line\":\"Account-module_line_2rkrT\",\"inputFile\":\"Account-module_inputFile_1rhg4\",\"pdf\":\"Account-module_pdf_2eUWx\",\"upload\":\"Account-module_upload_15Rsw\",\"pencil\":\"Account-module_pencil_3g0E3\",\"pending\":\"Account-module_pending_3e4Tq\",\"disabled\":\"Account-module_disabled_2X75t\",\"error\":\"Account-module_error_3U7Y2\",\"errorText\":\"Account-module_errorText_2_3Rm\",\"fadein\":\"Account-module_fadein_2hu80\"};","import React from \"react\";\r\nimport style from \"./Account.module.scss\";\r\nimport { FormattedNumber } from \"../../../../FormattedNumber/FormattedNumber\";\r\nimport { Badge } from \"reactstrap\";\r\n\r\nconst Balance = ({ balance }) => {\r\n return (\r\n
    \r\n {balance.map(\r\n (item, index) =>\r\n item.key !== \"\" && (\r\n
    \r\n
    \r\n {item.key}\r\n \r\n {(item.booktype !== \"\" && item.booktype !== undefined) && {item.booktype} }\r\n
    \r\n
    \r\n )\r\n )}\r\n
    \r\n );\r\n};\r\n\r\nexport default Balance;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport style from \"./Account.module.scss\";\r\nimport CircularProgress from \"../../../../CircularProgress/CircularProgress\";\r\n\r\nexport const ExternalAccountWrapper = ({\r\n logo,\r\n onChange,\r\n onCheckCashAccount,\r\n selectedAccount,\r\n selectedCash,\r\n getAccountsService,\r\n account,\r\n currencyISO,\r\n disabled,\r\n onChangeAvailableAccounts,\r\n error,\r\n}) => {\r\n const [accounts, setAccounts] = useState([]);\r\n const [loading, setLoading] = useState(false);\r\n\r\n useEffect(() => {\r\n if (account.HolderId && account.AccountId) {\r\n const getBankAccounts = async () => {\r\n setLoading(() => true);\r\n try {\r\n const { response } = await getAccountsService({\r\n personId: account.HolderId,\r\n accountId: account.AccountId,\r\n });\r\n\r\n setAccounts(() => response.clientBankAccounts || []);\r\n onChangeAvailableAccounts(response.clientBankAccounts || []);\r\n } catch (error) {\r\n console.error(\"Error getting bank accounts\", error);\r\n } finally {\r\n setLoading(() => false);\r\n }\r\n };\r\n getBankAccounts();\r\n }\r\n }, [account.HolderId, account.AccountId]);\r\n\r\n\r\n const handleCheckAccount = (accountNumber) => {\r\n if (selectedAccount === accountNumber) {\r\n onChange(null);\r\n } else {\r\n onChange(accountNumber);\r\n }\r\n if (selectedCash) {\r\n onCheckCashAccount(); \r\n }\r\n };\r\n\r\n const handleCheckCashAccount = () => {\r\n if (selectedAccount) {\r\n onChange(null);\r\n }\r\n onCheckCashAccount();\r\n };\r\n\r\n return (\r\n accounts.filter((account) => account.currencyISO === currencyISO).length > 0 && (\r\n
    \r\n {loading ? (\r\n \r\n ) : (\r\n \r\n {accounts\r\n .filter((account) => account.currencyISO === currencyISO)\r\n .map((account) => {\r\n return (\r\n {} : () => handleCheckAccount(account.number)}\r\n >\r\n
    \r\n \r\n
    \r\n
    \r\n \r\n {account.number}\r\n
    \r\n Currency \r\n {account.currencyISO}\r\n
    \r\n Type \r\n {account.Type}\r\n
    \r\n
    \r\n {selectedAccount === account.number ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n {} : () => handleCheckCashAccount()}\r\n >\r\n
    \r\n Use local cash account\r\n
    \r\n
    \r\n {selectedCash ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
    \r\n
    \r\n
    \r\n )}\r\n {error && {error}}\r\n
    \r\n )\r\n );\r\n};","import React from 'react';\r\nimport Combobox from \"../Combobox\";\r\n\r\nconst Holders = (props) => {\r\n\r\n const items = () => {\r\n if (props.items == null) {\r\n return [{\r\n id: props.value,\r\n description: props.name\r\n }]\r\n }\r\n\r\n return props.items;\r\n }\r\n\r\n const isDisabled = props.disabled || !props.items;\r\n\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport default Holders;","import React, { useState } from \"react\";\r\nimport { Button, Row, Col, Tooltip } from \"reactstrap\";\r\nimport Combobox from \"../Combobox\";\r\nimport { Field } from \"../Field\";\r\nimport Requeriments from \"./Requeriments\";\r\nimport { UserType } from \"../../../../../utils/Helper\";\r\nimport CircularProgress from \"../../../../CircularProgress/CircularProgress\";\r\nimport style from \"./Account.module.scss\";\r\n\r\nconst Instruction = (props) => {\r\n const [tooltipOpen, setTooltipOpen] = useState(false);\r\n\r\n const toggleTooltip = () => setTooltipOpen(!tooltipOpen);\r\n\r\n const items = (() => {\r\n if (props.items == null || props.items.length == 0) {\r\n if (props.value != null) {\r\n return [\r\n {\r\n id: props.value,\r\n description: props.value,\r\n },\r\n ];\r\n }\r\n return [];\r\n }\r\n\r\n return props.items;\r\n })();\r\n\r\n const value = props.items != null ? props.value : items.length ? props.value : -1;\r\n\r\n const { error } = props;\r\n const {\r\n setAttachment,\r\n downloadAttachment,\r\n hasAttachment,\r\n attachmentDisabled,\r\n onResendAuth,\r\n orderPdf,\r\n orderId,\r\n accountId,\r\n onChangeOrder,\r\n userType,\r\n canResend,\r\n sendingMail,\r\n hasFile,\r\n isProp,\r\n ...restProps\r\n } = props;\r\n\r\n const setUploaded = (props) => {\r\n if (props.hasAttachment && props.hasAttachment.uploadPending) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n {!isProp && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {canResend && (\r\n \r\n {sendingMail ? (\r\n \r\n ) : (\r\n \r\n onResendAuth(orderId, accountId)}\r\n >\r\n \r\n \r\n \r\n Resend Authorization Mail\r\n \r\n \r\n )}\r\n \r\n )}\r\n \r\n {(!attachmentDisabled || userType === UserType.MiddleOffice) && (value == \"Written\" || isProp) ? (\r\n onChangeOrder({ ...e, Instruction: restProps.value })}\r\n readonly={props.disabled && !userType === UserType.MiddleOffice}\r\n hasAttachment={hasAttachment}\r\n hasFile={hasFile}\r\n accountId={accountId}\r\n />\r\n ) : (\r\n \r\n {orderId && orderPdf && (\r\n
    \r\n
    \r\n Download order as pdf\r\n orderPdf({ orderId })}\r\n >\r\n \r\n \r\n
    \r\n
    \r\n )}\r\n
    \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nexport default Instruction;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Badge, Modal, ModalHeader, ModalBody, ModalFooter, Button, Input } from \"reactstrap\";\r\nimport style from \"./Account.module.scss\";\r\n\r\nconst Requeriments = (props) => {\r\n const { orderId, accountId, orderPdf, readonly, hasAttachment, downloadAttachment } = props;\r\n const [state, setState] = useState({\r\n open: false,\r\n text: \"\",\r\n uploaded: props.hasFile || false,\r\n });\r\n const[maxSize, setMaxSize] = useState(0);\r\n useEffect(() => {\r\n setState((prevState) => ({\r\n ...prevState,\r\n uploaded: props.hasFile || false,\r\n }));\r\n }, [props.hasFile]);\r\n\r\n const toggle = (save) => {\r\n if (save) {\r\n handleFileUpload(state.text);\r\n }\r\n\r\n setState((prevState) => ({\r\n ...prevState,\r\n open: !prevState.open,\r\n text: \"\",\r\n }));\r\n };\r\n\r\n const resetState = () => {\r\n const { setAttachment, onChangeOrder } = props;\r\n setAttachment({\r\n file: null,\r\n });\r\n onChangeOrder({\r\n AttachmentFileName: undefined,\r\n AttachmentFileType: undefined,\r\n HasFileUploadPending: undefined,\r\n AttachmentFileUploadPending: undefined,\r\n });\r\n setState({\r\n open: false,\r\n text: \"\",\r\n uploaded: false,\r\n });\r\n };\r\n\r\n const onChangeText = (text) => {\r\n setState((prevState) => ({\r\n ...prevState,\r\n text,\r\n }));\r\n };\r\n\r\n const handleFileUpload = (event) => {\r\n const { setAttachment, onChangeOrder } = props;\r\n const MAX_SIZE_MB = 3 * 1024 * 1024;\r\n if (typeof event === \"string\") {\r\n const fileBlob = new Blob([event], { type: \"plain/text\", endings: \"native\" });\r\n if (fileBlob.size > MAX_SIZE_MB){\r\n setMaxSize (1);\r\n return\r\n }else{\r\n setMaxSize (0);\r\n setAttachment({\r\n file: fileBlob\r\n });\r\n }\r\n \r\n } else {\r\n const uploadedFile = event.target.files[0];\r\n if (uploadedFile){\r\n if(uploadedFile.size > MAX_SIZE_MB){\r\n setMaxSize (1);\r\n return\r\n }else{\r\n setMaxSize (0);\r\n setAttachment({ file: uploadedFile });\r\n }\r\n }\r\n }\r\n\r\n onChangeOrder({\r\n AttachmentFileName: Math.random().toString(36).substring(9),\r\n AttachmentFileType: \"none\",\r\n });\r\n\r\n setState((prevState) => ({\r\n ...prevState,\r\n uploaded: true,\r\n }));\r\n };\r\n\r\n const attachmentInServer = hasAttachment && !hasAttachment.hasOwnProperty(\"uploadPending\");\r\n\r\n return (\r\n
    \r\n {orderId && (\r\n
    \r\n Download order as pdf\r\n orderPdf({ orderId })}\r\n >\r\n \r\n \r\n
    \r\n )}\r\n\r\n
    \r\n Attachment (Max 3MB)\r\n\r\n {!readonly && !state.uploaded && (\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {!readonly && !state.uploaded && (\r\n toggle()}\r\n >\r\n \r\n \r\n )}\r\n {!readonly && state.uploaded && (\r\n resetState()}\r\n >\r\n \r\n \r\n )}\r\n\r\n {!attachmentInServer && (\r\n \r\n {state.uploaded || (hasAttachment && hasAttachment.uploadPending) ? \"Uploaded\" : maxSize === 1 ? \"Too large\": \"Pending\"}\r\n \r\n )}\r\n\r\n {attachmentInServer && (\r\n \r\n )}\r\n
    \r\n\r\n \r\n
    \r\n );\r\n};\r\n\r\nconst ModalText = ({ toggle, open, text, onChangeText }) => (\r\n toggle()} className={style.modal}>\r\n toggle()}>Attachment\r\n \r\n onChangeText(e.target.value)}\r\n />\r\n \r\n \r\n {\" \"}\r\n \r\n \r\n \r\n);\r\n\r\nexport default Requeriments;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Row, Col, Input } from 'reactstrap';\r\nimport { Field } from './Field';\r\nimport Combobox from './Combobox';\r\nimport { TimeFrame, getTimeFrameName, TimeFrameIsSelectable } from '../../../../utils/Order/Order';\r\nimport { useEffect, useState } from 'react';\r\n\r\nconst Booktype = ({onChange, booktypes, booktype, readonly, balancetype, onAccountChange}) => {\r\nconst [itemsBook,setItemsBook] = useState([])\r\nconst [itemsBalance, setItemsBalance] = useState([])\r\n\r\nuseEffect(() => {\r\n let bookItems = []\r\n booktypes.forEach((item) => {\r\n bookItems.push({id: item.BooktypeName, description: item.BooktypeFriendlyName})\r\n })\r\n setItemsBook(bookItems)\r\n}, [booktypes])\r\n\r\nuseEffect(() => {\r\n const book = booktypes.filter((a) => a.BooktypeName == booktype)[0];\r\n if (book){\r\n let balanceItems = []\r\n book.BalanceType.forEach((bt) => {\r\n balanceItems.push({id: bt.BalanceTypeName, description: bt.BalanceTypeDescription})\r\n })\r\n setItemsBalance(balanceItems)\r\n }\r\n}, [booktypes, booktype])\r\n\r\nconst handleBooktypeChange = (value) => {\r\n onChange({ BookType: value });\r\n const selectedBook = booktypes.find(item => item.BooktypeName === value);\r\n if (selectedBook && selectedBook.BalanceType.length > 0) {\r\n onAccountChange({ 'BalanceType': selectedBook.BalanceType[0].BalanceTypeName });\r\n } else {\r\n onAccountChange({ 'BalanceType': '' });\r\n }\r\n};\r\n\r\n return (\r\n
    \r\n {(booktypes && booktypes.length > 0) &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n onAccountChange({'BalanceType': v})}\r\n placeholder={'Balance Type'}\r\n />\r\n \r\n \r\n \r\n }\r\n
    \r\n )\r\n}\r\n\r\nexport default Booktype;","import React from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport { Input } from \"reactstrap\";\r\nimport style from \"./Field.module.scss\";\r\nimport { CounterPartySimpleReducer } from \"../../CounterPartySet/reducer\";\r\n\r\nconst Combobox = ({ value, items, emptyLabel, onChange, disabled, darken, ...restProps }) => (\r\n onChange(e.target.value)}\r\n disabled={disabled || !items}\r\n {...restProps}\r\n >\r\n {(value == undefined || value == -1) && (\r\n \r\n )}\r\n {/* {(items || []).find((ins) => ins.id == value) === undefined && (\r\n \r\n )} */}\r\n {(items || []).map((value, index) => (\r\n \r\n ))}\r\n \r\n);\r\n\r\nconst darkenStyle = {\r\n background: \"#607d8b\",\r\n color: \"#fff\",\r\n fontWeight: 500,\r\n};\r\n\r\nexport default React.memo(Combobox);\r\n","import React from \"react\";\r\nimport { FormGroup, Label } from \"reactstrap\";\r\nimport styles from \"./Field.module.scss\";\r\nimport Symbol from \"./Symbol/Symbol\";\r\nimport RepoSymbol from \"./Symbol/RepoSymbol\";\r\nimport Account from \"./Account/Account\";\r\nimport Numeric from \"./Numeric\";\r\nimport Combobox from \"./Combobox\";\r\nimport Switch from \"./Switch\";\r\nimport TimeForce from \"./TimeForce\";\r\nimport PriceType from \"./PriceType\";\r\nimport FormSelector from \"./FormSelector\";\r\nimport Side from \"./Side\";\r\n\r\nexport const Field = ({ children, label, error, description, style = {}, noLabel, showEdit, onEditClick }) => {\r\n return (\r\n \r\n {!noLabel && }\r\n {showEdit && (\r\n \r\n Edit\r\n \r\n )}\r\n {children}\r\n
    \r\n {error}\r\n
    \r\n {!error && description && (\r\n
    \r\n {description}\r\n
    \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nexport { Symbol, RepoSymbol, Account, Numeric, Combobox, Switch, TimeForce, PriceType, FormSelector, Side };\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"side\":\"Field-module_side_fQyW9\",\"readonly\":\"Field-module_readonly_1aDts\",\"buy\":\"Field-module_buy_19_08\",\"sell\":\"Field-module_sell_QqigU\",\"buySell\":\"Field-module_buySell_Hqgca\",\"repo\":\"Field-module_repo_1Tp2Z\",\"off\":\"Field-module_off_3gj-G\",\"buySellOpenClose\":\"Field-module_buySellOpenClose_1RRv5\",\"itemBuy\":\"Field-module_itemBuy_QQssU\",\"itemSell\":\"Field-module_itemSell_1XKAi\",\"suggestionItem\":\"Field-module_suggestionItem_2Khdh\",\"switch\":\"Field-module_switch_b3MCD\",\"label\":\"Field-module_label_17WpH\",\"field\":\"Field-module_field_1_UDZ\",\"select\":\"Field-module_select_2A3uN\",\"editable-field\":\"Field-module_editable-field_1c6SC\"};","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Col } from 'reactstrap';\r\nimport Combobox from './Combobox';\r\n\r\nconst FormSelector = ({readonly, ...restProps}) => (\r\n \r\n \r\n \r\n)\r\n\r\nFormSelector.propTypes = {\r\n readonly: PropTypes.bool\r\n}\r\n\r\nexport default FormSelector;","import React from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport { Input } from \"reactstrap\";\r\nimport { NumberFormatInput } from \"../../../NumberFormatInput/NumberFormatInput\";\r\n\r\nconst Numeric = ({ value, onChange, dataTypeDecimalName, decimalScale, ...restProps }) => (\r\n onChange(isNaN(e.floatValue) ? e.value : e.floatValue)}\r\n dataTypeDecimalName={dataTypeDecimalName}\r\n decimalScale={decimalScale}\r\n {...restProps}\r\n />\r\n);\r\n\r\nNumeric.propTypes = {\r\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\r\n onChange: PropTypes.func,\r\n};\r\n\r\nconst formatNumber = (value) => {\r\n if (isNaN(value) || value === \"\") {\r\n return \"\";\r\n } else {\r\n return parseFloat(value);\r\n }\r\n};\r\n\r\nexport default React.memo(Numeric);\r\n","\r\nimport React, { useContext, useEffect, useState } from \"react\";\r\nimport Numeric from \"./Numeric\";\r\nimport { Row, Col, Button, Label } from \"reactstrap\";\r\nimport { Field } from \"./Field\";\r\nimport Combobox from \"./Combobox\";\r\nimport {\r\n OrderPriceType,\r\n getOrderTypeName,\r\n ProductType,\r\n getBaseAndPriceCurrencies,\r\n} from \"../../../../utils/Order/Order\";\r\nimport { Dispatch as Context } from \"../store/store\";\r\n\r\nconst PriceType = (props) => {\r\n const { type, onChange, errors, readonly, form, maxDecimals, newSymbol } = props;\r\n const { state } = useContext(Context);\r\n const { entities, order } = state;\r\n const { settlementCurrencies } = entities;\r\n const { OrderCurrencySymbol, OrderSettlementCurrencySymbol } = order;\r\n\r\n const items = Object.values(OrderPriceType).reduce((obj, key) => {\r\n obj[key] = { id: key, description: getOrderTypeName(key) };\r\n return obj;\r\n }, {});\r\n\r\n const { baseCurrency, priceCurrency } = getBaseAndPriceCurrencies(\r\n settlementCurrencies,\r\n OrderCurrencySymbol,\r\n OrderSettlementCurrencySymbol\r\n );\r\n\r\n const typeItems = {\r\n [ProductType.BOND]: [items[OrderPriceType.MARKET], items[OrderPriceType.LIMIT]],\r\n\r\n [ProductType.EQUITY]: [\r\n items[OrderPriceType.MARKETONOPEN],\r\n items[OrderPriceType.MARKETONCLOSE],\r\n items[OrderPriceType.MARKET],\r\n items[OrderPriceType.LIMIT],\r\n items[OrderPriceType.STOP],\r\n items[OrderPriceType.STOPLIMIT],\r\n ],\r\n\r\n [ProductType.OPTION]: [\r\n items[OrderPriceType.MARKETONOPEN],\r\n items[OrderPriceType.MARKET],\r\n items[OrderPriceType.LIMIT],\r\n items[OrderPriceType.STOP],\r\n items[OrderPriceType.STOPLIMIT],\r\n ],\r\n\r\n [ProductType.MFUNDS]: [items[OrderPriceType.MARKET]],\r\n\r\n [ProductType.MMARKET]: [items[OrderPriceType.MARKET], items[OrderPriceType.LIMIT]],\r\n\r\n [ProductType.FOREX]: [items[OrderPriceType.MARKET], items[OrderPriceType.LIMIT]],\r\n\r\n [ProductType.REPO]: [items[OrderPriceType.MARKET], items[OrderPriceType.LIMIT]],\r\n\r\n [ProductType.FUTURE]: [items[OrderPriceType.MARKET], items[OrderPriceType.LIMIT]],\r\n };\r\n \r\n return (\r\n
    \r\n \r\n \r\n \r\n onChange({ OrderType: v })}\r\n placeholder={\"Type\"}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nconst PriceField = (props, maxDecimals, newSymbol) => {\r\n switch (props.type) {\r\n case OrderPriceType.MARKET:\r\n return null;\r\n case OrderPriceType.MARKETONOPEN:\r\n return null;\r\n case OrderPriceType.MARKETONCLOSE:\r\n return null;\r\n case OrderPriceType.LIMIT:\r\n return Single(props, maxDecimals, newSymbol);\r\n case OrderPriceType.STOP:\r\n return Single(props, maxDecimals, newSymbol);\r\n case OrderPriceType.STOPLIMIT:\r\n return StopLimit(props, maxDecimals, newSymbol);\r\n default:\r\n return null;\r\n }\r\n};\r\n\r\nconst Single = ({\r\n type,\r\n form,\r\n label,\r\n values,\r\n oldValues,\r\n onChange,\r\n readonly,\r\n errors,\r\n currency,\r\n baseCurrency,\r\n priceCurrency,\r\n maxDecimals,\r\n newSymbol,\r\n editable,\r\n}) => {\r\n const typePrice =\r\n type == OrderPriceType.LIMIT ||\r\n type == OrderPriceType.MARKETONOPEN ||\r\n type == OrderPriceType.MARKETONCLOSE\r\n ? \"limPrice\"\r\n : \"stopPrice\";\r\n const _label =\r\n label ||\r\n ([ProductType.MMARKET, ProductType.FOREX, ProductType.REPO].indexOf(form) >= 0 ? \"Rate\" : \"Price\");\r\n\r\n let prefix = \"\";\r\n // if (form !== ProductType.FOREX) {\r\n // prefix = currency && currency !== \"\" ? ${currency} : \"\";\r\n // } else {\r\n // prefix = ${baseCurrency}/${priceCurrency} ;\r\n // }\r\n\r\n const [isEditing, setIsEditing] = useState(false);\r\n\r\n const handleEdit = () => {\r\n setIsEditing(true);\r\n };\r\n\r\n let suffix = \"\";\r\n if (form == ProductType.REPO) {\r\n suffix = \"%\";\r\n }\r\n\r\n let dataTypeDecimalName = \"default\";\r\n\r\n if (_label) {\r\n _label.toLowerCase() === \"price\" || \"currency\" || \"percentage\" || \"quantity\"\r\n ? (dataTypeDecimalName = _label.toLowerCase())\r\n : null;\r\n }\r\n\r\n useEffect(() => {\r\n values[typePrice] = Number(parseFloat(values[typePrice]).toFixed(maxDecimals));\r\n oldValues[typePrice] = Number(parseFloat(oldValues[typePrice]).toFixed(maxDecimals));\r\n }, [maxDecimals, newSymbol]);\r\n\r\n maxDecimals === undefined ? (maxDecimals = 8) : null;\r\n\r\n return (\r\n \r\n \r\n onChange({\r\n [type == OrderPriceType.LIMIT ||\r\n type == OrderPriceType.MARKETONOPEN ||\r\n type == OrderPriceType.MARKETONCLOSE\r\n ? \"OrderPrice\"\r\n : \"OrderStopPrice\"]: v\r\n })\r\n }\r\n /> \r\n {!Number.isNaN(oldValues[typePrice]) && oldValues[typePrice] !== undefined && oldValues[typePrice] !== values[typePrice] && (\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nconst StopLimit = ({\r\n values,\r\n oldValues,\r\n onChange,\r\n readonly,\r\n errors,\r\n currency,\r\n baseCurrency,\r\n priceCurrency,\r\n maxDecimals,\r\n newSymbol,\r\n editable\r\n}) => {\r\n const props = {\r\n onChange,\r\n values,\r\n oldValues,\r\n errors,\r\n readonly,\r\n currency,\r\n baseCurrency,\r\n priceCurrency,\r\n maxDecimals,\r\n newSymbol,\r\n editable\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default PriceType;","import React, { Component } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport {\r\n Button,\r\n Col,\r\n ButtonDropdown,\r\n DropdownToggle,\r\n DropdownMenu,\r\n DropdownItem,\r\n UncontrolledDropdown,\r\n} from \"reactstrap\";\r\nimport {\r\n ProductType,\r\n getProductTypeName,\r\n Mode,\r\n getOptionsTickerFromFields,\r\n OrderStatus,\r\n Type,\r\n} from \"../../../../utils/Order/Order\";\r\nimport style from \"./Field.module.scss\";\r\nimport classnames from \"classnames\";\r\n\r\nconst Side = (props) => {\r\n const { readonly, withOpenClose } = props;\r\n\r\n let component = null;\r\n\r\n if (readonly) {\r\n component = ;\r\n component =\r\n props.orderForm == ProductType.REPO ? : ;\r\n } else {\r\n if (withOpenClose) {\r\n component = ;\r\n } else {\r\n component = props.orderForm == ProductType.REPO ? : ;\r\n }\r\n }\r\n\r\n return component;\r\n};\r\n\r\nSide.propTypes = {};\r\n\r\nconst SideReadOnly = ({ side, OrderOpenClose, withOpenClose }) => {\r\n return (\r\n \r\n {side}\r\n {withOpenClose ? OrderOpenClose : null}\r\n
    \r\n );\r\n};\r\n\r\nconst SideReadOnlyRepo = ({ side, OrderOpenClose, withOpenClose }) => {\r\n return (\r\n \r\n {side == \"Buy\" ? \"Lend\" : \"Borrow\"}\r\n {withOpenClose ? OrderOpenClose : null}\r\n
    \r\n );\r\n};\r\n\r\nconst BuySellOpenClose = ({ side, openClose, onChange }) => {\r\n return (\r\n
    \r\n \r\n \r\n {side} {openClose}\r\n \r\n \r\n onChange({ OrderSide: \"Buy\", OrderOpenClose: \"Open\" })}\r\n className={style.itemBuy}\r\n >\r\n Buy Open\r\n \r\n onChange({ OrderSide: \"Buy\", OrderOpenClose: \"Close\" })}\r\n className={style.itemBuy}\r\n >\r\n Buy Close\r\n \r\n onChange({ OrderSide: \"Sell\", OrderOpenClose: \"Open\" })}\r\n className={style.itemSell}\r\n >\r\n Sell Open\r\n \r\n onChange({ OrderSide: \"Sell\", OrderOpenClose: \"Close\" })}\r\n className={style.itemSell}\r\n >\r\n Sell Close\r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nconst BuySell = ({ side, onChange }) => (\r\n
    \r\n onChange({ OrderSide: \"Buy\" })}\r\n className={`${style.buy} ${side == \"Buy\" ? \"\" : style.off}`}\r\n disabled={side == \"Buy\"}\r\n >\r\n Buy\r\n \r\n\r\n onChange({ OrderSide: \"Sell\" })}\r\n className={`${style.sell} ${side == \"Buy\" ? style.off : \"\"}`}\r\n disabled={side != \"Buy\"}\r\n >\r\n Sell\r\n \r\n
    \r\n);\r\n\r\nconst BuySellRepo = ({ side, onChange }) => (\r\n
    \r\n onChange({ OrderSide: \"Buy\" })}\r\n className={`${style.buy} ${style.repo} ${side == \"Buy\" ? \"\" : style.off}`}\r\n disabled={side == \"Buy\"}\r\n >\r\n Lend\r\n \r\n\r\n onChange({ OrderSide: \"Sell\" })}\r\n className={`${style.sell} ${style.repo} ${side == \"Buy\" ? style.off : \"\"}`}\r\n disabled={side != \"Buy\"}\r\n >\r\n Borrow\r\n \r\n
    \r\n);\r\n\r\nexport default React.memo(Side);\r\n","import React from \"react\";\r\nimport { Input, Label } from \"reactstrap\";\r\nimport style from \"./Field.module.scss\";\r\n\r\nconst Switch = ({ value, label, disabled, onChange }) => (\r\n
    \r\n \r\n\r\n \r\n
    \r\n);\r\n\r\nexport default React.memo(Switch);\r\n","import React, { useEffect, useState } from \"react\";\r\nimport style from \"./Info.module.scss\";\r\nimport MiniLineChart from \"./MiniLineChart\";\r\nimport { FormattedNumber } from \"../../../../../FormattedNumber/FormattedNumber\";\r\n\r\nconst BoxBonds = ({ items, series }) => {\r\n const [chart, setChart] = useState(null);\r\n\r\n useEffect(() => {\r\n const chart = { data: [], percent: 0 };\r\n\r\n series.forEach((serie) => {\r\n chart.data.push(+serie.Price);\r\n });\r\n\r\n if (chart.data.length > 1) {\r\n const v0 = chart.data[chart.data.length - 2];\r\n const v1 = chart.data[chart.data.length - 1];\r\n\r\n chart.percent = ((v1 - v0) / v0) * 100;\r\n\r\n setChart(chart);\r\n }\r\n }, [series]);\r\n\r\n return (\r\n
    \r\n \r\n \r\n {items.AssetName && (\r\n \r\n \r\n \r\n )}\r\n\r\n \r\n \r\n \r\n \r\n\r\n {(items[\"Ref Discount Rate\"] || items.Coupon) && (\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {(items[\"Fund Type\"] || items[\"Fund Reinvests\"]) && (\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {items[\"Settlment day\"] && items.days && (\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n {items.AssetName}\r\n
    \r\n {items.ISIN || \"-\"}\r\n \r\n {items[\"Ref Price\"] && (\r\n \r\n Ref Price:\r\n \r\n \r\n )}\r\n\r\n {items[\"Ref Discount Rate\"] && (\r\n \r\n Ref Discount Rate:\r\n {items[\"Ref Discount Rate\"]}\r\n \r\n )}\r\n
    \r\n Sett. Date:\r\n {items[\"Settlment day\"] || \"-\"}\r\n \r\n Coupon:\r\n \r\n
    \r\n Fund Type:\r\n {items[\"Fund Type\"] || \"-\"}\r\n \r\n Fund Reinvests:\r\n {items[\"Fund Reinvests\"] || \"-\"}\r\n
    \r\n Last Payment\r\n {items[\"Last coupon\"] || \"-\"}\r\n \r\n Days ago:\r\n {items.days || \"-\"}\r\n
    \r\n {items.Maturity && (\r\n \r\n Maturity\r\n {items.Maturity || \"-\"}\r\n \r\n )}\r\n {chart && }
    \r\n
    \r\n );\r\n};\r\n\r\nexport default BoxBonds;\r\n","import React, { Component, useState, useEffect } from \"react\";\r\nimport PriceHighlight from \"./PriceHighlight\";\r\nimport { wsOnReceive, wsSubscribeSymbol, wsUnsuscribeSymbol } from \"./IEX\";\r\nimport style from \"./Info.module.scss\";\r\nimport { debounce } from \"../../../../../../utils/Helper\";\r\nimport MiniLineChart from \"./MiniLineChart\";\r\n\r\nconst imgUrl = (value) => `https://storage.googleapis.com/iex/api/logos/${value}.png`;\r\n\r\nconst chart1dUrl = (value) => `https://api.iextrading.com/1.0/stock/${value}/chart/1d`;\r\n\r\nconst BoxEquity = ({ value, detailed, items, ...props }) => {\r\n const [chart, setChart] = useState(null);\r\n const [price, setPrice] = useState(null);\r\n\r\n useEffect(() => {\r\n fetch(chart1dUrl(value))\r\n .then((r) => r.json())\r\n .then((r) => {\r\n // ToDo fix IEX call with cloud IEX\r\n const chart = {\r\n data: [],\r\n percent: 0,\r\n };\r\n\r\n for (let i = 0; i < r.length; i += Math.trunc(r.length / 15)) {\r\n if (r[i] && r[i].average && r[i].average > 0) {\r\n chart.data.push(r[i].average);\r\n }\r\n }\r\n\r\n if (chart.data.length > 1) {\r\n const v0 = chart.data[chart.data.length - 2];\r\n const v1 = chart.data[chart.data.length - 1];\r\n\r\n chart.percent = ((v1 - v0) / v0) * 100;\r\n\r\n setChart(chart);\r\n }\r\n })\r\n .catch((reason) => props.series)\r\n .then((series) => {\r\n const chart = { data: [], percent: 0 };\r\n\r\n series.forEach((serie) => {\r\n chart.data.push(+serie.Price);\r\n });\r\n\r\n if (chart.data.length > 1) {\r\n const v0 = chart.data[chart.data.length - 2];\r\n const v1 = chart.data[chart.data.length - 1];\r\n\r\n chart.percent = ((v1 - v0) / v0) * 100;\r\n\r\n setChart(chart);\r\n }\r\n });\r\n }, [props.series, value]);\r\n\r\n const { provider, description } = props;\r\n\r\n return (\r\n
    \r\n
    \r\n \"\"\r\n \r\n {items.AssetName}\r\n
    \r\n {items.ISIN || \"-\"}\r\n
    \r\n\r\n {chart && }\r\n\r\n {provider == \"IEX\" && price != null ? {} : null}\r\n
    \r\n {detailed && (\r\n \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nclass DetailedPrice extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.handleChgPriceDebounced = debounce(() => {\r\n this._isMounted &&\r\n this.setState({\r\n data: this.state.data_tmp,\r\n });\r\n }, 1000);\r\n\r\n // initialize values from corex\r\n let initialData = null;\r\n if (props.series.length > 0) {\r\n const lastValue = props.series[0];\r\n initialData = {\r\n ask: (+lastValue.Open).toFixed(2),\r\n bid: (+lastValue.Price).toFixed(2),\r\n last: (+lastValue.Close).toFixed(2),\r\n };\r\n }\r\n\r\n this.state = { data: initialData, old: null, loading: true };\r\n }\r\n\r\n componentDidMount() {\r\n this._isMounted = true;\r\n\r\n wsOnReceive((data) => {\r\n this._isMounted &&\r\n this.setState({\r\n data_tmp: data,\r\n loading: false,\r\n old: this.state.data,\r\n });\r\n\r\n this.handleChgPriceDebounced();\r\n\r\n this.props.changePrice({ price: data.last });\r\n });\r\n\r\n wsSubscribeSymbol(this.props.value);\r\n }\r\n\r\n componentWillUnmount() {\r\n this._isMounted = false;\r\n wsUnsuscribeSymbol(this.props.value);\r\n }\r\n\r\n getValues = (name) => {\r\n const { data, old } = this.state;\r\n\r\n const getValue = (root, name) => (root == null ? \"-\" : root[name]);\r\n\r\n return {\r\n oldValue: getValue(old, name),\r\n newValue: getValue(data, name),\r\n };\r\n };\r\n\r\n render() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    Bid\r\n \r\n Open\r\n \r\n
    Ask\r\n \r\n Close\r\n \r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport default BoxEquity;\r\n","import io from \"socket.io-client\";\r\n\r\nconst URL_IEX_SOCKET = \"https://ws-api.iextrading.com/1.0/tops\";\r\n\r\nlet _symbol = \"\";\r\nlet _onReceive = null;\r\nlet _socket = null;\r\n\r\nif (_socket) {\r\n _socket.on(\"message\", (data) => {\r\n const quote = JSON.parse(data);\r\n\r\n _onReceive &&\r\n _onReceive({\r\n symbol: quote.symbol,\r\n ask: quote.askPrice,\r\n bid: quote.bidPrice,\r\n last: quote.lastSalePrice,\r\n });\r\n });\r\n}\r\n\r\nexport const wsOnReceive = (callback) => {\r\n _onReceive = callback;\r\n};\r\n\r\nexport const wsSubscribeSymbol = (symbol) => {\r\n if (!_socket) _socket = io(URL_IEX_SOCKET, { reconnection: false });\r\n if (_symbol) {\r\n _socket.emit(\"unsubscribe\", _symbol);\r\n }\r\n\r\n _symbol = symbol;\r\n _socket.emit(\"subscribe\", _symbol);\r\n};\r\n\r\nexport const wsUnsuscribeSymbol = (symbol) => {\r\n if (!_socket) _socket = io(URL_IEX_SOCKET, { reconnection: false });\r\n _socket.emit(\"unsubscribe\", _symbol);\r\n _symbol = \"\";\r\n};\r\n","import React, { useState, useEffect, useContext } from \"react\";\r\n\r\nimport { ProductType } from \"../../../../../../utils/Order/Order\";\r\nimport BoxEquity from \"./BoxEquity\";\r\nimport BoxBonds from \"./BoxBonds\";\r\nimport style from \"./Info.module.scss\";\r\nimport CircularProgress from \"../../../../../CircularProgress/CircularProgress\";\r\nimport { Dispatch } from \"../../../store/store\";\r\nimport { FormattedNumber } from \"../../../../../FormattedNumber/FormattedNumber\";\r\n\r\nconst Info = ({ assetInfo, form, onLoadAssetOrderData, ...props }) => {\r\n const [itemsReq, setItemsReq] = useState({ items: null, tradeCurrencies: [], loading: true });\r\n const [assetInfoForm, setAssetInfoForm] = useState(\"\");\r\n const {\r\n state: {\r\n order: { AssetId },\r\n ui: { userRole },\r\n },\r\n } = useContext(Dispatch);\r\n\r\n useEffect(() => {\r\n assetInfo().then((assetorderdata) => {\r\n const items = assetorderdata.items.reduce((obj, item) => {\r\n obj[item.key] = item.value;\r\n return obj;\r\n }, {});\r\n\r\n setAssetInfoForm(assetorderdata.AssetForm);\r\n\r\n setItemsReq({\r\n series: assetorderdata.timeseries,\r\n loading: false,\r\n items,\r\n tradeCurrencies: assetorderdata.settlementCurrency || [],\r\n });\r\n\r\n onLoadAssetOrderData({ ...assetorderdata, items });\r\n });\r\n }, []);\r\n\r\n if (itemsReq.loading) {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n\r\n const handleClick = () => {\r\n if ((userRole === \"Advisor\" || userRole === \"Trader\") && AssetId) {\r\n window.open(`/#/asset/${AssetId}/quotes`, \"_blank\");\r\n }\r\n };\r\n\r\n return (\r\n
    \r\n {\r\n {\r\n [ProductType.BOND]: ,\r\n [ProductType.MMARKET]: ,\r\n [ProductType.EQUITY]: (\r\n \r\n ),\r\n [ProductType.FUTURE]: (\r\n \r\n ),\r\n [ProductType.OPTION]: (\r\n \r\n ),\r\n [ProductType.FOREX]: (\r\n \r\n ),\r\n [ProductType.MFUNDS]: ,\r\n [ProductType.REPO]: (\r\n \r\n ),\r\n }[form]\r\n }\r\n
    \r\n );\r\n};\r\n\r\nconst BoxForex = ({ items, tradeCurrencies, value, value2 }) => {\r\n let baseCurrency = value;\r\n let priceCurrency = value2;\r\n\r\n const tradeCurrency = tradeCurrencies.find((c) => c.currencyInfo.currencyISO == value2);\r\n if (tradeCurrency && tradeCurrency.multiplies) {\r\n baseCurrency = value2;\r\n priceCurrency = value;\r\n }\r\n\r\n return (\r\n
    \r\n
    \r\n
    Currency:
    \r\n
    \r\n {baseCurrency}/\r\n {priceCurrency}\r\n
    \r\n
    \r\n\r\n
    \r\n
    Ref Price:
    \r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n
    Quote Date:
    \r\n {items.CurrencyPairDate}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst BoxRepo = ({ form, items, series, tradeCurrencies, value, value2, ...props }) => {\r\n switch (form) {\r\n case ProductType.BOND:\r\n case ProductType.MMARKET:\r\n case ProductType.MFUNDS:\r\n return ;\r\n case ProductType.FOREX:\r\n return ;\r\n case ProductType.EQUITY:\r\n case ProductType.OPTION:\r\n return ;\r\n }\r\n\r\n return null;\r\n};\r\n\r\nexport default Info;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"info\":\"Info-module_info_7yKah\",\"equity\":\"Info-module_equity_19SUa\",\"description\":\"Info-module_description_1ZZUD\",\"img\":\"Info-module_img_1Mjil\",\"tablePrice\":\"Info-module_tablePrice_1-cRL\",\"highlight\":\"Info-module_highlight_2cQM0\",\"bonds\":\"Info-module_bonds_3AJJS\",\"containerStyle\":\"Info-module_containerStyle_3u3gl\",\"itemStyle\":\"Info-module_itemStyle_ucWh4\",\"fadein\":\"Info-module_fadein_2_zSM\"};","import React from 'react';\r\nimport { Sparklines, SparklinesLine } from 'react-sparklines';\r\n\r\nconst MiniLineChart = ({data, percent}) => (\r\n
    \r\n
    \r\n {(percent).toFixed(2)}%\r\n
    \r\n \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n)\r\n\r\nconst styles = {\r\n container: {\r\n display: 'inline-flex',\r\n alignItems: 'end'\r\n },\r\n\r\n chart: {\r\n width: '50px',\r\n height: '20px'\r\n },\r\n\r\n change: {\r\n fontSize: '13px',\r\n marginRight: '3px'\r\n }\r\n}\r\n\r\nconst color = (v) => {\r\n if (v >= 0) return \"#19BE87\";\r\n else return \"#F72121\";\r\n}\r\n\r\nexport default MiniLineChart;\r\n","import React from \"react\";\r\nimport style from \"./Info.module.scss\";\r\nimport classnames from \"classnames\";\r\nimport { formattedNumber } from \"../../../../../FormattedNumber/FormattedNumber\";\r\n\r\nconst PriceHighlight = ({ oldValue, newValue, maxDecimals }) => {\r\n const Status = {\r\n NONE: 0,\r\n UP: 1,\r\n DOWN: 2,\r\n };\r\n\r\n const nextStatus = isNaN(oldValue) ? Status.NONE : oldValue > newValue ? Status.DOWN : Status.UP;\r\n\r\n return (\r\n
    \r\n {formattedNumber(newValue, \"price\", maxDecimals)}\r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default PriceHighlight;\r\n","import React from \"react\";\r\nimport style from \"./Options.module.scss\";\r\nimport { Input } from \"reactstrap\";\r\n\r\nconst Filter = ({ selected, range, onChange, description }) => (\r\n
    \r\n Date\r\n onChange(+e.target.value)} className={style.date}>\r\n {range.map((settDate, index) => (\r\n \r\n ))}\r\n \r\n\r\n \r\n {description}\r\n \r\n
    \r\n);\r\n\r\nexport default Filter;\r\n","import React, { Component } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Container, Row, Col, Button } from \"reactstrap\";\r\nimport Filter from \"./Filter\";\r\nimport Table from \"./Table\";\r\nimport style from \"./Options.module.scss\";\r\nimport CircularProgress from \"../../../../../CircularProgress/CircularProgress\";\r\nimport { getOptionFieldsFromTicker } from \"../../../../../../utils/Order/Order\";\r\n\r\nclass Options extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = defaultState;\r\n }\r\n\r\n componentDidMount() {\r\n this.props.setValues(() => {\r\n this.setState(defaultState, () => this.fetchOptions());\r\n });\r\n }\r\n\r\n fetchOptions() {\r\n const { symbol } = this.props;\r\n\r\n this.props.fetchOptions({ date: this.state.selected, symbol }).then((response) => {\r\n const yahooData = JSON.parse(response.response);\r\n const optionChain = yahooData.optionChain;\r\n\r\n if (optionChain.result.length != 0 && optionChain.result[0].expirationDates.length != 0) {\r\n let rows = {};\r\n\r\n const calls = optionChain.result[0].options[0].calls;\r\n const puts = optionChain.result[0].options[0].puts;\r\n const strikes = optionChain.result[0].strikes;\r\n const range = optionChain.result[0].expirationDates.map((e) => {\r\n return { id: e, date: new Date(e * 1000) };\r\n });\r\n\r\n strikes.forEach((strike) => (rows[strike] = { call: {}, put: {} }));\r\n calls.forEach((call) => Object.assign(rows[call.strike].call, call));\r\n puts.forEach((put) => Object.assign(rows[put.strike].put, put));\r\n\r\n this.setState({\r\n rows,\r\n range,\r\n loading: false,\r\n description: optionChain.result[0].quote.longName,\r\n selected: optionChain.result[0].options[0].expirationDate,\r\n });\r\n } else {\r\n this.setState({ loading: false, rows: {} });\r\n }\r\n });\r\n }\r\n\r\n onChangeDate = (value) => {\r\n this.setState({ selected: value, loading: true }, () => this.fetchOptions());\r\n };\r\n\r\n useOption = (option) => {\r\n const optionFields = getOptionFieldsFromTicker(option.contractSymbol);\r\n this.props.onChange(optionFields);\r\n this.props.toggle();\r\n };\r\n\r\n render() {\r\n const { open, toggle } = this.props;\r\n const { range, selected, rows, description, loading } = this.state;\r\n\r\n return (\r\n
    \r\n \r\n Options List\r\n \r\n \r\n \r\n \r\n {range.length > 0 && (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n {loading ? : }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nconst defaultState = {\r\n range: [],\r\n selected: null,\r\n rows: {},\r\n description: null,\r\n loading: true,\r\n};\r\n\r\nexport default Options;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"Options-module_modal_1jD0F\",\"body\":\"Options-module_body_3xzlC\",\"filter\":\"Options-module_filter_zax6I\",\"date\":\"Options-module_date_2uODt\",\"label\":\"Options-module_label_3-P4S\",\"table\":\"Options-module_table_w-jBs\",\"link\":\"Options-module_link_1wYiX\",\"strike\":\"Options-module_strike_3ilV5\",\"put\":\"Options-module_put_1YcTy\"};","import React from \"react\";\r\nimport style from \"./Options.module.scss\";\r\nimport { FormattedNumber } from \"../../../../../FormattedNumber/FormattedNumber\";\r\n\r\nconst Table = ({ rows, useOption }) => {\r\n if (Object.keys(rows).length == 0) {\r\n return No options found it.;\r\n }\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {Object.keys(rows).map((key) => buildRow({ key, r: rows[key], useOption }))}\r\n
    LastChg.BidAskVol.StrikeLastChg.BidAskVol.
    \r\n
    \r\n );\r\n};\r\n\r\nconst buildRow = ({ key, r, useOption }) => (\r\n \r\n \r\n useOption(r.call)} className={style.link}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {key}\r\n\r\n useOption(r.put)} className={style.link}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nconst NumericItem = ({ value, dataTypeDecimalName }) => {\r\n if (value != undefined) {\r\n return ;\r\n }\r\n\r\n return \"-\";\r\n};\r\n\r\nexport default Table;\r\n","import React, { Component } from \"react\";\r\nimport { Row, Col, Button } from \"reactstrap\";\r\nimport { ProductType } from \"../../../../../utils/Order/Order\";\r\nimport Autosuggest from \"../../../../Autosuggest/Autosuggest\";\r\nimport styleF from \"./../Field.module.scss\";\r\nimport Options from \"./Options/Options\";\r\nimport Info from \"./Info/Info\";\r\n\r\nclass RepoSymbol extends Component {\r\n constructor(props) {\r\n super(props);\r\n const { value, description, hideInfo } = props;\r\n\r\n const showInfo = !hideInfo && !!value;\r\n\r\n this.state = {\r\n showOptions: false,\r\n showInfo,\r\n };\r\n }\r\n\r\n componentWillReceiveProps(nextProps) {\r\n const { form, description, value, assetid } = this.props;\r\n if (form != nextProps.form) {\r\n this.setState({ showInfo: false });\r\n }\r\n /// case de forex se necesita pedir assetInfo si estan las dos monedas selccionadas de la lista\r\n else if (form == ProductType.REPO) {\r\n this.setState({ showInfo: nextProps.hideInfo != undefined && !nextProps.hideInfo });\r\n }\r\n\r\n if (nextProps.assetid && assetid !== nextProps.assetid && nextProps.assetInfo != undefined) {\r\n nextProps.assetInfo();\r\n }\r\n\r\n // if (nextProps.description && description !== nextProps.description && nextProps.assetInfo != undefined) {\r\n // nextProps.assetInfo();\r\n // }\r\n }\r\n\r\n onSuggestionsFetchRequested = ({ value }) => {\r\n return this.props\r\n .searchSymbol({\r\n type: this.props.form,\r\n text: value,\r\n })\r\n .then((response) => response.response.symbols);\r\n };\r\n\r\n onChange = (method, value) => {\r\n const { attrId, attrTicker, attrDescription, attrProvider, hideInfo } = this.props;\r\n\r\n let _value = defaultSymbolValue({\r\n attrId,\r\n attrTicker,\r\n attrDescription,\r\n attrProvider,\r\n });\r\n\r\n if (method != \"type\") {\r\n _value = {\r\n [attrId]: value.Id,\r\n [attrTicker]: value.Ticker,\r\n [attrDescription]: value.Description,\r\n [attrProvider]: value.Provider,\r\n };\r\n } else {\r\n _value[attrTicker] = value;\r\n }\r\n\r\n this.props.onChange(_value, value);\r\n\r\n this.setState({ ...this.state, showInfo: method != \"type\" && !hideInfo });\r\n };\r\n\r\n toggleOptions = () => {\r\n if (!this.state.showOptions) {\r\n this.optionsMethod();\r\n }\r\n\r\n this.setState({ showOptions: !this.state.showOptions });\r\n };\r\n\r\n render() {\r\n const {\r\n form,\r\n placeholder,\r\n invalid,\r\n disabled,\r\n value,\r\n value2,\r\n description,\r\n provider,\r\n getYahooOptions,\r\n assetInfo,\r\n hideButtonOptn,\r\n } = this.props;\r\n\r\n const { showOptions, showInfo } = this.state;\r\n const inputProps = {\r\n placeholder,\r\n invalid,\r\n disabled,\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {form == ProductType.OPTION && !hideButtonOptn && (\r\n (this.optionsMethod = method)}\r\n onChange={this.props.onChange}\r\n disabled={disabled}\r\n />\r\n )}\r\n \r\n\r\n {showInfo && value != \"\" ? (\r\n \r\n ) : null}\r\n \r\n );\r\n }\r\n}\r\n\r\nconst defaultSymbolValue = ({ attrTicker, attrId, attrDescription, attrProvider }) => ({\r\n [attrId]: null,\r\n [attrTicker]: \"\",\r\n [attrDescription]: null,\r\n [attrProvider]: null,\r\n});\r\n\r\nconst renderSuggestion = (suggestion) => {\r\n return (\r\n
    \r\n {suggestion.Ticker}\r\n {\" - \"}\r\n {suggestion.Description}\r\n
    \r\n );\r\n};\r\n\r\nconst getSuggestionValue = (suggestion) => suggestion.Ticker;\r\n\r\nconst GetOptions = ({ symbol, toggle, open, setValues, fetchOptions, onChange, disabled }) => (\r\n \r\n \r\n {symbol && (\r\n \r\n )}\r\n \r\n);\r\n\r\nexport default RepoSymbol;\r\n","import React, { Component, useEffect } from \"react\";\r\nimport { Row, Col, Button } from \"reactstrap\";\r\nimport { ProductType } from \"../../../../../utils/Order/Order\";\r\nimport Autosuggest from \"../../../../Autosuggest/Autosuggest\";\r\nimport styleF from \"./../Field.module.scss\";\r\nimport Options from \"./Options/Options\";\r\nimport Info from \"./Info/Info\";\r\n\r\nclass Symbol extends Component {\r\n constructor(props) {\r\n super(props);\r\n const { value, description, hideInfo } = props;\r\n\r\n const showInfo = !hideInfo && !!value;\r\n\r\n this.state = {\r\n showOptions: false,\r\n showInfo,\r\n };\r\n }\r\n\r\n componentWillReceiveProps(nextProps) {\r\n const { form, description, value, assetid } = this.props;\r\n if (form != nextProps.form) {\r\n this.setState({ showInfo: false });\r\n }\r\n /// case de forex se necesita pedir assetInfo si estan las dos monedas selccionadas de la lista\r\n else if (form == ProductType.FOREX) {\r\n this.setState({ showInfo: nextProps.hideInfo != undefined && !nextProps.hideInfo });\r\n }\r\n\r\n if (nextProps.assetid && assetid !== nextProps.assetid && nextProps.assetInfo != undefined) {\r\n nextProps.assetInfo();\r\n }\r\n\r\n // if (nextProps.description && description !== nextProps.description && nextProps.assetInfo != undefined) {\r\n // nextProps.assetInfo();\r\n // }\r\n }\r\n\r\n onSuggestionsFetchRequested = ({ value }) => {\r\n return this.props\r\n .searchSymbol({\r\n type: this.props.form,\r\n text: value,\r\n })\r\n .then((response) => response.response.symbols);\r\n };\r\n\r\n onChange = (method, value) => {\r\n const { attrId, attrTicker, attrDescription, attrProvider, hideInfo, attrCurrency } = this.props;\r\n\r\n let _value = defaultSymbolValue({\r\n attrId,\r\n attrTicker,\r\n attrDescription,\r\n attrProvider,\r\n attrCurrency,\r\n });\r\n\r\n if (method != \"type\") {\r\n _value = {\r\n [attrId]: value.Id,\r\n [attrTicker]: value.Ticker,\r\n [attrDescription]: value.Description,\r\n [attrProvider]: value.Provider,\r\n [attrCurrency]: value.SettCurrencyName,\r\n };\r\n } else {\r\n _value[attrTicker] = value;\r\n }\r\n\r\n this.props.onChange(_value, value);\r\n\r\n this.setState({ ...this.state, showInfo: method != \"type\" && !hideInfo });\r\n };\r\n\r\n toggleOptions = () => {\r\n if (!this.state.showOptions) {\r\n this.optionsMethod();\r\n }\r\n\r\n this.setState({ showOptions: !this.state.showOptions });\r\n };\r\n\r\n componentDidUpdate() {\r\n const { updatePrice } = this.props;\r\n updatePrice ? updatePrice() : null;\r\n }\r\n\r\n handleLoadAssetOrderData = (orderAssetData) => {\r\n this.props.onChange({ OrderAssetData: orderAssetData });\r\n };\r\n\r\n render() {\r\n const {\r\n form,\r\n placeholder,\r\n invalid,\r\n disabled,\r\n value,\r\n value2,\r\n description,\r\n provider,\r\n getYahooOptions,\r\n assetInfo,\r\n hideButtonOptn,\r\n } = this.props;\r\n\r\n const { showOptions, showInfo } = this.state;\r\n const inputProps = {\r\n placeholder,\r\n invalid,\r\n disabled,\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {form == ProductType.OPTION && !hideButtonOptn && (\r\n (this.optionsMethod = method)}\r\n onChange={this.props.onChange}\r\n disabled={disabled}\r\n />\r\n )}\r\n \r\n\r\n {showInfo && value != \"\" ? (\r\n \r\n ) : null}\r\n \r\n );\r\n }\r\n}\r\n\r\nconst defaultSymbolValue = ({ attrTicker, attrId, attrDescription, attrProvider, attrCurrency }) => ({\r\n [attrId]: null,\r\n [attrTicker]: \"\",\r\n [attrDescription]: null,\r\n [attrProvider]: null,\r\n [attrCurrency]: null,\r\n});\r\n\r\nconst renderSuggestion = (suggestion) => {\r\n return (\r\n
    \r\n {suggestion.Ticker}\r\n {\" - \"}\r\n {suggestion.Description}\r\n
    \r\n );\r\n};\r\n\r\nconst getSuggestionValue = (suggestion) => suggestion.Ticker;\r\n\r\nconst GetOptions = ({ symbol, toggle, open, setValues, fetchOptions, onChange, disabled }) => (\r\n \r\n \r\n {symbol && (\r\n \r\n )}\r\n \r\n);\r\n\r\nexport default Symbol;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Row, Col, Input } from 'reactstrap';\r\nimport { Field } from './Field';\r\nimport Combobox from './Combobox';\r\nimport { TimeFrame, getTimeFrameName, TimeFrameIsSelectable } from '../../../../utils/Order/Order';\r\n\r\nconst TimeForce = ({onChange, timeForce, date, errors, readonly}) => {\r\n\r\n /*\r\n TimeForce = OPG se utiliza si solo si el type es Market Open. \r\n Si el type != Market Open, se puede seleccionar cualquier TimeForce, excepto OPG.\r\n */\r\n const typeItems = timeForce == 'OPG' ? \r\n [{id: 'OPG', description: 'OPG'}]\r\n :\r\n Object.values(TimeFrame).filter(k => TimeFrameIsSelectable(k)).map((key, index) => (\r\n { id: key, description: getTimeFrameName(key) }\r\n ))\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n onChange({'OrderTimeInForce': v})}\r\n placeholder={'Time in force'}\r\n style={{background: '#edf9ff', fontWeight: 500}}\r\n />\r\n \r\n \r\n \r\n { timeForce == TimeFrame.GTD &&\r\n \r\n onChange({'OrderGTD': e.target.value})} \r\n value={date}\r\n disabled={readonly.date}\r\n style={{padding: '6px 4px'}}\r\n required\r\n />\r\n \r\n }\r\n \r\n \r\n
    \r\n )\r\n}\r\n\r\nexport default React.memo(TimeForce);","import React, { useContext } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport { Button } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport style from \"./Footer.module.scss\";\r\nimport classnames from \"classnames\";\r\nimport { Mode } from \"../../../../utils/Order/Order\";\r\nimport { Dispatch } from \"../store/store\";\r\n\r\nconst Footer = ({ actions, mode, side, buttons, wizzard }) => {\r\n const { dispatch } = useContext(Dispatch);\r\n const { precheck, modify, confirm, save } = buttons;\r\n\r\n return (\r\n
    \r\n \r\n
    \r\n {\" \"}\r\n {modify.visible && !wizzard.enabled && (\r\n \r\n )}{\" \"}\r\n {modify.visible && !wizzard.enabled && (\r\n \r\n {modify.label || \"Modify\"}\r\n \r\n /*\r\n \r\n */\r\n )}{\" \"}\r\n {save.visible && !wizzard.enabled && (\r\n \r\n Save\r\n \r\n )}{\" \"}\r\n {precheck.visible && !wizzard.enabled && (\r\n onChangeMode(dispatch, Mode.PRECHECK)}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {precheck.label || \"\tPre check\"}\r\n \r\n )}{\" \"}\r\n {wizzard.enabled && wizzard.nextBtn.visible && (\r\n \r\n {wizzard.nextBtn.label}\r\n \r\n )}{\" \"}\r\n {confirm.visible && !wizzard.enabled && (\r\n \r\n {confirm.label}\r\n \r\n )}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst onChangeMode = (dispatch, mode) => dispatch({ type: \"CHANGE_MODE\", mode });\r\n\r\nconst GoStepBack = ({ wizzard, dispatch }) => {\r\n if (wizzard.enabled && wizzard.activeStep != 0) {\r\n return (\r\n \r\n );\r\n } else return null;\r\n};\r\n\r\nexport default Footer;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"footer\":\"Footer-module_footer_3zhki\",\"buttons\":\"Footer-module_buttons_3mzNE\",\"buy\":\"Footer-module_buy_3j5E0\",\"sell\":\"Footer-module_sell_jui7B\",\"totals\":\"Footer-module_totals_8Peff\",\"totalsLoading\":\"Footer-module_totalsLoading_2TI3w\"};","import React, { useState, useEffect } from \"react\";\r\nimport { Container, Col, Row } from \"reactstrap\";\r\nimport { LoadingMessage } from \"../Precheck/Precheck\";\r\nimport { Number } from \"../Precheck/Details\";\r\nimport style from \"./Footer.module.scss\";\r\nimport { FormattedDate } from \"react-intl\";\r\n\r\nconst OrderTotals = ({ fetchTotals, orderId, decimalScale }) => {\r\n const [values, setValues] = useState(null);\r\n\r\n useEffect(() => {\r\n fetchTotals({ orderId }).then((r) => {\r\n const {\r\n OrderAVPrice,\r\n OrderAVClientPrice,\r\n OrderTotalExecuted,\r\n OrderFutureSettlmentDate,\r\n precheck,\r\n AvgNominalRate,\r\n AvgXIRR,\r\n } = r.response;\r\n\r\n setValues({\r\n avg: OrderAVPrice,\r\n avgWithMarkup: OrderAVClientPrice,\r\n total: OrderTotalExecuted,\r\n settleDate: OrderFutureSettlmentDate,\r\n avgNominalRate: AvgNominalRate,\r\n avgXIRR: AvgXIRR,\r\n precheck,\r\n });\r\n });\r\n }, [fetchTotals, orderId]);\r\n\r\n if (values == null) {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    Total executed\r\n \r\n
    Avg. price\r\n \r\n
    Avg. price w/markup\r\n \r\n
    Sett. Date\r\n \r\n
    Avg. Nominal Rate\r\n \r\n
    Accrual\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {values &&\r\n values.precheck &&\r\n (values.precheck.commission && values.precheck.commission > 0 ? (\r\n \r\n \r\n \r\n \r\n ) : values.precheck.charge && values.precheck.charge > 0 ? (\r\n \r\n \r\n \r\n \r\n ) : null)}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    Principal\r\n \r\n
    UpFront\r\n \r\n
    Commission\r\n \r\n
    Charge\r\n \r\n
    TAX\r\n \r\n
    Avg. XIRR\r\n \r\n
    Total\r\n \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default OrderTotals;\r\n","import React, { Fragment, useContext, useCallback, useEffect, useState } from \"react\";\r\nimport Bulk from \"./../Bulk/Bulk\";\r\nimport Basket from \"./../Basket/Basket\";\r\nimport style from \"./../Order.module.scss\";\r\nimport { Container, Row, Col, Input } from \"reactstrap\";\r\nimport { accountProps, customFetchAssetInfo, customFetchAccountInfo } from \"./commons\";\r\nimport { OrderPriceType, TimeFrame, ProductType, Type, Mode, OrderStatus } from \"../../../../utils/Order/Order\";\r\nimport { Field, Symbol, Account, Numeric, Combobox, TimeForce, PriceType } from \"../Field/Field\";\r\nimport { UserType } from \"../../../../utils/Helper\";\r\nimport { Dispatch } from \"../store/store\";\r\nimport { onChange, onAccountChange } from \"../Order\";\r\nimport QuantityHelper from \"../Helper/QuantityHelper\";\r\nimport GoalSeek from \"../GoalSeek/GoalSeek\";\r\nimport Booktype from \"../Field/Booktype\";\r\n\r\nconst Bonds = ({\r\n maxDecimals,\r\n updatePrice,\r\n newSymbol,\r\n fetchCalculatorDataForOffers,\r\n booktypes, \r\n platformRole,\r\n fetchGetCalculator,\r\n opsViewAccountName\r\n}) => {\r\n const { dispatch, state, services } = useContext(Dispatch);\r\n const { order, fields, ui, entities } = state;\r\n const { editable, errors, readonly, hiddens } = fields;\r\n\r\n const [showAdvanced, setShowAdvanced] = useState(false);\r\n\r\n const accountInfo = (props, updateOrderValues) =>\r\n customFetchAccountInfo(\r\n dispatch,\r\n services.account,\r\n {\r\n ...order,\r\n CurrentAccount: {\r\n ...order.CurrentAccount,\r\n ...props,\r\n },\r\n },\r\n updateOrderValues\r\n );\r\n\r\n let quantities = [];\r\n let quantityTitle = Quantity;\r\n if (ui.type == Type.Default || ui.type == Type.Chained || ui.type == Type.Cross) {\r\n if (order.CurrentAccount.Day) {\r\n quantities = order.CurrentAccount.Day.map((day) => {\r\n return {\r\n date: day.Date,\r\n status: day.Status,\r\n quantity: parseFloat(day.AssignedQty),\r\n };\r\n });\r\n }\r\n quantityTitle = (\r\n \r\n Quantity\r\n {quantities.length > 0 && order.OrderId > 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n }\r\n\r\n const receiveDirtyPrice = (v) => {\r\n onChange(dispatch, {\r\n [order.OrderType == OrderPriceType.LIMIT ||\r\n order.OrderType == OrderPriceType.MARKETONOPEN ||\r\n order.OrderType == OrderPriceType.MARKETONCLOSE\r\n ? \"OrderPrice\"\r\n : \"OrderStopPrice\"]: v,\r\n });\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n {/* Left */}\r\n \r\n {/* ##### Symbol ###### */}\r\n \r\n onChange(dispatch, v), [order.AssetTicker])}\r\n placeholder={\"Symbol\"}\r\n disabled={readonly.AssetTicker || (order.offer && +order.offer.OfferId > 0)}\r\n invalid={!!errors.AssetTicker}\r\n value={order.AssetTicker}\r\n description={order.AssetDescription}\r\n provider={order.AssetSecurityProvider}\r\n assetid={order.AssetId}\r\n attrId={\"AssetId\"}\r\n attrTicker={\"AssetTicker\"}\r\n attrDescription={\"AssetDescription\"}\r\n attrProvider={\"AssetSecurityProvider\"}\r\n {...services.symbol}\r\n assetInfo={() => customFetchAssetInfo(dispatch, services.symbol, order)}\r\n updatePrice={updatePrice}\r\n />\r\n \r\n\r\n \r\n {/* ##### Trade Currency ###### */}\r\n \r\n \r\n \r\n \r\n \r\n {/* ##### Settlement Currency ###### */}\r\n \r\n \r\n onChange(dispatch, { OrderSettlementCurrencyId: v })}\r\n emptyLabel={\"Settlement Currency\"}\r\n />\r\n \r\n \r\n \r\n\r\n {/* ##### Quantity ###### */}\r\n \r\n onAccountChange(dispatch, { Quantity: v })}\r\n invalid={!!errors.OrderQuantity}\r\n />\r\n \r\n\r\n {/* ##### Price Type ###### */}\r\n onChange(dispatch, v)}\r\n />\r\n\r\n {order.OrderType == \"Limit\" && (\r\n \r\n setShowAdvanced((prev) => !prev)}\r\n >\r\n Advanced\r\n {showAdvanced ? (\r\n \r\n ) : (\r\n \r\n )}\r\n

    \r\n {showAdvanced && (\r\n \r\n )}\r\n \r\n )}\r\n\r\n {/* ##### TimeForce ###### */}\r\n onChange(dispatch, v)}\r\n />\r\n\r\n {(ui.userRole === \"Trader\" || (ui.userRole !== \"Trader\" && ui.mode !== Mode.EDIT)) && onChange(dispatch, v)}\r\n onAccountChange={(v) => onAccountChange(dispatch, v)}\r\n />}\r\n \r\n\r\n {/* Right */}\r\n \r\n {/* ##### Account ###### */}\r\n {!ui.isBulk && !ui.isBasket && (\r\n onAccountChange(dispatch, v)}\r\n balanceReady={!!order.AssetId}\r\n dispatch={dispatch}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n {...accountProps({ order, readonly, errors })}\r\n hiddens={{\r\n Quantity: true,\r\n ...hiddens,\r\n }}\r\n opsViewAccountName={opsViewAccountName}\r\n />\r\n )}\r\n {ui.isBulk && (\r\n onAccountChange(dispatch, v)}\r\n accounts={order.Accounts || []}\r\n isReadOnly={ui.mode == Mode.READONLY}\r\n canModifyComposition={ui.mode == Mode.EDIT}\r\n readonly={readonly}\r\n error={errors.Accounts}\r\n account={order.CurrentAccount}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n hiddens={{\r\n ...hiddens,\r\n }}\r\n />\r\n )}\r\n\r\n {ui.isBasket && (\r\n onAccountChange(dispatch, v)}\r\n accounts={order.Accounts || []}\r\n isReadOnly={ui.mode == Mode.READONLY}\r\n canModifyComposition={ui.mode == Mode.EDIT}\r\n readonly={readonly}\r\n error={errors.Accounts}\r\n account={order.CurrentAccount}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n hiddens={{\r\n ...hiddens,\r\n }}\r\n />\r\n )}\r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport const defaultValues = () => {\r\n return {\r\n OrderSide: \"Buy\",\r\n BookType: \"Self\",\r\n };\r\n};\r\n\r\nexport const validations = (order, userType) => {\r\n const filteredBankAccounts = order.CurrentAccount.clientBankAccounts\r\n ? order.CurrentAccount.clientBankAccounts.filter(\r\n (account) => account.currencyISO === order.OrderCurrencySymbol\r\n )\r\n : [];\r\n\r\n const isMultiAccounts = order.OrderHasMultipleAccounts;\r\n return {\r\n OrderQuantity: { empty: !isMultiAccounts },\r\n AssetTicker: { empty: true, autosuggestId: \"AssetId\" },\r\n OrderType: { empty: true },\r\n OrderPrice: {\r\n empty: order.OrderType == OrderPriceType.LIMIT || order.OrderType == OrderPriceType.STOPLIMIT,\r\n },\r\n OrderStopPrice: {\r\n empty: order.OrderType == OrderPriceType.STOP || order.OrderType == OrderPriceType.STOPLIMIT,\r\n },\r\n OrderTimeInForce: { empty: true },\r\n OrderGTD: {\r\n empty: order.OrderTimeInForce == TimeFrame.GTD,\r\n },\r\n OrderSettlementCurrencySymbol: { empty: true },\r\n\r\n // The following properties are from an account.\r\n AccountName: {\r\n empty: true,\r\n accountLevel: true,\r\n },\r\n HolderName: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n clientBankAccounts: {\r\n noBankAccountSelected: filteredBankAccounts && filteredBankAccounts.length > 0 && (order.CurrentAccount.clientBankAccount == null || order.CurrentAccount.clientBankAccount == \"\") && !order.CurrentAccount.useCashAccount,\r\n },\r\n Quantity: {\r\n empty: true,\r\n accountLevel: true,\r\n },\r\n Instruction: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n MarkupType: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n CommissionType: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n };\r\n};\r\n\r\nexport default Bonds;\r\n","import React, { Fragment, useContext } from \"react\";\r\nimport Bulk from \"./../Bulk/Bulk\";\r\nimport Basket from \"./../Basket/Basket\";\r\nimport style from \"./../Order.module.scss\";\r\nimport { Container, Row, Col, Input } from \"reactstrap\";\r\nimport { accountProps, customFetchAssetInfo, customFetchAccountInfo } from \"./commons\";\r\nimport { OrderPriceType, TimeFrame, ProductType, Type, Mode, OrderStatus } from \"../../../../utils/Order/Order\";\r\nimport { Field, Symbol, Account, Numeric, Combobox, TimeForce, PriceType } from \"../Field/Field\";\r\nimport { UserType } from \"../../../../utils/Helper\";\r\nimport { Dispatch } from \"../store/store\";\r\nimport { onChange, onAccountChange } from \"../Order\";\r\nimport QuantityHelper from \"../Helper/QuantityHelper\";\r\nimport Booktype from \"../Field/Booktype\";\r\n\r\nconst Equity = ({ maxDecimals, updatePrice, newSymbol, booktypes, platformRole, opsViewAccountName }) => {\r\n const { dispatch, state, services } = useContext(Dispatch);\r\n const { order, fields, ui, entities } = state;\r\n const { editable, errors, readonly, hiddens } = fields;\r\n\r\n const accountInfo = (props, updateOrderValues) =>\r\n customFetchAccountInfo(\r\n dispatch,\r\n services.account,\r\n {\r\n ...order,\r\n CurrentAccount: {\r\n ...order.CurrentAccount,\r\n ...props,\r\n },\r\n },\r\n updateOrderValues\r\n );\r\n\r\n let quantities = [];\r\n let quantityTitle = Quantity;\r\n if (ui.type == Type.Default || ui.type == Type.Chained || ui.type == Type.Cross) {\r\n if (order.CurrentAccount.Day) {\r\n quantities = order.CurrentAccount.Day.map((day) => {\r\n return {\r\n date: day.Date,\r\n status: day.Status,\r\n quantity: parseFloat(day.AssignedQty),\r\n };\r\n });\r\n }\r\n quantityTitle = (\r\n \r\n Quantity\r\n {quantities.length > 0 && order.OrderId > 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n }\r\n\r\n return (\r\n
    \r\n \r\n \r\n {/* Left */}\r\n \r\n {/* ##### Symbol ###### */}\r\n \r\n onChange(dispatch, v)}\r\n placeholder={\"Symbol\"}\r\n disabled={readonly.AssetTicker || (order.offer && +order.offer.OfferId > 0)}\r\n invalid={!!errors.AssetTicker}\r\n value={order.AssetTicker}\r\n description={order.AssetDescription}\r\n provider={order.AssetSecurityProvider}\r\n assetid={order.AssetId}\r\n attrId={\"AssetId\"}\r\n attrTicker={\"AssetTicker\"}\r\n attrDescription={\"AssetDescription\"}\r\n attrProvider={\"AssetSecurityProvider\"}\r\n {...services.symbol}\r\n assetInfo={() => customFetchAssetInfo(dispatch, services.symbol, order)}\r\n updatePrice={updatePrice}\r\n />\r\n \r\n\r\n \r\n {/* ##### Trade Currency ###### */}\r\n \r\n \r\n \r\n \r\n \r\n {/* ##### Settlement Currency ###### */}\r\n \r\n \r\n onChange(dispatch, { OrderSettlementCurrencyId: v })}\r\n emptyLabel={\"Settlement Currency\"}\r\n />\r\n \r\n \r\n \r\n\r\n {/* ##### Quantity ###### */}\r\n \r\n onAccountChange(dispatch, { Quantity: v })}\r\n invalid={!!errors.OrderQuantity}\r\n />\r\n \r\n\r\n {/* ##### Price Type ###### */}\r\n onChange(dispatch, v)}\r\n newSymbol={newSymbol}\r\n maxDecimals={maxDecimals}\r\n />\r\n\r\n {/* ##### TimeForce ###### */}\r\n onChange(dispatch, v)}\r\n />\r\n {(ui.userRole === \"Trader\" || (ui.userRole !== \"Trader\" && ui.mode !== Mode.EDIT)) && onChange(dispatch, v)}\r\n onAccountChange={(v) => onAccountChange(dispatch, v)}\r\n />}\r\n \r\n\r\n {/* Right */}\r\n \r\n {/* ##### Account ###### */}\r\n {!ui.isBulk && !ui.isBasket && (\r\n onAccountChange(dispatch, v)}\r\n balanceReady={!!order.AssetId}\r\n dispatch={dispatch}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n {...accountProps({ order, readonly, errors })}\r\n hiddens={{\r\n Quantity: true,\r\n ...hiddens,\r\n }}\r\n opsViewAccountName={opsViewAccountName}\r\n />\r\n )}\r\n\r\n {ui.isBulk && (\r\n onAccountChange(dispatch, v)}\r\n accounts={order.Accounts || []}\r\n isReadOnly={ui.mode == Mode.READONLY}\r\n canModifyComposition={ui.mode == Mode.EDIT}\r\n readonly={readonly}\r\n error={errors.Accounts}\r\n account={order.CurrentAccount}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n hiddens={hiddens}\r\n />\r\n )}\r\n\r\n {ui.isBasket && (\r\n onAccountChange(dispatch, v)}\r\n accounts={order.Accounts || []}\r\n isReadOnly={ui.mode == Mode.READONLY}\r\n canModifyComposition={ui.mode == Mode.EDIT}\r\n readonly={readonly}\r\n error={errors.Accounts}\r\n account={order.CurrentAccount}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n hiddens={hiddens}\r\n />\r\n )}\r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport const defaultValues = () => {\r\n return {\r\n OrderSide: \"Buy\",\r\n BookType: \"Self\"\r\n };\r\n};\r\n\r\nexport const validations = (order, userType) => {\r\n const filteredBankAccounts = order.CurrentAccount.clientBankAccounts\r\n ? order.CurrentAccount.clientBankAccounts.filter(\r\n (account) => account.currencyISO === order.OrderCurrencySymbol\r\n )\r\n : [];\r\n\r\n const isMultiAccounts = order.OrderHasMultipleAccounts;\r\n\r\n return {\r\n OrderQuantity: { empty: !isMultiAccounts },\r\n AssetTicker: { empty: true, autosuggestId: \"AssetId\" },\r\n OrderType: { empty: true },\r\n OrderPrice: {\r\n empty: order.OrderType == OrderPriceType.LIMIT || order.OrderType == OrderPriceType.STOPLIMIT,\r\n },\r\n OrderStopPrice: {\r\n empty: order.OrderType == OrderPriceType.STOP || order.OrderType == OrderPriceType.STOPLIMIT,\r\n },\r\n OrderTimeInForce: { empty: true },\r\n OrderGTD: {\r\n empty: order.OrderTimeInForce == TimeFrame.GTD,\r\n },\r\n OrderSettlementCurrencySymbol: { empty: true },\r\n\r\n // The following properties are from an account.\r\n AccountName: {\r\n empty: true,\r\n accountLevel: true,\r\n },\r\n clientBankAccounts: {\r\n noBankAccountSelected: filteredBankAccounts && filteredBankAccounts.length > 0 && (order.CurrentAccount.clientBankAccount == null || order.CurrentAccount.clientBankAccount == \"\") && !order.CurrentAccount.useCashAccount,\r\n },\r\n HolderName: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n Quantity: {\r\n empty: true,\r\n accountLevel: true,\r\n },\r\n Instruction: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n MarkupType: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n CommissionType: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n };\r\n};\r\n\r\nexport default Equity;\r\n","import React, { Fragment, useContext } from \"react\";\r\nimport Bulk from \"./../Bulk/Bulk\";\r\nimport Basket from \"./../Basket/Basket\";\r\nimport style from \"./../Order.module.scss\";\r\nimport { Container, Row, Col } from \"reactstrap\";\r\nimport { accountProps, customFetchAssetInfo, customFetchAccountInfo } from \"./commons\";\r\nimport { ProductType, Type, Mode, OrderStatus } from \"../../../../utils/Order/Order\";\r\nimport { Field, Symbol, Account, Numeric, PriceType } from \"../Field/Field\";\r\nimport { UserType } from \"../../../../utils/Helper\";\r\nimport { Dispatch } from \"../store/store\";\r\nimport { onChange, onAccountChange } from \"../Order\";\r\nimport QuantityHelper from \"../Helper/QuantityHelper\";\r\nimport Booktype from \"../Field/Booktype\";\r\n\r\nconst Forex = ({ maxDecimals, updatePrice, newSymbol, booktypes, platformRole, opsViewAccountName }) => {\r\n const { dispatch, state, services } = useContext(Dispatch);\r\n const { order, fields, ui } = state;\r\n const { editable, errors, readonly, hiddens } = fields;\r\n\r\n const accountInfo = (props, updateOrderValues) =>\r\n customFetchAccountInfo(\r\n dispatch,\r\n services.account,\r\n {\r\n ...order,\r\n CurrentAccount: {\r\n ...order.CurrentAccount,\r\n ...props,\r\n },\r\n },\r\n updateOrderValues\r\n );\r\n\r\n let quantities = [];\r\n let quantityTitle = Quantity;\r\n if (ui.type == Type.Default || ui.type == Type.Chained || ui.type == Type.Cross) {\r\n if (order.CurrentAccount.Day) {\r\n quantities = order.CurrentAccount.Day.map((day) => {\r\n return {\r\n date: day.Date,\r\n status: day.Status,\r\n quantity: parseFloat(day.AssignedQty),\r\n };\r\n });\r\n }\r\n quantityTitle = (\r\n \r\n Quantity\r\n {quantities.length > 0 && order.OrderId > 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n }\r\n\r\n return (\r\n
    \r\n \r\n \r\n {/* Left */}\r\n \r\n {/* ##### Quantity ###### */}\r\n \r\n onAccountChange(dispatch, { Quantity: v })}\r\n invalid={!!errors.OrderQuantity}\r\n />\r\n \r\n\r\n {/* ##### Symbol ###### */}\r\n \r\n onChange(dispatch, v)}\r\n hideInfo\r\n placeholder=\"Currency\"\r\n readonly={readonly.OrderCurrencySymbol}\r\n disabled={readonly.OrderCurrencySymbol || (order.offer && +order.offer.OfferId > 0)}\r\n invalid={!!errors.OrderCurrencySymbol}\r\n value={order.OrderCurrencySymbol || \"\"}\r\n attrId=\"OrderCurrencyId\"\r\n attrTicker=\"OrderCurrencySymbol\"\r\n updatePrice={updatePrice}\r\n {...services.symbol}\r\n />\r\n \r\n\r\n {/* ##### Symbol ###### */}\r\n \r\n onChange(dispatch, v)}\r\n placeholder={\"Settlement Currency\"}\r\n hideInfo={!order.OrderSettlementCurrencyId || !order.OrderCurrencyId}\r\n readonly={readonly.OrderSettlementCurrencySymbol}\r\n disabled={readonly.OrderSettlementCurrencySymbol || (order.offer && +order.offer.OfferId > 0)}\r\n invalid={!!errors.OrderSettlementCurrencySymbol}\r\n value={order.OrderSettlementCurrencySymbol || \"\"}\r\n value2={order.OrderCurrencySymbol || \"\"}\r\n description={order.AssetDescription}\r\n provider={order.AssetSecurityProvider}\r\n assetid={order.AssetId}\r\n attrId={\"OrderSettlementCurrencyId\"}\r\n attrTicker={\"OrderSettlementCurrencySymbol\"}\r\n {...services.symbol}\r\n updatePrice={updatePrice}\r\n assetInfo={() => customFetchAssetInfo(dispatch, services.symbol, order)}\r\n />\r\n \r\n\r\n {/* ##### Price Type ###### */}\r\n onChange(dispatch, v)}\r\n maxDecimals={maxDecimals}\r\n newSymbol={newSymbol}\r\n />\r\n {(ui.userRole === \"Trader\" || (ui.userRole !== \"Trader\" && ui.mode !== Mode.EDIT)) && onChange(dispatch, v)}\r\n onAccountChange={(v) => onAccountChange(dispatch, v)}\r\n />}\r\n \r\n\r\n {/* Right */}\r\n \r\n {/* ##### Account ###### */}\r\n {!ui.isBulk && !ui.isBasket && (\r\n onAccountChange(dispatch, v)}\r\n balanceReady={!!order.OrderCurrencyId}\r\n dispatch={dispatch}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n {...accountProps({ order, readonly, errors })}\r\n hiddens={{\r\n Quantity: true,\r\n ...hiddens,\r\n }}\r\n opsViewAccountName={opsViewAccountName}\r\n />\r\n )}\r\n\r\n {ui.isBulk && (\r\n onAccountChange(dispatch, v)}\r\n accounts={order.Accounts || []}\r\n isReadOnly={ui.mode == Mode.READONLY}\r\n canModifyComposition={ui.mode == Mode.EDIT}\r\n readonly={readonly}\r\n error={errors.Accounts}\r\n account={order.CurrentAccount}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n hiddens={{\r\n ...hiddens,\r\n }}\r\n />\r\n )}\r\n\r\n {ui.isBasket && (\r\n onAccountChange(dispatch, v)}\r\n accounts={order.Accounts || []}\r\n isReadOnly={ui.mode == Mode.READONLY}\r\n canModifyComposition={ui.mode == Mode.EDIT}\r\n readonly={readonly}\r\n error={errors.Accounts}\r\n account={order.CurrentAccount}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n hiddens={{\r\n ...hiddens,\r\n }}\r\n />\r\n )}\r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport const defaultValues = () => {\r\n return {\r\n OrderSide: \"Buy\",\r\n BookType: \"Self\"\r\n };\r\n};\r\n\r\nexport const validations = (order, userType) => {\r\n const filteredBankAccounts = order.CurrentAccount.clientBankAccounts\r\n ? order.CurrentAccount.clientBankAccounts.filter(\r\n (account) => account.currencyISO === order.OrderCurrencySymbol\r\n )\r\n : [];\r\n\r\n const isMultiAccounts = order.OrderHasMultipleAccounts;\r\n\r\n return {\r\n OrderQuantity: { empty: !isMultiAccounts },\r\n OrderCurrencySymbol: { empty: true, autosuggestId: \"OrderCurrencyId\" },\r\n OrderSettlementCurrencySymbol: { empty: true, autosuggestId: \"OrderSettlementCurrencyId\" },\r\n OrderTimeInForce: { empty: true },\r\n\r\n // The following properties are from an account.\r\n AccountName: {\r\n empty: true,\r\n accountLevel: true,\r\n },\r\n clientBankAccounts: {\r\n noBankAccountSelected: filteredBankAccounts && filteredBankAccounts.length > 0 && (order.CurrentAccount.clientBankAccount == null || order.CurrentAccount.clientBankAccount == \"\") && !order.CurrentAccount.useCashAccount,\r\n },\r\n HolderName: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n Quantity: {\r\n empty: true,\r\n accountLevel: true,\r\n },\r\n Instruction: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n };\r\n};\r\n\r\nexport default Forex;\r\n","import React, { Fragment, useContext, useCallback } from \"react\";\r\nimport Bulk from \"../Bulk/Bulk\";\r\nimport Basket from \"../Basket/Basket\";\r\nimport style from \"./../Order.module.scss\";\r\nimport { Container, Row, Col } from \"reactstrap\";\r\nimport { accountProps, customFetchAssetInfo, customFetchAccountInfo } from \"./commons\";\r\nimport { ProductType, Type, Mode, OrderStatus } from \"../../../../utils/Order/Order\";\r\nimport { Field, Symbol, Account, Numeric, PriceType, TimeForce } from \"../Field/Field\";\r\nimport { UserType } from \"../../../../utils/Helper\";\r\nimport { Dispatch } from \"../store/store\";\r\nimport { onChange, onAccountChange } from \"../Order\";\r\nimport QuantityHelper from \"../Helper/QuantityHelper\";\r\nimport Booktype from \"../Field/Booktype\";\r\n\r\nconst Future = ({ maxDecimals, updatePrice, newSymbol, booktypes, platformRole, opsViewAccountName }) => {\r\n const { dispatch, state, services } = useContext(Dispatch);\r\n const { order, fields, ui } = state;\r\n const { editable, errors, readonly, hiddens } = fields;\r\n\r\n const accountInfo = (props, updateOrderValues) =>\r\n customFetchAccountInfo(\r\n dispatch,\r\n services.account,\r\n {\r\n ...order,\r\n CurrentAccount: {\r\n ...order.CurrentAccount,\r\n ...props,\r\n },\r\n },\r\n updateOrderValues\r\n );\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n onAccountChange(dispatch, { Quantity: v })}\r\n invalid={!!errors.OrderQuantity}\r\n />\r\n \r\n\r\n \r\n onChange(dispatch, v), [order.AssetTicker])}\r\n placeholder={\"Future\"}\r\n disabled={readonly.AssetTicker || (order.offer && +order.offer.OfferId > 0)}\r\n invalid={!!errors.AssetTicker}\r\n value={order.AssetTicker}\r\n description={order.AssetDescription}\r\n provider={order.AssetSecurityProvider}\r\n assetid={order.AssetId}\r\n attrId={\"AssetId\"}\r\n attrTicker={\"AssetTicker\"}\r\n attrDescription={\"AssetDescription\"}\r\n attrProvider={\"AssetSecurityProvider\"}\r\n {...services.symbol}\r\n assetInfo={() => customFetchAssetInfo(dispatch, services.symbol, order)}\r\n updatePrice={updatePrice}\r\n />\r\n \r\n\r\n onChange(dispatch, v)}\r\n maxDecimals={maxDecimals}\r\n newSymbol={newSymbol}\r\n />\r\n\r\n {(ui.userRole === \"Trader\" || (ui.userRole !== \"Trader\" && ui.mode !== Mode.EDIT)) && onChange(dispatch, v)}\r\n onAccountChange={(v) => onAccountChange(dispatch, v)}\r\n />}\r\n \r\n\r\n {/* Right */}\r\n \r\n {/* ##### Account ###### */}\r\n {!ui.isBulk && !ui.isBasket && (\r\n onAccountChange(dispatch, v)}\r\n balanceReady={!!order.OrderCurrencyId}\r\n dispatch={dispatch}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n {...accountProps({ order, readonly, errors })}\r\n hiddens={{\r\n Quantity: true,\r\n showClientPrice: true,\r\n Markup: true,\r\n ...hiddens,\r\n }}\r\n opsViewAccountName={opsViewAccountName}\r\n />\r\n )}\r\n\r\n {ui.isBulk && (\r\n onAccountChange(dispatch, v)}\r\n accounts={order.Accounts || []}\r\n isReadOnly={ui.mode == Mode.READONLY}\r\n canModifyComposition={ui.mode == Mode.EDIT}\r\n readonly={readonly}\r\n error={errors.Accounts}\r\n account={order.CurrentAccount}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n hiddens={{\r\n ...hiddens,\r\n }}\r\n />\r\n )}\r\n\r\n {ui.isBasket && (\r\n onAccountChange(dispatch, v)}\r\n accounts={order.Accounts || []}\r\n isReadOnly={ui.mode == Mode.READONLY}\r\n canModifyComposition={ui.mode == Mode.EDIT}\r\n readonly={readonly}\r\n error={errors.Accounts}\r\n account={order.CurrentAccount}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n hiddens={{\r\n ...hiddens,\r\n }}\r\n />\r\n )}\r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport const defaultValues = () => {\r\n return {\r\n OrderSide: \"Buy\",\r\n BookType: \"Self\"\r\n };\r\n};\r\n\r\nexport const validations = (order, userType) => {\r\n const filteredBankAccounts = order.CurrentAccount.clientBankAccounts\r\n ? order.CurrentAccount.clientBankAccounts.filter(\r\n (account) => account.currencyISO === order.OrderCurrencySymbol\r\n )\r\n : [];\r\n\r\n const isMultiAccounts = order.OrderHasMultipleAccounts;\r\n\r\n return {\r\n OrderQuantity: { empty: !isMultiAccounts },\r\n OrderSettlementCurrencySymbol: { empty: true, autosuggestId: \"OrderSettlementCurrencyId\" },\r\n OrderTimeInForce: { empty: true },\r\n\r\n // The following properties are from an account.\r\n AccountName: {\r\n empty: true,\r\n accountLevel: true,\r\n },\r\n clientBankAccounts: {\r\n noBankAccountSelected: filteredBankAccounts && filteredBankAccounts.length > 0 && (order.CurrentAccount.clientBankAccount == null || order.CurrentAccount.clientBankAccount == \"\") && !order.CurrentAccount.useCashAccount,\r\n },\r\n HolderName: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n Quantity: {\r\n empty: true,\r\n accountLevel: true,\r\n },\r\n Instruction: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n };\r\n};\r\n\r\nexport default Future;\r\n","import React, { Fragment, useContext, useEffect, useState } from \"react\";\r\nimport Bulk from \"./../Bulk/Bulk\";\r\nimport Basket from \"./../Basket/Basket\";\r\nimport style from \"./../Order.module.scss\";\r\nimport { Container, Row, Col, CustomInput, Input, FormGroup, Label } from \"reactstrap\";\r\nimport { accountProps, customFetchAssetInfo, customFetchAccountInfo } from \"./commons\";\r\nimport { OrderPriceType, TimeFrame, ProductType, Type, Mode, OrderStatus } from \"../../../../utils/Order/Order\";\r\nimport { Field, Symbol, Account, Numeric, Combobox, Switch, TimeForce, PriceType } from \"../Field/Field\";\r\nimport { UserType } from \"../../../../utils/Helper\";\r\nimport { Dispatch } from \"../store/store\";\r\nimport { onChange, onAccountChange } from \"../Order\";\r\nimport QuantityHelper from \"../Helper/QuantityHelper\";\r\nimport { toDateLocal } from \"../../../../utils/Helper\";\r\nimport Booktype from \"../Field/Booktype\";\r\n\r\nconst MFunds = ({ maxDecimals, booktypes, platformRole, opsViewAccountName }) => {\r\n const { dispatch, state, services } = useContext(Dispatch);\r\n const { order, fields, ui, entities, wizzard } = state;\r\n const { editable, errors, readonly, hiddens } = fields;\r\n const [orderDate, setOrderDate] = useState(toDateLocal(new Date()));\r\n\r\n const isMultiAccounts = order.OrderHasMultipleAccounts;\r\n const isFundCloseType = order.AssetFundType && order.AssetFundType == \"Close\";\r\n\r\n const isFullLiq = !isMultiAccounts && order.OrderSide == \"Sell\" && order.CurrentAccount.IsFullLiquidation;\r\n useEffect(() => {\r\n if (order.OrderId == 0) {\r\n onChange(dispatch, { OrderQuantityIsCash: \"true\" });\r\n }\r\n }, []);\r\n useEffect(() => {\r\n if (order.OrderSettlementDate) {\r\n setOrderDate(order.OrderSettlementDate);\r\n } else {\r\n onChange(dispatch, { OrderSettlementDate: toDateLocal(new Date()) });\r\n }\r\n }, [order.OrderSettlementDate]);\r\n\r\n const accountInfo = (props, updateOrderValues) =>\r\n customFetchAccountInfo(\r\n dispatch,\r\n services.account,\r\n {\r\n ...order,\r\n CurrentAccount: {\r\n ...order.CurrentAccount,\r\n ...props,\r\n },\r\n },\r\n updateOrderValues\r\n );\r\n \r\n let quantities = [];\r\n let quantityTitle = Quantity;\r\n if (ui.type == Type.Default || ui.type == Type.Chained || ui.type == Type.Cross) {\r\n if (order.CurrentAccount.Day) {\r\n quantities = order.CurrentAccount.Day.map((day) => {\r\n return {\r\n date: day.Date,\r\n status: day.Status,\r\n quantity: parseFloat(day.AssignedQty),\r\n };\r\n });\r\n }\r\n quantityTitle = (\r\n \r\n Quantity\r\n {quantities.length > 0 && order.OrderId > 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n }\r\n\r\n const quantityMaxDecimals = order.OrderQuantityIsCash\r\n ? 2\r\n : parseInt(order.SubAssetClassDecimalPlaces, 10) || 5;\r\n\r\n // only apply for chained orders, check if 2nd order step\r\n let isSwitchFirstOrder = false;\r\n let wizzStep = 1;\r\n if (wizzard.enabled) {\r\n if (wizzard.activeStep === 2) {\r\n wizzStep = 2;\r\n isSwitchFirstOrder = order.OrderIsSwitch;\r\n }\r\n }\r\n\r\n return (\r\n
    \r\n \r\n \r\n {/* Left */}\r\n \r\n {/* ##### Symbol ###### */}\r\n \r\n onChange(dispatch, v)}\r\n placeholder={\"Symbol\"}\r\n hideInfo={false}\r\n disabled={readonly.AssetTicker || (order.offer && +order.offer.OfferId > 0)}\r\n invalid={!!errors.AssetTicker}\r\n value={order.AssetTicker}\r\n description={order.AssetDescription}\r\n provider={order.AssetSecurityProvider}\r\n assetid={order.AssetId}\r\n attrId={\"AssetId\"}\r\n attrTicker={\"AssetTicker\"}\r\n attrDescription={\"AssetDescription\"}\r\n attrProvider={\"AssetSecurityProvider\"}\r\n {...services.symbol}\r\n assetInfo={() => customFetchAssetInfo(dispatch, services.symbol, order)}\r\n />\r\n \r\n\r\n \r\n {/* ##### Trade Currency ###### */}\r\n \r\n \r\n \r\n \r\n \r\n {/* ##### Settlement Currency ###### */}\r\n \r\n \r\n onChange(dispatch, { OrderSettlementCurrencyId: v })}\r\n emptyLabel={\"Settlement Currency\"}\r\n />\r\n \r\n \r\n \r\n {ui.type === Type.Chained && (\r\n \r\n \r\n \r\n {wizzStep === 1 && (\r\n onChange(dispatch, { OrderIsSwitch: v })}\r\n />\r\n )}\r\n {isSwitchFirstOrder && (\r\n \r\n )}\r\n \r\n \r\n \r\n )}\r\n \r\n {/* ##### Quantity Type ###### */}\r\n \r\n \r\n onChange(dispatch, { OrderQuantityIsCash: v == \"true\" })}\r\n emptyLabel={\"Type\"}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n onAccountChange(dispatch, { Quantity: v })}\r\n invalid={!isFullLiq && !!errors.OrderQuantity}\r\n dataTypeDecimalName=\"quantity\"\r\n />\r\n \r\n \r\n \r\n\r\n {order.OrderSide == \"Sell\" && !ui.isBulk && !ui.isBasket && (\r\n
    \r\n \r\n onAccountChange(dispatch, {\r\n IsFullLiquidation: !order.CurrentAccount.IsFullLiquidation,\r\n })\r\n }\r\n />\r\n
    \r\n )}\r\n\r\n {/* ##### Price Type ###### */}\r\n onChange(dispatch, v)}\r\n />\r\n\r\n {/* ##### TimeForce ###### */}\r\n onChange(dispatch, v)}\r\n />\r\n\r\n {(ui.userRole === \"Trader\" || (ui.userRole !== \"Trader\" && ui.mode !== Mode.EDIT)) && onChange(dispatch, v)}\r\n onAccountChange={(v) => onAccountChange(dispatch, v)}\r\n />}\r\n \r\n\r\n {/* Right */}\r\n \r\n {/* ##### Account ###### */}\r\n {!ui.isBulk && !ui.isBasket && (\r\n onAccountChange(dispatch, v)}\r\n balanceReady={!!order.AssetId}\r\n dispatch={dispatch}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n {...accountProps({ order, readonly, errors })}\r\n hiddens={{\r\n Quantity: true,\r\n ...hiddens,\r\n }}\r\n opsViewAccountName={opsViewAccountName}\r\n />\r\n )}\r\n {ui.isBulk && (\r\n onAccountChange(dispatch, v)}\r\n accounts={order.Accounts || []}\r\n isReadOnly={ui.mode == Mode.READONLY}\r\n canModifyComposition={ui.mode == Mode.EDIT}\r\n readonly={readonly}\r\n error={errors.Accounts}\r\n account={order.CurrentAccount}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n hiddens={hiddens}\r\n />\r\n )}\r\n {ui.isBasket && (\r\n onAccountChange(dispatch, v)}\r\n accounts={order.Accounts || []}\r\n isReadOnly={ui.mode == Mode.READONLY}\r\n canModifyComposition={ui.mode == Mode.EDIT}\r\n readonly={readonly}\r\n error={errors.Accounts}\r\n account={order.CurrentAccount}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n hiddens={hiddens}\r\n />\r\n )}\r\n {/* Process date */}\r\n {order.OrderSide == \"Sell\" && order.FundX && (\r\n \r\n \r\n onChange(dispatch, { OrderSettlementDate: e.target.value })}\r\n value={orderDate}\r\n />\r\n \r\n )}\r\n _\r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst parseQuantityIsCash = (qType) => {\r\n return qType === \"true\" || qType === true ? \"true\" : \"false\";\r\n};\r\n\r\nexport const defaultValues = () => {\r\n return {\r\n OrderSide: \"Buy\",\r\n BookType: \"Self\",\r\n OrderQuantityIsCash: \"true\",\r\n };\r\n};\r\n\r\nexport const validations = (order, userType) => {\r\n const filteredBankAccounts = order.CurrentAccount.clientBankAccounts\r\n ? order.CurrentAccount.clientBankAccounts.filter(\r\n (account) => account.currencyISO === order.OrderCurrencySymbol\r\n )\r\n : [];\r\n\r\n const isMultiAccounts = order.OrderHasMultipleAccounts;\r\n\r\n const isFullLiq = !isMultiAccounts && order.OrderSide == \"Sell\" && order.CurrentAccount.IsFullLiquidation;\r\n let maxPartialRedemption = null;\r\n let percentage = null;\r\n\r\n try {\r\n maxPartialRedemption = order.OrderAssetData.items[\"Max Partial Redemption Percentage\"];\r\n let refPrice = order.OrderAssetData.items[\"Ref Price Default\"];\r\n if (order.CurrentAccount.AccountAssetBalance == 0) {\r\n percentage = 0;\r\n } else {\r\n if (order.OrderQuantityIsCash) {\r\n percentage =\r\n ((order.OrderQuantity / refPrice) * 100) / parseFloat(order.CurrentAccount.AccountAssetBalance);\r\n } else {\r\n percentage = (order.OrderQuantity * 100) / parseFloat(order.CurrentAccount.AccountAssetBalance);\r\n }\r\n }\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n\r\n return {\r\n OrderQuantity: {\r\n empty: !isMultiAccounts && !isFullLiq,\r\n exceedPartialRedemption:\r\n maxPartialRedemption != null &&\r\n maxPartialRedemption >= 1 &&\r\n order.OrderSide == \"Sell\" &&\r\n percentage > maxPartialRedemption &&\r\n !isFullLiq,\r\n },\r\n AssetTicker: { empty: true, autosuggestId: \"AssetId\" },\r\n OrderType: { empty: true },\r\n OrderPrice: {\r\n empty: order.OrderType == OrderPriceType.LIMIT || order.OrderType == OrderPriceType.STOPLIMIT,\r\n },\r\n OrderStopPrice: {\r\n empty: order.OrderType == OrderPriceType.STOP || order.OrderType == OrderPriceType.STOPLIMIT,\r\n },\r\n OrderTimeInForce: { empty: true },\r\n OrderGTD: {\r\n empty: order.OrderTimeInForce == TimeFrame.GTD,\r\n },\r\n\r\n // The following properties are from an account.\r\n AccountName: {\r\n empty: true,\r\n accountLevel: true,\r\n },\r\n HolderName: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n clientBankAccounts: {\r\n noBankAccountSelected: filteredBankAccounts && filteredBankAccounts.length > 0 && (order.CurrentAccount.clientBankAccount == null || order.CurrentAccount.clientBankAccount == \"\") && !order.CurrentAccount.useCashAccount,\r\n },\r\n Quantity: {\r\n empty: true,\r\n accountLevel: true,\r\n },\r\n Instruction: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n MarkupType: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n CommissionType: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n };\r\n};\r\n\r\nexport default MFunds;\r\n","import React, { Fragment, useContext } from \"react\";\r\nimport Bulk from \"./../Bulk/Bulk\";\r\nimport Basket from \"./../Basket/Basket\";\r\nimport style from \"./../Order.module.scss\";\r\nimport { Container, Row, Col, Input } from \"reactstrap\";\r\nimport {\r\n clientRate,\r\n accountProps,\r\n commissionSuffix,\r\n customFetchAssetInfo,\r\n customFetchAccountInfo,\r\n} from \"./commons\";\r\nimport {\r\n OrderPriceType,\r\n TimeFrame,\r\n getCommissionItems,\r\n ProductType,\r\n Type,\r\n Mode,\r\n CommissionType,\r\n OrderStatus,\r\n} from \"../../../../utils/Order/Order\";\r\nimport { Field, Symbol, Account, Numeric, Combobox, Switch, TimeForce, PriceType } from \"../Field/Field\";\r\nimport { toDateLocal, UserType } from \"../../../../utils/Helper\";\r\nimport { Dispatch } from \"../store/store\";\r\nimport { onChange, onAccountChange } from \"../Order\";\r\nimport QuantityHelper from \"../Helper/QuantityHelper\";\r\nimport Booktype from \"../Field/Booktype\"\r\n\r\nconst MMarket = ({ maxDecimals, updatePrice, newSymbol, platformRole, booktypes, opsViewAccountName}) => {\r\n const { dispatch, state, services } = useContext(Dispatch);\r\n const { order, fields, ui, entities } = state;\r\n const { editable, errors, readonly, hiddens } = fields;\r\n\r\n const accountInfo = (props, updateOrderValues) =>\r\n customFetchAccountInfo(\r\n dispatch,\r\n services.account,\r\n {\r\n ...order,\r\n CurrentAccount: {\r\n ...order.CurrentAccount,\r\n ...props,\r\n },\r\n },\r\n updateOrderValues\r\n );\r\n\r\n let quantities = [];\r\n let quantityTitle = Quantity;\r\n if (ui.type == Type.Default || ui.type == Type.Chained || ui.type == Type.Cross) {\r\n if (order.CurrentAccount.Day) {\r\n quantities = order.CurrentAccount.Day.map((day) => {\r\n return {\r\n date: day.Date,\r\n status: day.Status,\r\n quantity: parseFloat(day.AssignedQty),\r\n };\r\n });\r\n }\r\n quantityTitle = (\r\n \r\n Quantity\r\n {quantities.length > 0 && order.OrderId > 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n }\r\n\r\n const quantityMaxDecimals = order.OrderQuantityIsCash\r\n ? 2\r\n : parseInt(order.SubAssetClassDecimalPlaces, 10) || 3;\r\n\r\n return (\r\n
    \r\n \r\n \r\n {/* Left */}\r\n \r\n {/* ##### Symbol ###### */}\r\n \r\n onChange(dispatch, v)}\r\n placeholder={\"Symbol\"}\r\n disabled={readonly.AssetTicker || (order.offer && +order.offer.OfferId > 0)}\r\n invalid={!!errors.AssetTicker}\r\n value={order.AssetTicker}\r\n description={order.AssetDescription}\r\n provider={order.AssetSecurityProvider}\r\n assetid={order.AssetId}\r\n attrId={\"AssetId\"}\r\n attrTicker={\"AssetTicker\"}\r\n attrDescription={\"AssetDescription\"}\r\n attrProvider={\"AssetSecurityProvider\"}\r\n {...services.symbol}\r\n assetInfo={() => customFetchAssetInfo(dispatch, services.symbol, order)}\r\n updatePrice={updatePrice}\r\n />\r\n \r\n\r\n \r\n {/* ##### Trade Currency ###### */}\r\n \r\n \r\n \r\n \r\n \r\n {/* ##### Settlement Currency ###### */}\r\n \r\n \r\n onChange(dispatch, { OrderSettlementCurrencyId: v })}\r\n emptyLabel={\"Settlement Currency\"}\r\n />\r\n \r\n \r\n \r\n\r\n {/* ##### Quantity ###### */}\r\n \r\n onAccountChange(dispatch, { Quantity: v })}\r\n invalid={!!errors.OrderQuantity}\r\n />\r\n \r\n\r\n {/* ##### Price Type ###### */}\r\n onChange(dispatch, v)}\r\n newSymbol={newSymbol}\r\n />\r\n\r\n {/* ##### TimeForce ###### */}\r\n onChange(dispatch, v)}\r\n />\r\n\r\n {(ui.userRole === \"Trader\" || (ui.userRole !== \"Trader\" && ui.mode !== Mode.EDIT)) && onChange(dispatch, v)}\r\n onAccountChange={(v) => onAccountChange(dispatch, v)}\r\n />}\r\n {/* ##### Custody ###### */}\r\n {/*\r\n (ui.type == Type.Default || ui.type == Type.Chained || ui.type == Type.Cross)\r\n && !hiddens.RequiresSpecialCustody && (\r\n \r\n onChange(dispatch, {RequiresSpecialCustody: v})}\r\n />\r\n \r\n )\r\n */}\r\n \r\n\r\n {/* Right */}\r\n \r\n {/* ##### Account ###### */}\r\n {!ui.isBulk && !ui.isBasket && (\r\n onAccountChange(dispatch, v)}\r\n balanceReady={!!order.AssetId}\r\n dispatch={dispatch}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n {...accountProps({ order, readonly, errors })}\r\n hiddens={{\r\n Quantity: true,\r\n ...hiddens,\r\n }}\r\n opsViewAccountName={opsViewAccountName}\r\n />\r\n )}\r\n {ui.isBulk && (\r\n onAccountChange(dispatch, v)}\r\n accounts={order.Accounts || []}\r\n isReadOnly={ui.mode == Mode.READONLY}\r\n canModifyComposition={ui.mode == Mode.EDIT}\r\n readonly={readonly}\r\n error={errors.Accounts}\r\n account={order.CurrentAccount}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n hiddens={{\r\n ...hiddens,\r\n }}\r\n />\r\n )}\r\n\r\n {ui.isBasket && (\r\n onAccountChange(dispatch, v)}\r\n accounts={order.Accounts || []}\r\n isReadOnly={ui.mode == Mode.READONLY}\r\n canModifyComposition={ui.mode == Mode.EDIT}\r\n readonly={readonly}\r\n error={errors.Accounts}\r\n account={order.CurrentAccount}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n hiddens={{\r\n ...hiddens,\r\n }}\r\n />\r\n )}\r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport const defaultValues = () => {\r\n return {\r\n OrderSide: \"Buy\",\r\n BookType: \"Self\"\r\n };\r\n};\r\n\r\nexport const validations = (order, userType) => {\r\n const filteredBankAccounts = order.CurrentAccount.clientBankAccounts\r\n ? order.CurrentAccount.clientBankAccounts.filter(\r\n (account) => account.currencyISO === order.OrderCurrencySymbol\r\n )\r\n : [];\r\n\r\n const isMultiAccounts = order.OrderHasMultipleAccounts;\r\n\r\n return {\r\n OrderQuantity: { empty: !isMultiAccounts },\r\n AssetTicker: { empty: true, autosuggestId: \"AssetId\" },\r\n OrderType: { empty: true },\r\n OrderPrice: {\r\n empty: order.OrderType == OrderPriceType.LIMIT || order.OrderType == OrderPriceType.STOPLIMIT,\r\n },\r\n OrderStopPrice: {\r\n empty: order.OrderType == OrderPriceType.STOP || order.OrderType == OrderPriceType.STOPLIMIT,\r\n },\r\n OrderTimeInForce: { empty: true },\r\n OrderGTD: {\r\n empty: order.OrderTimeInForce == TimeFrame.GTD,\r\n },\r\n\r\n // The following properties are from an account.\r\n AccountName: {\r\n empty: true,\r\n accountLevel: true,\r\n },\r\n clientBankAccounts: {\r\n noBankAccountSelected: filteredBankAccounts && filteredBankAccounts.length > 0 && (order.CurrentAccount.clientBankAccount == null || order.CurrentAccount.clientBankAccount == \"\") && !order.CurrentAccount.useCashAccount,\r\n },\r\n HolderName: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n Quantity: {\r\n empty: true,\r\n accountLevel: true,\r\n },\r\n Instruction: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n MarkupType: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n CommissionType: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n };\r\n};\r\n\r\nexport default MMarket;\r\n","import React, { Fragment, useContext } from \"react\";\r\nimport Bulk from \"./../Bulk/Bulk\";\r\nimport Basket from \"./../Basket/Basket\";\r\nimport style from \"./../Order.module.scss\";\r\nimport { Container, Row, Col, Input } from \"reactstrap\";\r\nimport { accountProps, customFetchAssetInfo, customFetchAccountInfo } from \"./commons\";\r\nimport { OrderPriceType, TimeFrame, ProductType, Type, Mode, OrderStatus } from \"../../../../utils/Order/Order\";\r\nimport { Field, Symbol, Account, Numeric, Combobox, TimeForce, PriceType } from \"../Field/Field\";\r\nimport { UserType } from \"../../../../utils/Helper\";\r\nimport { Dispatch } from \"../store/store\";\r\nimport { onChange, onAccountChange } from \"../Order\";\r\nimport QuantityHelper from \"../Helper/QuantityHelper\";\r\nimport Booktype from \"../Field/Booktype\";\r\n\r\nconst Options = ({ maxDecimals, updatePrice, newSymbol, booktypes, platformRole, opsViewAccountName }) => {\r\n const { dispatch, state, services } = useContext(Dispatch);\r\n const { order, fields, ui, entities } = state;\r\n const { editable, errors, readonly, hiddens } = fields;\r\n\r\n const accountInfo = (props, updateOrderValues) =>\r\n customFetchAccountInfo(\r\n dispatch,\r\n services.account,\r\n {\r\n ...order,\r\n CurrentAccount: {\r\n ...order.CurrentAccount,\r\n ...props,\r\n },\r\n },\r\n updateOrderValues\r\n );\r\n\r\n let quantities = [];\r\n let quantityTitle = Quantity;\r\n if (ui.type == Type.Default || ui.type == Type.Chained || ui.type == Type.Cross) {\r\n if (order.CurrentAccount.Day) {\r\n quantities = order.CurrentAccount.Day.map((day) => {\r\n return {\r\n date: day.Date,\r\n status: day.Status,\r\n quantity: parseFloat(day.AssignedQty),\r\n };\r\n });\r\n }\r\n quantityTitle = (\r\n \r\n Quantity\r\n {quantities.length > 0 && order.OrderId > 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n }\r\n\r\n const quantityMaxDecimals = parseInt(order.SubAssetClassDecimalPlaces, 10) || 0;\r\n\r\n return (\r\n
    \r\n \r\n \r\n {/* Left */}\r\n \r\n \r\n onChange(dispatch, v)}\r\n placeholder={\"Symbol\"}\r\n disabled={readonly.AssetTicker || (order.offer && +order.offer.OfferId > 0)}\r\n invalid={!!errors.AssetTicker}\r\n value={order.AssetTicker}\r\n description={order.AssetDescription}\r\n provider={order.AssetSecurityProvider}\r\n assetid={order.AssetId}\r\n attrId={\"AssetId\"}\r\n attrTicker={\"AssetTicker\"}\r\n attrDescription={\"AssetDescription\"}\r\n attrProvider={\"AssetSecurityProvider\"}\r\n {...services.symbol}\r\n assetInfo={() => customFetchAssetInfo(dispatch, services.symbol, order)}\r\n updatePrice={updatePrice}\r\n />\r\n \r\n\r\n \r\n \r\n \r\n onChange(dispatch, { isCall: v })}\r\n emptyLabel={\"Call/Put\"}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n \r\n \r\n onChange(dispatch, { expiration: v })}\r\n value={order.expiration}\r\n disabled={!!readonly.AssetTicker}\r\n style={{ padding: \"6px 4px\" }}\r\n required\r\n />\r\n \r\n \r\n \r\n\r\n \r\n \r\n {/* ##### Quantity ###### */}\r\n \r\n onAccountChange(dispatch, { Quantity: v })}\r\n invalid={!!errors.OrderQuantity}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n onChange(dispatch, { strikePrice: v })}\r\n invalid={!!errors.strikePrice}\r\n decimalScale={maxDecimals}\r\n dataTypeDecimalName=\"price\"\r\n />\r\n \r\n \r\n \r\n\r\n \r\n {/* ##### Trade Currency ###### */}\r\n \r\n \r\n \r\n \r\n \r\n {/* ##### Settlement Currency ###### */}\r\n \r\n \r\n onChange(dispatch, { OrderSettlementCurrencyId: v })}\r\n emptyLabel={\"Settlement Currency\"}\r\n />\r\n \r\n \r\n \r\n\r\n onChange(dispatch, v)}\r\n maxDecimals={maxDecimals}\r\n newSymbol={newSymbol}\r\n />\r\n\r\n {/* ##### TimeForce ###### */}\r\n onChange(dispatch, v)}\r\n />\r\n {(ui.userRole === \"Trader\" || (ui.userRole !== \"Trader\" && ui.mode !== Mode.EDIT)) && onChange(dispatch, v)}\r\n onAccountChange={(v) => onAccountChange(dispatch, v)}\r\n />}\r\n\r\n {/* ##### Custody ###### */}\r\n {/*\r\n (ui.type == Type.Default || ui.type == Type.Chained || ui.type == Type.Cross)\r\n && !hiddens.RequiresSpecialCustody && (\r\n \r\n onChange(dispatch, {RequiresSpecialCustody: v})}\r\n />\r\n \r\n )\r\n */}\r\n \r\n\r\n {/* Right */}\r\n \r\n {/* ##### Account ###### */}\r\n {!ui.isBulk && !ui.isBasket && (\r\n onAccountChange(dispatch, v)}\r\n balanceReady={!!order.AssetId}\r\n dispatch={dispatch}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n {...accountProps({ order, readonly, errors })}\r\n hiddens={{\r\n Quantity: true,\r\n ...hiddens,\r\n }}\r\n opsViewAccountName={opsViewAccountName}\r\n />\r\n )}\r\n {ui.isBulk && (\r\n onAccountChange(dispatch, v)}\r\n accounts={order.Accounts || []}\r\n isReadOnly={ui.mode == Mode.READONLY}\r\n canModifyComposition={ui.mode == Mode.EDIT}\r\n readonly={readonly}\r\n error={errors.Accounts}\r\n account={order.CurrentAccount}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n hiddens={hiddens}\r\n />\r\n )}\r\n\r\n {ui.isBasket && (\r\n onAccountChange(dispatch, v)}\r\n accounts={order.Accounts || []}\r\n isReadOnly={ui.mode == Mode.READONLY}\r\n canModifyComposition={ui.mode == Mode.EDIT}\r\n readonly={readonly}\r\n error={errors.Accounts}\r\n account={order.CurrentAccount}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n hiddens={hiddens}\r\n />\r\n )}\r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport const defaultValues = () => {\r\n return {\r\n OrderSide: \"Buy\",\r\n OrderOpenClose: \"Open\",\r\n BookType: \"Self\"\r\n };\r\n};\r\n\r\nexport const validations = (order, userType) => {\r\n const filteredBankAccounts = order.CurrentAccount.clientBankAccounts\r\n ? order.CurrentAccount.clientBankAccounts.filter(\r\n (account) => account.currencyISO === order.OrderCurrencySymbol\r\n )\r\n : [];\r\n\r\n const isMultiAccounts = order.OrderHasMultipleAccounts;\r\n\r\n return {\r\n OrderQuantity: { empty: !isMultiAccounts },\r\n AssetTicker: { empty: true, autosuggestId: \"AssetId\" },\r\n OrderType: { empty: true },\r\n OrderPrice: {\r\n empty: order.OrderType == OrderPriceType.LIMIT || order.OrderType == OrderPriceType.STOPLIMIT,\r\n },\r\n OrderStopPrice: {\r\n empty: order.OrderType == OrderPriceType.STOP || order.OrderType == OrderPriceType.STOPLIMIT,\r\n },\r\n OrderTimeInForce: { empty: true },\r\n OrderGTD: {\r\n empty: order.OrderTimeInForce == TimeFrame.GTD,\r\n },\r\n OrderSettlementCurrencySymbol: { empty: true },\r\n\r\n // The following properties are from an account.\r\n AccountName: {\r\n empty: true,\r\n accountLevel: true,\r\n },\r\n clientBankAccounts: {\r\n noBankAccountSelected: filteredBankAccounts && filteredBankAccounts.length > 0 && (order.CurrentAccount.clientBankAccount == null || order.CurrentAccount.clientBankAccount == \"\") && !order.CurrentAccount.useCashAccount,\r\n },\r\n HolderName: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n Quantity: {\r\n empty: true,\r\n accountLevel: true,\r\n },\r\n Instruction: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n MarkupType: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n CommissionType: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n };\r\n};\r\n\r\nexport default Options;\r\n","import React, { Fragment, useContext, useCallback, useState, useEffect } from \"react\";\r\nimport Bulk from \"../Bulk/Bulk\";\r\nimport Basket from \"../Basket/Basket\";\r\nimport style from \"./../Order.module.scss\";\r\nimport { Container, Row, Col } from \"reactstrap\";\r\nimport { accountProps, customFetchAssetInfo, customFetchAccountInfo } from \"./commons\";\r\nimport { ProductType, Type, Mode, OrderStatus } from \"../../../../utils/Order/Order\";\r\nimport { Field, Symbol, RepoSymbol, Account, Numeric, PriceType, TimeForce } from \"../Field/Field\";\r\nimport { showToast, UserType } from \"../../../../utils/Helper\";\r\nimport { Dispatch } from \"../store/store\";\r\nimport { onChange, onAccountChange } from \"../Order\";\r\nimport QuantityHelper from \"../Helper/QuantityHelper\";\r\nimport Booktype from \"../Field/Booktype\";\r\n\r\nconst Repo = ({ maxDecimals, updatePrice, newSymbol, booktypes, platformRole, opsViewAccountName }) => {\r\n const { dispatch, state, services } = useContext(Dispatch);\r\n const { order, fields, ui } = state;\r\n const { editable, errors, readonly, hiddens } = fields;\r\n const [updateAccount, setUpdateAccount] = useState(false);\r\n\r\n const accountInfo = (props, updateOrderValues) =>\r\n customFetchAccountInfo(\r\n dispatch,\r\n services.account,\r\n {\r\n ...order,\r\n CurrentAccount: {\r\n ...order.CurrentAccount,\r\n ...props,\r\n },\r\n },\r\n updateOrderValues\r\n );\r\n\r\n const handleSymbolSelection = (v) => {\r\n if (v.OrderCurrencyId) {\r\n services.symbol\r\n .searchRepoSymbol({ iso: v.OrderCurrencySymbol })\r\n .then(({ response }) => {\r\n if (+response.AssetInformation.AssetId === 0) {\r\n showToast(\"Base repo asset not found for the selected currency\", true);\r\n onChange(dispatch, {\r\n OrderCurrencyId: null,\r\n OrderCurrencySymbol: \"\",\r\n });\r\n } else {\r\n onChange(dispatch, {\r\n ...v,\r\n OrderSettlementCurrencyId: v.OrderCurrencyId,\r\n OrderSettlementCurrencySymbol: v.OrderCurrencySymbol,\r\n AssetId: response.AssetInformation.AssetId,\r\n AssetTicker: response.AssetInformation.Ticker,\r\n AssetDescription: response.securityAsset.Description,\r\n AssetSecurityProvider: response.securityAsset.Provider,\r\n AssetCanBeSelfCustodied: response.AssetInformation.AssetCanBeSelfCustodied,\r\n SubAssetClassDecimalPlaces: response.AssetInformation.SubAssetClassDecimalPlaces,\r\n AssetPriceIsDiscounted: false,\r\n });\r\n }\r\n })\r\n .catch((err) => console.error(err));\r\n }\r\n };\r\n\r\n const onChangeCollateral = (v) => {\r\n const newCollateral = {\r\n AssetId: v.AssetId,\r\n AssetTicker: v.AssetTicker,\r\n CollateralQuantity: 0,\r\n };\r\n const currency = v.AssetCurrency;\r\n const updRepo = {\r\n ...v,\r\n OrderCurrencyId: currency,\r\n OrderCurrencySymbol: currency,\r\n CurrentAccount: {\r\n ...order.CurrentAccount,\r\n Collateral: newCollateral.AssetId!=undefined?[newCollateral]: order.CurrentAccount.Collateral,\r\n }\r\n };\r\n \r\n\r\n if(newCollateral.AssetId!=undefined){\r\n onAccountChange(dispatch, { Collateral: [newCollateral] });\r\n }\r\n handleSymbolSelection(updRepo);\r\n setUpdateAccount((prev) => !prev);\r\n };\r\n\r\n const onChangeQuantity = (v) => {\r\n const newCollateral = {\r\n AssetId: order.CurrentAccount.Collateral[0].AssetId,\r\n AssetTicker: order.CurrentAccount.Collateral[0].AssetTicker,\r\n CollateralQuantity: v,\r\n };\r\n onAccountChange(dispatch, { Collateral: [newCollateral], Quantity: 1, OffsetQuantity: v });\r\n };\r\n\r\n const onChangeQuantityBuy = (v) => {\r\n onAccountChange(dispatch, { Quantity: 1, OffsetQuantity: v });\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n 0)}\r\n invalid={!!errors.OrderCurrencySymbol}\r\n value={order.OrderCurrencySymbol || \"\"}\r\n attrId=\"OrderCurrencyId\"\r\n attrTicker=\"OrderCurrencySymbol\"\r\n {...services.symbol}\r\n />\r\n \r\n {order.OrderSide === \"Sell\" && (\r\n \r\n 0)}\r\n invalid={!!errors.CollateralAssetTicker}\r\n value={\r\n order.CurrentAccount.Collateral ? order.CurrentAccount.Collateral[0].AssetTicker : \"\"\r\n }\r\n description={order.CurrentAccount.AssetDescription}\r\n provider={order.CurrentAccount.AssetSecurityProvider}\r\n assetid={order.CurrentAccount.AssetId}\r\n attrId={\"AssetId\"}\r\n attrTicker={\"AssetTicker\"}\r\n attrDescription={\"AssetDescription\"}\r\n attrProvider={\"AssetSecurityProvider\"}\r\n attrCurrency={\"AssetCurrency\"}\r\n {...services.symbol}\r\n assetInfo={() => customFetchAssetInfo(dispatch, services.symbol, order)}\r\n updatePrice={updatePrice}\r\n />\r\n \r\n )}\r\n \r\n \r\n \r\n onChange(dispatch, v)}\r\n />\r\n onChange(dispatch, v)}\r\n />\r\n {((ui.userRole === \"Trader\" && order.OrderSide === \"Sell\")|| (ui.userRole !== \"Trader\" && ui.mode !== Mode.EDIT && order.OrderSide === \"Sell\")) && onChange(dispatch, v)}\r\n onAccountChange={(v) => onAccountChange(dispatch, v)}\r\n />}\r\n \r\n\r\n {/* Right */}\r\n \r\n {/* ##### Account ###### */}\r\n {!ui.isBulk && !ui.isBasket && (\r\n onAccountChange(dispatch, v)}\r\n onChangeOrder={(v) => onChange(dispatch, v)}\r\n balanceReady={!!order.OrderCurrencyId}\r\n dispatch={dispatch}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n {...accountProps({ order, readonly, errors })}\r\n hiddens={{\r\n Quantity: true,\r\n showClientPrice: true,\r\n Markup: true,\r\n ...hiddens,\r\n }}\r\n opsViewAccountName={opsViewAccountName}\r\n />\r\n )}\r\n\r\n {ui.isBulk && (\r\n onAccountChange(dispatch, v)}\r\n accounts={order.Accounts || []}\r\n isReadOnly={ui.mode == Mode.READONLY}\r\n canModifyComposition={ui.mode == Mode.EDIT}\r\n readonly={readonly}\r\n error={errors.Accounts}\r\n account={order.CurrentAccount}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n hiddens={{\r\n ...hiddens,\r\n }}\r\n />\r\n )}\r\n\r\n {ui.isBasket && (\r\n onAccountChange(dispatch, v)}\r\n accounts={order.Accounts || []}\r\n isReadOnly={ui.mode == Mode.READONLY}\r\n canModifyComposition={ui.mode == Mode.EDIT}\r\n readonly={readonly}\r\n error={errors.Accounts}\r\n account={order.CurrentAccount}\r\n {...services.account}\r\n accountInfo={accountInfo}\r\n hiddens={{\r\n ...hiddens,\r\n }}\r\n />\r\n )}\r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport const defaultValues = () => {\r\n return {\r\n OrderSide: \"Buy\",\r\n BookType: \"Self\"\r\n };\r\n};\r\n\r\nexport const validations = (order, userType) => {\r\n const filteredBankAccounts = order.CurrentAccount.clientBankAccounts\r\n ? order.CurrentAccount.clientBankAccounts.filter(\r\n (account) => account.currencyISO === order.OrderCurrencySymbol\r\n )\r\n : [];\r\n\r\n const isMultiAccounts = order.OrderHasMultipleAccounts;\r\n\r\n return {\r\n OrderQuantity: { empty: !isMultiAccounts },\r\n OrderCurrencySymbol: { empty: true, autosuggestId: \"OrderCurrencyId\" },\r\n OrderTimeInForce: { empty: true },\r\n\r\n // The following properties are from an account.\r\n AccountName: {\r\n empty: true,\r\n accountLevel: true,\r\n },\r\n clientBankAccounts: {\r\n noBankAccountSelected: filteredBankAccounts && filteredBankAccounts.length > 0 && (order.CurrentAccount.clientBankAccount == null || order.CurrentAccount.clientBankAccount == \"\") && !order.CurrentAccount.useCashAccount,\r\n },\r\n HolderName: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n Quantity: {\r\n empty: true,\r\n accountLevel: true,\r\n },\r\n Instruction: {\r\n empty: userType !== UserType.Trader,\r\n accountLevel: true,\r\n },\r\n };\r\n};\r\n\r\nexport default Repo;\r\n","import { CommissionType, ProductType } from \"../../../../utils/Order/Order\";\r\n\r\nexport const clientPrice = (side, markupType, markup, price, isDiscount) => {\r\n if (\r\n side != undefined &&\r\n markupType != undefined &&\r\n markup != undefined &&\r\n markup !== \"\" &&\r\n price != undefined &&\r\n price !== \"\"\r\n ) {\r\n const sideSign = (side == \"Buy\" && !isDiscount) || (side == \"Sell\" && isDiscount) ? 1 : -1;\r\n\r\n if (markupType == CommissionType.FaceValueCash) {\r\n return +price + sideSign * +markup;\r\n }\r\n\r\n return +price + sideSign * +price * (+markup / 100);\r\n }\r\n\r\n return null;\r\n};\r\n\r\nexport const clientRate = (side, markupType, markup, rate) => {\r\n if (\r\n side != undefined &&\r\n markupType != undefined &&\r\n markup != undefined &&\r\n markup !== \"\" &&\r\n rate != undefined &&\r\n rate !== \"\"\r\n ) {\r\n const sideSign = side == \"Buy\" ? -1 : 1;\r\n\r\n if (markupType == CommissionType.FaceValueCash) {\r\n return +rate + sideSign * +markup;\r\n }\r\n\r\n return +rate + sideSign * +rate * (+markup / 100);\r\n }\r\n\r\n return null;\r\n};\r\n\r\nexport const accountProps = ({ order, readonly, errors }) => {\r\n return {\r\n order,\r\n account: order.CurrentAccount,\r\n hasAttachment: order.CurrentAccount.HasFileUploadPending\r\n ? { uploadPending: true }\r\n : order.CurrentAccount.AttachmentFileType,\r\n readonly,\r\n errors,\r\n };\r\n};\r\n\r\nexport const commissionSuffix = (commissionType, currencySymbol = \"\") => {\r\n if (commissionType == CommissionType.PrincipalPercentage) {\r\n return { suffix: \"%\" };\r\n }\r\n if (commissionType == CommissionType.FaceValueCash && currencySymbol !== \"\") {\r\n return { prefix: `${currencySymbol} ` };\r\n }\r\n\r\n return null;\r\n};\r\n\r\nexport const customFetchAssetInfo = (dispatch, services, order) => {\r\n const assetInfoData = {\r\n tradeDate: order.OrderInitDate,\r\n valueDate: order.OrderFutureSettlmentDate,\r\n fixedValueDate: true,\r\n orderForm: order.AssetClassForm,\r\n assetId:\r\n order.AssetClassForm === ProductType.REPO && order.CurrentAccount.Collateral\r\n ? order.CurrentAccount.Collateral[0].AssetId\r\n : order.AssetId,\r\n assetTicker:\r\n order.AssetClassForm === ProductType.REPO && order.CurrentAccount.Collateral\r\n ? order.CurrentAccount.Collateral[0].AssetTicker\r\n : order.AssetTicker,\r\n tradeCurrencyId: order.OrderCurrencyId,\r\n settleCurrencyId: order.OrderSettlementCurrencyId,\r\n };\r\n\r\n return services.assetInfo(assetInfoData).then((response) => {\r\n const { assetorderdata } = response.response;\r\n\r\n dispatch({ type: \"FETCH_ASSET_INFO\", data: assetorderdata });\r\n\r\n return assetorderdata;\r\n });\r\n};\r\n\r\nexport const customFetchAccountInfo = (dispatch, services, params, updateOrderValues) => {\r\n const fetchTasks = [services.accountInfo(params), services.commissionInfo(params)];\r\n\r\n return Promise.all(fetchTasks).then((taskResults) => {\r\n const { kvpItems } = taskResults[1].response;\r\n\r\n dispatch({ type: \"FETCH_ACCOUNT_INFO\", items: kvpItems, updateOrderValues });\r\n\r\n return taskResults[0];\r\n });\r\n};\r\n","import {validations as EquityValidations, defaultValues as EquityDefault} from './Equity';\r\nimport {validations as BondsValidations, defaultValues as BondsDefault} from './Bonds';\r\nimport {validations as OptionsValidations, defaultValues as OptionsDefault} from './Options';\r\nimport {validations as MFundsValidations, defaultValues as MFundsDefault} from './MFunds';\r\nimport {validations as ForexValidations, defaultValues as ForexDefault} from './Forex';\r\nimport {validations as MMarketValidations, defaultValues as MMarketDefault} from './MMarket';\r\nimport {validations as RepoValidations, defaultValues as RepoDefault} from './Repo';\r\nimport {validations as FutureValidations, defaultValues as FutureDefault} from './Future';\r\n\r\nexport {default as Bonds} from './Bonds';\r\nexport {default as Equity} from './Equity';\r\nexport {default as Options} from './Options';\r\nexport {default as MFunds} from './MFunds';\r\nexport {default as Forex} from './Forex';\r\nexport {default as MMarket} from './MMarket';\r\nexport {default as Repo} from './Repo';\r\nexport {default as Future} from './Future';\r\n\r\nexport const formProps = {\r\n\tEquity: {\r\n\t\tvalidation: EquityValidations,\r\n\t\tdefaults: EquityDefault\r\n\t},\r\n\tBonds: {\r\n\t\tvalidation: BondsValidations,\r\n\t\tdefaults: BondsDefault\r\n\t},\r\n\tOptions: {\r\n\t\tvalidation: OptionsValidations,\r\n\t\tdefaults: OptionsDefault\r\n\t},\r\n\t'Mutual Funds': {\r\n\t\tvalidation: MFundsValidations,\r\n\t\tdefaults: MFundsDefault\r\n\t},\r\n\tForex: {\r\n\t\tvalidation: ForexValidations,\r\n\t\tdefaults: ForexDefault\r\n\t},\r\n\t'Money Market': {\r\n\t\tvalidation: MMarketValidations,\r\n\t\tdefaults: MMarketDefault\r\n\t},\r\n\tRepo: {\r\n\t\tvalidation: RepoValidations,\r\n\t\tdefaults: RepoDefault\r\n\t},\r\n\tFuture: {\r\n\t\tvalidation: FutureValidations,\r\n\t\tdefaults: FutureDefault\r\n\t},\r\n}\r\n\r\n","import React, { useContext, useEffect, useState, useRef } from \"react\";\r\nimport { Col, Row, Input, Button } from \"reactstrap\";\r\nimport { Field, Numeric } from \"../Field/Field\";\r\nimport { Dispatch } from \"../store/store\";\r\nimport { commissionSuffix } from \"../../FundOrder/Form/commons\";\r\nimport { CommissionType } from \"../../../../utils\";\r\nimport style from \"./GoalSeek.module.scss\";\r\n\r\nconst goalSeekResponseInitialValue = {\r\n cleanPrice: 0,\r\n tir: 0,\r\n dirtyPrice: 0,\r\n};\r\n\r\nconst targetInitialValue = 0;\r\n\r\nconst GoalSeek = ({ order, fetchCalculatorDataForOffers, fetchGetCalculator, sendDirtyPrice }) => {\r\n const [targetTNA, setTargetTNA] = useState(targetInitialValue);\r\n const [goalSeekResponse, setGoalSeekResponse] = useState(goalSeekResponseInitialValue);\r\n const [reachedStatus, setReachedStatus] = useState(\"Waiting...\");\r\n const assetInfo = order && order.OrderAssetData && order.OrderAssetData.items;\r\n const abortControllerRef = useRef(null);\r\n\r\n useEffect(() => {\r\n // Cleanup function to abort any pending requests when component unmounts\r\n return () => {\r\n if (abortControllerRef.current) {\r\n abortControllerRef.current.abort();\r\n }\r\n };\r\n }, []);\r\n\r\n const isValidOrderData = () => order && order.OrderQuantity && order.AssetId && order.OrderInitDate;\r\n\r\n const handleChangeTargetTNA = (newValue) => {\r\n setTargetTNA(parseFloat(newValue));\r\n goalSeekRequestHandler(parseFloat(newValue));\r\n };\r\n\r\n const isTNAEqualsCoupon = (TNA) => {\r\n return assetInfo && TNA == parseFloat(assetInfo.Coupon);\r\n };\r\n\r\n const processTnaEqualsCoupon = () => {\r\n if (abortControllerRef.current) {\r\n abortControllerRef.current.abort(); // Cancel the previous request if it exists\r\n }\r\n\r\n const controller = new AbortController();\r\n abortControllerRef.current = controller;\r\n\r\n const request = {\r\n assetId: order.AssetId,\r\n quantity: order.OrderQuantity,\r\n date: new Date().toISOString().slice(0, 10),\r\n price: 100,\r\n priceisclean: true,\r\n priceisdirty: false,\r\n ytm: true,\r\n };\r\n\r\n setReachedStatus(\"Fetching...\");\r\n\r\n fetchGetCalculator(request, { signal: controller.signal }).then((response) => {\r\n if (!response) return;\r\n\r\n if (response.result.Code == 200) {\r\n setGoalSeekResponse({\r\n cleanPrice: response.calculator.cleanprice,\r\n dirtyPrice: response.calculator.dirtyprice,\r\n tir: response.calculator.ytm,\r\n });\r\n sendDirtyPrice(response.calculator.dirtyprice);\r\n setReachedStatus(\"Completed\");\r\n } else {\r\n setReachedStatus(\"Not Reached\");\r\n setGoalSeekResponse(goalSeekResponseInitialValue);\r\n return;\r\n }\r\n });\r\n };\r\n\r\n const goalSeekRequestHandler = (TNA) => {\r\n if (!isValidOrderData()) {\r\n return;\r\n }\r\n\r\n if (isTNAEqualsCoupon(TNA)) {\r\n processTnaEqualsCoupon();\r\n return;\r\n }\r\n\r\n if (abortControllerRef.current) {\r\n abortControllerRef.current.abort(); // Cancel the previous request if it exists\r\n }\r\n\r\n const controller = new AbortController();\r\n abortControllerRef.current = controller;\r\n\r\n const goalSeekRequest = {\r\n targetValueTNA: TNA,\r\n assetId: parseInt(order.AssetId),\r\n quantity: order.OrderQuantity,\r\n date: order.OrderInitDate,\r\n isTargetTNA: true,\r\n };\r\n\r\n setReachedStatus(\"Fetching...\");\r\n fetchCalculatorDataForOffers(goalSeekRequest, { signal: controller.signal }).then((res) => {\r\n if (!res || (res.goalSeekResponse && res.goalSeekResponse.Code !== 200)) {\r\n setReachedStatus(\"Not Reached\");\r\n setGoalSeekResponse(goalSeekResponseInitialValue);\r\n return;\r\n }\r\n\r\n setGoalSeekResponse({\r\n cleanPrice: res.goalSeekResponse.CleanPrice * 100,\r\n tir: res.goalSeekResponse.TIR * 100,\r\n dirtyPrice: res.calculator_out.dirtyprice,\r\n });\r\n\r\n setReachedStatus(\"Completed\");\r\n sendDirtyPrice(res.calculator_out.dirtyprice);\r\n });\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n handleChangeTargetTNA(value)}\r\n {...commissionSuffix(CommissionType.PrincipalPercentage)}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default GoalSeek;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"info\":\"GoalSeek-module_info_22QES\",\"expand\":\"GoalSeek-module_expand_1tKue\"};","import React from \"react\";\r\nimport { PopoverBody, UncontrolledPopover } from \"reactstrap\";\r\n\r\nimport style from \"./Helper.module.scss\";\r\n\r\nconst EarningsHelper = ({ children, quantities, earningCategoryName, earningTypeName }) => (\r\n
    \r\n {children}\r\n \r\n \r\n {quantities.map((item) => (\r\n
    \r\n {`${item.date}: ${item[earningCategoryName]} ${item[earningTypeName]} (status: ${item.status})`}\r\n
    \r\n ))}\r\n
    \r\n
    \r\n
    \r\n);\r\n\r\nexport default EarningsHelper;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"linkHelper\":\"Helper-module_linkHelper_3s0wn\",\"Helper\":\"Helper-module_Helper_16_sr\"};","import React from \"react\";\r\nimport { PopoverBody, UncontrolledPopover } from \"reactstrap\";\r\n\r\nimport style from \"./Helper.module.scss\";\r\n\r\nconst QuantityHelper = ({ children, quantities, name }) => (\r\n
    \r\n {children}\r\n \r\n \r\n {quantities.map((item) => (\r\n
    {`${item.date}: ${item.quantity} (status: ${item.status})`}
    \r\n ))}\r\n
    \r\n
    \r\n
    \r\n);\r\n\r\nexport default QuantityHelper;\r\n","import React from 'react'\r\nimport {Button, Modal, ModalHeader, ModalBody, ModalFooter} from 'reactstrap'\r\n\r\nconst Message = ({message, open, toggle}) => {\r\n return (\r\n
    \r\n \r\n Message\r\n {message}\r\n \r\n \r\n \r\n \r\n
    \r\n )\r\n}\r\n\r\nexport default Message\r\n","import React, { useReducer, useEffect, useState } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Container, Row, Col, Input, Button } from \"reactstrap\";\r\nimport { defaultState, Dispatch, initialize } from \"./store/store\";\r\nimport { orderReducer, validateForm } from \"./store/reducer\";\r\nimport style from \"./Order.module.scss\";\r\nimport styleF from \"./Field/Field.module.scss\";\r\nimport {\r\n ProductType,\r\n getProductTypeName,\r\n Mode,\r\n getOptionsTickerFromFields,\r\n OrderStatus,\r\n Type,\r\n} from \"../../../utils/Order/Order\";\r\nimport { Side, Combobox, Field, Numeric } from \"./Field/Field\";\r\nimport { Bonds, Forex, Equity, MFunds, Options, MMarket, Repo, Future } from \"./Form\";\r\nimport Footer from \"./Footer/Footer\";\r\nimport Precheck from \"./Precheck/Precheck\";\r\nimport { QuoteAction } from \"../../../utils/Quote/Quote\";\r\nimport { OrderInlineDetail } from \"../..\";\r\nimport OrderTotals from \"./Footer/OrderTotals\";\r\nimport Execution from \"../Execution/Execution\";\r\nimport { customFetchAssetInfo } from \"./Form/commons\";\r\nimport Message from \"./Message\";\r\nimport { handleFileInput, UserType } from \"../../../utils/Helper\";\r\n\r\nconst Order = ({ open, toggle, ...props }) => {\r\n const [state, dispatch] = useReducer(orderReducer, defaultState(), initialize(props));\r\n const [message, setMessage] = useState({ open: false });\r\n const { ui, order, fields, buttons } = state;\r\n const [orderForms, setOrderForms] = useState([]);\r\n const [maxDecimals, setMaxDecimals] = useState(undefined);\r\n const [newSymbol, setNewSymbol] = useState(false);\r\n const [booktypes, setBooktypes] = useState([]);\r\n\r\n useEffect(() => {\r\n if (props.getBooktypes) {\r\n const isTrader = ui.userRole === \"Trader\";\r\n props.getBooktypes(isTrader).then((r) => {\r\n if (r.response && r.response.booktypes) {\r\n setBooktypes(r.response.booktypes);\r\n }\r\n });\r\n } else {\r\n setBooktypes([]);\r\n }\r\n }, []);\r\n const { platformRole } = props;\r\n useEffect(() => {\r\n const newOrderForms = [];\r\n Object.values(ProductType).map((key, index) => {\r\n if (\r\n !(\r\n [\"Bulk\", \"Basket\", \"Chained\"].includes(props.type) &&\r\n [ProductType.REPO, ProductType.FUTURE].includes(key)\r\n )\r\n )\r\n newOrderForms.push({\r\n id: key,\r\n description: getProductTypeName(key),\r\n });\r\n });\r\n setOrderForms(newOrderForms);\r\n }, [props.type]);\r\n\r\n useEffect(() => {\r\n if (ui.quoteId) {\r\n customFetchAssetInfo(\r\n dispatch,\r\n { assetInfo: props.onOrderAssetInfo },\r\n {\r\n OrderInitDate: order.OrderInitDate,\r\n OrderFutureSettlmentDate: order.OrderFutureSettlmentDate,\r\n AssetClassForm: order.AssetClassForm,\r\n AssetId: order.AssetId,\r\n AssetTicker: order.AssetTicker,\r\n OrderCurrencyId: order.OrderCurrencyId,\r\n OrderSettlementCurrencyId: order.OrderSettlementCurrencyId,\r\n }\r\n );\r\n }\r\n }, [\r\n order.OffertoAdvisors,\r\n order.OffertoClients,\r\n order.OrderInitDate,\r\n order.OrderFutureSettlmentDate,\r\n order.AssetClassForm,\r\n order.AssetId,\r\n order.AssetTicker,\r\n order.OrderCurrencyId,\r\n order.OrderSettlementCurrencyId,\r\n props.onOrderAssetInfo,\r\n ui.quoteId,\r\n ]);\r\n\r\n const updatePrice = () => {\r\n setNewSymbol(true);\r\n };\r\n\r\n useEffect(() => {\r\n if (order.SubAssetClassDecimalPlaces) {\r\n setMaxDecimals(order.SubAssetClassDecimalPlaces);\r\n } else {\r\n props.fetchGetAssetInformation({ assetId: order.AssetId }).then((response) => {\r\n setMaxDecimals(response.info.SubAssetClassDecimalPlaces);\r\n });\r\n }\r\n\r\n setNewSymbol(false);\r\n order.SubAssetClassDecimalPlaces\r\n ? (order.OrderPrice = Number(parseFloat(order.OrderPrice).toFixed(order.SubAssetClassDecimalPlaces)))\r\n : null;\r\n }, [order.OrderPrice, newSymbol]);\r\n\r\n useEffect(() => {\r\n const cOrder = { ...order };\r\n if (ui.mode == Mode.EDIT_COMMISSION && cOrder.OrderStatus == \"Filled\") {\r\n dispatch({ type: \"CHANGE_BUTTON_PROPS\", props: { confirm: { visible: false } } });\r\n }\r\n if (\r\n (ui.mode === Mode.EDIT || ui.mode == Mode.READONLY) &&\r\n (cOrder.OrderStatus === OrderStatus.ROUTED || cOrder.OrderStatus === OrderStatus.ACKED)\r\n ) {\r\n dispatch({ type: \"CHANGE_BUTTON_PROPS\", props: { save: { visible: false } } });\r\n }\r\n const canEditFields = Object.values(state.fields.editable).some(value => value === true) && (cOrder.OrderStatus === OrderStatus.ACKED);\r\n if (canEditFields && (ui.mode === Mode.READONLY)) {\r\n dispatch({ type: \"CHANGE_BUTTON_PROPS\", props: { precheck: { visible: true }}});\r\n }\r\n }, [order]);\r\n\r\n // called from bulk and basket\r\n const canAddAccount = () => {\r\n const formErrors = validateForm(state);\r\n\r\n if (formErrors == false) {\r\n return true;\r\n }\r\n const { OrderQuantity, Accounts, Quantity, AccountName, HolderName, Instruction, ...errors } = formErrors;\r\n if (Object.keys(errors).length != 0) {\r\n dispatch({ type: \"FORCE_UPDATE_VALIDATION\", errors });\r\n } else {\r\n return true;\r\n }\r\n };\r\n\r\n const save = () => {\r\n const formErrors = validateForm(state, true);\r\n\r\n if (state.ui.userRole === UserType.MiddleOffice) {\r\n if (Object.keys(state.attachments || {}).length > 0) {\r\n const data = {\r\n orderId: state.order.OrderId,\r\n files: [],\r\n };\r\n Promise.all(\r\n Object.entries(state.attachments).map(\r\n ([key, value]) =>\r\n new Promise(async (resolve, reject) => {\r\n if (value) {\r\n try {\r\n const { blob, name, extension } = await handleFileInput(value);\r\n resolve({\r\n accountId: key,\r\n name,\r\n blob,\r\n extension,\r\n });\r\n } catch (e) {\r\n reject();\r\n }\r\n } else {\r\n reject();\r\n }\r\n })\r\n )\r\n ).then((files) => {\r\n props.onOrderAttachment({\r\n ...data,\r\n files,\r\n });\r\n toggle(order.OrderId);\r\n });\r\n }\r\n } else if (formErrors === false) {\r\n const cOrder = { ...order };\r\n\r\n cOrder.OrderStatus = OrderStatus.PARKED;\r\n\r\n if (cOrder.AssetClassForm == ProductType.OPTION) {\r\n cOrder.AssetTicker = getOptionsTickerFromFields(order);\r\n }\r\n\r\n dispatch({\r\n type: \"CHANGE_BUTTON_PROPS\",\r\n props: {\r\n save: { loading: true },\r\n precheck: { visible: false },\r\n },\r\n });\r\n\r\n props\r\n .onConfirm({ order: cOrder, isNew: !cOrder.OrderId, authorizations: state.precheck.authorizations })\r\n .then((res) => res.response)\r\n .then((res) => {\r\n const { result } = res;\r\n const { Code, Description } = result;\r\n\r\n if (Code !== 200) {\r\n dispatch({\r\n type: \"CHANGE_BUTTON_PROPS\",\r\n props: {\r\n save: { loading: false },\r\n precheck: { visible: false },\r\n },\r\n });\r\n setMessage({ open: true, message: Description });\r\n } else if (Object.keys(state.attachments || {}).length > 0) {\r\n // if order has attachments\r\n const data = {\r\n orderId: res.orderId,\r\n files: [],\r\n };\r\n Promise.all(\r\n Object.entries(state.attachments).map(\r\n ([key, value]) =>\r\n new Promise(async (resolve, reject) => {\r\n if (value) {\r\n try {\r\n const { blob, name, extension } = await handleFileInput(value);\r\n resolve({\r\n accountId: key,\r\n name,\r\n blob,\r\n extension,\r\n });\r\n } catch (e) {\r\n reject();\r\n }\r\n } else {\r\n reject();\r\n }\r\n })\r\n )\r\n ).then((files) => {\r\n props.onOrderAttachment({\r\n ...data,\r\n files,\r\n });\r\n toggle(cOrder.OrderId);\r\n });\r\n } else {\r\n toggle(cOrder.OrderId);\r\n }\r\n });\r\n } else {\r\n dispatch({ type: \"FORCE_UPDATE_VALIDATION\", errors: formErrors });\r\n }\r\n };\r\n\r\n const confirmCommission = () => {\r\n const formErrors = validateForm(state);\r\n\r\n if (formErrors === false) {\r\n dispatch({ type: \"CHANGE_BUTTON_PROPS\", props: { confirm: { loading: true } } });\r\n\r\n /*\r\n const {\r\n CommissionType, Commission, MarkupType, Markup, FXMarkupType, FXMarkup,\r\n } = order.CurrentAccount;\r\n const newProps = {\r\n CommissionType, Commission, MarkupType, Markup, FXMarkupType, FXMarkup,\r\n };\r\n */\r\n\r\n props\r\n .onConfirm({ order, isNew: !order.OrderId, authorizations: state.precheck.authorizations })\r\n .then((res) => {\r\n const { result } = res.response;\r\n\r\n if (result.Code !== 200) {\r\n dispatch({\r\n type: \"CHANGE_BUTTON_PROPS\",\r\n props: {\r\n confirm: { loading: false },\r\n },\r\n });\r\n setMessage({ open: true, message: result.Description });\r\n } else {\r\n toggle(order.OrderId);\r\n }\r\n });\r\n } else {\r\n dispatch({ type: \"FORCE_UPDATE_VALIDATION\", errors: formErrors });\r\n }\r\n };\r\n\r\n const saveAttachments = (orderId, attachments) => {\r\n if (Object.keys(attachments || {}).length > 0) {\r\n const data = {\r\n orderId,\r\n files: [],\r\n };\r\n Promise.all(\r\n Object.entries(attachments).map(\r\n ([key, value]) =>\r\n new Promise(async (resolve, reject) => {\r\n if (value) {\r\n try {\r\n const { blob, name, extension } = await handleFileInput(value);\r\n resolve({\r\n accountId: key,\r\n name,\r\n blob,\r\n extension,\r\n });\r\n } catch (e) {\r\n reject();\r\n }\r\n } else {\r\n reject();\r\n }\r\n })\r\n )\r\n ).then((files) => {\r\n props.onOrderAttachment({\r\n ...data,\r\n files,\r\n });\r\n });\r\n }\r\n };\r\n\r\n const onOrderUpdate =\r\n (inOrderId, isConfirm, isCreate = false) =>\r\n (res) => {\r\n const { ui, precheck } = state;\r\n const { result } = res.response;\r\n\r\n if (![200, 204].includes(result.Code)) {\r\n setMessage({ open: true, message: result.Description });\r\n if (isConfirm) {\r\n dispatch({\r\n type: \"CHANGE_BUTTON_PROPS\",\r\n props: { confirm: { loading: false } },\r\n });\r\n } else {\r\n dispatch({\r\n type: \"CHANGE_BUTTON_PROPS\",\r\n props: { modify: { loading: false } },\r\n });\r\n }\r\n return Promise.reject(\"Order Creation/Update failed\");\r\n }\r\n\r\n const orderId = inOrderId > 0 ? inOrderId : res.response.orderId;\r\n\r\n // if order has attachments\r\n saveAttachments(orderId, state.attachments);\r\n\r\n // if is from quote, change quote as used\r\n if (ui.quoteId) {\r\n props.updateQuote({\r\n quoteAction: QuoteAction.USE,\r\n quote: { AdvisorQuoteId: ui.quoteId },\r\n });\r\n }\r\n\r\n // add authorizations histories\r\n props.onAddHistories({\r\n histories: precheck.histories.map((h) => ({\r\n ...h,\r\n HistoryRefProcessId: orderId,\r\n })),\r\n });\r\n\r\n if (isCreate) {\r\n isConfirmHandler(ui, isConfirm, orderId);\r\n } else {\r\n // create authorizations\r\n new Promise((resolve) => {\r\n const authorizations = precheck.authorizations.map((authorization) => ({\r\n ...authorization,\r\n refid: orderId,\r\n //secRefId: cOrder.AccountId,\r\n }));\r\n props.onValidationsCreateAuth({ authorizations }).then((resp) => resolve(resp.response));\r\n }).then((r) => isConfirmHandler(ui, isConfirm, orderId));\r\n }\r\n\r\n // is warning code fired from OMS\r\n if (result.Code == 204) {\r\n alert(result.Description);\r\n }\r\n };\r\n\r\n const isConfirmHandler = (ui, isConfirm, orderId) => {\r\n if (isConfirm) {\r\n if (ui.userRole == \"Trader\" && !ui.isBasket) {\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.EXECUTE, id: orderId });\r\n } else {\r\n toggle(orderId);\r\n }\r\n } else {\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.EDIT });\r\n }\r\n };\r\n\r\n const confirm = async () => {\r\n const { ui, precheck } = state;\r\n\r\n // intercept if editing commission on filled orders from advisor\r\n if (ui.mode == Mode.EDIT_COMMISSION) {\r\n confirmCommission();\r\n return;\r\n }\r\n\r\n // special check for bulk and basket orders\r\n if (ui.isBulk || ui.isBasket) {\r\n const formErrors = validateForm(state);\r\n\r\n if (formErrors != false) {\r\n dispatch({ type: \"FORCE_UPDATE_VALIDATION\", errors: formErrors });\r\n return;\r\n }\r\n }\r\n\r\n let cOrder = { ...order };\r\n\r\n // change ticker if is an option\r\n if (cOrder.AssetClassForm == ProductType.OPTION) {\r\n //cOrder.AssetTicker = getOptionsTickerFromFields(cOrder);\r\n }\r\n\r\n let hasErrors = false;\r\n\r\n // check if any authorizations has error\r\n const authorizations = precheck.authorizations.map((auth) => {\r\n if (auth.text == null || !auth.text.length) {\r\n hasErrors = true;\r\n return { ...auth, error: \"Required field\", readonly: undefined };\r\n }\r\n\r\n return { ...auth, error: null, readonly: undefined };\r\n });\r\n\r\n if (!hasErrors) {\r\n authorizations.forEach((a) => (a.readonly = true));\r\n }\r\n\r\n dispatch({ type: \"UPDATE_PRECHECK\", fields: { authorizations } });\r\n\r\n if (!hasErrors) {\r\n // check if all authorizations can be authorized by self\r\n const allSelfAuth = precheck.authorizations.every((a) => a.role.toLowerCase() === \"self\");\r\n\r\n // if allSefAuth = true then order will has ROUTED status\r\n if (!allSelfAuth) {\r\n // If not all authorizations can be authorized by self\r\n cOrder.OrderStatus = OrderStatus.AUTH_WAIT;\r\n }\r\n // if parked.. when confirm change to routed\r\n else if (cOrder.OrderStatus == OrderStatus.PARKED) {\r\n cOrder.OrderStatus = OrderStatus.ROUTED;\r\n }\r\n\r\n dispatch({\r\n type: \"CHANGE_BUTTON_PROPS\",\r\n props: { confirm: { loading: true } },\r\n });\r\n\r\n const isExistingMultiAccountOrder = cOrder.OrderId > 0 && (ui.isBulk || ui.isBasket);\r\n\r\n if (ui.mode == Mode.PRECHECK && isExistingMultiAccountOrder) {\r\n props\r\n .onAccountUpdate({\r\n orderId: cOrder.OrderId,\r\n account: cOrder.CurrentAccount,\r\n })\r\n .then(onOrderUpdate(cOrder.OrderId, true))\r\n .then(() => toggle(cOrder.OrderId))\r\n .catch();\r\n } else {\r\n if (isExistingMultiAccountOrder) {\r\n // The accounts are updated in other procedures\r\n cOrder.Accounts = [];\r\n cOrder.CurrentAccount = {};\r\n }\r\n // update order service\r\n props\r\n .onConfirm({\r\n order: cOrder,\r\n isNew: !cOrder.OrderId,\r\n authorizations: precheck.authorizations,\r\n })\r\n .then(onOrderUpdate(cOrder.OrderId, true, true))\r\n .then(() => toggle(cOrder.OrderId))\r\n .catch();\r\n }\r\n }\r\n };\r\n\r\n const goBack = () => {\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.EDIT });\r\n };\r\n\r\n const modify = async () => {\r\n const { ui, precheck } = state;\r\n\r\n const isExistingMultiAccountOrder = order.OrderId > 0 && (ui.isBulk || ui.isBasket);\r\n\r\n if (isExistingMultiAccountOrder) {\r\n const formErrors = validateForm(state);\r\n\r\n if (formErrors != false) {\r\n dispatch({ type: \"FORCE_UPDATE_VALIDATION\", errors: formErrors });\r\n return;\r\n }\r\n\r\n let hasErrors = false;\r\n\r\n // check if any authorizations has error\r\n const authorizations = precheck.authorizations.map((auth) => {\r\n if (auth.text == null || !auth.text.length) {\r\n hasErrors = true;\r\n return { ...auth, error: \"Required field\", readonly: undefined };\r\n }\r\n\r\n return { ...auth, error: null, readonly: undefined };\r\n });\r\n\r\n if (!hasErrors) {\r\n authorizations.forEach((a) => (a.readonly = true));\r\n }\r\n\r\n dispatch({ type: \"UPDATE_PRECHECK\", fields: { authorizations } });\r\n\r\n if (!hasErrors) {\r\n const currentAccount = order.CurrentAccount;\r\n const cOrder = {\r\n ...order,\r\n Accounts: [], // The accounts are updated individually, so are not necessary here.\r\n CurrentAccount: {},\r\n };\r\n\r\n // change ticker if is an option\r\n if (cOrder.AssetClassForm == ProductType.OPTION) {\r\n cOrder.AssetTicker = getOptionsTickerFromFields(cOrder);\r\n }\r\n\r\n // check if all authorizations can be authorized by self\r\n const allSelfAuth = precheck.authorizations.every((a) => a.role.toLowerCase() === \"self\");\r\n\r\n // if allSefAuth = true then order will has ROUTED status\r\n if (!allSelfAuth) {\r\n // If not all authorizations can be authorized by self\r\n cOrder.OrderStatus = OrderStatus.AUTH_WAIT;\r\n }\r\n // if parked.. when confirm change to routed\r\n else if (cOrder.OrderStatus == OrderStatus.PARKED) {\r\n cOrder.OrderStatus = OrderStatus.ROUTED;\r\n }\r\n\r\n dispatch({\r\n type: \"CHANGE_BUTTON_PROPS\",\r\n props: { modify: { loading: true } },\r\n });\r\n\r\n // The call to onConfirm will only update the order data.\r\n // Then, the onAccountUpdate will update/add the account info.\r\n props\r\n .onConfirm({\r\n order: cOrder,\r\n isNew: false,\r\n authorizations: precheck.authorizations,\r\n })\r\n .then((res) => {\r\n const { result } = res.response;\r\n\r\n if (result.Code !== 200) {\r\n try {\r\n onOrderUpdate(cOrder.OrderId, true)(res);\r\n } catch (err) {}\r\n } else {\r\n props\r\n .onAccountUpdate({\r\n orderId: cOrder.OrderId,\r\n account: currentAccount,\r\n })\r\n .then(onOrderUpdate(cOrder.OrderId, false))\r\n .catch();\r\n }\r\n })\r\n .catch()\r\n .finally(() => {\r\n dispatch({\r\n type: \"CHANGE_BUTTON_PROPS\",\r\n props: { modify: { loading: false } },\r\n });\r\n });\r\n }\r\n } else {\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.EDIT });\r\n }\r\n };\r\n\r\n const toggleAction = async () => {\r\n const { ui, attachments } = state;\r\n\r\n const isExistingReadonlyOrder = order.OrderId > 0 && ui.mode !== Mode.EDIT;\r\n\r\n if (isExistingReadonlyOrder) {\r\n // if order has attachments\r\n saveAttachments(order.OrderId, attachments);\r\n }\r\n\r\n toggle(order.OrderId);\r\n };\r\n\r\n const nextStep = () => {\r\n const { activeStep } = state.wizzard;\r\n\r\n if (state.ui.mode == Mode.EDIT_COMMISSION) {\r\n confirmCommission();\r\n return;\r\n }\r\n\r\n if (activeStep != 3) {\r\n dispatch({ type: \"WIZZ_NEXT_STEP\" });\r\n } else {\r\n // confirmation with wizzard\r\n const { wizzard } = state;\r\n\r\n const context1 = wizzard.steps[0].context;\r\n const context2 = wizzard.steps[2].context;\r\n\r\n const order1 = { ...context1.order };\r\n const order2 = { ...context2.order };\r\n\r\n // change ticker if is an option\r\n if (order1.AssetClassForm == ProductType.OPTION) {\r\n order1.AssetTicker = getOptionsTickerFromFields(order1);\r\n }\r\n\r\n if (order2.AssetClassForm == ProductType.OPTION) {\r\n order2.AssetTicker = getOptionsTickerFromFields(order2);\r\n }\r\n\r\n dispatch({ type: \"CHANGE_BUTTON_PROPS\", props: { confirm: { loading: true } } });\r\n\r\n props\r\n .onConfirm({\r\n order: order1,\r\n order2,\r\n isNew: true,\r\n authorizations: state.precheck.authorizations,\r\n })\r\n .then((res) => {\r\n const { response } = res;\r\n\r\n props.onAddHistories({\r\n histories: context1.precheck.histories.map((h) => ({\r\n ...h,\r\n HistoryRefProcessId: response.orderId,\r\n })),\r\n });\r\n\r\n props.onAddHistories({\r\n histories: context2.precheck.histories.map((h) => ({\r\n ...h,\r\n HistoryRefProcessId: response.orderId2,\r\n })),\r\n });\r\n\r\n setTimeout(() => toggle(response.orderId), 250);\r\n });\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n toggle(order.OrderId)}>\r\n {ui.title}\r\n {(ui.mode === Mode.PRECHECK || ui.mode === Mode.CONFIRM || ui.mode === Mode.EXECUTE) && (\r\n \r\n )}\r\n \r\n \r\n {ui.mode == Mode.EXECUTE && (\r\n toggle(order.OrderId)}\r\n entities={props.entities}\r\n order={order}\r\n orderId={order.OrderId}\r\n services={{\r\n fetchAddExecution: props.onAddExecution,\r\n fetchRemoveExecution: () => {},\r\n fetchTradingRoutes: props.onGetTradingRoutes,\r\n fetchOrderAssetInfo: props.onOrderAssetInfo,\r\n fetchGetAssetInformation: props.fetchGetAssetInformation,\r\n getTradesTimeSpan: props.getTradesTimeSpan,\r\n fetchGetAssetQuote: props.fetchGetAssetQuote,\r\n getAuthorizedTraders: props.getAuthorizedTraders,\r\n fetchOwnPositionAccounts: props.fetchOwnPositionAccounts,\r\n }}\r\n />\r\n )}\r\n {(ui.mode == Mode.EDIT ||\r\n ui.mode == Mode.READONLY ||\r\n ui.mode == Mode.EDIT_COMMISSION ||\r\n ui.mode == Mode.REALLOCATE) && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange(dispatch, v)}\r\n />\r\n \r\n \r\n onChangeForm(dispatch, v)}\r\n value={order.AssetClassForm}\r\n items={orderForms}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n\r\n {/* Dynamic form */}\r\n {getForm(\r\n order.AssetClassForm,\r\n maxDecimals,\r\n updatePrice,\r\n newSymbol,\r\n props.fetchCalculatorDataForOffers,\r\n booktypes,\r\n platformRole,\r\n props.fetchGetCalculator,\r\n props.opsViewAccountName\r\n )}\r\n\r\n \r\n {[OrderStatus.PART, OrderStatus.PART_FILLED, OrderStatus.FILLED].includes(\r\n order.OrderStatus\r\n ) &&\r\n (ui.userRole == \"Advisor\" || order.AccountType != \"Customer\") && (\r\n \r\n )}\r\n \r\n \r\n onChange(dispatch, { OrderNote: e.target.value })}\r\n />\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {(ui.mode == Mode.CONFIRM || ui.mode == Mode.PRECHECK) && (\r\n dispatch(e)}\r\n actions={{\r\n ...services(props).precheck,\r\n }}\r\n />\r\n )}\r\n {message.open && setMessage({ open: false })} />}\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst services = (props) => ({\r\n account: {\r\n searchAccount: props.onSearchAccount,\r\n downloadAttachment: props.onOrderDownloadAttachment,\r\n accountHolders: props.onAccountHolders,\r\n getUserExternalAccounts: props.getUserExternalAccounts,\r\n imgSource: props.imageSource,\r\n orderPdf: props.onOrderPdf,\r\n accountInfo: props.onOrderAccountInfo,\r\n commissionInfo: props.onOrderCommissionInfo,\r\n canAddAccount: props.canAddAccount,\r\n resendAuth: props.resendAuth,\r\n removeAccount: props.onAccountRemove,\r\n getOffer: props.onGetOffer,\r\n fetchGetOrder: props.fetchGetOrder,\r\n fetchOwnPositionAccounts: props.fetchOwnPositionAccounts,\r\n },\r\n symbol: {\r\n searchSymbol: props.onSearchSymbol,\r\n searchRepoSymbol: props.onSearchRepoSymbol,\r\n getYahooOptions: props.onGetYahooOptions,\r\n assetInfo: props.onOrderAssetInfo,\r\n },\r\n precheck: {\r\n getRiskValidations: props.onRiskValidations,\r\n getTotalsAndEarnings: props.onTotalsAndEarnings,\r\n validateRule: props.onValidationsCheckRule,\r\n checkAuth: props.onValidationsCheckAuth,\r\n },\r\n});\r\n\r\nconst getForm = (\r\n form,\r\n maxDecimals,\r\n updatePrice,\r\n newSymbol,\r\n fetchCalculatorDataForOffers,\r\n booktypes,\r\n platformRole,\r\n fetchGetCalculator,\r\n opsViewAccountName\r\n) => {\r\n switch (form) {\r\n case ProductType.BOND:\r\n return (\r\n \r\n );\r\n case ProductType.EQUITY:\r\n return (\r\n \r\n );\r\n return ;\r\n case ProductType.OPTION:\r\n return ;\r\n case ProductType.MFUNDS:\r\n return ;\r\n return ;\r\n case ProductType.MMARKET:\r\n return ;\r\n case ProductType.FOREX:\r\n return ;\r\n case ProductType.REPO:\r\n return ;\r\n case ProductType.FUTURE:\r\n return ;\r\n }\r\n};\r\n\r\nconst onChangeForm = (dispatch, newForm) => dispatch({ type: \"CHANGE_FORM\", newForm });\r\n\r\nexport const onChange = (dispatch, fields) => {\r\n dispatch({ type: \"CHANGE_ORDER_FIELDS\", fields });\r\n};\r\n\r\nexport const onAccountChange = (dispatch, fields) => {\r\n dispatch({ type: \"CHANGE_ORDER_ACCOUNT_FIELDS\", fields });\r\n};\r\n\r\nexport default Order;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"Order-module_modal_3GIJB\",\"body\":\"Order-module_body_2A9Fp\",\"form\":\"Order-module_form_2DKCk\"};","import React from \"react\";\r\nimport { Field } from \"../Field/Field\";\r\nimport { Input } from \"reactstrap\";\r\nimport style from \"./Precheck.module.scss\";\r\n\r\nconst Authorization = ({ authorization, changeMessage }) => {\r\n const { error, readonly } = authorization;\r\n\r\n return (\r\n
    \r\n

    {authorization.name}

    \r\n \r\n changeMessage(authorization.name, e.target.value)}\r\n />\r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default Authorization;\r\n","import React, { Component, useState } from \"react\";\r\nimport { ProductType } from \"../../../../utils/Order/Order\";\r\nimport { Container, Col, Row, Tooltip } from \"reactstrap\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport style from \"./Precheck.module.scss\";\r\n\r\nconst Details = ({ form, precheck, ...props }) => {\r\n let result = props.result;\r\n\r\n for (var key in result) {\r\n if (result.hasOwnProperty(key)) {\r\n if (!isNaN(result[key])) {\r\n result[key] = +result[key];\r\n }\r\n }\r\n }\r\n\r\n const [tooltipOpen, setTooltipOpen] = useState({});\r\n const toggleTooltip = (index) => {\r\n setTooltipOpen({\r\n ...tooltipOpen,\r\n [index]: !tooltipOpen[index],\r\n });\r\n };\r\n\r\n const rows = details(result, form, props.additionalProps);\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n {rows.map((row, index) => {\r\n const tooltipId = `tooltip-${index}`;\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n {row.warning && row.warning != 0 ? (\r\n
    \r\n \r\n toggleTooltip(index)}\r\n >\r\n {row.warning}\r\n \r\n
    \r\n ) : null}\r\n \r\n \r\n );\r\n })}\r\n \r\n
    {row.label}\r\n \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {precheck.FXMarkupAllowed && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    EarningsAmountTaxTotal
    UpFront\r\n \r\n \r\n \r\n \r\n \r\n
    FX UpFront\r\n \r\n \r\n \r\n \r\n \r\n
    Commission\r\n \r\n \r\n \r\n \r\n \r\n
    Total\r\n \r\n \r\n \r\n \r\n \r\n
    %\r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport const Number = ({ value, dataTypeDecimalName, decimalScale }) => {\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst details = (result, form, additionalProps) => {\r\n const commons = (sufix = \"\") => [\r\n { label: `SubTotal${sufix}`, value: result.subtotal, warning: \"\" },\r\n {\r\n label: result.charge > 0 ? `Charge${sufix}` : `Commission${sufix}`,\r\n value: result.charge > 0 ? result.charge : result.commission,\r\n warning: result.charge > 0 ? result.Warnings : \"\",\r\n },\r\n { label: `Tax${sufix}`, value: result.tax, warning: \"\" },\r\n { label: `Total${sufix}`, value: result.Total, warning: \"\" },\r\n ];\r\n\r\n switch (form) {\r\n case ProductType.BOND:\r\n return [\r\n { label: \"Principal\", value: result.Principal },\r\n { label: \"Accruals\", value: result.Accrual },\r\n ...commons(),\r\n ];\r\n\r\n case ProductType.EQUITY:\r\n case ProductType.FUTURE:\r\n case ProductType.OPTION:\r\n case ProductType.REPO:\r\n case ProductType.MMARKET:\r\n return [{ label: \"Principal\", value: result.Principal }, ...commons()];\r\n\r\n case ProductType.MFUNDS:\r\n case ProductType.FOREX:\r\n const otherProps = {};\r\n let otherValues = [];\r\n\r\n if (additionalProps) {\r\n additionalProps.forEach((item, index) => {\r\n otherProps[item.key] = item.value;\r\n });\r\n }\r\n\r\n if (otherProps.hasOwnProperty(\"FX_Title\")) {\r\n otherValues.push({ label: otherProps[\"FX_Title\"], value: otherProps[\"FX_Total\"] });\r\n }\r\n\r\n return [{ label: \"Principal\", value: result.Principal }, ...commons(\" \"), ...otherValues];\r\n }\r\n};\r\n\r\nexport { details as detailsFields };\r\n\r\nexport default Details;\r\n","import React, { Component, Fragment } from \"react\";\r\nimport Details from \"./Details\";\r\nimport Validation from \"./Validation\";\r\nimport CircularProgress from \"../../../CircularProgress/CircularProgress\";\r\nimport style from \"./Precheck.module.scss\";\r\nimport Authorization from \"./Authorization\";\r\nimport { Alert } from \"reactstrap\";\r\nimport { Mode, Type, ProductType, getOptionsTickerFromFields } from \"../../../../utils/Order/Order\";\r\n\r\nclass Precheck extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n\r\n const { validations } = props.precheck;\r\n\r\n this.state = {\r\n validations: validations,\r\n status: null,\r\n waitingCounter: validations ? 0 : null,\r\n loadingTotals: validations ? false : true,\r\n additionalProps: [],\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n this._isMounted = true;\r\n\r\n if (this.state.loadingTotals == false) return;\r\n\r\n const { order, dispatch } = this.props;\r\n const { getRiskValidations, getTotalsAndEarnings } = this.props.actions;\r\n\r\n if (order.CurrentAccount.clientBankAccount && order.CurrentAccount.clientBankAccount !== \"0\") {\r\n order.cashdiffered = true;\r\n } else {\r\n order.cashdiffered = false;\r\n }\r\n\r\n getRiskValidations({ process: order.FundX ? \"InOutFunds\" : \"Order\" }).then((resp) => {\r\n this._isMounted &&\r\n this.setState({\r\n validations: resp.response.validations.reduce((obj, v) => {\r\n obj[v.ValidationProgram] = v;\r\n return obj;\r\n }, {}),\r\n });\r\n\r\n if (order.AssetClassForm == ProductType.OPTION) {\r\n order.AssetTicker = getOptionsTickerFromFields(order);\r\n //An Asset should be created in backend\r\n order.AssetId = \"\";\r\n }\r\n\r\n getTotalsAndEarnings({ order })\r\n .then((resp) => ({ order: resp.response.order, additionalProps: resp.response.additionalProps }))\r\n .then(({ order, additionalProps }) => {\r\n dispatch({\r\n type: \"UPDATE_PRECHECK\",\r\n fields: { order },\r\n });\r\n if (this._isMounted) {\r\n this.setState({ loadingTotals: false, additionalProps });\r\n this.validateRules();\r\n }\r\n });\r\n });\r\n }\r\n\r\n componentWillUpdate(nextProps) {\r\n const { AccountId } = nextProps.order.CurrentAccount;\r\n\r\n if (this.props.order.CurrentAccount.AccountId != AccountId) {\r\n this.setState(\r\n {\r\n validations: null,\r\n status: null,\r\n loadingTotals: true,\r\n },\r\n () => {\r\n this.componentDidMount();\r\n }\r\n );\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n this._isMounted = false;\r\n }\r\n\r\n validateRules = () => {\r\n const { validations } = this.state;\r\n\r\n this.setState({ waitingCounter: Object.keys(validations).length });\r\n\r\n Object.values(validations).forEach((validation) => {\r\n const service = validation.ValidationProgram;\r\n const { actions, order } = this.props;\r\n\r\n actions.validateRule({ service, order, validation }).then((resp) => {\r\n const { result } = resp.response.validation;\r\n const { history } = resp.response;\r\n\r\n let status = \"success\";\r\n let title;\r\n\r\n if (result.Code !== 200) {\r\n if (validation.OverrridableByAuthorization !== \"0\") {\r\n title = result.Description != \"\" ? result.Description : null;\r\n this.checkIfCanBeAuthorized(validation, title);\r\n return;\r\n } else {\r\n status = \"failed\";\r\n title = result.Description != \"\" ? result.Description : null;\r\n }\r\n }\r\n\r\n this.updateValidationStatus(\r\n {\r\n ...validation,\r\n history,\r\n },\r\n status,\r\n title\r\n );\r\n });\r\n });\r\n };\r\n\r\n updateValidationStatus = (validation, vStatus, title) => {\r\n const { validations, waitingCounter, status } = this.state;\r\n const { dispatch } = this.props;\r\n\r\n let globalStatus = status == \"failed\" ? status : vStatus;\r\n\r\n // Si fue la ultima validacion y no fallo\r\n if (globalStatus != \"failed\" && waitingCounter == 1) {\r\n globalStatus = \"completed\";\r\n }\r\n\r\n const _validations = {\r\n ...validations,\r\n [validation.ValidationProgram]: {\r\n ...validations[validation.ValidationProgram],\r\n status: vStatus,\r\n history: validation.history,\r\n title,\r\n },\r\n };\r\n\r\n if (waitingCounter == 1) {\r\n dispatch({\r\n type: \"UPDATE_PRECHECK\",\r\n fields: {\r\n histories: Object.values(_validations)\r\n .filter((v) => v.history != undefined)\r\n .map((v) => v.history),\r\n\r\n validations: _validations,\r\n status: globalStatus,\r\n },\r\n });\r\n\r\n dispatch({ type: \"CHANGE_MODE\", mode: Mode.CONFIRM });\r\n }\r\n this._isMounted &&\r\n this.setState({\r\n validations: _validations,\r\n status: globalStatus,\r\n waitingCounter: waitingCounter - 1,\r\n });\r\n };\r\n\r\n checkIfCanBeAuthorized = (validation, title) => {\r\n const { actions, dispatch, order } = this.props;\r\n const { checkAuth } = actions;\r\n\r\n const definitionId = validation.OverrridableByAuthorization;\r\n\r\n checkAuth({ definitionId, order }).then((resp) => {\r\n const authorization = resp.response.authorizationsdt;\r\n const { precheck } = this.props;\r\n\r\n let status;\r\n\r\n if (authorization.canbeauthorized) {\r\n // basket order no allow authorizations\r\n if (order.OrderHierarchy != Type.Default) {\r\n status = \"failed\";\r\n } else {\r\n status = \"authorization\";\r\n\r\n dispatch({\r\n type: \"UPDATE_PRECHECK\",\r\n fields: {\r\n authorizations: [\r\n ...precheck.authorizations,\r\n { ...authorization, name: validation.ValidationName, description: title },\r\n ],\r\n },\r\n });\r\n }\r\n } else {\r\n status = \"failed\";\r\n }\r\n\r\n this.updateValidationStatus(validation, status, title);\r\n });\r\n };\r\n\r\n updateAuthorizationMessage = (name, text) => {\r\n const { dispatch, precheck } = this.props;\r\n\r\n const authorizations = precheck.authorizations.map((a) => {\r\n if (a.name === name) {\r\n return {\r\n ...a,\r\n text,\r\n error: undefined,\r\n readonly: undefined,\r\n };\r\n }\r\n return a;\r\n });\r\n\r\n dispatch({\r\n type: \"UPDATE_PRECHECK\",\r\n fields: {\r\n authorizations,\r\n },\r\n });\r\n };\r\n\r\n render() {\r\n const { order, precheck } = this.props;\r\n const { validations, status, waitingCounter, loadingTotals, additionalProps } = this.state;\r\n\r\n return (\r\n
    \r\n {order.OrderHasMultipleAccounts && }\r\n {loadingTotals ? (\r\n \r\n ) : (\r\n \r\n )}\r\n\r\n {validations == null ? (\r\n \r\n ) : (\r\n
    \r\n

    Validations

    \r\n {Object.values(validations).map((v, index) => (\r\n \r\n ))}\r\n
    \r\n )}\r\n\r\n {status != null ? (\r\n status == \"failed\" ? (\r\n \r\n ) : (\r\n precheck.authorizations.length > 0 &&\r\n waitingCounter == 0 && (\r\n \r\n

    Authorizations

    \r\n
    \r\n {precheck.authorizations.map((a, index) => (\r\n \r\n ))}\r\n
    \r\n
    \r\n )\r\n )\r\n ) : null}\r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst AccountDetail = ({ AccountName, AccountNumber }) => {\r\n return (\r\n
    \r\n Prechecking account\r\n \r\n {AccountNumber}\r\n {\" - \"}\r\n {AccountName}\r\n \r\n
    \r\n );\r\n};\r\n\r\nconst NoPassConditions = ({ hierarchy }) => (\r\n \r\n
    \r\n \r\n {hierarchy !== Type.Default\r\n ? `Order declined by system. (${hierarchy} order not allow authorizations)`\r\n : \"Order declined by system.\"}\r\n \r\n
    \r\n);\r\n\r\nexport const LoadingMessage = ({ text, ...props }) => (\r\n
    \r\n \r\n {text}\r\n
    \r\n);\r\n\r\nexport default Precheck;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"precheck\":\"Precheck-module_precheck_35KLp\",\"alert\":\"Precheck-module_alert_1hE4M\",\"details\":\"Precheck-module_details_2wngw\",\"totals\":\"Precheck-module_totals_2wYyl\",\"earnings\":\"Precheck-module_earnings_3T0Cd\",\"bold\":\"Precheck-module_bold_1A9jf\",\"loadingMessage\":\"Precheck-module_loadingMessage_3ENge\",\"validations\":\"Precheck-module_validations_3raIL\",\"validation\":\"Precheck-module_validation_-KGAM\",\"authorizations\":\"Precheck-module_authorizations_2WUl3\",\"authorization\":\"Precheck-module_authorization_34TJM\",\"account\":\"Precheck-module_account_3exIT\"};","import React, { Component } from \"react\";\r\nimport { CircularProgress } from \"../../..\";\r\nimport { Alert } from \"reactstrap\";\r\nimport style from \"./Precheck.module.scss\";\r\n\r\nclass Validation extends Component {\r\n render() {\r\n const { validation } = this.props;\r\n\r\n return (\r\n
    \r\n
    \r\n

    {validation.ValidationName}

    \r\n\r\n {validation.status ? (\r\n \r\n {\" \"}\r\n \r\n \r\n ) : (\r\n \r\n )}\r\n
    \r\n {validation.title && (\r\n \r\n {validation.title}\r\n \r\n )}\r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst getAlertColor = (status) => {\r\n switch (status) {\r\n case \"success\":\r\n return \"success\";\r\n case \"failed\":\r\n return \"danger\";\r\n case \"authorization\":\r\n return \"warning\";\r\n }\r\n};\r\n\r\nconst getIconName = (status) => {\r\n switch (status) {\r\n case \"success\":\r\n return \"icon-check\";\r\n case \"failed\":\r\n return \"icon-close\";\r\n case \"authorization\":\r\n return \"icon-exclamation\";\r\n }\r\n};\r\n\r\nexport default Validation;\r\n","import { formProps } from \"./../../Order/Form\";\r\nimport {\r\n Mode,\r\n ProductType,\r\n Type,\r\n OrderPriceType,\r\n TimeFrame,\r\n CommissionType,\r\n} from \"../../../../utils/Order/Order\";\r\nimport { mergeDeep, UserType, toDateLocal } from \"./../../../../utils/Helper\";\r\nimport { defaultState } from \"./store\";\r\n\r\nexport const orderReducer = (state, action) => {\r\n switch (action.type) {\r\n case \"CHANGE_FORM\":\r\n return changeForm(state, action);\r\n\r\n case \"CHANGE_ORDER_FIELDS\":\r\n return processChangeOrderFields(state, action.fields);\r\n\r\n case \"CHANGE_ORDER_ACCOUNT_FIELDS\":\r\n return processChangeOrderAccountFields(state, action.fields);\r\n\r\n case \"FETCH_ASSET_INFO\":\r\n return processAssetInfo(state, action.data);\r\n\r\n case \"FETCH_ACCOUNT_INFO\":\r\n return processAccountInfo(state, action.items, action.updateOrderValues);\r\n\r\n case \"CHANGE_MODE\":\r\n switch (action.mode) {\r\n case Mode.EDIT:\r\n return processEdit(state);\r\n case Mode.PRECHECK:\r\n return processPrecheck(state);\r\n case Mode.CONFIRM:\r\n return processConfirm(state);\r\n case Mode.EXECUTE:\r\n return processExecute(state, action.id);\r\n\r\n default:\r\n return state;\r\n }\r\n\r\n case \"FORCE_UPDATE_VALIDATION\":\r\n return forceUpdateValidation(state, action);\r\n\r\n case \"UPDATE_PRECHECK\":\r\n return updatePrecheck(state, action.fields);\r\n\r\n case \"CHANGE_BUTTON_PROPS\":\r\n return changeButtonProps(state, action);\r\n\r\n case \"EDIT_ACCOUNT\":\r\n return editAccount(state, action);\r\n\r\n case \"SET_ATTACHMENT\":\r\n return setAttachment(state, action.payload);\r\n\r\n case \"DELETE_ACCOUNT\":\r\n return deleteAccount(state, action);\r\n\r\n case \"SELECT_ACCOUNT\":\r\n return selectAccount(state, action);\r\n\r\n case \"WIZZ_NEXT_STEP\":\r\n return wizzNextStep(state);\r\n\r\n case \"WIZZ_STEP_BACK\":\r\n return wizzStepBack(state);\r\n\r\n default:\r\n return state;\r\n }\r\n};\r\n\r\nconst changeForm = (state, { newForm }) => {\r\n // from trader can add basket order with empty accounts, when change form retain account setted\r\n const { OrderHierarchy, OrderIsBasket, OrderHasMultipleAccounts } = state.order;\r\n\r\n return {\r\n ...state,\r\n order: {\r\n ...formProps[newForm].defaults(),\r\n AssetClassForm: newForm,\r\n OrderHierarchy,\r\n OrderIsBasket,\r\n OrderHasMultipleAccounts,\r\n OrderSide: state.order.OrderSide || \"Buy\",\r\n OrderInitDate: new Date().toDateLocal(),\r\n OrderType: OrderPriceType.MARKET,\r\n offer: {},\r\n offerLoaded: {},\r\n OrderTimeInForce: TimeFrame.GTC,\r\n OrderGTD: toDateLocal(new Date()),\r\n OrderQuantity: state.order.OrderQuantity,\r\n CurrentAccount: state.order.CurrentAccount\r\n ? {\r\n ...state.order.CurrentAccount,\r\n Precheck: {},\r\n }\r\n : {},\r\n Accounts: state.order.Accounts\r\n ? state.order.Accounts.map((account) => ({\r\n ...account,\r\n Precheck: {},\r\n }))\r\n : [],\r\n },\r\n entities: {\r\n settlementCurrencies: null,\r\n },\r\n fields: {\r\n ...state.fields,\r\n hiddens: {\r\n ...state.fields.hiddens,\r\n RequiresSpecialCustody: true,\r\n },\r\n },\r\n };\r\n};\r\n\r\nconst changeButtonProps = (state, { props }) => {\r\n return mergeDeep({ ...state }, { buttons: { ...props } });\r\n};\r\n\r\nconst forceUpdateValidation = (state, { errors }) => {\r\n return {\r\n ...state,\r\n fields: {\r\n ...state.fields,\r\n errors,\r\n },\r\n };\r\n};\r\n\r\nconst processChangeOrderFields = (state, fields) => {\r\n const errors = Object.keys(fields).reduce((o, name) => {\r\n o[name] = undefined;\r\n return o;\r\n }, {});\r\n\r\n const entities = {};\r\n\r\n if (fields.hasOwnProperty(\"AssetId\") && !fields.AssetId) {\r\n entities.settlementCurrencies = null;\r\n fields.OrderSettlementCurrencyId = null;\r\n fields.OrderSettlementCurrencySymbol = null;\r\n }\r\n\r\n if (state.order.AssetClassForm != ProductType.FOREX && state.order.AssetClassForm != ProductType.REPO) {\r\n if (fields.hasOwnProperty(\"OrderSettlementCurrencyId\") && fields.OrderSettlementCurrencyId) {\r\n const filteredCurrencies = state.entities.settlementCurrencies.filter(\r\n (c) => c.id == fields.OrderSettlementCurrencyId\r\n );\r\n if (filteredCurrencies.length > 0) {\r\n const newCurrency = filteredCurrencies[0];\r\n fields.OrderSettlementCurrencySymbol = newCurrency.description;\r\n }\r\n }\r\n }\r\n\r\n if (fields.hasOwnProperty(\"OrderType\")) {\r\n let moo = false;\r\n if (fields.OrderType == OrderPriceType.MARKETONOPEN) {\r\n fields.OrderTimeInForce = \"OPG\";\r\n moo = true;\r\n } else if (fields.OrderType == OrderPriceType.MARKETONCLOSE) {\r\n fields.OrderTimeInForce = TimeFrame.DAY;\r\n moo = true;\r\n } else {\r\n fields.OrderTimeInForce = TimeFrame.GTC;\r\n }\r\n\r\n if (moo)\r\n fields.readonly = {\r\n OrderTimeInForce: true,\r\n };\r\n else if (state.ui.mode != Mode.READONLY)\r\n fields.readonly = {\r\n OrderTimeInForce: false,\r\n };\r\n }\r\n\r\n return {\r\n ...state,\r\n order: {\r\n ...state.order,\r\n ...fields,\r\n },\r\n fields: {\r\n ...state.fields,\r\n errors: {\r\n ...state.fields.errors,\r\n ...errors,\r\n },\r\n readonly: {\r\n ...state.fields.readonly,\r\n ...fields.readonly,\r\n },\r\n },\r\n entities: {\r\n ...state.entities,\r\n ...entities,\r\n },\r\n };\r\n};\r\n\r\nconst processChangeOrderAccountFields = (state, fields) => {\r\n const errors = Object.keys(fields).reduce((o, name) => {\r\n o[name] = undefined;\r\n return o;\r\n }, {});\r\n\r\n const { order } = state;\r\n const { CurrentAccount, Accounts } = order;\r\n const { index } = CurrentAccount;\r\n\r\n let modFields = fields;\r\n if (fields.hasOwnProperty(\"AccountId\")) {\r\n modFields = {\r\n ...modFields,\r\n AttachmentFileName: undefined,\r\n AttachmentFileType: undefined,\r\n HasFileUploadPending: undefined,\r\n AttachmentFileUploadPending: undefined,\r\n };\r\n setAttachment(state, {\r\n payload: { fileName: undefined, fileType: undefined, file: undefined, id: fields.AccountId },\r\n });\r\n }\r\n\r\n let orderFields = {};\r\n\r\n if (modFields.hasOwnProperty(\"Quantity\")) {\r\n // Update order total quantity\r\n orderFields.OrderQuantity = 0;\r\n if (index >= 0) {\r\n if (Accounts) {\r\n Accounts.forEach((account) => {\r\n if (account.index !== index) {\r\n orderFields.OrderQuantity += parseFloat(account.Quantity);\r\n }\r\n });\r\n }\r\n }\r\n orderFields.OrderQuantity += modFields.Quantity;\r\n }\r\n\r\n if (modFields.hasOwnProperty(\"AttachmentFileName\")) {\r\n if (modFields.AttachmentFileName === \"\" || modFields.AttachmentFileName === undefined) {\r\n modFields.HasFile = false;\r\n modFields.HasFileUploadPending = false;\r\n } else {\r\n modFields.HasFileUploadPending = true;\r\n }\r\n }\r\n\r\n // Full liquidation option\r\n if (modFields.hasOwnProperty(\"IsFullLiquidation\")) {\r\n // This option is valid only on single account orders.\r\n if (modFields.IsFullLiquidation) {\r\n orderFields.OrderQuantityIsCash = false;\r\n modFields.Quantity = CurrentAccount.AccountAssetBalance || 0;\r\n orderFields.OrderQuantity = modFields.Quantity;\r\n }\r\n }\r\n if (modFields.hasOwnProperty(\"AccountAssetBalance\")) {\r\n if (CurrentAccount.IsFullLiquidation) {\r\n // This option is valid only on single account orders.\r\n modFields.Quantity = modFields.AccountAssetBalance;\r\n orderFields.OrderQuantity = modFields.Quantity;\r\n }\r\n }\r\n if (fields.hasOwnProperty(\"AccountId\")) {\r\n if (modFields.AttachmentFileType) {\r\n modFields.HasFile = true;\r\n modFields.HasFileUploadPending = true;\r\n errors.Instruction = undefined;\r\n } else {\r\n modFields.HasFile = false;\r\n modFields.HasFileUploadPending = false;\r\n errors.Instruction = undefined;\r\n }\r\n }\r\n\r\n if (modFields.hasOwnProperty(\"AccountUseMarkUP\")) {\r\n if (modFields.AccountUseMarkUP === false) {\r\n modFields.Markup = 0;\r\n modFields.FXMarkup = 0;\r\n }\r\n }\r\n\r\n return {\r\n ...state,\r\n order: {\r\n ...state.order,\r\n ...orderFields,\r\n CurrentAccount: {\r\n ...state.order.CurrentAccount,\r\n ...modFields,\r\n },\r\n },\r\n fields: {\r\n ...state.fields,\r\n errors: {\r\n ...state.fields.errors,\r\n ...errors,\r\n },\r\n },\r\n };\r\n};\r\n\r\nconst processConfirm_basket = (state) => {\r\n const { precheck, order } = state;\r\n\r\n let modifyLabel = \"Add Another account\";\r\n let precheckFailed = false;\r\n let modeBskt = Mode.PRECHECK;\r\n\r\n if (precheck.status == \"failed\") {\r\n precheckFailed = true;\r\n modifyLabel = \"Modify\";\r\n }\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n mode: Mode.PRECHECK,\r\n },\r\n order: {\r\n Accounts: order.Accounts.map((acc) => {\r\n if (acc.index == order.CurrentAccount.index) {\r\n return { ...acc, delete: precheckFailed };\r\n }\r\n return acc;\r\n }),\r\n CurrentAccount: {\r\n delete: precheckFailed,\r\n },\r\n },\r\n buttons: {\r\n confirm: {\r\n visible: precheck.status != \"failed\",\r\n label: \"Confirm\",\r\n },\r\n modify: {\r\n visible: true,\r\n label: modifyLabel,\r\n loading: false,\r\n },\r\n save: {\r\n visible: false,\r\n },\r\n },\r\n }\r\n );\r\n};\r\n\r\nconst processConfirm_bulk = (state) => {\r\n const { precheck, order } = state;\r\n\r\n let modifyLabel = \"Add another account\";\r\n let precheckFailed = false;\r\n\r\n if (precheck.status == \"failed\") {\r\n precheckFailed = true;\r\n modifyLabel = \"Modify\";\r\n }\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n mode: Mode.PRECHECK,\r\n },\r\n order: {\r\n Accounts: order.Accounts.map((acc) => {\r\n if (acc.index == order.CurrentAccount.index) {\r\n return { ...acc, delete: precheckFailed };\r\n }\r\n return acc;\r\n }),\r\n CurrentAccount: {\r\n delete: precheckFailed,\r\n },\r\n },\r\n buttons: {\r\n confirm: {\r\n visible: precheck.status != \"failed\",\r\n label: \"Confirm\",\r\n },\r\n modify: {\r\n visible: true,\r\n label: modifyLabel,\r\n },\r\n save: {\r\n visible: false,\r\n },\r\n },\r\n }\r\n );\r\n};\r\n\r\nconst processConfirm = (state) => {\r\n const { ui } = state;\r\n\r\n if (ui.isBasket) {\r\n return processConfirm_basket(state);\r\n }\r\n\r\n if (ui.isBulk) {\r\n return processConfirm_bulk(state);\r\n }\r\n\r\n let confirmLabel = \"Confirm\";\r\n\r\n if (\r\n Object.keys(state.precheck.authorizations).length !== 0 &&\r\n state.precheck.authorizations.filter((auth) => auth.role == \"SELF\").length !== 0\r\n ) {\r\n confirmLabel = \"Authorize and Confirm\";\r\n }\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n mode: Mode.CONFIRM,\r\n },\r\n buttons: {\r\n confirm: {\r\n visible: state.precheck.status != \"failed\",\r\n label: confirmLabel,\r\n },\r\n modify: { visible: true },\r\n },\r\n wizzard: {\r\n nextBtn: {\r\n ...state.wizzard.nextBtn,\r\n visible: state.precheck.status != \"failed\",\r\n },\r\n },\r\n }\r\n );\r\n};\r\n\r\nconst processPrecheck = (state) => {\r\n let errors = validateForm(state);\r\n const order = {};\r\n\r\n // check if order instruction is written and the file was uploaded\r\n const { AttachmentFileType, Instruction } = state.order.CurrentAccount;\r\n if (Instruction === \"Written\" && (AttachmentFileType == \"\" || !AttachmentFileType)) {\r\n if (errors === false) {\r\n errors = {};\r\n }\r\n errors.Instruction = \"Attachment required\";\r\n }\r\n\r\n if (errors === false) {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n mode: Mode.PRECHECK,\r\n },\r\n buttons: {\r\n save: { visible: false },\r\n precheck: { visible: false },\r\n confirm: { visible: false },\r\n },\r\n fields: {\r\n errors,\r\n },\r\n order,\r\n }\r\n );\r\n } else {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n fields: {\r\n errors,\r\n },\r\n }\r\n );\r\n }\r\n};\r\n\r\nconst processExecute = (state, orderId) => {\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n mode: Mode.EXECUTE,\r\n },\r\n buttons: {\r\n save: { visible: false },\r\n precheck: { visible: false },\r\n confirm: { visible: false },\r\n modify: { visible: false },\r\n },\r\n order: {\r\n OrderId: orderId,\r\n },\r\n }\r\n );\r\n};\r\n\r\nconst processAccountInfo = (state, _items, updateOrderValues) => {\r\n const { ui, order, initFetchs } = state;\r\n const { CurrentAccount, AssetClassForm } = order;\r\n const items = _items.reduce((obj, item) => {\r\n obj[item.key] = item.value;\r\n return obj;\r\n }, {});\r\n\r\n const commissionDisabled = items[\"CommissionEnabled\"] == \"false\" ? \"HRO\" : undefined;\r\n const markupHidden = items[\"MarkupVisible\"] == \"false\" ? true : undefined;\r\n const FXMarkupAllowed = items[\"FXMarkupAllowed\"] == \"false\" ? false : true;\r\n const custodyHidden = items[\"AsksCustody\"] == \"false\" ? true : undefined;\r\n\r\n let commissionType = CurrentAccount.CommissionType;\r\n let commissionValue = CurrentAccount.Commission;\r\n let advice = CurrentAccount.Advice;\r\n\r\n let markupType = CurrentAccount.MarkupType;\r\n let markupValue = CurrentAccount.Markup;\r\n\r\n let FXMarkupType = CurrentAccount.FXMarkupType;\r\n let FXMarkupValue = CurrentAccount.FXMarkup;\r\n\r\n let currentInfoDate = CurrentAccount.CurrentInfoDate;\r\n\r\n const accountIsInOrder =\r\n order.Accounts && order.Accounts.find((acc) => acc.index == CurrentAccount.index) != undefined;\r\n const isMultiaccount = order.OrderHasMultipleAccounts;\r\n\r\n if (order.OrderId == undefined || initFetchs.accountInfo || (isMultiaccount && !accountIsInOrder)) {\r\n if (updateOrderValues) {\r\n markupValue = 0;\r\n markupType = CommissionType.FaceValueCash;\r\n FXMarkupValue = 0;\r\n FXMarkupType = CommissionType.FaceValueCash;\r\n if (order.OrderId == undefined) {\r\n currentInfoDate = new Date().toDateLocal();\r\n }\r\n\r\n if (commissionType == undefined) {\r\n commissionType = CommissionType.PrincipalPercentage;\r\n }\r\n if (advice == undefined) {\r\n advice = false;\r\n }\r\n\r\n if (commissionValue == undefined) {\r\n commissionValue = 0;\r\n }\r\n\r\n if ([ProductType.FOREX].indexOf(AssetClassForm) >= 0) {\r\n commissionValue = 0;\r\n } else {\r\n if (items[\"CommissionType\"]) {\r\n commissionType = items[\"CommissionType\"];\r\n }\r\n\r\n if (items[\"CommissionValue\"]) {\r\n commissionValue = +items[\"CommissionValue\"];\r\n }\r\n }\r\n }\r\n }\r\n\r\n const nextState = mergeDeep(\r\n { ...state },\r\n {\r\n order: {\r\n CurrentAccount: {\r\n Commission: commissionValue,\r\n CommissionType: commissionType,\r\n Markup: markupValue,\r\n MarkupType: markupType,\r\n FXMarkup: FXMarkupValue,\r\n FXMarkupType,\r\n CurrentInfoDate: currentInfoDate,\r\n Advice: advice,\r\n },\r\n },\r\n precheck: {\r\n FXMarkupAllowed: FXMarkupAllowed,\r\n },\r\n fields: {\r\n readonly: {\r\n FXMarkupAllowed: FXMarkupAllowed,\r\n Commission: ui.mode == Mode.READONLY || commissionDisabled,\r\n CommissionType: ui.mode == Mode.READONLY || commissionDisabled,\r\n },\r\n hiddens: {\r\n MarkupType: markupHidden,\r\n Markup: markupHidden,\r\n RequiresSpecialCustody: state.fields.hiddens.RequiresSpecialCustody || custodyHidden,\r\n },\r\n },\r\n initFetchs: {\r\n accountInfo: true,\r\n },\r\n }\r\n );\r\n\r\n if (ui.mode == Mode.EDIT_COMMISSION) {\r\n if (!(commissionDisabled && markupHidden)) {\r\n nextState.buttons.confirm.visible = true;\r\n\r\n if (nextState.wizzard.enabled) {\r\n nextState.wizzard.nextBtn.visible = true;\r\n }\r\n }\r\n }\r\n\r\n return nextState;\r\n};\r\n\r\nconst processAssetInfo = (state, data) => {\r\n const { order } = state;\r\n let itemsDict = {};\r\n data.items.forEach((item) => {\r\n itemsDict[item.key] = item.value;\r\n });\r\n\r\n let defaultSettlementCurrency = {};\r\n let availableSettlementCurrencies = [];\r\n\r\n const settlementCurrencies = data.settlementCurrency.map((c) => {\r\n const { currencyInfo, multiplies, fx } = c;\r\n availableSettlementCurrencies.push(c.currencyInfo.currencyId);\r\n if (currencyInfo.CurrencyIsDefault) {\r\n defaultSettlementCurrency = {\r\n id: currencyInfo.currencyId,\r\n name: currencyInfo.currencyISO,\r\n };\r\n }\r\n return {\r\n id: currencyInfo.currencyId,\r\n description: currencyInfo.currencyISO,\r\n multiplies,\r\n fx,\r\n };\r\n });\r\n\r\n const orderPropsUpd = {};\r\n const errors = {};\r\n orderPropsUpd.FundX = data.items.some((item) => item.key == \"FundX\");\r\n if (order.AssetClassForm != ProductType.FOREX) {\r\n if (\r\n !order.OrderSettlementCurrencyId ||\r\n !availableSettlementCurrencies.includes(order.OrderSettlementCurrencyId.toString())\r\n ) {\r\n orderPropsUpd.OrderSettlementCurrencyId = defaultSettlementCurrency.id;\r\n orderPropsUpd.OrderSettlementCurrencySymbol = defaultSettlementCurrency.name;\r\n errors.OrderSettlementCurrencySymbol = undefined;\r\n }\r\n\r\n order.OrderCurrencySymbol = itemsDict.Currency;\r\n order.AssetFundType = itemsDict[\"Fund Type\"] || \"\";\r\n order.AssetCanBeSelfCustodied = data.custody;\r\n }\r\n\r\n order.SubAssetClassDecimalPlaces = parseInt(itemsDict.MaxDecimals, 10);\r\n\r\n order.AssetPriceIsDiscounted = false;\r\n if (itemsDict.AssetPriceIsDiscounted !== undefined) {\r\n order.AssetPriceIsDiscounted = itemsDict.AssetPriceIsDiscounted.toLowerCase() === \"true\";\r\n }\r\n\r\n let saveVisible = false;\r\n if (order.OrderIsBasket === false) {\r\n saveVisible = true;\r\n }\r\n\r\n let refPrice = 0;\r\n if (itemsDict[\"Ref Price Default\"]) {\r\n refPrice = +itemsDict[\"Ref Price Default\"];\r\n }\r\n\r\n return mergeDeep(\r\n { ...state },\r\n {\r\n order: {\r\n ...orderPropsUpd,\r\n AssetRefPrice: refPrice,\r\n },\r\n fields: {\r\n errors: {\r\n ...errors,\r\n },\r\n },\r\n entities: {\r\n settlementCurrencies,\r\n },\r\n buttons: {\r\n save: {\r\n visible: saveVisible,\r\n },\r\n },\r\n }\r\n );\r\n};\r\n\r\nconst processEdit = (state) => {\r\n const multiAccount = state.ui.isBasket || state.ui.isBulk;\r\n\r\n let merge = mergeDeep(\r\n { ...state },\r\n {\r\n ui: {\r\n mode: Mode.EDIT,\r\n },\r\n buttons: {\r\n modify: { visible: false },\r\n precheck: { visible: !multiAccount, label: \"Precheck\" },\r\n confirm: { visible: multiAccount },\r\n save: {\r\n visible: state.ui.userRole == UserType.Advisor && !multiAccount && !state.precheck.validations,\r\n },\r\n },\r\n precheck: {\r\n authorizations: [],\r\n validations: null,\r\n histories: [],\r\n status: undefined,\r\n },\r\n }\r\n );\r\n\r\n if (multiAccount) {\r\n let editAccount = { AccountId: null };\r\n if (state.precheck.status == \"failed\") {\r\n editAccount = state.order.CurrentAccount;\r\n editAccount.delete = true;\r\n }\r\n merge.order.CurrentAccount = editAccount;\r\n }\r\n\r\n return merge;\r\n};\r\n\r\nconst validateForm = (state, isSaveAction = false) => {\r\n const { ui, order, fields } = state;\r\n const { hiddens, readonly } = fields;\r\n const { validation } = formProps[order.AssetClassForm];\r\n\r\n const errors = {};\r\n\r\n Object.entries(validation(order, ui.userRole)).forEach(([name, value]) => {\r\n if (!hiddens[name] && !readonly[name]) {\r\n if (value.exceedPartialRedemption){\r\n errors[name] = \"Selected quantity exceeds \" + order.OrderAssetData.items['Max Partial Redemption Percentage'] + \"% of current account's asset position, must select Full Liquidation to continue\"\r\n }\r\n else if (value.noBankAccountSelected){\r\n errors[name] = \"No bank account selected\";\r\n }\r\n else if (value.empty) {\r\n // Verify if value should be controlled for emptyness\r\n\r\n if (value.accountLevel) {\r\n // Value should be controlled in order accounts.\r\n if (order.OrderHasMultipleAccounts) {\r\n if (order.Accounts && order.Accounts.length > 0) {\r\n // View Accounts list\r\n order.Accounts.forEach((account) => {\r\n if (account.AccountId != 0) {\r\n if (account[name] == undefined || account[name] === \"\") {\r\n errors[name] = \"Required field\";\r\n } else if (value.autosuggestId && account[value.autosuggestId] == undefined) {\r\n errors[name] = \"Must select a value from list\";\r\n }\r\n }\r\n });\r\n }\r\n } else {\r\n // View CurrentAccount\r\n\r\n //The validation of the instructions is only for the precheck, not for the save.\r\n if (!isSaveAction) {\r\n if (order.CurrentAccount.Instruction == \"Written\") {\r\n if (\r\n order.CurrentAccount.AttachmentFileType == undefined ||\r\n order.CurrentAccount.AttachmentFileType === \"\"\r\n ) {\r\n errors[\"Instruction\"] = \"Required field\";\r\n }\r\n }\r\n }\r\n\r\n if (order.CurrentAccount[name] == undefined || order.CurrentAccount[name] === \"\") {\r\n errors[name] = \"Required field\";\r\n } else if (value.autosuggestId && order.CurrentAccount[value.autosuggestId] == undefined) {\r\n errors[name] = \"Must select a value from list\";\r\n }\r\n }\r\n } else {\r\n if (order[name] == undefined || order[name] === \"\") {\r\n errors[name] = \"Required field\";\r\n } else if (value.autosuggestId && order[value.autosuggestId] == undefined) {\r\n errors[name] = \"Must select a value from list\";\r\n }\r\n }\r\n }\r\n }\r\n });\r\n\r\n if (ui.userRole != UserType.Trader && ui.isBulk) {\r\n if (order.Accounts == undefined || order.Accounts.length == 0) {\r\n errors[\"Accounts\"] = \"Require an account\";\r\n }\r\n }\r\n\r\n if (ui.mode == Mode.REALLOCATE) {\r\n if (order.CurrentAccount.AccountId == order.CurrentAccountId) {\r\n errors[\"AccountName\"] = \"Must be different from the order being reallocated\";\r\n }\r\n }\r\n\r\n if (ui.type == Type.Cross) {\r\n // if second order form, check quantity over or equal than first order\r\n if (state.wizzard.enabled && state.wizzard.activeStep == 2) {\r\n if (!errors.OrderQuantity) {\r\n if (+state.wizzard.steps[0].context.order.OrderQuantity > +order.OrderQuantity) {\r\n errors[\r\n \"OrderQuantity\"\r\n ] = `Must be equal or grather than ${state.wizzard.steps[0].context.order.OrderQuantity}`;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (order.OrderIsBasket && order.offer && !order.offer.disabled) {\r\n if (\r\n order.offer &&\r\n !order.offer.disabled &&\r\n order.OrderType === OrderPriceType.MARKET &&\r\n +order.AssetRefPrice === 0\r\n ) {\r\n errors[\"AssetRefPrice\"] = \"Asset reference price cannot be 0\";\r\n }\r\n\r\n if (isNaN(+order.offer.OfferQuantitytoAdvisor) || isNaN(+order.offer.OfferQuantitytoAdvisor)) {\r\n errors[\"Accounts\"] = \"All offered quantities required\";\r\n } else if (+order.offer.OfferQuantitytoAdvisor === 0 && +order.offer.OfferQuantitytoClient === 0) {\r\n errors[\"Accounts\"] = \"Total offered quantity cannot be 0\";\r\n }\r\n }\r\n\r\n // has Errors only add errors to state\r\n if (Object.keys(errors).length !== 0) {\r\n return errors;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nconst updatePrecheck = (state, props) => {\r\n const newProps = {};\r\n\r\n if (props.order) {\r\n const { order } = props;\r\n const { OrderChainOffsetCash, OrderChainOffsetCurrencyId, AssetId } = order;\r\n\r\n newProps.order = {\r\n OrderChainOffsetCash,\r\n OrderChainOffsetCurrencyId,\r\n CurrentAccount: {\r\n Precheck: order.CurrentAccount.Precheck,\r\n },\r\n AssetId,\r\n };\r\n\r\n newProps.precheck = order.CurrentAccount.Precheck;\r\n } else {\r\n newProps.precheck = {\r\n ...props,\r\n };\r\n }\r\n return mergeDeep({ ...state }, { ...newProps });\r\n};\r\n\r\nconst editAccount = (state, { props }) => {\r\n const { Accounts } = state.order;\r\n const { index } = props.account;\r\n const others = {};\r\n const errors = {};\r\n const order = {};\r\n\r\n const { account } = props;\r\n\r\n if (props.type == Type.Basket || props.type == Type.Bulk) {\r\n others.ui = {\r\n mode: Mode.PRECHECK,\r\n };\r\n\r\n others.buttons = {\r\n save: { visible: false },\r\n precheck: { visible: false },\r\n confirm: { visible: false },\r\n };\r\n\r\n //update errors\r\n errors.Accounts = undefined;\r\n errors.OrderQuantity = undefined;\r\n\r\n others.fields = { errors };\r\n\r\n account.pendingServerUpdate = true;\r\n }\r\n\r\n let newState = mergeDeep(\r\n { ...state },\r\n {\r\n ...others,\r\n }\r\n );\r\n\r\n if (props.type == Type.Basket || props.type == Type.Bulk) {\r\n newState.order.Accounts = Accounts || [];\r\n if (index >= 0) {\r\n newState.order.Accounts = newState.order.Accounts.filter((acc) => acc.index !== index);\r\n }\r\n newState.order.Accounts.push(account);\r\n }\r\n\r\n newState.order.OrderQuantity = newState.order.Accounts.reduce((sum, a) => sum + parseFloat(a.Quantity), 0);\r\n\r\n newState.order.CurrentAccount = account;\r\n\r\n return newState;\r\n};\r\n\r\nconst deleteAccount = (state, { accountIndex }) => {\r\n const { Accounts } = state.order;\r\n\r\n let accountId = -1;\r\n if (accountIndex >= 0 && Accounts) {\r\n Accounts.find((acc) => {\r\n if (acc.index === accountIndex) {\r\n accountId = acc.AccountId;\r\n return true;\r\n }\r\n return false;\r\n });\r\n }\r\n\r\n const accountsUpd = Accounts.filter((acc) => acc.index !== accountIndex);\r\n const OrderQuantity = accountsUpd.reduce((sum, a) => sum + parseFloat(a.Quantity), 0);\r\n\r\n return {\r\n ...state,\r\n order: {\r\n ...state.order,\r\n Accounts: accountsUpd,\r\n OrderQuantity,\r\n CurrentAccount: {},\r\n },\r\n attachments: {\r\n ...state.attachments,\r\n [accountId]: undefined,\r\n },\r\n };\r\n};\r\n\r\nconst selectAccount = (state, { props }) => {\r\n const { Accounts } = state.order;\r\n const { accountIndex } = props;\r\n\r\n const nextIndex = Accounts ? Accounts.length : 0;\r\n\r\n let account;\r\n\r\n if (accountIndex >= 0 && Accounts) {\r\n account = Accounts.find((acc) => acc.index === accountIndex);\r\n }\r\n\r\n if (account === undefined) {\r\n account = {\r\n index: nextIndex,\r\n CommissionType: CommissionType.PrincipalPercentage,\r\n MarkupType: CommissionType.FaceValueCash,\r\n FXMarkupType: CommissionType.FaceValueCash,\r\n CurrentInfoDate: toDateLocal(new Date()),\r\n Advice: false,\r\n };\r\n }\r\n\r\n return {\r\n ...state,\r\n order: {\r\n ...state.order,\r\n CurrentAccount: account,\r\n },\r\n };\r\n};\r\n\r\nconst setAttachment = (state, { file, id }) => {\r\n return {\r\n ...state,\r\n attachments: {\r\n ...state.attachments,\r\n [id]: file,\r\n },\r\n order: {\r\n ...state.order,\r\n AttachmentFileUploadPending: true,\r\n },\r\n };\r\n};\r\n\r\nconst wizzStepBack = (state) => {\r\n const { wizzard, ...actualState } = state;\r\n const { activeStep } = state.wizzard;\r\n\r\n return {\r\n ...wizzard.steps[activeStep - 1].context,\r\n\r\n wizzard: {\r\n ...wizzard,\r\n activeStep: activeStep - 1,\r\n nextBtn: {\r\n visible: true,\r\n label: wizzard.steps[activeStep - 1].nextLabel,\r\n },\r\n steps: {\r\n ...wizzard.steps,\r\n [activeStep]: {\r\n ...wizzard.steps[activeStep],\r\n context: actualState,\r\n },\r\n },\r\n },\r\n };\r\n};\r\n\r\nconst wizzNextStep = (state) => {\r\n const { wizzard, ...oldState } = state;\r\n const nextBtn = {};\r\n\r\n let nextState;\r\n\r\n if (state.wizzard.activeStep == 0) {\r\n // perform precheck first order\r\n nextState = processPrecheck(state);\r\n nextBtn.visible = false;\r\n\r\n // precheck failed\r\n if (nextState.ui.mode != Mode.PRECHECK) {\r\n return nextState;\r\n }\r\n } else if (state.wizzard.activeStep == 1) {\r\n // perform prepare form for second order\r\n const { buttons, fields, order, initFetchs, precheck } = defaultState();\r\n\r\n let copyProps = {};\r\n let readonly = { ...fields.readonly };\r\n\r\n if (state.ui.type == Type.Chained) {\r\n const { precheck } = state;\r\n copyProps = copyChainedOrderPropsNextStep(wizzard.steps[0].context.order, precheck);\r\n readonly.AccountName = true;\r\n }\r\n\r\n if (state.ui.type == Type.Cross) {\r\n copyProps = copyCrossOrderPropsNextStep(wizzard.steps[0].context.order);\r\n }\r\n\r\n nextBtn.visible = true;\r\n\r\n if (wizzard.steps[2].context != null) {\r\n nextState = mergeFirstStepChangesToNextStep(state);\r\n } else {\r\n nextState = {\r\n ui: {\r\n ...state.ui,\r\n mode: Mode.EDIT,\r\n },\r\n buttons,\r\n fields: {\r\n ...fields,\r\n readonly,\r\n },\r\n order: {\r\n ...order,\r\n ...formProps[state.order.AssetClassForm].defaults(Type.Default),\r\n ...copyProps,\r\n },\r\n entities: {\r\n ...wizzard.steps[0].context.entities,\r\n },\r\n initFetchs,\r\n precheck,\r\n };\r\n }\r\n\r\n nextState.wizzard = { ...state.wizzard };\r\n\r\n if (nextState.order.OrderHierarchy == Type.Chained) {\r\n const readOnlyAssetForm = readonly.AssetClassForm || state.order.OrderIsSwitch;\r\n nextState.fields.readonly.OrderSide = true;\r\n nextState.fields.readonly.AssetClassForm = readOnlyAssetForm;\r\n nextState.fields.readonly.OrderIsSwitch = true;\r\n\r\n nextState.order.OrderSide = \"Buy\";\r\n nextState.order.OrderIsSwitch = state.order.OrderIsSwitch;\r\n nextState.order.OrderChainOffsetCash = state.order.OrderChainOffsetCash;\r\n nextState.order.OrderChainOffsetCurrencyId = state.order.OrderChainOffsetCurrencyId;\r\n nextState.entities = {\r\n settlementCurrencies: null,\r\n };\r\n }\r\n\r\n if (nextState.order.OrderHierarchy == Type.Cross) {\r\n nextState.fields.readonly.OrderType = true;\r\n nextState.fields.readonly.OrderSide = true;\r\n nextState.fields.readonly.AssetTicker = true;\r\n nextState.fields.readonly.AssetClassForm = true;\r\n nextState.order.OrderSide = state.order.OrderSide == \"Buy\" ? \"Sell\" : \"Buy\";\r\n }\r\n } else if (state.wizzard.activeStep == 2) {\r\n // perform precheck second order\r\n nextState = processPrecheck(state);\r\n\r\n // precheck failed\r\n if (nextState.ui.mode != Mode.PRECHECK) {\r\n return nextState;\r\n }\r\n }\r\n\r\n const nextStep = nextState.wizzard.activeStep + 1;\r\n\r\n nextState.wizzard = {\r\n ...wizzard,\r\n activeStep: nextStep,\r\n nextBtn: {\r\n label: wizzard.steps[nextStep].nextLabel,\r\n ...nextBtn,\r\n },\r\n\r\n steps: {\r\n ...wizzard.steps,\r\n [wizzard.activeStep]: {\r\n ...wizzard.steps[wizzard.activeStep],\r\n context: oldState,\r\n },\r\n },\r\n };\r\n\r\n nextState.ui.title = getTitle({ ui: state.ui, wizzard: nextState.wizzard });\r\n\r\n return nextState;\r\n};\r\n\r\nconst getTitle = ({ ui, wizzard }) => {\r\n let typeName = \"\";\r\n if (ui.isBulk) {\r\n typeName = \" Bulk\";\r\n } else if (ui.isBasket) {\r\n typeName = \" Basket\";\r\n }\r\n\r\n if (ui.mode == Mode.REALLOCATE) {\r\n return `Reallocate Order`;\r\n }\r\n\r\n if (ui.type == Type.Chained || ui.type == Type.Cross) {\r\n if (ui.mode == Mode.EDIT_COMMISSION) {\r\n return `Edit Order (from ${ui.type})`;\r\n } else if (wizzard.enabled && ui.mode != Mode.READONLY) {\r\n return wizzard.steps[wizzard.activeStep].title;\r\n } else {\r\n return `View Order (from ${ui.type})`;\r\n }\r\n }\r\n\r\n if (wizzard.enabled && ui.mode != Mode.READONLY) {\r\n return wizzard.steps[wizzard.activeStep].title;\r\n } else if (ui.mode != Mode.READONLY) {\r\n return `Edit${typeName} Order`;\r\n } else {\r\n return `View${typeName} Order`;\r\n }\r\n};\r\n\r\nfunction copyChainedOrderPropsNextStep(order, precheck) {\r\n const { OrderHierarchy, OrderIsBasket, OrderHasMultipleAccounts, OrderIsSwitch } = order;\r\n\r\n const { AccountId, AccountNumber, AccountName, HolderId, HolderName, Instruction, IsFullLiquidation } =\r\n order.CurrentAccount;\r\n\r\n const switchProps = {};\r\n const switchAccountProps = {};\r\n\r\n // copy first order IsSwitch\r\n switchProps.OrderIsSwitch = OrderIsSwitch;\r\n\r\n if (OrderIsSwitch) {\r\n // order level props\r\n switchProps.OrderQuantity = precheck.Principal;\r\n switchProps.AssetClassForm = order.AssetClassForm;\r\n switchProps.OrderQuantityIsCash = true;\r\n // account props\r\n switchAccountProps.Quantity = precheck.Principal;\r\n switchAccountProps.IsFullLiquidation = false;\r\n }\r\n\r\n return {\r\n OrderHierarchy,\r\n OrderIsBasket,\r\n OrderHasMultipleAccounts,\r\n ...switchProps,\r\n CurrentAccount: {\r\n AccountId,\r\n AccountNumber,\r\n AccountName,\r\n HolderId,\r\n HolderName,\r\n Instruction,\r\n ...switchAccountProps,\r\n },\r\n };\r\n}\r\n\r\nfunction copyCrossOrderPropsNextStep(order) {\r\n const {\r\n OrderHierarchy,\r\n OrderIsBasket,\r\n OrderHasMultipleAccounts,\r\n AssetClassForm,\r\n AssetDescription,\r\n AssetId,\r\n AssetTicker,\r\n AssetSecurityProvider,\r\n OrderSettlementCurrencyId,\r\n OrderSettlementCurrencySymbol,\r\n } = order;\r\n return {\r\n OrderHierarchy,\r\n OrderIsBasket,\r\n OrderHasMultipleAccounts,\r\n AssetClassForm,\r\n AssetDescription,\r\n AssetId,\r\n AssetTicker,\r\n AssetSecurityProvider,\r\n OrderSettlementCurrencyId,\r\n OrderSettlementCurrencySymbol,\r\n };\r\n}\r\n\r\nfunction mergeFirstStepChangesToNextStep(state) {\r\n const { wizzard, precheck } = state;\r\n const step1_order = wizzard.steps[0].context.order;\r\n const step2 = { ...wizzard.steps[2].context };\r\n\r\n if (step1_order.OrderIsSwitch) {\r\n // copy fields again\r\n const copyProps = copyChainedOrderPropsNextStep(step1_order, precheck);\r\n return {\r\n ...step2,\r\n order: {\r\n ...step2.order,\r\n ...copyProps,\r\n },\r\n };\r\n }\r\n\r\n return step2;\r\n}\r\n\r\nexport { validateForm, getTitle };\r\n","/* eslint-disable no-cond-assign */\r\nimport React from \"react\";\r\nimport { formProps } from \"../Form\";\r\nimport {\r\n Type,\r\n ProductType,\r\n Mode,\r\n OrderStatus,\r\n OrderPriceType,\r\n TimeFrame,\r\n CommissionType,\r\n} from \"../../../../utils/Order/Order\";\r\nimport { getTitle } from \"./reducer\";\r\nimport { UserType, toDateLocal } from \"../../../../utils/Helper\";\r\n\r\nexport const Dispatch = React.createContext(null);\r\n\r\nexport const initialize = (props) => (initialState) => {\r\n const type = props.type || props.order.OrderHierarchy || initialState.ui.type;\r\n const form = props.order.AssetClassForm || initialState.order.AssetClassForm;\r\n const formDefaults = formProps[form].defaults();\r\n\r\n let CurrentAccount = {};\r\n if (props.order.CurrentAccount) {\r\n CurrentAccount = props.order.CurrentAccount;\r\n }\r\n\r\n let accounts = [];\r\n if (props.order.Accounts) {\r\n accounts = props.order.Accounts.map((account, index) => ({ ...account, index }));\r\n }\r\n\r\n const orderExists = props.order.OrderId > 0;\r\n const isBasket = orderExists ? props.order.OrderIsBasket : type == Type.Basket;\r\n const isBulk = orderExists ? props.order.OrderHasMultipleAccounts && !isBasket : type == Type.Bulk;\r\n\r\n const state = {\r\n ...initialState,\r\n ui: {\r\n ...initialState.ui,\r\n mode: props.mode || initialState.ui.mode,\r\n type,\r\n isBasket,\r\n isBulk,\r\n\r\n userRole: props.userType ? props.userType : initialState.ui.userRole,\r\n parameters: props.parameters ? props.parameters : initialState.ui.parameters,\r\n },\r\n order: {\r\n ...initialState.order,\r\n ...formDefaults,\r\n ...props.order,\r\n CurrentAccount,\r\n offerGetted: props.order.offer ? true : false,\r\n offerLoaded: props.order.offer ? props.order.offer : {},\r\n OrderHierarchy: type,\r\n OrderIsBasket: isBasket,\r\n OrderHasMultipleAccounts: isBasket || isBulk,\r\n Accounts: accounts,\r\n },\r\n };\r\n\r\n if (orderExists) {\r\n if (\r\n props.order.OrderType == OrderPriceType.MARKETONOPEN ||\r\n props.order.OrderType == OrderPriceType.MARKETONCLOSE\r\n ) {\r\n state.fields.readonly.OrderTimeInForce = true;\r\n }\r\n }\r\n\r\n // form types\r\n if (state.ui.type == Type.Chained) {\r\n state.wizzard = chainedWizzardDefault();\r\n state.order.OrderSide = \"Sell\";\r\n state.fields.readonly.OrderSide = true;\r\n } else if (state.ui.type == Type.Cross) {\r\n state.wizzard = crossWizzardDefault();\r\n state.fields.readonly.OrderType = true;\r\n } else if (state.ui.isBasket) {\r\n state.buttons.save.visible = false;\r\n state.buttons.precheck.visible = false;\r\n state.buttons.confirm.visible = true;\r\n state.buttons.confirm.label = \"Confirm\";\r\n if (state.order.OrderId > 0 && !state.order.CreatedByMe) {\r\n Object.keys(state.order).forEach((key) => {\r\n state.fields.readonly[key] = true;\r\n });\r\n }\r\n } else if (state.ui.isBulk) {\r\n state.buttons.save.visible = false;\r\n state.buttons.precheck.visible = false;\r\n state.buttons.confirm.visible = true;\r\n state.buttons.confirm.label = \"Confirm\";\r\n }\r\n\r\n // dialog mode\r\n if (state.ui.mode === Mode.READONLY) {\r\n state.buttons.precheck.visible = false;\r\n state.buttons.save.visible = false;\r\n state.buttons.confirm.visible = false;\r\n\r\n state.fields = {\r\n ...state.fields,\r\n readonly: {},\r\n };\r\n\r\n Object.keys(state.order).forEach((key) => {\r\n state.fields.readonly[key] = true;\r\n });\r\n\r\n Object.keys(state.order.CurrentAccount).forEach((key) => {\r\n state.fields.readonly[key] = true;\r\n });\r\n\r\n if (state.wizzard.enabled) {\r\n state.wizzard.nextBtn.visible = false;\r\n }\r\n\r\n if (props.userType == UserType.Trader) {\r\n state.fields.editable = props.entities.editable || {};\r\n }\r\n\r\n if ((props.userType == UserType.Trader && props.order.AccountType != \"Customer\") || state.ui.isBasket) {\r\n state.fields.hiddens.Commission = true;\r\n state.fields.hiddens.CommissionType = true;\r\n state.fields.hiddens.Markup = true;\r\n state.fields.hiddens.MarkupType = true;\r\n }\r\n\r\n if (\r\n props.userType === UserType.Advisor &&\r\n state.order.OrderId &&\r\n state.order.OrderStatus === OrderStatus.AUTH_WAIT\r\n ) {\r\n state.order.canResendAuthorizations = true;\r\n }\r\n } else if (state.ui.mode === Mode.EDIT) {\r\n const { order } = props;\r\n\r\n if (\r\n props.userType == UserType.Advisor &&\r\n state.ui.type == Type.Default &&\r\n (!order.OrderId || order.OrderStatus == OrderStatus.PARKED)\r\n ) {\r\n state.buttons.save.visible = true;\r\n }\r\n\r\n if ((props.userType == UserType.Trader && props.order.AccountType != \"Customer\") || state.ui.isBasket) {\r\n state.fields.hiddens.Commission = true;\r\n state.fields.hiddens.CommissionType = true;\r\n state.fields.hiddens.Markup = true;\r\n state.fields.hiddens.MarkupType = true;\r\n state.fields.hiddens.RequiresSpecialCustody = true;\r\n }\r\n } else if (state.ui.mode === Mode.EDIT_COMMISSION) {\r\n const { Markup, MarkupType, FXMarkup, FXMarkupType, Commission, CommissionType, ...tmpCurrentAccount } =\r\n state.order.CurrentAccount;\r\n Object.keys(tmpCurrentAccount).forEach((f) => {\r\n state.fields.readonly[f] = true;\r\n });\r\n Object.keys(state.order).forEach((f) => {\r\n state.fields.readonly[f] = true;\r\n });\r\n\r\n state.buttons.precheck.visible = false;\r\n state.buttons.confirm.visible = false;\r\n state.buttons.confirm.label = \"Confirm changes\";\r\n\r\n if (state.wizzard.enabled) {\r\n state.wizzard.nextBtn.visible = false;\r\n state.wizzard.nextBtn.label = \"Confirm changes\";\r\n }\r\n } else if (state.ui.mode == Mode.QUOTE) {\r\n state.fields.readonly.AssetTicker = true;\r\n state.fields.readonly.OrderPrice = true;\r\n state.fields.readonly.OrderQuantity = true;\r\n state.fields.readonly.Quantity = true;\r\n state.fields.readonly.OrderType = true;\r\n state.fields.readonly.OrderSide = true;\r\n state.ui.mode = Mode.EDIT;\r\n state.ui.quoteId = props.order.quoteId;\r\n } else if (state.ui.mode === Mode.REALLOCATE) {\r\n const {\r\n AccountName,\r\n HolderName,\r\n Instruction,\r\n Markup,\r\n MarkupType,\r\n FXMarkup,\r\n FXMarkupType,\r\n Commission,\r\n CommissionType,\r\n ...tmpCurrentAccount\r\n } = state.order.CurrentAccount;\r\n\r\n // Mark account level fields as read only\r\n Object.keys(tmpCurrentAccount).forEach((f) => {\r\n state.fields.readonly[f] = true;\r\n });\r\n\r\n // Mark order fields as read only\r\n Object.keys(state.order).forEach((f) => {\r\n state.fields.readonly[f] = true;\r\n });\r\n state.order.CurrentAccountId = state.order.AccountId;\r\n }\r\n\r\n // title\r\n state.ui.title = getTitle(state);\r\n\r\n return state;\r\n};\r\n\r\nexport const defaultState = () => ({\r\n ui: {\r\n title: \"New Order\",\r\n mode: Mode.EDIT,\r\n type: Type.Default,\r\n userRole: \"Advisor\",\r\n parameters: {},\r\n },\r\n\r\n buttons: {\r\n precheck: {\r\n visible: true,\r\n },\r\n modify: {\r\n visible: false,\r\n },\r\n confirm: {\r\n label: null,\r\n visible: false,\r\n loading: false,\r\n completed: false,\r\n },\r\n save: {\r\n visible: false,\r\n loading: false,\r\n completed: false,\r\n },\r\n },\r\n\r\n fields: {\r\n readonly: {},\r\n errors: {},\r\n hiddens: {},\r\n editable: {},\r\n },\r\n\r\n order: {\r\n AssetClassForm: ProductType.BOND,\r\n OrderInitDate: toDateLocal(new Date()),\r\n OrderSide: \"Buy\",\r\n OrderIsSwitch: false,\r\n OrderType: OrderPriceType.MARKET,\r\n offerLoaded: {},\r\n isChecked: true,\r\n OrderTimeInForce: TimeFrame.GTC,\r\n OrderGTD: toDateLocal(new Date()),\r\n CurrentAccount: {\r\n CommissionType: CommissionType.PrincipalPercentage,\r\n MarkupType: CommissionType.FaceValueCash,\r\n FXMarkupType: CommissionType.FaceValueCash,\r\n CurrentInfoDate: toDateLocal(new Date()),\r\n Advice:false,\r\n BalanceType: \"Current\"\r\n },\r\n },\r\n\r\n attachments: {},\r\n\r\n entities: {\r\n settlementCurrencies: null,\r\n },\r\n\r\n initFetchs: {},\r\n\r\n precheck: {\r\n authorizations: [],\r\n histories: [],\r\n },\r\n\r\n wizzard: {\r\n enabled: false,\r\n activeStep: null,\r\n nextBtn: {\r\n visible: true,\r\n loading: false,\r\n label: \"\",\r\n },\r\n steps: {},\r\n },\r\n});\r\n\r\nconst chainedWizzardDefault = () => ({\r\n enabled: true,\r\n activeStep: 0,\r\n nextBtn: {\r\n visible: true,\r\n loading: false,\r\n label: \"Precheck first order\",\r\n },\r\n steps: {\r\n 0: {\r\n title: \"Chained step 1: First order\",\r\n nextLabel: \"Precheck first order\",\r\n context: null,\r\n },\r\n 1: {\r\n title: \"Chained step 2: Precheck first order\",\r\n nextLabel: \"Confirm and Go to Step 3\",\r\n context: null,\r\n },\r\n 2: {\r\n title: \"Chained step 3: Second order\",\r\n nextLabel: \"Precheck second order\",\r\n context: null,\r\n },\r\n 3: {\r\n title: \"Chained step 4: Precheck second order\",\r\n nextLabel: \"Confirm chained\",\r\n context: null,\r\n },\r\n },\r\n});\r\n\r\nconst crossWizzardDefault = () => ({\r\n enabled: true,\r\n activeStep: 0,\r\n nextBtn: {\r\n visible: true,\r\n loading: false,\r\n label: \"Precheck first order\",\r\n },\r\n steps: {\r\n 0: {\r\n title: \"Cross Step 1: First order\",\r\n nextLabel: \"Precheck first order\",\r\n context: null,\r\n },\r\n 1: {\r\n title: \"Cross Step 2: Precheck first order\",\r\n nextLabel: \"Confirm and Go to Step 3\",\r\n context: null,\r\n },\r\n 2: {\r\n title: \"Cross Step 3: Second order\",\r\n nextLabel: \"Precheck second order\",\r\n context: null,\r\n },\r\n 3: {\r\n title: \"Cross Step 4: Precheck second order\",\r\n nextLabel: \"Confirm cross\",\r\n context: null,\r\n },\r\n },\r\n});\r\n","import React, { Component } from \"react\";\r\nimport { CustomInput, Input } from \"reactstrap\";\r\nimport { NumberFormatInput } from \"../../NumberFormatInput/NumberFormatInput\";\r\nimport classnames from \"classnames\";\r\nimport style from \"./OrderQuantityAssignment.module.scss\";\r\nimport { Field } from \"../Order/Field/Field\";\r\nimport * as OrderItemUI from \"../../Order/Item\";\r\nimport { OrderDayStatus } from \"../../../utils/Order/Order\";\r\n\r\nconst ItemRow = ({ account, selectedDate, id, actions, title = \"\", ...props }) => {\r\n const dayInfo = account.days.find((d) => d.date === selectedDate);\r\n\r\n const enabled = [OrderDayStatus.LOCKED, OrderDayStatus.BOOKED].indexOf(dayInfo.status) < 0;\r\n\r\n return (\r\n \r\n {title !== \"\" ?
    {title}
    : null}\r\n
    \r\n
    \r\n \r\n actions.change(id, \"assignedQty\", e.value)}\r\n dataTypeDecimalName=\"quantity\"\r\n placeholder=\"Assigned Qty\"\r\n />\r\n \r\n
    \r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport const AccountDetail = ({ account, dayInfo }) => {\r\n return (\r\n
    \r\n
    \r\n Account #{account.accountNumber}\r\n {\" (\"}\r\n {account.accountName}\r\n {\")\"}\r\n
    \r\n\r\n
    \r\n\r\n
    \r\n
    \r\n {`Day status: ${dayInfo.status} | Asked: ${account.askedQty} | Total assigned: ${account.totalAssignedQty} | Total booked: ${account.totalBookedQty}`}\r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default ItemRow;\r\n","import React, { Component, Fragment } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Button, Alert } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport classnames from \"classnames\";\r\nimport OrderInlineDetail from \"../../Order/InlineDetail\";\r\nimport ItemRow from \"./ItemRow\";\r\nimport style from \"./OrderQuantityAssignment.module.scss\";\r\nimport { Combobox } from \"../Order/Field/Field\";\r\nimport { OrderDayStatus } from \"../../../utils/Order/Order\";\r\n\r\nclass OrderQuantityAssignment extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n info: {\r\n currentOrderVersion: null,\r\n minimumQuantity: null,\r\n incrementQuantity: null,\r\n },\r\n distributionType: \"FIFO\", // FIFO, LIFO, Prorate\r\n selectedDate: null,\r\n days: null,\r\n accounts: null,\r\n confirm: {\r\n enabled: false,\r\n loading: false,\r\n },\r\n error: null,\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n const { order } = this.props;\r\n\r\n if (order.OrderId != 0) {\r\n // retrieve accounts assignment in the order\r\n //this.state.loadings.distribute = true;\r\n\r\n this.getAssignment(order.OrderId);\r\n }\r\n }\r\n\r\n getAssignment = (orderId) => {\r\n const { fetchOrderAccountsAssignment } = this.props;\r\n\r\n fetchOrderAccountsAssignment({ orderId })\r\n .then((res) => res.response.AccountsAssignment)\r\n .then((assignment) => {\r\n const info = {\r\n currentOrderVersion: parseInt(assignment.CurrentVersion, 10),\r\n minimumQuantity: parseFloat(assignment.MinimumQuantity),\r\n incrementQuantity: parseFloat(assignment.IncrementQuantity),\r\n };\r\n\r\n let selectedDate = null;\r\n const days = [];\r\n assignment.Day.forEach((d) => {\r\n const day = {\r\n date: d.Date,\r\n executedQuantity: parseFloat(d.ExecutedQuantity),\r\n bookedQuantity: parseFloat(d.BookedQuantity),\r\n quantityToAssign: parseFloat(d.QuantityToAssign),\r\n leftToAssign: parseFloat(d.QuantityToAssign),\r\n fixedClientQty: parseFloat(d.FixedClientQuantity),\r\n fixedPropQty: parseFloat(d.FixedPropQuantity),\r\n };\r\n days.push(day);\r\n\r\n if (selectedDate == null && day.quantityToAssign > 0) {\r\n selectedDate = day.date;\r\n }\r\n });\r\n\r\n const accounts = [];\r\n\r\n assignment.Account.forEach((a) => {\r\n const account = {\r\n accountId: parseInt(a.AccountId, 10),\r\n accountNumber: a.AccountNumber,\r\n accountName: a.AccountName,\r\n accountType: a.AccountType,\r\n accountInBalanceType: a.AccountInBalanceType,\r\n position: parseInt(a.Position, 10),\r\n askedQty: parseFloat(a.AskedQuantity),\r\n askedFullLiquidation: a.AskedFullLiquidation,\r\n totalBookedQty: parseFloat(a.TotalBookedQuantity),\r\n totalAssignedQty: parseFloat(a.TotalAssignedQuantity),\r\n days: [],\r\n };\r\n\r\n a.Day.forEach((accountDay) => {\r\n const day = {\r\n date: accountDay.Date,\r\n assignedQty: parseFloat(accountDay.AssignedQuantity),\r\n status: accountDay.Status,\r\n };\r\n account.days.push(day);\r\n\r\n if (day.status !== OrderDayStatus.BOOKED) {\r\n // If account is not booked for this day, we should subtract\r\n // it assigned quantity for this day' left to assign quantity.\r\n days.find((d) => d.date === day.date).leftToAssign -= day.assignedQty;\r\n }\r\n });\r\n\r\n accounts.push(account);\r\n });\r\n\r\n accounts.sort((a, b) => a.position - b.position);\r\n\r\n this.setState({\r\n info,\r\n selectedDate,\r\n days,\r\n accounts,\r\n });\r\n });\r\n };\r\n\r\n onToggle = () => {\r\n const { onToggle } = this.props;\r\n onToggle();\r\n };\r\n\r\n changeItem = (itemId, name, value) => {\r\n const { accounts, days, selectedDate } = this.state;\r\n\r\n const account = accounts.find((a) => a.accountId === itemId);\r\n const accountDay = account.days.find((d) => d.date === selectedDate);\r\n let differenceOfAssignedQty = accountDay.assignedQty;\r\n\r\n accountDay[name] = isNaN(value) || value == \"\" ? value : +value;\r\n accountDay[`error_${name}`] = undefined;\r\n\r\n // Track the change in assigned quantity.\r\n differenceOfAssignedQty -= accountDay.assignedQty;\r\n\r\n // Update total assigned quantity of the account.\r\n account.totalAssignedQty -= differenceOfAssignedQty;\r\n\r\n const day = days.find((d) => d.date === selectedDate);\r\n const modifiedDay = this.calcTotals(accounts);\r\n\r\n day.leftToAssign = modifiedDay.leftToAssign;\r\n\r\n this.setState({\r\n accounts,\r\n days,\r\n error: undefined,\r\n });\r\n };\r\n\r\n validate = () => {\r\n const { days, accounts, info } = this.state;\r\n const { minimumQuantity, incrementQuantity } = info;\r\n let hasErrors = false;\r\n let error;\r\n\r\n let totalAssignedAccount = 0;\r\n\r\n let modAccounts = accounts.map((account) => {\r\n let modAccount = account;\r\n\r\n modAccount.days = account.days.map((accountDay) => {\r\n let modAccountDay = accountDay;\r\n\r\n if (modAccountDay.assignedQty !== 0) {\r\n // Verify conditions only if quantity is bigger than zero\r\n if (\r\n modAccountDay.assignedQty === undefined ||\r\n modAccountDay.assignedQty === \"\" ||\r\n modAccountDay.assignedQty < 0\r\n ) {\r\n modAccountDay.error_assignedQty = \"Required field\";\r\n hasErrors = true;\r\n } else if (modAccount.totalAssignedQty > modAccount.askedQty) {\r\n modAccountDay.error_assignedQty = \"Total assigned quantity is over asked quantity\";\r\n hasErrors = true;\r\n } else if (modAccount.totalAssignedQty < minimumQuantity) {\r\n modAccountDay.error_assignedQty = \"Total assigned quantity is less than minimum quantity\";\r\n hasErrors = true;\r\n } else if (\r\n incrementQuantity > 1 &&\r\n incrementQuantity !== 0 &&\r\n (modAccount.totalAssignedQty - minimumQuantity) % incrementQuantity !== 0\r\n ) {\r\n modAccountDay.error_assignedQty =\r\n \"Total assigned quantity is not a multiple of the increment quantity\";\r\n hasErrors = true;\r\n }\r\n }\r\n\r\n totalAssignedAccount += modAccountDay.assignedQty;\r\n\r\n return modAccountDay;\r\n });\r\n\r\n return modAccount;\r\n });\r\n\r\n days.forEach((day) => {\r\n let totalDayAssignedQty = 0;\r\n let totalDayClientAssignedQty = 0;\r\n let totalDayPropAssignedQty = 0;\r\n modAccounts.forEach((account) => {\r\n const accountDay = account.days.find((accDay) => accDay.date === day.date);\r\n totalDayAssignedQty += accountDay.assignedQty;\r\n\r\n if (account.accountType.toLowerCase() === \"inbalance\") {\r\n totalDayPropAssignedQty += accountDay.assignedQty;\r\n } else {\r\n totalDayClientAssignedQty += accountDay.assignedQty;\r\n }\r\n });\r\n\r\n if (\r\n !(Math.abs(totalDayAssignedQty - day.executedQuantity) < minimumQuantity) &&\r\n totalDayAssignedQty !== day.executedQuantity\r\n ) {\r\n error = \"Total assigned quantity differs from executed quantity in a day\";\r\n hasErrors = true;\r\n } else if (totalDayPropAssignedQty < day.fixedPropQty) {\r\n error = \"Fixed quantity for props was not respected.\";\r\n hasErrors = true;\r\n } else if (totalDayClientAssignedQty < day.fixedClientQty) {\r\n error = \"Fixed quantity for clients was not respected.\";\r\n hasErrors = true;\r\n }\r\n });\r\n\r\n this.setState({\r\n accounts: modAccounts,\r\n error,\r\n });\r\n\r\n return !hasErrors;\r\n };\r\n\r\n onAssignmentUpdate = () => {\r\n if (this.validate()) {\r\n const { order } = this.props;\r\n const { info, accounts } = this.state;\r\n const { fetchUpdateOrderAccountsAssignment, onToggle } = this.props;\r\n\r\n const accountsToSend = accounts.map((account) => ({\r\n AccountId: account.accountId,\r\n Day: account.days.map((day) => ({\r\n Date: day.date,\r\n AssignedQuantity: day.assignedQty,\r\n })),\r\n }));\r\n\r\n this.setState({ confirm: { loading: true } });\r\n\r\n fetchUpdateOrderAccountsAssignment({\r\n orderId: order.OrderId,\r\n AccountsAssignment: {\r\n CurrentVersion: info.currentOrderVersion,\r\n Account: accountsToSend,\r\n },\r\n }).then((res) => {\r\n onToggle();\r\n });\r\n }\r\n };\r\n\r\n onDistributionApply = () => {\r\n const { info, distributionType, selectedDate, days, accounts } = this.state;\r\n const { minimumQuantity, incrementQuantity } = info;\r\n\r\n const day = days.find((d) => d.date === selectedDate);\r\n const { quantityToAssign } = day;\r\n\r\n let modifiedAccounts = null;\r\n\r\n let pendingQuantityToAssign = quantityToAssign;\r\n\r\n let totalRemainingQuantity = 0;\r\n\r\n accounts.forEach((account) => {\r\n const { totalAssignedQty, askedQty } = account;\r\n\r\n const accountDay = account.days.find((d) => d.date === selectedDate);\r\n\r\n if ([OrderDayStatus.LOCKED, OrderDayStatus.BOOKED].indexOf(accountDay.status) < 0) {\r\n // The account is still not locked or booked for this day.\r\n // We can modify the assigned quantity.\r\n\r\n const assignedQtyInOtherDays = totalAssignedQty - accountDay.assignedQty;\r\n\r\n totalRemainingQuantity += askedQty - assignedQtyInOtherDays;\r\n } else if (accountDay.status === OrderDayStatus.LOCKED) {\r\n // Remove the Locked quantity from the pending quantity to assign.\r\n // We can't modify this quantities.\r\n pendingQuantityToAssign -= accountDay.assignedQty;\r\n }\r\n });\r\n\r\n const prorateOverPendingQty =\r\n totalRemainingQuantity > 0 ? pendingQuantityToAssign / totalRemainingQuantity : 1.0;\r\n\r\n switch (distributionType) {\r\n case \"FIFO\":\r\n case \"LIFO\":\r\n if (distributionType == \"LIFO\") {\r\n accounts.sort((a, b) => b.position - a.position);\r\n }\r\n\r\n modifiedAccounts = accounts.map((account) => {\r\n const accountDay = account.days.find((d) => d.date === selectedDate);\r\n\r\n if ([OrderDayStatus.LOCKED, OrderDayStatus.BOOKED].indexOf(accountDay.status) >= 0) {\r\n // The account is already locked or booked for this day.\r\n // We can't modify the assigned quantity.\r\n return account;\r\n }\r\n\r\n let differenceOfAssignedQty = accountDay.assignedQty;\r\n\r\n const { askedQty, totalAssignedQty } = account;\r\n\r\n const assignedQtyInOtherDays = totalAssignedQty - accountDay.assignedQty;\r\n\r\n let assignedQty = 0;\r\n // Calculate pending account quantity for this day.\r\n const pendingAcctQty = askedQty - assignedQtyInOtherDays;\r\n\r\n if (pendingQuantityToAssign > 0 && pendingAcctQty > 0) {\r\n if (pendingQuantityToAssign >= minimumQuantity) {\r\n assignedQty = Math.min(pendingAcctQty, pendingQuantityToAssign);\r\n }\r\n }\r\n\r\n accountDay.assignedQty = assignedQty;\r\n\r\n pendingQuantityToAssign -= assignedQty;\r\n\r\n // Track the change in assigned quantity.\r\n differenceOfAssignedQty -= assignedQty;\r\n\r\n return {\r\n ...account,\r\n totalAssignedQty: account.totalAssignedQty - differenceOfAssignedQty,\r\n };\r\n });\r\n\r\n if (distributionType == \"LIFO\") {\r\n modifiedAccounts.sort((a, b) => a.position - b.position);\r\n }\r\n\r\n break;\r\n\r\n case \"Prorate\":\r\n modifiedAccounts = accounts.map((account) => {\r\n const accountDay = account.days.find((d) => d.date === selectedDate);\r\n\r\n if ([OrderDayStatus.LOCKED, OrderDayStatus.BOOKED].indexOf(accountDay.status) >= 0) {\r\n // The account is already locked or booked for this day.\r\n // We can't modify the assigned quantity.\r\n return account;\r\n }\r\n\r\n let differenceOfAssignedQty = accountDay.assignedQty;\r\n\r\n const { askedQty, totalAssignedQty } = account;\r\n\r\n const assignedQtyInOtherDays = totalAssignedQty - accountDay.assignedQty;\r\n // Calculate pending account quantity for this day.\r\n const pendingAcctQty = askedQty - assignedQtyInOtherDays;\r\n\r\n let assignedQty = pendingAcctQty * prorateOverPendingQty;\r\n\r\n const remainderOverIncrementQuantity = incrementQuantity > 0 ? assignedQty % incrementQuantity : 0;\r\n\r\n // We round down to the nearest increment.\r\n assignedQty -= remainderOverIncrementQuantity;\r\n\r\n if (remainderOverIncrementQuantity > incrementQuantity / 2) {\r\n // We have to round up, if the account is not full.\r\n if (pendingAcctQty + assignedQty + incrementQuantity <= askedQty) {\r\n // round up.\r\n assignedQty += incrementQuantity;\r\n }\r\n }\r\n\r\n accountDay.assignedQty = assignedQty;\r\n\r\n // Track the change in assigned quantity.\r\n differenceOfAssignedQty -= assignedQty;\r\n\r\n return {\r\n ...account,\r\n totalAssignedQty: account.totalAssignedQty - differenceOfAssignedQty,\r\n };\r\n });\r\n\r\n break;\r\n default:\r\n }\r\n\r\n const modifiedDay = this.calcTotals(modifiedAccounts);\r\n day.leftToAssign = modifiedDay.leftToAssign;\r\n\r\n this.setState({\r\n accounts: modifiedAccounts,\r\n days,\r\n });\r\n };\r\n\r\n calcTotals = (accounts) => {\r\n const { days, selectedDate } = this.state;\r\n\r\n const day = days.find((d) => d.date === selectedDate);\r\n\r\n let totalAssignedQuantityWithoutBook = 0;\r\n\r\n accounts.forEach((account) => {\r\n const accountDay = account.days.find((d) => d.date === selectedDate);\r\n if (!isNaN(accountDay.assignedQty)) {\r\n if (accountDay.status !== OrderDayStatus.BOOKED) {\r\n totalAssignedQuantityWithoutBook += accountDay.assignedQty;\r\n }\r\n }\r\n });\r\n\r\n day.leftToAssign = day.quantityToAssign - totalAssignedQuantityWithoutBook;\r\n\r\n return day;\r\n };\r\n\r\n render() {\r\n const { open, order } = this.props;\r\n const { info, distributionType, selectedDate, days, accounts, confirm, error } = this.state;\r\n\r\n const listOfDays = days ? days.map((d) => ({ id: d.date, description: d.date })) : [];\r\n const selectedDateDay = days ? days.find((d) => d.date === selectedDate) : {};\r\n\r\n return (\r\n \r\n \r\n Quantity assignment\r\n \r\n \r\n \r\n
    \r\n \r\n this.setState({ selectedDate: v })}\r\n emptyLabel=\"Date\"\r\n invalid={!!error}\r\n style={{ minWidth: \"180px\", marginRight: \"10px\" }}\r\n />\r\n
    \r\n this.setState({ distributionType: v })}\r\n onApply={this.onDistributionApply}\r\n minimum={info.minimumQuantity}\r\n increment={info.incrementQuantity}\r\n />\r\n\r\n {accounts &&\r\n accounts.map((a) => (\r\n \r\n ))}\r\n\r\n {error && (\r\n \r\n
    \r\n \r\n {error}\r\n \r\n
    \r\n )}\r\n
    \r\n\r\n \r\n \r\n\r\n \r\n \r\n Update\r\n \r\n \r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst DistributionType = ({ type, error, enabled, onChange, onApply, minimum, increment }) => (\r\n
    \r\n \r\n onChange(v)}\r\n emptyLabel=\"Dist type\"\r\n invalid={!!error}\r\n style={{ minWidth: \"180px\", marginRight: \"10px\" }}\r\n />\r\n \r\n Apply\r\n \r\n \r\n
    \r\n);\r\n\r\nconst Number = ({ value, dataTypeDecimalName }) => {\r\n if (value === null) {\r\n return \"-\";\r\n }\r\n\r\n return ;\r\n};\r\n\r\nconst FooterTotals = ({ totals }) => (\r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {(totals.fixedClientQty > 0 || totals.fixedPropQty > 0) && (\r\n \r\n \r\n {totals.fixedClientQty > 0 && (\r\n \r\n )}\r\n {totals.fixedPropQty > 0 && (\r\n \r\n )}\r\n \r\n )}\r\n \r\n
    Executed quantity\r\n \r\n
    Booked quantity\r\n \r\n
    Fixed\r\n - Clients (\r\n )\r\n \r\n - Prop (\r\n )\r\n
    \r\n
    \r\n\r\n
    \r\n Leftovers\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    To assign\r\n \r\n
    \r\n
    \r\n
    \r\n);\r\n\r\nexport default OrderQuantityAssignment;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"OrderQuantityAssignment-module_modal_m8bnz\",\"alert\":\"OrderQuantityAssignment-module_alert_ft_YB\",\"distributionType\":\"OrderQuantityAssignment-module_distributionType_uapxS\",\"item\":\"OrderQuantityAssignment-module_item_27wM-\",\"active\":\"OrderQuantityAssignment-module_active_Xsf92\",\"fields\":\"OrderQuantityAssignment-module_fields_fiQqW\",\"checkbox\":\"OrderQuantityAssignment-module_checkbox_2NREa\",\"loadingCbox\":\"OrderQuantityAssignment-module_loadingCbox_1P1Jf\",\"arroba\":\"OrderQuantityAssignment-module_arroba_3u89B\",\"order\":\"OrderQuantityAssignment-module_order_3JEj1\",\"line\":\"OrderQuantityAssignment-module_line_3W3Yx\",\"footerTotals\":\"OrderQuantityAssignment-module_footerTotals_1GmNe\",\"totalLine\":\"OrderQuantityAssignment-module_totalLine_8wrrZ\",\"update\":\"OrderQuantityAssignment-module_update_1a3Yd\",\"applyDist\":\"OrderQuantityAssignment-module_applyDist_1KmBa\",\"loading\":\"OrderQuantityAssignment-module_loading_ylL6Q\",\"spinner\":\"OrderQuantityAssignment-module_spinner_zgtjK\"};","import React, { Component, Fragment } from \"react\";\r\nimport { CustomInput, Input, Alert } from \"reactstrap\";\r\nimport { NumberFormatInput } from \"../../NumberFormatInput/NumberFormatInput\";\r\nimport classnames from \"classnames\";\r\nimport style from \"./OrderQuantityToTradesAssignment.module.scss\";\r\nimport { Field } from \"../Order/Field/Field\";\r\nimport * as TradeItemUI from \"../../Order/Item\";\r\n\r\nconst ItemRow = ({ trade, id, actions, enabled, title = \"\", dayInfo, ...props }) => {\r\n return (\r\n \r\n {title !== \"\" ?
    {title}
    : null}\r\n
    \r\n
    \r\n {dayInfo.clientQtyToAssign > 0 && (\r\n \r\n actions.change(id, \"assignedClientQty\", e.value)}\r\n dataTypeDecimalName=\"quantity\"\r\n placeholder=\"Client Qty\"\r\n />\r\n \r\n )}\r\n {dayInfo.propQtyToAssign > 0 && (\r\n \r\n actions.change(id, \"assignedPropQty\", e.value)}\r\n dataTypeDecimalName=\"quantity\"\r\n placeholder=\"Prop Qty\"\r\n />\r\n \r\n )}\r\n {dayInfo.tradingQtyToAssign > 0 && (\r\n \r\n actions.change(id, \"assignedTradingQty\", e.value)}\r\n dataTypeDecimalName=\"quantity\"\r\n placeholder=\"Trading Qty\"\r\n />\r\n \r\n )}\r\n {dayInfo.errorQtyToAssign > 0 && (\r\n \r\n actions.change(id, \"assignedErrorQty\", e.value)}\r\n dataTypeDecimalName=\"quantity\"\r\n placeholder=\"Error Qty\"\r\n />\r\n \r\n )}\r\n
    \r\n
    {`(qty: ${trade.quantity})`}
    \r\n \r\n {trade.error && (\r\n \r\n
    \r\n \r\n {trade.error}\r\n \r\n
    \r\n )}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport const TradeDetail = ({ trade }) => {\r\n return (\r\n
    \r\n
    \r\n #{trade.tradeId} {TradeItemUI.renderTradeSide(trade.info)}{\" \"}\r\n {TradeItemUI.renderTradeQuantity(trade.info)} {TradeItemUI.renderTradeSymbol(trade.info)}\r\n {\" @ \"}\r\n {TradeItemUI.renderTradePrice(trade.info)}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default ItemRow;\r\n","import React, { Component, Fragment } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Button, Alert } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport classnames from \"classnames\";\r\nimport OrderInlineDetail from \"../../Order/InlineDetail\";\r\nimport ItemRow from \"./ItemRow\";\r\nimport style from \"./OrderQuantityToTradesAssignment.module.scss\";\r\nimport { Combobox } from \"../Order/Field/Field\";\r\n\r\nclass OrderQuantityToTradesAssignment extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n info: {\r\n currentOrderVersion: null,\r\n },\r\n selectedDate: null,\r\n days: null,\r\n confirm: {\r\n enabled: false,\r\n loading: false,\r\n },\r\n error: null,\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n const { order } = this.props;\r\n\r\n if (order.OrderId != 0) {\r\n // retrieve trades assignment in the order\r\n //this.state.loadings.distribute = true;\r\n\r\n this.getAssignment(order.OrderId);\r\n }\r\n }\r\n\r\n getAssignment = (orderId) => {\r\n const { fetchOrderQuantityToTradesAssignment } = this.props;\r\n\r\n fetchOrderQuantityToTradesAssignment({ orderId })\r\n .then((res) => res.response.QuantityToTradesAssignment)\r\n .then((assignment) => {\r\n const info = {\r\n currentOrderVersion: parseInt(assignment.CurrentVersion, 10),\r\n };\r\n\r\n let selectedDate = null;\r\n const days = [];\r\n assignment.Day.forEach((d) => {\r\n const day = {\r\n date: d.Date,\r\n clientQtyToAssign: parseFloat(d.ClientQuantityToAssign),\r\n propQtyToAssign: parseFloat(d.PropQuantityToAssign),\r\n tradingQtyToAssign: parseFloat(d.TradingQuantityToAssign),\r\n errorQtyToAssign: parseFloat(d.ErrorQuantityToAssign),\r\n leftClientQtyToAssign: parseFloat(d.ClientQuantityToAssign),\r\n leftPropQtyToAssign: parseFloat(d.PropQuantityToAssign),\r\n leftTradingQtyToAssign: parseFloat(d.TradingQuantityToAssign),\r\n leftErrorQtyToAssign: parseFloat(d.ErrorQuantityToAssign),\r\n trades: [],\r\n };\r\n\r\n day.trades = d.Trades.map((t) => {\r\n const trade = {\r\n tradeId: parseInt(t.TradeId, 10),\r\n enabled: !t.AssignedQuantityIsFixed,\r\n quantity: parseFloat(t.Quantity),\r\n assignedClientQty: parseFloat(t.AssignedClientQuantity),\r\n assignedPropQty: parseFloat(t.AssignedPropQuantity),\r\n assignedTradingQty: parseFloat(t.AssignedTradingQuantity),\r\n assignedErrorQty: parseFloat(t.AssignedErrorQuantity),\r\n info: {\r\n TradeStatus: t.TradeInfo.TradeStatus,\r\n TradeSide: t.TradeInfo.TradeSide,\r\n TradeOpenClose: t.TradeInfo.TradeOpenClose,\r\n TradeAssetTicker: t.TradeInfo.TradeAssetTicker,\r\n TradeAssetISIN: t.TradeInfo.TradeAssetISIN,\r\n TradeAssetClassForm: t.TradeInfo.TradeAssetClassForm,\r\n TradeSettleCurrencyISO: t.TradeInfo.TradeSettleCurrencyISO,\r\n TradeQuantity: parseFloat(t.TradeInfo.TradeQuantity),\r\n TradeAvgPrice: parseFloat(t.TradeInfo.TradeAvgPrice),\r\n },\r\n };\r\n\r\n day.leftClientQtyToAssign -= trade.assignedClientQty;\r\n day.leftPropQtyToAssign -= trade.assignedPropQty;\r\n day.leftTradingQtyToAssign -= trade.assignedTradingQty;\r\n day.leftErrorQtyToAssign -= trade.assignedErrorQty;\r\n\r\n return trade;\r\n });\r\n\r\n day.trades.sort((a, b) => a.tradeId - b.tradeId);\r\n\r\n days.push(day);\r\n\r\n if (selectedDate == null && d.Auxiliar.HasNotBookedTrades) {\r\n selectedDate = day.date;\r\n }\r\n });\r\n\r\n if (!selectedDate && days.length > 0) {\r\n selectedDate = days[0].date;\r\n }\r\n\r\n this.setState({\r\n info,\r\n selectedDate,\r\n days,\r\n });\r\n });\r\n };\r\n\r\n onToggle = () => {\r\n const { onToggle } = this.props;\r\n onToggle();\r\n };\r\n\r\n changeItem = (itemId, name, value) => {\r\n const { days, selectedDate } = this.state;\r\n\r\n const day = days.find((d) => d.date === selectedDate);\r\n const trade = day.trades.find((t) => t.tradeId === itemId);\r\n\r\n trade[name] = isNaN(value) || value == \"\" ? value : +value;\r\n trade[`error_${name}`] = false;\r\n trade.error = undefined;\r\n\r\n const totals = this.calcTotals(day);\r\n day.leftClientQtyToAssign = totals.leftClientQtyToAssign;\r\n day.leftPropQtyToAssign = totals.leftPropQtyToAssign;\r\n day.leftTradingQtyToAssign = totals.leftTradingQtyToAssign;\r\n day.leftErrorQtyToAssign = totals.leftErrorQtyToAssign;\r\n\r\n this.setState({\r\n days,\r\n error: undefined,\r\n });\r\n };\r\n\r\n validate = () => {\r\n const { days } = this.state;\r\n let hasErrors = false;\r\n let error;\r\n\r\n const modDays = days.map((day) => {\r\n const modDay = day;\r\n\r\n let totalAssignedClientQty = 0;\r\n let totalAssignedPropQty = 0;\r\n let totalAssignedTradingQty = 0;\r\n let totalAssignedErrorQty = 0;\r\n\r\n modDay.trades = day.trades.map((trade) => {\r\n const modTrade = trade;\r\n\r\n if (\r\n modTrade.assignedClientQty === undefined ||\r\n modTrade.assignedClientQty === \"\" ||\r\n modTrade.assignedClientQty < 0\r\n ) {\r\n modTrade.error_assignedClientQty = true;\r\n modTrade.error = \"Required fields\";\r\n hasErrors = true;\r\n }\r\n if (\r\n modTrade.assignedPropQty === undefined ||\r\n modTrade.assignedPropQty === \"\" ||\r\n modTrade.assignedPropQty < 0\r\n ) {\r\n modTrade.error_assignedPropQty = true;\r\n modTrade.error = \"Required fields\";\r\n hasErrors = true;\r\n }\r\n if (\r\n modTrade.assignedTradingQty === undefined ||\r\n modTrade.assignedTradingQty === \"\" ||\r\n modTrade.assignedTradingQty < 0\r\n ) {\r\n modTrade.error_assignedTradingQty = true;\r\n modTrade.error = \"Required fields\";\r\n hasErrors = true;\r\n }\r\n if (\r\n modTrade.assignedErrorQty === undefined ||\r\n modTrade.assignedErrorQty === \"\" ||\r\n modTrade.assignedErrorQty < 0\r\n ) {\r\n modTrade.error_assignedErrorQty = true;\r\n modTrade.error = \"Required fields\";\r\n hasErrors = true;\r\n }\r\n\r\n if (\r\n modTrade.assignedClientQty +\r\n modTrade.assignedPropQty +\r\n modTrade.assignedTradingQty +\r\n modTrade.assignedErrorQty !==\r\n modTrade.quantity\r\n ) {\r\n modTrade.error = \"Quantity assigned is different than trade qty\";\r\n hasErrors = true;\r\n }\r\n\r\n totalAssignedClientQty += modTrade.assignedClientQty;\r\n totalAssignedPropQty += modTrade.assignedPropQty;\r\n totalAssignedTradingQty += modTrade.assignedTradingQty;\r\n totalAssignedErrorQty += modTrade.assignedErrorQty;\r\n\r\n return modTrade;\r\n });\r\n\r\n if (totalAssignedClientQty !== modDay.clientQtyToAssign) {\r\n error = \"There are client leftovers\";\r\n hasErrors = true;\r\n } else if (totalAssignedPropQty !== modDay.propQtyToAssign) {\r\n error = \"There are prop leftovers\";\r\n hasErrors = true;\r\n } else if (totalAssignedTradingQty !== modDay.tradingQtyToAssign) {\r\n error = \"There are trading leftovers\";\r\n hasErrors = true;\r\n } else if (totalAssignedErrorQty !== modDay.errorQtyToAssign) {\r\n error = \"There are error leftovers\";\r\n hasErrors = true;\r\n }\r\n\r\n return modDay;\r\n });\r\n\r\n this.setState({\r\n days: modDays,\r\n error,\r\n });\r\n\r\n return !hasErrors;\r\n };\r\n\r\n onAssignmentUpdate = () => {\r\n if (this.validate()) {\r\n const { order } = this.props;\r\n const { info, days } = this.state;\r\n const { fetchUpdateOrderQuantityToTradesAssignment, onToggle } = this.props;\r\n\r\n const daysToSend = days.map((day) => ({\r\n Date: day.date,\r\n Trades: day.trades.map((trade) => ({\r\n TradeId: trade.tradeId,\r\n AssignedClientQuantity: trade.assignedClientQty,\r\n AssignedPropQuantity: trade.assignedPropQty,\r\n AssignedTradingQuantity: trade.assignedTradingQty,\r\n AssignedErrorQuantity: trade.assignedErrorQty,\r\n })),\r\n }));\r\n\r\n this.setState({ confirm: { loading: true } });\r\n\r\n fetchUpdateOrderQuantityToTradesAssignment({\r\n orderId: order.OrderId,\r\n QuantityToTradesAssignment: {\r\n CurrentVersion: info.currentOrderVersion,\r\n Day: daysToSend,\r\n },\r\n }).then((res) => {\r\n onToggle();\r\n });\r\n }\r\n };\r\n\r\n calcTotals = (day) => {\r\n const totals = {\r\n leftClientQtyToAssign: 0,\r\n leftPropQtyToAssign: 0,\r\n leftTradingQtyToAssign: 0,\r\n leftErrorQtyToAssign: 0,\r\n };\r\n\r\n let totalAssignedClientQuantity = 0;\r\n let totalAssignedPropQuantity = 0;\r\n let totalAssignedTradingQuantity = 0;\r\n let totalAssignedErrorQuantity = 0;\r\n\r\n day.trades.forEach((trade) => {\r\n if (!isNaN(trade.assignedClientQty)) {\r\n totalAssignedClientQuantity += trade.assignedClientQty;\r\n }\r\n if (!isNaN(trade.assignedPropQty)) {\r\n totalAssignedPropQuantity += trade.assignedPropQty;\r\n }\r\n if (!isNaN(trade.assignedTradingQty)) {\r\n totalAssignedTradingQuantity += trade.assignedTradingQty;\r\n }\r\n if (!isNaN(trade.assignedErrorQty)) {\r\n totalAssignedErrorQuantity += trade.assignedErrorQty;\r\n }\r\n });\r\n\r\n totals.leftClientQtyToAssign = day.clientQtyToAssign - totalAssignedClientQuantity;\r\n totals.leftPropQtyToAssign = day.propQtyToAssign - totalAssignedPropQuantity;\r\n totals.leftTradingQtyToAssign = day.tradingQtyToAssign - totalAssignedTradingQuantity;\r\n totals.leftErrorQtyToAssign = day.errorQtyToAssign - totalAssignedErrorQuantity;\r\n\r\n return totals;\r\n };\r\n\r\n render() {\r\n const { open, order } = this.props;\r\n const { selectedDate, days, confirm, error } = this.state;\r\n\r\n if (!selectedDate || !days) {\r\n return (\r\n \r\n \r\n Quantity to trades assignment\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n const listOfDays = days ? days.map((d) => ({ id: d.date, description: d.date })) : [];\r\n const selectedDateDay = days ? days.find((d) => d.date === selectedDate) : {};\r\n const { trades } = selectedDateDay;\r\n\r\n return (\r\n \r\n \r\n Quantity to trades assignment\r\n \r\n \r\n \r\n
    \r\n \r\n this.setState({ selectedDate: v })}\r\n emptyLabel=\"Date\"\r\n invalid={!!error}\r\n style={{ minWidth: \"180px\", marginRight: \"10px\" }}\r\n />\r\n
    \r\n {trades &&\r\n trades.map((t) => (\r\n \r\n ))}\r\n\r\n {error && (\r\n \r\n
    \r\n \r\n {error}\r\n \r\n
    \r\n )}\r\n
    \r\n\r\n \r\n \r\n\r\n \r\n \r\n Update\r\n \r\n \r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst Number = ({ value, dataTypeDecimalName }) => {\r\n if (value === null) {\r\n return \"-\";\r\n }\r\n\r\n return ;\r\n};\r\n\r\nconst FooterTotals = ({ totals }) => (\r\n
    \r\n
    \r\n \r\n \r\n {totals.clientQtyToAssign > 0 && (\r\n \r\n \r\n \r\n \r\n )}\r\n {totals.propQtyToAssign > 0 && (\r\n \r\n \r\n \r\n \r\n )}\r\n {totals.tradingQtyToAssign > 0 && (\r\n \r\n \r\n \r\n \r\n )}\r\n {totals.errorQtyToAssign > 0 && (\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n
    Client quantity\r\n \r\n
    Prop quantity\r\n \r\n
    Trading quantity\r\n \r\n
    Error quantity\r\n \r\n
    \r\n
    \r\n\r\n
    \r\n Leftovers\r\n \r\n \r\n {totals.clientQtyToAssign > 0 && (\r\n \r\n \r\n \r\n \r\n )}\r\n {totals.propQtyToAssign > 0 && (\r\n \r\n \r\n \r\n \r\n )}\r\n {totals.tradingQtyToAssign > 0 && (\r\n \r\n \r\n \r\n \r\n )}\r\n {totals.errorQtyToAssign > 0 && (\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n
    Client qty\r\n \r\n
    Prop qty\r\n \r\n
    Trading qty\r\n \r\n
    Error qty\r\n \r\n
    \r\n
    \r\n
    \r\n);\r\n\r\nexport default OrderQuantityToTradesAssignment;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"OrderQuantityToTradesAssignment-module_modal_58ZFU\",\"alert\":\"OrderQuantityToTradesAssignment-module_alert_28FDQ\",\"distributionType\":\"OrderQuantityToTradesAssignment-module_distributionType_FZwHl\",\"item\":\"OrderQuantityToTradesAssignment-module_item_1la37\",\"active\":\"OrderQuantityToTradesAssignment-module_active_25qpX\",\"fields\":\"OrderQuantityToTradesAssignment-module_fields_29pGY\",\"checkbox\":\"OrderQuantityToTradesAssignment-module_checkbox_28TyQ\",\"loadingCbox\":\"OrderQuantityToTradesAssignment-module_loadingCbox_2flxj\",\"arroba\":\"OrderQuantityToTradesAssignment-module_arroba_1q1HZ\",\"order\":\"OrderQuantityToTradesAssignment-module_order_yTI7F\",\"line\":\"OrderQuantityToTradesAssignment-module_line_1szhR\",\"footerTotals\":\"OrderQuantityToTradesAssignment-module_footerTotals_geYCR\",\"totalLine\":\"OrderQuantityToTradesAssignment-module_totalLine_3H9bW\",\"update\":\"OrderQuantityToTradesAssignment-module_update_3vLrD\",\"applyDist\":\"OrderQuantityToTradesAssignment-module_applyDist_x5R9h\",\"loading\":\"OrderQuantityToTradesAssignment-module_loading_3zPyP\",\"spinner\":\"OrderQuantityToTradesAssignment-module_spinner_1A7Hg\"};","import React from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport style from \"./FloatingButton.module.scss\";\r\nimport { Menu, MainButton, ChildButton } from \"../../FloattingButton\";\r\n\r\nconst FloatingButton = ({ onClick }) => (\r\n \r\n \r\n\r\n onClick()}\r\n />\r\n \r\n);\r\n\r\nFloatingButton.propTypes = {\r\n onClick: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default FloatingButton;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"root\":\"FloatingButton-module_root_Thf_-\",\"main\":\"FloatingButton-module_main_dAAlA\"};","import React, { useState } from \"react\";\r\nimport { Button, DropdownToggle, DropdownMenu, DropdownItem, UncontrolledDropdown } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport style from \"./Grid.module.scss\";\r\nimport { TransactionStatus } from \"../types\";\r\nimport { showToast } from \"../../../../utils/Helper\";\r\nimport ModalConfirm from \"../../../Profile/Modal/ModalConfirm\";\r\n\r\nfunction Actions({ commission, handleRefresh, fetchs, Link }) {\r\n const [loading, setLoading] = useState(false);\r\n const [modalConfirm, setModalConfirm] = useState({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n });\r\n\r\n const showHistory = () => {\r\n alert(\"Not working yet\");\r\n };\r\n\r\n const revert = () => {\r\n alert(\"Not working yet\");\r\n setModalConfirm({ open: false });\r\n };\r\n\r\n const book = () => {\r\n setLoading(true);\r\n fetchs.bookRecurringCommission({ id: commission.RecurringCommissionId }, (res) => {\r\n setLoading(true);\r\n setModalConfirm({ open: false, title: \"\", callback: undefined });\r\n if (res && res.result && res.result.Code === 200) {\r\n handleRefresh();\r\n showToast(\"Recurring Commission Booked!\");\r\n } else {\r\n showToast(res && res.result ? res.result.Description : \"Server Error\", true);\r\n }\r\n });\r\n };\r\n\r\n const cancel = () => {\r\n setLoading(true);\r\n fetchs.updateRecurringCommission(\r\n {\r\n k2btrnmode: \"DLT\",\r\n recurringcommissionsdt: { ...commission },\r\n },\r\n (res) => {\r\n setLoading(false);\r\n setModalConfirm({ open: false, title: \"\", callback: undefined });\r\n if (res && res.result && res.result.Code === 200) {\r\n handleRefresh();\r\n showToast(\"Recurring Commission canceled.\");\r\n } else {\r\n showToast(res && res.result ? res.result.Description : \"Server Error\", true);\r\n }\r\n }\r\n );\r\n };\r\n\r\n const crossReference = () => {};\r\n\r\n const action = {\r\n Cancel: cancel,\r\n Book: book,\r\n Revert: revert,\r\n CrossReference: crossReference,\r\n };\r\n\r\n const handleAction = (a) => {\r\n setModalConfirm({\r\n title: `Are you sure you want to ${a} the selected Rec. Commission?`,\r\n callback: action[a],\r\n open: true,\r\n });\r\n };\r\n\r\n return (\r\n \r\n
    \r\n {/* \r\n \r\n */}\r\n\r\n \r\n \r\n \r\n \r\n \r\n {commission.RecurringCommissionStatus.trim() === TransactionStatus.Initiated && (\r\n \r\n handleAction(\"Cancel\")}>Cancel\r\n handleAction(\"Book\")}>Book\r\n \r\n )}\r\n \r\n {/* handleAction(\"Revert\")}>\r\n Revert\r\n */}\r\n \r\n Go To Cross Reference\r\n \r\n \r\n \r\n \r\n
    \r\n setModalConfirm({ open: false, title: \"\", callback: undefined })}\r\n />\r\n
    \r\n );\r\n}\r\n\r\nActions.propTypes = {\r\n commission: PropTypes.object.isRequired,\r\n handleRefresh: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default Actions;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"desk\":\"Grid-module_desk_3pKwO\",\"table\":\"Grid-module_table_3xBim\",\"actions\":\"Grid-module_actions_1dn2m\",\"dropdown\":\"Grid-module_dropdown_-bgMx\",\"icon\":\"Grid-module_icon_3d3Rf\"};","import React from \"react\";\r\n// eslint-disable-next-line import/no-extraneous-dependencies\r\nimport { Table } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport style from \"./Grid.module.scss\";\r\nimport Actions from \"./Actions\";\r\nimport { RecurringCommissionType } from \"../types\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport { CircularProgress } from \"../../..\";\r\nimport { parseDate } from \"../../../../utils\";\r\n\r\nconst Grid = ({ commissions, toggleCommission, handleRefresh, fetchs, Link }) => {\r\n const renderTable = () => {\r\n if (!commissions || commissions.length === 0) {\r\n return ;\r\n }\r\n return (\r\n \r\n {commissions.map((c) => (\r\n \r\n toggleCommission(c)}>{RecurringCommissionType[c.RecurringCommissionType]}\r\n toggleCommission(c)}>\r\n -{\" \"}\r\n \r\n \r\n toggleCommission(c)}>\r\n {c.RecurringCommissionExecutionDate ? (\r\n \r\n ) : (\r\n \"-\"\r\n )}\r\n \r\n toggleCommission(c)}>{c.RecurringCommissionStatus}\r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n );\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {renderTable()}\r\n
    TypeRangeExecutionStatus\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nGrid.propTypes = {\r\n commissions: PropTypes.array,\r\n toggleCommission: PropTypes.func.isRequired,\r\n handleRefresh: PropTypes.func.isRequired,\r\n};\r\n\r\nconst EmptyTable = ({ loading }) => (\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n

    No Recurring Commissions

    \r\n )}\r\n \r\n \r\n);\r\n\r\nEmptyTable.propTypes = {\r\n loading: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default Grid;\r\n","import React, { useState, useEffect } from \"react\";\r\n// eslint-disable-next-line import/no-extraneous-dependencies\r\nimport { Table, Input } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\n\r\nimport style from \"./Grid.module.scss\";\r\nimport CircularProgress from \"../../../CircularProgress/CircularProgress\";\r\nimport LaddaButton, { EXPAND_LEFT } from \"react-ladda\";\r\nimport { initializeForm, preCheckForm, RecurringCommissionType } from \"../types\";\r\nimport { showToast } from \"../../../../utils/Helper\";\r\nimport { EXPAND_RIGHT } from \"react-ladda/dist/constants\";\r\nimport { NumberFormatInput } from \"../../../NumberFormatInput/NumberFormatInput\";\r\n\r\nconst AccountsGrid = ({ accounts, handleChange, disabled, fetchs, commission, status }) => {\r\n const [booking, setBooking] = useState([]);\r\n const [bookAccounts, setBookAccounts] = useState([]);\r\n\r\n useEffect(() => {\r\n if (accounts) {\r\n var book = booking;\r\n accounts.forEach((a) => {\r\n book[a.AccountId] = { loading: false, booked: false };\r\n });\r\n // setBookAccounts({bookAccounts: book});\r\n setBooking({ booking: book });\r\n }\r\n }, [accounts]);\r\n\r\n const bookGrid = (book, accountId) => {\r\n const body = {\r\n k2btrnmode: \"UPD\",\r\n recurringcommissionsdt: { ...commission, Accounts: accounts },\r\n };\r\n\r\n const newErrors = preCheckForm({ ...commission });\r\n if (Object.keys(newErrors).length > 0) {\r\n setErrors(newErrors);\r\n return;\r\n }\r\n\r\n setBooking({ ...booking, [accountId]: { loading: true, booked: false } });\r\n\r\n fetchs.updateRecurringCommission(body, (res) => afterSave(res, book, accountId));\r\n };\r\n\r\n const afterSave = (res, book, accountId) => {\r\n if (res && res.result && res.result.Code === 200) {\r\n fetchs.bookRecRecurringCommission(\r\n { id: commission.RecurringCommissionId, accountId: accountId },\r\n (res2) => {\r\n setBooking({ ...booking, [accountId]: { loading: false, booked: true } });\r\n // setBookAccounts({...bookAccounts, [accountId]: true});\r\n if (res2 && res2.result && res2.result.Code === 200) {\r\n //toggle(undefined, true);\r\n showToast(\"Recurring Commission Booked!\");\r\n } else {\r\n showToast(res2 && res2.result ? res2.result.Description : \"Server Error\", true);\r\n }\r\n }\r\n );\r\n } else {\r\n showToast(res && res.result ? res.result.Description : \"Server Error\", true);\r\n }\r\n };\r\n\r\n const renderTable = () => {\r\n if (!accounts || accounts.length === 0) {\r\n return ;\r\n }\r\n return (\r\n \r\n {accounts.map((a, index) => (\r\n \r\n {`${a.AccountNumber.trim()}`}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {disabled || a.RecurringCommissionAccountStatus == \"Executed\" ? (\r\n \r\n ) : (\r\n handleChange(index, e.value)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {status !== \"Executed\" &&\r\n (a.RecurringCommissionAccountStatus == \"Reverted\" ||\r\n a.RecurringCommissionAccountStatus == \"Initiated\") && (\r\n \r\n bookGrid(true, a.AccountId)}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {booking[a.AccountId] && booking[a.AccountId].loading ? \"Booking...\" : \"Book\"}\r\n \r\n \r\n )}\r\n \r\n ))}\r\n \r\n );\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {renderTable()}\r\n
    NameBuying PowerBase for calculationCommissionTaxTotal
    \r\n
    \r\n );\r\n};\r\n\r\nAccountsGrid.propTypes = {\r\n accounts: PropTypes.array.isRequired,\r\n handleChange: PropTypes.func.isRequired,\r\n disabled: PropTypes.bool.isRequired,\r\n};\r\n\r\nconst EmptyTable = ({ loading }) => (\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n

    No Accounts

    \r\n )}\r\n \r\n \r\n);\r\n\r\nEmptyTable.propTypes = {\r\n loading: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default AccountsGrid;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"desk\":\"Grid-module_desk_1DQAS\",\"table\":\"Grid-module_table_aEJS-\",\"actions\":\"Grid-module_actions_1fofz\",\"dropdown\":\"Grid-module_dropdown_1Vw9v\",\"icon\":\"Grid-module_icon_O74Aq\",\"buttonBook\":\"Grid-module_buttonBook_3_blZ\"};","import React, { useState, useEffect } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Row, Col, Button } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { initializeForm, preCheckForm, RecurringCommissionType } from \"../types\";\r\n// import {\r\n// updateRecurringCommission,\r\n// getRecurringCommission,\r\n// bookRecurringCommission\r\n// } from '../../../services/api/recurringCommissions';\r\nimport AccountsGrid from \"./AccountsGrid\";\r\nimport { parseDate, CustomFormInput, Mode, SelectFormField } from \"../../../../utils\";\r\nimport { showToast } from \"../../../../utils/Helper\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport Combobox from \"../../Order/Field/Combobox\";\r\n\r\nconst ModalRecurringCommission = ({ open, toggle, initialCommission, mode, fetchs }) => {\r\n const [commission, setCommission] = useState(initializeForm(initialCommission));\r\n const [accounts, setAccounts] = useState(undefined);\r\n const [errors, setErrors] = useState({});\r\n const [loading, setLoading] = useState(false);\r\n const [booking, setBooking] = useState(false);\r\n const [searching, setSearching] = useState(false);\r\n const [currency, setCurrency] = useState(1);\r\n const [currencies, setCurrencies] = useState([]);\r\n const [downloading, setdownloading] = useState(false);\r\n const [isCommissionCreated, setIsCommissionCreated] = useState(false);\r\n\r\n useEffect(() => {\r\n if (initialCommission != undefined) {\r\n setCurrency(initialCommission.currencyId);\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n fetchs.fetchGetCurrencies().then((r) => {\r\n let currenciesAux = [];\r\n r.currencies.map((currency) => {\r\n currenciesAux.push({ id: currency.currencyId, description: currency.currencyDescription });\r\n });\r\n setCurrencies(currenciesAux);\r\n });\r\n }, []);\r\n\r\n const onChangeCurrency = (newCurrency) => {\r\n setCurrency(newCurrency);\r\n };\r\n\r\n const onChange = (name, value, stringValue) => {\r\n setCommission((c) => {\r\n const newC = {\r\n ...c,\r\n [name]: value,\r\n };\r\n return newC;\r\n });\r\n setErrors((e) => {\r\n const newE = { ...e };\r\n delete newE[name];\r\n delete newE.globalError;\r\n return newE;\r\n });\r\n if (name === \"RecurringCommissionType\") setAccounts(undefined);\r\n };\r\n\r\n const afterSave = (res, book) => {\r\n setLoading(false);\r\n if (res && res.result && res.result.Code === 200) {\r\n if (book) {\r\n fetchs.bookRecurringCommission({ id: commission.RecurringCommissionId }, (res2) => {\r\n setBooking(false);\r\n if (res2 && res2.result && res2.result.Code === 200) {\r\n toggle(undefined, true);\r\n showToast(\"Recurring Commission Booked!\");\r\n } else {\r\n showToast(res2 && res2.result ? res2.result.Description : \"Server Error\", true);\r\n }\r\n });\r\n } else {\r\n toggle(undefined, true);\r\n showToast(\"Changes saved successfully!\");\r\n }\r\n } else {\r\n showToast(res && res.result ? res.result.Description : \"Server Error\", true);\r\n }\r\n };\r\n\r\n const handleSearch = () => {\r\n setSearching(true);\r\n fetchs.updateRecurringCommission(\r\n {\r\n k2btrnmode: \"INS\",\r\n recurringcommissionsdt: { ...commission, currencyId: currency },\r\n },\r\n (res) => {\r\n try {\r\n const { result, id } = res;\r\n if (result.Code === 200) {\r\n fetchs.getRecurringCommission({ id }, (resp) => {\r\n try {\r\n showToast(\"Commission created successfully!\");\r\n setSearching(false);\r\n setAccounts(resp.reccommission.Accounts);\r\n setCommission(initializeForm(resp.reccommission));\r\n setIsCommissionCreated(true)\r\n } catch (e) {\r\n showToast(\"Server Error\", true);\r\n }\r\n });\r\n } else {\r\n showToast(result.Description || \"Server Error\", true);\r\n }\r\n } catch (e) {\r\n showToast(\"Server Error\", true);\r\n }\r\n }\r\n );\r\n };\r\n\r\n const handleSave = (book) => {\r\n const body = {\r\n k2btrnmode: \"UPD\",\r\n recurringcommissionsdt: { ...commission, Accounts: accounts, currencyId: currency },\r\n };\r\n\r\n const newErrors = preCheckForm({ ...commission });\r\n if (Object.keys(newErrors).length > 0) {\r\n setErrors(newErrors);\r\n return;\r\n }\r\n if (book) {\r\n setBooking(true);\r\n } else {\r\n setLoading(true);\r\n }\r\n fetchs.updateRecurringCommission(body, (res) => afterSave(res, book));\r\n };\r\n\r\n const handleClose = () => {\r\n toggle(undefined, commission.RecurringCommissionId && !initialCommission);\r\n };\r\n\r\n const getTitle = () => {\r\n if (mode !== Mode.EDIT) return \"Recurring Commission\";\r\n if (initialCommission === undefined) return \"New Recurring Commission\";\r\n return \"Edit Recurring Commission\";\r\n };\r\n\r\n const handleChangeAccount = (index, volume) => {\r\n const tax = parseFloat(commission.VAT) / 100;\r\n setAccounts((a) =>\r\n a.map((acc, i) => {\r\n const newAcc = { ...acc };\r\n if (i === index) {\r\n newAcc.RecurringCommissionVolume = volume;\r\n newAcc.RecurringCommissionTotal = (volume || 0) / (1 - tax);\r\n newAcc.RecurringCommissionTax = newAcc.RecurringCommissionTotal - newAcc.RecurringCommissionVolume;\r\n }\r\n return newAcc;\r\n })\r\n );\r\n };\r\n\r\n useEffect(() => {\r\n if (!accounts && initialCommission) {\r\n setSearching(true);\r\n fetchs.getRecurringCommission({ id: initialCommission.RecurringCommissionId }, (res) => {\r\n setAccounts(res.reccommission.Accounts);\r\n setSearching(false);\r\n setCommission({ ...res.reccommission });\r\n setIsCommissionCreated(true)\r\n });\r\n }\r\n }, [accounts, initialCommission]);\r\n\r\n const concatData = async () => {\r\n setdownloading(true);\r\n let client = [];\r\n\r\n client = [...commission.Accounts];\r\n\r\n const recurringCommissionCurrency = currencies.find((item) => item.id === commission.currencyId);\r\n let clientdata = [];\r\n for (var j = 0; j < client.length; j++) {\r\n let item = {};\r\n item = {\r\n accountNumber: client[j].AccountNumber,\r\n accountName: client[j].AccountName,\r\n clientName: client[j].ClientName,\r\n clientDocumentNumber: client[j].ClientDocumentNumber,\r\n currency: recurringCommissionCurrency.description,\r\n bankAccount: client[j].BankAccountNumber,\r\n average: client[j].RecurringCommissionBaseCalculationShow,\r\n percentage: commission.commissionRecurringVolume.replace(\".\", \",\"),\r\n commission: client[j].RecurringCommissionVolumeShow,\r\n ivaIICB: client[j].RecurringCommissionTaxShow,\r\n totalIICB: client[j].RecurringCommissionTotalShow,\r\n };\r\n\r\n clientdata.push(item);\r\n }\r\n\r\n let response = undefined;\r\n let body = {\r\n id: commission.RecurringCommissionId,\r\n clients: clientdata,\r\n };\r\n\r\n await fetchs\r\n .recurringCommissionXLSX(body)\r\n .then((r) => {\r\n if (r.response.count > 0) {\r\n response = r.response.buffer.data;\r\n\r\n try {\r\n const blob = new Blob([new Uint8Array(response)], {\r\n type: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;\",\r\n });\r\n const link = document.createElement(\"a\");\r\n link.href = window.URL.createObjectURL(blob);\r\n link.download = \"RecurringCommission\" + String(commission.RecurringCommissionId) + \".xlsx\";\r\n link.click();\r\n setdownloading(false);\r\n } catch (ex) {}\r\n }\r\n })\r\n .catch((e) => {\r\n console.error(e);\r\n });\r\n //setReportResponse(response);\r\n };\r\n\r\n const disabled = mode !== Mode.EDIT;\r\n\r\n return (\r\n \r\n {getTitle()}\r\n \r\n \r\n \r\n i}\r\n getSelectItemName={(i) => RecurringCommissionType[i]}\r\n disabled={commission.RecurringCommissionId}\r\n />\r\n \r\n \r\n \r\n \r\n {!commission.RecurringCommissionId && (\r\n \r\n \r\n {searching ? \"Creating...\" : \"Create Commission\"}\r\n \r\n \r\n )}\r\n \r\n {commission.RecurringCommissionId && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n {commission.RecurringCommissionId && (\r\n \r\n )}\r\n \r\n \r\n {!isCommissionCreated &&(\r\n concatData()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n \r\n \r\n )}\r\n {isCommissionCreated &&(\r\n concatData()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n \r\n \r\n )}\r\n \r\n Close\r\n \r\n {accounts && !disabled && (\r\n \r\n 0 || booking}\r\n onClick={() => handleSave(false)}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {loading ? \"Saving\" : \"Save\"}\r\n \r\n 0 || loading}\r\n onClick={() => handleSave(true)}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {booking ? \"Booking...\" : \"Book All\"}\r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default ModalRecurringCommission;\r\n","import React from \"react\";\r\nimport { FormGroup, Label, Button } from \"reactstrap\";\r\nimport style from \"./Toolbar.module.scss\";\r\nimport { DateField } from \"../../../../utils\";\r\n\r\nconst Advanced = ({ open, from, to, handleChange, handleSearch, toggle }) => {\r\n if (open === false) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n\r\n \r\n \r\n );\r\n};\r\n\r\nexport default Advanced;\r\n","import React from 'react';\r\nimport { InputGroup, Input, Button } from 'reactstrap';\r\n\r\n\r\nconst SearchBox = ({\r\n changeValue,\r\n text,\r\n open,\r\n Desktop,\r\n toggleAdvanced,\r\n}) => (\r\n \r\n \r\n
    \r\n \r\n \r\n \r\n
    \r\n\r\n changeValue(e.target.value)}\r\n />\r\n {!open && (\r\n \r\n
    \r\n \r\n
    \r\n
    \r\n )}\r\n
    \r\n
    \r\n );\r\n\r\nexport default SearchBox;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"toolbar\":\"Toolbar-module_toolbar_2_NmT\",\"filterDropdown\":\"Toolbar-module_filterDropdown_2CXHH\",\"dropdown\":\"Toolbar-module_dropdown_3QfVb\",\"export\":\"Toolbar-module_export_1Cvgu\",\"totals\":\"Toolbar-module_totals_3ZOuZ\",\"advanced\":\"Toolbar-module_advanced_1BeYe\",\"inputs\":\"Toolbar-module_inputs_2irjy\"};","import React, { useState } from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport Responsive from \"react-responsive\";\r\nimport style from \"./Toolbar.module.scss\";\r\n\r\nimport SearchBox from \"./SearchBox\";\r\nimport Advanced from \"./Advanced\";\r\n\r\nconst Toolbar = ({ changeFilter, counters, search, changeSearch, filters }) => {\r\n const [range, setRange] = useState({\r\n from: filters.from,\r\n to: filters.to,\r\n });\r\n const [openAdvanced, setOpen] = useState(false);\r\n const applyChanges = () => changeFilter(range.from, range.to);\r\n\r\n return (\r\n
    \r\n \r\n \r\n {/* Totals */}\r\n \r\n \r\n \r\n {/* Search input and Advanced */}\r\n
    \r\n setOpen((o) => !o)}\r\n />\r\n\r\n applyChanges()}\r\n toggle={() => setOpen((o) => !o)}\r\n handleChange={(name, value) =>\r\n setRange((r) => ({\r\n ...r,\r\n [name]: new Date(value).toLocaleDateString(\"en\"),\r\n }))\r\n }\r\n from={range.from}\r\n to={range.to}\r\n open={openAdvanced}\r\n />\r\n
    \r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst Desktop = (props) => ;\r\n\r\nconst Counter = ({ total, filtered }) => (\r\n \r\n
    Recurring Commissions: {total}
    \r\n\r\n
    {filtered} filtered
    \r\n
    \r\n);\r\n\r\nexport default Toolbar;\r\n","import Toolbar from \"./Toolbar/index\";\r\nimport Grid from \"./Grid/index\";\r\nimport FloatingButton from \"./FloatingButton\";\r\nimport ModalRecurringCommission from \"./Modal/index\";\r\nimport {TransactionStatus, RecurringCommissionType} from \"./types\";\r\nexport {\r\n Toolbar,\r\n Grid,\r\n FloatingButton,\r\n TransactionStatus,\r\n RecurringCommissionType,\r\n ModalRecurringCommission\r\n};\r\n","export const preCheckForm = (commission) => {\r\n const errors = {};\r\n Object.keys(commission).forEach((key) => {\r\n switch (key) {\r\n default:\r\n break;\r\n }\r\n });\r\n return errors;\r\n};\r\n\r\nexport const initializeForm = (initialC) => {\r\n if (initialC) {\r\n return {\r\n ...initialC,\r\n RecurringCommissionFrom: initialC.RecurringCommissionFrom,\r\n RecurringCommissionTo: initialC.RecurringCommissionTo,\r\n };\r\n }\r\n return {\r\n RecurringCommissionType: \"\",\r\n RecurringCommissionFrom: \"\",\r\n RecurringCommissionTo: \"\",\r\n }; // missing\r\n};\r\n\r\nexport const RecurringCommissionType = {\r\n ManagementFee: \"Management Fee\",\r\n CustodyFee: \"Custody Fee\",\r\n OpeningFee: \"Opening Fee\",\r\n NoTradeFee: \"No Trade Fee\",\r\n AllInFee: \"All In Fee\",\r\n};\r\n\r\nexport const TransactionStatus = {\r\n Initiated: \"Initiated\",\r\n OnValidation: \"On Validation\",\r\n Validated: \"Validated\",\r\n Rejected: \"Rejected\",\r\n Cancelled: \"Cancelled\",\r\n Executed: \"Executed\",\r\n Reverted: \"Reverted\",\r\n Authorizing: \"Authorizing\",\r\n};\r\n","import React, { useState } from \"react\";\r\nimport { Col, Row, Table } from \"reactstrap\";\r\nimport style from \"./styles.module.scss\";\r\n\r\nconst GridPeopleInfo = ({ reportBCU, deletePerson }) => {\r\n return (\r\n
    \r\n
    People Selected
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {reportBCU &&\r\n reportBCU.map((person) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n })}\r\n \r\n
    TypeName\r\n
    {person.personType}{person.personName} deletePerson(person.personId)}>\r\n \r\n
    \r\n
    \r\n );\r\n};\r\nexport default GridPeopleInfo;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Col, Row, InputGroup, InputGroupAddon, InputGroupText, Button } from \"reactstrap\";\r\nimport style from \"./styles.module.scss\";\r\nimport { DateFieldStyle, DateField } from \"../../../utils\";\r\nimport { Autosuggest } from \"../..\";\r\nimport GridPeopleInfo from \"./GridRequestPeopleInfoFields\";\r\nimport { debounce } from \"../../../utils/Helper\";\r\n\r\nconst initialFilter = {\r\n personId: null,\r\n personName: null,\r\n personType: null,\r\n fromDate: null,\r\n toDate: null,\r\n};\r\n\r\nconst RequestPeopleInfoFields = ({\r\n fetchs,\r\n personToList,\r\n reportBCU,\r\n deletePersonFromList,\r\n fromDateReport,\r\n toDateReport,\r\n changeDateInfoRequest,\r\n error,\r\n searchperson,\r\n labelDate,\r\n disabled,\r\n dates,\r\n}) => {\r\n const [filter, setFilter] = useState(initialFilter);\r\n\r\n useEffect(() => {\r\n setFilter({\r\n ...filter,\r\n fromDate: fromDateReport,\r\n toDate: toDateReport,\r\n });\r\n }, [fromDateReport, toDateReport]);\r\n\r\n const changeFilter = (name, value) => {\r\n if (name == \"changePerson\") {\r\n if (value.name == undefined) {\r\n setFilter({\r\n ...filter,\r\n personType: undefined,\r\n personName: value,\r\n personId: undefined,\r\n });\r\n } else {\r\n setFilter({\r\n ...filter,\r\n personId: value.id,\r\n personName: value.name,\r\n personType: value.type,\r\n });\r\n }\r\n } else {\r\n changeDateInfoRequest(name, value);\r\n }\r\n };\r\n\r\n const fetchSearch = ({ value }) => {\r\n return fetchs\r\n .SearchAllPeople({\r\n SdtPersonSearch: {\r\n text: value,\r\n personType: \"\",\r\n len: 10,\r\n },\r\n })\r\n .then((r) => r.SdtOutPersons.collection)\r\n .then((people) => {\r\n return people.map((s) => ({\r\n id: s.PersonId,\r\n name: `${s.PersonLegalName}`,\r\n type: s.PersonName,\r\n }));\r\n });\r\n };\r\n\r\n const onChangePerson = () => {\r\n personToList(filter);\r\n };\r\n\r\n const deletePerson = (personId) => {\r\n deletePersonFromList(personId);\r\n };\r\n\r\n return (\r\n
    \r\n {dates && (\r\n \r\n \r\n changeFilter(name, value)}\r\n value={filter.fromDate}\r\n disabled={disabled}\r\n />\r\n \r\n \r\n changeFilter(name, value)}\r\n value={filter.toDate}\r\n disabled={disabled}\r\n />\r\n \r\n \r\n )}\r\n\r\n {error && (\r\n \r\n {error}\r\n \r\n )}\r\n {searchperson && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n (\r\n
    \r\n {` ${suggestion.name}`}\r\n
    \r\n )}\r\n getSuggestionValue={(s) => `${s.name}`}\r\n onSuggestionsFetchRequested={fetchSearch}\r\n value={filter.accountText || \"\"}\r\n inputProps={{\r\n placeholder: \"Person\",\r\n }}\r\n fetchs={fetchs}\r\n onChange={(m, v) => {\r\n changeFilter(\"changePerson\", v);\r\n }}\r\n />\r\n
    \r\n \r\n \r\n \r\n \r\n
    \r\n )}\r\n {searchperson && }\r\n
    \r\n );\r\n};\r\nexport default RequestPeopleInfoFields;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"toolbar\":\"styles-module_toolbar_324My\",\"minWidth135\":\"styles-module_minWidth135_3gEDA\",\"suggestionItem\":\"styles-module_suggestionItem_51zIQ\",\"label\":\"styles-module_label_1viYJ\",\"header\":\"styles-module_header_13_mY\",\"grid\":\"styles-module_grid_2mgiw\",\"actions\":\"styles-module_actions_23b4r\",\"dropdown\":\"styles-module_dropdown_1DsBP\",\"icon\":\"styles-module_icon_cEq_M\",\"buttonAlign\":\"styles-module_buttonAlign_ceaUV\"};","import React from 'react';\r\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';\r\n\r\nclass Alert extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n open: props.isOpen\r\n };\r\n }\r\n \r\n\r\n toggle = () => {\r\n this.setState(prevState => ({\r\n open: !prevState.open\r\n }), (state, prev) => {\r\n if(!this.state.open && this.props.onClose)\r\n this.props.onClose()\r\n });\r\n }\r\n\r\n componentWillReceiveProps(newProps){\r\n if(this.state.open != newProps.isOpen)\r\n this.setState({open: newProps.isOpen})\r\n }\r\n\r\n render() {\r\n const {open} = this.state;\r\n\r\n return (\r\n
    \r\n \r\n {this.props.title}\r\n \r\n {this.props.message}\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport default Alert;","import React, { Component } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, Row, Col, ModalFooter, Button, Table } from \"reactstrap\";\r\nimport style from \"./Trade.module.scss\";\r\nimport { OrderStatus, CommonsHelper, ProductType, OrderPriceType } from \"../../../utils\";\r\nimport { debounce } from \"../../../utils/Helper\";\r\nimport CircularProgress from \"../../CircularProgress/CircularProgress\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport ItemRow from \"../Cross/ItemRow\";\r\nimport { Field, Combobox } from \"../Order/Field/Field\";\r\nimport { EmptyOrders, AlertError, FooterForm, HeaderForm, Number } from \"./Utils\";\r\nimport Trading from \"./Trading\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\n\r\nconst { localDateTime } = CommonsHelper;\r\n\r\nconst defaultSides = (price) => ({\r\n buy: [{ id: 1, price, route: null, date: new Date().toDatetimeLocal() }],\r\n sell: [{ id: 1, price, route: null, date: new Date().toDatetimeLocal() }],\r\n});\r\n\r\nclass Trade extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n const fields = this.props.defaultFields();\r\n\r\n this.tradingRef = React.createRef();\r\n this.state = {\r\n entities: {\r\n routes: [],\r\n accounts: null,\r\n errorAccounts: null,\r\n orders: null,\r\n },\r\n loadings: {\r\n execute: false,\r\n distribute: false,\r\n },\r\n items: {\r\n account: { enabled: false },\r\n errorAccount: { enabled: false },\r\n trading: {\r\n enabled: false,\r\n sides: defaultSides(fields.price),\r\n },\r\n },\r\n ui: {\r\n distributed: false,\r\n leftOvers: null,\r\n },\r\n errors: {},\r\n fields,\r\n showFees: false,\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n const { fetchTradingRoutesForAsset, fetchSearchAccount, fetchSearchErrorAccount, getBooktypes } = this.props.services;\r\n const { fields } = this.state;\r\n const { tradeId, asset, tradeCurrencyId, form, manualFX, quantity } = fields;\r\n\r\n if (asset && asset.id) {\r\n fetchTradingRoutesForAsset({ assetId: asset.id, quantity: quantity }).then((res) => {\r\n this.setState((state) => ({\r\n entities: {\r\n ...state.entities,\r\n routes: res.response.sorroutes.map((r) => ({\r\n id: r.id,\r\n description: r.name,\r\n })),\r\n },\r\n }));\r\n });\r\n }\r\n\r\n const isFX = form == \"Forex\";\r\n\r\n if ((isFX && tradeCurrencyId) || asset.id) {\r\n this.getSettlementCurrencies(!tradeId, !manualFX);\r\n\r\n this.getTradePossibleOrders(true, true);\r\n }\r\n\r\n // retrieve accounts\r\n fetchSearchAccount({ text: \"\", length: 99 })\r\n .then((res) => res.response.accounts)\r\n .then((accounts) =>\r\n this.setState((state) => ({\r\n entities: {\r\n ...state.entities,\r\n accounts: accounts.map((a) => ({\r\n id: a.Id,\r\n description: JSON.parse(a.Value).value,\r\n })),\r\n },\r\n }))\r\n );\r\n\r\n // retrieve error accounts\r\n fetchSearchErrorAccount({ text: \"\", length: 99 })\r\n .then((res) => res.response.accounts)\r\n .then((accounts) =>\r\n this.setState((state) => ({\r\n entities: {\r\n ...state.entities,\r\n errorAccounts: accounts.map((a) => ({\r\n id: a.Id,\r\n description: JSON.parse(a.Value).value,\r\n })),\r\n },\r\n }))\r\n );\r\n\r\n if (getBooktypes) {\r\n const isTrader = this.state.ui.userRole === \"Trader\";\r\n getBooktypes(isTrader).then((r) => {\r\n if (r.response && r.response.booktypes) {\r\n this.setState((state) => ({...state,\r\n entities: {\r\n ...state.entities,\r\n booktypes: r.response.booktypes\r\n },\r\n }));\r\n }\r\n })\r\n } else {\r\n this.setState((state) => ({...state,\r\n entities: {\r\n ...state.entities,\r\n booktypes: []\r\n },\r\n }));\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState, snapshot) {\r\n const { fetchTradePossibleOrders, fetchTradingRoutesForAsset, getExecutionFees, fetchGetCalculator } =\r\n this.props.services;\r\n const { fields } = this.state;\r\n const {\r\n tradeId,\r\n side,\r\n form,\r\n asset,\r\n price,\r\n settlementCurrencyId,\r\n tradeCurrencyId,\r\n quantity,\r\n date,\r\n valueDate,\r\n manualFX,\r\n route,\r\n } = fields;\r\n const { fields: prevFields } = prevState;\r\n const {\r\n side: prevSide,\r\n form: prevForm,\r\n asset: prevAsset,\r\n price: prevPrice,\r\n settlementCurrencyId: prevSettlementCurrencyId,\r\n tradeCurrencyId: prevTradeCurrencyId,\r\n date: prevDate,\r\n valueDate: prevValueDate,\r\n route: prevRoute,\r\n quantity: prevQuantity,\r\n } = prevFields;\r\n\r\n if (\r\n side !== prevSide ||\r\n form !== prevForm ||\r\n asset.id !== prevAsset.id ||\r\n price !== prevPrice ||\r\n settlementCurrencyId !== prevSettlementCurrencyId ||\r\n tradeCurrencyId !== prevTradeCurrencyId ||\r\n date !== prevDate ||\r\n valueDate !== prevValueDate\r\n ) {\r\n const isFX = form == \"Forex\";\r\n\r\n if (asset.id !== prevAsset.id || tradeCurrencyId !== prevTradeCurrencyId || date !== prevDate) {\r\n if ((isFX && tradeCurrencyId) || asset.id) {\r\n this.getSettlementCurrencies(true, !manualFX);\r\n }\r\n }\r\n\r\n if (\r\n side !== prevSide ||\r\n form !== prevForm ||\r\n asset.id !== prevAsset.id ||\r\n price !== prevPrice ||\r\n settlementCurrencyId !== prevSettlementCurrencyId ||\r\n tradeCurrencyId !== prevTradeCurrencyId\r\n ) {\r\n this.getTradePossibleOrdersDebounced(false, false);\r\n }\r\n\r\n if (form != prevForm) {\r\n this.setState((state) => ({\r\n entities: {\r\n ...state.entities,\r\n asset: {\r\n id: null,\r\n name: null,\r\n error: null,\r\n },\r\n routes: [],\r\n },\r\n }));\r\n } else if (asset.id != prevAsset.id) {\r\n if (asset.id) {\r\n this.setState((state) => ({\r\n entities: {\r\n ...state.entities,\r\n routes: null,\r\n },\r\n }));\r\n fetchTradingRoutesForAsset({ assetId: asset.id, quantity: quantity }).then((res) => {\r\n this.setState((state) => ({\r\n entities: {\r\n ...state.entities,\r\n routes: res.response.sorroutes.map((r) => ({\r\n id: r.id,\r\n description: r.name,\r\n })),\r\n },\r\n }));\r\n });\r\n } else {\r\n this.setState((state) => ({\r\n entities: {\r\n ...state.entities,\r\n routes: [],\r\n },\r\n }));\r\n }\r\n }\r\n }\r\n\r\n if (price !== prevPrice || quantity !== prevQuantity || route !== prevRoute || date !== prevDate) {\r\n const body = {\r\n assetId: asset.id,\r\n isSecurity: true,\r\n quantity: quantity || 0,\r\n price: price || 0,\r\n date: date,\r\n };\r\n\r\n fetchGetCalculator(body)\r\n .then((res) => {\r\n const ExecutionTotal = res.calculator.total;\r\n\r\n getExecutionFees({\r\n execution: {\r\n ExecutionQuantity: quantity || 0,\r\n ExecutionPrice: price || 0,\r\n ExecutionValueDate: date,\r\n TradingRouteId: route || 0,\r\n ExecutionTotal: ExecutionTotal,\r\n SettlementCurrencyId: this.state.fields.settlementCurrencyId,\r\n },\r\n }).then(({ response }) => {\r\n const newFees = response.execution.Fees;\r\n\r\n this.setState({\r\n ...this.state,\r\n fields: {\r\n ...this.state.fields,\r\n Fees: newFees,\r\n },\r\n });\r\n });\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error fetching fees\");\r\n });\r\n }\r\n }\r\n\r\n getTradePossibleOrdersDebounced = debounce((updateSelectedOrders, checkDefaultOrder) => {\r\n this.getTradePossibleOrders(updateSelectedOrders, checkDefaultOrder);\r\n }, 600);\r\n\r\n getTradePossibleOrders = (updateSelectedOrders, checkDefaultOrder) => {\r\n const { services, defaultSelectedOrderId } = this.props;\r\n const { fetchTradePossibleOrders } = services;\r\n const { fields } = this.state;\r\n const { tradeId, side, form, asset, price, quantity, settlementCurrencyId } = fields;\r\n\r\n this.setState((state) => ({\r\n loadings: {\r\n ...state.loadings,\r\n distribute: true,\r\n },\r\n }));\r\n\r\n fetchTradePossibleOrders({\r\n trade: {\r\n TradeId: tradeId,\r\n TradeSide: side == \"Sell\" ? \"SELL\" : \"BUY\",\r\n TradeAssetClassForm: form,\r\n TradeAssetId: asset.id,\r\n TradeAvgPrice: price,\r\n TradeQuantity: quantity,\r\n TradeSettleCurrencyId: settlementCurrencyId,\r\n },\r\n })\r\n .then((res) => res.response.tradeOrders)\r\n .then((orders) => {\r\n const categorizedOrders = this.categorizeFetchedOrders(orders);\r\n\r\n const selectedOrders = updateSelectedOrders ? categorizedOrders.orderItems : {};\r\n\r\n if (checkDefaultOrder && defaultSelectedOrderId) {\r\n const orderToCheck = selectedOrders[defaultSelectedOrderId];\r\n if (orderToCheck) {\r\n orderToCheck.enabled = true;\r\n orderToCheck.quantity = quantity;\r\n }\r\n }\r\n\r\n const updateTradeQuantityOnRefresh = checkDefaultOrder;\r\n\r\n this.setState(\r\n (state) => ({\r\n entities: {\r\n ...state.entities,\r\n orders: categorizedOrders.clientOrders,\r\n propOrders: categorizedOrders.propOrders,\r\n },\r\n items: {\r\n ...state.items,\r\n ...selectedOrders,\r\n trading: {\r\n ...state.items.trading,\r\n enabled: state.items.trading.enabled || categorizedOrders.tradingIsEnabled,\r\n sides: categorizedOrders.tradingSides,\r\n },\r\n },\r\n loadings: {\r\n ...state.loadings,\r\n distribute: false,\r\n },\r\n }),\r\n () => this.refreshTotals(updateTradeQuantityOnRefresh)\r\n );\r\n });\r\n };\r\n\r\n getSettlementCurrencies = (updateValueDate, updateFX) => {\r\n const { services } = this.props;\r\n const { fetchOrderAssetInfo } = services;\r\n const { fields } = this.state;\r\n\r\n const data = {\r\n tradeDate: fields.date,\r\n valueDate: fields.valueDate,\r\n useValueDate: !updateValueDate,\r\n orderForm: fields.form,\r\n assetId: fields.asset.id,\r\n assetTicker: \"\",\r\n tradeCurrencyId: fields.tradeCurrencyId,\r\n settleCurrencyId: fields.settlementCurrencyId,\r\n };\r\n\r\n const currentSettleCurrency = fields.settlementCurrencyId;\r\n const currentSettleCurrencySymbol = fields.settlementCurrencySymbol;\r\n\r\n fetchOrderAssetInfo(data).then((res) => {\r\n const { settlementCurrency: settlementCurrencies, items } = res.response.assetorderdata;\r\n\r\n const tradeCurrencyISO = items.find((i) => i.key == \"Currency\").value;\r\n const maxDecimals = items.find((i) => i.key == \"MaxDecimals\").value;\r\n\r\n this.setState((state) => ({\r\n ...state,\r\n maxDecimals,\r\n }));\r\n\r\n if (settlementCurrencies) {\r\n const settlementCurrenciesList = settlementCurrencies.map((c) => ({\r\n id: c.currencyInfo.currencyId,\r\n description: c.currencyInfo.currencyISO,\r\n multiplies: c.multiplies,\r\n FX: c.fx,\r\n }));\r\n\r\n let settleCurrencyId = currentSettleCurrency;\r\n let settleCurrencySymbol = currentSettleCurrencySymbol;\r\n if (\r\n currentSettleCurrency == 0 ||\r\n !settlementCurrenciesList.find((c) => c.id == currentSettleCurrency)\r\n ) {\r\n settleCurrencyId = settlementCurrenciesList[0] ? settlementCurrenciesList[0].id : 0;\r\n settleCurrencySymbol = settlementCurrenciesList[0] ? settlementCurrenciesList[0].description : \"\";\r\n }\r\n\r\n let FX = fields.FX;\r\n if (updateFX) {\r\n const settleCurrency = settlementCurrencies.find(\r\n (c) => c.currencyInfo.currencyId == settleCurrencyId\r\n );\r\n FX = parseFloat(settleCurrency.fx);\r\n }\r\n\r\n this.setState((state) => ({\r\n fields: {\r\n ...state.fields,\r\n tradeCurrencySymbol: tradeCurrencyISO,\r\n settlementCurrencyId: settleCurrencyId,\r\n settlementCurrencySymbol: settleCurrencySymbol,\r\n FX,\r\n settlementCurrencies: settlementCurrenciesList,\r\n },\r\n }));\r\n }\r\n if (updateValueDate) {\r\n const valueDate = items.find((i) => i.key == \"SettlementDayDate\");\r\n this.setState((state) => ({\r\n fields: {\r\n ...state.fields,\r\n valueDate: valueDate.value,\r\n },\r\n }));\r\n }\r\n });\r\n };\r\n\r\n onChange = (name, { values, value }) => {\r\n const _value = values || value;\r\n const ui = { ...this.state.ui };\r\n const fields = {};\r\n\r\n if ([\"side\", \"form\", \"asset\", \"price\"].includes(name)) {\r\n ui.distributed = false;\r\n }\r\n if (name == \"form\") {\r\n fields.asset = { id: null, name: \"\" };\r\n }\r\n if (name == \"settlementCurrencyId\") {\r\n fields.settlementCurrencySymbol = this.state.fields.settlementCurrencies.filter((c) => {\r\n return c.id == value;\r\n })[0].description;\r\n }\r\n if (name == \"tradeCurrency\") {\r\n fields.tradeCurrencyId = values.id;\r\n fields.tradeCurrencySymbol = values.name;\r\n }\r\n\r\n this.setState(\r\n (state) => ({\r\n fields: {\r\n ...state.fields,\r\n ...fields,\r\n [name]: _value,\r\n },\r\n errors: {\r\n ...state.errors,\r\n [name]: undefined,\r\n },\r\n ...ui,\r\n }),\r\n () => this.refreshTotals(false)\r\n );\r\n };\r\n\r\n changeItem = (id, name, value) => {\r\n const item = this.state.items[id];\r\n const items = {\r\n ...this.state.items,\r\n [id]: {\r\n ...item,\r\n [name]: isNaN(value) || value == \"\" ? value : +value,\r\n [`error_${name}`]: undefined,\r\n },\r\n };\r\n this.setState(\r\n {\r\n items,\r\n },\r\n () => this.refreshTotals(true)\r\n );\r\n };\r\n\r\n changeTrading = (fields) => {\r\n this.setState(\r\n (state) => ({\r\n items: {\r\n ...state.items,\r\n trading: {\r\n ...state.items.trading,\r\n ...fields,\r\n },\r\n },\r\n }),\r\n () => this.refreshTotals(true)\r\n );\r\n };\r\n\r\n toggleItem = (id) => {\r\n const item = this.state.items[id] || { enabled: false };\r\n const { orders } = this.state.entities;\r\n\r\n const order = orders.find((o) => o.Order.OrderId == id);\r\n\r\n if (!item.enabled) {\r\n let remainingQty = this.state.fields.quantity;\r\n\r\n Object.entries(this.state.items).forEach((e) => (remainingQty -= e[1].enabled ? +e[1].quantity : 0));\r\n\r\n if (remainingQty > 0 || this.isReadonlyTrade()) {\r\n item.quantity = Math.max(Math.min(remainingQty, +order.Order.stats.pending), 0);\r\n }\r\n }\r\n\r\n this.setState(\r\n (state) => ({\r\n items: {\r\n ...state.items,\r\n [id]: {\r\n ...item,\r\n loading: false,\r\n enabled: !item.enabled,\r\n error_price: item.enabled ? undefined : item.error_price,\r\n error_quantity: item.enabled ? undefined : item.error_quantity,\r\n },\r\n },\r\n }),\r\n () => this.refreshTotals(true)\r\n );\r\n };\r\n\r\n toggleItemAccount = (id) => {\r\n const item = this.state.items[id] || { enabled: false };\r\n\r\n if (!item.enabled) {\r\n let remainingQty = this.state.fields.quantity;\r\n\r\n Object.entries(this.state.items).forEach((e) => (remainingQty -= e[1].enabled ? +e[1].quantity : 0));\r\n\r\n if (remainingQty > 0 || this.isReadonlyTrade()) {\r\n item.quantity = remainingQty;\r\n }\r\n }\r\n\r\n this.setState(\r\n (state) => ({\r\n items: {\r\n ...state.items,\r\n [id]: {\r\n ...item,\r\n loading: false,\r\n enabled: !item.enabled,\r\n error_price: item.enabled ? undefined : item.error_price,\r\n error_quantity: item.enabled ? undefined : item.error_quantity,\r\n },\r\n },\r\n }),\r\n () => this.refreshTotals(true)\r\n );\r\n };\r\n\r\n refreshTotals = (updateTradeQuantity) => {\r\n const { ui, fields, items, maxDecimals } = this.state;\r\n const { leftOvers: oldLeftOvers } = ui;\r\n let leftOvers = null;\r\n\r\n //if (ui.distributed) {\r\n // sum all enabled items\r\n let sum = 0;\r\n Object.values(items).forEach((e) => {\r\n if (e.sides) {\r\n if (fields.side == \"Buy\") {\r\n e.sides.buy.forEach((item) => {\r\n sum +=\r\n item.isFromThisTrade && item.quantity && !isNaN(parseFloat(item.quantity))\r\n ? +parseFloat(item.quantity)\r\n : 0;\r\n });\r\n } else {\r\n e.sides.sell.forEach((item) => {\r\n sum +=\r\n item.isFromThisTrade && item.quantity && !isNaN(parseFloat(item.quantity))\r\n ? +parseFloat(item.quantity)\r\n : 0;\r\n });\r\n }\r\n } else {\r\n sum += e.enabled && !isNaN(parseFloat(e.quantity)) ? +parseFloat(e.quantity) : 0;\r\n }\r\n });\r\n\r\n sum = parseFloat(sum).toFixed(maxDecimals);\r\n\r\n let quantity = parseFloat(fields.quantity);\r\n if (updateTradeQuantity && oldLeftOvers == 0 && !this.isReadonlyTrade()) {\r\n // If leftovers was 0, then the quantity of the trade was equal to the sum of the orders.\r\n // We keep it that way.\r\n quantity = sum;\r\n }\r\n\r\n leftOvers = quantity - sum;\r\n //}\r\n\r\n this.setState((state) => ({\r\n fields: {\r\n ...state.fields,\r\n quantity,\r\n },\r\n ui: {\r\n ...state.ui,\r\n leftOvers,\r\n },\r\n }));\r\n };\r\n\r\n validate = () => {\r\n let { items } = this.state;\r\n const { orders } = this.state.entities;\r\n\r\n let hasErrors = false;\r\n let hasItems = false;\r\n const errors = {\r\n counterparty: undefined,\r\n route: undefined,\r\n global: undefined,\r\n };\r\n const { route, counterparty, form, side, asset, price, date, valueDate } = this.state.fields;\r\n\r\n if (counterparty.id === undefined || counterparty.id === null) {\r\n errors.counterparty = \"Required field\";\r\n hasErrors = true;\r\n }\r\n if (route === undefined || route === null) {\r\n errors.route = \"Required field\";\r\n hasErrors = true;\r\n }\r\n errors.date = null;\r\n errors.valueDate = null;\r\n if (date === undefined || date === null) {\r\n errors.date = \"Required field\";\r\n hasErrors = true;\r\n }\r\n if (valueDate === undefined || valueDate === null) {\r\n errors.valueDate = \"Required field\";\r\n hasErrors = true;\r\n }\r\n\r\n let dateAux = new Date(date);\r\n dateAux = new Date(`${dateAux.toDateLocal()}T00:00`);\r\n const valueDateAux = new Date(`${valueDate}T00:00`);\r\n if (dateAux > valueDateAux) {\r\n errors.date = \"Trade date should be before or at value date\";\r\n errors.valueDate = \"Value date should be after or at trade date\";\r\n hasErrors = true;\r\n }\r\n\r\n const tradeDate = dateAux;\r\n\r\n Object.entries(items).forEach(([name, value]) => {\r\n const order = orders.find((o) => o.Order.OrderId == name);\r\n\r\n if (value.enabled) {\r\n if (name !== \"trading\") {\r\n if (!value.quantity || value.quantity === \"\") {\r\n items[name].error_quantity = \"Required field\";\r\n hasErrors = true;\r\n } else if (order && value.quantity > +order.Order.stats.pending) {\r\n items[name].error_quantity = \"Quantity is over order\";\r\n hasErrors = true;\r\n }\r\n\r\n if (!order && value.account == undefined) {\r\n items[name].error_account = \"Required field\";\r\n hasErrors = true;\r\n }\r\n }\r\n hasItems = true;\r\n }\r\n });\r\n\r\n const tradingValid = this.tradingRef.current.validate();\r\n\r\n if (this.state.ui.leftOvers < 0) {\r\n errors.global = \"Total execution quantity is over quanttiy\";\r\n hasErrors = true;\r\n } else if (tradingValid.error) {\r\n errors.global = tradingValid.global;\r\n hasErrors = true;\r\n }\r\n\r\n this.setState((state) => ({\r\n items,\r\n errors: {\r\n ...state.errors,\r\n ...errors,\r\n },\r\n }));\r\n\r\n return !hasErrors;\r\n };\r\n\r\n execute = () => {\r\n if (this.validate()) {\r\n const { fetchUpdateTradeAndComposition } = this.props.services;\r\n const { fields, items, entities } = this.state;\r\n const {\r\n tradeId,\r\n asset,\r\n route,\r\n side,\r\n quantity,\r\n price,\r\n date,\r\n valueDate,\r\n form,\r\n counterparty,\r\n settlementCurrencyId,\r\n FXRoute,\r\n FX,\r\n settlementCurrencies,\r\n booktype,\r\n balancetype\r\n } = fields;\r\n const tradings = this.tradingRef.current.values();\r\n\r\n const settleCurrency = settlementCurrencies.find((c) => c.id == settlementCurrencyId);\r\n let multiplies = true;\r\n if (settleCurrency) {\r\n multiplies = settleCurrency.multiplies;\r\n }\r\n let tradeAndComposition = {\r\n TradeId: tradeId,\r\n TradeSide: side,\r\n TradeAssetClassForm: form,\r\n TradeAssetId: asset.id,\r\n TradeQuantity: quantity,\r\n TradeAvgPrice: price,\r\n TradingRouteId: route[\"id\"] ? route.id : route,\r\n CounterPartyId: counterparty.id,\r\n TradeTradeDateTime: date,\r\n TradeValueDate: valueDate,\r\n TradeSettleCurrencyId: settlementCurrencyId,\r\n TradeFXRoute: FXRoute,\r\n TradeFX: FX,\r\n TradeFXMultiplies: multiplies,\r\n Orders: [],\r\n TradeBookType: booktype,\r\n TradeBalanceType: balancetype\r\n };\r\n\r\n let orders = [];\r\n\r\n Object.entries(items).forEach((entry) => {\r\n const [id, value] = entry;\r\n\r\n if (value.enabled) {\r\n switch (id) {\r\n case \"account\":\r\n orders.push({\r\n ParentOrderId: value.orderId ? value.orderId : 0,\r\n AccountId: value.account,\r\n Quantity: value.quantity,\r\n Side: side,\r\n RelationType: \"Prop\",\r\n Price: price,\r\n IsFromRelatedTradeOrder: false,\r\n });\r\n break;\r\n case \"errorAccount\":\r\n orders.push({\r\n ParentOrderId: value.orderId ? value.orderId : 0,\r\n AccountId: value.account,\r\n Quantity: value.quantity,\r\n Side: side,\r\n RelationType: \"Error\",\r\n Price: price,\r\n IsFromRelatedTradeOrder: false,\r\n });\r\n break;\r\n case \"trading\":\r\n let firstSide;\r\n let secondSide;\r\n let firstSideCap;\r\n let secondSideCap;\r\n if (side === \"Buy\") {\r\n firstSide = \"buy\";\r\n secondSide = \"sell\";\r\n firstSideCap = \"Buy\";\r\n secondSideCap = \"Sell\";\r\n } else {\r\n firstSide = \"sell\";\r\n secondSide = \"buy\";\r\n firstSideCap = \"Sell\";\r\n secondSideCap = \"Buy\";\r\n }\r\n\r\n value.sides[firstSide].forEach((item) => {\r\n orders.push({\r\n ParentOrderId: item.orderId ? item.orderId : 0,\r\n AccountId: 0,\r\n Quantity: item.quantity,\r\n Side: firstSideCap,\r\n RelationType: \"Trading\",\r\n Price: item.price,\r\n IsFromRelatedTradeOrder: item.tradeId > 0 ? true : false,\r\n RelatedTradeInfo: {\r\n CounterPartyId: item.counterpartyId,\r\n TradingRouteId: item.route,\r\n TradeTradeDateTime: item.date,\r\n TradeAvgPrice: item.price,\r\n Source: item.source,\r\n },\r\n });\r\n });\r\n\r\n value.sides[secondSide].forEach((item) => {\r\n orders.push({\r\n ParentOrderId: item.orderId ? item.orderId : 0,\r\n AccountId: 0,\r\n Quantity: item.quantity,\r\n Side: secondSideCap,\r\n RelationType: \"Trading\",\r\n Price: item.price,\r\n IsFromRelatedTradeOrder: true,\r\n RelatedTradeInfo: {\r\n CounterPartyId: item.counterpartyId,\r\n TradingRouteId: item.route,\r\n TradeTradeDateTime: item.date,\r\n TradeAvgPrice: item.price,\r\n Source: item.source,\r\n },\r\n });\r\n });\r\n\r\n break;\r\n default:\r\n // It is a client order\r\n orders.push({\r\n ParentOrderId: id,\r\n AccountId: 0,\r\n Quantity: value.quantity,\r\n Side: side,\r\n RelationType: \"Client\",\r\n Price: price,\r\n IsFromRelatedTradeOrder: false,\r\n });\r\n }\r\n }\r\n });\r\n\r\n tradeAndComposition.Orders = orders;\r\n\r\n this.setState((state) => ({\r\n loadings: {\r\n ...state.loadings,\r\n execute: true,\r\n },\r\n }));\r\n\r\n let body = {\r\n tradeAndComposition,\r\n };\r\n\r\n fetchUpdateTradeAndComposition(body).then((r) => {\r\n this.setState((state) => ({\r\n loadings: {\r\n ...state.loadings,\r\n execute: false,\r\n },\r\n }));\r\n\r\n if (r.response.result.Code == 200) {\r\n this.props.toggle();\r\n } else {\r\n alert(r.response.result.Description);\r\n }\r\n });\r\n }\r\n };\r\n\r\n categorizeFetchedOrders(orders = []) {\r\n const { fields, items } = this.state;\r\n\r\n const tradingWasEnabled = items.trading.enabled;\r\n\r\n let orderItems = {};\r\n let orderItemsKey = \"\";\r\n let account = 0;\r\n let orderId = 0;\r\n\r\n let clientOrders = [];\r\n let propOrders = [];\r\n let errorOrders = [];\r\n\r\n let tradingSides = {\r\n buy: [],\r\n sell: [],\r\n };\r\n\r\n let tradingIsEnabled = false;\r\n\r\n orders.forEach((o) => {\r\n o.Order.stats = {\r\n pending: parseFloat(o.PendingQuantity),\r\n };\r\n\r\n orderItemsKey = \"\";\r\n account = 0;\r\n orderId = o.ParentOrderId;\r\n switch (o.RelationType) {\r\n case \"Client\":\r\n clientOrders.push(o);\r\n orderItemsKey = o.ParentOrderId;\r\n break;\r\n\r\n case \"Prop\":\r\n propOrders.push(o);\r\n orderItemsKey = \"account\";\r\n account = o.Order.CurrentAccount.AccountId;\r\n break;\r\n\r\n case \"Error\":\r\n errorOrders.push(o);\r\n orderItemsKey = \"errorAccount\";\r\n account = o.Order.CurrentAccount.AccountId;\r\n break;\r\n\r\n case \"Trading\":\r\n if (!tradingWasEnabled) {\r\n const newId = Math.random().toString(36).substr(2, 4);\r\n\r\n let sideItem = {\r\n id: newId,\r\n isFromThisTrade: !o.IsFromRelatedTradeOrder,\r\n orderId: o.ParentOrderId,\r\n price: o.RelatedTradeInfo ? o.RelatedTradeInfo.TradeAvgPrice : fields.price,\r\n disabled: o.IsFromRelatedTradeOrder,\r\n quantityDisabled: o.RelationIsBooked,\r\n tradeId: o.RelatedTradeInfo ? o.RelatedTradeInfo.TradeId : 0,\r\n date: o.RelatedTradeInfo\r\n ? localDateTime(o.RelatedTradeInfo.TradeTradeDateTime).toDatetimeLocal()\r\n : localDateTime(fields.date).toDatetimeLocal(),\r\n route: o.RelatedTradeInfo ? o.RelatedTradeInfo.TradingRouteId : null,\r\n counterpartyId: o.RelatedTradeInfo ? o.RelatedTradeInfo.CounterPartyId : null,\r\n counterpartyName: o.RelatedTradeInfo ? o.RelatedTradeInfo.CounterPartyName : null,\r\n quantity: o.Quantity,\r\n };\r\n if (o.Side == \"Buy\") {\r\n tradingSides.buy.push(sideItem);\r\n } else {\r\n tradingSides.sell.push(sideItem);\r\n }\r\n tradingIsEnabled = true;\r\n }\r\n\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n\r\n if (orderItemsKey !== \"\") {\r\n orderItems[orderItemsKey] = {\r\n enabled: o.Quantity > 0,\r\n readonly: o.RelationIsBooked,\r\n quantity: o.Quantity,\r\n account,\r\n orderId,\r\n };\r\n }\r\n });\r\n\r\n if (tradingWasEnabled && items.trading.sides.buy && items.trading.sides.sell) {\r\n tradingSides.buy = items.trading.sides.buy;\r\n tradingSides.sell = items.trading.sides.sell;\r\n } else {\r\n let defaultSideItem = {\r\n id: 1,\r\n price: fields.price,\r\n route: null,\r\n date: new Date().toDatetimeLocal(),\r\n };\r\n if (tradingSides.buy.length == 0) {\r\n tradingSides.buy.push({\r\n ...defaultSideItem,\r\n isFromThisTrade: fields.side == \"Buy\",\r\n });\r\n }\r\n if (tradingSides.sell.length == 0) {\r\n tradingSides.sell.push({\r\n ...defaultSideItem,\r\n isFromThisTrade: fields.side == \"Sell\",\r\n });\r\n }\r\n }\r\n\r\n return {\r\n orderItems,\r\n clientOrders,\r\n propOrders,\r\n errorOrders,\r\n tradingSides,\r\n tradingIsEnabled,\r\n };\r\n }\r\n\r\n isReadonlyTrade = () => {\r\n const { fields } = this.state;\r\n const { tradeStatus, tradeGroupId } = fields;\r\n\r\n const isConfirmedTrade =\r\n tradeStatus && [\"ConfirmationSent\", \"Matched\", \"Booked\", \"Canceled\"].indexOf(tradeStatus) >= 0;\r\n\r\n return tradeGroupId > 0 || isConfirmedTrade;\r\n };\r\n\r\n toggleShowFees = () => {\r\n this.setState({\r\n ...this.state,\r\n showFees: !this.state.showFees,\r\n });\r\n };\r\n\r\n render() {\r\n const { toggle, open, counterparties, services } = this.props;\r\n const { entities, loadings, items, fields, errors, ui, maxDecimals, showFees } = this.state;\r\n const { tradeId, side, price, tradeGroupId } = fields;\r\n const itemActions = {\r\n toggle: this.toggleItem,\r\n change: this.changeItem,\r\n };\r\n\r\n let orders = [];\r\n\r\n if (ui.distributed || (entities.orders && entities.orders.length > 0)) {\r\n orders = entities.orders;\r\n }\r\n\r\n const isNewTrade = tradeId == 0;\r\n const isReadonlyTrade = this.isReadonlyTrade();\r\n\r\n let tradeAndGroupId = `#${tradeId}`;\r\n if (tradeGroupId > 0) {\r\n tradeAndGroupId += ` (group #${tradeGroupId})`;\r\n }\r\n\r\n /*\r\n\t\tlet totalEnabledQuantity = Object.values(items).forEach((e) => {\r\n\t\t\tsum += e.enabled && !isNaN(e.quantity) ? +e.quantity : 0;\r\n\t\t});\r\n\t\t*/\r\n let tradeHasSelectedOrders = Object.values(items).find((i) => {\r\n return i.enabled;\r\n });\r\n\r\n return (\r\n \r\n \r\n {tradeId > 0 ? `Edit trade ${tradeAndGroupId}` : \"New trade\"}\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {loadings.distribute ? (\r\n \r\n ) : (\r\n orders.length == 0 && \r\n )}\r\n {\r\n /*ui.distributed &&*/\r\n orders.map((o, i) => (\r\n \r\n ))\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n {fields.Fees && (\r\n \r\n \r\n Show fees\r\n \r\n {showFees && }\r\n \r\n )}\r\n \r\n \r\n\r\n \r\n
    \r\n {ui.leftOvers != null && }\r\n
    \r\n
    \r\n {!false && (\r\n \r\n )}{\" \"}\r\n this.execute()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {tradeId && tradeId > 0 ? \"Update\" : \"Execute\"}\r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n\r\nTrade.defaultFieldsFromTrade =\r\n (trade = {}) =>\r\n () => ({\r\n tradeId: trade.TradeId,\r\n tradeStatus: trade.TradeStatus,\r\n tradeGroupId: trade.TradeRefTradeGroupId || 0,\r\n form: trade.TradeAssetClassForm || ProductType.BOND,\r\n side: trade.TradeSide === \"SELL\" ? \"Sell\" : \"Buy\",\r\n asset: { id: trade.TradeAssetId || null, name: trade.TradeAssetTicker || null },\r\n quantity: trade.TradeQuantity ? trade.TradeQuantity : 0,\r\n price: trade.TradeAvgPrice ? trade.TradeAvgPrice : 0,\r\n route: trade.TradeTradingRouteId ? trade.TradeTradingRouteId : null,\r\n counterparty: trade.TradeCounterPartyId\r\n ? { id: trade.TradeCounterPartyId, name: trade.TradeCounterPartyName }\r\n : { id: null, name: \"\" },\r\n date: trade.TradeId ? trade.TradeTradeDateTime : new Date().toDatetimeLocal(),\r\n valueDate: trade.TradeId ? trade.TradeValueDate : \"\",\r\n tradeCurrencyId: trade.TradeTradeCurrencyId || 0,\r\n tradeCurrencySymbol: trade.TradeTradeCurrencyISO || \"\",\r\n settlementCurrencyId: trade.TradeSettleCurrencyId || 0,\r\n settlementCurrencySymbol: trade.TradeSettleCurrencyISO || \"\",\r\n FXRoute: trade.TradeFXRoute || \"FXThroughCpty\",\r\n FXRelatedOrderId: trade.TradeFXRelatedOrderId ? trade.TradeFXRelatedOrderId : 0,\r\n FX: trade.TradeFX || 1,\r\n manualFX: trade.TradeId,\r\n balancetype: trade.TradeBalanceType,\r\n booktype: trade.TradeBookType\r\n });\r\n\r\nTrade.defaultFieldsFromOrder =\r\n (order = {}) =>\r\n () => ({\r\n tradeId: 0,\r\n tradeStatus: \"\",\r\n tradeGroupId: 0,\r\n form: order.AssetClassForm || ProductType.BOND,\r\n side: order.OrderSide || \"Buy\",\r\n asset: { id: order.AssetId || null, name: order.AssetTicker || null },\r\n quantity: order.OrderQuantity ? +order.stats.pending : \"\",\r\n price: order.OrderType && order.OrderType == OrderPriceType.LIMIT ? +order.OrderPrice : \"\",\r\n route: null,\r\n counterparty: { id: null, name: \"\" },\r\n date: new Date().toDatetimeLocal(),\r\n valueDate: \"\",\r\n tradeCurrencyId: order.OrderCurrencyId || 0,\r\n tradeCurrencySymbol: order.OrderCurrencySymbol || \"\",\r\n settlementCurrencyId: order.OrderSettlementCurrencyId || 0,\r\n settlementCurrencySymbol: order.OrderSettlementCurrencySymbol || \"\",\r\n FXRoute: \"FXThroughCpty\",\r\n FXRelatedOrderId: 0,\r\n FX: 1,\r\n manualFX: false,\r\n });\r\n\r\nconst Totals = ({ side, leftOvers }) => (\r\n
    \r\n
    \r\n Leftovers\r\n \r\n \r\n {side == \"Buy\" && (\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {side == \"Sell\" && (\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n
    Buy side\r\n \r\n
    Sell side\r\n \r\n
    \r\n
    \r\n
    \r\n);\r\nexport const AccountsField = ({ accounts, id, onChange, item }) =>\r\n accounts == null ? (\r\n \r\n ) : (\r\n \r\n {item.orderId && item.orderId > 0 && (\r\n \r\n Order\r\n
    \r\n #{item.orderId}\r\n
    \r\n )}\r\n \r\n onChange(id, \"account\", v)}\r\n emptyLabel={\"Account\"}\r\n />\r\n \r\n \r\n );\r\n\r\nconst filterOrders = (orders, { form, side, asset, price }) => {\r\n if (orders.working == null) return [];\r\n\r\n let filtered = [...orders.todo, ...orders.working].filter((o) => {\r\n if (o.AssetClassForm == form && o.OrderSide == side && o.AssetTicker == asset) {\r\n if (o.OrderType == OrderPriceType.LIMIT) {\r\n if (\r\n (o.OrderSide == \"Buy\" && +o.OrderPrice < +price) ||\r\n (o.OrderSide == \"Sell\" && +o.OrderPrice > +price)\r\n ) {\r\n return false;\r\n }\r\n }\r\n } else {\r\n return false;\r\n }\r\n return true;\r\n });\r\n\r\n filtered.sort((o1, o2) => {\r\n if (o1.OrderStatus == o2.OrderStatus) {\r\n return o1.OrderModifiedDate - o2.OrderModifiedDate;\r\n }\r\n\r\n if (o1.OrderStatus == OrderStatus.ACKED && o2.OrderStatus == OrderStatus.ROUTED) {\r\n return -1;\r\n }\r\n\r\n if (o1.OrderStatus == OrderStatus.PART) {\r\n return -1;\r\n }\r\n\r\n return 1;\r\n });\r\n\r\n return filtered;\r\n};\r\n\r\nexport const Line = ({ mb = \"4px\" }) => (\r\n \r\n);\r\n\r\nconst Fees = ({ fees }) => {\r\n return (\r\n
    \r\n \r\n \r\n {fees.map((feeItem, idx) => (\r\n \r\n \r\n \r\n ))}\r\n \r\n
    \r\n {feeItem.Description}:{\" \"}\r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default Trade;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"Trade-module_modal_2JIcB\",\"alert\":\"Trade-module_alert_aw7RS\",\"symbol\":\"Trade-module_symbol_1IFdB\",\"footer\":\"Trade-module_footer_TXZCu\",\"content\":\"Trade-module_content_2jwve\",\"container\":\"Trade-module_container_2yNoc\",\"tradingTitle\":\"Trade-module_tradingTitle_3cUah\",\"trading\":\"Trade-module_trading_3ZHXp\",\"feesContainer\":\"Trade-module_feesContainer_MUKeG\",\"feesTable\":\"Trade-module_feesTable_3DQCp\",\"showFeesLink\":\"Trade-module_showFeesLink_sBpaQ\"};","import React, { useEffect, useImperativeHandle, forwardRef } from \"react\";\r\nimport { Button } from \"reactstrap\";\r\nimport Column from \"../Trading/Column\";\r\nimport style from \"./Trade.module.scss\";\r\n\r\nconst Trading = forwardRef(\r\n (\r\n {\r\n tradings,\r\n counterparties,\r\n tradeRoutes,\r\n fixedSide = \"buy\",\r\n onChange,\r\n price,\r\n loading = false,\r\n sidesAux,\r\n maxDecimals,\r\n },\r\n ref\r\n ) => {\r\n useEffect(() => {\r\n onChange({\r\n sides: {\r\n buy: sidesAux.buy.map((b) => ({ ...b, price })),\r\n sell: sidesAux.sell.map((b) => ({ ...b, price })),\r\n },\r\n });\r\n }, [price]);\r\n\r\n useImperativeHandle(ref, () => ({\r\n validate,\r\n values,\r\n }));\r\n\r\n const handleNew = (side) => {\r\n const newId = Math.random().toString(36).substr(2, 4);\r\n\r\n onChange({\r\n sides: {\r\n ...sidesAux,\r\n [side]: [\r\n ...sidesAux[side],\r\n {\r\n id: newId,\r\n price,\r\n route: null,\r\n date: new Date().toDatetimeLocal(),\r\n },\r\n ],\r\n },\r\n });\r\n };\r\n\r\n const handleDel = (side, id) => {\r\n onChange({\r\n sides: {\r\n ...sidesAux,\r\n [side]: sidesAux[side].filter((r) => r.id != id),\r\n },\r\n });\r\n };\r\n\r\n const handleChange = (side, id, props) => {\r\n let changes = {};\r\n if (fixedSide == side && props[\"quantity\"]) {\r\n changes.quantity = props.quantity;\r\n }\r\n\r\n changes.sides = {\r\n ...sidesAux,\r\n [side]: sidesAux[side].map((row) => {\r\n if (row.id == id) {\r\n const errors = row.errors\r\n ? Object.keys(props).reduce((obj, e) => {\r\n obj[e] = undefined;\r\n return obj;\r\n }, {})\r\n : {};\r\n return { ...row, ...props, errors };\r\n }\r\n return row;\r\n }),\r\n };\r\n\r\n onChange(changes);\r\n };\r\n\r\n const values = () => {\r\n const { buy, sell } = sidesAux;\r\n\r\n return [\r\n ...buy.map((b) => ({\r\n Side: \"Buy\",\r\n Quantity: +b.quantity,\r\n Price: +b.price,\r\n CounterPartyId: b.counterpartyId,\r\n CounterPartyName: b.counterpartyName,\r\n TradingRouteId: b.route,\r\n DateTime: b.date,\r\n })),\r\n ...sell.map((b) => ({\r\n Side: \"Buy\",\r\n Quantity: +b.quantity,\r\n Price: +b.price,\r\n CounterPartyId: b.counterpartyId,\r\n CounterPartyName: b.counterpartyName,\r\n TradingRouteId: b.route,\r\n DateTime: b.date,\r\n })),\r\n ];\r\n };\r\n\r\n const validate = () => {\r\n let hasErrors = false;\r\n const changedSides = { ...sidesAux };\r\n\r\n let fixedDate = new Date();\r\n if (changedSides[fixedSide].length > 0) {\r\n const fixedItem = changedSides[fixedSide][0];\r\n fixedDate = new Date(fixedItem.date);\r\n fixedDate = new Date(`${fixedDate.toDateLocal()}T00:00`);\r\n }\r\n\r\n const oppSide = fixedSide == \"sell\" ? \"buy\" : \"sell\";\r\n\r\n if (tradings.enabled) {\r\n changedSides[oppSide].forEach((e, i) => {\r\n let errors = {};\r\n\r\n if (e.counterpartyId === undefined || e.counterpartyId === null) {\r\n errors.counterpartyId = \"Required field\";\r\n }\r\n\r\n if (e.quantity === undefined || e.quantity === \"\" || e.quantity === 0) {\r\n errors.quantity = \"Required field\";\r\n }\r\n\r\n if (e.price === undefined || e.price === \"\" || e.price === 0) {\r\n errors.price = \"Required field\";\r\n }\r\n\r\n if (e.route === undefined || e.route == null) {\r\n errors.route = \"Required field\";\r\n }\r\n\r\n if (e.date === undefined || e.date === \"\") {\r\n errors.date = \"Required field\";\r\n } else {\r\n let itemDate = new Date(e.date);\r\n itemDate = new Date(`${itemDate.toDateLocal()}T00:00`);\r\n if (itemDate.getTime() != fixedDate.getTime()) {\r\n errors.date = \"All dates should be equal\";\r\n }\r\n }\r\n\r\n hasErrors |= Object.values(errors).length > 0;\r\n changedSides[oppSide][i].errors = errors;\r\n });\r\n\r\n if (\r\n changedSides[fixedSide][0].quantity === undefined ||\r\n changedSides[fixedSide][0].quantity === \"\" ||\r\n changedSides[fixedSide][0].quantity === 0\r\n ) {\r\n hasErrors = true;\r\n changedSides[fixedSide][0].errors = {\r\n quantity: \"Required field\",\r\n };\r\n }\r\n\r\n onChange(changedSides);\r\n\r\n // check same quantity\r\n if (!hasErrors) {\r\n const left = changedSides.buy.reduce((sum, e) => parseFloat(e.quantity) + sum, 0);\r\n const right = changedSides.sell.reduce((sum, e) => parseFloat(e.quantity) + sum, 0);\r\n\r\n if (left !== right) {\r\n return {\r\n error: true,\r\n global: \"Buy side not match with Sell side.\",\r\n };\r\n }\r\n }\r\n }\r\n\r\n return hasErrors ? { error: true } : {};\r\n };\r\n\r\n if (!tradings.enabled) {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n\r\n return (\r\n \r\n
    \r\n Trading\r\n \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n );\r\n }\r\n);\r\n\r\nexport default Trading;\r\n","import React from \"react\";\r\nimport { Alert, Row, Col, Input } from \"reactstrap\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport { NumberFormatInput } from \"../../NumberFormatInput/NumberFormatInput\";\r\nimport style from \"./Trade.module.scss\";\r\nimport {\r\n CounterpartySuggest,\r\n fetchCParties,\r\n ProductField,\r\n NumberField,\r\n SymbolField,\r\n TradingRoutes,\r\n} from \"../Trading/FormFields\";\r\nimport { Field, Combobox, Switch } from \"../Order/Field/Field\";\r\nimport Side from \"../Order/Field/Side\";\r\nimport { getBaseAndPriceCurrencies } from \"../../../utils\";\r\nimport Booktype from \"../Order/Field/Booktype\";\r\n\r\nexport const EmptyOrders = () => (\r\n \r\n No Orders\r\n
    \r\n);\r\n\r\nexport const AlertError = ({ error }) => {\r\n if (error == undefined) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n
    \r\n \r\n {error}\r\n \r\n
    \r\n );\r\n};\r\n\r\nexport const Number = ({ value, dataTypeDecimalName }) => (\r\n \r\n {value === null ? \"-\" : }\r\n \r\n);\r\n\r\nexport const FooterForm = ({ fields, errors, onChange, tradeRoutes, counterparties, isReadonlyTrade }) => (\r\n \r\n \r\n onChange(\"route\", { value: id })}\r\n tradeRoutes={tradeRoutes}\r\n disabled={isReadonlyTrade}\r\n />\r\n \r\n \r\n \r\n onChange(\"counterparty\", {\r\n values: { id: v.counterpartyId, name: v.counterpartyName },\r\n })\r\n }\r\n error={errors.counterparty}\r\n fetchItems={(v) => fetchCParties(v, counterparties)}\r\n disabled={isReadonlyTrade}\r\n />\r\n \r\n \r\n \r\n onChange(\"valueDate\", { value: e.target.value })}\r\n />\r\n \r\n \r\n \r\n);\r\n\r\nexport const HeaderForm = ({\r\n fields,\r\n errors,\r\n onChange,\r\n isNewTrade,\r\n isReadonlyTrade,\r\n tradeHasSelectedOrders,\r\n services,\r\n asset,\r\n booktypes\r\n}) => {\r\n const isFX = fields.form == \"Forex\";\r\n const { baseCurrency, priceCurrency } = getBaseAndPriceCurrencies(\r\n fields.settlementCurrencies,\r\n fields.tradeCurrencySymbol,\r\n fields.settlementCurrencySymbol\r\n );\r\n\r\n return (\r\n \r\n \r\n \r\n
    \r\n onChange(\"side\", { value: e.OrderSide })}\r\n />\r\n
    \r\n \r\n\r\n \r\n \r\n \r\n \r\n {!isFX && (\r\n
    \r\n onChange(\"asset\", { values: { id, name } })}\r\n services={services}\r\n />\r\n
    \r\n )}\r\n \r\n
    \r\n \r\n \r\n onChange(\"quantity\", { value: v })}\r\n dataTypeDecimalName=\"quantity\"\r\n />\r\n \r\n \r\n onChange(\"price\", { value: v })}\r\n />\r\n \r\n\r\n \r\n {isFX ? (\r\n
    \r\n onChange(\"tradeCurrency\", { values: { id, name } })}\r\n services={services}\r\n />\r\n
    \r\n ) : (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n onChange(\"settlementCurrencyId\", { value: v })}\r\n emptyLabel={\"Settlement Currency\"}\r\n />\r\n \r\n \r\n
    \r\n \r\n {!isFX &&\r\n fields.tradeCurrencySymbol !== \"\" &&\r\n fields.settlementCurrencySymbol !== \"\" &&\r\n fields.tradeCurrencySymbol !== fields.settlementCurrencySymbol && (\r\n \r\n \r\n \r\n onChange(\"FXRoute\", { value: v })}\r\n emptyLabel={\"FX route\"}\r\n invalid={!!errors.FXRoute}\r\n style={{ background: \"#edf9ff\", fontWeight: 500 }}\r\n />\r\n \r\n \r\n \r\n {fields.FXRoute == \"FXThroughCpty\" && (\r\n \r\n onChange(\"manualFX\", { value: v })} />\r\n \r\n )}\r\n \r\n \r\n {fields.FXRoute == \"FXThroughCpty\" && (\r\n \r\n {\r\n onChange(\"FX\", { value: e.value });\r\n }}\r\n disabled={isReadonlyTrade || !fields.manualFX}\r\n placeholder={\"FX\"}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n )}\r\n {fields.FXRoute == \"FXThroughOrder\" && fields.FXRelatedOrderId && (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n )}\r\n \r\n \r\n onChange(\"date\", { value: e.target.value })}\r\n style={{ width: \"225px\" }}\r\n />\r\n \r\n {/* // {(this.state.ui.userRole === \"Trader\" || (this.state.ui.userRole !== \"Trader\")) //&& //&& this.state.ui.mode !== Mode.EDIT)) && */}\r\n { booktypes &&\r\n onChange(dispatch, v)}\r\n onChange={(id) => onChange(\"booktype\", { value: id.BookType })}\r\n onAccountChange={(id) => onChange(\"balancetype\", { value: id.BalanceType })}\r\n\r\n //onAccountChange={(v) => onAccountChange(dispatch, v)}\r\n /> \r\n }\r\n {/* // } */}\r\n \r\n \r\n
    \r\n );\r\n};\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Container, Button } from \"reactstrap\";\r\nimport { FormattedDate, FormattedTime } from \"react-intl\";\r\n\r\nimport { CircularProgress, TradeInlineDetail } from \"../..\";\r\nimport { localDateTime } from \"../../../utils/Helper\";\r\n\r\nimport style from \"./TradeHistory.module.scss\";\r\n\r\nconst TradeHistory = ({ trade, open, closeModalTradeHistory, dispatch, tradeId, onHistoryRequest }) => {\r\n const [histories, setHistories] = useState(null);\r\n const [loading, setLoading] = useState(true);\r\n\r\n useEffect(() => {\r\n if (tradeId && !histories) {\r\n onHistoryRequest({ tradeId }).then((response) => {\r\n setLoading(false);\r\n setHistories(response.response.histories);\r\n });\r\n }\r\n }, [tradeId]);\r\n\r\n const toggle = () => {\r\n dispatch(closeModalTradeHistory());\r\n setHistories(null);\r\n setLoading(true);\r\n };\r\n\r\n if (!open) {\r\n return null;\r\n }\r\n\r\n return (\r\n
    \r\n \r\n \r\n Trade history\r\n \r\n \r\n \r\n \r\n
    History
    \r\n {loading ? (\r\n \r\n ) : (\r\n
    \r\n {histories &&\r\n histories\r\n .filter((item) => item.HistoryType != \"Debug\")\r\n .map((item) => (\r\n
    \r\n
    \r\n {item.HistoryUserName}\r\n\r\n \r\n {\" \"}\r\n \r\n \r\n
    \r\n\r\n

    {item.HistoryDetails.trim()}

    \r\n
    \r\n ))}\r\n
    \r\n )}\r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default TradeHistory;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"subtitle\":\"TradeHistory-module_subtitle_3giUF\",\"tableExecutions\":\"TradeHistory-module_tableExecutions_I20M_\",\"histories\":\"TradeHistory-module_histories_2fHnl\",\"item\":\"TradeHistory-module_item_2W5co\",\"header\":\"TradeHistory-module_header_15HzP\",\"time\":\"TradeHistory-module_time_2TQTm\"};","import React from \"react\";\r\nimport { Button } from \"reactstrap\";\r\nimport style from \"./Trading.module.scss\";\r\nimport LineForm from \"./LineForm\";\r\nimport { fetchCParties } from \"./FormFields\";\r\n\r\nconst Column = ({\r\n side,\r\n rows,\r\n loading,\r\n needFX,\r\n FXPair,\r\n newRow,\r\n delRow,\r\n counterparties,\r\n tradeRoutes,\r\n onChange,\r\n massiveMode,\r\n maxDecimals,\r\n}) => {\r\n return (\r\n
    \r\n {rows.length == 0 && }\r\n {rows.map((r, index) => (\r\n \r\n delRow(side, r.id)}\r\n fetchCParties={(v) => fetchCParties(v, counterparties)}\r\n tradeRoutes={tradeRoutes}\r\n onChange={(props) => onChange(side, r.id, props)}\r\n massiveMode={massiveMode}\r\n maxDecimals={maxDecimals}\r\n />\r\n {index != rows.length - 1 &&
    }\r\n
    \r\n ))}\r\n {!massiveMode && newRow(side)} disabled={loading} />}\r\n
    \r\n );\r\n};\r\n\r\nconst AddRow = ({ newRow, disabled }) => (\r\n \r\n);\r\n\r\nconst EmptyRows = () => (\r\n
    \r\n Empty\r\n
    \r\n);\r\n\r\nconst cstyle = (side) => {\r\n if (side == \"buy\")\r\n return {\r\n background: \"rgba(44, 177, 90, 0.08)\",\r\n border: \"solid 1px rgba(44, 177, 90, 1)\",\r\n marginRight: \"5px\",\r\n };\r\n else\r\n return {\r\n background: \"rgba(243, 75, 75, 0.08)\",\r\n border: \"solid 1px rgba(243, 75, 75, 1)\",\r\n marginLeft: \"5px\",\r\n };\r\n};\r\n\r\nexport default Column;\r\n","import React from \"react\";\r\nimport { Input } from \"reactstrap\";\r\nimport { NumberFormatInput } from \"../../NumberFormatInput/NumberFormatInput\";\r\nimport { Field, Symbol, Combobox } from \"../Order/Field/Field\";\r\nimport Autosuggest from \"../../Autosuggest/Autosuggest\";\r\nimport CircularProgress from \"../../CircularProgress/CircularProgress\";\r\nimport { ProductType, getProductTypeName } from \"../../../utils/Order/Order\";\r\nimport style from \"./Trading.module.scss\";\r\n\r\nexport const NumberField = ({\r\n value,\r\n label,\r\n disabled,\r\n error,\r\n onChange,\r\n style,\r\n tabIndex = \"2\",\r\n placeholder,\r\n dataTypeDecimalName,\r\n decimalScale,\r\n}) => (\r\n \r\n onChange(e.value)}\r\n decimalScale={decimalScale}\r\n dataTypeDecimalName={dataTypeDecimalName}\r\n placeholder={placeholder || label}\r\n />\r\n \r\n);\r\n\r\nexport const DateTimeField = ({\r\n value,\r\n label,\r\n disabled,\r\n error,\r\n onChange,\r\n style,\r\n inputStyle,\r\n tabIndex = \"3\",\r\n step = \"60\",\r\n}) => (\r\n \r\n onChange(e.target.value)}\r\n style={inputStyle}\r\n />\r\n \r\n);\r\n\r\nexport const CounterpartySuggest = ({ value, error, disabled, fetchItems, onChange, style = {} }) => (\r\n \r\n `${suggestion.name}`}\r\n onSuggestionsFetchRequested={({ value }) => fetchItems(value)}\r\n value={value || \"\"}\r\n inputProps={{\r\n placeholder: \"Counterparty\",\r\n invalid: !!error,\r\n disabled,\r\n }}\r\n onChange={(m, v) => onChangeCparty(m, v, onChange)}\r\n style={style || {}}\r\n />\r\n \r\n);\r\n\r\nexport const SymbolField = ({ error, label, disabled, onChange, value, form, services }) => (\r\n \r\n \r\n \r\n);\r\n\r\nexport const ProductField = ({ form, onChange, disabled, style }) => (\r\n \r\n onChange(\"form\", { value: v })}\r\n items={Object.values(ProductType).map((key, index) => ({\r\n id: key,\r\n description: getProductTypeName(key),\r\n }))}\r\n />\r\n \r\n);\r\n\r\nexport const TradingRoutes = ({ error, disabled, value, onChange, tradeRoutes, style = {} }, autoWidth) => (\r\n \r\n {tradeRoutes == null ? (\r\n \r\n ) : (\r\n onChange(v)}\r\n items={tradeRoutes}\r\n style={autoWidth ? {} : { minWidth: \"170px\" }}\r\n />\r\n )}\r\n \r\n);\r\n\r\nconst onChangeCparty = (method, value, onChange) => {\r\n let _value = {\r\n counterpartyId: null,\r\n counterpartyName: \"\",\r\n };\r\n\r\n if (method != \"type\" && value.id) {\r\n _value = {\r\n counterpartyId: value.id,\r\n counterpartyName: value.name,\r\n };\r\n }\r\n\r\n onChange(_value);\r\n};\r\n\r\nexport const fetchCParties = (value, counterparties) => {\r\n const inputValue = value.trim().toLowerCase();\r\n const inputLength = inputValue.length;\r\n\r\n return new Promise((resolve, rej) => {\r\n resolve(\r\n inputLength === 0\r\n ? []\r\n : Object.entries(counterparties)\r\n .filter((cp) => cp[1].Value.toLowerCase().includes(inputValue))\r\n .map((cp) => ({ id: cp[1].Id, name: cp[1].Value }))\r\n );\r\n });\r\n};\r\n\r\nconst renderSuggestion = (suggestion) => (\r\n
    \r\n {suggestion.name}\r\n
    \r\n);\r\n","import React from \"react\";\r\nimport { Row, Col, Container, Label, Input } from \"reactstrap\";\r\nimport { NumberField, CounterpartySuggest, TradingRoutes, DateTimeField } from \"./FormFields\";\r\nimport style from \"./Trading.module.scss\";\r\n\r\nconst LineForm = ({\r\n row,\r\n needFX,\r\n FXPair,\r\n loading,\r\n delRow,\r\n fetchCParties,\r\n tradeRoutes,\r\n onChange,\r\n massiveMode,\r\n maxDecimals,\r\n}) => {\r\n const errors = row.errors || {};\r\n return (\r\n
    \r\n \r\n {row.orderId && row.orderId > 0 && (\r\n \r\n \r\n \r\n Order #{row.orderId}\r\n {row.tradeId && row.tradeId > 0 ? (\r\n \r\n {\" \"}\r\n (Trade #{row.tradeId})\r\n \r\n ) : null}\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n onChange({ quantity: v })}\r\n tabIndex=\"0\"\r\n dataTypeDecimalName=\"quantity\"\r\n />\r\n\r\n @\r\n\r\n onChange({ price: v })}\r\n tabIndex=\"0\"\r\n decimalScale={maxDecimals}\r\n dataTypeDecimalName=\"price\"\r\n />\r\n\r\n {needFX && (\r\n onChange({ fx: v })}\r\n style={{ marginLeft: \"8px\" }}\r\n tabIndex=\"0\"\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n )}\r\n \r\n \r\n {(!massiveMode || row.disabled) && ( // if row is disabled, show the counterparty and trading route\r\n \r\n \r\n \r\n onChange(v)}\r\n error={errors.counterpartyId}\r\n fetchItems={fetchCParties}\r\n />{\" \"}\r\n onChange({ route: id })}\r\n tradeRoutes={tradeRoutes}\r\n autoWidth\r\n />\r\n \r\n \r\n \r\n \r\n onChange({ date: v })}\r\n inputStyle={{ width: \"292px\" }}\r\n tabIndex=\"0\"\r\n />\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n onChange({\r\n source: !row.source,\r\n })\r\n }\r\n inputStyle={{ width: \"10px\" }}\r\n />\r\n {\"Source\"}\r\n \r\n \r\n \r\n {!massiveMode && !row.disabled && (\r\n delRow()}>\r\n \r\n \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nexport default LineForm;\r\n","import React, { Component } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, Row, ModalFooter, Button, Spinner, Input } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport { Field, Combobox } from \"../Order/Field/Field\";\r\nimport { ProductType, getBaseAndPriceCurrencies } from \"../../../utils\";\r\nimport { SymbolField, ProductField } from \"./FormFields\";\r\nimport classnames from \"classnames\";\r\nimport style from \"./Trading.module.scss\";\r\nimport Column from \"./Column\";\r\n\r\nclass Trading extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n loading: false,\r\n loadingEarnings: false,\r\n form: ProductType.BOND,\r\n asset: {\r\n id: null,\r\n name: null,\r\n error: null,\r\n },\r\n settleCurrency: {\r\n id: null,\r\n name: null,\r\n error: null,\r\n },\r\n settlementCurrencies: [],\r\n buy: [{ id: 1, route: null, date: new Date().toDatetimeLocal() }],\r\n sell: [{ id: 2, route: null, date: new Date().toDatetimeLocal() }],\r\n totals: {\r\n buyQuantity: 0,\r\n buyAverage: 0,\r\n sellQuantity: 0,\r\n sellAverage: 0,\r\n earnings: {\r\n buy: 0,\r\n sell: 0,\r\n },\r\n },\r\n tradeRoutes: [],\r\n };\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n const { form, asset, settleCurrency } = this.state;\r\n const { form: prevForm, asset: prevAsset } = prevState;\r\n\r\n const { services } = this.props;\r\n const { fetchTradingRoutesForAsset, fetchOrderAssetInfo } = services;\r\n\r\n if (form != prevForm) {\r\n this.setState({\r\n asset: {\r\n id: null,\r\n name: null,\r\n error: null,\r\n },\r\n settleCurrency: {\r\n id: null,\r\n name: null,\r\n error: null,\r\n },\r\n settlementCurrencies: [],\r\n tradeRoutes: [],\r\n });\r\n } else if (asset.id != prevAsset.id) {\r\n if (asset.id) {\r\n if (form != \"Forex\") {\r\n this.setState({\r\n tradeRoutes: null,\r\n });\r\n fetchTradingRoutesForAsset({ assetId: asset.id, quantity: 0 }) //Le paso 0 para que use la cantidad total\r\n .then((res) => {\r\n this.setState({\r\n tradeRoutes: res.response.sorroutes.map((r) => ({\r\n id: r.id,\r\n description: r.name,\r\n })),\r\n });\r\n });\r\n }\r\n\r\n fetchOrderAssetInfo({\r\n tradeDate: new Date(),\r\n orderForm: form,\r\n assetId: asset ? asset.id : 0,\r\n assetTicker: \"\",\r\n tradeCurrencyId: asset ? asset.id : 0, // Cuando es FX, asset.id tiene la moneda de trade.\r\n settleCurrencyId: settleCurrency ? settleCurrency.id : 0,\r\n }).then((res) => {\r\n const data = res.response.assetorderdata;\r\n const currency = data.items.find((i) => i.key == \"Currency\");\r\n const settlementCurrencies = data.settlementCurrency.map((c) => ({\r\n id: c.currencyInfo.currencyId,\r\n description: c.currencyInfo.currencyISO,\r\n multiplies: c.multiplies,\r\n fx: c.fx,\r\n }));\r\n const settlementCurrency = {\r\n id: null,\r\n name: null,\r\n error: null,\r\n };\r\n if (settlementCurrencies && settlementCurrencies.length > 0) {\r\n settlementCurrency.id = settlementCurrencies[0].id;\r\n settlementCurrency.name = settlementCurrencies[0].description;\r\n }\r\n\r\n this.setState((state) => ({\r\n asset: {\r\n ...state.asset,\r\n currency: currency.value,\r\n },\r\n settlementCurrencies,\r\n settleCurrency: settlementCurrency,\r\n }));\r\n });\r\n } else {\r\n this.setState({\r\n settleCurrency: {\r\n id: null,\r\n name: null,\r\n error: null,\r\n },\r\n settlementCurrencies: [],\r\n tradeRoutes: [],\r\n });\r\n }\r\n }\r\n }\r\n\r\n newRow = (side) => {\r\n const newId = Math.random().toString(36).substr(2, 4);\r\n\r\n this.setState({\r\n [side]: [...this.state[side], { id: newId, route: null, date: new Date().toDatetimeLocal() }],\r\n });\r\n };\r\n\r\n delRow = (side, id) => {\r\n this.setState(\r\n {\r\n [side]: [...this.state[side].filter((r) => r.id !== id)],\r\n },\r\n () => this.calcTotals()\r\n );\r\n };\r\n\r\n onChangeRow = (side, id, entries) => {\r\n const otherProps = {};\r\n\r\n if (side == \"buy\" && entries.hasOwnProperty(\"quantity\") && !isNaN(entries.quantity)) {\r\n const index = this.state.buy.findIndex((e) => e.id == id);\r\n\r\n if (this.state.sell.length > index) {\r\n otherProps.sell = [...this.state.sell];\r\n\r\n otherProps.sell[index] = {\r\n ...this.state.sell[index],\r\n quantity: entries.quantity,\r\n };\r\n }\r\n }\r\n\r\n this.setState(\r\n {\r\n [side]: [\r\n ...this.state[side].map((item, i) => {\r\n if (item.id !== id) {\r\n return item;\r\n }\r\n\r\n const errors = item.errors\r\n ? Object.keys(entries).reduce((obj, e) => {\r\n obj[e] = undefined;\r\n return obj;\r\n }, {})\r\n : {};\r\n\r\n return {\r\n ...item,\r\n ...entries,\r\n errors: {\r\n ...item.errors,\r\n ...errors,\r\n },\r\n };\r\n }),\r\n ],\r\n ...otherProps,\r\n },\r\n () => this.calcTotals()\r\n );\r\n };\r\n\r\n onChange = (name, { values, value }) => {\r\n if (value) {\r\n let _value = value;\r\n if (name == \"settleCurrency\") {\r\n const { settlementCurrencies } = this.state;\r\n\r\n _value = {\r\n id: _value,\r\n name: settlementCurrencies.find((c) => c.id == _value).description,\r\n };\r\n }\r\n\r\n this.setState({\r\n [name]: _value,\r\n });\r\n } else {\r\n this.setState({\r\n [name]: { ...values },\r\n });\r\n }\r\n };\r\n\r\n validate = () => {\r\n const { asset, settleCurrency } = this.state;\r\n const needFX = asset.currency != settleCurrency.name && asset.id != null;\r\n\r\n const sidesState = {\r\n buy: [...this.state.buy],\r\n sell: [...this.state.sell],\r\n };\r\n\r\n const assetState = { ...asset };\r\n const settleCurrencyState = { ...settleCurrency };\r\n\r\n let hasErrors = false;\r\n\r\n Object.keys(sidesState).forEach((side) => {\r\n this.state[side].forEach((e, i) => {\r\n let errors = {};\r\n\r\n if (e.counterpartyId === undefined || e.counterpartyId === null) {\r\n errors.counterpartyId = \"Required field\";\r\n }\r\n\r\n if (e.quantity === undefined || e.quantity === \"\" || e.quantity === 0) {\r\n errors.quantity = \"Required field\";\r\n }\r\n\r\n if (e.price === undefined || e.price === \"\" || e.price === 0) {\r\n errors.price = \"Required field\";\r\n }\r\n\r\n if (e.route === undefined || e.route == null) {\r\n errors.route = \"Required field\";\r\n }\r\n\r\n if (needFX) {\r\n if (e.fx === undefined || e.fx === \"\" || e.fx === 0) {\r\n errors.fx = \"Required field\";\r\n }\r\n }\r\n\r\n hasErrors |= Object.values(errors).length > 0;\r\n sidesState[side][i].errors = errors;\r\n });\r\n });\r\n\r\n if (asset.id === undefined || asset.id === null || asset.id === \"\") {\r\n assetState.error = \"Required field\";\r\n hasErrors = true;\r\n }\r\n\r\n if (settleCurrency.id === undefined || settleCurrency.id === null || settleCurrency.id === \"\") {\r\n settleCurrencyState.error = \"Required field\";\r\n hasErrors = true;\r\n }\r\n\r\n this.setState({\r\n buy: sidesState.buy,\r\n sell: sidesState.sell,\r\n asset: assetState,\r\n settleCurrency: settleCurrencyState,\r\n });\r\n\r\n return !hasErrors;\r\n };\r\n\r\n execute = () => {\r\n if (this.validate()) {\r\n this.setState({ loading: true });\r\n const { form, asset, settleCurrency, buy, sell, settlementCurrencies } = this.state;\r\n const { services } = this.props;\r\n const { fetchAddTradingExecutions } = services;\r\n\r\n let fxMultiplies = true;\r\n\r\n const settleCurrencyInfo = settlementCurrencies.find((c) => c.id == settleCurrency.id);\r\n if (settleCurrencyInfo) {\r\n fxMultiplies = settleCurrencyInfo.multiplies;\r\n }\r\n\r\n const tradingExecutions = [\r\n ...buy.map((b) => ({\r\n Side: \"Buy\",\r\n Quantity: +b.quantity,\r\n Price: +b.price,\r\n FX: b.fx,\r\n FXMultiplies: fxMultiplies,\r\n CounterPartyId: b.counterpartyId,\r\n CounterPartyName: b.counterpartyName,\r\n TradingRouteId: b.route,\r\n DateTime: b.date,\r\n source: source,\r\n })),\r\n\r\n ...sell.map((b) => ({\r\n Side: \"Sell\",\r\n Quantity: b.quantity,\r\n Price: b.price,\r\n FX: b.fx,\r\n FXMultiplies: fxMultiplies,\r\n CounterPartyId: b.counterpartyId,\r\n CounterPartyName: b.counterpartyName,\r\n TradingRouteId: b.route,\r\n DateTime: b.date,\r\n source: b.source,\r\n })),\r\n ];\r\n\r\n fetchAddTradingExecutions({\r\n form,\r\n tradingExecutions,\r\n settlementCurrency: settleCurrency.name,\r\n assetTicker: asset.name,\r\n }).then((r) => {\r\n this.props.toggle();\r\n });\r\n }\r\n };\r\n\r\n calcTotals = () => {\r\n let totals = {\r\n buyQuantity: 0,\r\n buyAverage: 0,\r\n sellQuantity: 0,\r\n sellAverage: 0,\r\n earnings: {\r\n buy: 0,\r\n sell: 0,\r\n },\r\n };\r\n\r\n [\"buy\", \"sell\"].forEach((side) => {\r\n let sumQuantity = 0;\r\n let sumAvgPrice = 0;\r\n\r\n this.state[side].forEach((row) => {\r\n if (row.counterpartyId && !isNaN(row.quantity) && !isNaN(row.price)) {\r\n sumQuantity += +row.quantity;\r\n sumAvgPrice += +row.quantity * +row.price;\r\n }\r\n });\r\n\r\n totals[`${side}Quantity`] = sumQuantity;\r\n totals[`${side}Average`] = sumQuantity ? sumAvgPrice / sumQuantity : 0;\r\n });\r\n\r\n this.setState({ totals }, () => {\r\n const { asset, totals } = this.state;\r\n const { services } = this.props;\r\n const { fetchTradingEarnings } = services;\r\n\r\n const { buyQuantity, sellQuantity, buyAverage, sellAverage } = totals;\r\n if (\r\n asset.id !== undefined &&\r\n asset.id !== null &&\r\n asset.id !== \"\" &&\r\n buyQuantity > 0 &&\r\n sellQuantity > 0 &&\r\n buyAverage > 0 &&\r\n sellAverage > 0\r\n ) {\r\n this.setState({ loadingEarnings: true });\r\n Promise.all([\r\n // buy earnings\r\n fetchTradingEarnings({\r\n assetid: asset.id,\r\n quantity: buyQuantity,\r\n pricedif: buyAverage,\r\n }).then(({ earnings }) => earnings),\r\n // sell earnings\r\n fetchTradingEarnings({\r\n assetid: asset.id,\r\n quantity: buyQuantity,\r\n pricedif: sellAverage,\r\n }).then(({ earnings }) => earnings),\r\n ]).then(([buyEarnings, sellEarnings]) => {\r\n // all results\r\n this.setState({\r\n loadingEarnings: false,\r\n totals: {\r\n ...totals,\r\n earnings: { buy: +buyEarnings, sell: +sellEarnings },\r\n },\r\n });\r\n });\r\n } else {\r\n this.setState({\r\n totals: { ...totals, earnings: { buy: null, sell: null } },\r\n });\r\n }\r\n });\r\n };\r\n\r\n render() {\r\n const { open, toggle, counterparties, services } = this.props;\r\n const {\r\n form,\r\n buy,\r\n sell,\r\n totals,\r\n asset,\r\n settleCurrency,\r\n settlementCurrencies,\r\n route,\r\n loading,\r\n tradeRoutes,\r\n loadingEarnings,\r\n } = this.state;\r\n\r\n const needFX = asset.currency != settleCurrency.name && asset.id != null;\r\n\r\n const isFX = form == \"Forex\";\r\n\r\n const { baseCurrency, priceCurrency } = getBaseAndPriceCurrencies(\r\n settlementCurrencies,\r\n asset.currency,\r\n settleCurrency.name\r\n );\r\n\r\n const FXPair = `${baseCurrency}/${priceCurrency}`;\r\n\r\n return (\r\n \r\n Trading\r\n \r\n
    \r\n \r\n\r\n {!isFX && (\r\n this.onChange(\"asset\", { values: { id, name } })}\r\n services={services}\r\n />\r\n )}\r\n\r\n {/* ##### Trade Currency ###### */}\r\n {isFX ? (\r\n
    \r\n this.onChange(\"asset\", { values: { id, name } })}\r\n services={services}\r\n />\r\n
    \r\n ) : (\r\n \r\n \r\n \r\n )}\r\n\r\n {/* ##### Settlement Currency ###### */}\r\n \r\n this.onChange(\"settleCurrency\", { value: v })}\r\n emptyLabel={\"Settl. Currency\"}\r\n />\r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n\r\n \r\n
    \r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n {!loading && (\r\n \r\n )}{\" \"}\r\n this.execute()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Execute\r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst modalStyle = (needFX) => ({\r\n maxWidth: needFX ? \"1010px\" : \"780px\",\r\n});\r\n\r\nconst OversDetail = ({ totals, loadingEarnings }) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    Buy side\r\n {loadingEarnings ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
    Sell side\r\n {loadingEarnings ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
    Earnings\r\n {loadingEarnings ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
    \r\n
    \r\n);\r\n\r\nconst SideDetail = ({ side, quantity, average }) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    {side.capitalize()} side quantity\r\n \r\n
    Average price\r\n \r\n
    \r\n
    \r\n);\r\n\r\nconst BoxDetail = ({ children }) => (\r\n
    \r\n
    {children}
    \r\n
    \r\n);\r\n\r\nexport const Number = ({ value, decimalScale, dataTypeDecimalName }) => (\r\n \r\n {value === null ? (\r\n \"-\"\r\n ) : (\r\n \r\n )}\r\n \r\n);\r\n\r\nexport default Trading;\r\n\r\n//\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"Trading-module_modal_3BQRz\",\"headerForm\":\"Trading-module_headerForm_pmOUx\",\"footer\":\"Trading-module_footer_317um\",\"content\":\"Trading-module_content_5uzba\",\"box\":\"Trading-module_box_1_s9b\",\"container\":\"Trading-module_container_3L8oP\",\"buy\":\"Trading-module_buy_2gNvQ\",\"sell\":\"Trading-module_sell_vrBfS\",\"number\":\"Trading-module_number_cwrH-\",\"actions\":\"Trading-module_actions_3Dr6D\",\"product\":\"Trading-module_product_5U0Ip\",\"columnContainer\":\"Trading-module_columnContainer_18C7C\",\"column\":\"Trading-module_column_2iLq3\",\"empty\":\"Trading-module_empty_2DLLU\",\"line\":\"Trading-module_line_kKgVD\",\"suggestionItem\":\"Trading-module_suggestionItem_3_NrK\",\"arroba\":\"Trading-module_arroba_1da5q\",\"deleteBtn\":\"Trading-module_deleteBtn_3nQzV\",\"btnNew\":\"Trading-module_btnNew_2CFA7\",\"sndRow\":\"Trading-module_sndRow_BJgBj\"};","import React, { useState } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Button } from \"reactstrap\";\r\nimport { Field, Combobox } from \"../Order/Field/Field\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { showToast } from \"../../../utils/Helper\";\r\n\r\nexport const TradingDesk = ({ open, onToggle, data, selected, services, orderId }) => {\r\n const [tradingSelected, setTradingSelected] = useState(selected);\r\n const [loading, setLoading] = useState(true);\r\n const onChange = (recive) => {\r\n setTradingSelected(recive);\r\n };\r\n\r\n const updateTradingDesk = (orderId, TradingDeskId) => {\r\n let body = {\r\n orderid: orderId,\r\n tradingdeskid: TradingDeskId,\r\n };\r\n services.changeTradingDesks({ body }).then((r) => {\r\n if (r.response.result.Code == 200) {\r\n showToast(\"Trading Desk Changed\");\r\n onToggle();\r\n } else {\r\n showToast(r.response.result.Description, true);\r\n }\r\n });\r\n };\r\n\r\n return (\r\n \r\n Change trading desk\r\n \r\n \r\n ({\r\n id: dt.Id,\r\n description: dt.Name,\r\n }))}\r\n onChange={(v) => onChange(v)}\r\n selected={selected}\r\n style={{ minWidth: \"165px\", marginRight: \"30px\" }}\r\n />\r\n \r\n \r\n \r\n updateTradingDesk(orderId, tradingSelected)}\r\n data-style={EXPAND_RIGHT}\r\n //loading={loading}\r\n >\r\n Change\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Input } from \"reactstrap\";\r\n\r\nconst NoFormatNumberInput = ({ onChange, placeholder, value, invalid, disabled, hasDecimals=false }) => {\r\n const pattern = hasDecimals ? \"\" : \"[0-9]*\";\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default NoFormatNumberInput;\r\n","import React from \"react\";\r\nimport NumberFormat from \"react-number-format\";\r\nimport { Input } from \"reactstrap\";\r\n\r\nconst decimalSeparator = (() => {\r\n if (\r\n typeof window !== \"undefined\" &&\r\n window.___APP_CONFIG___ &&\r\n window.___APP_CONFIG___.DECIMAL_SEPARATOR == \".\"\r\n )\r\n return \".\";\r\n return \",\";\r\n})();\r\n\r\nconst thousandSeparator = (() => {\r\n if (\r\n typeof window !== \"undefined\" &&\r\n window.___APP_CONFIG___ &&\r\n window.___APP_CONFIG___.DECIMAL_SEPARATOR == \".\"\r\n )\r\n return \",\";\r\n return \".\";\r\n})();\r\n\r\nconst currency =\r\n typeof window !== \"undefined\" && window.___APP_CONFIG___\r\n ? window.___APP_CONFIG___.DATA_TYPE_DECIMALS.CURRENCY\r\n : \"2\";\r\n\r\nconst price =\r\n typeof window !== \"undefined\" && window.___APP_CONFIG___\r\n ? window.___APP_CONFIG___.DATA_TYPE_DECIMALS.PRICE\r\n : \"4\";\r\n\r\nconst quantity =\r\n typeof window !== \"undefined\" && window.___APP_CONFIG___\r\n ? window.___APP_CONFIG___.DATA_TYPE_DECIMALS.QUANTITY\r\n : \"8\";\r\n\r\nconst percentage =\r\n typeof window !== \"undefined\" && window.___APP_CONFIG___\r\n ? window.___APP_CONFIG___.DATA_TYPE_DECIMALS.PERCENTAGE\r\n : \"2\";\r\n\r\nconst defaultValue =\r\n typeof window !== \"undefined\" && window.___APP_CONFIG___\r\n ? window.___APP_CONFIG___.DATA_TYPE_DECIMALS.DEFAULT\r\n : \"8\";\r\n\r\nexport const NumberFormatInput = ({\r\n type = \"text\",\r\n placeholder,\r\n customInput = Input,\r\n value,\r\n invalid,\r\n disabled,\r\n onValueChange,\r\n decimalScale = null,\r\n dataTypeDecimalName = \"default\",\r\n ...rest\r\n}) => {\r\n const decimalAmount = {\r\n quantity: quantity,\r\n price: price,\r\n currency: currency,\r\n percentage: percentage,\r\n default: defaultValue,\r\n };\r\n\r\n //We set the amount of decimals to the default amount.\r\n let decimals = decimalAmount.default;\r\n\r\n //We lowercase the decimal name\r\n dataTypeDecimalName ? (dataTypeDecimalName = dataTypeDecimalName.toString().toLowerCase().trim()) : null;\r\n\r\n //If we have a specific amount of decimals, we'll use that one.\r\n //If we don't have one, but we have a decimal category, we use that one\r\n //If we don't have anything we use the default amount of decimals.\r\n decimalScale != null\r\n ? (decimals = decimalScale)\r\n : (decimals =\r\n decimalAmount[dataTypeDecimalName] != undefined ? decimalAmount[dataTypeDecimalName] : decimals);\r\n\r\n return (\r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport { Input } from \"reactstrap\";\r\nimport { NumberFormatInput } from \"../NumberFormatInput/NumberFormatInput\";\r\n\r\nconst Numeric = ({ value, onChange, decimalScale, dataTypeDecimalName, ...restProps }) => (\r\n onChange(isNaN(e.floatValue) ? e.value : e.floatValue)}\r\n decimalScale={decimalScale}\r\n dataTypeDecimalName={dataTypeDecimalName}\r\n {...restProps}\r\n />\r\n);\r\n\r\nNumeric.propTypes = {\r\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\r\n onChange: PropTypes.func,\r\n};\r\n\r\nconst formatNumber = (value) => {\r\n if (isNaN(value) || value === \"\") {\r\n return \"\";\r\n } else {\r\n return parseFloat(value);\r\n }\r\n};\r\n\r\nexport default React.memo(Numeric);\r\n","import React, { useState, Fragment, useEffect } from \"react\";\r\nimport { Button, Dropdown as ReactStrapDropDown } from \"reactstrap\";\r\nimport { SearchBox } from \"../SearchBox/SearchBox\";\r\nimport { FormattedNumber } from \"../FormattedNumber/FormattedNumber\";\r\n\r\nimport { Mode } from \"../../utils/Order/Order\";\r\n\r\nimport style from \"./../Offers/style.module.scss\";\r\n\r\nconst Offers = (props) => {\r\n const { modalOrder, items } = props;\r\n const { openModalOrder } = modalOrder;\r\n const [open, setOpen] = useState(false);\r\n const [itemArray, setItemArray] = useState([]);\r\n const [state, setState] = useState({\r\n filters: { text: \"\" },\r\n });\r\n\r\n const filterArray = () => {\r\n if (state.filters.text !== \"\") {\r\n let res = [];\r\n if (items) {\r\n items.forEach((item) => {\r\n res.push(item);\r\n });\r\n }\r\n setItemArray(\r\n res.filter(\r\n (item) =>\r\n item.AssetName.toLowerCase().includes(state.filters.text.toLowerCase()) ||\r\n (item.OfferQuantitytoAdvisor - item.OfferOfferQuantityTakenByAdvisor + \"\").includes(\r\n state.filters.text\r\n ) ||\r\n (item.OfferPrice + \"\").includes(state.filters.text)\r\n ),\r\n ...res\r\n );\r\n } else {\r\n loadArray();\r\n }\r\n };\r\n\r\n const loadArray = () => {\r\n let res = [];\r\n if (items) {\r\n items.forEach((item) => {\r\n res.push(item);\r\n });\r\n setItemArray(res);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n loadArray();\r\n }, [items]);\r\n\r\n useEffect(() => {\r\n filterArray();\r\n }, [state]);\r\n\r\n const orderSimple = (item) => ({\r\n AssetId: item.AssetId,\r\n OrderPrice: item.OfferPrice,\r\n AssetName: item.AssetName,\r\n AssetTicker: item.AssetName,\r\n OrderType: \"Limit\",\r\n OrderIsBasket: true ? item.OfferId > 0 : false,\r\n OrderPrice: item.OfferPrice,\r\n offer: {\r\n OfferId: item.OfferId,\r\n OfferPrice: item.OfferPrice,\r\n OrderId: item.OrderId,\r\n OfferQuantitytoAdvisor: item.OfferQuantitytoAdvisor,\r\n OfferQuantitytoClient: item.OfferQuantitytoClient,\r\n },\r\n });\r\n\r\n const openOrder = (item) => {\r\n if (item.OrderId > 0) {\r\n props.getOrder(item.OrderId).then((res) => {\r\n let orderToLoad = {\r\n ...res.response,\r\n offerLoaded: res,\r\n };\r\n openModalOrder({ mode: Mode.EDIT, order: orderToLoad, type: \"Basket\" });\r\n });\r\n } else {\r\n props.getAssetInfo({ assetId: item.AssetId }).then((res) => {\r\n let orderToLoad = {\r\n ...orderSimple(item),\r\n ...res.info,\r\n };\r\n openModalOrder({ mode: Mode.NEW, order: orderToLoad });\r\n });\r\n }\r\n };\r\n\r\n const changeFilterValue = (props) => {\r\n setState((prevState) => ({\r\n ...prevState,\r\n filters: {\r\n ...prevState.filters,\r\n ...props,\r\n },\r\n }));\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default Offers;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"asideContent\":\"style-module_asideContent_3rbGb\",\"empty\":\"style-module_empty_3GMwY\",\"pointer\":\"style-module_pointer_2JfpA\",\"asideMinimizer\":\"style-module_asideMinimizer_2l7Jn\"};","import React, { useState } from \"react\";\r\nimport LaddaButton, { EXPAND_RIGHT, EXPAND_LEFT } from \"react-ladda\";\r\n\r\nimport {\r\n renderOrderQuantity,\r\n renderOrderSide,\r\n renderOrderSymbol,\r\n renderOrderPrice,\r\n renderOrderQuantityType,\r\n renderExecutionsAvg,\r\n} from \"./Item\";\r\nimport { getProductTypeName } from \"../../utils/Order/Order\";\r\n\r\nimport style from \"./Order.module.scss\";\r\nimport CircularProgress from \"../CircularProgress/CircularProgress\";\r\nimport { showToast } from \"../../utils/Helper\";\r\n\r\nconst InlineDetail = ({ order, hideAvg, getOrderPdf = undefined }) => {\r\n const [loading, setLoading] = useState(false);\r\n\r\n const downloadPdf = async () => {\r\n setLoading(() => true);\r\n try {\r\n order.OrderCurrencyId = order.OrderSettlementCurrencyId;\r\n if (!order.CurrentAccount) {\r\n // Es una orden nueva, rellenar con datos temporales\r\n order.CurrentAccount = {\r\n AccountId: 0,\r\n AccountNumber: \"Nueva cuenta\",\r\n Commission: 0,\r\n AccountName: \"Nueva cuenta\",\r\n };\r\n order.OrderInitDate = new Date();\r\n }\r\n const { response } = await getOrderPdf({ order });\r\n window.open(response.fileUrl);\r\n } catch (error) {\r\n showToast(\"Error downloading order pdf\", true);\r\n console.error(error);\r\n }\r\n\r\n setTimeout(() => {\r\n setLoading(() => false);\r\n }, 3000);\r\n };\r\n\r\n return (\r\n
    \r\n {getProductTypeName(order.AssetClassForm)} {renderOrderSide(order)}{\" \"}\r\n {renderOrderQuantity(order)} {renderOrderQuantityType(order)} {renderOrderSymbol(order)}\r\n {\" @ \"}\r\n {renderOrderPrice(order)} {!hideAvg && renderExecutionsAvg(order)}\r\n
    \r\n {getOrderPdf && (\r\n \r\n {loading ? Downloading... : }\r\n \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nexport default InlineDetail;\r\n","import React from \"react\";\r\nimport { FormattedNumber, formattedNumber } from \"../FormattedNumber/FormattedNumber\";\r\nimport {\r\n OrderStatus,\r\n TradeStatus,\r\n TimeFrame,\r\n getOrderTypeName,\r\n getTimeFrameName,\r\n getStatusName,\r\n getTradeStatusName,\r\n ProductType,\r\n OrderPriceType,\r\n Type,\r\n} from \"../../utils/Order/Order\";\r\nimport { Badge } from \"reactstrap\";\r\nimport classnames from \"classnames\";\r\nimport style from \"./Order.module.scss\";\r\nimport { UI } from \"..\";\r\n\r\n/* Order quantity */\r\nexport const renderOrderQuantity = (order) => {\r\n const isMultiAccounts = order.OrderHasMultipleAccounts;\r\n\r\n if (\r\n !isMultiAccounts &&\r\n order.AssetClassForm == ProductType.MFUNDS &&\r\n order.OrderSide == \"Sell\" &&\r\n order.CurrentAccount &&\r\n order.CurrentAccount.IsFullLiquidation\r\n ) {\r\n return Full liq.;\r\n }\r\n\r\n if (order.AssetClassForm === ProductType.REPO) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\n/* Trade quantity */\r\nexport const renderTradeQuantity = (trade) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\n/* Order type */\r\nexport const renderOrderQuantityType = (order) => {\r\n if (order[\"AssetClassForm\"] == ProductType.MFUNDS) {\r\n return {order.OrderQuantityIsCash ? \"(Cash)\" : \"(Shares)\"};\r\n }\r\n\r\n return null;\r\n};\r\n\r\n/* Order price, typePrice */\r\nexport const renderOrderPrice = (order) => {\r\n let price;\r\n\r\n if (\r\n [\r\n ProductType.EQUITY,\r\n ProductType.OPTION,\r\n ProductType.FOREX,\r\n ProductType.BOND,\r\n ProductType.MFUNDS,\r\n ProductType.MMARKET,\r\n ].indexOf(order[\"AssetClassForm\"]) >= 0\r\n ) {\r\n if (\r\n order.OrderType == OrderPriceType.MARKET ||\r\n order.OrderType == OrderPriceType.MARKETONOPEN ||\r\n order.OrderType == OrderPriceType.MARKETONCLOSE\r\n ) {\r\n price = null;\r\n } else if (order.OrderType == OrderPriceType.STOPLIMIT) {\r\n price = (\r\n \r\n \r\n \r\n \r\n );\r\n } else if (order.OrderType == OrderPriceType.STOP) {\r\n price = (\r\n \r\n \r\n \r\n );\r\n } else {\r\n price = (\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n {price} {getOrderTypeName(order.OrderType)}\r\n \r\n );\r\n } else if (ProductType.MFUNDS != order[\"AssetClassForm\"] && order[\"OrderPrice\"] != undefined) {\r\n return (\r\n \r\n \r\n \r\n );\r\n } else {\r\n return null;\r\n }\r\n};\r\n\r\n/* Trade price, typePrice */\r\nexport const renderTradePrice = (trade) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\n/* Order timeframe */\r\nexport const renderOrderTimeFrame = (order) => {\r\n if ([ProductType.EQUITY, ProductType.OPTION, ProductType.FOREX].indexOf(order[\"AssetClassForm\"]) >= 0) {\r\n const timeFrameName = getTimeFrameName(order.OrderTimeInForce);\r\n\r\n return [\r\n \r\n {timeFrameName}\r\n ,\r\n \r\n {order.OrderTimeInForce == TimeFrame.GTD ? order.OrderGTD : null}\r\n ,\r\n ];\r\n } else {\r\n return null;\r\n }\r\n};\r\n\r\n/** Order TimeFrame LT */\r\nexport const renderOrderTimeFrameLowTouch = (order) => {\r\n const timeFrameName = getTimeFrameName(order.OrderTimeInForce);\r\n\r\n return [\r\n \r\n {timeFrameName}\r\n ,\r\n \r\n {order.OrderTimeInForce == TimeFrame.GTD ? order.OrderGTD : null}\r\n ,\r\n ];\r\n};\r\n/* Order side */\r\nexport const renderOrderSide = (order) => {\r\n let orderSide = order.OrderSide.toUpperCase();\r\n if (order.AssetClassForm == ProductType.REPO) {\r\n orderSide = orderSide === \"BUY\" ? \"LEND\" : \"BORROW\";\r\n }\r\n\r\n return (\r\n \r\n {orderSide}\r\n {order.AssetClassForm == ProductType.OPTION ? `-${order.OrderOpenClose.substring(0, 1)}` : null}\r\n \r\n );\r\n};\r\n\r\n/* Trade side */\r\nexport const renderTradeSide = (trade) => {\r\n return (\r\n \r\n {trade.TradeSide.toUpperCase()}\r\n {trade.TradeAssetClassForm == ProductType.OPTION ? `-${trade.TradeOpenClose.substring(0, 1)}` : null}\r\n \r\n );\r\n};\r\n\r\n/* Order status */\r\nexport const renderOrderStatus = (order) => {\r\n return (\r\n \r\n {getStatusName(order.OrderStatus)}\r\n \r\n );\r\n};\r\n\r\n/* Trade status */\r\nexport const renderTradeStatus = (trade) => {\r\n return (\r\n \r\n {getTradeStatusName(trade.TradeStatus)}\r\n \r\n );\r\n};\r\n\r\n/* Order symbol */\r\nexport const renderOrderSymbol = (order) => {\r\n if (order.AssetClassForm == ProductType.REPO) {\r\n if (order.OrderSide === \"Sell\" && order.CurrentAccount.Collateral) {\r\n const collateral = order.CurrentAccount.Collateral[0];\r\n // tiene collateral\r\n return {collateral.AssetTicker};\r\n } else {\r\n // usa la moneda, OrderSettlementCurrencySymbol\r\n return {order.OrderSettlementCurrencySymbol};\r\n }\r\n }\r\n\r\n let settleText = \"\";\r\n if (order.AssetClassForm == ProductType.FOREX) {\r\n return (\r\n \r\n {order.AssetTicker}\r\n {\" - \"}\r\n {order.OrderSettlementCurrencySymbol}\r\n \r\n );\r\n } else {\r\n if (order.OrderCurrencySymbol != order.OrderSettlementCurrencySymbol) {\r\n settleText = ` (stl ${order.OrderSettlementCurrencySymbol})`;\r\n }\r\n }\r\n return (\r\n \r\n \r\n {order.AssetTicker}\r\n {settleText}\r\n \r\n \r\n );\r\n};\r\n\r\n/* Trade symbol */\r\nexport const renderTradeSymbol = (trade) => {\r\n if (trade.TradeAssetClassForm == ProductType.FOREX) {\r\n return (\r\n \r\n {trade.TradeAssetTicker}\r\n {\" - \"}\r\n {trade.TradeSettleCurrencyISO}\r\n \r\n );\r\n }\r\n return (\r\n \r\n {trade.TradeAssetTicker}\r\n \r\n );\r\n};\r\n\r\n/* Order broker */\r\nexport const renderOrderBroker = (brokerName) => {\r\n const abrev = brokerName.substr(0, 3).toUpperCase();\r\n return {abrev};\r\n};\r\n\r\n/* Order account */\r\nexport const renderOrderAccount = (order) => {\r\n let number;\r\n if (order.Accounts.length == 0) {\r\n if (order.CurrentAccount) {\r\n number = order.CurrentAccount.AccountNumber;\r\n } else {\r\n number = \"No accounts\";\r\n }\r\n } else if (order.Accounts.length == 1) {\r\n number = order.Accounts[0].AccountNumber;\r\n } else {\r\n number = \"Multiple accts\";\r\n }\r\n return {number};\r\n};\r\n\r\n/* Order account */\r\nexport const renderOrderAccountName = (order) => {\r\n let name;\r\n if (order.Accounts.length == 0) {\r\n if (order.CurrentAccount) {\r\n name = order.CurrentAccount.AccountName;\r\n } else {\r\n name = \"No accounts\";\r\n }\r\n } else if (order.Accounts.length == 1) {\r\n name = order.Accounts[0].AccountName;\r\n } else {\r\n name = \"Multiple accts\";\r\n }\r\n return {name};\r\n};\r\n\r\n/* Order instruction */\r\nexport const renderOrderInstruction = (order) => {\r\n let instruction = \"\";\r\n if (order.Accounts.length == 0) {\r\n if (order.CurrentAccount) {\r\n instruction = order.CurrentAccount.Instruction;\r\n } else {\r\n instruction = \"No accounts\";\r\n }\r\n } else if (order.Accounts.length == 1) {\r\n instruction = order.Accounts[0].Instruction;\r\n } else {\r\n let hasDifferentInstructions = false;\r\n order.Accounts.forEach((account) => {\r\n if (instruction == \"\") {\r\n instruction = account.Instruction;\r\n } else if (account.Instruction !== instruction) {\r\n hasDifferentInstructions = true;\r\n }\r\n });\r\n if (hasDifferentInstructions) {\r\n instruction = \"Multiple inst.\";\r\n }\r\n }\r\n return {instruction};\r\n};\r\n\r\n/* Order currencies */\r\nexport const renderOrderCurrencies = (order) => {\r\n return (\r\n \r\n (\r\n {order.OrderCurrencySymbol == order.OrderSettlementCurrencySymbol\r\n ? order.OrderCurrencySymbol\r\n : `${order.OrderCurrencySymbol}/${order.OrderSettlementCurrencySymbol}`}\r\n )\r\n \r\n );\r\n};\r\n\r\nexport const renderExecutionsAvg = (order) => {\r\n const { pending } = order.stats;\r\n\r\n let _pending = parseFloat(pending);\r\n\r\n if (pending > 999) {\r\n _pending = Math.round((pending / 1000) * 100) / 100 + \"K\";\r\n } else {\r\n _pending = parseFloat(_pending.toFixed(1));\r\n }\r\n const OrderAverage = ({ avg }) => {\r\n let res = avg + \"\";\r\n if (res === \"-\") return res;\r\n\r\n if (res.includes(\"K\"))\r\n return formattedNumber(res.split(0, -1), \"quantity\", null, true) + res[res.length - 1];\r\n else return formattedNumber(res, \"quantity\", null, true);\r\n };\r\n\r\n return (\r\n \r\n {formattedNumber(_pending, \"quantity\", null, true)}\r\n {\"/\"}\r\n \r\n \r\n );\r\n};\r\n\r\nconst getStatusClass = (status) => {\r\n switch (status) {\r\n case OrderStatus.AMENDING:\r\n return \"color2\";\r\n case OrderStatus.CANCEL_PENDING:\r\n return \"color2\";\r\n case OrderStatus.ROUTED:\r\n return \"color1\";\r\n case OrderStatus.ACKED:\r\n return \"color1\";\r\n case OrderStatus.PART:\r\n return \"color3\";\r\n case OrderStatus.FILLED:\r\n return \"color4\";\r\n case OrderStatus.REJECTED:\r\n return \"color5\";\r\n case OrderStatus.ANNULLED:\r\n case OrderStatus.CANCELED:\r\n return \"color5\";\r\n case OrderStatus.PART_FILLED:\r\n return \"color4\";\r\n case OrderStatus.PARKED:\r\n return \"color6\";\r\n case OrderStatus.REALLOCATING:\r\n return \"color2\";\r\n default:\r\n return \"\";\r\n }\r\n};\r\n\r\nconst getTradeStatusClass = (status) => {\r\n switch (status) {\r\n case TradeStatus.NEW:\r\n return \"color1\";\r\n case TradeStatus.CONFIRMATION_SENT:\r\n return \"color1\";\r\n case TradeStatus.MATCHED:\r\n return \"color4\";\r\n case TradeStatus.UNMATCHED:\r\n return \"color5\";\r\n case TradeStatus.BOOKED:\r\n return \"color4\";\r\n case TradeStatus.CANCELED:\r\n return \"color5\";\r\n default:\r\n return \"\";\r\n }\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"bold\":\"Order-module_bold_3GGxB\",\"badge\":\"Order-module_badge_lOLxI\",\"buy\":\"Order-module_buy_ccugW\",\"sell\":\"Order-module_sell_2-D7D\",\"status\":\"Order-module_status_2pza_\",\"color1\":\"Order-module_color1_3cODq\",\"color2\":\"Order-module_color2_13dS8\",\"color3\":\"Order-module_color3_35oWr\",\"color4\":\"Order-module_color4_2agZd\",\"color5\":\"Order-module_color5_2RLgT\",\"color6\":\"Order-module_color6_AvGtC\",\"avg\":\"Order-module_avg_2tHox\",\"detail\":\"Order-module_detail_1c7Jg\",\"side\":\"Order-module_side_10lv2\"};","import React from \"react\";\r\nimport style from \"./Order.module.scss\";\r\nimport { renderTradeQuantity, renderTradeSide, renderTradeSymbol, renderTradePrice } from \"./Item\";\r\nimport { getProductTypeName } from \"../../utils/Order/Order\";\r\n\r\nexport default class TradeInlineDetail extends React.Component {\r\n render() {\r\n const { trade, hideAvg } = this.props;\r\n\r\n if (trade) {\r\n return (\r\n
    \r\n {getProductTypeName(trade.TradeAssetClassForm)} {renderTradeSide(trade)}{\" \"}\r\n {renderTradeQuantity(trade)} {renderTradeSymbol(trade)}\r\n {\" @ \"}\r\n {renderTradePrice(trade)}\r\n
    \r\n );\r\n } else {\r\n return null;\r\n }\r\n }\r\n}\r\n","import React from \"react\";\r\nimport { CircularProgress } from \"..\";\r\nimport { OrderItemUI } from \"..\";\r\nimport { getProductTypeName } from \"../../utils/Order/Order\";\r\nimport InfiniteScroll from \"react-infinite-scroller\";\r\nimport { Table } from \"reactstrap\";\r\nimport style from \"./styles.module.scss\";\r\nimport { FormattedDate } from \"react-intl\";\r\n\r\nconst OrderList = ({ grid, getOrders, toggle }) => {\r\n const handleClick = (order) => {\r\n toggle(\"order\", { order });\r\n };\r\n\r\n return (\r\n
    \r\n \r\n {grid.loading ? : null}\r\n
    \r\n }\r\n loadMore={getOrders}\r\n hasMore={grid.hasMore}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {grid.orders == null || grid.orders.length == 0 ? (\r\n \r\n ) : (\r\n grid.orders.map((order) => (\r\n handleClick(order)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))\r\n )}\r\n \r\n
    TypeTickerSideQuantityPriceAccountTimeFrameStatusDate
    \r\n #{order.OrderId}\r\n {getProductTypeName(order.AssetClassForm)}\r\n {OrderItemUI.renderOrderSymbol(order)}{OrderItemUI.renderOrderSide(order)}{OrderItemUI.renderOrderQuantity(order)}{OrderItemUI.renderOrderPrice(order)}{order.AccountNumber}{OrderItemUI.renderOrderTimeFrame(order)}{OrderItemUI.renderOrderStatus(order)}\r\n \r\n
    \r\n \r\n
    \r\n );\r\n};\r\n\r\nconst EmptyTable = ({ loading }) => (\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n

    No orders

    \r\n )}\r\n \r\n \r\n);\r\n\r\nexport default OrderList;\r\n","import React, { useState, useCallback } from \"react\";\r\nimport {\r\n Input,\r\n InputGroup,\r\n Row,\r\n Col,\r\n FormGroup,\r\n Label,\r\n Button,\r\n InputGroupAddon,\r\n UncontrolledDropdown,\r\n DropdownToggle,\r\n DropdownMenu,\r\n DropdownItem,\r\n} from \"reactstrap\";\r\nimport { DateField } from \"../../../utils/FormFields\";\r\nimport { debounce } from \"../../../utils/Helper\";\r\nimport { getProductTypeName, ProductType, OrderStatus } from \"../../../utils\";\r\nimport style from \"../styles.module.scss\";\r\n\r\nconst Toolbar = ({\r\n filter: rootFilter,\r\n filterText: rootFilterText,\r\n onChange: rootOnChange,\r\n onChangeText: rootOnChangeText,\r\n counters,\r\n}) => {\r\n const [filters, setFilters] = useState(rootFilter);\r\n const [filterText, setFilterText] = useState(rootFilterText);\r\n\r\n const debounceCallback = useCallback(\r\n debounce((nextValues) => rootOnChange(nextValues), 500),\r\n []\r\n );\r\n\r\n const debounceCallbackText = useCallback(\r\n debounce((nextValues) => rootOnChangeText(nextValues), 500),\r\n []\r\n );\r\n\r\n const onChange = (fields) => {\r\n const nextValues = {\r\n ...filters,\r\n ...fields,\r\n };\r\n debounceCallback(nextValues);\r\n setFilters(nextValues);\r\n };\r\n\r\n const onChangeText = (text) => {\r\n debounceCallbackText(text);\r\n setFilterText(text);\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n onChange({ [name]: value })}\r\n value={filters.FromDate}\r\n />\r\n \r\n \r\n onChange({ [name]: value })}\r\n value={filters.ToDate}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n \r\n
    \r\n\r\n onChangeText(e.target.value)}\r\n />\r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n {/* */}\r\n
    \r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst DropDownFilterStatus = ({ valueName, value, onChange }) => {\r\n const items = [\r\n { id: 0, description: \"All Statuses\", value: Object.values(OrderStatus) },\r\n {\r\n id: 1,\r\n description: \"Working\",\r\n value: [OrderStatus.PART, OrderStatus.ACKED],\r\n },\r\n { id: 2, description: \"Routed\", value: [OrderStatus.ROUTED] },\r\n { id: 3, description: \"Parked\", value: [OrderStatus.PARKED] },\r\n { id: 4, description: \"Filled\", value: [OrderStatus.FILLED] },\r\n { id: 5, description: \"Part Filled\", value: [OrderStatus.PART_FILLED] },\r\n { id: 6, description: \"Rejected\", value: [OrderStatus.REJECTED] },\r\n { id: 7, description: \"Canceled\", value: [OrderStatus.CANCELED] },\r\n { id: 8, description: \"Expired\", value: [OrderStatus.EXPIRED] },\r\n { id: 9, description: \"Auth wait\", value: [OrderStatus.AUTH_WAIT] },\r\n { id: 10, description: \"Reallocating\", value: [OrderStatus.REALLOCATING] },\r\n ];\r\n\r\n return (\r\n \r\n \r\n {value.length == 0 ? items[0].description : valueName}\r\n \r\n \r\n {items.map((item, index) => (\r\n \r\n onChange({\r\n StatusesName: item.description,\r\n Statuses: item.value,\r\n })\r\n }\r\n key={`status-${index}`}\r\n >\r\n {item.description}\r\n \r\n ))}\r\n \r\n \r\n );\r\n};\r\n\r\nconst DropDownFilterProduct = ({ onChange, value }) => {\r\n return (\r\n \r\n \r\n {value != \"\" ? getProductTypeName(value) : \"All Products\"}\r\n \r\n \r\n onChange({ Form: \"\" })}>{\"All Products\"}\r\n {Object.values(ProductType).map((key, index) => (\r\n onChange({ Form: key })} key={`product-${index}`}>\r\n {getProductTypeName(key)}\r\n \r\n ))}\r\n \r\n \r\n );\r\n};\r\n\r\nconst Counter = ({ total }) => (\r\n \r\n
    Orders: {total}
    \r\n \r\n);\r\n\r\nexport default Toolbar;\r\n","import OrderList from \"./OrderList\";\r\nimport Toolbar from \"./Toolbar/Toolbar\";\r\n\r\nexport { OrderList as List, Toolbar };\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"main\":\"styles-module_main_1vS8l\",\"toolbar\":\"styles-module_toolbar_pigKL\",\"dropdown\":\"styles-module_dropdown_KjwAe\",\"totals\":\"styles-module_totals_1yu7a\",\"download\":\"styles-module_download_3FUzL\",\"grid\":\"styles-module_grid_1Ltpe\",\"empty\":\"styles-module_empty_1BuC4\"};","import React, {Component} from 'react';\r\nimport {Table, Badge,\tPagination as RStrapPagination, PaginationItem, PaginationLink} from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\n\r\n class Pagination extends Component {\r\n\t\r\n\trender() {\r\n\t\tconst {page, pages} = this.props;\r\n\r\n\t\tif (pages <= 1) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t this.props.onChangePage(page-1)}>\r\n\t\t\t\t\r\n\t\t\t\t\t{\tArray.apply(1, Array(pages)).map((x, i) => (\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t this.props.onChangePage(i+1)}>{i+1}\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t}\r\n\t\t\t\t= pages}>\r\n\t\t\t\t\t this.props.onChangePage(page+1)}>\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t)\r\n\t}\r\n}\r\n\r\nexport default Pagination;","import React, { Component } from \"react\";\r\nimport style from \"./PercentageBar.module.scss\";\r\n\r\n// Taken from https://www.vandelaydesign.com/progress-bar-design/ and https://codepen.io/WhiteWolfWizard/pen/izhHd\r\n\r\nclass PercentageBar extends Component {\r\n render() {\r\n return (\r\n
    \r\n \r\n \r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport default PercentageBar;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"progress\":\"PercentageBar-module_progress_xhIgc\",\"bar\":\"PercentageBar-module_bar_39gdz\",\"divider\":\"PercentageBar-module_divider_QP1LH\"};","import React, { Component } from \"react\";\r\nimport style from \"./PercentageCircle.module.scss\";\r\n\r\n// Taken from http://circle.firchow.net\r\n\r\nclass PercentageCircle extends Component {\r\n render() {\r\n return (\r\n
    \r\n {this.props.descriptionText}\r\n {this.props.percentage}%\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport default PercentageCircle;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"rect-auto\":\"PercentageCircle-module_rect-auto_u5Rgv\",\"c100\":\"PercentageCircle-module_c100_2ghUH\",\"p51\":\"PercentageCircle-module_p51_u9hnp\",\"slice\":\"PercentageCircle-module_slice_2dawL\",\"p52\":\"PercentageCircle-module_p52_vOscS\",\"p53\":\"PercentageCircle-module_p53_2xfo3\",\"p54\":\"PercentageCircle-module_p54_33BhV\",\"p55\":\"PercentageCircle-module_p55_3ua_z\",\"p56\":\"PercentageCircle-module_p56_2ldt8\",\"p57\":\"PercentageCircle-module_p57_2B3Z7\",\"p58\":\"PercentageCircle-module_p58_vibDy\",\"p59\":\"PercentageCircle-module_p59_58Y-G\",\"p60\":\"PercentageCircle-module_p60_Yvmm7\",\"p61\":\"PercentageCircle-module_p61_2UQMK\",\"p62\":\"PercentageCircle-module_p62_dcYcX\",\"p63\":\"PercentageCircle-module_p63_1S8g_\",\"p64\":\"PercentageCircle-module_p64_1CV03\",\"p65\":\"PercentageCircle-module_p65_1ooVv\",\"p66\":\"PercentageCircle-module_p66_FQ3tY\",\"p67\":\"PercentageCircle-module_p67_3kvsg\",\"p68\":\"PercentageCircle-module_p68_nIwrU\",\"p69\":\"PercentageCircle-module_p69_35Dt7\",\"p70\":\"PercentageCircle-module_p70_3lV6u\",\"p71\":\"PercentageCircle-module_p71_BZuZs\",\"p72\":\"PercentageCircle-module_p72_vxjCb\",\"p73\":\"PercentageCircle-module_p73_2ih8g\",\"p74\":\"PercentageCircle-module_p74_FTVh4\",\"p75\":\"PercentageCircle-module_p75_39eWi\",\"p76\":\"PercentageCircle-module_p76_2grOA\",\"p77\":\"PercentageCircle-module_p77_1Ov4V\",\"p78\":\"PercentageCircle-module_p78_1BPwB\",\"p79\":\"PercentageCircle-module_p79_swFW3\",\"p80\":\"PercentageCircle-module_p80_2iokV\",\"p81\":\"PercentageCircle-module_p81_3EMIs\",\"p82\":\"PercentageCircle-module_p82_2AbvY\",\"p83\":\"PercentageCircle-module_p83_2_bJ6\",\"p84\":\"PercentageCircle-module_p84_NPju_\",\"p85\":\"PercentageCircle-module_p85_253Cf\",\"p86\":\"PercentageCircle-module_p86_1uhSh\",\"p87\":\"PercentageCircle-module_p87_FTuQf\",\"p88\":\"PercentageCircle-module_p88_3mwgs\",\"p89\":\"PercentageCircle-module_p89_Z62gl\",\"p90\":\"PercentageCircle-module_p90_2tOt-\",\"p91\":\"PercentageCircle-module_p91_16jPH\",\"p92\":\"PercentageCircle-module_p92_DXdst\",\"p93\":\"PercentageCircle-module_p93_3bpyl\",\"p94\":\"PercentageCircle-module_p94_2RBck\",\"p95\":\"PercentageCircle-module_p95_2-Yrg\",\"p96\":\"PercentageCircle-module_p96_2oaNj\",\"p97\":\"PercentageCircle-module_p97_1u-uh\",\"p98\":\"PercentageCircle-module_p98_dwQRo\",\"p99\":\"PercentageCircle-module_p99_zXv9d\",\"p100\":\"PercentageCircle-module_p100_2rkqS\",\"pie\":\"PercentageCircle-module_pie_2HvfD\",\"bar\":\"PercentageCircle-module_bar_2Me0N\",\"fill\":\"PercentageCircle-module_fill_I4vkz\",\"pie-fill\":\"PercentageCircle-module_pie-fill_ZT7QN\",\"center\":\"PercentageCircle-module_center_3pGWM\",\"big\":\"PercentageCircle-module_big_2Jxmd\",\"small\":\"PercentageCircle-module_small_3fCdn\",\"smallDescriptionText\":\"PercentageCircle-module_smallDescriptionText_SNcfw\",\"p1\":\"PercentageCircle-module_p1_3ryN-\",\"p2\":\"PercentageCircle-module_p2_6IpdN\",\"p3\":\"PercentageCircle-module_p3_1EXDF\",\"p4\":\"PercentageCircle-module_p4_3m4MX\",\"p5\":\"PercentageCircle-module_p5_1wiNW\",\"p6\":\"PercentageCircle-module_p6_1lXb_\",\"p7\":\"PercentageCircle-module_p7_3AChL\",\"p8\":\"PercentageCircle-module_p8_3jSDT\",\"p9\":\"PercentageCircle-module_p9_3ItLJ\",\"p10\":\"PercentageCircle-module_p10_W7g0c\",\"p11\":\"PercentageCircle-module_p11_2WVYr\",\"p12\":\"PercentageCircle-module_p12_nb37q\",\"p13\":\"PercentageCircle-module_p13_1OaqV\",\"p14\":\"PercentageCircle-module_p14_2k-rm\",\"p15\":\"PercentageCircle-module_p15_SUHSu\",\"p16\":\"PercentageCircle-module_p16_OpoLf\",\"p17\":\"PercentageCircle-module_p17_98fOv\",\"p18\":\"PercentageCircle-module_p18_FgA3W\",\"p19\":\"PercentageCircle-module_p19_2PFnI\",\"p20\":\"PercentageCircle-module_p20_2-Vok\",\"p21\":\"PercentageCircle-module_p21_1L1Fz\",\"p22\":\"PercentageCircle-module_p22_2tDTa\",\"p23\":\"PercentageCircle-module_p23_2p2xW\",\"p24\":\"PercentageCircle-module_p24_1w26Z\",\"p25\":\"PercentageCircle-module_p25_1AifU\",\"p26\":\"PercentageCircle-module_p26_1K8Ir\",\"p27\":\"PercentageCircle-module_p27_3GfQZ\",\"p28\":\"PercentageCircle-module_p28_6IofH\",\"p29\":\"PercentageCircle-module_p29_2tQCS\",\"p30\":\"PercentageCircle-module_p30_119lE\",\"p31\":\"PercentageCircle-module_p31_3KD49\",\"p32\":\"PercentageCircle-module_p32_2AJ4M\",\"p33\":\"PercentageCircle-module_p33_2KlMK\",\"p34\":\"PercentageCircle-module_p34_2_IQr\",\"p35\":\"PercentageCircle-module_p35_ZrEAS\",\"p36\":\"PercentageCircle-module_p36_3lCis\",\"p37\":\"PercentageCircle-module_p37_12hc0\",\"p38\":\"PercentageCircle-module_p38_gvilR\",\"p39\":\"PercentageCircle-module_p39_1Cvhp\",\"p40\":\"PercentageCircle-module_p40_2U7qX\",\"p41\":\"PercentageCircle-module_p41_1Z-s3\",\"p42\":\"PercentageCircle-module_p42_11srN\",\"p43\":\"PercentageCircle-module_p43_1VB3K\",\"p44\":\"PercentageCircle-module_p44_2mPUq\",\"p45\":\"PercentageCircle-module_p45_27xzl\",\"p46\":\"PercentageCircle-module_p46_1yHSw\",\"p47\":\"PercentageCircle-module_p47_uvkac\",\"p48\":\"PercentageCircle-module_p48_2FDnT\",\"p49\":\"PercentageCircle-module_p49_3YVEe\",\"p50\":\"PercentageCircle-module_p50_3BH9i\",\"dark\":\"PercentageCircle-module_dark_2-UTR\",\"green\":\"PercentageCircle-module_green_HW9kd\",\"orange\":\"PercentageCircle-module_orange_2w1Fi\"};","import React from 'react';\r\nimport {\r\n Card, CardBody, Row, Col, CardHeader,\r\n} from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\nimport { PercentageCircle, PercentageBar, AccountStatus } from '../../../index';\r\n\r\nexport default function AccountProfileCard({ account }) {\r\n let percentageBarColor;\r\n if (account.AccountCurrentProfileRisk === account.AccountProfileRisk) {\r\n // Tiene el mismo riesgo teórico que práctico\r\n percentageBarColor = 'green';\r\n } else if (account.AccountCurrentProfileRiskPercentage > account.AccountProfileRiskPercentage) {\r\n percentageBarColor = 'red';\r\n } else {\r\n percentageBarColor = 'orange';\r\n }\r\n\r\n let accountStatus = account.AccountStatus;\r\n if (account.AccountStatus === AccountStatus.BLOCKED\r\n && account.AccountIsExceptionallyUnblocked) {\r\n const localDate = new Date(`${account.AccountUnblockingEndTime}Z`);\r\n const localTimeString = localDate.toLocaleTimeString(undefined, {\r\n hour: '2-digit',\r\n minute: '2-digit',\r\n });\r\n accountStatus = `Active until ${localTimeString}`;\r\n }\r\n\r\n const cardHeight = account.AccountName.length > 140 ? 300 : 245;\r\n\r\n return (\r\n \r\n {`${account.AccountName} (${account.AccountNumber})`}\r\n \r\n \r\n \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n Status: \r\n {accountStatus}\r\n
    \r\n Email: \r\n {account.AccountEmail}\r\n
    \r\n Address: \r\n {`${account.AccountShippingAddresStateName} ${account.AccountShippingAddresCityName}, ${account.AccountShippingAddresCountryName}`}\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n}\r\n\r\nAccountProfileCard.propTypes = {\r\n account: PropTypes.object.isRequired,\r\n};\r\n","import React from 'react';\r\nimport {\r\n Card, CardBody, Row, Col, CardHeader, Carousel, CarouselItem, CarouselControl, CarouselIndicators,\r\n} from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\nimport './style.css';\r\n\r\nexport default function AccountProfileCarousel({\r\n account, activeHolder, next, previous, goToIndex, onExited, onExiting, redirectPerson, Link,\r\n}) {\r\n return (\r\n \r\n \r\n {account.AccountIsPhysical ?\r\n (account.AccountInfoHolder[activeHolder].AccountHolderRelationship) : (\r\n account.AccountInfoHolder[activeHolder].AccountHolderRelationshipJuridical\r\n )}\r\n {account.AccountInfoHolder[activeHolder].IsMainHolder && ' (Main Holder)'}\r\n \r\n \r\n \r\n \r\n {account.AccountInfoHolder && account.AccountInfoHolder.map((d) => (\r\n \r\n

    \r\n \r\n {d.AccountHolderName}\r\n \r\n

    \r\n
      \r\n
    • \r\n \r\n {d.AccountHolderCountryName}\r\n
    • \r\n
    • \r\n \r\n {d.AccountHolderEmail}\r\n
    • \r\n
    • \r\n \r\n {d.AccountHolderPersonType}\r\n
    • \r\n
    • \r\n \r\n {d.AccountHolderDocumentTypeName}\r\n {': '}\r\n {d.AccountHolderDocumentNumber}\r\n
    • \r\n
    \r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n
    \r\n );\r\n}\r\n\r\nAccountProfileCarousel.propTypes = {\r\n account: PropTypes.object.isRequired,\r\n activeHolder: PropTypes.number.isRequired,\r\n next: PropTypes.func.isRequired,\r\n previous: PropTypes.func.isRequired,\r\n goToIndex: PropTypes.func.isRequired,\r\n onExited: PropTypes.func.isRequired,\r\n onExiting: PropTypes.func.isRequired,\r\n redirectPerson: PropTypes.func.isRequired,\r\n};\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Card, CardHeader, CardBody, Nav, NavItem, NavLink } from \"reactstrap\";\r\nimport classnames from \"classnames\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport QuestionsTab from \"./Tabs/QuestionsTab\";\r\nimport KYCTab from \"./Tabs/KYCTab\";\r\nimport DocumentsTab from \"./Tabs/DocumentsTab\";\r\nimport ProfileTab from \"./Tabs/ProfileTab\";\r\nimport InvestmentProfileTab from \"./Tabs/InvestmentProfileTab\";\r\nimport HoldersTab from \"./Tabs/HoldersTab\";\r\nimport SignatureSetsTab from \"./Tabs/SignatureSetsTab\";\r\nimport PersonalReferencesTab from \"./Tabs/PersonalReferencesTab\";\r\nimport BankAccountsTab from \"./Tabs/BankAccountsTab\";\r\nimport RelatedAccountsTab from \"./Tabs/RelatedAccountsTab\";\r\nimport CommissionTab from \"./Tabs/CommissionsTabs\";\r\nimport GroupsTab from \"./Tabs/GroupsTab\";\r\nimport { getAccountType } from \"./types\";\r\nimport { UserType, AccountMode, showToast } from \"../../../utils/Helper\";\r\nimport BeneficiariesTab from \"./Tabs/BeneficiariesTab\";\r\nimport Finalize from \"./Tabs/FinalizeAccountTab\";\r\nimport InstructionsTab from \"./Tabs/InstructionsTab\";\r\n\r\nconst AccountTabs = ({\r\n account,\r\n userType,\r\n questions,\r\n KYC,\r\n documents,\r\n signatureSets,\r\n archivesTypes,\r\n riskTypes,\r\n holders,\r\n disabledFields,\r\n investment,\r\n references,\r\n bankAccounts,\r\n relatedAccounts,\r\n currencies,\r\n companyLinks,\r\n reps,\r\n groups,\r\n banks,\r\n setAccountData,\r\n services,\r\n mode,\r\n setRedirectAccounts,\r\n setRedirectAccount,\r\n Link,\r\n refresh,\r\n riskByPersonIsEnabled,\r\n riskByPersonIsZero,\r\n instructions,\r\n useRevenueProcess,\r\n}) => {\r\n const [tab, setTab] = useState(getAccountType.Profile);\r\n const [tabErrors, setTabErrors] = useState(false);\r\n const saveAccountData = (acc, edit, needAuth) => {\r\n setAccountData({ ...account, ...acc }, edit, needAuth);\r\n };\r\n const changeTab = (newTab) => {\r\n if (tabErrors) {\r\n showToast(\"Please Check Fields\", true);\r\n return null;\r\n }\r\n if (mode === AccountMode.New && account.AccountOnboardingId !== \"\") {\r\n setTab(newTab);\r\n }\r\n if (mode !== AccountMode.New && account.AccountId > 0) {\r\n setTab(newTab);\r\n }\r\n };\r\n const [enableField, setEnableField] = useState(false);\r\n const checkField = () => {\r\n services.fetchEnableCheckFields().then((r) => {\r\n setEnableField(r.response.IsEnabled);\r\n });\r\n };\r\n const [isReadOnly, setIsReadOnly] = useState(userType == UserType.FundManager);\r\n\r\n useEffect(() => {\r\n checkField();\r\n }, []);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {tab === getAccountType.Profile && (\r\n \r\n )}\r\n {tab === getAccountType.Questions && (\r\n \r\n )}\r\n {tab === getAccountType.KYC && (\r\n \r\n )}\r\n {tab === getAccountType.Documents && (\r\n \r\n )}\r\n {tab === getAccountType.InvestmentProfile && (\r\n \r\n )}\r\n {tab === getAccountType.Holders && (\r\n \r\n holder.AccountHolderRelationship !== \"Beneficiary\" ||\r\n holder.AccountHolderRelationshipJuridical !== \"Beneficiary\"\r\n )}\r\n accountId={account.AccountId}\r\n account={account}\r\n setAccountData={saveAccountData}\r\n services={services}\r\n disabledFields={disabledFields}\r\n userType={userType}\r\n isReadOnly={isReadOnly}\r\n disabledviaLink={true}\r\n mode={mode}\r\n Link={Link}\r\n />\r\n )}\r\n {tab === getAccountType.Beneficiaries && (\r\n \r\n holder.AccountHolderRelationship === \"Beneficiary\" ||\r\n holder.AccountHolderRelationshipJuridical === \"Beneficiary\" ||\r\n holder.AccountHolderIsBeneficiary === true\r\n )}\r\n accountId={account.AccountId}\r\n account={account}\r\n setAccountData={saveAccountData}\r\n services={services}\r\n userType={userType}\r\n isReadOnly={isReadOnly}\r\n mode={mode}\r\n Link={Link}\r\n />\r\n )}\r\n {tab === getAccountType.SignatureSets && (\r\n \r\n )}\r\n {tab === getAccountType.References && (\r\n \r\n )}\r\n {tab === getAccountType.BankAccounts && (\r\n parseInt(b.Code, 10) > 0) : undefined}\r\n mode={mode}\r\n setRedirectAccounts={setRedirectAccounts}\r\n riskByPersonIsZero={riskByPersonIsZero}\r\n />\r\n )}\r\n {tab === getAccountType.Commissions && userType === UserType.Advisor && (\r\n \r\n )}\r\n {tab === getAccountType.RelatedAccounts && (\r\n \r\n )}\r\n {tab === getAccountType.Finalize && (\r\n \r\n )}\r\n {tab === getAccountType.Groups && (\r\n \r\n )}\r\n {tab === getAccountType.Instructions && (\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nAccountTabs.propTypes = {\r\n account: PropTypes.object.isRequired,\r\n userType: PropTypes.string.isRequired,\r\n setAccountData: PropTypes.func.isRequired,\r\n questions: PropTypes.array,\r\n KYC: PropTypes.object,\r\n documents: PropTypes.array,\r\n signatureSets: PropTypes.array,\r\n archivesTypes: PropTypes.object,\r\n riskTypes: PropTypes.array,\r\n holders: PropTypes.array.isRequired,\r\n investment: PropTypes.array,\r\n references: PropTypes.array,\r\n currencies: PropTypes.array,\r\n bankAccounts: PropTypes.array,\r\n relatedAccounts: PropTypes.array,\r\n companyLinks: PropTypes.array,\r\n banks: PropTypes.array,\r\n reps: PropTypes.array,\r\n services: PropTypes.object.isRequired,\r\n groups: PropTypes.array,\r\n};\r\n\r\nAccountTabs.defaultProps = {\r\n questions: undefined,\r\n KYC: undefined,\r\n documents: undefined,\r\n signatureSets: undefined,\r\n archivesTypes: undefined,\r\n riskTypes: undefined,\r\n investment: undefined,\r\n references: undefined,\r\n currencies: undefined,\r\n bankAccounts: undefined,\r\n relatedAccounts: undefined,\r\n companyLinks: undefined,\r\n reps: undefined,\r\n banks: undefined,\r\n groups: undefined,\r\n};\r\n\r\nexport default AccountTabs;\r\n","/* eslint-disable jsx-a11y/click-events-have-key-events */\r\n/* eslint-disable jsx-a11y/no-static-element-interactions */\r\nimport React from \"react\";\r\nimport { Form, FormGroup, ListGroup, ListGroupItem, Label, Input, Button } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport {\r\n PhysicalPersonRelationshipAccount,\r\n PhysicalPersonRelationshipAccountJuridical,\r\n} from \"../Person/types\";\r\nimport { PersonType } from \"./types\";\r\nimport { SelectFormField } from \"../../../utils/FormFields\";\r\n\r\nconst BeneficiariesForm = ({\r\n holders,\r\n changedHolder,\r\n collapsedHolder,\r\n toggleHolder,\r\n onChange,\r\n account,\r\n existsMainHolder,\r\n handleDeleteHolder,\r\n role,\r\n isReadOnly,\r\n}) => {\r\n const handleChangeInstruction = (name, value, index) => {\r\n onChange(index, name, value === \"1\");\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n {holders.map((holder, index) => {\r\n const holderId = holder.AccountHolderId;\r\n const isMainHolder = changedHolder[holderId]\r\n ? changedHolder[holderId].isMainHolder\r\n : holder.IsMainHolder;\r\n const canBeMainHolder = (!existsMainHolder && !isMainHolder) || isMainHolder;\r\n const isController = changedHolder[holderId]\r\n ? changedHolder[holderId].HoldersIsController\r\n : holder.AccountHolderIsController;\r\n const isManager = changedHolder[holderId]\r\n ? changedHolder[holderId].HoldersIsManager\r\n : holder.AccountHolderIsManager;\r\n const accountRelationship = changedHolder[holderId]\r\n ? changedHolder[holderId].HoldersRelationship\r\n : holder.AccountHolderRelationship;\r\n const instructions = changedHolder[holderId]\r\n ? {\r\n HoldersOrderManaged: changedHolder[holderId].HoldersOrderManaged,\r\n HoldersOrderWeb: changedHolder[holderId].HoldersOrderWeb,\r\n HoldersOrderWritten: changedHolder[holderId].HoldersOrderWritten,\r\n HoldersOrderViaLink: changedHolder[holderId].HoldersOrderViaLink,\r\n }\r\n : {\r\n HoldersOrderManaged: holder.HoldersOrderManaged,\r\n HoldersOrderWeb: holder.HoldersOrderWeb,\r\n HoldersOrderWritten: holder.HoldersOrderWritten,\r\n HoldersOrderViaLink: holder.HoldersOrderViaLink,\r\n };\r\n return (\r\n \r\n toggleHolder(index, true)}\r\n style={{ cursor: \"pointer\", marginTop: 5, backgroundColor: \"#607d8b\" }}\r\n >\r\n \r\n {holder.AccountHolderName + \" - Beneficiary Code \" + holder.AccountBeneficiaryCode}\r\n
    \r\n {collapsedHolder[index].open ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
    \r\n \r\n \r\n {collapsedHolder[index].open && (\r\n \r\n \r\n \r\n \r\n \r\n {role !== \"Beneficiary\" && (\r\n \r\n {holder.AccountHolderPersonType === PersonType.Physical ? (\r\n \r\n {account.AccountIsPhysical ? (\r\n \r\n \r\n \r\n onChange(index, \"HoldersRelationship\", e.target.value)}\r\n value={accountRelationship}\r\n >\r\n {Object.keys(PhysicalPersonRelationshipAccount).map((key) => {\r\n if (\r\n isMainHolder &&\r\n PhysicalPersonRelationshipAccount[key] ===\r\n PhysicalPersonRelationshipAccount.Attorney\r\n ) {\r\n return null;\r\n }\r\n return (\r\n \r\n );\r\n })}\r\n \r\n \r\n \r\n \r\n is Main Holder:\r\n onChange(index, \"isMainHolder\", !isMainHolder)}\r\n />\r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n \r\n \r\n onChange(index, \"HoldersRelationshipJuridical\", e.target.value)\r\n }\r\n value={\r\n changedHolder[holderId]\r\n ? changedHolder[holderId].HoldersRelationshipJuridical\r\n : holder.AccountHolderRelationshipJuridical\r\n }\r\n >\r\n {Object.keys(PhysicalPersonRelationshipAccountJuridical).map((key) => (\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n Holder is Controller:\r\n onChange(index, \"HoldersIsController\", !isController)}\r\n />\r\n \r\n \r\n \r\n \r\n Holder is Manager:\r\n onChange(index, \"HoldersIsManager\", !isManager)}\r\n />\r\n \r\n \r\n \r\n )}\r\n \r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n i}\r\n getSelectItemName={(i) => (i === 1 ? \"Yes\" : \"No\")}\r\n name=\"HoldersOrderManaged\"\r\n onChange={(name, value) => handleChangeInstruction(name, value, index)}\r\n />\r\n i}\r\n getSelectItemName={(i) => (i === 1 ? \"Yes\" : \"No\")}\r\n disabled={instructions.HoldersOrderManaged}\r\n name=\"HoldersOrderWritten\"\r\n onChange={(name, value) => handleChangeInstruction(name, value, index)}\r\n />\r\n i}\r\n getSelectItemName={(i) => (i === 1 ? \"Yes\" : \"No\")}\r\n disabled={instructions.HoldersOrderManaged}\r\n name=\"HoldersOrderWeb\"\r\n onChange={(name, value) => handleChangeInstruction(name, value, index)}\r\n />\r\n i}\r\n getSelectItemName={(i) => (i === 1 ? \"Yes\" : \"No\")}\r\n disabled={instructions.HoldersOrderManaged}\r\n name=\"HoldersOrderViaLink\"\r\n onChange={(name, value) => handleChangeInstruction(name, value, index)}\r\n />\r\n {holder.AccountHolderPersonType === PersonType.Physical && (\r\n \r\n \r\n \r\n \r\n \r\n {!isReadOnly && (\r\n \r\n )}\r\n \r\n )}\r\n \r\n )}\r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n \r\n );\r\n};\r\n\r\nBeneficiariesForm.propTypes = {\r\n holders: PropTypes.array.isRequired,\r\n changedHolder: PropTypes.object.isRequired,\r\n collapsedHolder: PropTypes.array.isRequired,\r\n toggleHolder: PropTypes.func.isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n account: PropTypes.object.isRequired,\r\n existsMainHolder: PropTypes.bool.isRequired,\r\n handleDeleteHolder: PropTypes.func.isRequired,\r\n role: PropTypes.string.isRequired,\r\n};\r\n\r\nexport default BeneficiariesForm;\r\n","/* eslint-disable jsx-a11y/click-events-have-key-events */\r\n/* eslint-disable jsx-a11y/no-static-element-interactions */\r\nimport React, { useState, useEffect, useReducer } from \"react\";\r\nimport { Form, FormGroup, ListGroup, ListGroupItem, Label, Input, Button } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport {\r\n PhysicalPersonRelationshipAccount,\r\n PhysicalPersonRelationshipAccountJuridical,\r\n} from \"../Person/types\";\r\nimport { PersonType } from \"./types\";\r\nimport { SelectFormField } from \"../../../utils/FormFields\";\r\nimport { AccountMode } from \"../../../utils/Helper\";\r\n\r\nconst HoldersForm = ({\r\n holders,\r\n changedHolder,\r\n collapsedHolder,\r\n toggleHolder,\r\n onChange,\r\n account,\r\n existsMainHolder,\r\n handleDeleteHolder,\r\n role,\r\n isReadOnly,\r\n Link,\r\n mode,\r\n}) => {\r\n const handleChangeInstruction = (name, value, index) => {\r\n onChange(index, name, value === \"1\");\r\n };\r\n\r\n const [isPhysicalAccount, setPhysical] = useState(account.AccountIsPhysical);\r\n\r\n const onChangePhysical = (value) => {\r\n setPhysical(value === \"1\");\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n {holders.map((holder, index) => {\r\n const holderId = holder.AccountHolderId;\r\n const isMainHolder = changedHolder[holderId]\r\n ? changedHolder[holderId].isMainHolder\r\n : holder.IsMainHolder;\r\n const canBeMainHolder = (!existsMainHolder && !isMainHolder) || isMainHolder;\r\n const holderRelationshipJuridical = changedHolder[holderId]\r\n ? changedHolder[holderId].HoldersRelationshipJuridical\r\n : holder.AccountHolderRelationshipJuridical;\r\n const isController = changedHolder[holderId]\r\n ? changedHolder[holderId].HoldersIsController\r\n : holder.AccountHolderIsController;\r\n const isManager = changedHolder[holderId]\r\n ? changedHolder[holderId].HoldersIsManager\r\n : holder.AccountHolderIsManager;\r\n const accountRelationship = changedHolder[holderId]\r\n ? changedHolder[holderId].HoldersRelationship\r\n : holder.AccountHolderRelationship;\r\n const instructions = changedHolder[holderId]\r\n ? {\r\n HoldersOrderManaged: changedHolder[holderId].HoldersOrderManaged,\r\n HoldersOrderWeb: changedHolder[holderId].HoldersOrderWeb,\r\n HoldersOrderWritten: changedHolder[holderId].HoldersOrderWritten,\r\n HoldersOrderViaLink: changedHolder[holderId].HoldersOrderViaLink,\r\n }\r\n : {\r\n HoldersOrderManaged: holder.HoldersOrderManaged,\r\n HoldersOrderWeb: holder.HoldersOrderWeb,\r\n HoldersOrderWritten: holder.HoldersOrderWritten,\r\n HoldersOrderViaLink: holder.HoldersOrderViaLink,\r\n };\r\n\r\n return (\r\n \r\n toggleHolder(index, true)}\r\n style={{ cursor: \"pointer\", marginTop: 5, backgroundColor: \"#607d8b\" }}\r\n >\r\n \r\n {isPhysicalAccount\r\n ? holder.AccountHolderName +\r\n \" - \" +\r\n holder.AccountHolderDocumentTypeName +\r\n \" - \" +\r\n holder.AccountHolderDocumentNumber +\r\n \" - \" +\r\n holder.AccountHolderRelationship +\r\n \" \" +\r\n (holder.IsMainHolder ? \"(Main Holder)\" : \"\")\r\n : holder.AccountHolderName +\r\n \" - \" +\r\n holder.AccountHolderDocumentTypeName +\r\n \" - \" +\r\n holder.AccountHolderDocumentNumber +\r\n \" - \" +\r\n holder.AccountHolderRelationshipJuridical +\r\n \" \" +\r\n (holder.IsMainHolder ? \"(Main Holder)\" : \"\")}\r\n
    \r\n {collapsedHolder[index].open ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
    \r\n \r\n \r\n {collapsedHolder[index].open && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {existsMainHolder ? (\r\n isPhysicalAccount ? (\r\n \r\n \r\n \r\n onChange(index, \"HoldersRelationship\", e.target.value)}\r\n value={accountRelationship}\r\n >\r\n {Object.keys(PhysicalPersonRelationshipAccount).map((key) => {\r\n if (\r\n isMainHolder &&\r\n PhysicalPersonRelationshipAccount[key] ===\r\n PhysicalPersonRelationshipAccount.Attorney\r\n ) {\r\n return null;\r\n }\r\n return (\r\n \r\n );\r\n })}\r\n \r\n \r\n \r\n \r\n \r\n {holder.AccountHolderPersonType == PersonType.Physical && (\r\n \r\n \r\n \r\n )}\r\n \r\n ) : (\r\n \r\n \r\n \r\n \r\n onChange(index, \"HoldersRelationshipJuridical\", e.target.value)\r\n }\r\n value={\r\n changedHolder[holderId]\r\n ? changedHolder[holderId].HoldersRelationshipJuridical\r\n : holder.AccountHolderRelationshipJuridical\r\n }\r\n >\r\n {Object.keys(PhysicalPersonRelationshipAccountJuridical).map((key) => (\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n ) : (\r\n \r\n i}\r\n getSelectItemName={(i) => (i === 1 ? \"Yes\" : \"No\")}\r\n disabled={existsMainHolder}\r\n name=\"isphysical\"\r\n onChange={(name, value) => onChangePhysical(value)}\r\n />\r\n\r\n {isPhysicalAccount ? (\r\n \r\n \r\n \r\n onChange(index, \"HoldersRelationship\", e.target.value)}\r\n value={accountRelationship}\r\n >\r\n {Object.keys(PhysicalPersonRelationshipAccount).map((key) => {\r\n if (\r\n isMainHolder &&\r\n PhysicalPersonRelationshipAccount[key] ===\r\n PhysicalPersonRelationshipAccount.Attorney\r\n ) {\r\n return null;\r\n }\r\n return (\r\n \r\n );\r\n })}\r\n \r\n \r\n \r\n \r\n \r\n {holder.AccountHolderPersonType == \"Physical\" && (\r\n \r\n \r\n is Beneficiary:\r\n \r\n onChange(\r\n index,\r\n \"AccountHolderIsBeneficiary\",\r\n !holder.AccountHolderIsBeneficiary\r\n )\r\n }\r\n />\r\n \r\n \r\n )}\r\n \r\n ) : (\r\n \r\n \r\n \r\n {!isReadOnly && (\r\n \r\n onChange(index, \"HoldersRelationshipJuridical\", e.target.value)\r\n }\r\n value={\r\n changedHolder[holderId]\r\n ? changedHolder[holderId].HoldersRelationshipJuridical\r\n : holder.AccountHolderRelationshipJuridical\r\n }\r\n >\r\n {Object.keys(PhysicalPersonRelationshipAccountJuridical).map((key) => (\r\n \r\n ))}\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n )}\r\n \r\n {/* \r\n \r\n \r\n \r\n \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {account.AccountWayGiveOrders === \"Managed\" && (\r\n i}\r\n getSelectItemName={(i) => (i === 1 ? \"Yes\" : \"No\")}\r\n name=\"HoldersOrderManaged\"\r\n onChange={(name, value) => handleChangeInstruction(name, value, index)}\r\n />\r\n )}\r\n\r\n {account.AccountWayGiveOrders === \"Written\" && (\r\n
    \r\n {!isReadOnly && (\r\n i}\r\n getSelectItemName={(i) => (i === 1 ? \"Yes\" : \"No\")}\r\n name=\"HoldersOrderWritten\"\r\n onChange={(name, value) => handleChangeInstruction(name, value, index)}\r\n />\r\n )}\r\n {!isReadOnly && (\r\n i}\r\n getSelectItemName={(i) => (i === 1 ? \"Yes\" : \"No\")}\r\n disabled={instructions.HoldersOrderManaged}\r\n name=\"HoldersOrderWeb\"\r\n onChange={(name, value) => handleChangeInstruction(name, value, index)}\r\n />\r\n )}\r\n {!isReadOnly && (\r\n i}\r\n getSelectItemName={(i) => (i === 1 ? \"Yes\" : \"No\")}\r\n disabled={instructions.HoldersOrderManaged}\r\n name=\"HoldersOrderViaLink\"\r\n onChange={(name, value) => handleChangeInstruction(name, value, index)}\r\n />\r\n )}\r\n
    \r\n )}\r\n \r\n {!isReadOnly && (\r\n \r\n \r\n \r\n \r\n )}\r\n {!isReadOnly && (\r\n handleDeleteHolder(holderId)}\r\n >\r\n \r\n Remove Holder\r\n \r\n )}\r\n \r\n\r\n {!isReadOnly && holder.AccountHolderStatus === \"Inactive\" && (\r\n \r\n Edit Person\r\n \r\n \r\n )}\r\n
    \r\n )}\r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n \r\n );\r\n};\r\n\r\nHoldersForm.propTypes = {\r\n holders: PropTypes.array.isRequired,\r\n changedHolder: PropTypes.object.isRequired,\r\n collapsedHolder: PropTypes.array.isRequired,\r\n toggleHolder: PropTypes.func.isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n account: PropTypes.object.isRequired,\r\n existsMainHolder: PropTypes.bool.isRequired,\r\n handleDeleteHolder: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default HoldersForm;\r\n","import React, { useState } from \"react\";\r\nimport {\r\n Modal,\r\n ModalBody,\r\n ModalFooter,\r\n ModalHeader,\r\n Form,\r\n Button,\r\n Spinner,\r\n Col,\r\n Input,\r\n Row,\r\n FormGroup,\r\n} from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\nimport { FormField, SelectFormField } from \"../../../utils/FormFields\";\r\nimport { BankAccountType, BankAccountStatus } from \"../Account/types\";\r\n\r\nfunction ModalBankAccount({\r\n open,\r\n bankAccount,\r\n errors,\r\n toggle,\r\n saving,\r\n onSave,\r\n onChange,\r\n currencies,\r\n banks,\r\n archives,\r\n setArchives,\r\n getFile,\r\n}) {\r\n const deleteArchive = (id) => {\r\n var archivesAux = [...archives];\r\n\r\n if (id !== -1) {\r\n archivesAux.splice(id, 1);\r\n }\r\n\r\n setArchives(archivesAux);\r\n };\r\n\r\n const handleFile = (file, name, extension) => {\r\n const items = file.split(\",\");\r\n var archive = { ArchiveId: 0, ArchiveBlob: items[1], ArchiveExtension: extension, ArchiveName: name };\r\n setArchives([...archives, archive]);\r\n };\r\n\r\n const handleFileInput = (event, cb = handleFile) => {\r\n const file = event.target.files[0];\r\n const name = file.name.substring(0, file.name.indexOf(\".\"));\r\n if (file.size <= 5242880) {\r\n const extension = file.name.substring(file.name.indexOf(\".\") + 1, file.name.length);\r\n const reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n reader.onload = () => {\r\n cb(reader.result, name, extension);\r\n };\r\n reader.onerror = (error) => {\r\n throw error;\r\n };\r\n } else {\r\n alert(\"File is too big! (Max. 5MB)\");\r\n event.target = \"\";\r\n }\r\n };\r\n\r\n return (\r\n \r\n Bank Account\r\n \r\n
    \r\n {banks ? (\r\n i.Id}\r\n getSelectItemName={(i) => i.Name}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n i}\r\n getSelectItemName={(i) => BankAccountType[i]}\r\n />\r\n \r\n {currencies ? (\r\n i.currencyId}\r\n getSelectItemName={(i) => i.currencyISO}\r\n />\r\n ) : (\r\n \r\n )}\r\n i}\r\n getSelectItemName={(i) => (i ? \"Yes\" : \"No\")}\r\n />\r\n i}\r\n getSelectItemName={(i) => (i ? \"Yes\" : \"No\")}\r\n />\r\n \r\n i}\r\n getSelectItemName={(i) => BankAccountStatus[i]}\r\n />\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n \r\n {saving ? \" Saving\" : \" Save\"}\r\n \r\n \r\n
    \r\n );\r\n}\r\n\r\nconst ListArchives = ({ archives, deleteArchive, getFile }) => {\r\n return (\r\n \r\n {archives &&\r\n (archives.length == 0 ? (\r\n \r\n \r\n No Attachments\r\n \r\n \r\n ) : (\r\n
    \r\n {archives.map((item, index) => (\r\n \r\n ))}\r\n
    \r\n ))}\r\n
    \r\n );\r\n};\r\n\r\nconst Line = ({ index, file, deleteArchive, getFile }) => (\r\n \r\n getFile(file)}\r\n style={{ cursor: \"pointer\" }}\r\n deleteArchive={deleteArchive}\r\n archiveId={file.ArchiveId}\r\n >\r\n {`${file.ArchiveName}.${file.ArchiveExtension}`}\r\n \r\n {\" \"}\r\n deleteArchive(index)}\r\n style={{ color: \"#d83737\" }}\r\n >\r\n \r\n \r\n \r\n);\r\n\r\nModalBankAccount.propTypes = {\r\n open: PropTypes.bool.isRequired,\r\n bankAccount: PropTypes.object.isRequired,\r\n toggle: PropTypes.func.isRequired,\r\n saving: PropTypes.bool.isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n currencies: PropTypes.array,\r\n banks: PropTypes.array,\r\n};\r\n\r\nModalBankAccount.defaultProps = {\r\n banks: undefined,\r\n currencies: undefined,\r\n};\r\n\r\nexport default ModalBankAccount;\r\n","import React from \"react\";\r\nimport { Form, FormGroup, Row, Col } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\n\r\nimport { SelectFormField, FormField, CheckFormField, CustomFormInput } from \"../../../utils/FormFields\";\r\nimport { AccountWayOfAction, AccountBookInfo, AccountUsage } from \"./types\";\r\nimport CircularProggress from \"../../CircularProgress/CircularProgress\";\r\nimport { parseDate } from \"../../../utils/dateUtils\";\r\nimport { AccountMode, AccountFoundsOrigin, AccountPurpose } from \"../../../utils/Helper\";\r\n\r\nfunction ProfileForm({\r\n account,\r\n onChange,\r\n userType,\r\n riskTypes,\r\n currencies,\r\n errors,\r\n disabled,\r\n reps,\r\n companyLinks,\r\n mode,\r\n checkField,\r\n}) {\r\n const show = mode !== AccountMode.New;\r\n let showReps = reps;\r\n const rep = reps\r\n ? account.RepId > 0\r\n ? reps.filter((i) => parseInt(i.id, 10) === parseInt(account.RepId, 10))\r\n : reps\r\n : [];\r\n let advisors = rep[0] ? rep[0].advisors : undefined;\r\n if (userType === \"Advisor\" && mode !== AccountMode.New) {\r\n showReps = [\r\n {\r\n id: account.RepId,\r\n name: account.RepName,\r\n },\r\n ];\r\n advisors = [\r\n {\r\n id: account.MainAdvisorId,\r\n name: account.MainAdvisorName,\r\n },\r\n ];\r\n }\r\n\r\n return (\r\n
    \r\n \r\n {show && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {account.AccountIsPhysical ? \"Physical\" : \"Juridical\"}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {!show && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n i}\r\n getSelectItemName={(i) => AccountWayOfAction[i]}\r\n name=\"AccountWayGiveOrders\"\r\n onChange={onChange}\r\n error={errors.AccountWayGiveOrders}\r\n disabled={disabled}\r\n />\r\n \r\n \r\n i}\r\n getSelectItemName={(i) => AccountUsage[i]}\r\n name=\"AccountUsage\"\r\n onChange={onChange}\r\n error={errors.AccountUsage}\r\n disabled={disabled}\r\n />\r\n \r\n \r\n {AccountPurpose ? (\r\n i.id}\r\n getSelectItemName={(i) => i.name}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n {currencies ? (\r\n i.currencyId}\r\n getSelectItemName={(i) => i.currencyISO}\r\n name=\"AccountCurrencyId\"\r\n onChange={onChange}\r\n error={errors.AccountCurrencyId}\r\n disabled={disabled}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n {show && (\r\n i.InvestorProfileTypeId}\r\n getSelectItemName={(i) => i.InvestorProfileTypeName}\r\n name=\"AccountProfileRiskId\"\r\n onChange={onChange}\r\n />\r\n )}\r\n \r\n \r\n \r\n \r\n {show && (\r\n \r\n )}\r\n \r\n \r\n {show && (\r\n \r\n )}\r\n \r\n \r\n\r\n {userType != \"FundManager\" &&\r\n (showReps && advisors ? (\r\n \r\n i.id}\r\n getSelectItemName={(i) => i.name}\r\n onChange={onChange}\r\n error={errors.RepId}\r\n disabled={disabled || (userType === \"Advisor\" && mode !== AccountMode.New)}\r\n />\r\n i.id}\r\n getSelectItemName={(i) => i.name}\r\n onChange={onChange}\r\n error={errors.MainAdvisorId}\r\n disabled={disabled || (userType === \"Advisor\" && mode !== AccountMode.New)}\r\n />\r\n \r\n ) : (\r\n \r\n ))}\r\n \r\n {companyLinks ? (\r\n i.CompanyLinkId}\r\n getSelectItemName={(i) => i.CompanyLinkName}\r\n error={errors.AccountCompanyLinkId}\r\n disabled={disabled}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {account.AccountIsPhysical == false && (\r\n \r\n )}\r\n {show && {account.AccountHolderPhone}}\r\n \r\n i}\r\n getSelectItemName={(i) => AccountBookInfo[i] || \"\"}\r\n />\r\n {AccountFoundsOrigin ? (\r\n i.id}\r\n getSelectItemName={(i) => i.name}\r\n />\r\n ) : (\r\n \r\n )}\r\n\r\n {show && {account.MainHolderAddress}}\r\n {show && (\r\n \r\n \r\n \r\n )}\r\n \r\n
    \r\n );\r\n}\r\n\r\nProfileForm.propTypes = {\r\n account: PropTypes.object.isRequired,\r\n userType: PropTypes.string.isRequired,\r\n errors: PropTypes.object.isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n riskTypes: PropTypes.array,\r\n currencies: PropTypes.array,\r\n disabled: PropTypes.bool.isRequired,\r\n companyLinks: PropTypes.array,\r\n reps: PropTypes.array,\r\n};\r\n\r\nProfileForm.defaultProps = {\r\n riskTypes: undefined,\r\n currencies: undefined,\r\n companyLinks: undefined,\r\n reps: undefined,\r\n};\r\n\r\nexport default ProfileForm;\r\n","import React, { Fragment } from \"react\";\r\nimport { Card, CardBody, Row, Col, Progress, CardHeader, Table, Badge } from \"reactstrap\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport { LoadingMessage, GetRiskClassName } from \"./helper\";\r\nimport style from \"./styles.module.scss\";\r\nimport { useState, useEffect } from \"react\";\r\n\r\nexport const AccountRiskTable = ({ account, riskSummary, decimalPlaces, services }) => {\r\n const [isRiskByPerson, setIsRiskByPerson] = useState(false);\r\n\r\n // Use useEffect to handle the service call\r\n useEffect(() => {\r\n services.getParameterValue({ ParameterName: \"RiskByPerson\" }, (response) => {\r\n if (response && response.SdtParametersData && response.SdtParametersData.ParameterNumericValue == 1) {\r\n setIsRiskByPerson(true);\r\n }\r\n });\r\n }, [services]);\r\n\r\n return (\r\n \r\n \r\n {!account ? (\r\n \r\n ) : (\r\n \r\n \r\n Risk\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {riskSummary &&\r\n riskSummary.Risk.map((risk) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n
    Factor descriptionFactor WeightDataScore
    {risk.FactorDescription}{risk.FactorWeight}{risk.Data}{Number.parseFloat(risk.Score).toFixed(decimalPlaces)}
    \r\n \r\n \r\n \r\n \r\n
    \r\n {riskSummary && riskSummary.Risk.length != 0 && (\r\n \r\n \r\n
    \r\n
    \r\n \r\n Total {getTotalRiskScore(riskSummary, decimalPlaces)} points\r\n \r\n
    \r\n
    \r\n \r\n
    \r\n )}\r\n
    \r\n
    \r\n \r\n Profile Risk\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {riskSummary &&\r\n riskSummary.ProfileRisk.map((risk) => (\r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n
    QuestionAnswerScore
    {risk.QuestionDescription}{risk.AnswerDescription}{risk.AnswerScore}
    \r\n \r\n {riskSummary && account && (\r\n \r\n \r\n \r\n )}\r\n
    \r\n {riskSummary && riskSummary.ProfileRisk.length != 0 && (\r\n \r\n \r\n
    \r\n
    \r\n {riskSummary.ProfileRiskValue}\r\n \r\n Total {getTotalScore(riskSummary)} points\r\n \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n )}\r\n
    \r\n
    \r\n
    \r\n )}\r\n \r\n
    \r\n)}\r\n\r\nconst RiskSummary = ({ account, riskSummary }) => (\r\n
    \r\n

    Summary

    \r\n

    Check every 1 day

    \r\n

    Last check Yesterday

    \r\n

    \r\n {riskSummary.BOLevel} Level to BO\r\n

    \r\n {account.AccountWayOfAction != \"\" && (\r\n

    \r\n {account.AccountWayOfAction} structure\r\n

    \r\n )}\r\n

    \r\n Risk{\" \"}\r\n \r\n {account.AccountRisk}\r\n \r\n

    \r\n
    \r\n);\r\n\r\nconst ProfileRiskSummary = ({ account, riskSummary, isRiskByPerson }) => (\r\n
    \r\n

    Summary

    \r\n \r\n {!isRiskByPerson && (\r\n \r\n \r\n Profile mismatch warning\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    Profile risk\r\n %\r\n \r\n \r\n {account.AccountProfileRisk}\r\n \r\n
    Current risk\r\n \r\n %\r\n \r\n \r\n {account.AccountCurrentProfileRisk}\r\n \r\n
    \r\n
    \r\n);\r\n\r\nconst LoadingOrEmpty = ({ isLoading, isEmpty, children }) =>\r\n isLoading ? (\r\n \r\n \r\n \r\n \r\n \r\n ) : isEmpty ? (\r\n \r\n \r\n
    \r\n No risk info registerd\r\n
    {\" \"}\r\n \r\n \r\n ) : (\r\n children\r\n );\r\n\r\nconst getTotalScore = (riskSummary) =>\r\n riskSummary && riskSummary.ProfileRisk.reduce((sum, e) => (sum += parseInt(e.AnswerScore, 10)), 0);\r\n\r\nconst getTotalRiskScore = (riskSummary, decimalPlaces) =>\r\n riskSummary && riskSummary.Risk.reduce((sum, e) => (sum += parseFloat(e.Score, 10)), 0).toFixed(decimalPlaces);\r\n\r\nexport default AccountRiskTable;\r\n","import React, { Fragment } from \"react\";\r\nimport { Button, UncontrolledTooltip, Col, Card, CardBody, CardHeader } from \"reactstrap\";\r\nimport { GetRiskClassName, LoadingMessage } from \"./helper\";\r\nimport style from \"./styles.module.scss\";\r\n\r\nexport const AccountRiskWidget = ({ info, link: Link, to }) => (\r\n
    \r\n \r\n {info.AccountProfileRiskMismatch && (\r\n \r\n \r\n Profile mismatch warning\r\n \r\n Go to risk page and check\r\n \r\n \r\n )}\r\n \r\n
    \r\n Investor profile\r\n \r\n
    \r\n
    \r\n Account Risk\r\n \r\n
    \r\n
    \r\n);\r\n\r\nexport const CardWrapper = ({ title, children, loading, lg, xs, style = {} }) => (\r\n \r\n \r\n {title}\r\n \r\n {loading ? : children}\r\n \r\n \r\n \r\n);\r\n","import React from \"react\";\r\nimport CircularProgress from \"../../../CircularProgress/CircularProgress\";\r\nimport style from \"./styles.module.scss\";\r\n\r\nexport const LoadingMessage = ({ text, className = \"\" }) => (\r\n
    \r\n \r\n {text}\r\n
    \r\n);\r\n\r\nexport const GetRiskClassName = (risk) => {\r\n const riskLabel = risk.toLowerCase();\r\n switch (riskLabel) {\r\n case \"low\":\r\n case \"conservative\":\r\n return \"buy\";\r\n\r\n case \"medium\":\r\n case \"moderate\":\r\n return \"warning\";\r\n\r\n case \"high\":\r\n case \"agressive\":\r\n return \"danger\";\r\n default:\r\n break;\r\n }\r\n};\r\n\r\nexport const IsCustodyBalance = (type) => type == \"Custody\" || type == \"LocalCustody\";\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"cardlg\":\"styles-module_cardlg_2Wq2d\",\"loading\":\"styles-module_loading_wxLU0\",\"loadingMessage\":\"styles-module_loadingMessage_33fsy\",\"risk\":\"styles-module_risk_2LhW9\",\"title\":\"styles-module_title_3aMps\",\"riskSummary\":\"styles-module_riskSummary_1Jr9g\",\"profileRiskSummary\":\"styles-module_profileRiskSummary_1nXMa\",\"riskWarning\":\"styles-module_riskWarning_1_5v1\",\"flash\":\"styles-module_flash_1YOfK\",\"badge\":\"styles-module_badge_3fRso\",\"riskWidget\":\"styles-module_riskWidget_2Hdwk\",\"warning\":\"styles-module_warning_3UKzE\",\"line\":\"styles-module_line_1xgrw\",\"container\":\"styles-module_container_3Qzna\",\"item\":\"styles-module_item_TyXNA\"};","import React, { useState, useEffect } from \"react\";\r\nimport {\r\n Table,\r\n UncontrolledDropdown,\r\n DropdownToggle,\r\n DropdownItem,\r\n DropdownMenu,\r\n Button,\r\n Row,\r\n Col,\r\n} from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport style from \"../../Grid.module.scss\";\r\nimport { getAccountType, BankAccountType, BankAccountStatus } from \"../types\";\r\nimport ModalConfirm from \"../../Modal/ModalConfirm\";\r\nimport ModalBankAccount from \"../ModalAccountBankAccount\";\r\nimport { CircularProgress } from \"../../../..\";\r\nimport { AccountMode } from \"../../../../utils/Helper\";\r\n\r\nfunction generateEmptyBankAccount() {\r\n return {\r\n BankAccountId: \"\",\r\n BankAccountItemId: \"\",\r\n BankAccountName: \"\",\r\n BankAccountHolders: undefined,\r\n BankAccountBranch: undefined,\r\n BankAccountNumber: undefined,\r\n BankAccountCurrency: 1,\r\n BankAccountIsDepositInterest: false,\r\n BankAccountPersonalName: \"\",\r\n BankAccountObs: \"\",\r\n BankAccountType: BankAccountType.Savings,\r\n BankAccountStatus: BankAccountStatus.Active,\r\n Archives: [],\r\n };\r\n}\r\n\r\nconst BankAccountsTab = ({\r\n accountId,\r\n bankAccounts,\r\n currencies,\r\n banks,\r\n setAccountData,\r\n services,\r\n isReadOnly,\r\n mode,\r\n setRedirectAccounts,\r\n sended,\r\n references,\r\n signatureSets,\r\n groups,\r\n riskByPersonIsZero,\r\n}) => {\r\n const [fetching, setFetching] = useState(false);\r\n const [loading, setLoading] = useState(false);\r\n const [modalConfirm, setModalConfirm] = useState({\r\n open: false,\r\n title: \"\",\r\n bankAccountItemId: undefined,\r\n saving: false,\r\n callback: undefined,\r\n });\r\n const [modalBankAccount, setModalBankAccount] = useState({\r\n open: false,\r\n saving: false,\r\n bankAccount: generateEmptyBankAccount(),\r\n errors: {},\r\n });\r\n const [archives, setArchives] = useState([]);\r\n\r\n const reloadBankAccounts = () => {\r\n if (mode === AccountMode.New) {\r\n if (!fetching) {\r\n const body = {\r\n AccountGetInfo: {\r\n GetAccountDataId: accountId,\r\n GetAccountDataOnboardingId: accountId,\r\n GetAccountDataType: getAccountType.BankAccounts,\r\n },\r\n };\r\n services.fetchNewAccountInfo(body, (response) => {\r\n if (response && response.SDTAccount) {\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n BankAccounts: response.SDTAccount.BankAccounts,\r\n },\r\n false\r\n );\r\n }\r\n setFetching(false);\r\n });\r\n setFetching(true);\r\n }\r\n }\r\n };\r\n const toggleModalConfirm = () => {\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n bankAccountItemId: undefined,\r\n saving: false,\r\n callback: undefined,\r\n });\r\n };\r\n\r\n const onChangeEdit = (name, value, strValue) => {\r\n let newValue = value;\r\n if (name === \"BankAccountIsDepositInterest\" || name === \"BankAccountFavorite\") {\r\n newValue = value === \"true\" || value === true;\r\n }\r\n const errors = validateBankAccount({\r\n ...modalBankAccount.bankAccount,\r\n [name]: newValue,\r\n\r\n BankAccountName: name === \"BankAccountId\" ? strValue : modalBankAccount.bankAccount.BankAccountName,\r\n });\r\n setModalBankAccount({\r\n ...modalBankAccount,\r\n bankAccount: {\r\n ...modalBankAccount.bankAccount,\r\n [name]: newValue,\r\n\r\n BankAccountName: name === \"BankAccountId\" ? strValue : modalBankAccount.bankAccount.BankAccountName,\r\n },\r\n errors: errors,\r\n });\r\n };\r\n\r\n const toggleModalBankAccount = (bankAccount) => {\r\n if (bankAccount !== undefined) {\r\n if (bankAccount.Archives !== undefined) {\r\n setArchives(bankAccount.Archives);\r\n } else {\r\n setArchives([]);\r\n }\r\n } else {\r\n setArchives([]);\r\n }\r\n setModalBankAccount({\r\n saving: modalBankAccount.saving,\r\n open: !modalBankAccount.open,\r\n bankAccount: bankAccount && bankAccount.BankAccountItemId ? bankAccount : generateEmptyBankAccount(),\r\n errors: {},\r\n });\r\n };\r\n\r\n const handleEdit = (index) => {\r\n toggleModalBankAccount(bankAccounts[index]);\r\n };\r\n\r\n const handleAdd = () => {\r\n toggleModalBankAccount();\r\n };\r\n\r\n const handleDelete = (index) => {\r\n const id = bankAccounts[index].BankAccountItemId;\r\n const bankId = bankAccounts[index].BankAccountId;\r\n setModalConfirm({\r\n open: true,\r\n title: \"Are you sure you want to delete the selected Bank Account?\",\r\n bankAccountItemId: id,\r\n callback: () => deleteBankAccount(id, bankId),\r\n });\r\n };\r\n\r\n function validateBankAccount(fields) {\r\n const fieldNames = [\r\n \"BankAccountId\",\r\n \"BankAccountPersonalName\",\r\n \"BankAccountHolders\",\r\n \"BankAccountNumber\",\r\n \"BankAccountCurrency\",\r\n \"BankAccountStatus\",\r\n ];\r\n const errors = {};\r\n\r\n fieldNames.forEach((name) => {\r\n if (fields[name] == undefined || fields[name] == \"\") {\r\n errors[name] = \"Required field\";\r\n }\r\n });\r\n\r\n return errors;\r\n }\r\n\r\n const handleSaveBankAccount = () => {\r\n const errors = validateBankAccount(modalBankAccount.bankAccount);\r\n setModalBankAccount({\r\n ...modalBankAccount,\r\n errors: errors,\r\n });\r\n if (Object.keys(errors).length == 0) {\r\n const newBankAccount = { ...modalBankAccount.bankAccount };\r\n const account = {\r\n AccountId: accountId,\r\n AccountOnboardingId: accountId,\r\n BankAccounts: [\r\n {\r\n ...newBankAccount,\r\n DeleteBankAccount: false,\r\n Archives: archives,\r\n },\r\n ],\r\n };\r\n const body = {\r\n accountChangeType: getAccountType.BankAccounts,\r\n account,\r\n };\r\n setModalBankAccount({ ...modalBankAccount, saving: true });\r\n if (mode !== AccountMode.New) {\r\n services.fetchAccountUpdate(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newBankAccounts = [...bankAccounts];\r\n let index = -1;\r\n newBankAccounts.map((bankAcc, i) => {\r\n if (newBankAccount.BankAccountItemId === bankAcc.BankAccountItemId) {\r\n index = i;\r\n }\r\n return {};\r\n });\r\n if (index > -1) {\r\n newBankAccounts[index] = newBankAccount;\r\n } else {\r\n newBankAccounts.push(newBankAccount);\r\n }\r\n account.BankAccounts = newBankAccounts;\r\n setAccountData(account, true);\r\n setModalBankAccount({\r\n saving: false,\r\n open: false,\r\n bankAccount: generateEmptyBankAccount(),\r\n errors: {},\r\n });\r\n } else {\r\n setModalBankAccount({\r\n ...modalBankAccount,\r\n saving: false,\r\n });\r\n alert(response.result.Description);\r\n }\r\n });\r\n } else {\r\n services.fetchNewAccount(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newBankAccounts = [...bankAccounts];\r\n let index = -1;\r\n newBankAccounts.map((bankAcc, i) => {\r\n if (newBankAccount.BankAccountItemId === bankAcc.BankAccountItemId) {\r\n index = i;\r\n }\r\n return {};\r\n });\r\n if (index > -1) {\r\n newBankAccounts[index] = newBankAccount;\r\n } else {\r\n newBankAccounts.push(newBankAccount);\r\n }\r\n account.BankAccounts = newBankAccounts;\r\n setAccountData(account, true);\r\n reloadBankAccounts();\r\n setModalBankAccount({\r\n saving: false,\r\n open: false,\r\n bankAccount: generateEmptyBankAccount(),\r\n errors: {},\r\n });\r\n } else {\r\n setModalBankAccount({\r\n ...modalBankAccount,\r\n saving: false,\r\n });\r\n }\r\n });\r\n }\r\n }\r\n };\r\n\r\n const deleteBankAccount = (id, bankId) => {\r\n const deleteAccountId = id;\r\n const account = {\r\n AccountId: accountId,\r\n AccountOnboardingId: accountId,\r\n BankAccounts: [\r\n {\r\n BankAccountItemId: deleteAccountId,\r\n BankAccountId: bankId,\r\n DeleteBankAccount: true,\r\n },\r\n ],\r\n };\r\n const body = {\r\n account,\r\n accountChangeType: getAccountType.BankAccounts,\r\n };\r\n setModalConfirm({ ...modalConfirm, saving: true });\r\n if (mode !== AccountMode.New) {\r\n services.fetchAccountUpdate(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newBankAccounts = bankAccounts;\r\n let index = -1;\r\n newBankAccounts.map((bankAcc, i) => {\r\n if (deleteAccountId === bankAcc.BankAccountItemId) {\r\n index = i;\r\n }\r\n return {};\r\n });\r\n if (index > -1) {\r\n newBankAccounts.splice(index, 1);\r\n }\r\n account.BankAccounts = newBankAccounts;\r\n setAccountData(account, true);\r\n toggleModalConfirm();\r\n } else {\r\n setModalConfirm({\r\n ...modalConfirm,\r\n saving: false,\r\n });\r\n alert(response.result.Description);\r\n }\r\n });\r\n } else {\r\n services.fetchNewAccount(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newBankAccounts = bankAccounts;\r\n let index = -1;\r\n newBankAccounts.map((bankAcc, i) => {\r\n if (deleteAccountId === bankAcc.BankAccountItemId) {\r\n index = i;\r\n }\r\n return {};\r\n });\r\n if (index > -1) {\r\n newBankAccounts.splice(index, 1);\r\n }\r\n account.BankAccounts = newBankAccounts;\r\n setAccountData(account, true);\r\n reloadBankAccounts();\r\n toggleModalConfirm();\r\n } else {\r\n setModalConfirm({\r\n ...modalConfirm,\r\n saving: false,\r\n });\r\n }\r\n });\r\n }\r\n };\r\n\r\n const handleCreateAccount = () => {\r\n setLoading(true);\r\n const body = {\r\n onboardingProcessId: accountId,\r\n };\r\n services.createAccount(body, (data) => {\r\n if (data && data.result) {\r\n setModalConfirm({\r\n ...modalConfirm,\r\n saving: false,\r\n open: false,\r\n });\r\n if (data.result.Code === 200) {\r\n alert(\"Account Sended to Compliance!\");\r\n setRedirectAccounts(true);\r\n } else {\r\n alert(`Failed! ${data.result.Description}`);\r\n }\r\n }\r\n setLoading(false);\r\n });\r\n };\r\n\r\n const createOnboardingAccount = () => {\r\n setModalConfirm((m) => ({\r\n ...m,\r\n open: true,\r\n title: \"Are you sure you want to send this account to compliance?\",\r\n accountId,\r\n callback: () => handleCreateAccount(accountId),\r\n }));\r\n };\r\n\r\n const getCurrencyISO = (id) => {\r\n let iso = \"\";\r\n if (currencies) {\r\n currencies.forEach((c) => {\r\n if (parseInt(c.currencyId, 10) === parseInt(id, 10)) {\r\n iso = c.currencyISO;\r\n }\r\n });\r\n }\r\n return iso;\r\n };\r\n\r\n useEffect(() => {\r\n if (mode !== AccountMode.New) {\r\n if (!bankAccounts && !fetching) {\r\n const body = {\r\n AccountGetInfo: {\r\n GetAccountDataId: accountId,\r\n GetAccountDataType: getAccountType.BankAccounts,\r\n },\r\n };\r\n services.fetchAccountSectorInfo(body, (response) => {\r\n if (response && response.SDTAccount) {\r\n setAccountData(\r\n {\r\n SignatureSets: signatureSets,\r\n PersonalReferences: references,\r\n AccountId: accountId,\r\n BankAccounts: response.SDTAccount.BankAccounts,\r\n },\r\n false\r\n );\r\n }\r\n setFetching(false);\r\n });\r\n setFetching(true);\r\n }\r\n }\r\n }, [bankAccounts, fetching, accountId, setAccountData, services]);\r\n\r\n useEffect(() => {\r\n if (mode === AccountMode.New) {\r\n if (!fetching) {\r\n const body = {\r\n AccountGetInfo: {\r\n GetAccountDataId: accountId,\r\n GetAccountDataOnboardingId: accountId,\r\n GetAccountDataType: getAccountType.BankAccounts,\r\n },\r\n };\r\n services.fetchNewAccountInfo(body, (response) => {\r\n if (response && response.SDTAccount) {\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n PersonalReferences: references,\r\n SignatureSets: signatureSets,\r\n Groups: groups,\r\n BankAccounts: response.SDTAccount.BankAccounts,\r\n },\r\n false\r\n );\r\n }\r\n setFetching(false);\r\n });\r\n setFetching(true);\r\n }\r\n }\r\n }, []);\r\n\r\n const getFile = (file) => {\r\n if (mode === AccountMode.New) {\r\n const body = {\r\n fileId: file.ArchiveTemporalFileId,\r\n onboarding: accountId,\r\n };\r\n services.getOnboardingAccountArchive(body, (response) => {\r\n var a = document.createElement(\"A\");\r\n a.href = `data:application/octet-stream;base64,${response.blobfile}`;\r\n a.download = `${file.ArchiveName}.${file.ArchiveExtension}`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n });\r\n } else {\r\n const body = {\r\n accountId: accountId,\r\n archiveId: file.ArchiveId,\r\n };\r\n services.getAccountArchive(body, (response) => {\r\n var a = document.createElement(\"A\");\r\n a.href = `data:application/octet-stream;base64,${response.blobfile}`;\r\n a.download = `${file.ArchiveName}.${file.ArchiveExtension}`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n });\r\n }\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {fetching ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n {bankAccounts && bankAccounts.length > 0 ? (\r\n bankAccounts.map((acc, i) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))\r\n ) : (\r\n \r\n \r\n \r\n )}\r\n \r\n )}\r\n \r\n
    #CurrencyTypeNameHoldersDefault Permanent InstructionFund Incomes onlyStatus
    \r\n \r\n
    \r\n {riskByPersonIsZero && (\r\n \r\n )}\r\n {acc.BankAccountNumber}{getCurrencyISO(acc.BankAccountCurrency)}{acc.BankAccountType}{acc.BankAccountName}{acc.BankAccountHolders}{acc.BankAccountIsDepositInterest ? \"Yes\" : \"No\"}{acc.BankAccountFundIncomesOnly ? \"Yes\" : \"No\"}{acc.BankAccountStatus}
    \r\n No Results.\r\n
    \r\n {riskByPersonIsZero && !isReadOnly && (\r\n \r\n )}\r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nBankAccountsTab.propTypes = {\r\n accountId: PropTypes.string.isRequired,\r\n bankAccounts: PropTypes.array.isRequired,\r\n setAccountData: PropTypes.func.isRequired,\r\n currencies: PropTypes.array.isRequired,\r\n services: PropTypes.object.isRequired,\r\n banks: PropTypes.array,\r\n};\r\n\r\nBankAccountsTab.defaultProps = {\r\n banks: undefined,\r\n};\r\n\r\nfunction RenderDropdownActions({ onEdit, onDelete, index }) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n onEdit(index)}>\r\n \r\n Edit\r\n \r\n onDelete(index)}>\r\n \r\n Delete\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nRenderDropdownActions.propTypes = {\r\n onEdit: PropTypes.func.isRequired,\r\n onDelete: PropTypes.func.isRequired,\r\n index: PropTypes.number.isRequired,\r\n};\r\n\r\nexport default BankAccountsTab;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Button } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport { preCheckObjectEmpty } from \"../../Modal/ModalArchive\";\r\nimport { getAccountType } from \"../types\";\r\nimport ModalHolder from \"../../Modal/ModalHolder\";\r\nimport HoldersForm from \"../HoldersForm\";\r\nimport ModalConfirm from \"../../Modal/ModalConfirm\";\r\nimport { CircularProgress } from \"../../../..\";\r\nimport BeneficiariesForm from \"../BeneficiariesForm\";\r\nimport { AccountMode } from \"../../../../utils/Helper\";\r\n\r\nconst BeneficiariesTab = ({\r\n holders,\r\n account,\r\n accountId,\r\n setAccountData,\r\n services,\r\n userType,\r\n isReadOnly,\r\n mode,\r\n setRedirect,\r\n Link,\r\n}) => {\r\n const [loadingSave, setLoadingSave] = useState(false);\r\n const [collapsedHolder, setCollapsedHolder] = useState([]);\r\n const [changedHolder, setChangedHolder] = useState({});\r\n const [modalHolder, setModalHolder] = useState({\r\n open: false,\r\n saving: false,\r\n });\r\n const [modalConfirm, setModalConfirm] = useState({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n holderId: undefined,\r\n });\r\n\r\n useEffect(() => {\r\n if (holders) {\r\n const newCollapsedHolder = holders.map(() => ({\r\n open: false,\r\n canEdit: false,\r\n }));\r\n setCollapsedHolder(newCollapsedHolder);\r\n }\r\n }, [holders]);\r\n\r\n const toggleModalHolder = () =>\r\n setModalHolder((m) => ({\r\n open: !m.open,\r\n saving: false,\r\n }));\r\n\r\n const handleDeleteHolder = (holderId) => {\r\n const allHolders = [...holders];\r\n const postAccount = {\r\n AccountId: accountId,\r\n AccountOnboardingId: accountId,\r\n Holder: [\r\n {\r\n PersonId: holderId,\r\n deleteHolder: true,\r\n },\r\n ],\r\n };\r\n const body = {\r\n account: postAccount,\r\n accountChangeType: getAccountType.Beneficiaries,\r\n };\r\n setModalConfirm((m) => ({\r\n ...m,\r\n loading: true,\r\n }));\r\n if (mode !== AccountMode.New) {\r\n services.fetchAccountUpdate(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n let index = -1;\r\n allHolders.forEach((holder, i) => {\r\n if (parseInt(holderId, 10) === parseInt(holder.AccountHolderId, 10)) {\r\n index = i;\r\n }\r\n });\r\n if (index > -1) {\r\n allHolders.splice(index, 1);\r\n collapsedHolder.splice(index, 1);\r\n }\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n holderId: undefined,\r\n callback: undefined,\r\n loading: false,\r\n });\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n AccountInfoHolder: allHolders,\r\n },\r\n true\r\n );\r\n } else {\r\n setModalConfirm((m) => ({\r\n ...m,\r\n loading: false,\r\n }));\r\n }\r\n });\r\n } else {\r\n services.fetchNewAccount(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n let index = -1;\r\n allHolders.forEach((holder, i) => {\r\n if (parseInt(holderId, 10) === parseInt(holder.AccountHolderId, 10)) {\r\n index = i;\r\n }\r\n });\r\n if (index > -1) {\r\n allHolders.splice(index, 1);\r\n collapsedHolder.splice(index, 1);\r\n }\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n holderId: undefined,\r\n callback: undefined,\r\n loading: false,\r\n });\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n AccountInfoHolder: allHolders,\r\n },\r\n true\r\n );\r\n } else {\r\n setModalConfirm((m) => ({\r\n ...m,\r\n loading: false,\r\n }));\r\n }\r\n });\r\n }\r\n };\r\n\r\n const handleRemoveHolder = (holderId) =>\r\n setModalConfirm((m) => ({\r\n ...m,\r\n open: true,\r\n title: \"Are you sure you want to remove the selected Beneficiary?\",\r\n holderId,\r\n callback: () => handleDeleteHolder(holderId),\r\n }));\r\n\r\n const toggleModalConfirm = () =>\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n holderId: undefined,\r\n callback: undefined,\r\n loading: false,\r\n });\r\n\r\n const revert = () => setChangedHolder({});\r\n\r\n const handleSave = (newHolders) => {\r\n const allHolders = [...holders];\r\n const newAccountHolders = Object.keys(newHolders).map((key) => newHolders[key]);\r\n const postAccount = {\r\n AccountId: accountId,\r\n AccountOnboardingId: accountId,\r\n Holder: newAccountHolders,\r\n };\r\n const body = {\r\n account: postAccount,\r\n accountChangeType: getAccountType.Beneficiaries,\r\n };\r\n setLoadingSave(true);\r\n if (mode !== AccountMode.New) {\r\n services.fetchAccountUpdate(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n Object.keys(newHolders).forEach((key) => {\r\n let index = -1;\r\n const newHolder = {\r\n AccountHolderId: newHolders[key].PersonId,\r\n AccountHolderName: newHolders[key].PersonName,\r\n AccountHolderPersonType: newHolders[key].PersonType,\r\n AccountHolderRelationship: newHolders[key].HoldersRelationship,\r\n AccountHolderRelationshipJuridical: newHolders[key].HoldersRelationshipJuridical,\r\n AccountHolderIsController: newHolders[key].HoldersIsController,\r\n AccountHolderIsManager: newHolders[key].HoldersIsManager,\r\n IsMainHolder: newHolders[key].isMainHolder,\r\n HoldersOrderWeb: newHolders[key].HoldersOrderWeb,\r\n HoldersOrderManaged: newHolders[key].HoldersOrderManaged,\r\n HoldersOrderWritten: newHolders[key].HoldersOrderWritten,\r\n HoldersOrderViaLink: newHolders[key].HoldersOrderViaLink,\r\n AccountHolderIsBeneficiary: newHolders[key].AccountHolderIsBeneficiary,\r\n AccountHolderEmail: response.newHolderInfo.AccountHolderEmail,\r\n AccountHolderAddress: response.newHolderInfo.AccountHolderAddress,\r\n AccountHolderCountryId: response.newHolderInfo.AccountHolderCountryId,\r\n AccountHolderCountryName: response.newHolderInfo.AccountHolderCountryName,\r\n AccountHolderByAdvisor: userType == \"Advisor\",\r\n };\r\n allHolders.forEach((holder, i) => {\r\n if (parseInt(newHolder.AccountHolderId, 10) === parseInt(holder.AccountHolderId, 10)) {\r\n index = i;\r\n }\r\n });\r\n if (index > -1) {\r\n allHolders[index] = {\r\n ...allHolders[index],\r\n ...newHolder,\r\n };\r\n collapsedHolder[index].canEdit = false;\r\n } else {\r\n holders.push(newHolder);\r\n collapsedHolder.push({ open: false, canEdit: false });\r\n }\r\n });\r\n setLoadingSave(false);\r\n setChangedHolder({});\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n AccountInfoHolder: allHolders,\r\n },\r\n true\r\n );\r\n } else {\r\n setLoadingSave(false);\r\n }\r\n });\r\n } else {\r\n services.fetchNewAccount(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n Object.keys(newHolders).forEach((key) => {\r\n let index = -1;\r\n const newHolder = {\r\n AccountHolderId: newHolders[key].PersonId,\r\n AccountHolderName: newHolders[key].PersonName,\r\n AccountHolderPersonType: newHolders[key].PersonType,\r\n AccountHolderStatus: newHolders[key].PersonStatus,\r\n AccountHolderRelationship: newHolders[key].HoldersRelationship,\r\n AccountHolderRelationshipJuridical: newHolders[key].HoldersRelationshipJuridical,\r\n AccountHolderIsController: newHolders[key].HoldersIsController,\r\n AccountHolderIsManager: newHolders[key].HoldersIsManager,\r\n IsMainHolder: newHolders[key].isMainHolder,\r\n HoldersOrderWeb: newHolders[key].HoldersOrderWeb,\r\n HoldersOrderManaged: newHolders[key].HoldersOrderManaged,\r\n HoldersOrderWritten: newHolders[key].HoldersOrderWritten,\r\n HoldersOrderViaLink: newHolders[key].HoldersOrderViaLink,\r\n AccountHolderIsBeneficiary: newHolders[key].AccountHolderIsBeneficiary,\r\n AccountHolderEmail: response.newHolderInfo.AccountHolderEmail,\r\n AccountHolderAddress: response.newHolderInfo.AccountHolderAddress,\r\n AccountHolderCountryId: response.newHolderInfo.AccountHolderCountryId,\r\n AccountHolderCountryName: response.newHolderInfo.AccountHolderCountryName,\r\n AccountHolderByAdvisor: userType == \"Advisor\",\r\n };\r\n allHolders.forEach((holder, i) => {\r\n if (parseInt(newHolder.AccountHolderId, 10) === parseInt(holder.AccountHolderId, 10)) {\r\n index = i;\r\n }\r\n });\r\n if (index > -1) {\r\n allHolders[index] = {\r\n ...allHolders[index],\r\n ...newHolder,\r\n };\r\n collapsedHolder[index].canEdit = false;\r\n } else {\r\n holders.push(newHolder);\r\n allHolders.push(newHolder);\r\n collapsedHolder.push({ open: false, canEdit: false });\r\n }\r\n });\r\n setLoadingSave(false);\r\n setChangedHolder({});\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n AccountInfoHolder: allHolders,\r\n },\r\n true\r\n );\r\n } else {\r\n setLoadingSave(false);\r\n }\r\n });\r\n }\r\n };\r\n\r\n const toggleHolder = (index, toggle) => {\r\n const newCollapsedHolder = [...collapsedHolder];\r\n if (toggle) {\r\n for (let i = 0; i < newCollapsedHolder.length; i += 1) {\r\n if (i === index) {\r\n newCollapsedHolder[i] = {\r\n open: !newCollapsedHolder[i].open,\r\n canEdit: false,\r\n };\r\n } else {\r\n newCollapsedHolder[i] = {\r\n open: false,\r\n canEdit: false,\r\n };\r\n }\r\n }\r\n } else {\r\n newCollapsedHolder[index].canEdit = !newCollapsedHolder[index].canEdit;\r\n }\r\n setCollapsedHolder(newCollapsedHolder);\r\n };\r\n\r\n const onChange = (index, name, value) => {\r\n const newChangedHolder = { ...changedHolder };\r\n\r\n if (!newChangedHolder[holders[index].AccountHolderId]) {\r\n newChangedHolder[holders[index].AccountHolderId] = {\r\n PersonId: holders[index].AccountHolderId,\r\n PersonName: holders[index].AccountHolderName,\r\n PersonType: holders[index].AccountHolderPersonType,\r\n PersonStatus: holders[index].AccountHolderStatus,\r\n HoldersRelationship: holders[index].AccountHolderRelationship,\r\n HoldersRelationshipJuridical: holders[index].AccountHolderRelationshipJuridical,\r\n HoldersIsController: holders[index].AccountHolderIsController,\r\n HoldersIsManager: holders[index].AccountHolderIsManager,\r\n isMainHolder: holders[index].IsMainHolder,\r\n deleteHolder: false,\r\n HoldersOrderWeb: holders[index].HoldersOrderWeb,\r\n HoldersOrderWritten: holders[index].HoldersOrderWritten,\r\n HoldersOrderManaged: holders[index].HoldersOrderManaged,\r\n HoldersOrderViaLink: holders[index].HoldersOrderViaLink,\r\n [name]: value,\r\n };\r\n } else {\r\n newChangedHolder[holders[index].AccountHolderId][name] = value;\r\n }\r\n if (name === \"HoldersOrderManaged\") {\r\n newChangedHolder[holders[index].AccountHolderId].HoldersOrderViaLink = false;\r\n newChangedHolder[holders[index].AccountHolderId].HoldersOrderWeb = false;\r\n newChangedHolder[holders[index].AccountHolderId].HoldersOrderWritten = false;\r\n }\r\n setChangedHolder(newChangedHolder);\r\n };\r\n\r\n if (!holders || collapsedHolder.length !== holders.length) {\r\n return ;\r\n }\r\n\r\n let existsMainHolder = false;\r\n holders.forEach((h) => {\r\n const isMainHolder = changedHolder[h.AccountHolderId]\r\n ? changedHolder[h.AccountHolderId].isMainHolder\r\n : h.IsMainHolder;\r\n existsMainHolder = existsMainHolder || isMainHolder;\r\n });\r\n\r\n return (\r\n
    \r\n {\r\n if (mode === AccountMode.New) {\r\n return holder.AccountHolderIsBeneficiary;\r\n }\r\n return holder.AccountHolderIsBeneficiary && !holder.AccountHolderByAdvisor;\r\n })}\r\n changedHolder={changedHolder}\r\n collapsedHolder={collapsedHolder}\r\n onChange={onChange}\r\n toggleHolder={toggleHolder}\r\n account={account}\r\n existsMainHolder={existsMainHolder}\r\n handleDeleteHolder={handleRemoveHolder}\r\n role={\"Beneficiary\"}\r\n isReadOnly={isReadOnly}\r\n />\r\n {!isReadOnly && (\r\n \r\n Add New Beneficiary\r\n \r\n )}\r\n {!isReadOnly && (\r\n \r\n )}\r\n {!isReadOnly && (\r\n handleSave(changedHolder)}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Save\r\n \r\n )}\r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nBeneficiariesTab.propTypes = {\r\n holders: PropTypes.array.isRequired,\r\n accountId: PropTypes.any.isRequired,\r\n account: PropTypes.object.isRequired,\r\n setAccountData: PropTypes.func.isRequired,\r\n services: PropTypes.object.isRequired,\r\n userType: PropTypes.string.isRequired,\r\n};\r\n\r\nexport default BeneficiariesTab;\r\n","import React, { Fragment } from \"react\";\r\nimport { FormGroup, Label, ListGroup, ListGroupItem, Row, Col } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport { CheckFormField, FormField, SelectFormField } from \"../../../../../utils\";\r\nimport { commissionForm } from \".\";\r\nimport { OrderTable } from \"./OrderTable/OrderTable\";\r\n\r\nfunction EventCommission({ events, event, eventErrors, handleChange, loading }) {\r\n return (\r\n \r\n \r\n \r\n {events.map((e, i) => (\r\n \r\n \r\n {event[i].type}\r\n \r\n handleChange(name, i, \"event\", value)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n e.maxForm.trim() === key || e.minForm.trim() === key\r\n )}\r\n getSelectItemId={(key) => key}\r\n getSelectItemName={(key) =>\r\n `${commissionForm[key]} (${key === commissionForm.Flat ? e.currencyISO.trim() : \"%\"})`\r\n }\r\n onChange={(name, value) => handleChange(name, i, \"event\", value)}\r\n />\r\n \r\n \r\n {event[i] === undefined ? null : Object.keys(events).length != 0 &&\r\n event[i].type === \"Order\" &&\r\n event[i].Group ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ) : null}\r\n {event[i] === undefined ? null : Object.keys(events).length != 0 &&\r\n event[i].type === \"Order\" &&\r\n event[i].Group ? (\r\n \r\n ) : null}\r\n \r\n ))}\r\n {events.length === 0 && No event Commissions}\r\n \r\n \r\n );\r\n}\r\n\r\nEventCommission.propTypes = {\r\n events: PropTypes.array.isRequired,\r\n event: PropTypes.array.isRequired,\r\n eventErrors: PropTypes.object.isRequired,\r\n handleChange: PropTypes.func.isRequired,\r\n loading: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default EventCommission;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"desk\":\"Grid-module_desk_IB6PJ\",\"table\":\"Grid-module_table_3xd30\",\"actions\":\"Grid-module_actions_3HYSV\",\"dropdown\":\"Grid-module_dropdown_3nLam\",\"icon\":\"Grid-module_icon_2cPwy\"};","import React, { Fragment } from \"react\";\r\nimport { Label, Row, Col, Container } from \"reactstrap\";\r\nimport { FormField, CheckFormField } from \"../../../../../../utils\";\r\n\r\nimport style from \"./OrderTable.module.scss\";\r\n\r\nexport const OrderTable = ({ group, loading, handleChange, i, eventErrors }) => {\r\n return (\r\n \r\n \r\n \r\n Order - Group\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {group.map((groupItem, index) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n })}\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n

    {groupItem.AssetGroupName ? groupItem.AssetGroupName : \"-\"}

    \r\n
    \r\n

    {groupItem.AssetGroupValue ? groupItem.AssetGroupValue : \"-\"}

    \r\n
    \r\n \r\n \r\n handleChange(name, i, \"event\", value)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n
    \r\n \r\n
    \r\n
    \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"table\":\"OrderTable-module_table_2iOv4\",\"thead\":\"OrderTable-module_thead_brKHZ\",\"tr\":\"OrderTable-module_tr_1KfxO\",\"label\":\"OrderTable-module_label_17qwG\"};","import React, { useEffect, useState, useMemo } from \"react\";\r\nimport { FormGroup, Label, ListGroup, ListGroupItem, Row, Col, Input, Table } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport style from \"./Grid.module.scss\";\r\nimport { FormField, SelectFormField, CheckFormField } from \"../../../../../utils\";\r\nimport { commissionForm } from \".\";\r\nimport CircularProgress from \"../../../../CircularProgress/CircularProgress\";\r\n\r\nfunction RecurringCommission({\r\n recurrings,\r\n loading,\r\n recurring,\r\n recurringErrors,\r\n handleChange,\r\n setSubassets,\r\n services,\r\n}) {\r\n return (\r\n \r\n \r\n \r\n {recurrings.map((r, i) => (\r\n \r\n \r\n \r\n {r.type}\r\n \r\n \r\n handleChange(name, i, \"recurring\", value)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n (r.maxForm.trim() === key || r.minForm.trim() === key))*/\r\n }\r\n getSelectItemId={(key) => key}\r\n getSelectItemName={(key) =>\r\n `${commissionForm[key]} (${key === commissionForm.Flat ? r.currencyISO.trim() : \"%\"})`\r\n }\r\n onChange={(name, value) => handleChange(name, i, \"recurring\", value)}\r\n />\r\n \r\n \r\n handleChange(name, i, \"recurring\", value)}\r\n description={`in ${r.currencyISO.trim()}`}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n handleChange(name, i, \"recurring\", value)}\r\n />\r\n \r\n \r\n {parseInt(r.groupId, 10) > 0 && (\r\n \r\n )}\r\n \r\n ))}\r\n {recurring.length === 0 && No recurring Commissions}\r\n \r\n \r\n );\r\n}\r\n\r\nRecurringCommission.propTypes = {\r\n recurrings: PropTypes.array.isRequired,\r\n recurring: PropTypes.array.isRequired,\r\n recurringErrors: PropTypes.object.isRequired,\r\n handleChange: PropTypes.func.isRequired,\r\n setSubassets: PropTypes.func.isRequired,\r\n services: PropTypes.object.isRequired,\r\n loading: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default RecurringCommission;\r\n\r\nfunction RecurringAssetGroup({\r\n subasset,\r\n subassetSchema,\r\n services,\r\n setSubassets,\r\n recIndex,\r\n assetGroupId,\r\n loading,\r\n}) {\r\n const [assetGroup, setAssetGroup] = useState(undefined);\r\n\r\n useEffect(() => {\r\n services.getAssetGroup({ id: assetGroupId }, (res) => {\r\n const { assetGroup: aG } = res;\r\n setAssetGroup(aG);\r\n });\r\n }, [assetGroupId, services]);\r\n\r\n useEffect(() => {\r\n if (assetGroup && !assetGroup.loaded) {\r\n const newSubassets = (assetGroup.Values || []).map((value) => {\r\n let newItem;\r\n subasset.forEach((item) => {\r\n if (item.value.trim() === value.AssetGroupValue.trim()) {\r\n newItem = {\r\n ...item,\r\n included: true,\r\n blocked: false,\r\n };\r\n subassetSchema.forEach((item2) => {\r\n if (item2.value.trim() === value.AssetGroupValue.trim()) {\r\n newItem.blocked = true;\r\n }\r\n });\r\n }\r\n });\r\n if (!newItem) {\r\n newItem = {\r\n value: value.AssetGroupValue.trim(),\r\n included: false,\r\n blocked: false,\r\n excludedInMin: true,\r\n };\r\n }\r\n return newItem;\r\n });\r\n setAssetGroup({ ...assetGroup, loaded: true });\r\n setSubassets(recIndex, newSubassets);\r\n }\r\n }, [assetGroup, subasset, setSubassets, recIndex, subassetSchema]);\r\n\r\n const handleChange = (index, name, value) => {\r\n const newSubassets = [...subasset];\r\n newSubassets[index][name] = value;\r\n setSubassets(recIndex, newSubassets);\r\n };\r\n\r\n if (!assetGroup || !assetGroup.loaded) return ;\r\n\r\n return (\r\n
    \r\n
    \r\n Exluceded groups from Asset Group:{\" \"}\r\n {assetGroup.AssetGroupName}\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {subasset.map((subAssSchema, subAssetIndex) => (\r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n {subasset.length === 0 && (\r\n \r\n \r\n \r\n )}\r\n \r\n
    NameExclude in minimumExclude
    {subAssSchema.value}\r\n {subAssSchema.included ? (\r\n \r\n handleChange(\r\n subAssetIndex,\r\n \"excludedInMin\",\r\n target.checked === \"true\" || target.checked === true\r\n )\r\n }\r\n />\r\n ) : (\r\n \"-\"\r\n )}\r\n \r\n \r\n handleChange(\r\n subAssetIndex,\r\n \"included\",\r\n target.checked === \"true\" || target.checked === true\r\n )\r\n }\r\n />\r\n
    \r\n No Assets in Group\r\n
    \r\n
    \r\n );\r\n}\r\n\r\nRecurringAssetGroup.propTypes = {\r\n subasset: PropTypes.array.isRequired,\r\n subassetSchema: PropTypes.array.isRequired,\r\n setSubassets: PropTypes.func.isRequired,\r\n recIndex: PropTypes.number.isRequired,\r\n services: PropTypes.object.isRequired,\r\n loading: PropTypes.bool.isRequired,\r\n assetGroupId: PropTypes.any.isRequired,\r\n};\r\n","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport React, { useState, useEffect } from \"react\";\r\nimport { Button, Label, Input, Row, Col, FormGroup, InputGroup } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\nimport { SelectFormField, CircularProgress } from \"../../../../../index\";\r\n\r\nimport { getLocalDate } from \"../../../../../utils/dateUtils\";\r\nimport EventCommission from \"./EventCommission\";\r\nimport RecurringCommission from \"./RecurringCommission\";\r\nimport { Field } from \"../../../..\";\r\n\r\nexport const commissionForm = {\r\n Flat: \"Flat\",\r\n Percentage: \"Percentage\",\r\n};\r\n\r\nconst CommissionTab = ({ accountId, services }) => {\r\n const [commission, setCommission] = useState(undefined);\r\n const [schema, setSchema] = useState(undefined);\r\n const [schemas, setSchemas] = useState(undefined);\r\n const [errors, setErrors] = useState({\r\n recurring: {},\r\n event: {},\r\n });\r\n const [loading, setLoading] = useState(false);\r\n\r\n const handleChangeCommission = (name, value) => {\r\n const [id, from] = value.split(\" - \");\r\n setCommission((c) => ({\r\n ...c.commission,\r\n id,\r\n from,\r\n recurring: undefined,\r\n event: undefined,\r\n }));\r\n setSchema(undefined);\r\n // check to not allow form 2 if only form 1 is allowed\r\n };\r\n\r\n const handleChange = (name, index, type, value) => {\r\n const newError = { ...errors };\r\n const newCommission = { ...commission };\r\n const typeSchema = schema[type][index];\r\n const oldType = commission[type][index];\r\n delete newError[type][index];\r\n\r\n newCommission[type][index][name] = value;\r\n\r\n let compareValue;\r\n let canCompare = {};\r\n if (name === \"form\") {\r\n compareValue = parseFloat(newCommission[type][index].volume);\r\n canCompare = {\r\n min: value.trim() === typeSchema.minForm.trim(),\r\n max: value.trim() === typeSchema.maxForm.trim(),\r\n };\r\n } else if (name === \"volume\") {\r\n compareValue = parseFloat(value);\r\n canCompare = {\r\n min: oldType.form.trim() === typeSchema.minForm.trim(),\r\n max: oldType.form.trim() === typeSchema.maxForm.trim(),\r\n };\r\n } else if (name === \"groupVolume\") {\r\n newCommission.event[index].Group[0].GroupVolume = value;\r\n }\r\n // checks that new group volume is in range\r\n if (name === \"groupVolume\") {\r\n const maxCommissionGroup = parseFloat(newCommission.event[index].Group[0].CommissionGroupMax);\r\n const minCommissionGroup = parseFloat(newCommission.event[index].Group[0].CommissionGroupMin);\r\n const newIndex = \"groupVolume\";\r\n\r\n if (value < minCommissionGroup) {\r\n newError[type][newIndex] = \"Value is lower than lower limit\";\r\n } else if (maxCommissionGroup != 0 && value > maxCommissionGroup) {\r\n newError[type][newIndex] = \"Value is higher than upper limit\";\r\n }else{\r\n // resets the error message\r\n newError[type][newIndex] = \"\";\r\n }\r\n setErrors(newError);\r\n }\r\n // check commission in range\r\n if (canCompare.min && parseFloat(typeSchema.min) > compareValue) {\r\n newError[type][index] = \"Value is lower than lower limit\";\r\n } else if (canCompare.max && parseFloat(typeSchema.max) < compareValue) {\r\n newError[type][index] = \"Value is higher than upper limit\";\r\n }\r\n setCommission(newCommission);\r\n setErrors(newError);\r\n };\r\n\r\n const setSubassets = (indexRecurring, newSubassets) => {\r\n const newCommission = { ...commission };\r\n newCommission.recurring[indexRecurring].subasset = [...newSubassets];\r\n setCommission(newCommission);\r\n };\r\n\r\n const handleSave = () => {\r\n setLoading(true);\r\n const body = {\r\n accountId,\r\n commission: {\r\n ...commission,\r\n recurring: commission.recurring.map((rec) => ({\r\n ...rec,\r\n subasset: rec.subasset.filter((item) => item.included),\r\n })),\r\n },\r\n };\r\n services.updateAccountCommission(body, (res) => {\r\n services.showToast(\"Commission changed successfully\");\r\n setLoading(false);\r\n });\r\n };\r\n\r\n const revert = () => {\r\n setCommission(undefined);\r\n setSchema(undefined);\r\n setErrors({\r\n recurring: {},\r\n event: {},\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n services.getCommissionSchemas({}, (res) => {\r\n setSchemas(\r\n res.schemas.map((s, index) => ({\r\n ...s,\r\n index,\r\n }))\r\n );\r\n });\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!commission) {\r\n services.getAccountCommission({ accountId }, (res) => {\r\n setCommission(res.commission);\r\n });\r\n }\r\n }, [commission]);\r\n\r\n useEffect(() => {\r\n if (!schema && commission) {\r\n const { id, from } = commission;\r\n if (id && from) {\r\n services.getCommissionSchema(\r\n {\r\n commissionId: id,\r\n commissionFrom: from,\r\n },\r\n (res) => {\r\n const { schema: newSchema } = res;\r\n setErrors({\r\n recurring: {},\r\n event: {},\r\n });\r\n setSchema(res.schema);\r\n setCommission((c) => ({\r\n ...c,\r\n recurring: c.recurring ? [...c.recurring] : [...newSchema.recurring],\r\n event: c.event ? [...c.event] : [...newSchema.event],\r\n }));\r\n }\r\n );\r\n }\r\n }\r\n }, [commission, schema]);\r\n\r\n let canSubmit = schemas && schema && commission && commission.recurring && commission.event;\r\n if (canSubmit) {\r\n Object.keys(errors.event).forEach((key) => {\r\n canSubmit = canSubmit && !errors.event[key];\r\n });\r\n }\r\n if (canSubmit) {\r\n Object.keys(errors.recurring).forEach((key) => {\r\n canSubmit = canSubmit && !errors.recurring[key];\r\n });\r\n }\r\n\r\n return (\r\n \r\n {schemas && commission ? (\r\n `${i.id} - ${i.from}`}\r\n getSelectItemName={(i) => `${i.name} - ${getLocalDate(i.from)}`}\r\n onChange={handleChangeCommission}\r\n disabled={!(schema && commission && commission.recurring && commission.event) || loading}\r\n value={`${commission.id} - ${commission.from}`}\r\n />\r\n ) : (\r\n \r\n )}\r\n {schema && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n {schema && commission && commission.recurring && commission.event ? (\r\n \r\n \r\n \r\n \r\n ) : (\r\n \r\n )}\r\n \r\n \r\n {loading ? \"Saving...\" : \"Change\"}\r\n \r\n \r\n );\r\n};\r\n\r\nCommissionTab.propTypes = {\r\n accountId: PropTypes.string.isRequired,\r\n // setAccountData: PropTypes.func.isRequired,\r\n services: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default CommissionTab;\r\n","import React from \"react\";\r\nimport { UncontrolledDropdown, DropdownToggle, DropdownMenu, DropdownItem } from \"reactstrap\";\r\n\r\nconst BookType = ({ ...props }) => {\r\n const { AccountBooktypes, selectedBookType } = props;\r\n\r\n return (\r\n \r\n \r\n \r\n Book Type: {selectedBookType}\r\n \r\n \r\n {AccountBooktypes.map((bk) => (\r\n props.toggleBookType(e.target.value)}>\r\n {bk}\r\n \r\n ))}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default BookType;\r\n","/* eslint-disable jsx-a11y/click-events-have-key-events */\r\n/* eslint-disable jsx-a11y/no-static-element-interactions */\r\nimport React, { useState, useEffect } from \"react\";\r\nimport { Form, FormGroup, Label, ListGroup, ListGroupItem, Row, Col } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport PropTypes, { element } from \"prop-types\";\r\n\r\nimport { getAccountType, ArchiveTypes } from \"../types\";\r\nimport ModalArchive from \"../../Modal/ModalArchive\";\r\nimport ModalConfirm from \"../../Modal/ModalConfirm\";\r\nimport { CircularProgress } from \"../../../..\";\r\nimport { AccountMode, showToast } from \"../../../../utils/Helper\";\r\nimport { FormattedDate, FormattedTime } from \"react-intl\";\r\n\r\nconst Documents = ({\r\n documents,\r\n isReadOnly,\r\n archivesTypes,\r\n accountId,\r\n setAccountData,\r\n services,\r\n mode,\r\n refresh,\r\n}) => {\r\n const [modalArchives, setModalArchives] = useState({\r\n open: false,\r\n loading: false,\r\n });\r\n const [modalConfirm, setModalConfirm] = useState({\r\n open: false,\r\n documentId: null,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n });\r\n\r\n useEffect(() => {\r\n if (mode === AccountMode.New) {\r\n if (documents && documents.length < 1) {\r\n const body = {\r\n AccountGetInfo: {\r\n GetAccountDataId: accountId,\r\n GetAccountDataOnboardingId: accountId,\r\n GetAccountDataType: getAccountType.Documents,\r\n },\r\n };\r\n services.fetchNewAccountInfo(body, (data) => {\r\n if (data && data.SDTAccount) {\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n AccountArchives: data.SDTAccount.AccountArchives,\r\n },\r\n false\r\n );\r\n }\r\n });\r\n }\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (mode !== AccountMode.New) {\r\n if (!documents) {\r\n const body = {\r\n AccountGetInfo: {\r\n GetAccountDataId: accountId,\r\n GetAccountDataType: getAccountType.Documents,\r\n },\r\n };\r\n services.fetchAccountSectorInfo(body, (data) => {\r\n if (data && data.SDTAccount) {\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n AccountArchives: data.SDTAccount.AccountArchives,\r\n },\r\n false\r\n );\r\n }\r\n });\r\n }\r\n }\r\n }, [accountId, archivesTypes, setAccountData, services]);\r\n\r\n const handleSaveFile = (archive) => {\r\n if (\r\n [\"pdf\", \"csv\", \"doc\", \"docx\", \"xls\", \"xlsx\", \"jpg\", \"jpeg\", \"png\"].includes(\r\n archive.ArchivesExtension.toLowerCase()\r\n )\r\n ) {\r\n const newArchive = {};\r\n Object.keys(archive).map((key) => {\r\n newArchive[`Account${key}`] = archive[key];\r\n return {};\r\n });\r\n\r\n const body = {\r\n account: {\r\n AccountId: accountId,\r\n AccountOnboardingId: accountId,\r\n AccountArchives: [newArchive],\r\n },\r\n accountChangeType: getAccountType.Documents,\r\n };\r\n setModalArchives((m) => ({\r\n ...m,\r\n loading: true,\r\n }));\r\n if (mode !== AccountMode.New) {\r\n services.fetchAccountUpdate(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newDocument = body.account.AccountArchives[0];\r\n newDocument.AccountArchiveId = response.Id;\r\n documents.push(newDocument);\r\n setModalArchives({\r\n open: false,\r\n loading: false,\r\n });\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n AccountArchives: documents,\r\n },\r\n true\r\n );\r\n }\r\n });\r\n } else {\r\n services.fetchNewAccount(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newDocument = body.account.AccountArchives[0];\r\n newDocument.AccountArchiveId = response.Id;\r\n documents.push(newDocument);\r\n setModalArchives({\r\n open: false,\r\n loading: false,\r\n });\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n AccountArchives: documents,\r\n },\r\n true\r\n );\r\n refresh();\r\n }\r\n });\r\n }\r\n } else {\r\n showToast(\"error: the file must be pdf, csv, doc, docx, xls or xlsx\", true);\r\n setModalArchives({\r\n open: true,\r\n loading: false,\r\n });\r\n }\r\n };\r\n\r\n const handleDeleteFile = (documentId) => {\r\n const body = {\r\n account: {\r\n AccountId: accountId,\r\n AccountOnboardingId: accountId,\r\n AccountArchives: [\r\n {\r\n AccountArchiveId: documentId,\r\n },\r\n ],\r\n },\r\n accountChangeType: getAccountType.Documents,\r\n };\r\n setModalConfirm((m) => ({\r\n ...m,\r\n loading: true,\r\n }));\r\n if (mode !== AccountMode.New) {\r\n services.fetchAccountUpdate(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n let index = -1;\r\n documents.map((doc, i) => {\r\n if (doc.AccountArchiveId === documentId) {\r\n index = i;\r\n }\r\n return {};\r\n });\r\n if (index > -1) {\r\n documents.splice(index, 1);\r\n }\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n AccountArchives: documents,\r\n },\r\n true\r\n );\r\n setModalConfirm({\r\n open: false,\r\n documentId: null,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n });\r\n }\r\n });\r\n } else {\r\n services.fetchNewAccount(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n let index = -1;\r\n documents.map((doc, i) => {\r\n if (doc.AccountArchiveId === documentId) {\r\n index = i;\r\n }\r\n return {};\r\n });\r\n if (index > -1) {\r\n documents.splice(index, 1);\r\n }\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n AccountArchives: documents,\r\n },\r\n true\r\n );\r\n setModalConfirm({\r\n open: false,\r\n documentId: null,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n });\r\n refresh();\r\n }\r\n });\r\n }\r\n };\r\n\r\n const toggleModalConfirm = (id) =>\r\n setModalConfirm((m) => {\r\n const newM = {\r\n ...m,\r\n open: !m.open,\r\n };\r\n if (id) {\r\n newM.title = \"Are you sure you want to remove the selected Document?\";\r\n newM.callback = () => handleDeleteFile(id);\r\n }\r\n return newM;\r\n });\r\n\r\n const toggleModalDoc = () => {\r\n const archiveSubytpeExists =\r\n Object.keys(archivesTypes[ArchiveTypes.Account]).length > 0 &&\r\n Object.keys(archivesTypes[ArchiveTypes.Account].ArchivesSubTypes).length > 0;\r\n if (archiveSubytpeExists) {\r\n setModalArchives((m) => ({\r\n open: !m.open,\r\n loading: false,\r\n }));\r\n } else {\r\n alert(\r\n \"No Archives Subtypes entered in the system.\\nTo add files go to:\\nParameteres -> Archive Subtypes\"\r\n );\r\n }\r\n };\r\n\r\n if (!documents || !archivesTypes) {\r\n return ;\r\n }\r\n\r\n const getFile = (file) => {\r\n const body = {\r\n accountId: accountId,\r\n archiveId: file.AccountArchiveId,\r\n };\r\n services.getAccountArchive(body, (response) => {\r\n var a = document.createElement(\"A\");\r\n a.href = `data:application/octet-stream;base64,${response.blobfile}`;\r\n a.download = `${file.AccountArchivesName}.${file.AccountArchivesExtension}`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n });\r\n };\r\n\r\n const getOnboardingFile = (file) => {\r\n const body = {\r\n fileId: file.AccountArchiveId,\r\n onboarding: accountId,\r\n };\r\n services.getOnboardingAccountArchive(body, (response) => {\r\n var a = document.createElement(\"A\");\r\n a.href = `data:application/octet-stream;base64,${response.blobfile}`;\r\n a.download = `${file.AccountArchivesName}.${file.AccountArchivesExtension}`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n });\r\n };\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n {documents.map((d, i) => (\r\n \r\n \r\n {!isReadOnly && (\r\n toggleModalConfirm(d.AccountArchiveId)}\r\n >\r\n \r\n
    \r\n )}\r\n \r\n ))}\r\n \r\n
    \r\n \r\n {!isReadOnly && (\r\n \r\n Add New Document\r\n \r\n )}\r\n {modalArchives.open && (\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nDocuments.propTypes = {\r\n accountId: PropTypes.string.isRequired,\r\n archivesTypes: PropTypes.object,\r\n documents: PropTypes.array,\r\n setAccountData: PropTypes.func.isRequired,\r\n services: PropTypes.object.isRequired,\r\n};\r\n\r\nDocuments.defaultProps = {\r\n archivesTypes: undefined,\r\n documents: undefined,\r\n};\r\n\r\nexport default Documents;\r\n","import React, { useState, useEffect } from 'react';\r\nimport {\r\n Form, FormGroup, Input, Button,Row, Col\r\n} from 'reactstrap';\r\nimport LaddaButton, { EXPAND_RIGHT } from 'react-ladda';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { KYCConstants, getAccountType } from '../types';\r\nimport { CustomFormInput, FormField } from '../../../../utils/FormFields';\r\nimport { CircularProgress } from '../../../..';\r\nimport { AccountMode } from '../../../../utils/Helper';\r\nimport ModalConfirm from \"../../Modal/ModalConfirm\";\r\n\r\n\r\nconst FinalizeTab = ({\r\n Finalize,\r\n accountId,\r\n account,\r\n setAccountData,\r\n setRedirectAccount,\r\n services,\r\n mode,\r\n userType,\r\n}) => {\r\n const [loadingSave, setLoadingSave] = useState(false);\r\n const [loadingData, setLoadingData] = useState(false);\r\n const [loadingCheck, setLoadingCheck] = useState(false);\r\n const [personlist, setPersonList] = useState([]);\r\n const [showResults, setShow] = useState(false);\r\n const [listResults, setResults] = useState([]);\r\n const [reportId, setReportid] = useState(0)\r\n const [modalConfirm, setModalConfirm] = useState({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n accountId: undefined\r\n });\r\n\r\n\r\n\r\n const handleCreateAccount = () => {\r\n setLoadingSave(true)\r\n const body = {\r\n onboardingProcessId: accountId,\r\n }\r\n services.createAccount(body, (data) => {\r\n if (data && data.result) {\r\n if (data.result.Code === 200) {\r\n alert(data.result.Description);\r\n setRedirectAccount(data.id);\r\n } else {\r\n if(data.result.Description.includes(\"FundsX\")){\r\n alert(data.result.Description);\r\n setRedirectAccount(data.id);\r\n }else {\r\n alert(`Failed! ${data.result.Description}`);\r\n }\r\n \r\n }\r\n }\r\n setLoadingSave(false);\r\n });\r\n }\r\n \r\n const createOnboardingAccount = () => {\r\n setModalConfirm(m => ({\r\n ...m,\r\n open: true,\r\n title: \"Are you sure you want to send account information?\",\r\n accountId,\r\n callback: () => handleCreateAccount()\r\n }));\r\n };\r\n\r\n\r\n const listCheck = () => {\r\n setLoadingCheck(true)\r\n const body = {\r\n sdtApproveAccount: personlist,\r\n fromType: 'EasyAccount',\r\n }\r\n if (personlist.length < 1){\r\n alert(\"There aren't people to check!\");\r\n }else{\r\n services.AccountListCheck(body, (data) => {\r\n if (data && data.error) {\r\n if (data.error.lenght > 0) {\r\n setResults(data.error);\r\n \r\n } \r\n setReportid(data.logListId);\r\n }\r\n setLoadingCheck(false);\r\n });\r\n }\r\n }\r\n\r\n\r\n useEffect(() => {\r\n setLoadingData(true);\r\n const body = {\r\n AccountGetInfo: {\r\n GetAccountDataOnboardingId: accountId,\r\n GetAccountDataId: accountId,\r\n GetAccountDataType: getAccountType.Finalize,\r\n },\r\n };\r\n if (mode === AccountMode.New) {\r\n services.fetchNewAccountInfo(body, (data) => {\r\n if (data && data.SDTAccount) {\r\n setLoadingData(false);\r\n setPersonList(data.SDTAccount.SDTApproveAccount)\r\n }else{\r\n setLoadingData(false);\r\n }\r\n });\r\n }\r\n \r\n }, []);\r\n\r\n const toggleModalConfirm = () =>\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n accountId: undefined,\r\n callback: undefined,\r\n loading: false\r\n });\r\n\r\n const handleDownload = () => {\r\n services.getReportListCheck({\r\n logListId: reportId\r\n }).then(response => {\r\n window.open(response.response.url);\r\n });\r\n };\r\n // markAsFalsePositive(name, personId, marked) {\r\n // var message = \"\";\r\n // if (marked == false) {\r\n // message =\r\n // \"Are you sure you want to mark person \" + name + \" as false positive?\";\r\n // } else {\r\n // message =\r\n // \"Are you sure you want to unmark person \" +\r\n // name +\r\n // \" as false positive?\";\r\n // }\r\n // this.setState({\r\n // modalPersonId: personId,\r\n // openModalConfirm: true,\r\n // modalMessage: message,\r\n // markModal: marked\r\n // });\r\n // }\r\n \r\n\r\n// const handleSave = () => {\r\n// const Finalize = { ...Finalize };\r\n// const body = {\r\n// account: {\r\n// AccountId: accountId,\r\n// AccountOnboardingId : accountId,\r\n// KYC: newKYC,\r\n// },\r\n// accountChangeType: getAccountType.KYC,\r\n// };\r\n// setLoadingSave(true);\r\n// if (mode === AccountMode.New){\r\n// services.fetchNewAccount(body, (res) => {\r\n// if (res){\r\n// setAccountData({\r\n// AccountId: account.AccountOnboardingId,\r\n// KYC: newKYC,\r\n// }, true);\r\n// setChangedKYC({});\r\n// setLoadingSave(false);\r\n// }else{\r\n// setLoadingSave(false);\r\n// }\r\n// })\r\n// }else{\r\n// services.fetchAccountUpdate(body, ({ result }) => {\r\n// if (result && result.Code === 200) {\r\n// setAccountData({\r\n// AccountId: accountId,\r\n// KYC: newKYC,\r\n// }, true);\r\n// setChangedKYC({});\r\n// setLoadingSave(false);\r\n// } else {\r\n// setLoadingSave(false);\r\n// }\r\n// });\r\n// };\r\n// }\r\n\r\n // const onChange = (name, value) => {\r\n // if (!loadingSave) {\r\n // const newKYC = { ...changedKYC };\r\n // if (KYC[name] !== value) {\r\n // newKYC[name] = value;\r\n // } else if (newKYC[name]) {\r\n // newKYC[name] = undefined;\r\n // }\r\n // setChangedKYC(newKYC);\r\n // }\r\n // };\r\n\r\n //const revert = () => setChangedKYC({});\r\n\r\n\r\n if (loadingData) {\r\n return ;\r\n }\r\n return (\r\n
    \r\n \r\n {/* \r\n Do you want to List check Account? \r\n \r\n \r\n \r\n List Check\r\n \r\n */}\r\n \r\n {reportId > 0 &&\r\n \r\n {\" \"}\r\n \r\n \r\n }\r\n \r\n \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n {/* \r\n Download Account Info \r\n */}\r\n\r\n {/* \r\n \r\n {\" \"}\r\n \r\n \r\n */}\r\n \r\n\r\n\r\n \r\n\r\n\r\n \r\n {showResults && \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {listResults.map((r, i) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n
    Person NamePerson Checked NameList NamePerson RelationMarked as false positive
    {r.personName}{r.personCheckName}{r.listName}{r.personRelation}\r\n {r.belongPersonList == true ? (\r\n \r\n markAsFalsePositive(r.personName, r.id, false)\r\n }\r\n >\r\n Unmark as false positive\r\n \r\n ) : (\r\n \r\n markAsFalsePositive(r.personName, r.id, true)\r\n }\r\n >\r\n Mark as false positive\r\n \r\n )}\r\n
    \r\n }\r\n
    \r\n \r\n {/* {userType === 'Compliance' && */}\r\n \r\n \r\n \r\n \r\n Create Account\r\n \r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nFinalizeTab.propTypes = {\r\n accountId: PropTypes.string.isRequired,\r\n setAccountData: PropTypes.func.isRequired,\r\n services: PropTypes.object.isRequired,\r\n account: PropTypes.object.isRequired,\r\n mode: PropTypes.object.isRequired,\r\n};\r\n\r\nFinalizeTab.defaultProps = {\r\n Finalize: undefined,\r\n};\r\n\r\nexport default FinalizeTab;\r\n","import React, { useState, Fragment, useEffect } from \"react\";\r\nimport { Table, Button } from \"reactstrap\";\r\nimport ModalGroup from \"../../../Profile/Modal/ModalGroup\";\r\nimport ModalConfirm from \"../../Modal/ModalConfirm\";\r\n//import { LoadingMessage } from \"../../Controls\";\r\nimport LaddaButton, { ZOOM_OUT, XS } from \"react-ladda\";\r\nimport { CircularProgress } from \"../../../..\";\r\nimport { getAccountType } from \"../types\";\r\n//import { Mode, WizzMode } from \"../../types\";\r\nimport { AccountMode } from \"../../../../utils/Helper\";\r\n//import { useEntities } from \"../../Wizzard\";\r\n\r\nconst GroupsTab = ({ accountId, groups, isReadOnly, setAccountData, services, role, mode }) => {\r\n //const [readonly, setReadonly] = useState(mode == WizzMode.View);\r\n const [modalGroup, setModalGroup] = useState({ open: false });\r\n const [fetching, setFetching] = useState(false);\r\n const [modalConfirm, setModalConfirm] = useState({\r\n open: false,\r\n title: \"\",\r\n groupId: undefined,\r\n saving: false,\r\n });\r\n //const [deleting, setDeleting] = useEntities({});\r\n\r\n const toggle = (props) => {\r\n setModalGroup({ open: !modalGroup.open, ...props });\r\n };\r\n\r\n const toggleModalConfirm = () => {\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n groupId: undefined,\r\n value: undefined,\r\n saving: false,\r\n });\r\n };\r\n\r\n // handle grid actions\r\n const handleAction = (action, group, value) => {\r\n if (action == \"Insert\") {\r\n toggle({\r\n accountId,\r\n action,\r\n onConfirm: (e) => handleSave(action, e),\r\n });\r\n } else if (action == \"Update\") {\r\n toggle({\r\n accountId,\r\n action,\r\n group: groups.find((c) => c.AccountGroupId == group && c.AccountGroupValue == value),\r\n onConfirm: (e) => handleSave(action, e),\r\n });\r\n } else if (action == \"Delete\") {\r\n setModalConfirm({\r\n open: true,\r\n title: \"Are you sure you want to delete the selected group Account?\",\r\n groupId: group,\r\n value: value,\r\n });\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (role && role == 'Onboarding') {\r\n if (mode === AccountMode.New) {\r\n if (!fetching) {\r\n const body = {\r\n AccountGetInfo: {\r\n GetAccountDataId: accountId,\r\n GetAccountDataOnboardingId: accountId,\r\n GetAccountDataType: getAccountType.Groups,\r\n },\r\n };\r\n services.fetchNewAccountInfo(body, (response) => {\r\n if (response && response.SDTAccount) {\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n Groups: response.SDTAccount.Groups,\r\n },\r\n false\r\n );\r\n }\r\n let toggleDWOpen = [];\r\n if (response && response.SDTAccount) {\r\n toggleDWOpen = response.SDTAccount.Groups.map(() => false);\r\n }\r\n\r\n setFetching(false);\r\n });\r\n setFetching(true);\r\n }\r\n }}\r\n }, []);\r\n\r\n const handleSave = (a, fields) => {\r\n const account = {\r\n [role === 'Onboarding' ? 'AccountOnboardingId' : 'AccountId']: accountId,\r\n Groups: [\r\n {\r\n AccountGroupId: fields.AccountGroupId,\r\n AccountGroupName: fields.AccountGroupName,\r\n AccountGroupValue: fields.AccountGroupValue,\r\n AccountGroupAction: a\r\n },\r\n ],\r\n };\r\n const body = {\r\n account,\r\n accountChangeType: getAccountType.Groups,\r\n };\r\n //setModalBankAccount({...modalBankAccount, saving: true});\r\n services.fetchAccountUpdate(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newBankAccounts = [...groups];\r\n let index = -1;\r\n newBankAccounts.map((bankAcc, i) => {\r\n if (fields.AccountGroupId === bankAcc.AccountGroupId) {\r\n index = i;\r\n }\r\n return {};\r\n });\r\n if (index > -1) {\r\n newBankAccounts[index] = fields;\r\n } else {\r\n newBankAccounts.push(fields);\r\n }\r\n account.Groups = newBankAccounts;\r\n setAccountData(account, true);\r\n setModalGroup({ open: !modalGroup.open, ...modalGroup });\r\n } else {\r\n setModalGroup({ open: !modalGroup.open, ...modalGroup });\r\n alert(response.result.Description);\r\n }\r\n });\r\n };\r\n\r\n const handleDelete = () => {\r\n const groupid = modalConfirm.groupId;\r\n const value = modalConfirm.value;\r\n const account = {\r\n [role === 'Onboarding' ? 'AccountOnboardingId' : 'AccountId']: accountId,\r\n Groups: [\r\n {\r\n AccountGroupId: groupid,\r\n AccountGroupValue: value,\r\n DeleteGroup: true,\r\n },\r\n ],\r\n };\r\n const body = {\r\n account,\r\n accountChangeType: getAccountType.Groups,\r\n };\r\n setModalConfirm({ ...modalConfirm, saving: true });\r\n services.fetchAccountUpdate(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newBankAccounts = [...groups];\r\n let index = -1;\r\n newBankAccounts.map((bankAcc, i) => {\r\n if (groupid === bankAcc.AccountGroupId) {\r\n index = i;\r\n }\r\n return {};\r\n });\r\n if (index > -1) {\r\n newBankAccounts.splice(index);\r\n }\r\n account.Groups = newBankAccounts;\r\n setAccountData(account, true);\r\n toggleModalConfirm();\r\n } else {\r\n setModalConfirm({\r\n ...modalConfirm,\r\n saving: false,\r\n });\r\n alert(response.result.Description);\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n if (!groups && !fetching) {\r\n const body = {\r\n AccountGetInfo: {\r\n GetAccountDataId: accountId,\r\n GetAccountDataType: getAccountType.Groups,\r\n },\r\n };\r\n services.fetchAccountSectorInfo(body, (response) => {\r\n if (response && response.SDTAccount) {\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n Groups: response.SDTAccount.Groups,\r\n },\r\n false\r\n );\r\n }\r\n setFetching(false);\r\n });\r\n setFetching(true);\r\n }\r\n }, [groups, fetching, accountId, setAccountData, services]);\r\n\r\n return (\r\n
    \r\n {!isReadOnly && (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {groups ? (\r\n \r\n {groups.map((item) => (\r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n {groups.length == 0 && }\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n
    Group NameGroup Value
    {item.AccountGroupName}{item.AccountGroupValue}\r\n {!isReadOnly && (\r\n \r\n )}\r\n
    \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nconst EmptyOrLoading = ({ loading }) => (\r\n \r\n \r\n {loading ? (\r\n \r\n ) : (\r\n \r\n No Account groups\r\n \r\n )}\r\n \r\n \r\n);\r\n\r\nconst Actions = ({ action, id, valueId, deleting }) => (\r\n
    \r\n \r\n\r\n action(\"Delete\", id, valueId)}\r\n data-style={ZOOM_OUT}\r\n data-size={XS}\r\n >\r\n \r\n \r\n
    \r\n);\r\n\r\nexport default GroupsTab;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Button } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport { preCheckObjectEmpty } from \"../../Modal/ModalArchive\";\r\nimport { getAccountType } from \"../types\";\r\nimport ModalHolder from \"../../Modal/ModalHolder\";\r\nimport HoldersForm from \"../HoldersForm\";\r\nimport ModalConfirm from \"../../Modal/ModalConfirm\";\r\nimport { CircularProgress } from \"../../../..\";\r\nimport { AccountMode } from \"../../../../utils/Helper\";\r\nimport ModalError from \"../../Modal/ModalError\";\r\n\r\nconst HoldersTab = ({\r\n holders,\r\n account,\r\n accountId,\r\n setAccountData,\r\n disabledFields,\r\n services,\r\n userType,\r\n isReadOnly,\r\n mode,\r\n Link,\r\n}) => {\r\n const [loadingSave, setLoadingSave] = useState(false);\r\n const [collapsedHolder, setCollapsedHolder] = useState([]);\r\n const [changedHolder, setChangedHolder] = useState({});\r\n const [modalHolder, setModalHolder] = useState({\r\n open: false,\r\n saving: false,\r\n });\r\n const [modalConfirm, setModalConfirm] = useState({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n holderId: undefined,\r\n });\r\n const [modalError, setModalError] = useState({\r\n open: false,\r\n message: \"\",\r\n });\r\n\r\n useEffect(() => {\r\n if (holders) {\r\n const newCollapsedHolder = holders.map(() => ({\r\n open: false,\r\n canEdit: false,\r\n }));\r\n setCollapsedHolder(newCollapsedHolder);\r\n }\r\n }, [holders]);\r\n\r\n const toggleModalHolder = () =>\r\n setModalHolder((m) => ({\r\n open: !m.open,\r\n saving: false,\r\n }));\r\n\r\n const toggleModalError = (e, message) =>\r\n setModalError({\r\n open: !modalError.open,\r\n message,\r\n });\r\n\r\n const handleDeleteHolder = (holderId) => {\r\n let canDelete = true;\r\n const allHolders = [...holders];\r\n\r\n // allHolders.forEach((holder) => {\r\n // if (\r\n // !account.AccountIsPhysical &&\r\n // holder.AccountHolderId === holderId &&\r\n // holder.AccountHolderRelationshipJuridical == \"Holder\"\r\n // ) {\r\n // canDelete = false;\r\n // }\r\n // });\r\n\r\n if (canDelete) {\r\n const postAccount = {\r\n AccountId: accountId,\r\n AccountOnboardingId: accountId,\r\n Holder: [\r\n {\r\n PersonId: holderId,\r\n deleteHolder: true,\r\n },\r\n ],\r\n };\r\n const body = {\r\n account: postAccount,\r\n accountChangeType: getAccountType.Holders,\r\n };\r\n setModalConfirm((m) => ({\r\n ...m,\r\n loading: true,\r\n }));\r\n if (mode !== AccountMode.New) {\r\n services.fetchAccountUpdate(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n let index = -1;\r\n allHolders.forEach((holder, i) => {\r\n if (parseInt(holderId, 10) === parseInt(holder.AccountHolderId, 10)) {\r\n index = i;\r\n }\r\n });\r\n if (index > -1) {\r\n allHolders.splice(index, 1);\r\n collapsedHolder.splice(index, 1);\r\n }\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n holderId: undefined,\r\n callback: undefined,\r\n loading: false,\r\n });\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n AccountInfoHolder: allHolders,\r\n },\r\n true\r\n );\r\n } else {\r\n setModalConfirm((m) => ({\r\n ...m,\r\n loading: false,\r\n }));\r\n }\r\n });\r\n } else {\r\n services.fetchNewAccount(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n let index = -1;\r\n allHolders.forEach((holder, i) => {\r\n if (parseInt(holderId, 10) === parseInt(holder.AccountHolderId, 10)) {\r\n index = i;\r\n }\r\n });\r\n if (index > -1) {\r\n allHolders.splice(index, 1);\r\n collapsedHolder.splice(index, 1);\r\n }\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n holderId: undefined,\r\n callback: undefined,\r\n loading: false,\r\n });\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n AccountInfoHolder: allHolders,\r\n },\r\n true\r\n );\r\n } else {\r\n setModalConfirm((m) => ({\r\n ...m,\r\n loading: false,\r\n }));\r\n }\r\n });\r\n }\r\n } else {\r\n toggleModalError({}, \"Error. The Main Holder can not be deleted.\");\r\n }\r\n };\r\n\r\n // useEffect(() => {\r\n // if (mode === AccountMode.New){\r\n // if (holders && holders.length < 1) {\r\n // const body = {\r\n // AccountGetInfo: {\r\n // GetAccountDataId: accountId,\r\n // GetAccountDataOnboardingId: accountId,\r\n // GetAccountDataType: getAccountType.Holders,\r\n // },\r\n // };\r\n // services.fetchNewAccountInfo(body, (data) => {\r\n // if (data && data.SDTAccount) {\r\n // setAccountData({\r\n // AccountId: accountId,\r\n // AccountArchives: data.SDTAccount.AccountInfoHolder,\r\n // }, false);\r\n // }\r\n // });\r\n // }\r\n\r\n // }\r\n // }, []);\r\n\r\n const handleRemoveHolder = (holderId) =>\r\n setModalConfirm((m) => ({\r\n ...m,\r\n open: true,\r\n title: \"Are you sure you want to remove the selected Holder?\",\r\n holderId,\r\n callback: () => handleDeleteHolder(holderId),\r\n }));\r\n\r\n const toggleModalConfirm = () =>\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n holderId: undefined,\r\n callback: undefined,\r\n loading: false,\r\n });\r\n\r\n const revert = () => setChangedHolder({});\r\n\r\n const handleSave = (newHolders) => {\r\n let hasMainHolder = false;\r\n let addHolder = true;\r\n let errorMessage = \"Error. The account already has a Main Holder.\";\r\n\r\n const allHolders = [...holders];\r\n allHolders.forEach((holder) => {\r\n if (\r\n holder.IsMainHolder ||\r\n (holder.HoldersRelationship == \"Holder\" && holder.HoldersRelationshipJuridical == \"Holder\")\r\n ) {\r\n hasMainHolder = true;\r\n }\r\n });\r\n\r\n let oldMainHolderRemoved = false;\r\n let newMainHolderAdded = false;\r\n const newAccountHolders = Object.keys(newHolders).map((key) => newHolders[key]);\r\n newAccountHolders.forEach((newHolder) => {\r\n const existHolder = holders.find(\r\n (currentHolder) => currentHolder.AccountHolderId == newHolder.AccountHolderId\r\n );\r\n\r\n if (existHolder != null) {\r\n if (existHolder.IsMainHolder && !newHolder.isMainHolder) {\r\n // saco el main holder\r\n oldMainHolderRemoved = true;\r\n }\r\n }\r\n\r\n if (newHolder.isMainHolder) {\r\n // Es main\r\n newMainHolderAdded = true;\r\n }\r\n\r\n const isValidEdit = existHolder != null && existHolder.IsMainHolder == newHolder.isMainHolder;\r\n\r\n if (\r\n !account.AccountIsPhysical &&\r\n hasMainHolder &&\r\n newHolder.HoldersRelationshipJuridical == \"Holder\" &&\r\n !isValidEdit\r\n ) {\r\n addHolder = false;\r\n } else {\r\n if (\r\n !isValidEdit &&\r\n account.AccountInfoHolder.find(\r\n (accountHolders) =>\r\n accountHolders.AccountHolderId === newHolder.AccountHolderId &&\r\n accountHolders.AccountHolderRelationshipJuridical == \"Holder\"\r\n )\r\n ) {\r\n addHolder = false;\r\n errorMessage = \"Error. The account needs to have a Main Holder.\";\r\n }\r\n }\r\n });\r\n\r\n if (oldMainHolderRemoved && !newMainHolderAdded) {\r\n const response = window.confirm(\r\n \"There is no Main Holder in the Account.\\nThis will change the Account type to juridical.\\nAre you sure to proceed?\"\r\n );\r\n if (!response) {\r\n return;\r\n }\r\n }\r\n\r\n if (addHolder) {\r\n if (!account.AccountIsPhysical) {\r\n const mainHolderRef = newAccountHolders[0];\r\n mainHolderRef.isMainHolder = mainHolderRef.HoldersRelationshipJuridical == \"Holder\";\r\n }\r\n\r\n const postAccount = {\r\n AccountId: accountId,\r\n AccountOnboardingId: accountId,\r\n AccountIsPhysical: account.AccountIsPhysical,\r\n Holder: newAccountHolders,\r\n };\r\n const body = {\r\n account: postAccount,\r\n accountChangeType: getAccountType.Holders,\r\n };\r\n setLoadingSave(true);\r\n if (mode !== AccountMode.New) {\r\n services.fetchAccountUpdate(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n Object.keys(newHolders).forEach((key) => {\r\n let index = -1;\r\n const newHolder = {\r\n AccountHolderId: newHolders[key].PersonId,\r\n AccountHolderName: newHolders[key].PersonName,\r\n AccountHolderPersonType: newHolders[key].PersonType,\r\n AccountHolderRelationship: newHolders[key].HoldersRelationship,\r\n AccountHolderRelationshipDescription: newHolders[key].HoldersRelationshipDescription,\r\n AccountHolderRelationshipJuridical: newHolders[key].HoldersRelationshipJuridical,\r\n AccountHolderIsController: newHolders[key].HoldersIsController,\r\n AccountHolderIsManager: newHolders[key].HoldersIsManager,\r\n IsMainHolder: newHolders[key].isMainHolder,\r\n HoldersOrderWeb: newHolders[key].HoldersOrderWeb,\r\n HoldersOrderManaged: newHolders[key].HoldersOrderManaged,\r\n HoldersOrderWritten: newHolders[key].HoldersOrderWritten,\r\n HoldersOrderViaLink: newHolders[key].HoldersOrderViaLink,\r\n AccountHolderIsBeneficiary: newHolders[key].AccountHolderIsBeneficiary,\r\n AccountHolderEmail: response.newHolderInfo.AccountHolderEmail,\r\n AccountHolderAddress: response.newHolderInfo.AccountHolderAddress,\r\n AccountHolderCountryId: response.newHolderInfo.AccountHolderCountryId,\r\n AccountHolderCountryName: response.newHolderInfo.AccountHolderCountryName,\r\n AccountHolderByAdvisor: userType == \"Advisor\",\r\n };\r\n allHolders.forEach((holder, i) => {\r\n if (parseInt(newHolder.AccountHolderId, 10) === parseInt(holder.AccountHolderId, 10)) {\r\n index = i;\r\n }\r\n });\r\n if (index > -1) {\r\n allHolders[index] = {\r\n ...allHolders[index],\r\n ...newHolder,\r\n };\r\n collapsedHolder[index].canEdit = false;\r\n } else {\r\n holders.push(newHolder);\r\n collapsedHolder.push({ open: false, canEdit: false });\r\n }\r\n });\r\n setLoadingSave(false);\r\n setChangedHolder({});\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n AccountInfoHolder: allHolders,\r\n },\r\n true\r\n );\r\n } else {\r\n setLoadingSave(false);\r\n }\r\n });\r\n } else {\r\n services.fetchNewAccount(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n Object.keys(newHolders).forEach((key) => {\r\n let index = -1;\r\n const newHolder = {\r\n AccountHolderId: newHolders[key].PersonId,\r\n AccountHolderName: newHolders[key].PersonName,\r\n AccountHolderPersonType: newHolders[key].PersonType,\r\n AccountHolderStatus: newHolders[key].PersonStatus,\r\n AccountHolderRelationship: newHolders[key].HoldersRelationship,\r\n AccountHolderRelationshipJuridical: newHolders[key].HoldersRelationshipJuridical,\r\n AccountHolderRelationshipDescription: newHolders[key].HoldersRelationshipDescription,\r\n AccountHolderIsController: newHolders[key].HoldersIsController,\r\n AccountHolderIsManager: newHolders[key].HoldersIsManager,\r\n IsMainHolder: newHolders[key].isMainHolder,\r\n HoldersOrderWeb: newHolders[key].HoldersOrderWeb,\r\n HoldersOrderManaged: newHolders[key].HoldersOrderManaged,\r\n HoldersOrderWritten: newHolders[key].HoldersOrderWritten,\r\n HoldersOrderViaLink: newHolders[key].HoldersOrderViaLink,\r\n AccountHolderIsBeneficiary: newHolders[key].AccountHolderIsBeneficiary,\r\n AccountHolderEmail: response.newHolderInfo.AccountHolderEmail,\r\n AccountHolderAddress: response.newHolderInfo.AccountHolderAddress,\r\n AccountHolderCountryId: response.newHolderInfo.AccountHolderCountryId,\r\n AccountHolderCountryName: response.newHolderInfo.AccountHolderCountryName,\r\n AccountHolderByAdvisor: userType == \"Advisor\",\r\n AccountHolderTel: response.newHolderInfo.AccountHolderTel,\r\n AccountHolderDocumentTypeName: response.newHolderInfo.AccountHolderDocumentTypeName,\r\n AccountHolderDocumentNumber: response.newHolderInfo.AccountHolderDocumentNumber,\r\n };\r\n allHolders.forEach((holder, i) => {\r\n if (parseInt(newHolder.AccountHolderId, 10) === parseInt(holder.AccountHolderId, 10)) {\r\n index = i;\r\n }\r\n });\r\n if (index > -1) {\r\n allHolders[index] = {\r\n ...allHolders[index],\r\n ...newHolder,\r\n };\r\n collapsedHolder[index].canEdit = false;\r\n } else {\r\n holders.push(newHolder);\r\n allHolders.push(newHolder);\r\n collapsedHolder.push({ open: false, canEdit: false });\r\n }\r\n });\r\n setLoadingSave(false);\r\n setChangedHolder({});\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n AccountInfoHolder: allHolders,\r\n },\r\n true\r\n );\r\n } else {\r\n setLoadingSave(false);\r\n }\r\n });\r\n }\r\n } else {\r\n toggleModalError({}, errorMessage);\r\n }\r\n };\r\n\r\n const toggleHolder = (index, toggle) => {\r\n const newCollapsedHolder = [...collapsedHolder];\r\n if (toggle) {\r\n for (let i = 0; i < newCollapsedHolder.length; i += 1) {\r\n if (i === index) {\r\n newCollapsedHolder[i] = {\r\n open: !newCollapsedHolder[i].open,\r\n canEdit: false,\r\n };\r\n } else {\r\n newCollapsedHolder[i] = {\r\n open: false,\r\n canEdit: false,\r\n };\r\n }\r\n }\r\n } else {\r\n newCollapsedHolder[index].canEdit = !newCollapsedHolder[index].canEdit;\r\n }\r\n setCollapsedHolder(newCollapsedHolder);\r\n };\r\n\r\n const onChange = (index, name, value) => {\r\n const newChangedHolder = { ...changedHolder };\r\n if (!newChangedHolder[holders[index].AccountHolderId]) {\r\n newChangedHolder[holders[index].AccountHolderId] = {\r\n HoldersRelationshipDescription: holders[index].AccountHolderRelationshipDescription,\r\n PersonId: holders[index].AccountHolderId,\r\n PersonName: holders[index].AccountHolderName,\r\n PersonType: holders[index].AccountHolderPersonType,\r\n PersonStatus: holders[index].AccountHolderStatus,\r\n AccountHolderId: holders[index].AccountHolderId,\r\n HoldersRelationship: holders[index].AccountHolderRelationship,\r\n HoldersRelationshipJuridical: holders[index].AccountHolderRelationshipJuridical,\r\n HoldersIsController: holders[index].AccountHolderIsController,\r\n HoldersIsManager: holders[index].AccountHolderIsManager,\r\n isMainHolder: holders[index].IsMainHolder,\r\n deleteHolder: false,\r\n HoldersOrderWeb: holders[index].HoldersOrderWeb,\r\n HoldersOrderWritten: holders[index].HoldersOrderWritten,\r\n HoldersOrderManaged: holders[index].HoldersOrderManaged,\r\n HoldersOrderViaLink: holders[index].HoldersOrderViaLink,\r\n [name]: value,\r\n };\r\n } else {\r\n newChangedHolder[holders[index].AccountHolderId][name] = value;\r\n }\r\n if (name === \"HoldersOrderManaged\" && value) {\r\n newChangedHolder[holders[index].AccountHolderId].HoldersOrderViaLink = false;\r\n newChangedHolder[holders[index].AccountHolderId].HoldersOrderWeb = false;\r\n newChangedHolder[holders[index].AccountHolderId].HoldersOrderWritten = false;\r\n }\r\n if (name === \"HoldersOrderWritten\" && value) {\r\n newChangedHolder[holders[index].AccountHolderId].HoldersOrderManaged = false;\r\n }\r\n if (name === \"HoldersRelationshipJuridical\" && value) {\r\n if (value === \"Holder\") {\r\n newChangedHolder[holders[index].AccountHolderId].isMainHolder = true;\r\n } else {\r\n newChangedHolder[holders[index].AccountHolderId].isMainHolder = false;\r\n }\r\n }\r\n setChangedHolder(() => newChangedHolder);\r\n };\r\n\r\n if (!holders || collapsedHolder.length !== holders.length) {\r\n return ;\r\n }\r\n\r\n let existsMainHolder = false;\r\n holders.forEach((h) => {\r\n const isMainHolder = changedHolder[h.AccountHolderId]\r\n ? changedHolder[h.AccountHolderId].isMainHolder\r\n : h.IsMainHolder;\r\n existsMainHolder = existsMainHolder || isMainHolder;\r\n });\r\n\r\n return (\r\n
    \r\n \r\n (holder.AccountHolderRelationship == \"Holder\" ||\r\n holder.AccountHolderRelationship == \"Attorney\" ||\r\n holder.AccountHolderRelationship == \"Authorized\" ||\r\n holder.AccountHolderRelationship == \"Other\" ||\r\n holder.AccountHolderRelationship == \"WebAuthorized\") &&\r\n !holder.AccountHolderByAdvisor &&\r\n !holder.AccountHolderIsBeneficiary\r\n )\r\n : holders.filter(\r\n (holder) =>\r\n holder.AccountHolderRelationshipJuridical == \"Holder\" ||\r\n holder.AccountHolderRelationshipJuridical == \"Attorney\" ||\r\n holder.AccountHolderRelationshipJuridical == \"Representative\" ||\r\n holder.AccountHolderRelationshipJuridical == \"WebAuthorized\" ||\r\n holder.AccountHolderRelationshipJuridical == \"None\" ||\r\n holder.AccountHolderIsController === true ||\r\n holder.AccountHolderIsManager === true\r\n )\r\n : holders\r\n }\r\n changedHolder={changedHolder}\r\n collapsedHolder={collapsedHolder}\r\n onChange={onChange}\r\n toggleHolder={toggleHolder}\r\n disabledFields={disabledFields}\r\n account={account}\r\n existsMainHolder={existsMainHolder}\r\n handleDeleteHolder={handleRemoveHolder}\r\n isReadOnly={isReadOnly}\r\n role={\"Holder\"}\r\n mode={mode}\r\n Link={Link}\r\n />\r\n {!isReadOnly && (\r\n \r\n Add New Holder\r\n \r\n )}\r\n {!isReadOnly && (\r\n \r\n )}\r\n {!isReadOnly && (\r\n handleSave(changedHolder)}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Save\r\n \r\n )}\r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nHoldersTab.propTypes = {\r\n holders: PropTypes.array.isRequired,\r\n accountId: PropTypes.any.isRequired,\r\n account: PropTypes.object.isRequired,\r\n setAccountData: PropTypes.func.isRequired,\r\n services: PropTypes.object.isRequired,\r\n userType: PropTypes.string.isRequired,\r\n};\r\n\r\nexport default HoldersTab;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Table, UncontrolledDropdown, DropdownToggle, DropdownItem, DropdownMenu, Button } from \"reactstrap\";\r\nimport PropTypes, { shape } from \"prop-types\";\r\n\r\nimport style from \"../../Grid.module.scss\";\r\nimport { getAccountType } from \"../types\";\r\nimport ModalConfirm from \"../../Modal/ModalConfirm\";\r\nimport ModalInstruction from \"../../Modal/ModalInstruction\";\r\nimport { CircularProgress } from \"../../../..\";\r\nimport { showToast } from \"../../../../utils/Helper\";\r\n\r\nfunction generateEmptyInstruction() {\r\n return {\r\n AccountInstructionType: \"\",\r\n AccountInstructionsCurrency: \"\",\r\n AccountInstructionAssetid: \"\",\r\n AccountInstructionTarget: \"\",\r\n AccountInstructionBankAccountItemId: \"\",\r\n AccountInstructionMin: \"\",\r\n AccountInstructionMax: \"\",\r\n };\r\n}\r\n\r\nconst InstructionsTab = ({\r\n accountId,\r\n accountOnb,\r\n instructions,\r\n setAccountData,\r\n services,\r\n currencies,\r\n isOnboarding,\r\n userType,\r\n}) => {\r\n const [fetching, setFetching] = useState(false);\r\n const [bankAccounts, setBankAccounts] = useState([]);\r\n const [editMode, setEditMode] = useState(false);\r\n\r\n const [modalInstruction, setModalInstruction] = useState({\r\n index: -1,\r\n open: false,\r\n saving: false,\r\n instruction: generateEmptyInstruction(),\r\n });\r\n\r\n const onChangeEdit = (name, value, strValue,strValue2) => {\r\n if (name == \"AccountInstructionAssetId\" && value) {\r\n if (strValue != modalInstruction.instruction.AccountInstructionCurrencyISO) {\r\n showToast(\"Currency must be equal to the asset currency\", true);\r\n return;\r\n } else {\r\n let instructionUpd = { ...modalInstruction.instruction, [name]: value};\r\n if (strValue2 && name == \"AccountInstructionAssetId\") {\r\n instructionUpd = { ...instructionUpd, AccountInstructionAssetticker: strValue2 };\r\n }\r\n setModalInstruction({\r\n ...modalInstruction,\r\n instruction: instructionUpd,\r\n });\r\n }\r\n } else {\r\n let instructionUpd = { ...modalInstruction.instruction, [name]: value };\r\n if (name === \"AccountInstructionsCurrency\") {\r\n instructionUpd = { ...instructionUpd, AccountInstructionCurrencyISO: strValue };\r\n }\r\n setModalInstruction({\r\n ...modalInstruction,\r\n instruction: instructionUpd,\r\n });\r\n }\r\n };\r\n\r\n const toggleModalInstructions = (instruction, index) => {\r\n setModalInstruction({\r\n index: index,\r\n saving: modalInstruction.saving,\r\n open: !modalInstruction.open,\r\n instruction: instruction ? instruction : generateEmptyInstruction(),\r\n });\r\n };\r\n\r\n const handleEdit = (index) => {\r\n setEditMode(true);\r\n toggleModalInstructions(instructions[index], index);\r\n };\r\n\r\n const handleAdd = () => {\r\n setEditMode(false);\r\n toggleModalInstructions();\r\n };\r\n\r\n const handleDelete = (index) => {\r\n const id = instructions[index].RelatedAccountId;\r\n const name = instructions[index].RelatedAccountName;\r\n\r\n let instructionToDelete = instructions[index];\r\n const account = {\r\n AccountId: accountId,\r\n Instructions: [\r\n {\r\n ...instructionToDelete,\r\n DeleteInstruction: true,\r\n },\r\n ],\r\n };\r\n const body = {\r\n account,\r\n accountChangeType: getAccountType.Instructions,\r\n };\r\n\r\n setModalInstruction({ ...modalInstruction, saving: true });\r\n if (!isOnboarding) {\r\n services.updateAccountInstructon(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n if (userType != \"Advisor\") {\r\n let updatedInstructions = instructions.filter((_, i) => i !== index);\r\n account.Instructions = updatedInstructions;\r\n showToast(\"Changes saved successfully.\");\r\n setAccountData(account, false);\r\n } else {\r\n showToast(\"Changes were sent for approval.\");\r\n }\r\n setModalInstruction({\r\n saving: false,\r\n open: false,\r\n instruction: generateEmptyInstruction(),\r\n });\r\n } else {\r\n setModalInstruction({\r\n ...modalInstruction,\r\n saving: false,\r\n });\r\n }\r\n });\r\n } else {\r\n let updatedInstructions = instructions.filter((_, i) => i !== index);\r\n let accountOnboarding = {\r\n ...accountOnb,\r\n Instructions: updatedInstructions,\r\n };\r\n\r\n services.fetchNewAccount(\r\n { account: accountOnboarding, accountChangeType: \"Instructions\" },\r\n (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setAccountData(accountOnboarding, true);\r\n setModalInstruction({\r\n saving: false,\r\n open: false,\r\n instruction: generateEmptyInstruction(),\r\n });\r\n showToast(\"Instruction deleted successfully\");\r\n }\r\n }\r\n );\r\n }\r\n };\r\n\r\n const handleSaveInstruction = () => {\r\n //check if the instruction already exists\r\n let exists = false;\r\n let index = 0;\r\n if (instructions) {\r\n instructions.forEach((ins) => {\r\n if (\r\n modalInstruction.instruction.AccountInstructionsCurrency === ins.AccountInstructionsCurrency &&\r\n modalInstruction.instruction.AccountInstructionType === ins.AccountInstructionType\r\n ) {\r\n if (modalInstruction.index !== index) {\r\n showToast(\"Instruction with this type and currency already exists\", true);\r\n exists = true;\r\n return;\r\n }\r\n }\r\n index++;\r\n });\r\n }\r\n\r\n if (\r\n !modalInstruction.instruction.AccountInstructionAssetId &&\r\n modalInstruction.instruction.AccountInstructionTarget == \"Reinvest\"\r\n ) {\r\n showToast(\"An asset with the same currency is required to create the instruction.\", true);\r\n return;\r\n }\r\n\r\n if (exists) {\r\n return;\r\n }\r\n\r\n const newInstruction = { ...modalInstruction.instruction };\r\n const account = {\r\n AccountId: accountId,\r\n Instructions: [\r\n {\r\n ...newInstruction,\r\n DeleteInstruction: false,\r\n },\r\n ],\r\n };\r\n let body = {\r\n account,\r\n accountChangeType: getAccountType.Instructions,\r\n };\r\n\r\n setModalInstruction({ ...modalInstruction, saving: true });\r\n\r\n if (!isOnboarding) {\r\n services.updateAccountInstructon(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n if (userType != \"Advisor\") {\r\n if (editMode) {\r\n let updatedInstructions = instructions.map((ins, i) => {\r\n if (i === modalInstruction.index) {\r\n return newInstruction;\r\n }\r\n return ins;\r\n });\r\n account.Instructions = updatedInstructions;\r\n } else {\r\n account.Instructions = [...(instructions || []), newInstruction];\r\n }\r\n showToast(\"Changes saved successfully.\");\r\n setAccountData(account, false);\r\n setModalInstruction({\r\n saving: false,\r\n open: false,\r\n instruction: generateEmptyInstruction(),\r\n });\r\n } else {\r\n showToast(\"Changes were sent for approval.\");\r\n setModalInstruction({\r\n ...modalInstruction,\r\n saving: false,\r\n open: false,\r\n instruction: generateEmptyInstruction(),\r\n });\r\n }\r\n } else {\r\n setModalInstruction({\r\n ...modalInstruction,\r\n saving: false,\r\n });\r\n }\r\n });\r\n } else {\r\n let updatedInstructions = [];\r\n if (editMode) {\r\n updatedInstructions = instructions.map((ins, i) => {\r\n if (i === modalInstruction.index) {\r\n return newInstruction;\r\n }\r\n return ins;\r\n });\r\n } else {\r\n updatedInstructions = [...(instructions || []), newInstruction];\r\n }\r\n let accountOnboarding = {\r\n ...accountOnb,\r\n Instructions: updatedInstructions,\r\n };\r\n\r\n services.fetchNewAccount(\r\n { account: accountOnboarding, accountChangeType: \"Instructions\" },\r\n (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setAccountData(accountOnboarding, true);\r\n setModalInstruction({\r\n saving: false,\r\n open: false,\r\n instruction: generateEmptyInstruction(),\r\n });\r\n showToast(\"Changes saved successfully.\");\r\n }\r\n }\r\n );\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (!isOnboarding) {\r\n const body = {\r\n AccountGetInfo: {\r\n GetAccountDataId: accountId,\r\n GetAccountDataType: getAccountType.BankAccounts,\r\n },\r\n };\r\n services.fetchAccountSectorInfo(body, (response) => {\r\n if (response && response.SDTAccount) {\r\n setBankAccounts(response.SDTAccount.BankAccounts);\r\n }\r\n });\r\n } else {\r\n const body = {\r\n onboardingProcessId: accountId,\r\n };\r\n services.fetchBankAccounts(body, (response) => {\r\n if (response && response.bankAccounts) {\r\n setBankAccounts(response.bankAccounts);\r\n }\r\n });\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!isOnboarding) {\r\n if (!instructions && !fetching) {\r\n const body = {\r\n AccountGetInfo: {\r\n GetAccountDataId: accountId,\r\n GetAccountDataType: getAccountType.Instructions,\r\n },\r\n };\r\n services.fetchAccountSectorInfo(body, (response) => {\r\n if (response && response.SDTAccount) {\r\n if (response.SDTAccount.Instructions) {\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n Instructions: response.SDTAccount.Instructions,\r\n },\r\n false\r\n );\r\n }\r\n }\r\n setFetching(false);\r\n });\r\n setFetching(true);\r\n }\r\n } else {\r\n services.fetchNewAccountInfo(\r\n { AccountGetInfo: { GetAccountDataOnboardingId: accountId, GetAccountDataType: \"Instructions\" } },\r\n (response) => {\r\n if (response && response.SDTAccount) {\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n Instructions: response.SDTAccount.Instructions,\r\n },\r\n false\r\n );\r\n }\r\n setFetching(false);\r\n }\r\n );\r\n }\r\n }, [setAccountData]);\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {fetching ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n {instructions && instructions.length > 0 ? (\r\n instructions.map((ins, i) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))\r\n ) : (\r\n \r\n \r\n \r\n )}\r\n \r\n )}\r\n \r\n
    TypeCurrencyTarget
    \r\n \r\n
    \r\n \r\n handleEdit(i)}>{ins.AccountInstructionType} handleEdit(i)}>{ins.AccountInstructionCurrencyISO} handleEdit(i)}>{ins.AccountInstructionTarget}
    \r\n No Result.\r\n
    \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nInstructionsTab.propTypes = {\r\n accountId: PropTypes.string.isRequired,\r\n instructions: PropTypes.array.isRequired,\r\n setAccountData: PropTypes.func.isRequired,\r\n services: PropTypes.object.isRequired,\r\n currencies: PropTypes.array,\r\n};\r\n\r\nInstructionsTab.defaultProps = {\r\n currencies: undefined,\r\n};\r\n\r\nfunction RenderDropdownActions({ onEdit, onDelete, index }) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n onEdit(index)}>\r\n \r\n Edit\r\n \r\n onDelete(index)}>\r\n \r\n Delete\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nRenderDropdownActions.propTypes = {\r\n onEdit: PropTypes.func.isRequired,\r\n onDelete: PropTypes.func.isRequired,\r\n index: PropTypes.number.isRequired,\r\n};\r\n\r\nexport default InstructionsTab;\r\n","import React, { useState, useEffect } from 'react';\r\nimport {\r\n Form, FormGroup, Label, Input, Row, Col, Button,\r\n} from 'reactstrap';\r\nimport LaddaButton, { EXPAND_RIGHT } from 'react-ladda';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport {\r\n getAccountType, InvestExperienceE, InvestExperienceQ, InvestExperienceM,\r\n} from '../types';\r\nimport { CircularProgress } from '../../../..';\r\n\r\nconst InvestmentProfile = ({\r\n investment: investmentProfile,\r\n accountId,\r\n setAccountData,\r\n services,\r\n}) => {\r\n const [loadingSave, setLoadingSave] = useState(false);\r\n const [changedInvestExperience, setChangedInvestExperience] = useState([]);\r\n\r\n useEffect(() => {\r\n if (!investmentProfile) {\r\n const body = {\r\n AccountGetInfo: {\r\n GetAccountDataId: accountId,\r\n GetAccountDataType: getAccountType.InvestmentProfile,\r\n },\r\n };\r\n services.fetchAccountSectorInfo(body, (data) => {\r\n if (data && data.SDTAccount) {\r\n setAccountData({\r\n AccountId: accountId,\r\n InvestExperience: data.SDTAccount.InvestExperience,\r\n }, false);\r\n }\r\n });\r\n }\r\n }, [setAccountData, accountId, investmentProfile, services]);\r\n\r\n const handleSave = () => {\r\n const newInvestExperience = [];\r\n changedInvestExperience.forEach((inv) => {\r\n if (inv) newInvestExperience.push(inv);\r\n });\r\n const body = {\r\n account: {\r\n AccountId: accountId,\r\n InvestExperience: newInvestExperience,\r\n },\r\n accountChangeType: getAccountType.InvestmentProfile,\r\n };\r\n setLoadingSave(true);\r\n services.fetchAccountUpdate(body, ({ result }) => {\r\n if (result && result.Code === 200) {\r\n const investExperience = [...investmentProfile];\r\n let index = -1;\r\n newInvestExperience.forEach((item) => {\r\n investExperience.forEach((e, i) => {\r\n if (parseInt(e.InvestExperienceId, 10) === parseInt(item.InvestExperienceId, 10)) {\r\n index = i;\r\n }\r\n });\r\n if (index > -1) {\r\n investExperience[index] = item;\r\n index = -1;\r\n }\r\n });\r\n setAccountData({\r\n AccountId: accountId,\r\n InvestExperience: investExperience,\r\n }, true);\r\n setChangedInvestExperience([]);\r\n setLoadingSave(false);\r\n } else {\r\n setLoadingSave(false);\r\n }\r\n });\r\n };\r\n\r\n const revert = () => setChangedInvestExperience([]);\r\n\r\n const onChange = (index, id, name, value) => {\r\n if (!loadingSave) {\r\n const newChange = [...changedInvestExperience];\r\n if (investmentProfile[index][name] !== value) {\r\n newChange[id] = {\r\n ...investmentProfile[index],\r\n ...newChange[id],\r\n [name]: value,\r\n };\r\n } else if (newChange[id]) {\r\n newChange[id][name] = value;\r\n }\r\n setChangedInvestExperience(newChange);\r\n }\r\n };\r\n\r\n if (!investmentProfile) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n {investmentProfile.map((inv, i) => (\r\n \r\n ))}\r\n \r\n
    \r\n revert()}\r\n >\r\n \r\n {' '}\r\n Revert\r\n \r\n handleSave()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Save\r\n \r\n
    \r\n );\r\n};\r\n\r\nInvestmentProfile.propTypes = {\r\n accountId: PropTypes.string.isRequired,\r\n investment: PropTypes.array,\r\n setAccountData: PropTypes.func.isRequired,\r\n services: PropTypes.object.isRequired,\r\n};\r\n\r\nInvestmentProfile.defaultProps = {\r\n investment: undefined,\r\n};\r\n\r\nexport default InvestmentProfile;\r\n","import React, { useState, useEffect, useRef } from \"react\";\r\nimport { Form, FormGroup, Input, Button, Row, Col } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport { KYCConstants, getAccountType } from \"../types\";\r\nimport { CustomFormInput, SelectFormField } from \"../../../../utils/FormFields\";\r\nimport { CircularProgress } from \"../../../..\";\r\nimport { AccountMode, showToast } from \"../../../../utils/Helper\";\r\nimport { NumberFormatInput } from \"../../../NumberFormatInput/NumberFormatInput\";\r\n\r\nconst KYCTab = ({ KYC, accountId, account, setAccountData, isReadOnly, services, mode }) => {\r\n const [loadingSave, setLoadingSave] = useState(false);\r\n const [changedKYC, setChangedKYC] = useState({});\r\n const valueref = useRef();\r\n const valuerefnew = useRef();\r\n const accountref = useRef();\r\n\r\n useEffect(() => {\r\n if (!KYC) {\r\n const body = {\r\n AccountGetInfo: {\r\n GetAccountDataOnboardingId: account.AccountOnboardingId,\r\n GetAccountDataId: accountId,\r\n GetAccountDataType: getAccountType.KYC,\r\n },\r\n };\r\n if (mode === AccountMode.New) {\r\n services.fetchNewAccountInfo(body, (data) => {\r\n if (data && data.SDTAccount) {\r\n setAccountData({ AccountId: account.AccountOnboardingId, KYC: data.SDTAccount.KYC }, true);\r\n }\r\n });\r\n } else {\r\n services.fetchAccountSectorInfo(body, (data) => {\r\n if (data && data.SDTAccount) {\r\n setAccountData({ AccountId: accountId, KYC: data.SDTAccount.KYC }, false);\r\n }\r\n });\r\n }\r\n }\r\n }, [setAccountData, KYC, accountId, services]);\r\n\r\n const handleSave = () => {\r\n const changedKYCcurrent = valuerefnew.current;\r\n const newKYC = { ...valueref.current };\r\n Object.keys(changedKYCcurrent).forEach((key) => {\r\n newKYC[key] = changedKYCcurrent[key];\r\n });\r\n const body = {\r\n account: {\r\n AccountId: accountId,\r\n AccountOnboardingId: accountId,\r\n KYC: newKYC,\r\n },\r\n accountChangeType: getAccountType.KYC,\r\n };\r\n setLoadingSave(true);\r\n if (mode === AccountMode.New) {\r\n services.fetchNewAccount(body, (res) => {\r\n if (res) {\r\n setAccountData(\r\n {\r\n AccountId: account.AccountOnboardingId,\r\n KYC: newKYC,\r\n },\r\n true\r\n );\r\n setChangedKYC({});\r\n setLoadingSave(false);\r\n showToast(\"Changes saved successfully\");\r\n } else {\r\n setLoadingSave(false);\r\n }\r\n });\r\n } else {\r\n services.fetchAccountUpdate(body, ({ result }) => {\r\n if (result && result.Code === 200) {\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n KYC: newKYC,\r\n },\r\n true\r\n );\r\n setChangedKYC({});\r\n setLoadingSave(false);\r\n } else {\r\n setLoadingSave(false);\r\n }\r\n });\r\n }\r\n };\r\n\r\n const onChange = (name, value) => {\r\n if (!loadingSave) {\r\n const newKYC = { ...changedKYC };\r\n const KYCupd = { ...KYC, ...changedKYC };\r\n if (KYC[name] !== value) {\r\n newKYC[name] = value;\r\n } else if (newKYC[name]) {\r\n newKYC[name] = undefined;\r\n }\r\n setChangedKYC(newKYC);\r\n setAccountData({\r\n KYC: KYCupd,\r\n });\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n return () => {\r\n if (mode === AccountMode.New) {\r\n handleSave();\r\n }\r\n };\r\n }, []);\r\n\r\n useEffect(() => {\r\n valuerefnew.current = changedKYC;\r\n }, [changedKYC]);\r\n\r\n useEffect(() => {\r\n valueref.current = KYC;\r\n }, [KYC]);\r\n\r\n useEffect(() => {\r\n accountref.current = account;\r\n }, [account]);\r\n\r\n const revert = () => setChangedKYC({});\r\n\r\n if (!KYC) {\r\n return ;\r\n }\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n \r\n KYCConstants.StockMarketKnowledge[i]}\r\n getSelectItemName={(i) => KYCConstants.StockMarketKnowledge[i]}\r\n disabled={isReadOnly}\r\n />\r\n \r\n \r\n i}\r\n getSelectItemName={(i) => (i ? \"Yes\" : \"No\")}\r\n disabled={isReadOnly}\r\n />\r\n \r\n \r\n i}\r\n getSelectItemName={(i) => (i ? \"Yes\" : \"No\")}\r\n disabled={isReadOnly}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n onChange(\"AccountInvestFunds\", e.target.value)}\r\n disabled={isReadOnly}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange(\"AccountInvestOthers\", e.target.value)}\r\n disabled={isReadOnly}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange(\"AccountKYCCustomerLink\", e.target.value)}\r\n disabled={isReadOnly}\r\n >\r\n {Object.keys(KYCConstants.CustomerLink).map((key) => (\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange(\"AccountKYCCustomerLinkSpecify\", e.target.value)}\r\n disabled={isReadOnly}\r\n />\r\n \r\n \r\n \r\n \r\n onChange(\"AccountKYCCustomerRelatedSince\", e.target.value)}\r\n disabled={isReadOnly}\r\n >\r\n {Object.keys(KYCConstants.CustomerRelatedSince).map((key) => (\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n onChange(\"AccountKYCCustomerProfessionName\", e.target.value)}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange(\"AccountKYCAnualIncome\", e.value)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n \r\n \r\n onChange(\"AccountKYCEstimatedAmount\", e.value)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n \r\n \r\n onChange(\"AccountKYCAmountDepositedStocks\", e.value)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange(\"AccountKYCAmountRetiredStocks\", e.value)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n \r\n \r\n onChange(\"AccountKYCQuantityDepositedStocks\", e.value)}\r\n dataTypeDecimalName=\"quantity\"\r\n />\r\n \r\n \r\n \r\n \r\n onChange(\"AccountKYCQuantityRetiredStocks\", e.value)}\r\n dataTypeDecimalName=\"quantity\"\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange(\"AccountKYCAmountMaximumCustody\", e.value)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n \r\n \r\n onChange(\"AccountKYCManualHighRisk\", e.target.value)}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n onChange(\"AccountKYCComments\", e.target.value)}\r\n />\r\n \r\n \r\n
    \r\n {mode !== AccountMode.New && !isReadOnly && (\r\n \r\n )}\r\n {!isReadOnly && (\r\n handleSave()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Save\r\n \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nKYCTab.propTypes = {\r\n accountId: PropTypes.string.isRequired,\r\n KYC: PropTypes.object,\r\n setAccountData: PropTypes.func.isRequired,\r\n services: PropTypes.object.isRequired,\r\n account: PropTypes.object.isRequired,\r\n mode: PropTypes.object.isRequired,\r\n};\r\n\r\nKYCTab.defaultProps = {\r\n KYC: undefined,\r\n};\r\n\r\nexport default KYCTab;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { ListGroup, ListGroupItem, Row, Button } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport { getAccountType } from \"../types\";\r\nimport ModalConfirm from \"../../Modal/ModalConfirm\";\r\nimport ModalPersonalReference from \"../../Modal/ModalPersonalReference\";\r\nimport { CircularProgress } from \"../../../..\";\r\nimport { AccountMode } from \"../../../../utils/Helper\";\r\n\r\nconst PersonalReferencesTab = ({\r\n accountId,\r\n references,\r\n isReadOnly,\r\n setAccountData,\r\n services,\r\n mode,\r\n groups,\r\n bankAccounts,\r\n signatureSets,\r\n}) => {\r\n const [fetching, setFetching] = useState(false);\r\n const [modalConfirm, setModalConfirm] = useState({\r\n open: false,\r\n title: \"\",\r\n referenceId: undefined,\r\n saving: false,\r\n });\r\n const [modalPersonalReference, setModalPersonalReference] = useState({\r\n open: false,\r\n saving: false,\r\n });\r\n\r\n const toggleModalConfirm = () => {\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n referenceId: undefined,\r\n saving: false,\r\n });\r\n };\r\n\r\n const toggleModalReference = () => {\r\n setModalPersonalReference({\r\n ...modalPersonalReference,\r\n open: !modalPersonalReference.open,\r\n });\r\n };\r\n\r\n const handleDeleteReference = (id) => {\r\n setModalConfirm({\r\n open: true,\r\n title: \"Are you sure you want to delete the selected Personal Reference?\",\r\n referenceId: id,\r\n saving: false,\r\n });\r\n };\r\n\r\n const handleAddReference = (reference) => {\r\n const newReference = reference;\r\n const account = {\r\n AccountId: accountId,\r\n AccountOnboardingId: accountId,\r\n PersonalReferences: [newReference],\r\n };\r\n const body = {\r\n account,\r\n accountChangeType: getAccountType.References,\r\n };\r\n setModalPersonalReference({ ...modalPersonalReference, saving: true });\r\n if (mode === AccountMode.New) {\r\n services.fetchNewAccount(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newReferences = references;\r\n newReference.AccountPersonalReferenceId = response.Id;\r\n newReferences.push(newReference);\r\n account.PersonalReferences = newReferences;\r\n setAccountData(account, true);\r\n setModalPersonalReference({\r\n saving: false,\r\n open: false,\r\n });\r\n } else {\r\n setModalPersonalReference({\r\n ...modalPersonalReference,\r\n saving: false,\r\n });\r\n }\r\n });\r\n } else {\r\n services.fetchAccountUpdate(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newReferences = references;\r\n newReference.AccountPersonalReferenceId = response.Id;\r\n newReferences.push(newReference);\r\n account.PersonalReferences = newReferences;\r\n setAccountData(account, true);\r\n setModalPersonalReference({\r\n saving: false,\r\n open: false,\r\n });\r\n } else {\r\n setModalPersonalReference({\r\n ...modalPersonalReference,\r\n saving: false,\r\n });\r\n }\r\n });\r\n }\r\n };\r\n\r\n const deletePersonalReference = () => {\r\n const deleteReferenceId = modalConfirm.referenceId;\r\n const account = {\r\n AccountId: accountId,\r\n AccountOnboardingId: accountId,\r\n PersonalReferences: [\r\n {\r\n AccountPersonalReferenceId: deleteReferenceId,\r\n },\r\n ],\r\n };\r\n const body = {\r\n account,\r\n accountChangeType: getAccountType.References,\r\n };\r\n setModalConfirm({ ...modalConfirm, open: true, saving: true });\r\n if (mode === AccountMode.New) {\r\n services.fetchNewAccount(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newReferences = references;\r\n let index = -1;\r\n newReferences.map((ref, i) => {\r\n if (deleteReferenceId === ref.AccountPersonalReferenceId) {\r\n index = i;\r\n }\r\n return {};\r\n });\r\n if (index > -1) {\r\n newReferences.splice(index, 1);\r\n }\r\n account.PersonalReferences = newReferences;\r\n setAccountData(account, true);\r\n toggleModalConfirm();\r\n } else {\r\n setModalConfirm({\r\n ...modalConfirm,\r\n saving: false,\r\n });\r\n }\r\n });\r\n } else {\r\n services.fetchAccountUpdate(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newReferences = references;\r\n let index = -1;\r\n newReferences.map((ref, i) => {\r\n if (deleteReferenceId === ref.AccountPersonalReferenceId) {\r\n index = i;\r\n }\r\n return {};\r\n });\r\n if (index > -1) {\r\n newReferences.splice(index, 1);\r\n }\r\n account.PersonalReferences = newReferences;\r\n setAccountData(account, true);\r\n toggleModalConfirm();\r\n } else {\r\n setModalConfirm({\r\n ...modalConfirm,\r\n saving: false,\r\n });\r\n }\r\n });\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n const body = {\r\n AccountGetInfo: {\r\n GetAccountDataId: accountId,\r\n GetAccountDataOnboardingId: accountId,\r\n GetAccountDataType: getAccountType.References,\r\n },\r\n };\r\n if (mode !== AccountMode.New) {\r\n if (!references && !fetching) {\r\n services.fetchAccountSectorInfo(body, (response) => {\r\n if (response && response.SDTAccount) {\r\n setAccountData(\r\n {\r\n BankAccounts: bankAccounts,\r\n SignatureSets: signatureSets,\r\n AccountId: accountId,\r\n PersonalReferences: response.SDTAccount.PersonalReferences,\r\n },\r\n false\r\n );\r\n }\r\n setFetching(false);\r\n });\r\n setFetching(true);\r\n }\r\n }\r\n }, [references, fetching, accountId, setAccountData, services]);\r\n\r\n useEffect(() => {\r\n const body = {\r\n AccountGetInfo: {\r\n GetAccountDataId: accountId,\r\n GetAccountDataOnboardingId: accountId,\r\n GetAccountDataType: getAccountType.References,\r\n },\r\n };\r\n if (mode === AccountMode.New && !fetching) {\r\n services.fetchNewAccountInfo(body, (data) => {\r\n if (data && data.SDTAccount) {\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n PersonalReferences: data.SDTAccount.PersonalReferences,\r\n Groups: groups,\r\n BankAccounts: bankAccounts,\r\n SignatureSets: signatureSets,\r\n },\r\n false\r\n );\r\n setFetching(false);\r\n }\r\n });\r\n setFetching(true);\r\n }\r\n }, []);\r\n\r\n return (\r\n
    \r\n {!fetching ? (\r\n \r\n {references &&\r\n references.map((personalReference) => (\r\n \r\n \r\n \r\n {\"Name: \"}\r\n {personalReference.AccountPersonalReferenceName}\r\n handleDeleteReference(personalReference.AccountPersonalReferenceId)}\r\n >\r\n \r\n
    \r\n \r\n \r\n {\"Phone: \"}\r\n {personalReference.AccountPersonalReferencePhone}\r\n \r\n \r\n \r\n ))}\r\n {!isReadOnly && (\r\n \r\n )}\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nPersonalReferencesTab.propTypes = {\r\n accountId: PropTypes.any.isRequired,\r\n references: PropTypes.array.isRequired,\r\n setAccountData: PropTypes.func.isRequired,\r\n services: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default PersonalReferencesTab;\r\n","import React, { useEffect, useState, useRef } from \"react\";\r\nimport { Button } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport { getAccountType, AccountWayOfAction } from \"../types\";\r\nimport ProfileForm from \"../ProfileForm\";\r\nimport { preCheckAccountForm } from \"../../preCheckForms\";\r\nimport { CircularProgress } from \"../../../..\";\r\nimport { AccountMode, showToast } from \"../../../../utils/Helper\";\r\n\r\nconst ProfileTab = ({\r\n account,\r\n userType,\r\n isReadOnly,\r\n currencies,\r\n riskTypes,\r\n setAccountData,\r\n companyLinks,\r\n reps,\r\n services,\r\n mode,\r\n setTabErrors,\r\n enableField,\r\n}) => {\r\n const [loadingSave, setLoadingSave] = useState(false);\r\n const [changedAccount, setChangedAccount] = useState({});\r\n const [errors, setErrors] = useState({});\r\n const [disabled, setDisabled] = useState(mode === AccountMode.New ? false : true);\r\n const valueref = useRef();\r\n const accountref = useRef();\r\n\r\n const handleSave = () => {\r\n const changedAccountRef = valueref.current;\r\n const fullaccount = accountref.current;\r\n const postAccount = {\r\n ...fullaccount,\r\n ...changedAccountRef,\r\n };\r\n const body = {\r\n account: postAccount,\r\n accountChangeType: getAccountType.Profile,\r\n };\r\n if (mode === AccountMode.New) {\r\n setLoadingSave(true);\r\n const newErrors = preCheckAccountForm(postAccount);\r\n if (Object.keys(newErrors).length !== 0) {\r\n setLoadingSave(false);\r\n setErrors(newErrors);\r\n showToast(\"Changes not saved\", true);\r\n return;\r\n }\r\n services.fetchNewAccount(body, (res) => {\r\n if (res) {\r\n const accnew = {\r\n ...postAccount,\r\n AccountOnboardingId: res.Id,\r\n };\r\n setAccountData({ ...accnew }, true);\r\n setLoadingSave(false);\r\n showToast(\"Changes saved successfully\");\r\n }\r\n });\r\n } else {\r\n const newErrors = preCheckAccountForm(postAccount);\r\n if (Object.keys(newErrors).length !== 0) {\r\n setErrors(newErrors);\r\n return;\r\n }\r\n const body = {\r\n account: postAccount,\r\n accountChangeType: getAccountType.Profile,\r\n };\r\n setLoadingSave(true);\r\n setErrors(newErrors);\r\n\r\n services.fetchAccountUpdate(body, (res) => {\r\n if (res) {\r\n const { result } = res;\r\n if (result && result.Code === 200) {\r\n if (changedAccountRef.AccountWayGiveOrders !== fullaccount.AccountWayGiveOrders) {\r\n const newHolders = account.AccountInfoHolder\r\n ? fullaccount.AccountInfoHolder.map((h) => ({\r\n ...h,\r\n HoldersOrderWritten:\r\n changedAccountRef.AccountWayGiveOrders === AccountWayOfAction.Written,\r\n HoldersOrderManaged:\r\n changedAccountRef.AccountWayGiveOrders === AccountWayOfAction.Managed,\r\n HoldersOrderWeb: false,\r\n HoldersOrderViaLink: false,\r\n }))\r\n : [];\r\n setAccountData({ ...postAccount, AccountInfoHolder: newHolders }, true);\r\n } else {\r\n setAccountData({ ...postAccount }, true);\r\n }\r\n setChangedAccount({});\r\n setLoadingSave(false);\r\n } else {\r\n alert(result.Description);\r\n setLoadingSave(false);\r\n }\r\n } else {\r\n setLoadingSave(false);\r\n }\r\n });\r\n }\r\n };\r\n\r\n const revert = () => {\r\n setChangedAccount({});\r\n setErrors({});\r\n };\r\n\r\n const toggleDisable = () => {\r\n setDisabled((d) => !d);\r\n revert();\r\n };\r\n\r\n const onChange = (name, value, nameValue) => {\r\n const newChangedAccount = { ...changedAccount };\r\n switch (name) {\r\n case \"AccountCompanyLinkId\":\r\n newChangedAccount.AccountCompanyLinkName = nameValue;\r\n break;\r\n case \"AccountCurrencyId\":\r\n newChangedAccount.AccountCurrencyISO = nameValue;\r\n break;\r\n default:\r\n break;\r\n }\r\n const newErrors = { ...errors };\r\n if (!loadingSave) {\r\n newChangedAccount[name] = value;\r\n delete newErrors[name];\r\n let index = undefined;\r\n if (name === \"RepId\") {\r\n for (let i = 0; i < reps.length; i += 1) {\r\n if (Number(value) === Number(reps[i].id)) {\r\n const adv = reps[i].advisors;\r\n index = adv.find((acc) => acc.id === account.MainAdvisorId);\r\n // for (let j = 0; j < adv.length; i += 1) {\r\n // if (adv[j].id === account.MainAdvisorId) {\r\n // index = i;\r\n // }\r\n }\r\n }\r\n if (!index) {\r\n for (let i = 0; i < reps.length; i += 1) {\r\n if (Number(value) === Number(reps[i].id)) {\r\n newChangedAccount.MainAdvisorId = reps[Number(i)].advisors[0].id;\r\n newChangedAccount.MainAdvisorName = reps[Number(i)].advisors[0].name;\r\n delete newErrors.MainAdvisorId;\r\n delete newErrors.MainAdvisorName;\r\n }\r\n }\r\n }\r\n }\r\n setChangedAccount(newChangedAccount);\r\n setAccountData(newChangedAccount);\r\n setErrors(newErrors);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n valueref.current = changedAccount;\r\n const postAccount = {\r\n ...account,\r\n ...changedAccount,\r\n };\r\n const newErrors = preCheckAccountForm(postAccount);\r\n setErrors(newErrors);\r\n setTabErrors(Object.keys(newErrors).length !== 0);\r\n }, [changedAccount]);\r\n\r\n useEffect(() => {\r\n accountref.current = account;\r\n }, [account]);\r\n\r\n if (!account) {\r\n return ;\r\n }\r\n\r\n return (\r\n
    \r\n \r\n {disabled && mode !== AccountMode.New && !isReadOnly && (\r\n \r\n )}\r\n {!disabled && mode !== AccountMode.New && (\r\n \r\n \r\n Lock\r\n \r\n \r\n handleSave()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {loadingSave ? \"Saving\" : \"Save\"}\r\n \r\n \r\n )}\r\n {mode === AccountMode.New && (\r\n handleSave()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {loadingSave ? \"Saving\" : \"Save\"}\r\n \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nProfileTab.propTypes = {\r\n account: PropTypes.object,\r\n currencies: PropTypes.array,\r\n riskTypes: PropTypes.array,\r\n setAccountData: PropTypes.func.isRequired,\r\n companyLinks: PropTypes.array,\r\n reps: PropTypes.array,\r\n services: PropTypes.object.isRequired,\r\n userType: PropTypes.string.isRequired,\r\n mode: PropTypes.string.isRequired,\r\n};\r\n\r\nProfileTab.defaultProps = {\r\n currencies: undefined,\r\n account: undefined,\r\n riskTypes: undefined,\r\n companyLinks: undefined,\r\n reps: undefined,\r\n};\r\n\r\nexport default ProfileTab;\r\n","import React, { useState, useEffect, useRef } from \"react\";\r\nimport { Form, FormGroup, Label, Input } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport { getAccountType } from \"../types\";\r\nimport { CircularProgress } from \"../../../..\";\r\nimport { AccountMode, showToast } from \"../../../../utils/Helper\";\r\n\r\nconst Questions = ({\r\n questions: accQuestions,\r\n accountId,\r\n isReadOnly,\r\n setAccountData,\r\n account,\r\n services,\r\n mode,\r\n riskByPersonIsEnabled,\r\n}) => {\r\n const [questions, setQuestions] = useState(undefined);\r\n const [loadingSave, setLoadingSave] = useState(false);\r\n\r\n const valueref = useRef();\r\n const accountref = useRef();\r\n\r\n useEffect(() => {\r\n if (mode !== AccountMode.New) {\r\n if (!accQuestions) {\r\n const body = {\r\n AccountGetInfo: {\r\n GetAccountDataOnboardingId: account.AccountOnboardingId,\r\n GetAccountDataId: accountId,\r\n GetAccountDataType: getAccountType.Questions,\r\n },\r\n };\r\n if (mode === AccountMode.New) {\r\n services.fetchNewAccountInfo(body, (data) => {\r\n if (data && data.SDTAccount) {\r\n setAccountData(\r\n { AccountId: data.SDTAccount.AccountOnboardingId, Questions: data.SDTAccount.Questions },\r\n false\r\n );\r\n setQuestions(data.SDTAccount.Questions);\r\n }\r\n });\r\n } else {\r\n services.fetchAccountSectorInfo(body, (data) => {\r\n if (data && data.SDTAccount) {\r\n setAccountData({ AccountId: accountId, Questions: data.SDTAccount.Questions }, false);\r\n }\r\n });\r\n }\r\n } else {\r\n setQuestions(accQuestions);\r\n }\r\n }\r\n }, [setAccountData, accQuestions, accountId, services]);\r\n\r\n useEffect(() => {\r\n if (mode === AccountMode.New) {\r\n const body = {\r\n AccountGetInfo: {\r\n GetAccountDataOnboardingId: accountId,\r\n GetAccountDataId: accountId,\r\n GetAccountDataType: getAccountType.Questions,\r\n },\r\n };\r\n\r\n services.fetchNewAccountInfo(body, (data) => {\r\n if (data && data.SDTAccount) {\r\n setAccountData(\r\n { AccountId: data.SDTAccount.AccountOnboardingId, Questions: data.SDTAccount.Questions },\r\n false\r\n );\r\n setQuestions(data.SDTAccount.Questions);\r\n }\r\n });\r\n }\r\n }, []);\r\n\r\n const handleSave = () => {\r\n const questionschanged = valueref.current;\r\n const body = {\r\n account: {\r\n AccountId: accountId,\r\n Questions: questionschanged,\r\n },\r\n accountChangeType: getAccountType.Questions,\r\n };\r\n if (mode === AccountMode.New) {\r\n setLoadingSave(true);\r\n const newQuestions = questionschanged.map((q) => {\r\n if (Number(q.NewAnswerId) > 0) {\r\n const newAnswers = [];\r\n let newA = {};\r\n q.Answer.forEach((a) => {\r\n newA = {};\r\n if (a.AnswerId === q.NewAnswerId) {\r\n newA = {\r\n ...a,\r\n AnswerIsResponse: true,\r\n };\r\n } else {\r\n newA = {\r\n ...a,\r\n AnswerIsResponse: false,\r\n };\r\n }\r\n newAnswers.push(newA);\r\n });\r\n return {\r\n ...q,\r\n NewAnswerId: 0,\r\n Answer: newAnswers,\r\n };\r\n }\r\n return { ...q };\r\n });\r\n const bodyN = {\r\n account: {\r\n AccountOnboardingId: accountId,\r\n Questions: newQuestions,\r\n },\r\n accountChangeType: getAccountType.Questions,\r\n };\r\n services.fetchNewAccount(bodyN, (res) => {\r\n if (res) {\r\n setAccountData(\r\n {\r\n AccountId: account.AccountOnboardingId,\r\n Questions: newQuestions,\r\n },\r\n true\r\n );\r\n setLoadingSave(false);\r\n showToast(\"Changes saved successfully\");\r\n } else {\r\n setLoadingSave(false);\r\n }\r\n });\r\n } else {\r\n services.fetchAccountUpdate(body, (result) => {\r\n if (result && result.result.Code === 200) {\r\n const newQuestions = questionschanged.map((q) => {\r\n if (q.NewAnswerId > 0) {\r\n const newAnswers = [];\r\n let newA = {};\r\n q.Answer.forEach((a) => {\r\n newA = {};\r\n if (a.AnswerId === q.NewAnswerId) {\r\n newA = {\r\n ...a,\r\n AnswerIsResponse: true,\r\n };\r\n } else {\r\n newA = {\r\n ...a,\r\n AnswerIsResponse: true,\r\n };\r\n }\r\n newAnswers.push(newA);\r\n });\r\n return {\r\n ...q,\r\n NewAnswerId: 0,\r\n Answer: newAnswers,\r\n };\r\n }\r\n return { ...q };\r\n });\r\n\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n Questions: newQuestions,\r\n },\r\n true\r\n );\r\n setLoadingSave(false);\r\n } else {\r\n setLoadingSave(false);\r\n }\r\n });\r\n }\r\n };\r\n\r\n const handleChangeAnswer = (questionIndex, answerIndex) => {\r\n if (!loadingSave) {\r\n const newQuestions = [...questions];\r\n if (newQuestions[questionIndex].Answer[answerIndex].AnswerIsResponse) {\r\n newQuestions[questionIndex].NewAnswerId = 0;\r\n } else {\r\n newQuestions[questionIndex].NewAnswerId = questions[questionIndex].Answer[answerIndex].AnswerId;\r\n }\r\n setQuestions(newQuestions);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n return () => {\r\n if (mode === AccountMode.New) {\r\n handleSave();\r\n }\r\n };\r\n }, []);\r\n\r\n useEffect(() => {\r\n valueref.current = questions;\r\n }, [questions]);\r\n\r\n useEffect(() => {\r\n accountref.current = account;\r\n }, [account]);\r\n\r\n let save = false;\r\n if (!questions) {\r\n return ;\r\n }\r\n return (\r\n
    \r\n {questions.map((q, qIndex) => {\r\n if (q.NewAnswerId > 0) {\r\n save = true;\r\n }\r\n return (\r\n
    \r\n \r\n {q.QuestionDescription}\r\n {q.Answer.map((a, aIndex) => (\r\n \r\n \r\n \r\n ))}\r\n \r\n
    \r\n );\r\n })}\r\n {riskByPersonIsEnabled && questions.length > 0 && !isReadOnly && (\r\n handleSave()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Save\r\n \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nQuestions.propTypes = {\r\n questions: PropTypes.array.isRequired,\r\n accountId: PropTypes.any.isRequired,\r\n setAccountData: PropTypes.func.isRequired,\r\n services: PropTypes.func.isRequired,\r\n account: PropTypes.func.isRequired,\r\n mode: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default Questions;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Table, UncontrolledDropdown, DropdownToggle, DropdownItem, DropdownMenu, Button } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport style from \"../../Grid.module.scss\";\r\nimport { getAccountType } from \"../types\";\r\nimport ModalConfirm from \"../../Modal/ModalConfirm\";\r\nimport ModalRelatedAccount from \"../../Modal/ModalRelatedAccount\";\r\nimport { CircularProgress } from \"../../../..\";\r\n\r\nfunction generateEmptyRelatedAccount() {\r\n return {\r\n RelatedAccountId: \"\",\r\n RelatedAccountName: \"\",\r\n RelatedAccountNumber: \"\",\r\n CustodianEntityId: \"\",\r\n CustodianEntityName: \"\",\r\n };\r\n}\r\n\r\nconst RelatedAccountsTab = ({ accountId, relatedAccounts, banks, isReadOnly, setAccountData, services }) => {\r\n const [fetching, setFetching] = useState(false);\r\n const [needAuth, setNeedAuth] = useState(false);\r\n\r\n useEffect(() => {\r\n services.getParameterValue({ ParameterName: \"RelatedAccountChangesWithoutAuth\" }, (response) => {\r\n if (response) {\r\n setNeedAuth(response.SdtParametersData.ParameterNumericValue == 0);\r\n }\r\n });\r\n }, [needAuth]);\r\n\r\n const [modalConfirm, setModalConfirm] = useState({\r\n open: false,\r\n title: \"\",\r\n saving: false,\r\n relatedAccountId: undefined,\r\n });\r\n const [modalRelatedAccount, setModalRelatedAccount] = useState({\r\n open: false,\r\n saving: false,\r\n relatedAccount: generateEmptyRelatedAccount(),\r\n });\r\n\r\n const toggleModalConfirm = () => {\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n saving: false,\r\n relatedAccountId: \"\",\r\n });\r\n };\r\n\r\n const onChangeEdit = (name, value, strValue) => {\r\n setModalRelatedAccount({\r\n ...modalRelatedAccount,\r\n relatedAccount: {\r\n ...modalRelatedAccount.relatedAccount,\r\n [name]: value,\r\n CustodianEntityName:\r\n name === \"CustodianEntityId\" ? strValue : modalRelatedAccount.relatedAccount.CustodianEntityName,\r\n },\r\n });\r\n };\r\n\r\n const toggleModalRelatedAccount = (relatedAccount) => {\r\n setModalRelatedAccount({\r\n saving: modalRelatedAccount.saving,\r\n open: !modalRelatedAccount.open,\r\n relatedAccount:\r\n relatedAccount && relatedAccount.RelatedAccountId ? relatedAccount : generateEmptyRelatedAccount(),\r\n });\r\n };\r\n\r\n const handleEdit = (index) => {\r\n toggleModalRelatedAccount(relatedAccounts[index]);\r\n };\r\n\r\n const handleAdd = () => {\r\n toggleModalRelatedAccount();\r\n };\r\n\r\n const handleDelete = (index) => {\r\n const id = relatedAccounts[index].RelatedAccountId;\r\n const name = relatedAccounts[index].RelatedAccountName;\r\n setModalConfirm({\r\n open: true,\r\n title: \"Are you sure you want to delete the selected Related Account?\",\r\n saving: false,\r\n relatedAccountId: id,\r\n RelatedAccountName: name,\r\n });\r\n };\r\n\r\n const handleSaveRelatedAccount = () => {\r\n const newRelatedAccount = { ...modalRelatedAccount.relatedAccount };\r\n const account = {\r\n AccountId: accountId,\r\n RelatedAccount: [\r\n {\r\n ...newRelatedAccount,\r\n DeleteRelatedAccount: false,\r\n },\r\n ],\r\n };\r\n const body = {\r\n account,\r\n accountChangeType: getAccountType.RelatedAccounts,\r\n };\r\n setModalRelatedAccount({ ...modalRelatedAccount, saving: true });\r\n services.fetchAccountUpdate(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n let found = false;\r\n if (!newRelatedAccount.RelatedAccountId) {\r\n newRelatedAccount.RelatedAccountId = response.Id;\r\n }\r\n const newRelatedAccounts = relatedAccounts.map((relAcc) => {\r\n if (parseInt(newRelatedAccount.RelatedAccountId, 10) === parseInt(relAcc.RelatedAccountId, 10)) {\r\n found = true;\r\n return { ...newRelatedAccount };\r\n }\r\n return { ...relAcc };\r\n });\r\n if (!found) {\r\n newRelatedAccounts.push(newRelatedAccount);\r\n }\r\n account.RelatedAccount = newRelatedAccounts;\r\n setAccountData(account, true, needAuth);\r\n setModalRelatedAccount({\r\n saving: false,\r\n open: false,\r\n relatedAccount: generateEmptyRelatedAccount(),\r\n });\r\n } else {\r\n setModalRelatedAccount({\r\n ...modalRelatedAccount,\r\n saving: false,\r\n });\r\n }\r\n });\r\n };\r\n\r\n const deleteRelatedAccount = () => {\r\n const deleteAccountId = modalConfirm.relatedAccountId;\r\n const deleteAccountName = modalConfirm.RelatedAccountName;\r\n const account = {\r\n AccountId: accountId,\r\n RelatedAccount: [\r\n {\r\n RelatedAccountId: deleteAccountId,\r\n RelatedAccountName: deleteAccountName,\r\n DeleteRelatedAccount: true,\r\n },\r\n ],\r\n };\r\n const body = {\r\n account,\r\n accountChangeType: getAccountType.RelatedAccounts,\r\n };\r\n setModalConfirm({ ...modalConfirm, saving: true });\r\n services.fetchAccountUpdate(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newRelatedAccounts = [...relatedAccounts];\r\n let index = -1;\r\n newRelatedAccounts.forEach((relAcc, i) => {\r\n if (parseInt(deleteAccountId, 10) === parseInt(relAcc.RelatedAccountId, 10)) {\r\n index = i;\r\n }\r\n });\r\n if (index > -1) {\r\n newRelatedAccounts.splice(index, 1);\r\n }\r\n account.RelatedAccount = newRelatedAccounts;\r\n setAccountData(account, true, needAuth);\r\n toggleModalConfirm();\r\n } else {\r\n setModalConfirm({\r\n ...modalConfirm,\r\n saving: false,\r\n });\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n if (!relatedAccounts && !fetching) {\r\n const body = {\r\n AccountGetInfo: {\r\n GetAccountDataId: accountId,\r\n GetAccountDataType: getAccountType.RelatedAccounts,\r\n },\r\n };\r\n services.fetchAccountSectorInfo(body, (response) => {\r\n if (response && response.SDTAccount) {\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n RelatedAccount: response.SDTAccount.RelatedAccount,\r\n },\r\n false\r\n );\r\n }\r\n setFetching(false);\r\n });\r\n setFetching(true);\r\n }\r\n }, [relatedAccounts, fetching, accountId, setAccountData, services]);\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {fetching ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n {relatedAccounts && relatedAccounts.length > 0 ? (\r\n relatedAccounts.map((acc, i) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))\r\n ) : (\r\n \r\n \r\n \r\n )}\r\n \r\n )}\r\n \r\n
    #NameCustody
    \r\n \r\n
    \r\n {!isReadOnly && (\r\n \r\n )}\r\n {acc.RelatedAccountNumber}{acc.RelatedAccountName}{acc.CustodianEntityName}
    \r\n No Results.\r\n
    \r\n {!isReadOnly && (\r\n \r\n )}\r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nRelatedAccountsTab.propTypes = {\r\n accountId: PropTypes.string.isRequired,\r\n relatedAccounts: PropTypes.array.isRequired,\r\n setAccountData: PropTypes.func.isRequired,\r\n services: PropTypes.object.isRequired,\r\n banks: PropTypes.array,\r\n};\r\n\r\nRelatedAccountsTab.defaultProps = {\r\n banks: undefined,\r\n};\r\n\r\nfunction RenderDropdownActions({ onEdit, onDelete, index }) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n onEdit(index)}>\r\n \r\n Edit\r\n \r\n onDelete(index)}>\r\n \r\n Delete\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nRenderDropdownActions.propTypes = {\r\n onEdit: PropTypes.func.isRequired,\r\n onDelete: PropTypes.func.isRequired,\r\n index: PropTypes.number.isRequired,\r\n};\r\n\r\nexport default RelatedAccountsTab;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport {\r\n ListGroup,\r\n ListGroupItem,\r\n Dropdown,\r\n DropdownToggle,\r\n DropdownMenu,\r\n DropdownItem,\r\n Button,\r\n Row,\r\n} from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport { getAccountType } from \"../types\";\r\nimport ModalConfirm from \"../../Modal/ModalConfirm\";\r\nimport ModalSignature from \"../../Modal/ModalSignature\";\r\nimport { CircularProgress } from \"../../../..\";\r\nimport { AccountMode } from \"../../../../utils/Helper\";\r\nimport Groups from \"../../../Asset/Tabs/Groups/Groups\";\r\n\r\nconst SignatureSetsTab = ({\r\n signatureSets,\r\n accountId,\r\n setAccountData,\r\n holders,\r\n services,\r\n mode,\r\n references,\r\n groups,\r\n isReadOnly,\r\n bankAccounts,\r\n}) => {\r\n const [fetching, setFetching] = useState(false);\r\n const [toggleOpen, setToggleOpen] = useState([]);\r\n const [modalSignature, setModalSignature] = useState({ open: false, signature: undefined });\r\n const [modalConfirm, setModalConfirm] = useState({ open: false, title: \"\", callback: undefined });\r\n const [saving, setSaving] = useState(false);\r\n\r\n const toggleModalNewSignature = (index) => {\r\n setModalSignature({\r\n open: !modalSignature.open,\r\n signature: signatureSets[index],\r\n });\r\n };\r\n\r\n const handleRefreshStore = (set) => {\r\n const initialSets = signatureSets || [];\r\n let index = -1;\r\n initialSets.forEach((sigset, i) => {\r\n if (sigset.SignatureSetId === set.SignatureSetId) {\r\n index = i;\r\n }\r\n });\r\n if (index >= 0) {\r\n if (set.SignatureSetWayOfAction === \"NoAction\") {\r\n initialSets.splice(index, 1);\r\n } else {\r\n initialSets[index] = set;\r\n }\r\n } else {\r\n initialSets.push(set);\r\n }\r\n setAccountData({ AccountId: accountId, SignatureSets: initialSets }, true);\r\n };\r\n\r\n const fetchPostSet = (set) => {\r\n setSaving(true);\r\n if (mode !== AccountMode.New) {\r\n services.fetchAccountUpdate(\r\n {\r\n account: {\r\n AccountId: accountId,\r\n SignatureSets: [set],\r\n },\r\n accountChangeType: getAccountType.SignatureSets,\r\n },\r\n (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newSet = { ...set };\r\n if (set.SignatureSetId === 0) {\r\n newSet.SignatureSetId = response.Id;\r\n }\r\n handleRefreshStore(newSet);\r\n setSaving(false);\r\n if (modalSignature.open) {\r\n toggleModalNewSignature();\r\n } else {\r\n setModalConfirm({ open: false, title: \"\", callback: undefined });\r\n }\r\n } else {\r\n setSaving(false);\r\n }\r\n }\r\n );\r\n } else {\r\n services.fetchNewAccount(\r\n {\r\n account: {\r\n AccountOnboardingId: accountId,\r\n AccountId: accountId,\r\n SignatureSets: [set],\r\n },\r\n accountChangeType: getAccountType.SignatureSets,\r\n },\r\n (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newSet = { ...set };\r\n if (set.SignatureSetId === 0) {\r\n newSet.SignatureSetId = response.Id;\r\n }\r\n handleRefreshStore(newSet);\r\n setSaving(false);\r\n if (modalSignature.open) {\r\n toggleModalNewSignature();\r\n } else {\r\n setModalConfirm({ open: false, title: \"\", callback: undefined });\r\n }\r\n } else {\r\n setSaving(false);\r\n }\r\n }\r\n );\r\n }\r\n };\r\n\r\n const toggleModalConfirm = (callback, title = \"\") =>\r\n setModalConfirm({ open: !modalConfirm.open, title, callback });\r\n const toggleDropdown = (index) => {\r\n const newToggle = toggleOpen.map(() => false);\r\n newToggle[index] = !toggleOpen[index];\r\n setToggleOpen(newToggle);\r\n };\r\n\r\n const handleDeleteSet = (index) => {\r\n toggleModalConfirm(() => {\r\n const set = signatureSets[index];\r\n set.SignatureSetWayOfAction = \"NoAction\";\r\n fetchPostSet(set);\r\n }, \"Are you sure you want to delete this signature Set?\");\r\n };\r\n\r\n const handleAddNewSignature = (newSignature) => {\r\n fetchPostSet(newSignature);\r\n };\r\n\r\n const listMenuItems = [\r\n {\r\n text: (\r\n
    \r\n \r\n Edit this Set\r\n
    \r\n ),\r\n action: toggleModalNewSignature,\r\n },\r\n {\r\n text: (\r\n
    \r\n \r\n Remove this Set\r\n
    \r\n ),\r\n action: handleDeleteSet,\r\n },\r\n ];\r\n\r\n useEffect(() => {\r\n if (mode !== AccountMode.New) {\r\n if (!signatureSets && !fetching) {\r\n const body = {\r\n AccountGetInfo: {\r\n GetAccountDataId: accountId,\r\n GetAccountDataType: getAccountType.SignatureSets,\r\n },\r\n };\r\n services.fetchAccountSectorInfo(body, (response) => {\r\n if (response && response.SDTAccount) {\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n SignatureSets: response.SDTAccount.SignatureSets,\r\n BankAccounts: bankAccounts,\r\n PersonalReferences: references,\r\n Groups: groups,\r\n },\r\n false\r\n );\r\n }\r\n let toggleDWOpen = [];\r\n if (response && response.SDTAccount) {\r\n toggleDWOpen = response.SDTAccount.SignatureSets.map(() => false);\r\n }\r\n setToggleOpen(toggleDWOpen);\r\n setFetching(false);\r\n });\r\n setFetching(true);\r\n }\r\n }\r\n }, [signatureSets, fetching, accountId, setAccountData, services]);\r\n\r\n useEffect(() => {\r\n if (mode === AccountMode.New) {\r\n if (!fetching) {\r\n const body = {\r\n AccountGetInfo: {\r\n GetAccountDataId: accountId,\r\n GetAccountDataOnboardingId: accountId,\r\n GetAccountDataType: getAccountType.SignatureSets,\r\n },\r\n };\r\n services.fetchNewAccountInfo(body, (response) => {\r\n if (response && response.SDTAccount) {\r\n setAccountData(\r\n {\r\n AccountId: accountId,\r\n SignatureSets: response.SDTAccount.SignatureSets,\r\n },\r\n false\r\n );\r\n }\r\n let toggleDWOpen = [];\r\n if (response && response.SDTAccount) {\r\n toggleDWOpen = response.SDTAccount.SignatureSets.map(() => false);\r\n }\r\n setToggleOpen(toggleDWOpen);\r\n setFetching(false);\r\n });\r\n setFetching(true);\r\n }\r\n }\r\n }, []);\r\n\r\n return (\r\n
    \r\n {!fetching ? (\r\n \r\n {signatureSets &&\r\n signatureSets.map((signature, index) => (\r\n \r\n \r\n {!isReadOnly && (\r\n
    \r\n toggleDropdown(index)}\r\n items={listMenuItems}\r\n index={index}\r\n />\r\n
    \r\n )}\r\n {\" \"}\r\n {signature.SignatureSetPersonName}\r\n {\": \"}\r\n {signature.SignatureSetWayOfAction}\r\n
    \r\n {signature.SignaturePeopleSelected.length > 0 &&\r\n signature.SignaturePeopleSelected.map((person) => (\r\n \r\n {person.SignaturePersonName}\r\n \r\n ))}\r\n
    \r\n ))}\r\n \r\n {!isReadOnly && (\r\n \r\n )}\r\n \r\n
    \r\n ) : (\r\n \r\n )}\r\n \r\n {modalSignature.open && (\r\n \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nfunction ListOptionsDropdown({ isOpen, toggle, items, index }) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {items.length > 0 &&\r\n items.map((item, i) => (\r\n item.action(index)}>\r\n {item.text}\r\n \r\n ))}\r\n \r\n \r\n );\r\n}\r\n\r\nListOptionsDropdown.propTypes = {\r\n isOpen: PropTypes.bool.isRequired,\r\n toggle: PropTypes.func.isRequired,\r\n items: PropTypes.array.isRequired,\r\n index: PropTypes.any.isRequired,\r\n};\r\n\r\nSignatureSetsTab.propTypes = {\r\n signatureSets: PropTypes.array.isRequired,\r\n accountId: PropTypes.any.isRequired,\r\n setAccountData: PropTypes.func.isRequired,\r\n holders: PropTypes.array.isRequired,\r\n services: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default SignatureSetsTab;\r\n","export const TargetType = {\r\n Account: \"Account\",\r\n Physical: \"Physical\",\r\n Juridical: \"Juridical\"\r\n};\r\n\r\nexport const PersonType = {\r\n All: \"All\",\r\n Physical: \"Physical\",\r\n Juridical: \"Juridical\"\r\n};\r\n\r\nexport function getTargetTypeName(type) {\r\n return type;\r\n}\r\n\r\nexport const PieChartColors = [\r\n \"#f44336\",\r\n \"#E91E63\",\r\n \"#9C27B0\",\r\n \"#673AB7\",\r\n \"#3F51B5\",\r\n \"#2196F3\",\r\n \"#03A9F4\",\r\n \"#00BCD4\",\r\n \"#009688\",\r\n \"#4CAF50\",\r\n \"#8BC34A\",\r\n \"#CDDC39\",\r\n \"#FFEB3B\",\r\n \"#FFC107\",\r\n \"#FF9800\",\r\n \"#FF5722\",\r\n \"#795548\",\r\n \"#9E9E9E\",\r\n \"#607D8B\"\r\n];\r\n\r\nexport const getAccountType = {\r\n Holders: \"Holders\",\r\n Questions: \"Questions\",\r\n KYC: \"KYC\",\r\n Documents: \"Documents\",\r\n InvestmentProfile: \"InvestmentProfile\",\r\n Profile: \"Profile\",\r\n SignatureSets: \"SignatureSets\",\r\n References: \"References\",\r\n BankAccounts: \"BankAccounts\",\r\n Commissions: \"Commission\",\r\n RelatedAccounts: \"RelatedAccounts\",\r\n Beneficiaries: \"Beneficiaries\",\r\n Finalize: \"Finalize\",\r\n Groups: \"Groups\",\r\n Instructions: \"Instructions\",\r\n};\r\n\r\nexport const KYCConstants = {\r\n StockMarketKnowledge: {\r\n Nothing: \"Nothing\",\r\n Good: \"Good\",\r\n Expert: \"Expert\"\r\n },\r\n CustomerLink: {\r\n Option1: \"Cliente Existente\",\r\n Option2: \"Referido por otro cliente\",\r\n Option3: \"Referido por AF/Director\",\r\n Option4: \"Fue cliente en el pasado de una empresa fusionada/Nobilis\",\r\n Option5: \"Sin conocimiento previo\",\r\n Option6: 'Sucesion de otra cuenta Nobilis',\r\n },\r\n CustomerRelatedSince: {\r\n NewCustomer: \"New Customer\",\r\n LessThan3: \"Less than 3\",\r\n Between3And10: \"Between 3 and 10\",\r\n MoreThan10: \"More than 10\"\r\n }\r\n};\r\n\r\nexport const InvestExperienceE = [\"None\", \"Moderate\", \"Extensive\"];\r\n\r\nexport const InvestExperienceQ = [\r\n \"Zero\",\r\n \"From One To Ten\",\r\n \"From Eleven To Sixty\",\r\n \"More Tan Sixty\"\r\n];\r\n\r\nexport const InvestExperienceM = [\r\n \"0-100 K\",\r\n \"0-500 K\",\r\n \"500K-1MM\",\r\n \"More Than 1MM\"\r\n];\r\n\r\nexport const AccountSignatureWayOfAction = {\r\n Joint: \"Joint\",\r\n Individual: \"Individual\"\r\n};\r\n\r\nexport const AccountType = {\r\n Customer: \"Customer\",\r\n InBalance: \"InBalance\",\r\n Pershing: \"Pershing\",\r\n Bank: \"Bank\"\r\n};\r\n\r\nexport const ArchiveTypes = {\r\n Company: 1,\r\n Account: 2,\r\n Person: 3\r\n};\r\n\r\nexport const AccountWayOfAction = {\r\n Managed: \"Managed\",\r\n Written: \"Written\"\r\n};\r\n\r\nexport const AccountUsage = {\r\n Indistinct: \"Indistinct\",\r\n Individual: \"Individual\",\r\n Joint: \"Joint\",\r\n \"\": \"\"\r\n};\r\n\r\nexport const AccountHistoryProcess = {\r\n All: {\r\n value: \"All\",\r\n description: \"All\"\r\n },\r\n RiskProfile: {\r\n value: \"RiskProfile\",\r\n description: \"Risk Profile\"\r\n },\r\n Advisor: {\r\n value: \"Advisor\",\r\n description: \"Advisor\"\r\n },\r\n BlockUnblock: {\r\n value: \"Block/Unblock\",\r\n description: \"Block/Unblock\"\r\n },\r\n Holder: {\r\n value: \"Holder\",\r\n description: \"Holder\"\r\n },\r\n InvestorProfile: {\r\n value: \"InvestorProfile\",\r\n description: \"Investor Profile\"\r\n }\r\n};\r\n\r\nexport const BankAccountType = {\r\n Current: \"Current\",\r\n Savings: \"Savings\",\r\n Other: \"Other\"\r\n};\r\n\r\nexport const BankAccountStatus = {\r\n Active: \"Active\",\r\n Inactive: \"Inactive\"\r\n};\r\n\r\nexport const AccountBookInfo = {\r\n LocalBooking: \"Local Booking\",\r\n ThirdPartyBooking: \"Third Party Booking\",\r\n Both: \"Both\"\r\n};\r\n\r\nexport const CorporateEventType = {\r\n Split : \"Split\",\r\n Coupon : \"Coupon\",\r\n Sink : \"Sink\",\r\n Maturity : \"Maturity\",\r\n Capitalization: \"Capitalization\",\r\n Fee: \"Fee\",\r\n DerivativeMaturity: \"DerivativeMaturity\",\r\n DerivativePayment: \"DerivativePayment\",\r\n Dividend: \"Dividend\",\r\n Taxes: \"Taxes\",\r\n Call: \"Call\",\r\n Custom: \"Custom\",\r\n OtherIncome: \"OtherIncome\"\r\n};\r\n\r\nexport const InstructionTarget = {\r\n Reinvest: \"Reinvest\",\r\n Withdraw: \"Withdraw\",\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"desk\":\"Grid-module_desk_3nz4W\",\"table\":\"Grid-module_table_6Stwc\",\"actions\":\"Grid-module_actions_2tH8s\",\"dropdown\":\"Grid-module_dropdown_2JJrQ\",\"icon\":\"Grid-module_icon_2i7AP\"};","/* eslint-disable max-len */\r\nimport React, { useState } from \"react\";\r\nimport { Modal, ModalBody, ModalFooter, ModalHeader, Col, Row, Input, Button, Spinner } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport { SelectFormField, FormField } from \"../../../utils/FormFields\";\r\nimport { getISODate } from \"../../../utils/dateUtils\";\r\n\r\nexport function preCheckObjectEmpty(object) {\r\n let res = object && Object.keys(object).length > 0;\r\n Object.keys(object).forEach((key) => {\r\n if (!object[key] && object[key] !== 0 && object[key] !== false) {\r\n res = false;\r\n }\r\n });\r\n return res;\r\n}\r\n\r\nconst ModalArchive = ({ open, onToggle, onSave, archiveType, loading }) => {\r\n const [newArchive, setNewArchive] = useState({\r\n ArchiveId: 0,\r\n ArchivesName: \"\",\r\n ArchivesTypeId: archiveType.ArchiveTypeId,\r\n ArchivesTypeDescription: archiveType.ArchiveTypeDescription,\r\n ArchivesSubTypeId:\r\n archiveType.ArchivesSubTypes[Object.keys(archiveType.ArchivesSubTypes)[0]].ArchiveSubTypeId,\r\n ArchivesSubTypeDescription:\r\n archiveType.ArchivesSubTypes[Object.keys(archiveType.ArchivesSubTypes)[0]].ArchiveSubTypeDescription,\r\n canBeLifelong:\r\n archiveType.ArchivesSubTypes[Object.keys(archiveType.ArchivesSubTypes)[0]].ArchiveSubTypeCanBeLifelong,\r\n hasExpiration:\r\n archiveType.ArchivesSubTypes[Object.keys(archiveType.ArchivesSubTypes)[0]].ArchiveSubTypeHasExpiration,\r\n ArchivesBlob: null,\r\n ArchivesExtension: \"\",\r\n ArchivesEnabled: true,\r\n ArchivesExpirationDate: getISODate(new Date()),\r\n ArchivesHasExpirationDate: true,\r\n });\r\n\r\n const onChange = (name, value) => {\r\n const newNewArchive = {\r\n ...newArchive,\r\n [name]: value,\r\n };\r\n if (name === \"ArchivesSubTypeId\") {\r\n Object.keys(archiveType.ArchivesSubTypes).forEach((key) => {\r\n const subType = archiveType.ArchivesSubTypes[key];\r\n if (parseInt(subType.ArchiveSubTypeId, 10) === parseInt(value, 10)) {\r\n newNewArchive.ArchivesSubTypeDescription = subType.ArchiveSubTypeDescription;\r\n newNewArchive.hasExpiration = subType.ArchiveSubTypeHasExpiration;\r\n newNewArchive.canBeLifelong = subType.ArchiveSubTypeCanBeLifelong;\r\n newNewArchive.ArchivesHasExpirationDate =\r\n !newNewArchive.canBeLifelong || newNewArchive.hasExpiration;\r\n }\r\n });\r\n } else if (name === \"ArchivesEnabled\") {\r\n newNewArchive.ArchivesEnabled = value === \"true\";\r\n } else if (name === \"ArchivesHasExpirationDate\") {\r\n newNewArchive.ArchivesHasExpirationDate = value === \"true\";\r\n }\r\n setNewArchive(newNewArchive);\r\n };\r\n\r\n const handleFile = (file, name, extension) => {\r\n const items = file.split(\",\");\r\n setNewArchive({\r\n ...newArchive,\r\n ArchivesBlob: items[1],\r\n ArchivesExtension: extension,\r\n ArchivesName: name,\r\n });\r\n };\r\n\r\n const handleFileInput = (event, cb = handleFile) => {\r\n const file = event.target.files[0];\r\n\r\n if (file && file.size <= 10485760) {\r\n const name = file.name.substring(0, file.name.lastIndexOf(\".\"));\r\n const extension = file.name.substring(file.name.lastIndexOf(\".\") + 1, file.name.length);\r\n const reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n reader.onload = () => {\r\n cb(reader.result, name, extension);\r\n };\r\n reader.onerror = (error) => {\r\n throw error;\r\n };\r\n } else {\r\n alert(\"File is too big! (Max. 10MB)\");\r\n event.target = null;\r\n }\r\n };\r\n\r\n return (\r\n
    \r\n \r\n Append New Document\r\n \r\n {archiveType ? (\r\n \r\n \r\n \r\n onChange(\"ArchivesSubTypeId\", e.target.value)}\r\n >\r\n {Object.keys(archiveType.ArchivesSubTypes).map((key) => {\r\n const a = archiveType.ArchivesSubTypes[key];\r\n return (\r\n \r\n );\r\n })}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n item.id}\r\n getSelectItemName={(item) => item.name}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n item.id}\r\n getSelectItemName={(item) => item.name}\r\n />\r\n \r\n \r\n \r\n ) : (\r\n \r\n )}\r\n \r\n \r\n onSave(newArchive)}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Save\r\n {\" \"}\r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nModalArchive.propTypes = {\r\n open: PropTypes.bool.isRequired,\r\n onToggle: PropTypes.func.isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n archiveType: PropTypes.object.isRequired,\r\n loading: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default ModalArchive;\r\n","import React, {useState} from \"react\";\r\nimport {\r\n Modal,\r\n ModalBody,\r\n ModalFooter,\r\n ModalHeader,\r\n Form,\r\n Button,\r\n Spinner,\r\n Col,\r\n Input,\r\n Row,\r\n FormGroup,\r\n Label\r\n} from \"reactstrap\";\r\nimport LaddaButton, {EXPAND_RIGHT} from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\nimport {FormField, SelectFormField} from \"../../../utils/FormFields\";\r\nimport {BankAccountType, BankAccountStatus} from \"../Account/types\";\r\n\r\nfunction ModalBankAccount({\r\n open,\r\n bankAccount,\r\n errors,\r\n toggle,\r\n saving,\r\n onSave,\r\n onChange,\r\n currencies,\r\n banks,\r\n archives,\r\n setArchives,\r\n getFile\r\n}) {\r\n const deleteArchive=(id)=>{\r\n var archivesAux = [...archives]; \r\n \r\n if (id !== -1) {\r\n archivesAux.splice(id, 1);\r\n }\r\n\r\n setArchives(\r\n archivesAux\r\n );\r\n\r\n }\r\n\r\n const handleFile = (file, name, extension) => {\r\n const items = file.split(',');\r\n var archive={ ArchiveId:0, ArchiveBlob: items[1],\r\n ArchiveExtension: extension,\r\n ArchiveName: name}\r\n setArchives([...archives, archive]);\r\n };\r\n\r\n const handleFileInput = (event, cb = handleFile) => {\r\n const file = event.target.files[0];\r\n const name = (file.name).substring(0, file.name.indexOf('.'));\r\n if (file.size <= 5242880){\r\n const extension = (file.name).substring(file.name.indexOf('.') + 1, file.name.length);\r\n const reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n reader.onload = () => {\r\n cb(reader.result, name, extension);\r\n };\r\n reader.onerror = (error) => {\r\n throw error;\r\n };\r\n }else {\r\n alert(\"File is too big! (Max. 5MB)\");\r\n event.target = \"\";\r\n }\r\n };\r\n\r\n return (\r\n \r\n Bank Account\r\n \r\n
    \r\n {banks ? (\r\n i.Id}\r\n getSelectItemName={i => i.Name}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n i}\r\n getSelectItemName={i => BankAccountType[i]}\r\n />\r\n \r\n {currencies ? (\r\n i.currencyId}\r\n getSelectItemName={i => i.currencyISO}\r\n />\r\n ) : (\r\n \r\n )}\r\n i}\r\n getSelectItemName={i => (i ? \"Yes\" : \"No\")}\r\n />\r\n i}\r\n getSelectItemName={i => (i ? \"Yes\" : \"No\")}\r\n />\r\n \r\n i}\r\n getSelectItemName={i => BankAccountStatus[i]}\r\n />\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n \r\n {saving ? \" Saving\" : \" Save\"}\r\n \r\n \r\n
    \r\n );\r\n}\r\n\r\nconst ListArchives = ({archives, deleteArchive, getFile}) => {\r\n return (\r\n \r\n {archives &&\r\n (archives.length == 0 ? (\r\n \r\n No Attachments\r\n \r\n ) : (\r\n
    \r\n {archives.map((item, index) => (\r\n \r\n ))}\r\n
    \r\n ))}\r\n
    \r\n );\r\n};\r\n\r\nconst Line = ({index, file, deleteArchive, getFile}) => (\r\n \r\n getFile(file)} style = {{cursor:'pointer'}}\r\n /*href={`data:application/octet-stream;base64,${file.ArchiveBlob}`}\r\n download={`${file.ArchiveName}.${file.ArchiveExtension}`}*/\r\n deleteArchive={deleteArchive}\r\n archiveId={file.ArchiveId}\r\n >\r\n {`${file.ArchiveName}.${file.ArchiveExtension}`}\r\n \r\n {\" \"}\r\n deleteArchive(index)}\r\n style={{color: \"#d83737\"}}\r\n >\r\n \r\n \r\n \r\n);\r\n\r\nModalBankAccount.propTypes = {\r\n open: PropTypes.bool.isRequired,\r\n bankAccount: PropTypes.object.isRequired,\r\n toggle: PropTypes.func.isRequired,\r\n saving: PropTypes.bool.isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n currencies: PropTypes.array,\r\n banks: PropTypes.array\r\n};\r\n\r\nModalBankAccount.defaultProps = {\r\n banks: undefined,\r\n currencies: undefined\r\n};\r\n\r\nexport default ModalBankAccount;\r\n","import React from 'react';\r\nimport {\r\n Modal, ModalHeader, ModalBody, ModalFooter, Button,\r\n} from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\nimport LaddaButton, { EXPAND_RIGHT } from 'react-ladda';\r\n\r\nfunction ModalConfirm({\r\n open, toggle, title, callback, saving,\r\n}) {\r\n return (\r\n \r\n Confirmation\r\n \r\n {title}\r\n \r\n\r\n \r\n callback()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {saving ? 'Saving' : 'Confirm'}\r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nModalConfirm.propTypes = {\r\n open: PropTypes.bool.isRequired,\r\n toggle: PropTypes.func.isRequired,\r\n callback: PropTypes.func,\r\n title: PropTypes.string.isRequired,\r\n saving: PropTypes.bool.isRequired,\r\n};\r\n\r\nModalConfirm.defaultProps = {\r\n callback: undefined,\r\n};\r\n\r\nexport default ModalConfirm;\r\n","/* eslint-disable max-len */\r\nimport React, {useState, useEffect} from \"react\";\r\nimport {\r\n Modal,\r\n ModalBody,\r\n ModalFooter,\r\n ModalHeader,\r\n Form,\r\n Button,\r\n Spinner\r\n} from \"reactstrap\";\r\nimport LaddaButton, {EXPAND_RIGHT} from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport {preCheckObjectEmpty} from \"./ModalArchive\";\r\nimport {\r\n FormField,\r\n SelectFormField,\r\n CustomFormInput,\r\n CheckFormField\r\n} from \"../../../utils/FormFields\";\r\nimport Autosuggest from \"../../AutosuggestCompliance\";\r\nimport { dateIsEmpty } from \"./../../../utils/Helper\";\r\n\r\nconst checkDocument = doc =>\r\n doc.PhysicalPersonDocumentTypeId &&\r\n doc.PhysicalPersonDocumentNumber &&\r\n doc.PersonDocumentIssueCountryId &&\r\n (doc.PhysicalPersonDocumentWithoutExpiration ||\r\n doc.PhysicalPersonDocumentExpirationDate);\r\n\r\nconst parseDoc = doc => {\r\n if (doc) {\r\n return {\r\n PhysicalPersonDocumentTypeId: doc.PhysicalPersonDocumentTypeId,\r\n PhysicalPersonDocumentTypeName: doc.PhysicalPersonDocumentTypeName,\r\n PhysicalPersonDocumentNumber: doc.PhysicalPersonDocumentNumber,\r\n PhysicalPersonDocumentExpirationDate:\r\n doc.PhysicalPersonDocumentExpirationDate,\r\n PersonDocumentIssueCountryId: doc.PersonDocumentIssueCountryId,\r\n PersonDocumentIssueCountryName: doc.PersonDocumentIssueCountryName,\r\n PhysicalPersonDocumentIsMain: doc.PhysicalPersonDocumentIsMain,\r\n PhysicalPersonDocumentWithoutExpiration:\r\n doc.PhysicalPersonDocumentWithoutExpiration\r\n };\r\n }\r\n return undefined;\r\n};\r\n\r\nconst ModalDocument = ({\r\n open,\r\n onToggle,\r\n onSave,\r\n documentTypes,\r\n loading,\r\n initial,\r\n error,\r\n services\r\n}) => {\r\n const [documentCountry, setDocumentCountry] = useState(\r\n initial ? initial.PersonDocumentIssueCountryName : \"\"\r\n );\r\n const [newDocument, setNewDocument] = useState(\r\n parseDoc(initial) || {\r\n PhysicalPersonDocumentTypeId: \"\",\r\n PhysicalPersonDocumentTypeName: \"\",\r\n PhysicalPersonDocumentNumber: \"\",\r\n PhysicalPersonDocumentWithoutExpiration: false,\r\n PhysicalPersonDocumentExpirationDate: undefined,\r\n PersonDocumentIssueCountryId: \"\",\r\n PersonDocumentIssueCountryName: \"\",\r\n PhysicalPersonDocumentIsMain: false\r\n }\r\n );\r\n\r\n useEffect(() => {\r\n if (documentTypes && !initial) {\r\n setNewDocument(d => ({\r\n ...d,\r\n PhysicalPersonDocumentTypeId: documentTypes[0].DocumentTypeId,\r\n PhysicalPersonDocumentTypeName: documentTypes[0].DocumentTypeName\r\n }));\r\n }\r\n }, [documentTypes, initial]);\r\n\r\n const onChange = (name, value, countryName) => {\r\n const newNewDocument = {\r\n ...newDocument,\r\n [name]: value\r\n };\r\n if (name === \"PersonDocumentIssueCountryId\") {\r\n newNewDocument.PersonDocumentIssueCountryName = countryName;\r\n }\r\n if (name === \"PhysicalPersonDocumentTypeId\") {\r\n documentTypes.map(d => {\r\n if (d.DocumentTypeId === value) {\r\n newNewDocument.PhysicalPersonDocumentTypeName = d.DocumentTypeName; \r\n }\r\n return {};\r\n });\r\n }\r\n if (name === \"PhysicalPersonDocumentWithoutExpiration\") {\r\n newDocument.PhysicalPersonDocumentExpirationDate = undefined;\r\n }\r\n setNewDocument({\r\n ...newNewDocument\r\n });\r\n };\r\n\r\n const onChangeDocumentCountry = name => setDocumentCountry(name);\r\n\r\n const fetchCountrySuggestion = name =>\r\n new Promise((resolve, reject) => {\r\n services.fetchAutosuggestCoutries({text: name}, response => {\r\n if (response && response.countries) {\r\n const suggestions = [];\r\n response.countries.map(c => {\r\n suggestions.push({\r\n id: c.Id,\r\n name: c.Name\r\n });\r\n return {};\r\n });\r\n resolve(suggestions);\r\n } else {\r\n reject();\r\n }\r\n });\r\n });\r\n\r\n const handleChangeDocumentCountry = (id, value) => {\r\n onChange(\"PersonDocumentIssueCountryId\", id, value);\r\n setDocumentCountry(value);\r\n };\r\n\r\n return (\r\n
    \r\n onToggle()}>\r\n \r\n {initial === undefined ? \"Append New \" : \"Edit \"}\r\n Document\r\n \r\n \r\n {documentTypes ? (\r\n
    \r\n doc.DocumentTypeId}\r\n getSelectItemName={doc => doc.DocumentTypeName}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n {!newDocument.PhysicalPersonDocumentWithoutExpiration && \r\n \r\n }\r\n \r\n \r\n \r\n ) : (\r\n \r\n )}\r\n
    \r\n \r\n onSave(newDocument)}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {loading ? \"Saving\" : \"Save\"}\r\n {\" \"}\r\n \r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nfunction parseDate(date) {\r\n if (date instanceof Date) {\r\n return date.toISOString();\r\n }\r\n\r\n if (!date || date == \"\" || date == \"0000-00-00\" || dateIsEmpty(date)) {\r\n return \"\";\r\n }\r\n \r\n if (date.indexOf(\"T\") > -1) {\r\n return date;\r\n }\r\n \r\n\r\n return new Date(`${date}T00:00`).toISOString();\r\n}\r\n\r\nModalDocument.propTypes = {\r\n open: PropTypes.bool.isRequired,\r\n onToggle: PropTypes.func.isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n documentTypes: PropTypes.array.isRequired,\r\n loading: PropTypes.bool.isRequired,\r\n initial: PropTypes.object,\r\n error: PropTypes.string,\r\n services: PropTypes.object.isRequired\r\n};\r\n\r\nModalDocument.defaultProps = {\r\n initial: undefined,\r\n error: undefined\r\n};\r\n\r\nexport default ModalDocument;\r\n","/* eslint-disable max-len */\r\nimport React from 'react';\r\nimport {\r\n Modal, ModalBody, ModalFooter, ModalHeader, Button,\r\n} from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\n\r\nfunction ModalError({\r\n open, onToggle, message,\r\n}) {\r\n return (\r\n \r\n Error\r\n \r\n {message}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nModalError.propTypes = {\r\n open: PropTypes.bool.isRequired,\r\n onToggle: PropTypes.func.isRequired,\r\n message: PropTypes.string.isRequired,\r\n};\r\n\r\nexport default ModalError;\r\n","import React, {useState, useEffect} from \"react\";\r\nimport {\r\n Modal,\r\n ModalBody,\r\n ModalFooter,\r\n ModalHeader,\r\n Form,\r\n Button,\r\n Spinner,\r\n Col,\r\n Input,\r\n Row,\r\n FormGroup,\r\n Label\r\n} from \"reactstrap\";\r\nimport LaddaButton, {EXPAND_RIGHT} from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\nimport {FormField, SelectFormField, CustomFormInput, CheckFormField} from \"../../../utils/FormFields\";\r\nimport {BankAccountStatus} from \"../Account/types\";\r\nimport Autosuggest from \"../../AutosuggestCompliance\";\r\nimport { OptionsWhyWithoutTIN } from \"../Person/types\";\r\n\r\n\r\nconst parseFiscal = (fiscal) => {\r\n if (fiscal) {\r\n return {\r\n PersonFiscalResidenceCountryId: fiscal.PersonFiscalResidenceCountryId,\r\n PersonFiscalResidenceCountryIso: fiscal.PersonFiscalResidenceCountryIso,\r\n PersonFiscalResidenceCountryName:fiscal.PersonFiscalResidenceCountryName,\r\n PersonFiscalResidenceTin: fiscal.PersonFiscalResidenceTin,\r\n PersonFiscalResidenceTaxId: fiscal.PersonFiscalResidenceTaxId,\r\n PersonFiscalResidenceTaxIdName: fiscal.PersonFiscalResidenceTaxIdName,\r\n PersonFiscalResidenceDateFrom: fiscal.PersonFiscalResidenceDateFrom,\r\n PersonFiscalResidenceDateTo: fiscal.PersonFiscalResidenceDateTo,\r\n PersonFiscalResidenceId: fiscal.PersonFiscalResidenceId,\r\n PersonFiscalResidenceNoTINOpt : fiscal.PersonFiscalResidenceNoTINOpt,\r\n PersonFiscalResidenceAddress : fiscal.PersonFiscalResidenceAddress,\r\n };\r\n }\r\n return undefined;\r\n};\r\n\r\n\r\nconst ModalFiscalResidence = ({\r\n open,\r\n errors,\r\n toggle,\r\n loading,\r\n onSave,\r\n archives,\r\n document,\r\n initial,\r\n services,\r\n person,\r\n}) => {\r\n\r\n\r\n const [fiscalresidence, setFiscalResidence] = useState(\r\n parseFiscal(initial) || {\r\n PersonFiscalResidenceCountryId: \"\",\r\n PersonFiscalResidenceCountryIso: \"\",\r\n PersonFiscalResidenceCountryName: \"\",\r\n PersonFiscalResidenceTin: \"\",\r\n PersonFiscalResidenceTaxId: undefined,\r\n PersonFiscalResidenceTaxIdName: \"\",\r\n PersonFiscalResidenceDateFrom: undefined,\r\n PersonFiscalResidenceDateTo: undefined,\r\n PersonFiscalResidenceId: 0,\r\n PersonFiscalResidenceAddress : \"\",\r\n }\r\n );\r\n\r\n const [documentCountry, setDocumentCountry] = useState(\r\n initial ? initial.PersonFiscalResidenceCountryName : \"\"\r\n );\r\n\r\n\r\n const onChangeDocumentCountry = name => setDocumentCountry(name);\r\n\r\n const fetchCountrySuggestion = name =>\r\n new Promise((resolve, reject) => {\r\n services.fetchAutosuggestCoutries({text: name}, response => {\r\n if (response && response.countries) {\r\n const suggestions = [];\r\n response.countries.map(c => {\r\n suggestions.push({\r\n id: c.Id,\r\n name: c.Name\r\n });\r\n return {};\r\n });\r\n resolve(suggestions);\r\n } else {\r\n reject();\r\n }\r\n });\r\n });\r\n\r\n const handleChangeDocumentCountry = (id, value) => {\r\n onChange(\"PersonDocumentIssueCountryId\", id, value);\r\n setDocumentCountry(value);\r\n setFiscalResidence(d => ({\r\n ...d,\r\n PersonFiscalResidenceCountryId: id,\r\n PersonFiscalResidenceCountryName: value,\r\n }));\r\n\r\n };\r\n \r\n\r\n const onChange = (name, value, countryName) => {\r\n const newFiscalResidence = {\r\n ...fiscalresidence,\r\n [name]: value\r\n };\r\n if (name === \"PersonFiscalResidenceCountryName\") {\r\n newFiscalResidence.PersonFiscalResidenceCountryName = countryName;\r\n }\r\n if (name === \"PersonFiscalResidenceTaxId\") {\r\n document.map(d => {\r\n if (d.DocumentTypeId === value) {\r\n newFiscalResidence.PersonFiscalResidenceTaxId = d.DocumentTypeId; \r\n newFiscalResidence.PersonFiscalResidenceTaxIdName = d.DocumentTypeName; \r\n }\r\n return {};\r\n });\r\n }\r\n setFiscalResidence({\r\n ...newFiscalResidence\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n if (document && !initial) {\r\n setFiscalResidence(d => ({\r\n ...d,\r\n PersonFiscalResidenceTaxId: document[0].DocumentTypeName,\r\n }));\r\n }\r\n if (initial) {\r\n setFiscalResidence(d => ({\r\n ...d,\r\n PersonFiscalResidenceCountryId: initial.PersonFiscalResidenceCountryId,\r\n PersonFiscalResidenceCountryIso: initial.PersonFiscalResidenceCountryIso,\r\n PersonFiscalResidenceCountryName:initial.PersonFiscalResidenceCountryName,\r\n PersonFiscalResidenceTin: initial.PersonFiscalResidenceTin,\r\n PersonFiscalResidenceTaxId: initial.PersonFiscalResidenceTaxId,\r\n PersonFiscalResidenceTaxIdName: initial.PersonFiscalResidenceTaxIdName,\r\n PersonFiscalResidenceDateFrom: initial.PersonFiscalResidenceDateFrom === '0000-00-00T00:00:00'? new Date() : initial.PersonFiscalResidenceDateFrom,\r\n PersonFiscalResidenceDateTo: initial.PersonFiscalResidenceDateTo === '0000-00-00T00:00:00'? new Date() : initial.PersonFiscalResidenceDateTo,\r\n PersonFiscalResidenceId: initial.PersonFiscalResidenceId,\r\n PersonFiscalResidenceNoTINOpt : initial.PersonFiscalResidenceNoTINOpt,\r\n PersonFiscalResidenceAddress : initial.PersonFiscalResidenceAddress,\r\n\r\n }));\r\n setDocumentCountry(initial.PersonFiscalResidenceCountryName)\r\n }\r\n }, [document, initial]);\r\n\r\n return (\r\n \r\n \r\n {initial === undefined ? \"New \" : \"Edit \"}\r\n Fiscal Residence\r\n \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n {fiscalresidence.PersonFiscalResidenceTin === '' && \r\n item.id}\r\n getSelectItemName={(item) => item.text}\r\n />}\r\n \r\n {document ? (\r\n i.DocumentTypeId}\r\n getSelectItemName={i => i.DocumentTypeName}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n onSave(fiscalresidence)}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {loading ? \" Saving\" : \" Save\"}\r\n \r\n \r\n
    \r\n );\r\n}\r\n\r\nModalFiscalResidence.propTypes = {\r\n open: PropTypes.bool.isRequired,\r\n toggle: PropTypes.func.isRequired,\r\n loading: PropTypes.bool.isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n document: PropTypes.array,\r\n initial: PropTypes.object,\r\n};\r\n\r\nModalFiscalResidence.defaultProps = {\r\n document : undefined,\r\n};\r\n\r\nexport default ModalFiscalResidence;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from \"reactstrap\";\r\nimport style from \"./styles.module.scss\";\r\nimport LaddaButton, { SLIDE_LEFT } from \"react-ladda\";\r\nimport { LoadingField, FormSelect } from \"../../Asset/Controls\";\r\n\r\nconst initialFields = {\r\n AccountGroupId: undefined,\r\n AccountGroupValue: undefined,\r\n AccountGroupName: undefined,\r\n};\r\n\r\nconst ModalGroup = ({ open, toggle, services, group, onConfirm }) => {\r\n const [groups, setGroups] = useState(false);\r\n const [values, setValues] = useState([]);\r\n\r\n const [fields, setFields] = useState(initialFields);\r\n const [errors, setErrors] = useState({});\r\n const [loading, setLoading] = useState(false);\r\n\r\n useEffect(() => {\r\n if (group) {\r\n setFields(group);\r\n } else {\r\n setFields(initialFields);\r\n }\r\n }, [group]);\r\n\r\n useEffect(() => {\r\n services.getAccountGroups({}, (response) => {\r\n if (response && response.items) {\r\n setGroups(response.items);\r\n\r\n if (!group) {\r\n if (response.items.length > 0) {\r\n setFields({\r\n ...fields,\r\n AccountGroupId: response.items[0].AccountGroupId,\r\n AccountGroupName: response.items[0].AccountGroupName,\r\n });\r\n }\r\n }\r\n }\r\n });\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (fields.AccountGroupId) {\r\n for (var i = 0; i < groups.length; i++) {\r\n if (Number(groups[i].AccountGroupId) == Number(fields.AccountGroupId)) {\r\n setValues(groups[i].Values);\r\n }\r\n }\r\n }\r\n }, [fields.AccountGroupId]);\r\n\r\n const onChange = (name, value) => {\r\n let groupName = \"\";\r\n if (name === \"AccountGroupId\") {\r\n for (var i = 0; i < groups.length; i++) {\r\n if (Number(groups[i].AccountGroupId) == Number(value)) {\r\n groupName = groups[i].AccountGroupName;\r\n }\r\n }\r\n setFields({ ...fields, [name]: value, AccountGroupName: groupName });\r\n } else {\r\n setFields({ ...fields, [name]: value });\r\n }\r\n setErrors({ ...errors, [name]: undefined });\r\n };\r\n\r\n return (\r\n \r\n Add Account group\r\n \r\n {groups ? (\r\n i.AccountGroupId}\r\n getSelectItemName={(i) => i.AccountGroupName}\r\n value={fields.AccountGroupId}\r\n onChange={onChange}\r\n />\r\n ) : (\r\n \r\n )}\r\n {values ? (\r\n i.AccountGroupValue}\r\n getSelectItemName={(i) => i.AccountGroupValue}\r\n value={fields.AccountGroupValue}\r\n onChange={onChange}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n onConfirm(fields)}\r\n data-style={SLIDE_LEFT}\r\n >\r\n \r\n Save\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default ModalGroup;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport {\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Button,\r\n Input,\r\n Label,\r\n Form,\r\n FormGroup,\r\n CustomInput,\r\n} from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\n\r\nimport {\r\n PhysicalPersonRelationshipAccount,\r\n PhysicalPersonRelationshipAccountJuridical,\r\n PersonType,\r\n} from \"../Person/types\";\r\nimport Autosuggest from \"../../AutosuggestCompliance\";\r\n\r\nfunction holderIsComplete(holder, role) {\r\n return (\r\n (holder.PersonId &&\r\n holder.PersonId > 0 &&\r\n (Object.keys(PhysicalPersonRelationshipAccount).indexOf(holder.HoldersRelationship) > -1 ||\r\n role == \"Beneficiary\") &&\r\n Object.keys(PhysicalPersonRelationshipAccountJuridical).indexOf(holder.HoldersRelationshipJuridical) >\r\n -1) ||\r\n role == \"Beneficiary\"\r\n );\r\n}\r\n\r\nconst initialAccountHolder = (accountId, role) => ({\r\n AccountId: accountId,\r\n PersonId: undefined,\r\n PersonName: undefined,\r\n PersonType: PersonType.Physical,\r\n HoldersRelationship: role == \"Beneficiary\" ? \"Beneficiary\" : PhysicalPersonRelationshipAccount.Holder,\r\n HoldersRelationshipJuridical: PhysicalPersonRelationshipAccountJuridical.None,\r\n HoldersIsManager: false,\r\n HoldersIsController: false,\r\n isMainHolder: false,\r\n deleteHolder: false,\r\n HoldersOrderManaged: false,\r\n HoldersOrderWritten: false,\r\n HoldersOrderWeb: false,\r\n HoldersOrderViaLink: false,\r\n AccountHolderIsBeneficiary: role == \"Beneficiary\",\r\n HoldersRelationshipDescription: \"\",\r\n});\r\n\r\nconst ModalHolder = ({ open, toggle, onSave, account, saving, holders, services, role, Link }) => {\r\n const [newHolder, setNewHolder] = useState(initialAccountHolder(account.AccountId, role));\r\n const [personSearch, setPersonSearch] = useState(\"\");\r\n const [existPerson, setExistPerson] = useState(false);\r\n\r\n const onSuggestionFetchRequested = (value) =>\r\n new Promise((resolve) => {\r\n let relation =\r\n newHolder.HoldersRelationshipJuridical === \"Holder\" ? PersonType.Juridical : PersonType.Physical;\r\n if (newHolder.HoldersRelationshipJuridical == \"Beneficiary\" && !account.AccountIsPhysical)\r\n relation = PersonType.All;\r\n services.fetchPersonSuggestion(\r\n { name: value, personType: account.AccountIsPhysical ? PersonType.Physical : relation },\r\n (response) => {\r\n const suggestions = [];\r\n if (response && response.suggestions) {\r\n response.suggestions.forEach((p) => {\r\n let exists = false;\r\n holders.forEach((h) => {\r\n if (parseInt(h.AccountHolderId, 10) === parseInt(p.Id, 10) && !h.AccountHolderIsBeneficiary) {\r\n exists = true;\r\n }\r\n });\r\n if (!exists) {\r\n suggestions.push({\r\n id: p.Id,\r\n name: p.Name,\r\n });\r\n }\r\n });\r\n }\r\n resolve(suggestions);\r\n }\r\n );\r\n });\r\n\r\n const onChangeSuggest = (value) => {\r\n setPersonSearch(String(value));\r\n };\r\n\r\n const onSuggestionSelected = (id, value) => {\r\n let relation =\r\n newHolder.HoldersRelationshipJuridical === \"Holder\" ? PersonType.Juridical : PersonType.Physical;\r\n setExistPerson(false);\r\n let exists = false;\r\n holders.forEach((h) => {\r\n if (parseInt(h.AccountHolderId, 10) === parseInt(id, 10) && h.AccountHolderIsBeneficiary) {\r\n exists = true;\r\n }\r\n });\r\n if (exists) {\r\n setExistPerson(true);\r\n setNewHolder({\r\n ...newHolder,\r\n PersonId: id,\r\n PersonName: value,\r\n AccountHolderIsBeneficiary: true,\r\n PersonType: relation,\r\n });\r\n } else {\r\n setNewHolder({\r\n ...newHolder,\r\n PersonId: id,\r\n PersonName: value,\r\n PersonType: relation,\r\n });\r\n }\r\n onChangeSuggest(value);\r\n };\r\n\r\n const onChange = (name, value) => {\r\n setNewHolder({\r\n ...newHolder,\r\n [name]: value,\r\n });\r\n };\r\n\r\n const handleSave = () => {\r\n const saveHolder = {\r\n [account.AccountId]: newHolder,\r\n };\r\n setPersonSearch(\"\");\r\n onSave(saveHolder);\r\n toggle();\r\n };\r\n\r\n return (\r\n \r\n \r\n New Account {role == \"Beneficiary\" ? \"Beneficiary\" : \"Holder\"}\r\n \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n {role == \"Holder\" && (\r\n \r\n {account.AccountIsPhysical ? (\r\n \r\n \r\n \r\n Person Relationship:{\" \"}\r\n \r\n onChange(\"HoldersRelationship\", e.target.value)}\r\n value={newHolder.HoldersRelationship}\r\n >\r\n {Object.keys(PhysicalPersonRelationshipAccount).map((key) => (\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n Is Beneficiary?{\" \"}\r\n \r\n onChange(\"AccountHolderIsBeneficiary\", e.target.checked)}\r\n />\r\n {existPerson && (\r\n \r\n \r\n Person already exists in Beneficiary Tab, \"Is Beneficiary\" is clicked by default\r\n \r\n )}\r\n \r\n \r\n ) : (\r\n \r\n \r\n \r\n Person Relationship Juridical:\r\n \r\n onChange(\"HoldersRelationshipJuridical\", e.target.value)}\r\n value={newHolder.HoldersRelationshipJuridical}\r\n >\r\n {Object.keys(PhysicalPersonRelationshipAccountJuridical).map((key) => (\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n Holder is Controller:\r\n onChange(\"HoldersIsController\", !newHolder.HoldersIsController)}\r\n />\r\n \r\n \r\n \r\n \r\n Holder is Manager:\r\n onChange(\"HoldersIsManager\", !newHolder.HoldersIsManager)}\r\n />\r\n \r\n \r\n \r\n )}\r\n \r\n )}\r\n \r\n \r\n
    \r\n {account.AccountStatus === \"InProcess\" && (\r\n \r\n )}\r\n \r\n
    \r\n \r\n \r\n Holder Relationship Description:\r\n onChange(\"HoldersRelationshipDescription\", e.target.value)}\r\n />\r\n \r\n \r\n
    \r\n \r\n \r\n handleSave()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {saving ? \"Saving\" : \"Save\"}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nModalHolder.propTypes = {\r\n open: PropTypes.bool.isRequired,\r\n toggle: PropTypes.func.isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n account: PropTypes.object.isRequired,\r\n saving: PropTypes.func.isRequired,\r\n holders: PropTypes.array.isRequired,\r\n services: PropTypes.object.isRequired,\r\n role: PropTypes.string.isRequired,\r\n};\r\n\r\nexport default ModalHolder;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Modal, ModalBody, ModalFooter, ModalHeader, Form, Button, Spinner } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\n\r\nimport { FormField, SelectFormField } from \"../../../utils/FormFields\";\r\nimport {InstructionTarget } from \"../Account/types\";\r\nimport { Combobox, Field, Symbol } from \"../../Modal/Order/Field/Field\";\r\n\r\nconst canSubmit = (ra) => {\r\n const condition1 = ra.AccountInstructionType!=\"\" && ra.AccountInstructionsCurrency!=\"\" && ra.AccountInstructionTarget!=\"\";\r\n const condition2 = (ra.AccountInstructionTarget == \"Reinvest\" && ra.AccountInstructionAssetId!=\"\" &&\r\n ra.AccountInstructionAssetId!=0\r\n );\r\n const condition3 = (ra.AccountInstructionTarget == \"Withdraw\" && ra.AccountInstructionBankAccountItemId!=\"\" &&\r\n ra.AccountInstructionBankAccountItemId!=0\r\n );\r\n if (condition1 && (condition2 || condition3)) {\r\n return true;\r\n }\r\n};\r\n\r\nconst ModalInstruction = ({ open, instruction, toggle, saving, bankAccounts, onSave, onChange, currencies, services, editMode }) => {\r\n\r\n const [bankAccount, setBankAccount] = useState([]);\r\n const CorporateEventType= {'Coupon':'Coupon',\r\n 'Dividend':'Dividend',\r\n 'Sink':'Sink',\r\n 'Maturity':'Maturity',\r\n }\r\n\r\n\r\n\r\n\r\n\r\n useEffect(() => {\r\n if (instruction.AccountInstructionsCurrency) {\r\n let baFiltered=bankAccounts.filter((a) => a.BankAccountCurrency == instruction.AccountInstructionsCurrency)\r\n setBankAccount(baFiltered);\r\n if (baFiltered.length > 0 && (instruction.AccountInstructionBankAccountItemId == \"\"|| instruction.AccountInstructionBankAccountItemId == 0)) {\r\n onChange(\"AccountInstructionBankAccountItemId\", baFiltered[0].BankAccountItemId);\r\n }\r\n }\r\n }, [instruction.AccountInstructionsCurrency]);\r\n\r\n\r\n return (\r\n \r\n Instructions\r\n \r\n
    \r\n \r\n i}\r\n getSelectItemName={(i) => CorporateEventType[i]}\r\n onChange={onChange}\r\n disabled={editMode}\r\n />\r\n {currencies ? (\r\n i.currencyId}\r\n getSelectItemName={(i) => i.currencyISO}\r\n disabled={editMode}\r\n />\r\n ) : (\r\n \r\n )}\r\n i}\r\n getSelectItemName={(i) => InstructionTarget[i]}\r\n />\r\n {instruction.AccountInstructionTarget == \"Reinvest\" && (\r\n
    \r\n \r\n Fund:{\" \"}\r\n \r\n onChange(\"AccountInstructionAssetId\" ,parseInt(v.AssetId), v.SettCurrencyName, v.AssetTicker)}\r\n placeholder={\"Symbol\"}\r\n hideInfo={true}\r\n disabled={false}\r\n value={instruction.AccountInstructionAssetticker}\r\n description={instruction.AssetDescription}\r\n assetid={instruction.AccountInstructionAssetId}\r\n attrId={\"AssetId\"}\r\n attrTicker={\"AssetTicker\"}\r\n attrCurrency={\"SettCurrencyName\"}\r\n attrDescription={\"AssetDescription\"}\r\n {...services}\r\n />\r\n
    \r\n )}\r\n {instruction.AccountInstructionTarget == \"Withdraw\" && (\r\n
    \r\n \r\n Bank Account:{\" \"}\r\n \r\n ({\r\n id: a.BankAccountItemId,\r\n description: `${a.BankAccountName} - ${a.BankAccountNumber}`,\r\n }))}\r\n disabled={instruction.AccountInstructionTarget != \"Withdraw\" || instruction.AccountInstructionsCurrency==\"\"}\r\n onChange={(id) =>\r\n onChange(\"AccountInstructionBankAccountItemId\", id\r\n )\r\n }\r\n emptyLabel={\"Bank Account.\"}\r\n />\r\n
    \r\n )}\r\n\r\n \r\n \r\n \r\n
    \r\n \r\n \r\n \r\n {saving ? \" Saving\" : \" Save\"}\r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default ModalInstruction;\r\n","import React, {useState, useEffect} from \"react\";\r\nimport {\r\n Modal,\r\n ModalBody,\r\n ModalFooter,\r\n ModalHeader,\r\n Form,\r\n Button,\r\n Col,\r\n Row,\r\n Label,\r\n Input\r\n} from \"reactstrap\";\r\nimport LaddaButton, {EXPAND_RIGHT} from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\nimport {CustomFormInput, SelectFormField,FormField} from \"../../../utils/FormFields\";\r\nimport Autosuggest from \"../../AutosuggestCompliance\";\r\nimport { showToast,LegalAddresses } from \"../../../utils/Helper\";\r\n \r\n\r\n\r\nconst ModalLegalAddress = ({\r\n open,\r\n errors,\r\n toggle,\r\n onSave,\r\n services,\r\n onChangeAddress,\r\n disabled,\r\n loading,\r\n initial\r\n}) => {\r\n\r\n const [legalAddress, setLegalAddress] = useState(initial);\r\n const [sending, setSending] = useState(false);\r\n const [showError, setShowError] = useState(false);\r\n const saveLegalAddress = () => {\r\n setShowError(false);\r\n if(validForm()){\r\n setSending(true);\r\n onSave(legalAddress, (result) => {\r\n if(result){\r\n setSending(false);\r\n toggle();\r\n }\r\n else{\r\n setSending(false);\r\n }\r\n }\r\n );\r\n }else{\r\n setShowError(true);\r\n showToast(\"Please fill all required fields\",true)\r\n }\r\n };\r\n\r\n const validForm = () => {\r\n if (legalAddress.LegalAddressCountryId &&\r\n legalAddress.LegalAddressCityId &&\r\n legalAddress.LegalAddressStreet){\r\n return true;\r\n }\r\n else {\r\n return false;\r\n };\r\n };\r\n\r\n const fetchCountrySuggestion = name =>\r\n new Promise((resolve, reject) => {\r\n services.fetchAutosuggestCoutries({text: name}, response => {\r\n if (response && response.countries) {\r\n const suggestions = [];\r\n response.countries.map(c => {\r\n suggestions.push({\r\n id: c.Id,\r\n name: c.Name\r\n });\r\n return {};\r\n });\r\n resolve(suggestions);\r\n } else {\r\n reject();\r\n }\r\n });\r\n });\r\n \r\n useEffect(() => {\r\n if(initial){\r\n setSending(false);\r\n setLegalAddress(initial);\r\n }else{\r\n setSending(false);\r\n setLegalAddress({\r\n LegalAddressCountryId: undefined,\r\n LegalAddressCountryName: undefined,\r\n LegalAddressStateId: undefined,\r\n LegalAddressStateName: undefined,\r\n LegalAddressCityId: undefined,\r\n LegalAddressCityName: undefined,\r\n LegalAddressStreet: undefined,\r\n LegalAddressZipCode: 0,\r\n LegalAddressType:LegalAddresses.Personal\r\n });\r\n }\r\n }, [initial]);\r\n\r\n const changeAddress = (name, value) => {\r\n setLegalAddress({\r\n ...legalAddress,\r\n [name]: value\r\n });\r\n }\r\n\r\n const [addressStates, setAddressStates] = useState(undefined);\r\n const [country, setCountry] = useState({\r\n id: legalAddress.LegalAddressCountryId\r\n });\r\n \r\n const fetchCitySuggestion = name =>\r\n new Promise((resolve, reject) => {\r\n services.fetchGetCityAutosuggest(\r\n {\r\n name: name,\r\n nameState: legalAddress.LegalAddressStateName,\r\n nameCountry: legalAddress.LegalAddressCountryName\r\n },\r\n response => {\r\n if (response && response.suggestions) {\r\n const suggestions = [];\r\n response.suggestions.map(c => {\r\n suggestions.push({\r\n id: c.Id,\r\n name: c.Name\r\n });\r\n return {};\r\n });\r\n resolve(suggestions);\r\n } else {\r\n reject();\r\n }\r\n }\r\n );\r\n });\r\n \r\n const fetchStateSuggestion = name =>\r\n new Promise((resolve, reject) => {\r\n services.fetchGetStateAutosuggest(\r\n {nameState: name, nameCountry: legalAddress.LegalAddressCountryName},\r\n response => {\r\n if (response && response.suggestions) {\r\n const suggestions = [];\r\n response.suggestions.map(c => {\r\n suggestions.push({\r\n id: c.Id,\r\n name: c.Name\r\n });\r\n return {};\r\n });\r\n resolve(suggestions);\r\n } else {\r\n reject();\r\n }\r\n }\r\n );\r\n });\r\n \r\n \r\n const handleChangeCity = (id, value) => {\r\n setLegalAddress({\r\n ...legalAddress,\r\n LegalAddressCityId: id,\r\n LegalAddressCityName: value\r\n });\r\n };\r\n \r\n \r\n const onChangeCity = value => {\r\n setLegalAddress({...legalAddress, LegalAddressCityName: value});\r\n };\r\n \r\n const handleChangeState = (id, value) => {\r\n setLegalAddress({\r\n ...legalAddress,\r\n LegalAddressStateId: id,\r\n LegalAddressStateName: value\r\n });\r\n };\r\n \r\n const onChangeState = value => {\r\n setLegalAddress({...legalAddress,\r\n LegalAddressStateId: undefined,\r\n LegalAddressStateName: value});\r\n };\r\n \r\n const handleChangeCountry = (id, value) => {\r\n setCountry({ id: id });\r\n setLegalAddress({\r\n ...legalAddress,\r\n LegalAddressCountryName: value,\r\n LegalAddressCountryId: id,\r\n LegalAddressStateId: '',\r\n LegalAddressStateName: '',\r\n LegalAddressCityId: '',\r\n LegalAddressCityName: ''\r\n });\r\n };\r\n \r\n const onChangeCountry = value => {\r\n setLegalAddress({\r\n ...legalAddress,\r\n LegalAddressCountryName: value\r\n });\r\n };\r\n\r\n\r\n return (\r\n \r\n \r\n {initial === undefined ? \"New \" : \"Edit \"}\r\n Legal Address\r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n i}\r\n getSelectItemName={(i) => i}\r\n onChange={changeAddress}\r\n value={legalAddress.LegalAddressType}\r\n name=\"LegalAddressType\"\r\n />\r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n saveLegalAddress()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {sending ? \" Saving\" : \" Save\"}\r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default ModalLegalAddress;\r\n","import React, { useState } from 'react';\r\nimport {\r\n Modal,\r\n ModalBody,\r\n ModalFooter,\r\n ModalHeader,\r\n Form,\r\n Button,\r\n} from 'reactstrap';\r\nimport PropTypes from 'prop-types';\r\nimport LaddaButton, { EXPAND_RIGHT } from 'react-ladda';\r\nimport { FormField } from '../../../utils/FormFields';\r\n\r\nconst ModalPersonalReference = ({\r\n open,\r\n toggle,\r\n saving,\r\n onSave,\r\n}) => {\r\n const [newReference, setNewReference] = useState({\r\n AccountPersonalReferenceId: 0,\r\n AccountPersonalReferenceName: '',\r\n AccountPersonalReferencePhone: '',\r\n });\r\n\r\n const handleChange = (name, value) => {\r\n setNewReference({\r\n ...newReference,\r\n [name]: value,\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n Add New Personal Reference\r\n \r\n \r\n
    \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n Cancel\r\n \r\n onSave(newReference)}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {saving ? ' Saving' : ' Save'}\r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nModalPersonalReference.propTypes = {\r\n open: PropTypes.bool.isRequired,\r\n toggle: PropTypes.func.isRequired,\r\n saving: PropTypes.bool.isRequired,\r\n onSave: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default ModalPersonalReference;\r\n","/* eslint-disable max-len */\r\nimport React, {useState, useEffect} from \"react\";\r\nimport {\r\n Modal,\r\n ModalBody,\r\n ModalFooter,\r\n ModalHeader,\r\n Form,\r\n Button,\r\n Spinner\r\n} from \"reactstrap\";\r\nimport LaddaButton, {EXPAND_RIGHT} from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport {preCheckObjectEmpty} from \"./ModalArchive\";\r\nimport {\r\n FormField,\r\n SelectFormField,\r\n CustomFormInput,\r\n CheckFormField\r\n} from \"../../../utils/FormFields\";\r\nimport Autosuggest from \"../../AutosuggestCompliance\";\r\n\r\nconst checkPhone = phone => phone.PhoneNumber;\r\n\r\nconst ModalPhone = ({\r\n open,\r\n onToggle,\r\n onSave,\r\n phoneTypes,\r\n initial,\r\n error,\r\n loading,\r\n messageShow,\r\n message,\r\n services\r\n}) => {\r\n const [newPhone, setNewPhone] = useState({\r\n PhoneId: 0,\r\n PhoneType: \"\",\r\n PhoneNumber: \"\"\r\n });\r\n\r\n useEffect(() => {\r\n if (phoneTypes && !initial) {\r\n setNewPhone(d => ({\r\n ...d,\r\n PhoneType: phoneTypes[0].PhoneTypeDescription\r\n }));\r\n }\r\n if (initial) {\r\n setNewPhone(d => ({\r\n ...d,\r\n PhoneType: initial.PhoneType,\r\n PhoneNumber: initial.PhoneNumber,\r\n PhoneId: initial.PhoneId\r\n }));\r\n }\r\n }, [phoneTypes, initial]);\r\n\r\n const onChange = (name, value) => {\r\n const newNewPhone = {\r\n ...newPhone,\r\n [name]: value\r\n };\r\n if (name === \"PhoneType\") {\r\n phoneTypes.map(d => {\r\n if (d.PhoneType === value) {\r\n newNewPhone.PhoneType = d.PhoneType;\r\n }\r\n return {};\r\n });\r\n }\r\n setNewPhone({\r\n ...newNewPhone\r\n });\r\n };\r\n\r\n return (\r\n
    \r\n onToggle()}>\r\n \r\n {initial === undefined ? \"Append New \" : \"Edit \"}\r\n Phone\r\n \r\n \r\n {phoneTypes ? (\r\n
    \r\n phoneTypes.PhoneTypeDescription}\r\n getSelectItemName={phoneTypes =>\r\n phoneTypes.PhoneTypeDescription\r\n }\r\n />\r\n \r\n \r\n ) : (\r\n \r\n )}\r\n
    \r\n \r\n onSave(newPhone)}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {loading ? \"Saving\" : \"Save\"}\r\n {\" \"}\r\n \r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nModalPhone.propTypes = {\r\n open: PropTypes.bool.isRequired,\r\n onToggle: PropTypes.func.isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n phoneTypes: PropTypes.array.isRequired,\r\n loading: PropTypes.bool.isRequired,\r\n initial: PropTypes.object,\r\n error: PropTypes.string,\r\n services: PropTypes.object.isRequired\r\n};\r\n\r\nModalPhone.defaultProps = {\r\n initial: undefined,\r\n error: undefined\r\n};\r\n\r\nexport default ModalPhone;\r\n","import React from 'react';\r\nimport {\r\n Modal,\r\n ModalBody,\r\n ModalFooter,\r\n ModalHeader,\r\n Form,\r\n Button,\r\n Spinner,\r\n} from 'reactstrap';\r\nimport LaddaButton, { EXPAND_RIGHT } from 'react-ladda';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { FormField, SelectFormField } from '../../../utils/FormFields';\r\n\r\nconst canSubmit = (ra) => (ra.RelatedAccountName && ra.RelatedAccountNumber);\r\n\r\nconst ModalRelatedAccount = ({\r\n open, relatedAccount, toggle, saving, onSave, onChange, banks,\r\n}) => (\r\n \r\n \r\n Related Account\r\n \r\n \r\n
    \r\n \r\n \r\n {banks ? (\r\n i.Id}\r\n getSelectItemName={(i) => i.Name}\r\n />\r\n ) : }\r\n \r\n
    \r\n \r\n \r\n Cancel\r\n \r\n \r\n {saving ? ' Saving' : ' Save'}\r\n \r\n \r\n
    \r\n );\r\n\r\nModalRelatedAccount.propTypes = {\r\n open: PropTypes.bool.isRequired,\r\n relatedAccount: PropTypes.object.isRequired,\r\n toggle: PropTypes.func.isRequired,\r\n saving: PropTypes.bool.isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n banks: PropTypes.array,\r\n};\r\n\r\nModalRelatedAccount.defaultProps = {\r\n banks: undefined,\r\n};\r\n\r\nexport default ModalRelatedAccount;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Modal, ModalBody, ModalFooter, ModalHeader, Button, Form } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\nimport { FormField, CustomFormInput, SelectFormField, CheckFormField } from \"../../../utils/FormFields\";\r\nimport Autosuggest from \"../../AutosuggestCompliance\";\r\nimport { PersonType } from \"../Account/types\";\r\nimport { showToast } from \"../../../utils/Helper\";\r\n\r\nconst ModalShareHolder = ({\r\n open,\r\n onToggle,\r\n onSave,\r\n loading,\r\n initialShareHolder,\r\n shareHolders,\r\n personId,\r\n services,\r\n Link,\r\n onboarding,\r\n peopleRelated,\r\n userSession,\r\n headerText,\r\n}) => {\r\n const [newShareHolder, setNewShareHolder] = useState({\r\n ShareHolderId: initialShareHolder ? initialShareHolder.ShareHolderId : 0,\r\n ShareHolderDescription: initialShareHolder ? initialShareHolder.ShareHolderDescription : \"\",\r\n ShareHolderParticipationPercentage: initialShareHolder\r\n ? initialShareHolder.ShareHolderParticipationPercentage\r\n : 0,\r\n ShareHolderPersonId: initialShareHolder ? initialShareHolder.ShareHolderPersonId : undefined,\r\n ShareHolderPersonName: initialShareHolder ? initialShareHolder.ShareHolderPersonName : undefined,\r\n ShareHolderPersonType: initialShareHolder\r\n ? initialShareHolder.ShareHolderPersonType\r\n : PersonType.Physical,\r\n ShareHolderHasWebAccount: initialShareHolder ? initialShareHolder.ShareHolderHasWebAccount : false,\r\n ShareHolderIsReadOnly: initialShareHolder ? initialShareHolder.ShareHolderIsReadOnly : false,\r\n });\r\n\r\n const [personSearch, setPersonSearch] = useState(\r\n initialShareHolder ? initialShareHolder.ShareHolderPersonName : \"\"\r\n );\r\n\r\n const [showError, setShowError] = useState(false);\r\n const [suggestions, setSuggestions] = useState([]);\r\n\r\n const onSuggestionFetchRequested = (value) =>\r\n new Promise((resolve) => {\r\n const body = {\r\n name: value,\r\n personType: newShareHolder.ShareHolderPersonType,\r\n };\r\n services.fetchPersonSuggestion(body, (response) => {\r\n const suggestions = [];\r\n if (response && response.suggestions) {\r\n response.suggestions.map((s) => {\r\n let exists = false;\r\n shareHolders.map((sh) => {\r\n exists = exists || sh.ShareHolderPersonId === s.Id;\r\n return {};\r\n });\r\n if (!exists && s.Id !== personId) {\r\n suggestions.push({\r\n id: s.Id,\r\n name: s.Name,\r\n });\r\n }\r\n return {};\r\n });\r\n }\r\n setSuggestions(suggestions);\r\n resolve(suggestions);\r\n });\r\n });\r\n\r\n const [participation, setParticipation] = useState(false);\r\n const [hasWebAccount, setHasWebAccount] = useState(false);\r\n\r\n const saveShareHolder = (newShareHolder) => {\r\n setShowError(false);\r\n if (validForm(newShareHolder)) {\r\n onSave(newShareHolder);\r\n } else {\r\n setShowError(true);\r\n showToast(\"Please fill all required fields\", true);\r\n }\r\n };\r\n\r\n const validForm = (newShareHolder) => {\r\n if (\r\n newShareHolder.ShareHolderPersonType &&\r\n newShareHolder.ShareHolderPersonId &&\r\n (!participation || (participation && newShareHolder.ShareHolderParticipationPercentage > 0)) &&\r\n (!peopleRelated || (peopleRelated && newShareHolder.ShareHolderDescription.trim() !== \"\"))\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n };\r\n\r\n const onChangeSuggest = (value) => {\r\n setPersonSearch(value);\r\n };\r\n\r\n const onSuggestionSelected = (id, value) => {\r\n setNewShareHolder({\r\n ...newShareHolder,\r\n ShareHolderPersonId: id,\r\n ShareHolderPersonName: value,\r\n });\r\n setPersonSearch(value);\r\n };\r\n\r\n const onBlurPersonName = () => {\r\n const found = suggestions.find((s) => s.name === personSearch);\r\n if (!found) {\r\n setShowError(true);\r\n setPersonSearch(\"\");\r\n setNewShareHolder({\r\n ...newShareHolder,\r\n ShareHolderPersonId: undefined,\r\n ShareHolderPersonName: undefined,\r\n });\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (personSearch && suggestions.length > 0) {\r\n const found = suggestions.find((s) => s.name === personSearch);\r\n if (!found) {\r\n setShowError(true);\r\n setNewShareHolder({\r\n ...newShareHolder,\r\n ShareHolderPersonId: undefined,\r\n ShareHolderPersonName: undefined,\r\n });\r\n } else {\r\n setShowError(false);\r\n }\r\n }\r\n }, [personSearch, suggestions]);\r\n\r\n const onChange = (name, value) => {\r\n const shareHolder = {\r\n ...newShareHolder,\r\n [name]: value,\r\n };\r\n setNewShareHolder(shareHolder);\r\n };\r\n\r\n const onChangePersonType = (name, value) => {\r\n const shareHolder = {\r\n ...newShareHolder,\r\n [name]: value,\r\n ShareHolderPersonId: undefined,\r\n ShareHolderPersonName: undefined,\r\n };\r\n setNewShareHolder(shareHolder);\r\n setPersonSearch(\"\");\r\n };\r\n\r\n const preCheckPercentage = () => {\r\n let percentage = 0;\r\n shareHolders.map((s) => {\r\n if (s.ShareHolderId !== newShareHolder.ShareHolderId) {\r\n percentage += parseFloat(s.ShareHolderParticipationPercentage);\r\n }\r\n return {};\r\n });\r\n return percentage + parseFloat(newShareHolder.ShareHolderParticipationPercentage) > 100;\r\n };\r\n\r\n useEffect(() => {}, [newShareHolder]);\r\n\r\n return (\r\n
    \r\n \r\n \r\n {headerText ? headerText : initialShareHolder ? \"Edit Share Holder\" : \"Add New Share Holder\"}\r\n \r\n \r\n
    \r\n item}\r\n getSelectItemName={(item) => item}\r\n />\r\n \r\n \r\n \r\n \r\n {peopleRelated ? (\r\n
    \r\n setParticipation(!participation)}\r\n name=\"Participation\"\r\n />\r\n {participation && (\r\n \r\n \r\n \r\n )}\r\n
    \r\n ) : (\r\n \r\n \r\n \r\n )}\r\n {newShareHolder.ShareHolderPersonType === \"Physical\" && (\r\n \r\n
    \r\n \r\n
    \r\n {newShareHolder.ShareHolderHasWebAccount && (\r\n
    \r\n \r\n
    \r\n )}\r\n
    \r\n )}\r\n \r\n
    \r\n {userSession.IsReadOnly === false && (\r\n \r\n saveShareHolder(newShareHolder)}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Save\r\n {\" \"}\r\n \r\n \r\n )}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nModalShareHolder.propTypes = {\r\n open: PropTypes.bool.isRequired,\r\n onToggle: PropTypes.func.isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n initialShareHolder: PropTypes.object.isRequired,\r\n loading: PropTypes.bool.isRequired,\r\n shareHolders: PropTypes.array.isRequired,\r\n personId: PropTypes.string.isRequired,\r\n services: PropTypes.object.isRequired,\r\n headerText: PropTypes.string,\r\n};\r\n\r\nexport default ModalShareHolder;\r\n","import React, { useState } from 'react';\r\nimport {\r\n Modal, ModalHeader, ModalBody, ModalFooter, Button, Input, Label, Form, FormGroup,\r\n} from 'reactstrap';\r\nimport LaddaButton, { EXPAND_RIGHT } from 'react-ladda';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { AccountSignatureWayOfAction } from '../Account/types';\r\n\r\nfunction generateInitialSignature(id, holder, signature) {\r\n if (signature) return signature;\r\n return {\r\n SignatureSetId: id,\r\n SignatureSetPersonId: holder.AccountHolderId,\r\n SignatureSetPersonName: holder.AccountHolderName,\r\n SignatureSetWayOfAction: AccountSignatureWayOfAction.Joint,\r\n SignaturePeopleSelected: [],\r\n };\r\n}\r\n\r\nfunction generateCheckedObject(holders, signature) {\r\n const checkedObject = {};\r\n holders.forEach((h) => {\r\n checkedObject[h.AccountHolderId] = false;\r\n });\r\n if (signature) {\r\n signature.SignaturePeopleSelected.forEach((sp) => {\r\n checkedObject[sp.SignaturePersonId] = true;\r\n });\r\n }\r\n return checkedObject;\r\n}\r\n\r\nfunction signatureIsComplete(newSignature) {\r\n let res = true;\r\n Object.keys(newSignature).forEach((key) => {\r\n if (!newSignature[key] && (key !== 'SignatureSetId')) {\r\n res = false;\r\n }\r\n });\r\n if (newSignature.SignatureSetWayOfAction\r\n === AccountSignatureWayOfAction.Joint\r\n && newSignature.SignaturePeopleSelected.length === 0) {\r\n res = false;\r\n }\r\n return res;\r\n}\r\n\r\nconst ModalSignature = ({\r\n signature, holders, newSetId, onSave, saving, open, toggle,\r\n}) => {\r\n const [newSignature, setNewSignature] = useState(generateInitialSignature(\r\n newSetId,\r\n holders[0],\r\n signature,\r\n ));\r\n const [checkedHolder, setCheckedHolder] = useState(generateCheckedObject(holders, signature));\r\n const changeSignatureField = (name, value) => {\r\n if (name === 'SignaturePeopleSelected') {\r\n const people = newSignature.SignaturePeopleSelected;\r\n if (!checkedHolder[value]) {\r\n let personName = '';\r\n holders.forEach((h) => {\r\n if (parseInt(h.AccountHolderId, 10) === parseInt(value, 10)) {\r\n personName = h.AccountHolderName;\r\n }\r\n });\r\n people.push({\r\n SignaturePersonId: value,\r\n SignaturePersonName: personName,\r\n });\r\n } else {\r\n let index = -1;\r\n people.forEach((sp, i) => {\r\n if (parseInt(sp.SignaturePersonId, 10) === parseInt(value, 10)) {\r\n index = i;\r\n }\r\n });\r\n if (index > -1) people.splice(index, 1);\r\n }\r\n setCheckedHolder({\r\n ...checkedHolder,\r\n [value]: !checkedHolder[value],\r\n });\r\n setNewSignature({\r\n ...newSignature,\r\n SignaturePeopleSelected: people,\r\n });\r\n } else {\r\n let personName;\r\n if (name === 'SignatureSetPersonId') {\r\n holders.forEach((h) => {\r\n if (parseInt(h.AccountHolderId, 10) === parseInt(value, 10)) {\r\n personName = h.AccountHolderName;\r\n }\r\n });\r\n }\r\n setNewSignature({\r\n ...newSignature,\r\n [name]: value,\r\n SignatureSetPersonName: personName || newSignature.SignatureSetPersonName,\r\n SignaturePeopleSelected: [],\r\n });\r\n setCheckedHolder(generateCheckedObject(holders, undefined));\r\n }\r\n };\r\n\r\n return (\r\n \r\n {signature ? 'Edit Signature Set' : 'Create a new Signature Set'}\r\n \r\n
    \r\n \r\n \r\n changeSignatureField('SignatureSetPersonId', e.target.value)}>\r\n {holders && holders.map((h, i) => (\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n changeSignatureField('SignatureSetWayOfAction', e.target.value)}>\r\n {Object.keys(AccountSignatureWayOfAction).map((key, i) => (\r\n \r\n ))}\r\n \r\n \r\n {newSignature.SignatureSetWayOfAction === AccountSignatureWayOfAction.Joint\r\n && (\r\n \r\n \r\n {holders.map((h, i) => {\r\n if (parseInt(h.AccountHolderId, 10)\r\n === parseInt(newSignature.SignatureSetPersonId, 10)) return null;\r\n return (\r\n \r\n \r\n \r\n );\r\n })}\r\n \r\n )}\r\n
    \r\n
    \r\n \r\n \r\n Cancel\r\n\r\n \r\n onSave(newSignature)}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {saving ? 'Saving' : 'Save'}\r\n\r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nModalSignature.propTypes = {\r\n signature: PropTypes.object.isRequired,\r\n holders: PropTypes.array.isRequired,\r\n newSetId: PropTypes.any.isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n saving: PropTypes.bool.isRequired,\r\n open: PropTypes.bool.isRequired,\r\n toggle: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default ModalSignature;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"styles-module_modal_up992\",\"container\":\"styles-module_container_Ov_bC\"};","import React, { useEffect } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport { Row, Col } from \"reactstrap\";\r\n\r\nimport { OptionsWhyWithoutTIN, PersonType } from \"../types\";\r\nimport { FormField, SelectFormField, CustomFormInput } from \"../../../../utils/FormFields\";\r\nimport Autosuggest from \"../../../AutosuggestCompliance\";\r\n\r\nfunction FiscalResidence({\r\n person,\r\n onChange,\r\n documentTypes,\r\n autosuggests,\r\n onChangeAutosuggest,\r\n disabled,\r\n errors,\r\n services,\r\n}) {\r\n const fetchCountrySuggestion = (name) =>\r\n new Promise((resolve, reject) => {\r\n services.fetchAutosuggestCoutries({ text: name }, (response) => {\r\n if (response && response.countries) {\r\n const suggestions = [];\r\n response.countries.map((c) => {\r\n suggestions.push({\r\n id: c.Id,\r\n name: c.Name,\r\n });\r\n return {};\r\n });\r\n resolve(suggestions);\r\n } else {\r\n reject();\r\n }\r\n });\r\n });\r\n\r\n const onChangeCountry = (value) => onChangeAutosuggest(\"PersonFiscalResidenceCountry\", value);\r\n\r\n const handleSelectCountry = (id, value) => {\r\n onChange(\"PersonFiscalResidenceCountryId\", id, value);\r\n onChangeCountry(value);\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n {person.PersonType === PersonType.Physical && documentTypes && (\r\n \r\n \r\n i.DocumentTypeId}\r\n getSelectItemName={(i) => i.DocumentTypeName}\r\n disabled={disabled}\r\n error={errors.PersonFiscalResidenceTaxId}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n {person.PersonType === PersonType.Physical && person.PersonFiscalResidenceTIN === \"\" && (\r\n \r\n item.id}\r\n getSelectItemName={(item) => item.text}\r\n disabled={disabled}\r\n error={errors.PersonFiscalResidenceNoTINOpt}\r\n />\r\n \r\n \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nFiscalResidence.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n autosuggests: PropTypes.object.isRequired,\r\n onChangeAutosuggest: PropTypes.func.isRequired,\r\n disabled: PropTypes.bool.isRequired,\r\n errors: PropTypes.object.isRequired,\r\n services: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default FiscalResidence;\r\n","import React, { useState } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport { Row, Col, Label } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { PersonType } from \"../../types\";\r\n\r\nimport { FormField, SelectFormField, CustomFormInput, CheckFormField } from \"../../../../../utils/FormFields\";\r\nimport JuridicalPersonLegalAddress from \"../LegalAddress\";\r\nimport JuridicalPersonFiscalResidence from \"../FiscalResidence\";\r\nimport Autosuggest from \"../../../../AutosuggestCompliance\";\r\nimport CircularProggress from \"../../../../CircularProgress/CircularProgress\";\r\nimport { toDateTime } from \"../../../../../utils/dateUtils\";\r\nimport { PersonMode } from \"../../../../../utils/Helper\";\r\nimport { CurrencyType, RelatedFrom, shareType, PersonStatus } from \"../../types\";\r\nimport CustomDropdown from \"../../../../CustomDropdown/CustomDropdown\";\r\n\r\nfunction JuridicalPersonProfile({\r\n person,\r\n onChange,\r\n legalAddress,\r\n onChangeAddress,\r\n autosuggests,\r\n onChangeAutosuggest,\r\n documentTypes,\r\n entityTypes,\r\n activitySectors,\r\n societyTypes,\r\n publicPositions,\r\n disabled,\r\n errors,\r\n companyLinks,\r\n professions,\r\n services,\r\n role,\r\n holder,\r\n onboarding,\r\n mode,\r\n manual,\r\n needsExtraFields,\r\n}) {\r\n const fetchSectorSuggestion = (name) =>\r\n new Promise((resolve, reject) => {\r\n services.fetchAutosuggestSector({ text: name }, (response) => {\r\n if (response && response.sectors) {\r\n const suggestions = response.sectors.map((c) => ({\r\n id: c.Id,\r\n name: c.Description,\r\n }));\r\n resolve(suggestions);\r\n } else {\r\n reject();\r\n }\r\n });\r\n });\r\n \r\n const fetchCountrySuggestion = (name) =>\r\n new Promise((resolve, reject) => {\r\n services.fetchAutosuggestCoutries({ text: name }, (response) => {\r\n if (response && response.countries) {\r\n const suggestions = [];\r\n response.countries.map((c) => {\r\n suggestions.push({\r\n id: c.Id,\r\n name: c.Name,\r\n });\r\n return {};\r\n });\r\n resolve(suggestions);\r\n } else {\r\n reject();\r\n }\r\n });\r\n });\r\n\r\n \r\n \r\n const onChangeSector = (value) => onChangeAutosuggest(\"PersonActivitySector\", value);\r\n const onChangeConstPlace = (value) => onChangeAutosuggest(\"JuridicalPersonConstPlace\", value);\r\n const handleSelectSector = (id, value) => {\r\n onChange(\"PersonActivitySectorId\", id, value);\r\n onChangeSector(value);\r\n };\r\n const handleSelectConstPlace = (id, value) => {\r\n onChange(\"JuridicalPersonConstPlaceId\", id, value);\r\n onChangeConstPlace(value);\r\n };\r\n\r\n const [error, setError] = useState(onboarding ? \"Check Document First\" : \"\");\r\n const [color, setColor] = useState(\"btn btn-ladda btn-primary\");\r\n const [checking, setChecking] = useState(false);\r\n\r\n const isPEP = parseInt(person.JuridicalPersonPublicPosition, 10) > 1;\r\n\r\n const checkDocument = () => {\r\n if (person.JuridicalPersonTAXId == \"\") {\r\n setColor(\"btn btn-ladda btn-primary\");\r\n setError(\"Please, add a document number\");\r\n } else {\r\n setChecking(true);\r\n services.fetchCheckDocument(\r\n {\r\n onboardingid: person.PersonId,\r\n type: person.JuridicalPersonDocumentTypeId,\r\n number: person.JuridicalPersonTAXId,\r\n person: \"Juridical\",\r\n },\r\n (response) => {\r\n if (response && response.result.Code === 200) {\r\n setColor(\"btn btn-ladda btn-primary\");\r\n setError(undefined);\r\n setChecking(false);\r\n alert(response.result.Description);\r\n } else {\r\n setError(\"This document already exists!\");\r\n setColor(\"btn btn-ladda btn-danger btn-sm\");\r\n setChecking(false);\r\n alert(response.result.Description);\r\n }\r\n }\r\n );\r\n }\r\n };\r\n\r\n\r\n const onChangeDoc = (id, value, text) => {\r\n onChange(id, value, text);\r\n setError(\"Check Document First\");\r\n\r\n}\r\n\r\n const onChangeDocNumber = (id, value) => {\r\n onChange(id, value);\r\n setError(\"Check Document First\");\r\n}\r\n\r\n return (\r\n
    \r\n {(\r\n \r\n \r\n { documentTypes && (\r\n i.DocumentTypeId}\r\n getSelectItemName={(i) => i.DocumentTypeName}\r\n />\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n
    \r\n )}\r\n \r\n \r\n i}\r\n getSelectItemName={(i) => PersonStatus[i]}\r\n error={errors.PersonStatus}\r\n onChange={onChange}\r\n disabled={disabled || error || onboarding || mode === PersonMode.New}\r\n />\r\n {person.PersonActivationDate && mode !== PersonMode.New && (\r\n \r\n )}\r\n \r\n \r\n \r\n {entityTypes ? (\r\n i.EntityTypeId}\r\n getSelectItemName={(i) => i.EntityTypeDescription}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n\r\n \r\n {societyTypes ? (\r\n i.SocietyTypeId}\r\n getSelectItemName={(i) => i.SocietyTypeDescription}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {shareType ? (\r\n i.id}\r\n getSelectItemName={(i) => i.name}\r\n error={errors.JuridicalPersonShareType}\r\n disabled={disabled || error}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n {person.PersonType != PersonType.Juridical && (\r\n \r\n profession.ProfessionId}\r\n getSelectItemName={(profession) => profession.ProfessionName}\r\n disabled={disabled || error || !manual}\r\n error={errors.PersonProfessionId}\r\n />\r\n \r\n )}\r\n {/* \r\n activitySector.Id}\r\n getSelectItemName={(activitySector) => `${activitySector.Description} - ${activitySector.Code}`}\r\n disabled={disabled || !manual || error}\r\n error={errors.PersonActivitySectorId}\r\n />\r\n */}\r\n \r\n activitySector.Id}\r\n getSelectedName={(activitySector) => `${activitySector.Description} - ${activitySector.Code}`}\r\n getFilterCondition={(activitySector) => activitySector.Description + \" \" + activitySector.Code}\r\n disabled={disabled || !manual || error}\r\n error={errors.PersonActivitySectorId}\r\n />\r\n \r\n {/* \r\n \r\n \r\n \r\n */}\r\n \r\n publicPosition.PublicPositionId}\r\n getSelectItemName={(publicPosition) => publicPosition.PublicPositionName}\r\n disabled={disabled || !manual}\r\n description={isPEP ? \"PEP\" : undefined}\r\n error = {errors.JuridicalPersonPublicPosition}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n i}\r\n getSelectItemName={(i) => CurrencyType[i]}\r\n error={errors.CurrencyType}\r\n onChange={onChange}\r\n disabled={disabled || error}\r\n />\r\n \r\n \r\n i}\r\n getSelectItemName={(i) => RelatedFrom[i]}\r\n error={errors.RelatedFrom}\r\n onChange={onChange}\r\n disabled={disabled || error}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n\r\n {/* */}\r\n
    \r\n );\r\n}\r\n\r\nJuridicalPersonProfile.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n onChangeAddress: PropTypes.func.isRequired,\r\n autosuggests: PropTypes.object.isRequired,\r\n onChangeAutosuggest: PropTypes.func.isRequired,\r\n disabled: PropTypes.bool.isRequired,\r\n errors: PropTypes.object.isRequired,\r\n companyLinks: PropTypes.array,\r\n professions: PropTypes.array,\r\n documentTypes: PropTypes.array,\r\n entityTypes: PropTypes.array,\r\n societyTypes: PropTypes.array,\r\n services: PropTypes.object.isRequired,\r\n};\r\n\r\nJuridicalPersonProfile.defaultProps = {\r\n companyLinks: undefined,\r\n professions: undefined,\r\n documentTypes: undefined,\r\n entityTypes: undefined,\r\n societyTypes: undefined,\r\n};\r\n\r\nexport default JuridicalPersonProfile;\r\n","import React, {useState, useEffect} from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport {Row, Col} from \"reactstrap\";\r\n\r\nimport {\r\n FormField,\r\n CustomFormInput,\r\n SelectFormField\r\n} from \"../../../../utils/FormFields\";\r\nimport Autosuggest from \"../../../AutosuggestCompliance\";\r\nimport CircularProggress from \"../../../CircularProgress/CircularProgress\";\r\n\r\nfunction LegalAddress({\r\n legalAddress,\r\n onChangeAddress,\r\n autosuggests,\r\n onChangeAutosuggest,\r\n disabled,\r\n errors,\r\n services\r\n}) {\r\n const [addressStates, setAddressStates] = useState(undefined);\r\n const [country, setCountry] = useState({\r\n id: legalAddress.LegalAddressCountryId\r\n });\r\n\r\n const fetchCountrySuggestion = name =>\r\n new Promise((resolve, reject) => {\r\n services.fetchAutosuggestCoutries({text: name}, response => {\r\n if (response && response.countries) {\r\n const suggestions = [];\r\n response.countries.map(c => {\r\n suggestions.push({\r\n id: c.Id,\r\n name: c.Name\r\n });\r\n return {};\r\n });\r\n resolve(suggestions);\r\n } else {\r\n reject();\r\n }\r\n });\r\n });\r\n\r\n const fetchCitySuggestion = name =>\r\n new Promise((resolve, reject) => {\r\n services.fetchGetCityAutosuggest(\r\n {\r\n name: name,\r\n nameState: legalAddress.LegalAddressStateName,\r\n nameCountry: legalAddress.LegalAddressCountryName\r\n },\r\n response => {\r\n if (response && response.suggestions) {\r\n const suggestions = [];\r\n response.suggestions.map(c => {\r\n suggestions.push({\r\n id: c.Id,\r\n name: c.Name\r\n });\r\n return {};\r\n });\r\n resolve(suggestions);\r\n } else {\r\n reject();\r\n }\r\n }\r\n );\r\n });\r\n\r\n const fetchStateSuggestion = name =>\r\n new Promise((resolve, reject) => {\r\n services.fetchGetStateAutosuggest(\r\n {nameState: name, nameCountry: legalAddress.LegalAddressCountryName},\r\n response => {\r\n if (response && response.suggestions) {\r\n const suggestions = [];\r\n response.suggestions.map(c => {\r\n suggestions.push({\r\n id: c.Id,\r\n name: c.Name\r\n });\r\n return {};\r\n });\r\n resolve(suggestions);\r\n } else {\r\n reject();\r\n }\r\n }\r\n );\r\n });\r\n\r\n const handleChangeCity = (id, value) => {\r\n const legalCityId = legalAddress.LegalAddressCityId;\r\n if (id !== legalCityId || legalCityId == undefined) {\r\n onChangeAddress(\"LegalAddressCityId\", id, value);\r\n }\r\n };\r\n\r\n const onChangeCity = value => {\r\n onChangeAddress(\"LegalAddressCityId\", undefined, value);\r\n };\r\n\r\n const handleChangeState = (id, value) => {\r\n const legalStateId = legalAddress.LegalAddressStateId;\r\n if (id !== legalStateId || legalStateId == undefined) {\r\n onChangeAddress(\"LegalAddressStateId\", id, value);\r\n }\r\n };\r\n\r\n const onChangeState = value => {\r\n onChangeAddress(\"LegalAddressStateId\", undefined, value);\r\n };\r\n\r\n const handleChangeCountry = (id, value) => {\r\n const legalCountryId = legalAddress.LegalAddressCountryId;\r\n if (id !== legalCountryId || legalCountryId == undefined) {\r\n onChangeAddress(\"LegalAddressCountryId\", id, value);\r\n }\r\n };\r\n\r\n const onChangeCountry = value => {\r\n onChangeAddress(\"LegalAddressCountryId\", undefined, value);\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n );\r\n}\r\n\r\nLegalAddress.propTypes = {\r\n legalAddress: PropTypes.object.isRequired,\r\n onChangeAddress: PropTypes.func.isRequired,\r\n autosuggests: PropTypes.object.isRequired,\r\n onChangeAutosuggest: PropTypes.func.isRequired,\r\n disabled: PropTypes.bool.isRequired,\r\n errors: PropTypes.object.isRequired,\r\n services: PropTypes.object.isRequired\r\n};\r\n\r\nexport default LegalAddress;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Label } from \"reactstrap\";\r\n\r\nimport \"./style.module.scss\";\r\n\r\nfunction PersonSubAsset({ subAssetClasses, isChecked, handleCheck, checked }) {\r\n const [checkedList, setCheckedList] = useState([]);\r\n\r\n const updateCheckedList = () => {\r\n let checkedList = [];\r\n if (checked) {\r\n checked.forEach((item) => {\r\n checkedList.push(item.PersonSubAssetClassId);\r\n });\r\n setCheckedList(checkedList);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n updateCheckedList();\r\n }, [checked]);\r\n\r\n return (\r\n
    \r\n \r\n
    \r\n \r\n Person SubAsset Selected:\r\n \r\n
    \r\n {subAssetClasses &&\r\n subAssetClasses.map((item, index) => (\r\n
    \r\n handleCheck(item.SubAssetClassId)}\r\n checked={checkedList.includes(item.SubAssetClassId)}\r\n />\r\n \r\n
    \r\n ))}\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n );\r\n}\r\n\r\nexport default PersonSubAsset;\r\n","import React from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport { Row, Col, Label } from \"reactstrap\";\r\n\r\nimport { FormField, CheckFormField, SelectFormField, CustomFormInput } from \"../../../../../utils/FormFields\";\r\nimport Autosuggest from \"../../../../AutosuggestCompliance\";\r\nimport CircularProggress from \"../../../../CircularProgress/CircularProgress\";\r\nimport CustomDropdown from \"../../../../CustomDropdown/CustomDropdown\";\r\n\r\nfunction PhysicalPersonLegalInfo({\r\n person,\r\n onChange,\r\n personLinks,\r\n activitySectors,\r\n publicPositions,\r\n patrimonies,\r\n professions,\r\n autosuggests,\r\n onChangeAutosuggest,\r\n disabled,\r\n errors,\r\n companyLinks,\r\n services,\r\n manual,\r\n}) {\r\n const fetchSectorSuggestion = (name) =>\r\n new Promise((resolve, reject) => {\r\n services.fetchAutosuggestSector({ text: name }, (response) => {\r\n if (response && response.sectors) {\r\n console.log(response.sectors);\r\n const suggestions = response.sectors.map((c) => ({\r\n id: c.Id,\r\n name: `${c.Description} (${c.Code})`,\r\n }));\r\n resolve(suggestions);\r\n } else {\r\n reject();\r\n }\r\n });\r\n });\r\n\r\n const onChangeSector = (value) => onChangeAutosuggest(\"PersonActivitySector\", value);\r\n\r\n const handleSelectSector = (id, value) => {\r\n onChange(\"PersonActivitySectorId\", id, value);\r\n onChangeSector(value);\r\n };\r\n\r\n const personPublicPositionId = person.PhysicalPersonPublicPositionId;\r\n const isPEP = parseInt(personPublicPositionId, 10) > 1;\r\n const personLinkPositionId = person.PersonLinkPublicPositionId;\r\n const isPEPRelated = parseInt(personLinkPositionId, 10) > 1;\r\n\r\n return (\r\n
    \r\n {!person.PersonIsMinimal && (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {patrimonies ? (\r\n i.PatrimonyId}\r\n getSelectItemName={(i) => i.PatrimonyDescription}\r\n value={person.PhysicalPersonPatrimonyId}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n
    \r\n )}\r\n {!person.PersonIsMinimal && (\r\n
    \r\n \r\n \r\n profession.ProfessionId}\r\n getSelectItemName={(profession) => profession.ProfessionName}\r\n disabled={disabled}\r\n error={errors.PersonProfessionId}\r\n />\r\n \r\n \r\n activitySector.Id}\r\n getSelectedName={(activitySector) => `${activitySector.Description} - ${activitySector.Code}`}\r\n getFilterCondition={(activitySector) =>\r\n activitySector.Description + \" \" + activitySector.Code\r\n }\r\n disabled={disabled || !manual}\r\n error={errors.PersonActivitySectorId}\r\n />\r\n \r\n {/* \r\n activitySector.Id}\r\n getSelectItemName={(activitySector) =>\r\n `${activitySector.Description} - ${activitySector.Code}`\r\n }\r\n disabled={disabled || !manual}\r\n error={errors.PersonActivitySectorId}\r\n />\r\n */}\r\n {/* \r\n \r\n \r\n \r\n */}\r\n \r\n
    \r\n )}\r\n publicPosition.PublicPositionId}\r\n getSelectItemName={(publicPosition) => publicPosition.PublicPositionName}\r\n disabled={disabled || !manual}\r\n error={errors.PhysicalPersonPublicPositionId}\r\n description={isPEP ? \"PEP\" : undefined}\r\n />\r\n {!person.PersonIsMinimal && (\r\n
    \r\n \r\n \r\n personLink.PersonLinkId}\r\n getSelectItemName={(personLink) => personLink.PersonLinkName}\r\n disabled={disabled || !manual}\r\n error={errors.PhysicalPersonLinkId}\r\n />\r\n \r\n \r\n publicPosition.PublicPositionId}\r\n getSelectItemName={(publicPosition) => publicPosition.PublicPositionName}\r\n disabled={disabled || !manual}\r\n error={errors.PersonLinkPublicPositionId}\r\n description={isPEPRelated ? \"PEP Related\" : undefined}\r\n />\r\n \r\n \r\n
    \r\n )}\r\n {!person.PersonIsMinimal && (\r\n
    \r\n \r\n
    \r\n \r\n {\"Web User: \"}\r\n \r\n onChange(\"PhysicalPersonWebUser\", e.target.checked)}\r\n disabled={disabled}\r\n checked={person.PhysicalPersonWebUser}\r\n />\r\n
    \r\n\r\n {companyLinks ? (\r\n i.CompanyLinkId}\r\n getSelectItemName={(i) => i.CompanyLinkName}\r\n error={errors.PersonCompanyLinkId}\r\n disabled={disabled}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nPhysicalPersonLegalInfo.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n personLinks: PropTypes.array,\r\n publicPositions: PropTypes.array,\r\n professions: PropTypes.array,\r\n autosuggests: PropTypes.object.isRequired,\r\n onChangeAutosuggest: PropTypes.func.isRequired,\r\n disabled: PropTypes.bool.isRequired,\r\n errors: PropTypes.object.isRequired,\r\n companyLinks: PropTypes.array,\r\n patrimonies: PropTypes.array,\r\n services: PropTypes.object.isRequired,\r\n};\r\n\r\nPhysicalPersonLegalInfo.defaultProps = {\r\n personLinks: undefined,\r\n publicPositions: undefined,\r\n companyLinks: undefined,\r\n patrimonies: undefined,\r\n professions: undefined,\r\n};\r\n\r\nexport default PhysicalPersonLegalInfo;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport { Row, Col, ButtonGroup } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport CustomDropdown from \"../../../../CustomDropdown/CustomDropdown\";\r\n\r\nimport { CivilStatus, Gender, PersonStatus, CurrencyType, RelatedFrom } from \"../../types\";\r\nimport { FormField, SelectFormField, CustomFormInput, CheckFormField } from \"../../../../../utils/FormFields\";\r\nimport PhysicalPersonLegalAddress from \"../LegalAddress\";\r\nimport PhysicalPersonFiscalResidence from \"../FiscalResidence\";\r\nimport PhysicalPersonLegalInfo from \"./LegalInfo\";\r\nimport Autosuggest from \"../../../../AutosuggestCompliance\";\r\nimport CircularProggress from \"../../../../CircularProgress/CircularProgress\";\r\nimport { parseDate, toDateTime } from \"../../../../../utils/dateUtils\";\r\nimport Label from \"reactstrap/lib/Label\";\r\nimport { PersonMode } from \"../../../../../utils/Helper\";\r\n\r\nfunction PhysicalPersonProfile({\r\n person,\r\n onChange,\r\n activitySectors,\r\n legalAddress,\r\n onChangeAddress,\r\n personLinks,\r\n professions,\r\n publicPositions,\r\n companyLinks,\r\n documentTypes,\r\n patrimonies,\r\n autosuggests,\r\n onChangeAutosuggest,\r\n disabled,\r\n errors,\r\n services,\r\n onboarding,\r\n mode,\r\n manual,\r\n viewDigitalRelatedFrom,\r\n}) {\r\n const [country, setCountry] = useState({\r\n id: person.PhysicalPersonCountryOfBirthId,\r\n });\r\n const [birthStates, setBirthStates] = useState(undefined);\r\n const [error, setError] = useState(onboarding ? \"Check Document First\" : \"\");\r\n const [color, setColor] = useState(\"btn btn-ladda btn-primary\");\r\n const [checking, setChecking] = useState(false);\r\n\r\n const onChangeDocumentCountry = (name) => onChangeAutosuggest(\"SpouseDocumentCountryOfIssue\", name);\r\n const onChangeCountry = (name) => onChangeAutosuggest(\"PhysicalPersonCountryOfBirth\", name);\r\n\r\n const fetchCountrySuggestion = (name) =>\r\n new Promise((resolve, reject) => {\r\n services.fetchAutosuggestCoutries({ text: name }, (response) => {\r\n if (response && response.countries) {\r\n const suggestions = [];\r\n response.countries.map((c) => {\r\n suggestions.push({\r\n id: c.Id,\r\n name: c.Name,\r\n });\r\n return {};\r\n });\r\n resolve(suggestions);\r\n } else {\r\n reject();\r\n }\r\n });\r\n });\r\n\r\n const handleChangeDocumentCountry = (id, value) => {\r\n onChange(\"SpouseDocumentCountryOfIssueId\", id, value);\r\n onChangeDocumentCountry(value);\r\n };\r\n const handleChangeCountry = (id, value) => {\r\n onChange(\"PhysicalPersonCountryOfBirthId\", id, value);\r\n setCountry({\r\n id,\r\n });\r\n onChangeCountry(value);\r\n };\r\n\r\n useEffect(() => {\r\n setCountry({ id: person.PhysicalPersonCountryOfBirthId });\r\n }, [person]);\r\n\r\n useEffect(() => {\r\n const birthCountryId = country.id;\r\n setBirthStates(undefined);\r\n services.fetchCountryStates({ id: birthCountryId }, (response) => {\r\n if (response && response.states) {\r\n setBirthStates(response.states);\r\n } else {\r\n setBirthStates([]);\r\n }\r\n });\r\n }, [country.id]);\r\n\r\n const checkDocument = () => {\r\n if (person.PhysicalPersonMainDocumentNumber == \"\") {\r\n setColor(\"btn btn-ladda btn-primary\");\r\n setError(\"Please, add a document number\");\r\n } else {\r\n setChecking(true);\r\n services.fetchCheckDocument(\r\n {\r\n onboardingid: person.PersonId,\r\n type: person.PhysicalPersonMainDocumentTypeId,\r\n number: person.PhysicalPersonMainDocumentNumber,\r\n person: \"Physical\",\r\n },\r\n (response) => {\r\n if (response && response.result.Code === 200) {\r\n setColor(\"btn btn-ladda btn-primary\");\r\n setError(undefined);\r\n setChecking(false);\r\n alert(response.result.Description);\r\n } else {\r\n setError(\"This document already exists!\");\r\n setColor(\"btn btn-ladda btn-danger btn-sm\");\r\n setChecking(false);\r\n alert(response.result.Description);\r\n }\r\n }\r\n );\r\n }\r\n };\r\n\r\n const onChangeDoc = (id, value, text) => {\r\n onChange(id, value, text);\r\n setError(\"Check Document First\");\r\n };\r\n\r\n const onChangeDocNumber = (id, value) => {\r\n onChange(id, value);\r\n setError(\"Check Document First\");\r\n };\r\n\r\n const civilStatusArray = [];\r\n Object.keys(CivilStatus).map((key) => {\r\n civilStatusArray.push({\r\n id: key,\r\n name: CivilStatus[key],\r\n });\r\n return {};\r\n });\r\n\r\n const cities = [];\r\n if (birthStates) {\r\n birthStates.map((s) => s.City.map((c) => cities.push(c)));\r\n }\r\n const personCivilStatus = person.PhysicalPersonCivilStatus;\r\n\r\n return (\r\n
    \r\n {(onboarding || mode === PersonMode.New) && (\r\n \r\n \r\n {(onboarding || mode === PersonMode.New) && documentTypes && (\r\n doc.DocumentTypeId}\r\n getSelectItemName={(doc) => doc.DocumentTypeName}\r\n color={color}\r\n />\r\n )}\r\n \r\n \r\n {(onboarding || mode === PersonMode.New) && (\r\n \r\n )}\r\n \r\n \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n
    \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n i}\r\n getSelectItemName={(i) => PersonStatus[i]}\r\n error={errors.PersonStatus}\r\n onChange={onChange}\r\n disabled={disabled || error || onboarding || mode === PersonMode.New}\r\n />\r\n\r\n \r\n\r\n {person.PersonStatus === \"PassedAway\" && (\r\n \r\n )}\r\n {person.PersonActivationDate && mode !== PersonMode.New && (\r\n \r\n )}\r\n {!person.PersonIsMinimal && (\r\n
    \r\n \r\n i}\r\n getSelectItemName={(i) => Gender[i]}\r\n error={errors.PhysicalPersonGender}\r\n onChange={onChange}\r\n disabled={disabled || error || !manual}\r\n />\r\n\r\n \r\n
    \r\n )}\r\n\r\n {!person.PersonIsMinimal && (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {birthStates && !person.PersonIsMinimal && (\r\n city.CityId}\r\n getSelectedName={(city) => city.CityName}\r\n getFilterCondition={(city) => city.CityName}\r\n disabled={disabled || error}\r\n error={errors.PhysicalPersonCityOfBirthId}\r\n />\r\n )}\r\n \r\n \r\n
    \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n\r\n {!person.PersonIsMinimal && (\r\n
    \r\n status.id}\r\n getSelectItemName={(status) => status.name}\r\n disabled={disabled || error || !manual}\r\n error={errors.PhysicalPersonCivilStatus}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {documentTypes ? (\r\n document.DocumentTypeId}\r\n getSelectItemName={(document) => document.DocumentTypeName}\r\n disabled={disabled || error || !manual}\r\n error={errors.SpouseDocumentTypeId}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n )}\r\n {!person.PersonIsMinimal && (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n )}\r\n\r\n {person.PersonType == \"Physical\" && !person.PersonIsMinimal && (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n key !== 'Digital') : Object.keys(RelatedFrom)}\r\n getSelectItemId={(i) => i}\r\n getSelectItemName={(i) => RelatedFrom[i]}\r\n error={errors.RelatedFrom}\r\n onChange={onChange}\r\n disabled={disabled || error}\r\n />\r\n \r\n \r\n i}\r\n getSelectItemName={(i) => CurrencyType[i]}\r\n error={errors.CurrencyType}\r\n onChange={onChange}\r\n disabled={disabled || error}\r\n />\r\n \r\n \r\n
    \r\n )}\r\n \r\n {/* */}\r\n
    \r\n );\r\n}\r\n\r\nPhysicalPersonProfile.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n onChangeAddress: PropTypes.func.isRequired,\r\n personLinks: PropTypes.array,\r\n publicPositions: PropTypes.array,\r\n professions: PropTypes.array,\r\n documentTypes: PropTypes.array,\r\n companyLinks: PropTypes.array,\r\n patrimonies: PropTypes.array,\r\n autosuggests: PropTypes.object.isRequired,\r\n onChangeAutosuggest: PropTypes.func.isRequired,\r\n disabled: PropTypes.bool.isRequired,\r\n errors: PropTypes.object.isRequired,\r\n services: PropTypes.object.isRequired,\r\n};\r\n\r\nPhysicalPersonProfile.defaultProps = {\r\n personLinks: undefined,\r\n publicPositions: undefined,\r\n professions: undefined,\r\n documentTypes: undefined,\r\n companyLinks: undefined,\r\n patrimonies: undefined,\r\n};\r\n\r\nexport default PhysicalPersonProfile;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"info\":\"style-module_info_3-oKz\",\"header\":\"style-module_header_2djYK\",\"text\":\"style-module_text_bT-P3\",\"flex\":\"style-module_flex_1pTbd\",\"title\":\"style-module_title_38B3_\",\"list-container\":\"style-module_list-container_3fXmX\",\"checked-item\":\"style-module_checked-item_1rRfr\",\"not-checked-item\":\"style-module_not-checked-item_c5XA-\"};","import React, { useState } from 'react';\r\nimport {\r\n Modal, ModalBody, ModalHeader, FormGroup, Button, Row, Col, Label,Input,\r\n} from 'reactstrap';\r\nimport LaddaButton, { EXPAND_RIGHT } from 'react-ladda';\r\nimport PropTypes from 'prop-types';\r\n\r\n\r\nconst ModalComments = ({\r\n open, id, fromDate, toDate, toggle, account, onboardingid, person, services, setRedirectPerson\r\n}) => {\r\n const [loading, setLoading] = useState(false);\r\n const [file, setFile] = useState(undefined);\r\n const [topic, setTopic] = useState('All');\r\n const [comment, setComment] = useState('');\r\n\r\n const handleChangeDate = (name, value) => {\r\n if (name === 'from') {\r\n setFrom(value);\r\n } else {\r\n setTo(value);\r\n }\r\n };\r\n\r\n const handleChangeComment = (text) => {\r\n setComment(text)\r\n };\r\n\r\n const handleResponse = (response) => {\r\n if (response && response.result && response.result.Code){\r\n setLoading(false);\r\n toggle();\r\n }\r\n };\r\n\r\n const handleClose = () => {\r\n setFile(undefined);\r\n setLoading(false);\r\n toggle();\r\n };\r\n\r\n const handleComment = () => {\r\n setLoading(true);\r\n const body = {\r\n onboardingid: person.PersonId,\r\n description: comment,\r\n reject: true,\r\n }\r\n services.fetchOnboardingHistory(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setLoading(false);\r\n toggle();\r\n setRedirectPerson(person.PersonId);\r\n }\r\n });\r\n };\r\n return (\r\n \r\n \r\n {`Set ${person && person.PersonName} comment`}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n handleChangeComment(e.target.value)}\r\n type=\"textarea\" \r\n required\r\n name=\"Comment\" \r\n defaultValue = {comment} >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {loading ? ' Saving' : ' Save'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nModalComments.propTypes = {\r\n open: PropTypes.bool.isRequired,\r\n id: PropTypes.oneOf([PropTypes.string.isRequired, PropTypes.number.isRequired]).isRequired,\r\n fromDate: PropTypes.object.isRequired,\r\n toDate: PropTypes.object.isRequired,\r\n toggle: PropTypes.func.isRequired,\r\n account: PropTypes.bool.isRequired,\r\n person: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default ModalComments;\r\n","import React, { useState } from \"react\";\r\nimport { Card, CardHeader, CardBody, Nav, NavItem, NavLink } from \"reactstrap\";\r\nimport classnames from \"classnames\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport PortfolioTab from \"./Tabs/PortfolioTab\";\r\nimport LegalAddressTab from \"./Tabs/LegalAddressTab\";\r\nimport DocumentsTab from \"./Tabs/DocumentsTab\";\r\nimport ProfileTab from \"./Tabs/ProfileTab\";\r\nimport ArchivesTab from \"./Tabs/ArchivesTab\";\r\nimport ShareHolderTab from \"./Tabs/ShareHolderTab\";\r\nimport RelatedPeopleTab from \"./Tabs/RelatedPeopleTab\";\r\nimport PhonesTab from \"./Tabs/PhonesTab\";\r\nimport BankAccountsTab from \"./Tabs/BankAccountsTab\";\r\nimport QuestionsTab from \"./Tabs/QuestionsTab\";\r\nimport ContractsTab from \"./Tabs/ContractsTab\";\r\nimport ExtendedDataTab from \"./Tabs/ExtendedDataTab\";\r\nimport { PersonType } from \"./types\";\r\nimport { PersonMode, societyTypes } from \"../../../utils/Helper\";\r\nimport FiscalResidencesTab from \"./Tabs/FiscalResidencesTab\";\r\nimport FinalizeTab from \"./Tabs/FinalizeTab\";\r\nimport KYCTab from \"./Tabs/KYCTab\";\r\nimport CircularProgress from \"../../CircularProgress/CircularProgress\";\r\n\r\nconst PersonTabs = ({\r\n person,\r\n setPersonData,\r\n setPerson,\r\n professions,\r\n activitySectors,\r\n publicPositions,\r\n personLinks,\r\n documentTypes,\r\n entityTypes,\r\n subAssetClasses,\r\n societyTypes,\r\n companyLinks,\r\n patrimonies,\r\n archivesTypes,\r\n refresh,\r\n phoneTypes,\r\n handleRedirectAccount,\r\n handleRedirectPerson,\r\n setRedirectPerson,\r\n services,\r\n role,\r\n mode,\r\n setMode,\r\n onboarding,\r\n Link,\r\n holder,\r\n isPerson,\r\n banks,\r\n currencies,\r\n fetchGetAssetInformation,\r\n needsExtraFields,\r\n riskByPersonIsEnabled,\r\n riskByPersonIsZero,\r\n viewDigitalRelatedFrom,\r\n userSession,\r\n opsViewAccountName\r\n}) => {\r\n const [tab, setTab] = useState(0);\r\n\r\n const toggleTab = (newTab) => {\r\n if (mode === PersonMode.New && onboarding && person.PersonId !== \"\" && person.PersonId !== \"0\") {\r\n setTab(newTab);\r\n }\r\n if (!onboarding && person.PersonId !== \"\" && person.PersonId !== \"0\") {\r\n setTab(newTab);\r\n }\r\n };\r\n\r\n if (!person) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {tab === 0 && (\r\n \r\n )}\r\n {tab === 1 && (\r\n \r\n )}\r\n {tab === 2 && (\r\n a.PersonArchiveSubTypeInternalName !== \"Contract\")\r\n }\r\n archivesTypes={archivesTypes}\r\n setPersonData={setPersonData}\r\n services={services}\r\n mode={mode}\r\n refresh={refresh}\r\n onboarding={onboarding}\r\n userSession={userSession}\r\n />\r\n )}\r\n {tab === 3 && (\r\n \r\n )}\r\n {tab === 6 && (\r\n \r\n )}\r\n {tab === 4 && (\r\n \r\n )}\r\n {tab === 5 && (\r\n \r\n )}\r\n {tab === 13 && (\r\n \r\n )}\r\n {tab === 7 && (\r\n \r\n )}\r\n {tab === 8 && (\r\n \r\n )}\r\n {tab === 9 && (\r\n a.PersonArchiveSubTypeInternalName === \"Contract\")\r\n }\r\n archivesTypes={archivesTypes}\r\n setPersonData={setPersonData}\r\n services={services}\r\n mode={mode}\r\n refresh={refresh}\r\n onboarding={onboarding}\r\n />\r\n )}\r\n {tab === 11 && (\r\n \r\n )}\r\n \r\n {tab === 14 && (\r\n \r\n )}\r\n {tab === 10 && (\r\n \r\n )}\r\n {tab === 12 && (\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nPersonTabs.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n setPersonData: PropTypes.func.isRequired,\r\n professions: PropTypes.array,\r\n publicPositions: PropTypes.array,\r\n personLinks: PropTypes.array,\r\n documentTypes: PropTypes.array,\r\n companyLinks: PropTypes.array,\r\n patrimonies: PropTypes.array,\r\n archivesTypes: PropTypes.array,\r\n handleRedirectAccount: PropTypes.func.isRequired,\r\n services: PropTypes.object.isRequired,\r\n entityTypes: PropTypes.array,\r\n role: PropTypes.string,\r\n};\r\n\r\nPersonTabs.defaultProps = {\r\n professions: undefined,\r\n publicPositions: undefined,\r\n personLinks: undefined,\r\n documentTypes: undefined,\r\n companyLinks: undefined,\r\n patrimonies: undefined,\r\n archivesTypes: undefined,\r\n entityTypes: undefined,\r\n};\r\n\r\nexport default PersonTabs;\r\n","import React, { Fragment, useState } from \"react\";\r\nimport { Card, CardBody, Row, Col, Progress, CardHeader, Table, Badge } from \"reactstrap\";\r\nimport { formattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport { LoadingMessage, GetRiskClassName } from \"./helper\";\r\nimport style from \"./styles.module.scss\";\r\n\r\n\r\nconst PopUp = ({ text, onClose }) => (\r\n
    \r\n {text}\r\n \r\n
    \r\n);\r\n\r\nexport const PersonRiskTable = ({ person, riskSummary, riskByPersonIsEnabled, onboarding }) => {\r\n const [popUp, setPopUp] = useState(null);\r\n const togglePopUp = (index, text) => {\r\n setPopUp(popUp && popUp.index === index ? null : { index, text });\r\n };\r\n\r\n return (\r\n \r\n \r\n {!person ? (\r\n \r\n ) : (\r\n \r\n {riskByPersonIsEnabled && (\r\n
    \r\n \r\n Risk\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {riskSummary &&\r\n riskSummary.Risk.map((risk) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n
    Factor descriptionFactor WeightDataScore
    {risk.FactorDescription}{risk.FactorWeight}{risk.Data}{Number.parseInt(risk.Score)}
    \r\n \r\n \r\n \r\n \r\n
    \r\n {riskSummary && riskSummary.Risk.length != 0 && (\r\n \r\n \r\n
    \r\n
    \r\n \r\n Total {getTotalRiskScore(riskSummary)} points\r\n \r\n
    \r\n
    \r\n \r\n
    \r\n )}\r\n
    \r\n
    \r\n \r\n Profile Risk\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {riskSummary &&\r\n riskSummary.ProfileRisk.map((risk) => (\r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n
    QuestionAnswerScore
    {risk.QuestionDescription}{risk.AnswerDescription}{risk.AnswerScore}
    \r\n \r\n {riskSummary && person && (\r\n \r\n \r\n \r\n )}\r\n
    \r\n {riskSummary && riskSummary.ProfileRisk.length != 0 && (\r\n \r\n \r\n
    \r\n
    \r\n {riskSummary.PersonProfileRisk}\r\n \r\n Total {getTotalScore(riskSummary)} points\r\n \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n )}\r\n
    \r\n
    \r\n \r\n Transactional Limit\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {riskSummary &&\r\n riskSummary.TransactionalLimit.map((risk) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n
    Factor descriptionFactor WeightDataScore
    {risk.FactorDescription}{risk.FactorWeight}{risk.Data}{formattedNumber(risk.Score, \"currency\", 0)}
    \r\n \r\n {/* \r\n \r\n */}\r\n
    \r\n {/* {riskSummary && riskSummary.TotalTransactionalLimit && ( */}\r\n \r\n \r\n
    \r\n
    \r\n \r\n Total {formattedNumber(riskSummary.TotalTransactionalLimit, \"currency\", 0)}\r\n \r\n
    \r\n
    \r\n \r\n
    \r\n {/* )} */}\r\n
    \r\n
    \r\n
    \r\n )}\r\n {riskSummary && onboarding && (\r\n \r\n List Check Errors\r\n \r\n \r\n \r\n {riskSummary.ListCheckErrors ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {riskSummary.ListCheckErrors.map((item, index) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n
    ListCoincidence nameCoincidence External IdDetails
    {item.listName}{item.personCheckName}{item.ListCheckPersonKey}\r\n {item.comments ? (\r\n \r\n togglePopUp(index, item.comments)}\r\n >\r\n {popUp && popUp.index === index && (\r\n setPopUp(null)} />\r\n )}\r\n \r\n ) : (\r\n \"\"\r\n )}\r\n
    \r\n ) : (\r\n
    \r\n
    \r\n No coincidences\r\n
    \r\n
    \r\n )}\r\n \r\n
    \r\n
    \r\n
    \r\n )}\r\n
    \r\n )}\r\n \r\n
    \r\n );\r\n};\r\n\r\nconst RiskSummary = ({ person, riskSummary }) => (\r\n
    \r\n

    Summary

    \r\n

    Check every 1 day

    \r\n

    Last check Yesterday

    \r\n

    \r\n {riskSummary.BOLevel} Level to BO\r\n

    \r\n {/* {person.PersonWayOfAction != \"\" && (\r\n

    \r\n {person.PersonWayOfAction} structure\r\n

    \r\n )} */}\r\n

    \r\n Risk{\" \"}\r\n \r\n {person.PersonRisk}\r\n \r\n

    \r\n
    \r\n);\r\n\r\nconst ProfileRiskSummary = ({ person, riskSummary }) => (\r\n
    \r\n

    Summary

    \r\n {/* \r\n {person.PersonProfileRiskMismatch && (\r\n \r\n \r\n Profile mismatch warning\r\n \r\n )}\r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* \r\n \r\n \r\n \r\n */}\r\n \r\n
    Profile risk\r\n \r\n {person.PersonProfileRiskName}\r\n \r\n
    Current risk\r\n \r\n %\r\n \r\n \r\n {person.PersonCurrentProfileRisk}\r\n \r\n
    \r\n
    \r\n);\r\n\r\nconst LoadingOrEmpty = ({ isLoading, isEmpty, children }) =>\r\n isLoading ? (\r\n \r\n \r\n \r\n \r\n \r\n ) : isEmpty ? (\r\n \r\n \r\n
    \r\n No risk info registerd\r\n
    {\" \"}\r\n \r\n \r\n ) : (\r\n children\r\n );\r\n\r\nconst getTotalScore = (riskSummary) =>\r\n riskSummary && riskSummary.ProfileRisk.reduce((sum, e) => (sum += parseInt(e.AnswerScore, 10)), 0);\r\n\r\nconst getTotalRiskScore = (riskSummary) =>\r\n riskSummary && riskSummary.Risk.reduce((sum, e) => (sum += parseInt(e.Score, 10)), 0);\r\n\r\nexport default PersonRiskTable;\r\n","import React from \"react\";\r\nimport CircularProgress from \"../../../CircularProgress/CircularProgress\";\r\nimport style from \"./styles.module.scss\";\r\n\r\nexport const LoadingMessage = ({ text, className = \"\" }) => (\r\n
    \r\n \r\n {text}\r\n
    \r\n);\r\n\r\nexport const GetRiskClassName = (risk) => {\r\n const riskLabel = risk.toLowerCase();\r\n switch (riskLabel) {\r\n case \"low\":\r\n case \"conservative\":\r\n return \"buy\";\r\n\r\n case \"medium\":\r\n case \"moderate\":\r\n return \"warning\";\r\n\r\n case \"high\":\r\n case \"agressive\":\r\n return \"danger\";\r\n default:\r\n break;\r\n }\r\n};\r\n\r\nexport const IsCustodyBalance = (type) => type == \"Custody\" || type == \"LocalCustody\";\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"cardlg\":\"styles-module_cardlg_3FiQE\",\"loading\":\"styles-module_loading_3Ewkh\",\"loadingMessage\":\"styles-module_loadingMessage_3dFog\",\"risk\":\"styles-module_risk_3aY47\",\"title\":\"styles-module_title_3mW1J\",\"riskSummary\":\"styles-module_riskSummary_1YOw7\",\"profileRiskSummary\":\"styles-module_profileRiskSummary_3RiPy\",\"riskWarning\":\"styles-module_riskWarning_26MdS\",\"flash\":\"styles-module_flash_3SrD0\",\"badge\":\"styles-module_badge_3W2ko\",\"riskWidget\":\"styles-module_riskWidget_3VTIF\",\"warning\":\"styles-module_warning_28dfb\",\"line\":\"styles-module_line_2VEtE\",\"container\":\"styles-module_container_3qXzZ\",\"item\":\"styles-module_item_Z3xqn\",\"popUp\":\"styles-module_popUp_188Zg\",\"closeButton\":\"styles-module_closeButton_1go6z\"};","/* eslint-disable jsx-a11y/click-events-have-key-events */\r\n/* eslint-disable jsx-a11y/no-static-element-interactions */\r\nimport React, { useState, useEffect } from \"react\";\r\nimport {\r\n Form,\r\n FormGroup,\r\n Label,\r\n ListGroup,\r\n ListGroupItem,\r\n Spinner,\r\n Row,\r\n Col,\r\n} from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport { ArchiveTypes } from \"../../Account/types\";\r\nimport ModalArchive from \"../../Modal/ModalArchive\";\r\nimport ModalConfirm from \"../../Modal/ModalConfirm\";\r\nimport ModalError from \"../../Modal/ModalError\";\r\nimport { PersonType } from \"../types\";\r\nimport { getLocalDate } from \"../../../../utils\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport { showToast } from \"../../../../utils/Helper\";\r\n\r\nconst ArchivesTab = ({\r\n person,\r\n archives,\r\n setPersonData,\r\n archivesTypes,\r\n services,\r\n onboarding,\r\n refresh,\r\n userSession\r\n}) => {\r\n const [modalArchives, setModalArchives] = useState({\r\n open: false,\r\n loading: false,\r\n });\r\n const [modalConfirm, setModalConfirm] = useState({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n });\r\n const [modalError, setModalError] = useState({\r\n open: false,\r\n message: \"\",\r\n });\r\n\r\n const toggleModalError = (e, message) => {\r\n setModalError({\r\n open: !modalError.open,\r\n message,\r\n });\r\n };\r\n\r\n const handleSaveFile = (archive) => {\r\n if (\r\n [\"pdf\", \"jpeg\", \"jpg\", \"png\", \"csv\", \"doc\", \"docx\", \"xls\", \"xlsx\"].includes(\r\n archive.ArchivesExtension.toLowerCase()\r\n )\r\n ) {\r\n const newArchive = {};\r\n Object.keys(archive).forEach((key) => {\r\n newArchive[`Person${key}`] = archive[key];\r\n });\r\n\r\n const body = {\r\n person: {\r\n PersonId: person.PersonId,\r\n Archives: [newArchive],\r\n },\r\n file: true,\r\n remove: false,\r\n };\r\n setModalArchives((m) => ({\r\n ...m,\r\n loading: true,\r\n }));\r\n if (onboarding) {\r\n let docs = person.Archives;\r\n //get the last id\r\n let id = 0;\r\n person.Archives.forEach((p, i) => {\r\n if (p.PersonArchiveId > id) {\r\n id = p.PersonArchiveId + 1;\r\n }\r\n });\r\n if (newArchive.PersonArchiveId > 0) {\r\n id = newArchive.ArchiveId;\r\n docs.forEach((p, i) => {\r\n if (p.PersonArchiveId == newArchive.PersonArchiveId) {\r\n docs.splice(i, 1);\r\n }\r\n });\r\n }\r\n const nArchive = {\r\n ...newArchive,\r\n PersonArchiveId: id,\r\n };\r\n\r\n docs.push(nArchive);\r\n const postPerson = {\r\n ...person,\r\n Archives: docs,\r\n };\r\n const body2 = {\r\n postPerson: postPerson,\r\n OnboardingId: onboarding,\r\n };\r\n\r\n services.fetchNewPerson(body2, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setPersonData(body2.postPerson);\r\n setModalArchives({\r\n open: false,\r\n loading: false,\r\n });\r\n refresh();\r\n } else {\r\n console.log(\"response append doc\", response);\r\n }\r\n });\r\n } else {\r\n services.fetchAppendPersonNewDocument(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newDocument = body.person.Archives[0];\r\n newDocument.PersonArchiveId = response.Id;\r\n const newArchives = [...archives];\r\n newArchives.push(newDocument);\r\n setModalArchives({\r\n open: false,\r\n loading: false,\r\n });\r\n setPersonData({\r\n ...person,\r\n Archives: newArchives,\r\n });\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result\r\n ? `Error saving Archive: ${response.result.Description}`\r\n : \"Server Error\"\r\n );\r\n setModalArchives({\r\n open: false,\r\n loading: false,\r\n });\r\n }\r\n });\r\n }\r\n } else {\r\n showToast(\r\n \"error: the file must be pdf, csv, doc, docx, xls or xlsx\",\r\n true\r\n );\r\n setModalArchives({\r\n open: true,\r\n loading: false,\r\n });\r\n }\r\n };\r\n\r\n const handleDeleteFile = (archiveId) => {\r\n const body = {\r\n person: {\r\n PersonId: person.PersonId,\r\n Archives: [\r\n {\r\n PersonArchiveId: archiveId,\r\n },\r\n ],\r\n },\r\n file: true,\r\n remove: true,\r\n };\r\n setModalConfirm((m) => ({\r\n ...m,\r\n loading: true,\r\n }));\r\n if (onboarding) {\r\n let docs = person.Archives;\r\n docs.forEach((p, i) => {\r\n if (p.PersonArchiveId == archiveId) {\r\n docs.splice(i, 1);\r\n }\r\n });\r\n const postPerson = {\r\n ...person,\r\n Archives: docs,\r\n };\r\n const body2 = {\r\n postPerson: postPerson,\r\n OnboardingId: onboarding,\r\n };\r\n services.fetchNewPerson(body2, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setPersonData(body2.postPerson);\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n });\r\n refresh();\r\n } else {\r\n //alert(\"Server Error\")\r\n }\r\n });\r\n } else {\r\n services.fetchAppendPersonNewDocument(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n let index = -1;\r\n const newArchives = [...archives];\r\n newArchives.forEach((doc, i) => {\r\n if (parseInt(doc.PersonArchiveId, 10) === parseInt(archiveId, 10)) {\r\n index = i;\r\n }\r\n });\r\n if (index > -1) {\r\n newArchives.splice(index, 1);\r\n }\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n });\r\n setPersonData({\r\n ...person,\r\n Archives: newArchives,\r\n });\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result\r\n ? `Error saving Archive: ${response.result.Description}`\r\n : \"Server Error\"\r\n );\r\n setModalArchives({\r\n open: false,\r\n loading: false,\r\n });\r\n }\r\n });\r\n }\r\n };\r\n\r\n const handleEnableFile = (archive) => {\r\n setModalConfirm((m) => ({\r\n ...m,\r\n loading: true,\r\n }));\r\n\r\n if (onboarding) {\r\n let docs = person.Archives;\r\n let id = Number(archives.length) + 2;\r\n if (archive.PersonArchiveId > 0) {\r\n id = archive.ArchiveId;\r\n docs.forEach((p, i) => {\r\n if (p.PersonArchiveId == archive.PersonArchiveId) {\r\n docs.splice(i, 1);\r\n }\r\n });\r\n }\r\n const nArchive = {\r\n ...archive,\r\n PersonArchiveId: id,\r\n PersonArchivesEnabled: !archive.PersonArchivesEnabled,\r\n };\r\n\r\n docs.push(nArchive);\r\n const postPerson = {\r\n ...person,\r\n Archives: docs,\r\n };\r\n const body2 = {\r\n postPerson: postPerson,\r\n OnboardingId: onboarding,\r\n };\r\n\r\n services.fetchNewPerson(body2, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setPersonData(body2.postPerson);\r\n setModalArchives({\r\n open: false,\r\n loading: false,\r\n });\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n });\r\n refresh();\r\n }\r\n });\r\n } else {\r\n const newArchive = {\r\n ...archive,\r\n PersonArchivesEnabled: !archive.PersonArchivesEnabled,\r\n };\r\n const body = {\r\n person: {\r\n PersonId: person.PersonId,\r\n Archives: [newArchive],\r\n },\r\n file: true,\r\n remove: false,\r\n };\r\n setModalArchives((m) => ({\r\n ...m,\r\n loading: true,\r\n }));\r\n services.fetchAppendPersonNewDocument(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n let index = -1;\r\n const newArchives = [...archives];\r\n newArchives.forEach((doc, i) => {\r\n if (\r\n parseInt(doc.PersonArchiveId, 10) ===\r\n parseInt(archive.PersonArchiveId, 10)\r\n ) {\r\n index = i;\r\n }\r\n });\r\n if (index > -1) {\r\n newArchives.splice(index, 1);\r\n }\r\n newArchives.push(newArchive);\r\n setModalArchives({\r\n open: false,\r\n loading: false,\r\n });\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n });\r\n setPersonData({\r\n ...person,\r\n Archives: newArchives,\r\n });\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result\r\n ? `Error saving Archive: ${response.result.Description}`\r\n : \"Server Error\"\r\n );\r\n setModalArchives({\r\n open: false,\r\n loading: false,\r\n });\r\n }\r\n });\r\n }\r\n };\r\n\r\n const toggleModalConfirm = (id, action) =>\r\n setModalConfirm((m) => {\r\n const newM = {\r\n ...m,\r\n open: !m.open,\r\n };\r\n if (id && action === \"del\") {\r\n newM.title = \"Are you sure you want to remove the selected Archive?\";\r\n newM.callback = () => handleDeleteFile(id);\r\n }\r\n if (id && action === \"enable\") {\r\n newM.title = \"Are you sure you want to enable the selected Archive?\";\r\n newM.callback = () => handleEnableFile(id);\r\n }\r\n if (id && action === \"desable\") {\r\n newM.title = \"Are you sure you want to disable the selected Archive?\";\r\n newM.callback = () => handleEnableFile(id);\r\n }\r\n return newM;\r\n });\r\n\r\n const toggleModalDoc = () => {\r\n const archiveSubytpeExists =\r\n Object.keys(archivesTypes[ArchiveTypes.Person]).length > 0 &&\r\n Object.keys(archivesTypes[ArchiveTypes.Person].ArchivesSubTypes).length >\r\n 0;\r\n if (archiveSubytpeExists) {\r\n setModalArchives((m) => ({\r\n open: !m.open,\r\n loading: false,\r\n }));\r\n } else {\r\n alert(\r\n \"No Archives Subtypes entered in the system.\\nTo add files go to:\\nParameteres -> Archive Subtypes\"\r\n );\r\n }\r\n };\r\n\r\n if (!archives || !archivesTypes) {\r\n return ;\r\n }\r\n const getFile = (file) => {\r\n const body = {\r\n personId: person.PersonId,\r\n fileId: file.PersonArchiveId,\r\n };\r\n services.fetchPersonFile(body, (response) => {\r\n var a = document.createElement(\"A\");\r\n a.href = `data:application/octet-stream;base64,${response.blobfile}`;\r\n a.download = `${file.PersonArchivesName}.${file.PersonArchivesExtension}`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n });\r\n };\r\n\r\n const getOnboardingFile = (file) => {\r\n const body = {\r\n personid: person.PersonId,\r\n fileid: file.PersonArchiveId,\r\n onboarding: onboarding,\r\n };\r\n services.fetchOnboardingPersonFile(body, (response) => {\r\n var a = document.createElement(\"A\");\r\n a.href = `data:application/octet-stream;base64,${response.blobfile}`;\r\n a.download = `${file.PersonArchivesName}.${file.PersonArchivesExtension}`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n });\r\n };\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n {archives.map((d, i) => (\r\n \r\n \r\n {userSession.IsReadOnly === false && toggleModalConfirm(d.PersonArchiveId, \"del\")}\r\n >\r\n \r\n
    }\r\n {userSession.IsReadOnly === false && \r\n toggleModalConfirm(\r\n d,\r\n d.PersonArchivesEnabled ? \"desable\" : \"enable\"\r\n )\r\n }\r\n >\r\n {d.PersonArchivesEnabled ? (\r\n \r\n ) : (\r\n \r\n )}\r\n }\r\n \r\n ))}\r\n \r\n \r\n \r\n {userSession.IsReadOnly === false && \r\n Add New Archive\r\n }\r\n {modalArchives.open && (\r\n \r\n )}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nArchivesTab.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n services: PropTypes.object.isRequired,\r\n setPersonData: PropTypes.func.isRequired,\r\n archivesTypes: PropTypes.object,\r\n archives: PropTypes.array,\r\n};\r\n\r\nArchivesTab.defaultProps = {\r\n archivesTypes: undefined,\r\n archives: undefined,\r\n};\r\n\r\nexport default ArchivesTab;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport {\r\n Table,\r\n UncontrolledDropdown,\r\n DropdownToggle,\r\n DropdownItem,\r\n DropdownMenu,\r\n Button,\r\n Row,\r\n Col,\r\n} from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport style from \"../../Grid.module.scss\";\r\nimport { BankAccountType, BankAccountStatus } from \"../types\";\r\nimport ModalConfirm from \"../../Modal/ModalConfirm\";\r\nimport ModalBankAccount from \"../../Modal/ModalBankAccount\";\r\nimport { CircularProgress } from \"../../../..\";\r\nimport { AccountMode, showToast } from \"../../../../utils/Helper\";\r\nimport Groups from \"../../../Asset/Tabs/Groups/Groups\";\r\n\r\nfunction generateEmptyBankAccount() {\r\n return {\r\n PersonBankAccountBankId: \"\",\r\n PersonBankAccountItemId: \"\",\r\n PersonBankAccountName: \"\",\r\n PersonBankAccountHolders: undefined,\r\n PersonBankAccountBranch: undefined,\r\n PersonBankAccountNumber: undefined,\r\n PersonBankAccountCurrency: 1,\r\n PersonBankAccountIsDepositInterest: false,\r\n PersonBankAccountPersonalName: \"\",\r\n PersonBankAccountObs: \"\",\r\n PersonBankAccountType: BankAccountType.Savings,\r\n PersonBankAccountStatus: BankAccountStatus.Active,\r\n Archives: [],\r\n };\r\n}\r\n\r\nconst BankAccountsTab = ({\r\n person,\r\n bankAccounts,\r\n currencies,\r\n banks,\r\n setPersonData,\r\n services,\r\n userType,\r\n mode,\r\n setRedirectAccounts,\r\n sended,\r\n references,\r\n signatureSets,\r\n groups,\r\n onboarding,\r\n accountId,\r\n userSession,\r\n}) => {\r\n const [fetching, setFetching] = useState(false);\r\n const [loading, setLoading] = useState(false);\r\n const [modalConfirm, setModalConfirm] = useState({\r\n open: false,\r\n title: \"\",\r\n bankAccountItemId: undefined,\r\n saving: false,\r\n callback: undefined,\r\n });\r\n const [modalBankAccount, setModalBankAccount] = useState({\r\n open: false,\r\n saving: false,\r\n bankAccount: generateEmptyBankAccount(),\r\n errors: {},\r\n });\r\n const [archives, setArchives] = useState([]);\r\n const toggleModalConfirm = () => {\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n bankAccountItemId: undefined,\r\n saving: false,\r\n callback: undefined,\r\n });\r\n };\r\n\r\n const onChangeEdit = (name, value, strValue) => {\r\n let newValue = value;\r\n if (name === \"PersonBankAccountIsDepositInterest\" || name === \"PersonBankAccountFavorite\") {\r\n newValue = value === \"true\" || value === true;\r\n }\r\n setModalBankAccount({\r\n ...modalBankAccount,\r\n bankAccount: {\r\n ...modalBankAccount.bankAccount,\r\n [name]: newValue,\r\n\r\n PersonBankAccountName:\r\n name === \"PersonBankAccountBankId\" ? strValue : modalBankAccount.bankAccount.PersonBankAccountName,\r\n },\r\n });\r\n };\r\n\r\n const toggleModalBankAccount = (bankAccount) => {\r\n if (bankAccount !== undefined) {\r\n if (bankAccount.Archives !== undefined) {\r\n setArchives(bankAccount.Archives);\r\n } else {\r\n setArchives([]);\r\n }\r\n } else {\r\n setArchives([]);\r\n }\r\n setModalBankAccount({\r\n saving: modalBankAccount.saving,\r\n open: !modalBankAccount.open,\r\n bankAccount:\r\n bankAccount && bankAccount.PersonBankAccountItemId ? bankAccount : generateEmptyBankAccount(),\r\n errors: {},\r\n });\r\n };\r\n\r\n const handleEdit = (index) => {\r\n toggleModalBankAccount(bankAccounts[index]);\r\n };\r\n\r\n const handleAdd = () => {\r\n toggleModalBankAccount();\r\n };\r\n\r\n const handleDelete = (index) => {\r\n const id = bankAccounts[index].PersonBankAccountItemId;\r\n setModalConfirm({\r\n open: true,\r\n title: \"Are you sure you want to delete the selected Bank Account?\",\r\n bankAccountItemId: id,\r\n callback: () => deleteBankAccount(id),\r\n });\r\n };\r\n\r\n function validateBankAccount(fields) {\r\n const fieldNames = [\"PersonBankAccountBankId\", \"PersonBankAccountPersonalName\"];\r\n const errors = {};\r\n\r\n fieldNames.forEach((name) => {\r\n if (fields[name] == undefined || fields[name] == \"\") {\r\n errors[name] = \"Required field\";\r\n }\r\n });\r\n\r\n return errors;\r\n }\r\n\r\n const handleSaveBankAccount = () => {\r\n const errors = validateBankAccount(modalBankAccount.bankAccount);\r\n setModalBankAccount({\r\n ...modalBankAccount,\r\n errors: errors,\r\n });\r\n if (Object.keys(errors).length == 0) {\r\n const newBankAccount = { ...modalBankAccount.bankAccount };\r\n setModalBankAccount({ ...modalBankAccount, saving: true });\r\n if (!onboarding) {\r\n const body = {\r\n person: {\r\n PersonId: person.PersonId,\r\n PersonBankAccount: [newBankAccount],\r\n },\r\n isadministrator: true,\r\n delete: false,\r\n };\r\n services.fetchUpdatePersonBankAccount(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n if (response.result.Description === \"\") {\r\n let docs = person.PersonBankAccount ? person.PersonBankAccount : [];\r\n let id = response.Id;\r\n if (newBankAccount.PersonBankAccountItemId > 0) {\r\n id = newBankAccount.PersonBankAccountItemId;\r\n docs.forEach((p, i) => {\r\n if (p.PersonBankAccountItemId == newBankAccount.PersonBankAccountItemId) {\r\n docs.splice(i, 1);\r\n }\r\n });\r\n }\r\n const nArchive = {\r\n ...newBankAccount,\r\n PersonBankAccountItemId: id,\r\n };\r\n docs.push(nArchive);\r\n setModalBankAccount({\r\n ...modalBankAccount,\r\n open: false,\r\n loading: false,\r\n });\r\n } else {\r\n setModalBankAccount({\r\n ...modalBankAccount,\r\n open: false,\r\n loading: false,\r\n });\r\n showToast(response.result.Description);\r\n }\r\n } else {\r\n setModalBankAccount({\r\n ...modalBankAccount,\r\n loading: false,\r\n });\r\n if (response.result && response.result.Description) {\r\n showToast(\"Error:\" + response.result.Description, \"error\");\r\n } else {\r\n showToast(\"Error saving bank account\", \"error\");\r\n }\r\n }\r\n });\r\n } else {\r\n let docs = person.PersonBankAccount ? person.PersonBankAccount : [];\r\n let id = bankAccounts ? Number(bankAccounts.length) + 2 : 1;\r\n if (newBankAccount.PersonBankAccountItemId > 0) {\r\n id = newBankAccount.PersonBankAccountItemId;\r\n docs.forEach((p, i) => {\r\n if (p.PersonBankAccountItemId == newBankAccount.PersonBankAccountItemId) {\r\n docs.splice(i, 1);\r\n }\r\n });\r\n }\r\n const nArchive = {\r\n ...newBankAccount,\r\n PersonBankAccountItemId: id,\r\n };\r\n\r\n docs.push(nArchive);\r\n const postPerson = {\r\n ...person,\r\n PersonBankAccount: docs,\r\n };\r\n const body2 = {\r\n postPerson: postPerson,\r\n OnboardingId: onboarding,\r\n };\r\n services.fetchNewPerson(body2, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setPersonData(postPerson);\r\n setModalBankAccount((m) => ({\r\n saving: false,\r\n open: false,\r\n bankAccount: generateEmptyBankAccount(),\r\n errors: undefined,\r\n }));\r\n } else {\r\n setModalBankAccount({\r\n ...modalBankAccount,\r\n saving: false,\r\n open: false,\r\n });\r\n }\r\n });\r\n }\r\n }\r\n };\r\n\r\n const deleteBankAccount = (id) => {\r\n const deleteAccountId = id;\r\n let bankAccountToDelete = person.PersonBankAccount.filter(\r\n (bankAccount) => bankAccount.PersonBankAccountItemId === deleteAccountId\r\n );\r\n\r\n const personsend = {\r\n ...person,\r\n PersonBankAccount: [\r\n {\r\n ...bankAccountToDelete[0],\r\n },\r\n ],\r\n };\r\n setModalConfirm({ ...modalConfirm, saving: true });\r\n if (!onboarding) {\r\n const body = {\r\n person: personsend,\r\n isadministrator: true,\r\n delete: true,\r\n };\r\n services.fetchUpdatePersonBankAccount(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newBankAccounts = bankAccounts;\r\n let index = -1;\r\n newBankAccounts.map((bankAcc, i) => {\r\n if (deleteAccountId === bankAcc.PersonBankAccountItemId) {\r\n index = i;\r\n }\r\n return {};\r\n });\r\n if (index > -1) {\r\n newBankAccounts.splice(index, 1);\r\n }\r\n toggleModalConfirm();\r\n } else {\r\n setModalConfirm({\r\n ...modalConfirm,\r\n saving: false,\r\n });\r\n alert(response.result.Description);\r\n }\r\n });\r\n } else {\r\n let docs = person.PersonBankAccount;\r\n docs.forEach((p, i) => {\r\n if (p.PersonBankAccountItemId == id) {\r\n docs.splice(i, 1);\r\n }\r\n });\r\n\r\n const postPerson = {\r\n ...person,\r\n PersonBankAccount: docs,\r\n };\r\n const body2 = {\r\n postPerson: postPerson,\r\n OnboardingId: onboarding,\r\n };\r\n services.fetchNewPerson(body2, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setPersonData(postPerson);\r\n setModalBankAccount((m) => ({\r\n saving: false,\r\n open: false,\r\n bankAccount: generateEmptyBankAccount(),\r\n errors: undefined,\r\n }));\r\n } else {\r\n setModalBankAccount({\r\n ...modalBankAccount,\r\n saving: false,\r\n open: false,\r\n });\r\n }\r\n });\r\n }\r\n };\r\n\r\n const handleCreateAccount = () => {\r\n setLoading(true);\r\n const body = {\r\n onboardingProcessId: accountId,\r\n };\r\n services.createAccount(body, (data) => {\r\n if (data && data.result) {\r\n setModalConfirm({\r\n ...modalConfirm,\r\n saving: false,\r\n open: false,\r\n });\r\n if (data.result.Code === 200) {\r\n alert(\"Account Sended to Compliance!\");\r\n setRedirectAccounts(true);\r\n } else {\r\n alert(`Failed! ${data.result.Description}`);\r\n }\r\n }\r\n setLoading(false);\r\n });\r\n };\r\n\r\n const createOnboardingAccount = () => {\r\n setModalConfirm((m) => ({\r\n ...m,\r\n open: true,\r\n title: \"Are you sure you want to send this account to compliance?\",\r\n accountId,\r\n callback: () => handleCreateAccount(accountId),\r\n }));\r\n };\r\n\r\n const getCurrencyISO = (id) => {\r\n let iso = \"\";\r\n if (currencies) {\r\n currencies.forEach((c) => {\r\n if (parseInt(c.currencyId, 10) === parseInt(id, 10)) {\r\n iso = c.currencyISO;\r\n }\r\n });\r\n }\r\n return iso;\r\n };\r\n\r\n const getFile = (file) => {\r\n if (mode === AccountMode.New) {\r\n const body = {\r\n fileId: file.ArchiveTemporalFileId,\r\n onboarding: accountId,\r\n };\r\n services.getOnboardingAccountArchive(body, (response) => {\r\n var a = document.createElement(\"A\");\r\n a.href = `data:application/octet-stream;base64,${response.blobfile}`;\r\n a.download = `${file.ArchiveName}.${file.ArchiveExtension}`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n });\r\n } else {\r\n const body = {\r\n accountId: accountId,\r\n archiveId: file.ArchiveId,\r\n };\r\n services.getAccountArchive(body, (response) => {\r\n var a = document.createElement(\"A\");\r\n a.href = `data:application/octet-stream;base64,${response.blobfile}`;\r\n a.download = `${file.ArchiveName}.${file.ArchiveExtension}`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n });\r\n }\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {fetching ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n {bankAccounts && bankAccounts.length > 0 ? (\r\n bankAccounts.map((acc, i) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))\r\n ) : (\r\n \r\n \r\n \r\n )}\r\n \r\n )}\r\n \r\n
    #CurrencyTypeNameHoldersDefault Permanent InstructionFund Incomes onlyStatus
    \r\n \r\n
    \r\n {userSession.IsReadOnly === false && }\r\n {acc.PersonBankAccountNumber}{getCurrencyISO(acc.PersonBankAccountCurrency)}{acc.PersonBankAccountType}{acc.PersonBankAccountName}{acc.PersonBankAccountHolders}{acc.PersonBankAccountIsDepositInterest ? \"Yes\" : \"No\"}{acc.PersonBankAccountFundIncomesOnly ? \"Yes\" : \"No\"}{acc.PersonBankAccountStatus}
    \r\n No Results.\r\n
    \r\n {userSession.IsReadOnly === false && }\r\n \r\n \r\n {userType === \"Advisor\" && !sended && (\r\n \r\n \r\n \r\n Create Account\r\n \r\n \r\n \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nBankAccountsTab.propTypes = {\r\n accountId: PropTypes.string.isRequired,\r\n bankAccounts: PropTypes.array.isRequired,\r\n setAccountData: PropTypes.func.isRequired,\r\n currencies: PropTypes.array.isRequired,\r\n services: PropTypes.object.isRequired,\r\n banks: PropTypes.array,\r\n};\r\n\r\nBankAccountsTab.defaultProps = {\r\n banks: undefined,\r\n};\r\n\r\nfunction RenderDropdownActions({ onEdit, onDelete, index }) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n onEdit(index)}>\r\n \r\n Edit\r\n \r\n onDelete(index)}>\r\n \r\n Delete\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nRenderDropdownActions.propTypes = {\r\n onEdit: PropTypes.func.isRequired,\r\n onDelete: PropTypes.func.isRequired,\r\n index: PropTypes.number.isRequired,\r\n};\r\n\r\nexport default BankAccountsTab;\r\n","/* eslint-disable jsx-a11y/click-events-have-key-events */\r\n/* eslint-disable jsx-a11y/no-static-element-interactions */\r\nimport React, { useState, useEffect } from \"react\";\r\nimport { Form, FormGroup, Label, ListGroup, ListGroupItem, Spinner, Row, Col } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport { ArchiveTypes } from \"../../Account/types\";\r\nimport ModalArchive from \"../../Modal/ModalArchive\";\r\nimport ModalConfirm from \"../../Modal/ModalConfirm\";\r\nimport { PersonType } from \"../types\";\r\nimport { getLocalDate } from \"../../../../utils\";\r\nimport { FormattedDate } from \"react-intl\";\r\n\r\nconst ContractsTab = ({ person, archives, setPersonData, archivesTypes, services, onboarding, refresh }) => {\r\n if (!archives || !archivesTypes) {\r\n return ;\r\n }\r\n const getFile = (file) => {\r\n const body = {\r\n personId: person.PersonId,\r\n fileId: file.PersonArchiveId,\r\n };\r\n services.fetchPersonFile(body, (response) => {\r\n var a = document.createElement(\"A\");\r\n a.href = `data:application/octet-stream;base64,${response.blobfile}`;\r\n a.download = `${file.PersonArchivesName}.${file.PersonArchivesExtension}`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n });\r\n };\r\n\r\n const getOnboardingFile = (file) => {\r\n const body = {\r\n personid: person.PersonId,\r\n fileid: file.PersonArchiveId,\r\n onboarding: onboarding,\r\n };\r\n services.fetchOnboardingPersonFile(body, (response) => {\r\n var a = document.createElement(\"A\");\r\n a.href = `data:application/octet-stream;base64,${response.blobfile}`;\r\n a.download = `${file.PersonArchivesName}.${file.PersonArchivesExtension}`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n });\r\n };\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n {archives.map((d, i) => (\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nContractsTab.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n services: PropTypes.object.isRequired,\r\n setPersonData: PropTypes.func.isRequired,\r\n archivesTypes: PropTypes.object,\r\n archives: PropTypes.array,\r\n};\r\n\r\nContractsTab.defaultProps = {\r\n archivesTypes: undefined,\r\n archives: undefined,\r\n};\r\n\r\nexport default ContractsTab;\r\n","import React, {useState} from \"react\";\r\nimport {\r\n Form,\r\n FormGroup,\r\n Row,\r\n Col,\r\n ListGroup,\r\n ListGroupItem,\r\n Spinner,\r\n Button,\r\n Label,\r\n} from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport ModalDocument from \"../../Modal/ModalDocument\";\r\nimport ModalConfirm from \"../../Modal/ModalConfirm\";\r\nimport ModalError from \"../../Modal/ModalError\";\r\nimport { FormattedDate, FormattedTime } from \"react-intl\";\r\n\r\n\r\nconst Documents = ({\r\n documents,\r\n person,\r\n documentTypes,\r\n setPersonData,\r\n services,\r\n onboarding,\r\n userSession\r\n}) => {\r\n const [modalNewDocument, setModalNewDocument] = useState({\r\n open: false,\r\n loading: false,\r\n initial: undefined,\r\n error: undefined\r\n });\r\n const [modalConfirm, setModalConfirm] = useState({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false\r\n });\r\n const [modalError, setModalError] = useState({\r\n open: false,\r\n message: \"\",\r\n });\r\n\r\n console.log(\"user session\", userSession);\r\n const toggleModalError = (e, message) => {\r\n setModalError({\r\n open: !modalError.open,\r\n message,\r\n });\r\n };\r\n\r\n const handleSaveNewDocument = newDocument => {\r\n const body = {\r\n person: {\r\n PersonId: person.PersonId,\r\n Documents: [newDocument]\r\n },\r\n file: false,\r\n remove: false\r\n };\r\n setModalNewDocument(m => ({\r\n ...m,\r\n open: true,\r\n loading: true\r\n }));\r\n if (onboarding){\r\n const newPerson = {...person};\r\n let found = false;\r\n newPerson.Documents = documents.map(d => {\r\n if (\r\n parseInt(d.PhysicalPersonDocumentTypeId, 10) ===\r\n parseInt(newDocument.PhysicalPersonDocumentTypeId, 10)\r\n ) {\r\n found = true;\r\n return {\r\n ...newDocument\r\n };\r\n }\r\n return {\r\n ...d,\r\n PhysicalPersonDocumentIsMain: newDocument.PhysicalPersonDocumentIsMain\r\n ? false\r\n : d.PhysicalPersonDocumentIsMain\r\n };\r\n });\r\n if (!found) {\r\n newPerson.Documents.push({...newDocument});\r\n }\r\n if (newDocument.PhysicalPersonDocumentIsMain) {\r\n newPerson.PhysicalPersonMainDocumentType =\r\n newDocument.PhysicalPersonDocumentTypeName;\r\n newPerson.PhysicalPersonMainDocumentNumber =\r\n newDocument.PhysicalPersonDocumentNumber;\r\n newPerson.PhysicalPersonMainDocumentTypeId = \r\n newDocument.PhysicalPersonDocumentTypeId;\r\n }\r\n setModalNewDocument(m => ({\r\n open: false,\r\n loading: false,\r\n initial: undefined,\r\n error: undefined\r\n }));\r\n const body = {\r\n OnboardingId: String(onboarding),\r\n postPerson: newPerson,\r\n };\r\n services.fetchNewPerson(body, response => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setPersonData(newPerson);\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result\r\n ? response.result.Description\r\n : \"Server Error\"\r\n );\r\n }\r\n });\r\n\r\n }else{\r\n services.fetchAppendPersonNewDocument(body, response => {\r\n if (response && response.result) {\r\n const {result} = response;\r\n if (response.result.Code === 200) {\r\n const newPerson = {...person};\r\n let found = false;\r\n newPerson.Documents = documents.map(d => {\r\n if (\r\n parseInt(d.PhysicalPersonDocumentTypeId, 10) ===\r\n parseInt(newDocument.PhysicalPersonDocumentTypeId, 10)\r\n ) {\r\n found = true;\r\n return {\r\n ...newDocument\r\n };\r\n }\r\n return {\r\n ...d,\r\n PhysicalPersonDocumentIsMain: newDocument.PhysicalPersonDocumentIsMain\r\n ? false\r\n : d.PhysicalPersonDocumentIsMain\r\n };\r\n });\r\n if (!found) {\r\n newPerson.Documents.push({...newDocument});\r\n }\r\n if (newDocument.PhysicalPersonDocumentIsMain) {\r\n newPerson.PhysicalPersonMainDocumentType =\r\n newDocument.PhysicalPersonDocumentTypeName;\r\n newPerson.PhysicalPersonMainDocumentNumber =\r\n newDocument.PhysicalPersonDocumentNumber;\r\n }\r\n setPersonData(newPerson);\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result\r\n ? `Error saving Document: ${response.result.Description}`\r\n : \"Server Error\"\r\n );\r\n setModalNewDocument({\r\n loading: false,\r\n open: false,\r\n });\r\n }\r\n setModalNewDocument(m => ({\r\n open: result.Code !== 200,\r\n loading: false,\r\n initial: result.Code !== 200 ? m.initial : undefined,\r\n error: result.Code !== 200 ? response.result.Description : undefined\r\n }));\r\n } else {\r\n setModalNewDocument(m => ({\r\n ...m,\r\n open: true,\r\n loading: false\r\n }));\r\n }\r\n });\r\n }\r\n };\r\n\r\n const handleDeleteFile = documentId => {\r\n const body = {\r\n person: {\r\n PersonId: person.PersonId,\r\n Documents: [\r\n {\r\n PhysicalPersonDocumentTypeId: documentId\r\n }\r\n ]\r\n },\r\n file: false,\r\n remove: true\r\n };\r\n setModalConfirm(m => ({\r\n ...m,\r\n loading: true\r\n }));\r\n if (onboarding){\r\n const newPerson = {...person};\r\n let index = -1;\r\n let wasMain = false;\r\n const newDocuments = [...documents];\r\n newDocuments.forEach((doc, i) => {\r\n if (\r\n parseInt(doc.PhysicalPersonDocumentTypeId, 10) ===\r\n parseInt(documentId, 10)\r\n ) {\r\n index = i;\r\n wasMain = doc.PhysicalPersonDocumentIsMain;\r\n }\r\n });\r\n if (index > -1) {\r\n newDocuments.splice(index, 1);\r\n if (wasMain) {\r\n newPerson.PhysicalPersonMainDocumentType = \"\";\r\n newPerson.PhysicalPersonMainDocumentNumber = \"\";\r\n }\r\n }\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false\r\n });\r\n setPersonData({\r\n ...newPerson,\r\n Documents: newDocuments\r\n });\r\n \r\n const postPerson = {\r\n ...person,\r\n Documents: newDocuments,\r\n };\r\n\r\n const body2 = {\r\n OnboardingId: String(onboarding),\r\n postPerson: postPerson,\r\n };\r\n services.fetchNewPerson(body2, response => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setPersonData(body2.postPerson);\r\n } else {\r\n alert(\"Server Error\")\r\n }\r\n });\r\n\r\n }else{\r\n services.fetchAppendPersonNewDocument(body, response => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newPerson = {...person};\r\n let index = -1;\r\n let wasMain = false;\r\n const newDocuments = [...documents];\r\n newDocuments.forEach((doc, i) => {\r\n if (\r\n parseInt(doc.PhysicalPersonDocumentTypeId, 10) ===\r\n parseInt(documentId, 10)\r\n ) {\r\n index = i;\r\n wasMain = doc.PhysicalPersonDocumentIsMain;\r\n }\r\n });\r\n if (index > -1) {\r\n newDocuments.splice(index, 1);\r\n if (wasMain) {\r\n newPerson.PhysicalPersonMainDocumentType = \"\";\r\n newPerson.PhysicalPersonMainDocumentNumber = \"\";\r\n }\r\n }\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false\r\n });\r\n setPersonData({\r\n ...newPerson,\r\n Documents: newDocuments\r\n });\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result\r\n ? `Error saving Document: ${response.result.Description}`\r\n : \"Server Error\"\r\n );\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false\r\n });\r\n }\r\n });\r\n }\r\n };\r\n\r\n const toggleModalConfirm = id =>\r\n setModalConfirm(m => {\r\n const newM = {\r\n ...m,\r\n open: !m.open\r\n };\r\n if (id) {\r\n newM.title = \"Are you sure you want to remove the selected Document?\";\r\n newM.callback = () => handleDeleteFile(id);\r\n }\r\n return newM;\r\n });\r\n\r\n const handleToggleModalNewDocument = initial =>\r\n setModalNewDocument(m => ({\r\n open: !m.open,\r\n loading: m.loading,\r\n initial,\r\n error: undefined\r\n }));\r\n\r\n if (!documents) {\r\n return ;\r\n }\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n {documents.map(d => (\r\n \r\n \r\n Type: \r\n \r\n {d.PhysicalPersonDocumentTypeName}\r\n {d.PhysicalPersonDocumentIsMain ? \"(Main)\" : \"\"}\r\n \r\n \r\n {userSession.IsReadOnly === false && handleToggleModalNewDocument(d)}\r\n >\r\n \r\n
    }\r\n \r\n \r\n \r\n Expiration Date: \r\n \r\n {(d.PhysicalPersonDocumentWithoutExpiration || !d.PhysicalPersonDocumentExpirationDate) && }\r\n {!d.PhysicalPersonDocumentWithoutExpiration && d.PhysicalPersonDocumentExpirationDate &&\r\n -1) ? d.PhysicalPersonDocumentExpirationDate : d.PhysicalPersonDocumentExpirationDate + \"T00:00\"}/> }\r\n \r\n \r\n {userSession.IsReadOnly === false && \r\n toggleModalConfirm(d.PhysicalPersonDocumentTypeId)\r\n }\r\n >\r\n \r\n }\r\n \r\n \r\n \r\n Country: \r\n {d.PersonDocumentIssueCountryName}\r\n \r\n \r\n \r\n Number: \r\n {d.PhysicalPersonDocumentNumber}\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n {modalNewDocument.open && (\r\n \r\n )}\r\n \r\n \r\n {userSession.IsReadOnly === false && handleToggleModalNewDocument()}\r\n color=\"primary\"\r\n style={{marginRight: 10}}\r\n >\r\n Add New Document\r\n }\r\n \r\n );\r\n};\r\n\r\nDocuments.propTypes = {\r\n documents: PropTypes.array,\r\n person: PropTypes.object.isRequired,\r\n documentTypes: PropTypes.array,\r\n setPersonData: PropTypes.func.isRequired,\r\n services: PropTypes.object.isRequired\r\n};\r\n\r\nDocuments.defaultProps = {\r\n documents: undefined,\r\n documentTypes: undefined\r\n};\r\n\r\nexport default Documents;\r\n","import React, { Fragment, useEffect, useState } from \"react\";\r\nimport { Collapse, Button, Input, Col, Row } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport style from \"./styles/ExtendedDataTab.scss\";\r\nimport { showToast } from \"../../../../utils/Helper\";\r\nimport { DateField, FormField } from \"../../../../utils\";\r\nimport ReactDatePicker from \"react-datepicker\";\r\n\r\nconst ExtendedDataTab = ({ person, services, role, onboarding ,setPersonData, userSession}) => {\r\n const [itemGroups, setitemGroups] = useState(null);\r\n const [sending, setSending] = useState(false);\r\n\r\n const saveExtendedData = () => {\r\n setSending(true);\r\n let itemGroupsWithInstancesFiltered = itemGroups.map((itemGroup) => {\r\n if (itemGroup.Instance) {\r\n let filteredInstances = itemGroup.Instance.filter((instance) => {\r\n return instance.ExtensionInstanceText != \"\" || instance.ExtensionItemId != 0;\r\n });\r\n itemGroup.Instance = filteredInstances;\r\n }\r\n\r\n return itemGroup;\r\n });\r\n let payload = {\r\n personId: person.PersonId,\r\n extendedData: itemGroupsWithInstancesFiltered,\r\n };\r\n try {\r\n if (!onboarding) {\r\n services.updatePersonExtendedData(payload, (response) => {\r\n setSending(false)\r\n if (response.result.Code == 200) {\r\n showToast(response.result.Description);\r\n } else {\r\n showToast(response.result.Description);\r\n }\r\n });\r\n } else {\r\n const postPerson = {\r\n ...person,\r\n PersonExtendedData: itemGroupsWithInstancesFiltered,\r\n };\r\n const body = {\r\n postPerson: postPerson,\r\n OnboardingId: onboarding,\r\n };\r\n services.fetchNewPerson(body, (response) => {\r\n setSending(false);\r\n setPersonData(postPerson);\r\n showToast(\"Your changes have been saved.\");\r\n });\r\n }\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (services) {\r\n try {\r\n if (!onboarding) {\r\n services.fetchPersonExtendedData({ personId: person.PersonId }, (response) => {\r\n setitemGroups(response.extendedData);\r\n });\r\n } else {\r\n if (person.PersonExtendedData && person.PersonExtendedData.length > 0){\r\n setitemGroups(person.PersonExtendedData);\r\n }else{\r\n services.fetchPersonExtendedData({ personId: person.PersonId }, (response) => {\r\n setitemGroups(response.extendedData);\r\n });\r\n }\r\n \r\n }\r\n } catch (e) {}\r\n }\r\n }, [services]);\r\n\r\n const modifyItemGroup = (itemgroup) => {\r\n let newItemGroups = itemGroups.map((item, i) => {\r\n if (item.ExtensionGroupId == itemgroup.ExtensionGroupId) {\r\n return itemgroup;\r\n } else {\r\n return item;\r\n }\r\n });\r\n setitemGroups(newItemGroups);\r\n };\r\n\r\n return (\r\n
    \r\n
    \r\n {itemGroups &&\r\n itemGroups.map((item, index) => (\r\n \r\n ))}\r\n
    \r\n
    \r\n\r\n {userSession.IsReadOnly === false && saveExtendedData()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {sending ? \" Saving\" : \" Save\"}\r\n }\r\n
    \r\n );\r\n};\r\n\r\nconst ExtendedDataItem = ({ data, modifyItemGroup, userSession }) => {\r\n const [collapse, setCollapse] = useState(false);\r\n const [itemgroup, setItemGroup] = useState(data);\r\n const [isMultipleSelection, setIsMultipleSelection] = useState(itemgroup.ExtensionGroupMultipleSelection);\r\n const [locked, setLocked] = useState(true);\r\n\r\n useEffect(() => {\r\n !itemgroup.Instance || itemgroup.Instance.length == 0\r\n ? setItemGroup({\r\n ...itemgroup,\r\n Instance: [defaultInstance],\r\n })\r\n : \"\";\r\n }, [itemgroup.Instance]);\r\n\r\n const defaultInstance = {\r\n ExtensionInstanceId: 0,\r\n ExtensionGroupId: data.ExtensionGroupId,\r\n ExtensionRefId: 0,\r\n ExtensionItemId: 0,\r\n ExtensionInstanceText: \"\",\r\n ExtensionInstanceDate: new Date().toDatetimeLocal(),\r\n };\r\n\r\n useEffect(() => {\r\n modifyItemGroup(itemgroup);\r\n }, [itemgroup]);\r\n\r\n const handleRemoveClick = (index) => {\r\n let newInstances = [...itemgroup.Instance];\r\n newInstances.splice(index, 1);\r\n setItemGroup({ ...itemgroup, Instance: newInstances });\r\n };\r\n\r\n const handleAddClick = () => {\r\n setItemGroup({\r\n ...itemgroup,\r\n Instance: [\r\n ...itemgroup.Instance,\r\n {\r\n ExtensionInstanceId: 0,\r\n ExtensionGroupId: data.ExtensionGroupId,\r\n ExtensionRefId: 0,\r\n ExtensionItemId: 0,\r\n ExtensionInstanceDate: new Date().toDatetimeLocal(),\r\n ExtensionInstanceText: \"\",\r\n },\r\n ],\r\n });\r\n };\r\n\r\n const modifyInstance = (index, field, value) => {\r\n let newInstances = [...itemgroup.Instance];\r\n if (field == \"ExtensionInstanceDate\") {\r\n newInstances[index].ExtensionInstanceDate = value;\r\n } else {\r\n if (data.ExtensionGroupType == \"freetext\") {\r\n newInstances[index].ExtensionInstanceText = value;\r\n } else {\r\n newInstances[index].ExtensionItemId = value;\r\n }\r\n }\r\n setItemGroup({ ...itemgroup, Instance: newInstances });\r\n };\r\n\r\n return (\r\n
    \r\n {\r\n setCollapse(!collapse);\r\n }}\r\n >\r\n {data.ExtensionGroupInternal}\r\n {\" \"}\r\n {userSession.IsReadOnly === false && collapse && (\r\n locked ? (\r\n \r\n ) : (\r\n \r\n )\r\n )}\r\n \r\n {itemgroup.Instance\r\n ? itemgroup.Instance.map((x, i) => {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n })\r\n : \"\"}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst ExtendedDataItemInstance = ({\r\n data,\r\n internalName,\r\n i,\r\n Instance,\r\n type,\r\n items,\r\n modifyInstance,\r\n isMultipleSelection,\r\n handleAddClick,\r\n handleRemoveClick,\r\n readOnly,\r\n userSession\r\n}) => {\r\n return (\r\n
    \r\n \r\n \r\n \r\n {type == \"freetext\" && (\r\n modifyInstance(i, \"ExtensionInstanceText\", e.target.value)}\r\n readOnly={readOnly}\r\n />\r\n )}\r\n {type == \"enumerated\" && (\r\n modifyInstance(i, \"ExtensionItemId\", e.target.value)}\r\n readOnly={readOnly}\r\n >\r\n \r\n {items.map((value, index) => (\r\n \r\n ))}\r\n \r\n )}\r\n \r\n \r\n modifyInstance(i, \"ExtensionInstanceDate\", e.target.value)}\r\n readOnly={true}\r\n />\r\n \r\n \r\n
    \r\n {Instance.length !== 1 && data.ExtensionInstanceId == 0 && isMultipleSelection && (\r\n \r\n )}\r\n
    \r\n \r\n \r\n {userSession.IsReadOnly === false && Instance.length - 1 === i && isMultipleSelection && (\r\n \r\n )}\r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default ExtendedDataTab;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Form, FormGroup, Input, Button, Row, Col, Label } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\nimport { CircularProgress } from \"../../../..\";\r\nimport { AccountMode } from \"../../../../utils/Helper\";\r\nimport ModalConfirm from \"../../Modal/ModalConfirm\";\r\nimport ModalComments from \"../ModalComments\";\r\nimport style from \"../Risk/styles.module.scss\";\r\nimport PersonRiskTable from \"../Risk/PersonRiskTable\";\r\n\r\nconst FinalizeTab = ({\r\n Finalize,\r\n accountId,\r\n person,\r\n account,\r\n setAccountData,\r\n setPersonData,\r\n setRedirectPerson,\r\n services,\r\n mode,\r\n userType,\r\n onboarding,\r\n riskByPersonIsEnabled,\r\n}) => {\r\n const [loadingSave, setLoadingSave] = useState(false);\r\n const [loadingData, setLoadingData] = useState(false);\r\n const [loadingCheck, setLoadingCheck] = useState(false);\r\n const [personlist, setPersonList] = useState([]);\r\n const [showResults, setShow] = useState(false);\r\n const [listResults, setResults] = useState([]);\r\n const [reportId, setReportid] = useState(0);\r\n const [modalConfirm, setModalConfirm] = useState({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n accountId: undefined,\r\n });\r\n\r\n const [personresult, setPersonResult] = useState({\r\n PersonRisk: \"\",\r\n PersonTransactionalLimit: \"\",\r\n PersonProfileRisk: \"\",\r\n });\r\n const now = new Date();\r\n\r\n const [modalComments, setModalComments] = useState({\r\n open: false,\r\n fromDate: new Date(now.getFullYear(), now.getMonth() - 1, now.getDate()),\r\n toDate: now,\r\n personId: undefined,\r\n person: undefined,\r\n });\r\n\r\n const toggleModalComments = (e, person) => {\r\n setModalComments({\r\n ...modalComments,\r\n open: !modalComments.open,\r\n person: person,\r\n });\r\n };\r\n\r\n const handleCreatePerson = () => {\r\n setLoadingSave(true);\r\n const body = {\r\n onboardingProcessId: onboarding,\r\n };\r\n services.fetchCreateOnboardingPerson(body, (data) => {\r\n if (data && data.result) {\r\n if (data.result.Code === 200) {\r\n alert(data.result.Description);\r\n setRedirectPerson(data.id);\r\n } else {\r\n alert(`Failed! ${data.result.Description}`);\r\n }\r\n }\r\n setLoadingSave(false);\r\n });\r\n };\r\n\r\n const createOnboardingPerson = () => {\r\n setModalConfirm((m) => ({\r\n ...m,\r\n open: true,\r\n title: \"Are you sure you want to send person information?\",\r\n accountId,\r\n callback: () => handleCreatePerson(),\r\n }));\r\n };\r\n\r\n const listCheck = () => {\r\n setLoadingCheck(true);\r\n const body = {\r\n sdtApproveAccount: personlist,\r\n fromType: \"EasyAccount\",\r\n };\r\n if (personlist.length < 1) {\r\n alert(\"There aren't people to check!\");\r\n } else {\r\n services.AccountListCheck(body, (data) => {\r\n if (data && data.error) {\r\n if (data.error.lenght > 0) {\r\n setResults(data.error);\r\n }\r\n setReportid(data.logListId);\r\n }\r\n setLoadingCheck(false);\r\n });\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n setLoadingData(true);\r\n let personWithoutArchives = {\r\n ...person,\r\n Archives: person.Archives.map((a) => ({\r\n ...a,\r\n PersonArchivesBlob: \"\",\r\n })),\r\n };\r\n const body = {\r\n postPerson: personWithoutArchives,\r\n onboarding: onboarding,\r\n };\r\n\r\n services.fetchOnboardingPersonResult(body, (data) => {\r\n if (data && data.SDTOnboardingResult) {\r\n setLoadingData(false);\r\n setPersonResult({ ...data.SDTOnboardingResult });\r\n setPersonData({\r\n ...person,\r\n PersonProfileRiskName: data.SDTOnboardingResult.PersonProfileRisk,\r\n PersonRisk: data.SDTOnboardingResult.PersonRisk,\r\n PersonTransactionalLimit: data.SDTOnboardingResult.PersonTransactionalLimit,\r\n });\r\n } else {\r\n setLoadingData(false);\r\n }\r\n });\r\n }, []);\r\n\r\n const toggleModalConfirm = () =>\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n accountId: undefined,\r\n callback: undefined,\r\n loading: false,\r\n });\r\n\r\n if (loadingData) {\r\n return ;\r\n }\r\n return (\r\n
    \r\n \r\n {personresult && personresult.AccountRiskSummary && (\r\n \r\n )}\r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n toggleModalComments(e, person)}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Reject Person\r\n \r\n \r\n \r\n \r\n Create Person\r\n \r\n \r\n \r\n \r\n\r\n \r\n
    \r\n );\r\n};\r\n\r\nFinalizeTab.propTypes = {\r\n accountId: PropTypes.string.isRequired,\r\n setAccountData: PropTypes.func.isRequired,\r\n services: PropTypes.object.isRequired,\r\n account: PropTypes.object.isRequired,\r\n mode: PropTypes.object.isRequired,\r\n};\r\n\r\nFinalizeTab.defaultProps = {\r\n Finalize: undefined,\r\n};\r\n\r\nexport default FinalizeTab;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Form, FormGroup, Row, Col, ListGroup, ListGroupItem, Spinner, Button } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport style from \"../../Grid.module.scss\";\r\nimport ModalConfirm from \"../../Modal/ModalConfirm\";\r\nimport ModalFiscalResidence from \"../../Modal/ModalFiscalResidence\";\r\nimport { CircularProgress } from \"../../../..\";\r\nimport { AccountMode } from \"../../../../utils/Helper\";\r\nimport Groups from \"../../../Asset/Tabs/Groups/Groups\";\r\n\r\nfunction generateEmptyFiscalResidence() {\r\n return {\r\n PersonFiscalResidenceCountryId: \"\",\r\n PersonFiscalResidenceCountryIso: \"\",\r\n PersonFiscalResidenceCountryName: \"\",\r\n PersonFiscalResidenceTin: \"\",\r\n PersonFiscalResidenceTaxId: undefined,\r\n PersonFiscalResidenceTaxIdName: \"\",\r\n PersonFiscalResidenceDateFrom: undefined,\r\n PersonFiscalResidenceDateTo: undefined,\r\n PersonFiscalResidenceId: 0,\r\n PersonFiscalResidenceIsActive: false,\r\n };\r\n}\r\n\r\nconst FiscalResidencesTab = ({\r\n fiscalresidences,\r\n services,\r\n userType,\r\n onboarding,\r\n mode,\r\n document,\r\n person,\r\n setPersonData,\r\n userSession\r\n}) => {\r\n const [modalFiscalResidence, setModalFiscalResidence] = useState({\r\n open: false,\r\n loading: false,\r\n initial: generateEmptyFiscalResidence(),\r\n error: undefined,\r\n });\r\n const [modalConfirm, setModalConfirm] = useState({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n });\r\n\r\n const SaveNewFiscalResidence = (newFiscalResidence) => {\r\n const body = {\r\n person: {\r\n PersonId: person.PersonId,\r\n PersonFiscalResidence: [newFiscalResidence],\r\n },\r\n };\r\n setModalFiscalResidence((m) => ({\r\n ...m,\r\n open: true,\r\n loading: true,\r\n }));\r\n if (onboarding) {\r\n let docs = person.PersonFiscalResidence;\r\n let id = Number(docs.length) + 2;\r\n if (newFiscalResidence.PersonFiscalResidenceId > 0) {\r\n id = newFiscalResidence.PersonFiscalResidenceId;\r\n docs.forEach((p, i) => {\r\n if (p.PersonFiscalResidenceId == newFiscalResidence.PersonFiscalResidenceId) {\r\n docs.splice(i, 1);\r\n }\r\n });\r\n }\r\n const nResidence = {\r\n ...newFiscalResidence,\r\n PersonFiscalResidenceId: id,\r\n };\r\n\r\n docs.push(nResidence);\r\n const postPerson = {\r\n ...person,\r\n PersonFiscalResidence: docs,\r\n };\r\n const body2 = {\r\n postPerson: postPerson,\r\n OnboardingId: onboarding,\r\n };\r\n services.fetchNewPerson(body2, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setPersonData(body2.postPerson);\r\n setModalFiscalResidence({\r\n ...modalFiscalResidence,\r\n open: false,\r\n callback: undefined,\r\n loading: false,\r\n messageShow: true,\r\n message: \"\",\r\n });\r\n } else {\r\n alert(\"Server Error\");\r\n }\r\n });\r\n } else {\r\n services.fetchUpdatePersonFiscalResidences(body, (response) => {\r\n if (response && response.result) {\r\n const { result } = response;\r\n if (response.result.Code === 200) {\r\n const newPerson = { ...person };\r\n let found = false;\r\n newPerson.PersonFiscalResidence = fiscalresidences.map((d) => {\r\n if (\r\n parseInt(d.PersonFiscalResidenceId, 10) ===\r\n parseInt(newFiscalResidence.PersonFiscalResidenceId, 10)\r\n ) {\r\n found = true;\r\n return {\r\n ...newFiscalResidence,\r\n };\r\n }\r\n return {\r\n ...d,\r\n };\r\n });\r\n if (!found) {\r\n newFiscalResidence.PersonFiscalResidenceId = response.Id;\r\n newPerson.PersonFiscalResidence.push({ ...newFiscalResidence });\r\n }\r\n\r\n setPersonData({\r\n ...newPerson,\r\n });\r\n setModalFiscalResidence((m) => ({\r\n open: false,\r\n loading: false,\r\n initial: generateEmptyFiscalResidence(),\r\n error: undefined,\r\n }));\r\n }\r\n } else {\r\n setModalFiscalResidence((m) => ({\r\n ...m,\r\n open: true,\r\n loading: false,\r\n }));\r\n }\r\n });\r\n }\r\n };\r\n\r\n const handleDeleteFile = (newFiscalResidence) => {\r\n const body = {\r\n person: {\r\n PersonId: person.PersonId,\r\n PersonFiscalResidence: [newFiscalResidence],\r\n },\r\n delete: true,\r\n };\r\n if (onboarding) {\r\n let docs = person.PersonFiscalResidence;\r\n if (newFiscalResidence.PersonFiscalResidenceId > 0) {\r\n docs.forEach((p, i) => {\r\n if (p.PersonFiscalResidenceId == newFiscalResidence.PersonFiscalResidenceId) {\r\n docs.splice(i, 1);\r\n }\r\n });\r\n }\r\n const postPerson = {\r\n ...person,\r\n PersonFiscalResidence: docs,\r\n };\r\n const body2 = {\r\n postPerson: postPerson,\r\n OnboardingId: onboarding,\r\n };\r\n services.fetchNewPerson(body2, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setPersonData(body2.postPerson);\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n });\r\n setModalFiscalResidence({\r\n ...modalFiscalResidence,\r\n loading: false,\r\n messageShow: false,\r\n initial: undefined,\r\n });\r\n } else {\r\n alert(\"Server Error\");\r\n }\r\n });\r\n } else {\r\n services.fetchUpdatePersonFiscalResidences(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newPerson = { ...person };\r\n newPerson.PersonFiscalResidence.forEach((p, i) => {\r\n if (p.PersonFiscalResidenceId == newFiscalResidence.PersonFiscalResidenceId) {\r\n newPerson.PersonFiscalResidence.splice(i, 1);\r\n }\r\n });\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n });\r\n setPersonData({\r\n ...newPerson,\r\n });\r\n }\r\n });\r\n }\r\n };\r\n\r\n const toggleModalConfirm = (d) =>\r\n setModalConfirm((mod) => {\r\n const newM = {\r\n ...mod,\r\n open: !mod.open,\r\n };\r\n if (d) {\r\n newM.title = \"Are you sure you want to remove the selected Fiscal Residence?\";\r\n newM.callback = () => handleDeleteFile(d);\r\n }\r\n return newM;\r\n });\r\n\r\n const toggleModalNewFiscalResidence = (initial) =>\r\n setModalFiscalResidence((m) => ({\r\n open: !m.open,\r\n loading: m.loading,\r\n initial: initial,\r\n }));\r\n\r\n if (!fiscalresidences) {\r\n return ;\r\n }\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n {fiscalresidences.map((d) => (\r\n \r\n \r\n Country: \r\n {d.PersonFiscalResidenceCountryName}\r\n \r\n {userSession.IsReadOnly === false && toggleModalNewFiscalResidence(d)}\r\n >\r\n \r\n
    }\r\n \r\n \r\n \r\n Date From: \r\n {new Date(d.PersonFiscalResidenceDateFrom).toLocaleDateString(\"es\")}\r\n \r\n {userSession.IsReadOnly === false &&
    toggleModalConfirm(d)}>\r\n \r\n
    }\r\n \r\n
    \r\n\r\n \r\n Date To: \r\n \r\n {\" \"}\r\n {d.PersonFiscalResidenceIsActive\r\n ? \"Active\"\r\n : new Date(d.PersonFiscalResidenceDateTo).toLocaleDateString(\"es\")}\r\n \r\n \r\n \r\n\r\n \r\n Tax Id: \r\n {d.PersonFiscalResidenceTin}\r\n \r\n \r\n \r\n Tax Type: \r\n {d.PersonFiscalResidenceTaxIdName}\r\n \r\n \r\n \r\n Address: \r\n {d.PersonFiscalResidenceAddress}\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n {userSession.IsReadOnly === false && }\r\n \r\n );\r\n};\r\n\r\nFiscalResidencesTab.propTypes = {\r\n fiscalresidences: PropTypes.array.isRequired,\r\n services: PropTypes.object.isRequired,\r\n};\r\n\r\nFiscalResidencesTab.defaultProps = {\r\n fiscalresidences: undefined,\r\n};\r\n\r\nfunction RenderDropdownActions({ onEdit, onDelete, index }) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n onEdit(index)}>\r\n \r\n Edit\r\n \r\n onDelete(index)}>\r\n \r\n Delete\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nRenderDropdownActions.propTypes = {\r\n onEdit: PropTypes.func.isRequired,\r\n onDelete: PropTypes.func.isRequired,\r\n index: PropTypes.number.isRequired,\r\n};\r\n\r\nexport default FiscalResidencesTab;\r\n\r\n","import React, { useState, useEffect, useRef, Fragment } from \"react\";\r\nimport { Form, FormGroup, Input, Button, Row, Col } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\nimport { NumberFormatInput } from \"../../../NumberFormatInput/NumberFormatInput\";\r\nimport { KYCStatus, KYCReason } from \"../types\";\r\nimport { CustomFormInput, SelectFormField, FormField } from \"../../../../utils/FormFields\";\r\nimport { CircularProgress } from \"../../../..\";\r\nimport { AccountMode, PersonMode, showToast } from \"../../../../utils/Helper\";\r\nimport { parseDate } from \"./../../../../utils/dateUtils\";\r\n\r\nconst KYCTab = ({ KYC, person, setPersonData, services, onboarding, mode, role, refresh }) => {\r\n const [loadingSave, setLoadingSave] = useState(false);\r\n const [changedKYC, setChangedKYC] = useState({});\r\n\r\n const [initialstatus, setInitial] = useState(\"New\");\r\n\r\n const handleSave = () => {\r\n const sendKYC = { ...KYC, ...changedKYC };\r\n\r\n const postPerson = {\r\n ...person,\r\n KYC: sendKYC,\r\n };\r\n const body = {\r\n OnboardingId: onboarding,\r\n postPerson: postPerson,\r\n };\r\n\r\n setLoadingSave(true);\r\n if (mode === PersonMode.New) {\r\n services.fetchNewPerson(body, (res) => {\r\n if (res) {\r\n setPersonData({\r\n ...postPerson,\r\n });\r\n setChangedKYC({});\r\n setLoadingSave(false);\r\n showToast(\"Changes saved successfully\");\r\n refresh();\r\n } else {\r\n setLoadingSave(false);\r\n }\r\n });\r\n } else {\r\n services.fetchPersonKYC({ person: postPerson }, ({ result }) => {\r\n if (result && result.Code === 200) {\r\n setPersonData(\r\n {\r\n ...person,\r\n KYC: changedKYC,\r\n },\r\n true\r\n );\r\n setChangedKYC({});\r\n setLoadingSave(false);\r\n refresh();\r\n } else {\r\n setLoadingSave(false);\r\n }\r\n });\r\n }\r\n };\r\n\r\n const onChange = (name, value) => {\r\n if (!loadingSave) {\r\n const newKYC = { ...changedKYC };\r\n if (KYC[name] !== value) {\r\n newKYC[name] = value;\r\n } else if (newKYC[name]) {\r\n newKYC[name] = undefined;\r\n }\r\n setChangedKYC(newKYC);\r\n }\r\n };\r\n\r\n const revert = () => setChangedKYC({});\r\n\r\n if (!KYC) {\r\n return ;\r\n }\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n onChange(\"KYCPersonName\", e.target.value)}\r\n />\r\n \r\n \r\n \r\n \r\n onChange(\"KYCPersonDocumentNumber\", e.target.value)}\r\n />\r\n \r\n \r\n \r\n i}\r\n getSelectItemName={(i) => (i ? \"Yes\" : \"No\")}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange(\"KYCPersonNationality\", e.target.value)}\r\n />\r\n \r\n \r\n \r\n \r\n onChange(\"KYCPersonType\", e.target.value)}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange(\"KYCPersonAge\", e.value)}\r\n dataTypeDecimalName=\"default\"\r\n />\r\n \r\n \r\n \r\n \r\n onChange(\"KYCPersonActivity\", e.target.value)}\r\n />\r\n \r\n \r\n \r\n \r\n onChange(\"KYCPersonAddress\", e.target.value)}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange(\"KYCPersonRisk\", e.target.value)}\r\n />\r\n \r\n \r\n \r\n \r\n onChange(\"KYCPersonTransactionalLimit\", e.value)}\r\n dataTypeDecimalName=\"currency\"\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n i}\r\n getSelectItemName={(i) => KYCReason[i]}\r\n onChange={onChange}\r\n disabled={role === \"BackOffice\"}\r\n />\r\n \r\n \r\n i}\r\n getSelectItemName={(i) => KYCStatus[i]}\r\n onChange={onChange}\r\n disabled={role !== \"Compliance\"}\r\n />\r\n \r\n \r\n \r\n onChange(\"KYCAdvisorComments\", e.target.value)}\r\n disabled={role !== \"Advisor\"}\r\n />\r\n \r\n\r\n \r\n onChange(\"KYCValidateComments\", e.target.value)}\r\n disabled={role !== \"Compliance\"}\r\n />\r\n \r\n\r\n {onboarding && (\r\n
    \r\n \r\n onChange(\"KYCExternalStatus\", e.target.value)}\r\n />\r\n \r\n\r\n \r\n onChange(\"IsPLD\", e.target.value)}\r\n />\r\n \r\n
    \r\n )}\r\n \r\n onChange(\"KYCFlags\", e.target.value)}\r\n />\r\n \r\n
    \r\n
    \r\n {role !== \"BackOffice\" && (\r\n \r\n {mode !== PersonMode.New && (\r\n \r\n )}\r\n handleSave()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Save\r\n \r\n \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nKYCTab.propTypes = {\r\n KYC: PropTypes.object,\r\n setAccountData: PropTypes.func.isRequired,\r\n services: PropTypes.object.isRequired,\r\n account: PropTypes.object.isRequired,\r\n mode: PropTypes.object.isRequired,\r\n};\r\n\r\nKYCTab.defaultProps = {\r\n KYC: undefined,\r\n};\r\n\r\nexport default KYCTab;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Form, FormGroup, Row, Col, ListGroup, ListGroupItem, Spinner, Button } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport style from \"../../Grid.module.scss\";\r\nimport ModalConfirm from \"../../Modal/ModalConfirm\";\r\nimport ModalLegalAddress from \"../../Modal/ModalLegalAddress\";\r\nimport { AccountMode, showToast, LegalAddresses } from \"../../../../utils/Helper\";\r\nimport CrossReferenceSearch from \"../../../Modal/CrossReferenceSearch/CrossReferenceSearch\";\r\n\r\nfunction generateEmptyLegalAddress() {\r\n return {\r\n LegalAddressCityId: 0,\r\n LegalAddressCityName: \"\",\r\n LegalAddressCountryId: 0,\r\n LegalAddressCountryIso: \"\",\r\n LegalAddressCountryName: \"\",\r\n LegalAddressExtraInformation1: \"\",\r\n LegalAddressExtraInformation2: \"\",\r\n LegalAddressId: 0,\r\n LegalAddressNumber: \"\",\r\n LegalAddressStateId: 0,\r\n LegalAddressStateName: \"\",\r\n LegalAddressStreet: \"\",\r\n LegalAddressType: LegalAddresses.Personal,\r\n LegalAddressZipCode: 0,\r\n };\r\n}\r\n\r\nconst LegalAddressTab = ({\r\n services,\r\n document,\r\n legalAddress,\r\n onboarding,\r\n person,\r\n setPersonData,\r\n refresh,\r\n userSession,\r\n}) => {\r\n const [modalLegalAddress, setModalLegalAddress] = useState({\r\n open: false,\r\n loading: true,\r\n initial: generateEmptyLegalAddress(),\r\n error: undefined,\r\n });\r\n const [modalConfirm, setModalConfirm] = useState({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n });\r\n\r\n const SaveNewLegalAddress = (newLegalAddress) => {\r\n if (newLegalAddress.LegalAddressType === \"\") newLegalAddress.LegalAddressType = LegalAddresses.Personal;\r\n const body = {\r\n person: {\r\n PersonId: person.PersonId,\r\n LegalAddress: [newLegalAddress],\r\n },\r\n };\r\n setModalLegalAddress((m) => ({\r\n ...m,\r\n open: true,\r\n loading: true,\r\n }));\r\n\r\n if (onboarding) {\r\n let docs = legalAddress;\r\n let id = Number(docs.length) + 2;\r\n if (newLegalAddress.LegalAddressId > 0) {\r\n id = newLegalAddress.LegalAddressId;\r\n docs.forEach((p, i) => {\r\n if (p.LegalAddressId == newLegalAddress.LegalAddressId) {\r\n docs.splice(i, 1);\r\n }\r\n });\r\n }\r\n if (newLegalAddress.LegalAddressZipCode === \"\") newLegalAddress.LegalAddressZipCode = 0;\r\n\r\n const nAddress = {\r\n ...newLegalAddress,\r\n LegalAddressId: id,\r\n };\r\n\r\n docs.push(nAddress);\r\n const postPerson = {\r\n ...person,\r\n LegalAddress: docs,\r\n };\r\n const body2 = {\r\n postPerson: postPerson,\r\n OnboardingId: onboarding,\r\n };\r\n services.fetchNewPerson(body2, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setPersonData(body2.postPerson);\r\n setModalLegalAddress({\r\n ...modalLegalAddress,\r\n open: false,\r\n callback: undefined,\r\n loading: false,\r\n messageShow: true,\r\n message: \"\",\r\n });\r\n refresh();\r\n } else {\r\n alert(\"Server Error\");\r\n }\r\n });\r\n } else {\r\n services.fetchUpdatePersonLegalAddress(body, (response) => {\r\n if (response && response.result) {\r\n const { result } = response;\r\n if (response.result.Code === 200) {\r\n const newPerson = { ...person };\r\n let found = false;\r\n let index = 0;\r\n newPerson.LegalAddress = legalAddress.map((d, i) => {\r\n if (parseInt(d.LegalAddressId, 10) == parseInt(newLegalAddress.LegalAddressId, 10)) {\r\n index = i;\r\n found = true;\r\n setModalLegalAddress({\r\n ...modalLegalAddress,\r\n open: false,\r\n callback: undefined,\r\n loading: false,\r\n });\r\n return {\r\n ...newLegalAddress,\r\n };\r\n }\r\n return {\r\n ...d,\r\n };\r\n });\r\n if (!found) {\r\n newLegalAddress.LegalAddressId = response.Id;\r\n legalAddress.push(newLegalAddress);\r\n newPerson.LegalAddress = legalAddress;\r\n } else {\r\n legalAddress[index] = newLegalAddress;\r\n newPerson.LegalAddress = legalAddress;\r\n }\r\n\r\n setPersonData({\r\n ...newPerson,\r\n });\r\n setModalLegalAddress((m) => ({\r\n open: false,\r\n loading: false,\r\n initial: generateEmptyLegalAddress(),\r\n error: undefined,\r\n }));\r\n refresh();\r\n }\r\n } else {\r\n return false;\r\n }\r\n });\r\n }\r\n };\r\n\r\n const toggleModalConfirm = (d) =>\r\n setModalConfirm((mod) => {\r\n const newM = {\r\n ...mod,\r\n open: !mod.open,\r\n };\r\n if (d) {\r\n newM.title = \"Are you sure you want to remove the selected Legal Address?\";\r\n newM.callback = () => handleDeleteFile(d);\r\n }\r\n return newM;\r\n });\r\n\r\n const handleDeleteFile = (newLegalAddress) => {\r\n setModalConfirm((mod) => ({\r\n ...mod,\r\n saving: true,\r\n }));\r\n const body = {\r\n person: {\r\n PersonId: person.PersonId,\r\n LegalAddress: [newLegalAddress],\r\n },\r\n delete: true,\r\n };\r\n if (onboarding) {\r\n let docs = person.LegalAddress;\r\n if (newLegalAddress.LegalAddressId > 0) {\r\n docs.forEach((p, i) => {\r\n if (p.LegalAddressId == newLegalAddress.LegalAddressId) {\r\n docs.splice(i, 1);\r\n }\r\n });\r\n }\r\n const postPerson = {\r\n ...person,\r\n LegalAddress: docs,\r\n };\r\n const body2 = {\r\n postPerson: postPerson,\r\n OnboardingId: onboarding,\r\n };\r\n services.fetchNewPerson(body2, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setPersonData(body2.postPerson);\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n });\r\n setModalLegalAddress({\r\n ...modalLegalAddress,\r\n loading: false,\r\n messageShow: false,\r\n initial: undefined,\r\n });\r\n } else {\r\n alert(\"Server Error\");\r\n }\r\n });\r\n } else {\r\n services.fetchUpdatePersonLegalAddress(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newPerson = { ...person };\r\n newPerson.LegalAddress.forEach((p, i) => {\r\n if (p.LegalAddressId == newLegalAddress.LegalAddressId) {\r\n newPerson.LegalAddress.splice(i, 1);\r\n }\r\n });\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n });\r\n setPersonData({\r\n ...newPerson,\r\n });\r\n } else {\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n saving: false,\r\n });\r\n legalAddress.forEach((p, i) => {\r\n if (p.LegalAddressId == newLegalAddress.LegalAddressId) {\r\n const newPerson = { ...person };\r\n newPerson.LegalAddress.forEach((p, i) => {\r\n if (p.LegalAddressId == newLegalAddress.LegalAddressId) {\r\n newPerson.LegalAddress.splice(i, 1);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n });\r\n }\r\n };\r\n\r\n const toggleModalNewLegalAdress = (initial) =>\r\n setModalLegalAddress((m) => ({\r\n open: !m.open,\r\n loading: false,\r\n initial: initial,\r\n }));\r\n\r\n if (!legalAddress) {\r\n return ;\r\n }\r\n\r\n const onEdit = (d) => {\r\n setModalLegalAddress((m) => ({\r\n ...m,\r\n open: true,\r\n loading: false,\r\n initial: d,\r\n }));\r\n };\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n {legalAddress.map((d) => (\r\n \r\n \r\n Country: \r\n {d.LegalAddressCountryName}\r\n \r\n {userSession.IsReadOnly === false &&
    onEdit(d)}>\r\n \r\n
    }\r\n \r\n
    \r\n \r\n State: \r\n {d.LegalAddressStateName}\r\n \r\n {userSession.IsReadOnly === false &&
    toggleModalConfirm(d)}>\r\n \r\n
    }\r\n \r\n
    \r\n\r\n \r\n City: \r\n {d.LegalAddressCityName}\r\n \r\n \r\n\r\n \r\n Street: \r\n {d.LegalAddressStreet}\r\n \r\n \r\n \r\n Number: \r\n {d.LegalAddressNumber}\r\n \r\n \r\n \r\n Zip Code: \r\n {d.LegalAddressZipCode}\r\n \r\n \r\n \r\n Type:\r\n {d.LegalAddressType ? d.LegalAddressType : \"-\"}\r\n \r\n \r\n \r\n Neighbourhood: \r\n {d.LegalAddressExtraInformation1 ? d.LegalAddressExtraInformation1 : \"-\"}\r\n \r\n \r\n \r\n References: \r\n {d.LegalAddressExtraInformation2 ? d.LegalAddressExtraInformation2 : \"-\"}\r\n \r\n \r\n
    \r\n ))}\r\n
    \r\n
    \r\n \r\n \r\n \r\n\r\n {userSession.IsReadOnly === false && toggleModalNewLegalAdress(generateEmptyLegalAddress())}\r\n color=\"primary\"\r\n style={{ marginRight: 10 }}\r\n >\r\n Add New Legal Address\r\n }\r\n
    \r\n );\r\n};\r\n\r\nfunction RenderDropdownActions({ onEdit, onDelete, index }) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n onEdit(index)}>\r\n \r\n Edit\r\n \r\n onDelete(index)}>\r\n \r\n Delete\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nRenderDropdownActions.propTypes = {\r\n onEdit: PropTypes.func.isRequired,\r\n onDelete: PropTypes.func.isRequired,\r\n index: PropTypes.number.isRequired,\r\n};\r\n\r\nexport default LegalAddressTab;\r\n","import React, {useState} from \"react\";\r\nimport {\r\n Form,\r\n FormGroup,\r\n Row,\r\n Col,\r\n ListGroup,\r\n ListGroupItem,\r\n Spinner,\r\n Button\r\n} from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport ModalPhone from \"../../Modal/ModalPhone\";\r\nimport ModalConfirm from \"../../Modal/ModalConfirm\";\r\nimport ModalError from \"../../Modal/ModalError\";\r\n\r\nconst Phones = ({\r\n phones,\r\n person,\r\n phoneTypes,\r\n setPersonData,\r\n services,\r\n role, \r\n onboarding,\r\n Link,\r\n userSession\r\n}) => {\r\n const [modalNewPhone, setModalNewPhone] = useState({\r\n open: false,\r\n loading: false,\r\n initial: undefined,\r\n error: undefined,\r\n messageShow: false,\r\n message: \"\"\r\n });\r\n const [modalConfirm, setModalConfirm] = useState({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false\r\n });\r\n const [modalError, setModalError] = useState({\r\n open: false,\r\n message: \"\",\r\n });\r\n\r\n const toggleModalError = (e, message) => {\r\n setModalError({\r\n open: !modalError.open,\r\n message,\r\n });\r\n };\r\n\r\n const handleSaveNewDocument = newPhone => {\r\n setModalNewPhone({\r\n ...modalNewPhone,\r\n loading: true,\r\n messageShow: false\r\n });\r\n const body = {\r\n person: {\r\n PersonId: person.PersonId,\r\n Phone: [\r\n {\r\n PhoneId: newPhone.PhoneId,\r\n PhoneType: newPhone.PhoneType,\r\n PhoneNumber: newPhone.PhoneNumber\r\n }\r\n ]\r\n },\r\n delete: false\r\n };\r\n if (onboarding){\r\n let docs = person.Phone\r\n let id = Number(phones.length) + 2\r\n if (newPhone.PhoneId > 0){\r\n id = newPhone.PhoneId\r\n docs.forEach((p, i) => {\r\n if (p.PhoneId == newPhone.PhoneId) {\r\n docs.splice(i, 1);\r\n }\r\n });\r\n }\r\n const nPhone = \r\n {\r\n PhoneId: id,\r\n PhoneType: newPhone.PhoneType,\r\n PhoneNumber: newPhone.PhoneNumber\r\n }\r\n \r\n docs.push(nPhone)\r\n const postPerson = {\r\n ...person,\r\n Phone: docs,\r\n };\r\n const body2 = {\r\n postPerson: postPerson,\r\n OnboardingId: onboarding,\r\n };\r\n services.fetchNewPerson(body2, response => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setPersonData(body2.postPerson);\r\n setModalNewPhone({\r\n ...modalNewPhone,\r\n open: false,\r\n callback: undefined,\r\n loading: false,\r\n messageShow: true,\r\n message: ''\r\n });\r\n } else {\r\n alert(\"Server Error\");\r\n }\r\n \r\n });\r\n\r\n }else{\r\n services.fetchAppendPersonNewPhone(body, response => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newPerson = {...person};\r\n var mes = \"\";\r\n if (role == \"Compliance\") {\r\n let docs = person.Phone\r\n let id = Number(phones.length) + 2\r\n if (newPhone.PhoneId > 0){\r\n id = newPhone.PhoneId\r\n docs.forEach((p, i) => {\r\n if (p.PhoneId == newPhone.PhoneId) {\r\n docs.splice(i, 1);\r\n }\r\n });\r\n }\r\n const nPhone = \r\n {\r\n PhoneId: id,\r\n PhoneType: newPhone.PhoneType,\r\n PhoneNumber: newPhone.PhoneNumber\r\n }\r\n \r\n docs.push(nPhone)\r\n }\r\n setModalNewPhone({\r\n ...modalNewPhone,\r\n open: false,\r\n callback: undefined,\r\n loading: false,\r\n messageShow: true,\r\n message: mes\r\n });\r\n setPersonData({\r\n newPerson,\r\n description: \"PHONE\"\r\n });\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result\r\n ? `Error saving Phone: ${response.result.Description}`\r\n : \"Server Error\"\r\n );\r\n setModalNewPhone({\r\n loading: false,\r\n open: false,\r\n messageShow: false\r\n });\r\n }\r\n });\r\n }\r\n };\r\n\r\n const handleDeleteFile = newPhone => {\r\n setModalNewPhone({\r\n ...modalNewPhone,\r\n loading: true,\r\n messageShow: false\r\n });\r\n const body = {\r\n person: {\r\n PersonId: person.PersonId,\r\n Phone: [\r\n {\r\n PhoneId: newPhone.PhoneId,\r\n PhoneType: newPhone.PhoneType,\r\n PhoneNumber: newPhone.PhoneNumber\r\n }\r\n ]\r\n },\r\n delete: true\r\n };\r\n if (onboarding){\r\n let docs = person.Phone\r\n if (newPhone.PhoneId > 0){\r\n docs.forEach((p, i) => {\r\n if (p.PhoneId == newPhone.PhoneId) {\r\n docs.splice(i, 1);\r\n }\r\n });\r\n }\r\n const postPerson = {\r\n ...person,\r\n Phone: docs,\r\n };\r\n const body2 = {\r\n postPerson: postPerson,\r\n OnboardingId: onboarding,\r\n };\r\n services.fetchNewPerson(body2, response => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setPersonData(body2.postPerson);\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false\r\n });\r\n setModalNewPhone({\r\n ...modalNewPhone,\r\n loading: false,\r\n messageShow: false\r\n });\r\n } else {\r\n alert(\"Server Error\");\r\n }\r\n \r\n });\r\n\r\n }else{\r\n services.fetchAppendPersonNewPhone(body, response => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newPerson = {...person};\r\n newPerson.Phone.forEach((p, i) => {\r\n if (p.PhoneId == newPhone.PhoneId) {\r\n newPerson.Phone.splice(i, 1);\r\n }\r\n });\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false\r\n });\r\n setModalNewPhone({\r\n ...modalNewPhone,\r\n loading: false,\r\n messageShow: false\r\n });\r\n setPersonData({\r\n newPerson: newPerson,\r\n description: \"PHONE\"\r\n });\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result\r\n ? `Error saving Phone: ${response.result.Description}`\r\n : \"Server Error\"\r\n );\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false\r\n });\r\n }\r\n });\r\n }\r\n };\r\n\r\n const toggleModalConfirm = m =>\r\n setModalConfirm(mod => {\r\n const newM = {\r\n ...mod,\r\n open: !mod.open\r\n };\r\n if (m) {\r\n newM.title = \"Are you sure you want to remove the selected Phone?\";\r\n newM.callback = () => handleDeleteFile(m);\r\n }\r\n return newM;\r\n });\r\n\r\n const handleToggleModalNewDocument = initial =>\r\n setModalNewPhone(m => ({\r\n open: !m.open,\r\n loading: m.loading,\r\n initial,\r\n error: undefined,\r\n message: \"\",\r\n messageShow: false\r\n }));\r\n\r\n if (!phones) {\r\n return ;\r\n }\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n {phones.map((d, i) => (\r\n \r\n \r\n Type: \r\n {d.PhoneType}\r\n \r\n {userSession.IsReadOnly === false && handleToggleModalNewDocument(d)}\r\n >\r\n \r\n
    }\r\n \r\n \r\n \r\n Phone Number: \r\n {d.PhoneNumber}\r\n \r\n {userSession.IsReadOnly === false && toggleModalConfirm(d)}\r\n >\r\n \r\n }\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n {modalNewPhone.open && (\r\n \r\n )}\r\n \r\n \r\n {userSession.IsReadOnly === false && handleToggleModalNewDocument()}\r\n color=\"primary\"\r\n style={{marginRight: 10}}\r\n >\r\n Add New Phone\r\n }\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nPhones.propTypes = {\r\n phones: PropTypes.array,\r\n person: PropTypes.object.isRequired,\r\n phoneTypes: PropTypes.array,\r\n setPersonData: PropTypes.func.isRequired,\r\n services: PropTypes.object.isRequired\r\n};\r\n\r\nPhones.defaultProps = {\r\n phones: undefined,\r\n phoneTypes: undefined\r\n};\r\n\r\nexport default Phones;\r\n","import React, {useState, useEffect} from \"react\";\r\nimport {\r\n Form,\r\n FormGroup,\r\n ListGroup,\r\n ListGroupItem,\r\n Spinner,\r\n Row,\r\n Col\r\n} from \"reactstrap\";\r\nimport PieChart from \"react-minimal-pie-chart\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport {PieChartColors} from \"../../Account/types\";\r\nimport CircularProgress from \"../../../CircularProgress/CircularProgress\";\r\n\r\nconst PortfolioTab = ({person, portfolio, handleRedirectAccount, services, opsViewAccountName}) => {\r\n const [accountPortfolios, setAccountPortfolios] = useState([]);\r\n const [loading, setLoading] = useState(true);\r\n useEffect(() => {\r\n const body = {\r\n personId: person.PersonId\r\n };\r\n services.fetchGetPersonAccountPorfolios(body, response => {\r\n setLoading(false);\r\n setAccountPortfolios(response.portfolio);\r\n });\r\n }, []);\r\n\r\n if (loading) {\r\n return ;\r\n }\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n {accountPortfolios.map(port => {\r\n const portfolioSlices = port.Portfolio.map((p, index) => ({\r\n title: p.AssetTicker,\r\n value: parseFloat(p.PortfolioQuantity),\r\n color: PieChartColors[index % PieChartColors.length]\r\n }));\r\n return (\r\n handleRedirectAccount(port.AccountId)}\r\n key={port.AccountId}\r\n >\r\n \r\n {\r\n opsViewAccountName !== undefined ?\r\n (\r\n opsViewAccountName ?\r\n {`${port.AccountName + \"-\" + port.AccountNumber}`}\r\n :\r\n {`${port.AccountNumber}`}\r\n )\r\n :\r\n {`${port.AccountName + \"-\" + port.AccountNumber}`}\r\n }\r\n {port.AccountRelationship}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n })}\r\n \r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nPortfolioTab.propTypes = {\r\n portfolio: PropTypes.array,\r\n handleRedirectAccount: PropTypes.func.isRequired\r\n};\r\n\r\nPortfolioTab.defaultProps = {\r\n portfolio: undefined\r\n};\r\n\r\nexport default PortfolioTab;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Form, FormGroup, Spinner, Button, ButtonGroup, Row, Col, Label, Input } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport { PersonType } from \"../types\";\r\nimport PhysicalPersonProfile from \"../Forms/PhysicalPerson\";\r\nimport JuridicalPersonProfile from \"../Forms/JuridicalPerson\";\r\nimport ModalError from \"../../Modal/ModalError\";\r\nimport { preCheckPersonForm } from \"../../preCheckForms\";\r\nimport { PersonMode, PersonQualification } from \"../../../../utils/Helper\";\r\nimport { SelectFormField, FormField } from \"../../../../utils/FormFields\";\r\nimport ModalConfirm from \"../../Modal/ModalConfirm\";\r\nimport PersonSubAsset from \"../Forms/PersonSubAsset\";\r\n\r\nconst PersonProfileTab = ({\r\n person,\r\n setPersonData,\r\n professions,\r\n activitySectors,\r\n publicPositions,\r\n personLinks,\r\n documentTypes,\r\n companyLinks,\r\n patrimonies,\r\n entityTypes,\r\n societyTypes,\r\n subAssetClasses,\r\n services,\r\n role,\r\n mode,\r\n onboarding,\r\n holder,\r\n isPerson,\r\n handleRedirectPerson,\r\n refresh,\r\n manual,\r\n needsExtraFields,\r\n viewDigitalRelatedFrom,\r\n userSession,\r\n}) => {\r\n const [loadingSave, setLoadingSave] = useState(false);\r\n const [checking, setChecking] = useState(false);\r\n const [changedPerson, setChangedPerson] = useState({});\r\n const [changedLegalAddress, setChangedLegalAddress] = useState({});\r\n const [checked, setChecked] = useState([]);\r\n const [modalError, setModalError] = useState({\r\n open: false,\r\n message: \"\",\r\n });\r\n const [disabled, setDisabled] = useState(true);\r\n const [autosuggests, setAutosuggests] = useState({\r\n PersonFiscalResidenceCountry: \"\",\r\n PhysicalPersonCountryOfBirth: \"\",\r\n SpouseDocumentCountryOfIssue: \"\",\r\n LegalAddressCountry: \"\",\r\n PersonActivitySector: \"\",\r\n JuridicalPersonConstPlace: \"\",\r\n });\r\n const [errors, setErrors] = useState({});\r\n const [modalConfirm, setModalConfirm] = useState({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n });\r\n const [isPersonExternalSystem, setIsPersonExternalSystem] = useState(false);\r\n const [externalPersonInfo, setExternalPersonInfo] = useState(false);\r\n const [externalPersonDocType, setExternalPersonDocType] = useState({\r\n docType: \"\",\r\n description: \"\",\r\n docPersonType: \"\",\r\n });\r\n const [externalPersonDocNumber, setExternalPersonDocNumber] = useState(\"\");\r\n const [externalPersonIdCheckError, setExternalPersonIdCheckError] = useState(\"\");\r\n const [isLoading, setIsLoading] = useState(false);\r\n const [isFetchingAvaible, setIsFetchingAvaible] = useState(false);\r\n\r\n const color = \"btn btn-ladda btn-primary\";\r\n\r\n const toggleModalError = (e, message) =>\r\n setModalError({\r\n open: !modalError.open,\r\n message,\r\n });\r\n\r\n useEffect(() => {\r\n if (mode == PersonMode.New) {\r\n setDisabled(false);\r\n }\r\n setChecked(person.PersonSubAssetClass);\r\n const propsLegalAddress = person.LegalAddress[0] ? person.LegalAddress[0].LegalAddressCountryName : \"\";\r\n setAutosuggests({\r\n PersonFiscalResidenceCountry: person.PersonFiscalResidenceCountryName,\r\n PhysicalPersonCountryOfBirth: person.PhysicalPersonCountryOfBirthName,\r\n SpouseDocumentCountryOfIssue: person.SpouseDocumentCountryOfIssueName,\r\n LegalAddressCountry: propsLegalAddress,\r\n PersonActivitySector: person.PersonActivitySectorName,\r\n JuridicalPersonConstPlace: person.JuridicalPersonConstPlace,\r\n });\r\n }, [person]);\r\n\r\n useEffect(() => {\r\n if (documentTypes) {\r\n setExternalPersonDocType({\r\n docType: documentTypes[0].DocumentTypeId,\r\n description: documentTypes[0].DocumentTypeName,\r\n docPersonType: documentTypes[0].PersonType,\r\n });\r\n }\r\n }, [documentTypes]);\r\n\r\n const onChangeAutosuggest = (name, value) =>\r\n setAutosuggests((a) => ({\r\n ...a,\r\n [name]: value,\r\n }));\r\n\r\n const handleExternalInfo = (personId) => {\r\n if (person.PersonUpdateManual === \"1\" || person.PersonUpdateManual)\r\n alert(\"Person update is Manual, you should change it to get information from external system\");\r\n else\r\n setModalConfirm((m) => ({\r\n ...m,\r\n open: !m.open,\r\n title: \"Are you sure you want to update the selected person with info from external system?\",\r\n personId,\r\n callback: () => getExternalInfo(personId),\r\n }));\r\n };\r\n\r\n const handleSave = () => {\r\n const postPerson = {\r\n ...person,\r\n ...changedPerson,\r\n personOnboardingId: holder,\r\n PersonSubAssetClass: checked,\r\n needsExtraFields,\r\n };\r\n const newErrors = preCheckPersonForm(postPerson);\r\n if (Object.keys(newErrors).length !== 0) {\r\n setErrors(newErrors);\r\n return;\r\n }\r\n const body = {\r\n person: postPerson,\r\n };\r\n setLoadingSave(true);\r\n setErrors(newErrors);\r\n if (onboarding || isPerson === \"1\") {\r\n const body = {\r\n person: postPerson,\r\n OnboardingId: onboarding,\r\n };\r\n services.fetchNewPerson(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newDocuments = [...postPerson.documents];\r\n newDocuments.forEach((doc, i) => {\r\n if (\r\n parseInt(doc.PhysicalPersonDocumentTypeId, 10) ===\r\n parseInt(postPerson.PhysicalPersonMainDocumentTypeId, 10)\r\n ) {\r\n doc.PhysicalPersonDocumentNumber = postPerson.PhysicalPersonMainDocumentNumber;\r\n }\r\n });\r\n setPersonData({\r\n ...body.person,\r\n Documents: newDocuments,\r\n });\r\n refresh();\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result\r\n ? `Error saving Person: ${response.result.Description}`\r\n : \"Server Error\"\r\n );\r\n }\r\n setLoadingSave(false);\r\n });\r\n } else {\r\n services.fetchUpdatePerson(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setPersonData({\r\n ...body.person,\r\n suitabilityDescription: response.result.Description,\r\n });\r\n refresh();\r\n } else {\r\n toggleModalError(\r\n {},\r\n response && response.result\r\n ? `Error saving Person: ${response.result.Description}`\r\n : \"Server Error\"\r\n );\r\n }\r\n setLoadingSave(false);\r\n });\r\n }\r\n };\r\n\r\n const onChange = (name, value, otherValue) => {\r\n let newChangedPerson = {\r\n ...changedPerson,\r\n [name]: value,\r\n };\r\n const newErrors = { ...errors };\r\n delete newErrors[name];\r\n switch (name) {\r\n case \"PhysicalPersonMainDocumentTypeId\":\r\n newChangedPerson.PhysicalPersonMainDocumentType = otherValue;\r\n break;\r\n case \"SpouseDocumentCountryOfIssueId\":\r\n newChangedPerson.SpouseDocumentCountryOfIssueName = otherValue;\r\n break;\r\n case \"PhysicalPersonCountryOfBirthId\":\r\n newChangedPerson.PhysicalPersonCountryOfBirthName = otherValue;\r\n newChangedPerson.PhysicalPersonCityOfBirthName = \"\";\r\n newChangedPerson.PhysicalPersonCityOfBirthId = \"\";\r\n delete newErrors.PhysicalPersonCityOfBirthId;\r\n break;\r\n case \"PhysicalPersonDateOfBirth\":\r\n newChangedPerson.PhysicalPersonDateOfBirth = value.split(\"T\")[0];\r\n break;\r\n case \"PhysicalPersonCityOfBirthId\":\r\n newChangedPerson.PhysicalPersonCityOfBirthName = otherValue;\r\n break;\r\n case \"PersonFiscalResidenceCountryId\":\r\n newChangedPerson.PersonFiscalResidenceCountryName = otherValue;\r\n break;\r\n case \"PersonProfessionId\":\r\n newChangedPerson.PersonProfessionName = otherValue;\r\n break;\r\n case \"SpouseDocumentTypeId\":\r\n newChangedPerson.SpouseDocumentTypeName = otherValue;\r\n break;\r\n case \"PhysicalPersonPublicPositionId\":\r\n newChangedPerson.PhysicalPersonPublicPositionName = otherValue;\r\n break;\r\n case \"PhysicalPersonLinkId\":\r\n newChangedPerson.PhysicalPersonLinkName = otherValue;\r\n break;\r\n case \"PersonLinkPublicPositionId\":\r\n newChangedPerson.PersonLinkPublicPositionName = otherValue;\r\n break;\r\n case \"PersonCompanyLinkId\":\r\n newChangedPerson.PersonCompanyLinkName = otherValue;\r\n break;\r\n case \"PersonActivitySectorId\":\r\n newChangedPerson.PersonActivitySectorName = otherValue;\r\n break;\r\n case \"JuridicalPersonDocumentTypeId\":\r\n newChangedPerson.JuridicalPersonDocumentTypeName = otherValue;\r\n break;\r\n case \"JuridicalPersonTAXId\":\r\n break;\r\n case \"PhysicalPersonMainDocumentNumber\":\r\n break;\r\n case \"JuridicalPersonEntityTypeId\":\r\n newChangedPerson.JuridicalPersonEntityTypeDescription = otherValue;\r\n break;\r\n case \"JuridicalPersonSocietyTypeId\":\r\n newChangedPerson.JuridicalPersonSocietyTypeDescription = otherValue;\r\n break;\r\n case \"JuridicalPersonConstPlaceId\":\r\n newChangedPerson.JuridicalPersonConstPlace = otherValue;\r\n break;\r\n case \"JuridicalPersonConstDate\":\r\n newChangedPerson.JuridicalPersonConstDate = value.split(\"T\")[0];\r\n break;\r\n default:\r\n break;\r\n }\r\n setErrors(newErrors);\r\n setChangedPerson(newChangedPerson);\r\n };\r\n\r\n const onChangeLegalAddress = (name, value, otherValue) => {\r\n const newChangedLegalAddress = {\r\n ...changedLegalAddress,\r\n [name]: value,\r\n };\r\n const newErrors = { ...errors };\r\n delete newErrors[name];\r\n switch (name) {\r\n case \"LegalAddressCountryId\":\r\n newChangedLegalAddress.LegalAddressCountryName = otherValue;\r\n delete newErrors.LegalAddressStateId;\r\n delete newErrors.LegalAddressCityId;\r\n break;\r\n case \"LegalAddressCityId\":\r\n newChangedLegalAddress.LegalAddressCityName = otherValue;\r\n break;\r\n case \"LegalAddressStateId\":\r\n newChangedLegalAddress.LegalAddressStateName = otherValue;\r\n delete newErrors.LegalAddressCityId;\r\n break;\r\n default:\r\n break;\r\n }\r\n setChangedLegalAddress(newChangedLegalAddress);\r\n setErrors(newErrors);\r\n };\r\n\r\n const revert = () => {\r\n setChangedPerson({});\r\n setChangedLegalAddress({});\r\n setAutosuggests({\r\n PersonFiscalResidenceCountry: person.PersonFiscalResidenceCountryName,\r\n PhysicalPersonCountryOfBirth: person.PhysicalPersonCountryOfBirthName,\r\n SpouseDocumentCountryOfIssue: person.SpouseDocumentCountryOfIssueName,\r\n LegalAddressCountry: person.LegalAddress[0] ? person.LegalAddress[0].LegalAddressCountryName : \"\",\r\n PersonActivitySector: person.PersonActivitySectorName,\r\n JuridicalPersonConstPlace: person.JuridicalPersonConstPlace,\r\n });\r\n setErrors({});\r\n };\r\n\r\n const toggleDisable = () => {\r\n setDisabled((d) => !d);\r\n revert();\r\n };\r\n\r\n const changePersonType = (value) => {\r\n setPersonData({\r\n ...person,\r\n PersonType: value,\r\n });\r\n };\r\n\r\n const changePersonMinimal = (value) => {\r\n setPersonData({\r\n ...person,\r\n description: \"PersonIsMinimal\",\r\n PersonIsMinimal: value,\r\n });\r\n setChangedPerson({\r\n ...changedPerson,\r\n PersonIsMinimal: value,\r\n });\r\n };\r\n\r\n // Add/Remove checked item from list\r\n const handleCheck = (id) => {\r\n let index = -1;\r\n var updatedList = checked ? [...checked] : [];\r\n updatedList.forEach((doc, i) => {\r\n if (parseInt(doc.PersonSubAssetClassId) === parseInt(id)) {\r\n index = i;\r\n }\r\n });\r\n if (index > -1) {\r\n updatedList.splice(index, 1);\r\n } else {\r\n updatedList.push({ PersonSubAssetClassId: id });\r\n }\r\n setChecked(updatedList);\r\n };\r\n\r\n // Return classes based on whether item is checked\r\n function isChecked(id) {\r\n var updatedList = checked ? [...checked] : [];\r\n updatedList.forEach((doc, i) => {\r\n if (parseInt(doc.PersonSubAssetClassId) == parseInt(id)) {\r\n return true;\r\n }\r\n });\r\n }\r\n\r\n const getExternalInfo = () => {\r\n setModalConfirm((m) => ({\r\n ...m,\r\n open: true,\r\n loading: true,\r\n }));\r\n const body = {\r\n personid: person.PersonId,\r\n isOnboarding: mode == PersonMode.New,\r\n };\r\n services.fetchExternalPerson(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n });\r\n refresh();\r\n } else {\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n });\r\n toggleModalError({}, response && response.result ? response.result.Description : \"Server Error\");\r\n }\r\n });\r\n };\r\n\r\n const handleNewSave = () => {\r\n const postPerson = {\r\n ...person,\r\n ...changedPerson,\r\n PersonSubAssetClass: checked,\r\n needsExtraFields,\r\n };\r\n const newErrors = preCheckPersonForm(postPerson);\r\n if (Object.keys(newErrors).length !== 0) {\r\n setErrors(newErrors);\r\n return;\r\n }\r\n const body = {\r\n person: postPerson,\r\n };\r\n setLoadingSave(true);\r\n setErrors(newErrors);\r\n services.fetchUpdatePerson(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n if (postPerson.personId == 0 && response.newPersonId > 0) {\r\n postPerson.personId = response.newPersonId;\r\n postPerson.PersonId = response.newPersonId;\r\n }\r\n const newPerson = {\r\n person: postPerson,\r\n };\r\n setPersonData({\r\n ...postPerson,\r\n suitabilityDescription: response.result.Description,\r\n });\r\n } else {\r\n toggleModalError({}, response && response.result ? response.result.Description : \"Server Error\");\r\n }\r\n setLoadingSave(false);\r\n });\r\n };\r\n\r\n const handleOnboardingSave = () => {\r\n const postPerson = {\r\n ...person,\r\n ...changedPerson,\r\n PersonOnboardingId: holder,\r\n PersonSubAssetClass: checked,\r\n needsExtraFields,\r\n };\r\n const newErrors = preCheckPersonForm(postPerson);\r\n if (Object.keys(newErrors).length !== 0) {\r\n setErrors(newErrors);\r\n return;\r\n }\r\n setLoadingSave(true);\r\n setErrors(newErrors);\r\n let idOnb = \"\";\r\n if (onboarding !== undefined) idOnb = onboarding;\r\n if (idOnb == \"\" && postPerson.PersonId != 0) idOnb = postPerson.PersonId;\r\n\r\n const body = {\r\n OnboardingId: String(idOnb),\r\n postPerson,\r\n };\r\n services.fetchNewPerson(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n if (postPerson.personId == 0 && response.newPersonId > 0) {\r\n postPerson.personId = response.newPersonId;\r\n postPerson.PersonId = response.newPersonId;\r\n handleRedirectPerson(response.newPersonId);\r\n }\r\n let index = -1;\r\n const newDocuments = [...postPerson.Documents];\r\n newDocuments.forEach((doc, i) => {\r\n if (\r\n parseInt(doc.PhysicalPersonDocumentTypeId, 10) ===\r\n parseInt(postPerson.PhysicalPersonMainDocumentTypeId, 10)\r\n ) {\r\n doc.PhysicalPersonDocumentNumber = postPerson.PhysicalPersonMainDocumentNumber;\r\n doc.PhysicalPersonDocumentTypeName = postPerson.PhysicalPersonMainDocumentType;\r\n index = i;\r\n }\r\n });\r\n if (index < 0) {\r\n const newDoc = {\r\n PhysicalPersonDocumentNumber: postPerson.PhysicalPersonMainDocumentNumber,\r\n PhysicalPersonDocumentTypeId: postPerson.PhysicalPersonMainDocumentTypeId,\r\n PhysicalPersonDocumentTypeName: postPerson.PhysicalPersonMainDocumentType,\r\n };\r\n newDocuments.push(newDoc);\r\n }\r\n\r\n setPersonData({\r\n ...body.postPerson,\r\n Documents: newDocuments,\r\n });\r\n refresh();\r\n } else {\r\n toggleModalError({}, response && response.result ? response.result.Description : \"Server Error\");\r\n }\r\n setLoadingSave(false);\r\n });\r\n };\r\n\r\n if (!person) {\r\n return ;\r\n }\r\n\r\n const legalAddress = person.LegalAddress[0] || {};\r\n\r\n const onChangeDoc = (name, value, otherValue) => {\r\n const document = documentTypes ? documentTypes.filter((d) => d.DocumentTypeId == value) : [];\r\n setExternalPersonDocType({\r\n docType: value,\r\n description: otherValue,\r\n docPersonType: document.length > 0 ? document[0].PersonType : PersonType.All,\r\n });\r\n };\r\n\r\n const onChangeDocNumber = (id, value) => {\r\n setExternalPersonDocNumber(value);\r\n setIsFetchingAvaible(false);\r\n };\r\n\r\n const checkDocument = () => {\r\n setIsLoading(true);\r\n services.fetchCheckDocument(\r\n {\r\n type: externalPersonDocType.docType,\r\n number: externalPersonDocNumber,\r\n person: externalPersonDocType.docPersonType,\r\n },\r\n (response) => {\r\n setIsLoading(false);\r\n\r\n if (response && response.result.Code === 200) {\r\n setExternalPersonIdCheckError(undefined);\r\n setIsFetchingAvaible(true);\r\n } else {\r\n setExternalPersonIdCheckError(\"This document already exists\");\r\n setIsFetchingAvaible(false);\r\n }\r\n }\r\n );\r\n };\r\n\r\n const getExternalPerson = () => {\r\n setIsLoading(true);\r\n const payload = { documentType: externalPersonDocType.docType, documentNumber: externalPersonDocNumber };\r\n services.fetchExternalPerson(payload, (res) => {\r\n const { response } = res;\r\n if (response.errorMessage == \"\") {\r\n services.fetchOnboardingPersonInfo(\r\n { personid: response.newPersonId, OnboardingId: response.newPersonId },\r\n (data) => {\r\n //SET DATA AND RELOAD PAGE\r\n if (data && data.postPerson) {\r\n setPersonData(data.postPerson);\r\n setExternalPersonInfo(1);\r\n refresh();\r\n }\r\n }\r\n );\r\n } else {\r\n //ERROR HANDLING\r\n setPersonData((prevState) => ({ ...prevState, PersonProcessResult: response.errorMessage }));\r\n }\r\n setIsLoading(false);\r\n });\r\n };\r\n\r\n return (\r\n
    \r\n
    \r\n {person.useAlternativeRoute && externalPersonInfo == \"\" ? (\r\n \r\n \r\n {\r\n setIsPersonExternalSystem(!isPersonExternalSystem);\r\n }}\r\n selectItems={[1, 0]}\r\n getSelectItemId={(i) => i}\r\n getSelectItemName={(i) => (i === 1 ? \"Yes\" : \"No\")}\r\n />\r\n \r\n \r\n \r\n ) : null}\r\n {isPersonExternalSystem && externalPersonInfo == \"\" ? (\r\n
    \r\n \r\n \r\n doc.DocumentTypeId}\r\n getSelectItemName={(doc) => doc.DocumentTypeName}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n ) : (\r\n
    \r\n \r\n \r\n \r\n Person is minimal:\r\n \r\n \r\n \r\n \r\n \r\n (userSession.IsReadOnly === false ? changePersonMinimal(true) : null)}\r\n active={person.PersonIsMinimal == true}\r\n >\r\n Yes\r\n \r\n (userSession.IsReadOnly === false ? changePersonMinimal(false) : null)}\r\n color=\"primary\"\r\n active={person.PersonIsMinimal == false}\r\n >\r\n No\r\n \r\n \r\n \r\n \r\n \r\n {!person.PersonIsMinimal && (\r\n
    \r\n \r\n \r\n i}\r\n getSelectItemName={(i) => (i === 1 ? \"Yes\" : \"No\")}\r\n name=\"PersonUpdateManual\"\r\n onChange={onChange}\r\n />\r\n \r\n \r\n {person.useAlternativeRoute\r\n ? null\r\n : userSession.IsReadOnly === false && (\r\n
    \r\n \r\n
    \r\n handleExternalInfo()}\r\n data-style={EXPAND_RIGHT}\r\n color={color}\r\n >\r\n \r\n \r\n
    \r\n )}\r\n \r\n
    \r\n {person.useAlternativeRoute ? null : (\r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n
    \r\n )}\r\n {mode == PersonMode.New && (\r\n \r\n \r\n \r\n Select type:\r\n \r\n \r\n \r\n \r\n \r\n changePersonType(PersonType.Physical)}\r\n active={person.PersonType === PersonType.Physical}\r\n >\r\n Physical\r\n \r\n changePersonType(PersonType.Juridical)}\r\n color=\"primary\"\r\n active={person.PersonType === PersonType.Juridical}\r\n >\r\n Juridical\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n {person.PersonType === PersonType.Physical ? (\r\n d.PersonType.trim() === PersonType.Physical)\r\n : undefined\r\n }\r\n companyLinks={companyLinks}\r\n patrimonies={patrimonies}\r\n autosuggests={autosuggests}\r\n onChangeAutosuggest={onChangeAutosuggest}\r\n disabled={disabled}\r\n errors={errors}\r\n services={services}\r\n onboarding={onboarding}\r\n setDisabled={setDisabled}\r\n manual={manual}\r\n viewDigitalRelatedFrom={viewDigitalRelatedFrom}\r\n />\r\n ) : (\r\n d.PersonType.trim() === PersonType.Juridical)\r\n : undefined\r\n }\r\n societyTypes={societyTypes}\r\n publicPositions={publicPositions}\r\n entityTypes={entityTypes}\r\n activitySectors={activitySectors}\r\n onChangeAddress={onChangeLegalAddress}\r\n autosuggests={autosuggests}\r\n onChangeAutosuggest={onChangeAutosuggest}\r\n disabled={disabled}\r\n setDisabled={setDisabled}\r\n errors={errors}\r\n companyLinks={companyLinks}\r\n professions={professions}\r\n services={services}\r\n role={role}\r\n holder={holder}\r\n onboarding={onboarding}\r\n manual={manual}\r\n needsExtraFields={needsExtraFields}\r\n />\r\n )}\r\n \r\n \r\n \r\n {PersonQualification ? (\r\n i.id}\r\n error={errors.PersonQualification}\r\n getSelectItemName={(i) => i.name}\r\n />\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n )}\r\n \r\n \r\n \r\n {onboarding || isPerson ? (\r\n \r\n \r\n \r\n \r\n {loadingSave ? \"Saving\" : \"Save\"}\r\n \r\n \r\n \r\n \r\n ) : mode == PersonMode.New ? (\r\n \r\n \r\n \r\n \r\n {loadingSave ? \"Saving\" : \"Save\"}\r\n \r\n \r\n \r\n \r\n ) : (\r\n \r\n {disabled && userSession.IsReadOnly === false && (\r\n \r\n )}\r\n {!disabled && (\r\n \r\n \r\n \r\n Revert\r\n \r\n \r\n {loadingSave ? \"Saving\" : \"Save\"}\r\n \r\n \r\n )}\r\n \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nPersonProfileTab.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n setPersonData: PropTypes.func.isRequired,\r\n professions: PropTypes.array,\r\n publicPositions: PropTypes.array,\r\n personLinks: PropTypes.array,\r\n documentTypes: PropTypes.array,\r\n companyLinks: PropTypes.array,\r\n patrimonies: PropTypes.array,\r\n entityTypes: PropTypes.array,\r\n societyTypes: PropTypes.array,\r\n services: PropTypes.object.isRequired,\r\n role: PropTypes.string,\r\n};\r\n\r\nPersonProfileTab.defaultProps = {\r\n professions: undefined,\r\n publicPositions: undefined,\r\n personLinks: undefined,\r\n documentTypes: undefined,\r\n companyLinks: undefined,\r\n patrimonies: undefined,\r\n entityTypes: undefined,\r\n societyTypes: undefined,\r\n};\r\n\r\nexport default PersonProfileTab;\r\n","import React, { useState, useEffect, useRef } from \"react\";\r\nimport { Form, FormGroup, Label, Input } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport { CircularProgress } from \"../../../..\";\r\nimport { AccountMode, PersonMode, showToast } from \"../../../../utils/Helper\";\r\n\r\nconst Questions = ({ questions: accQuestions, setPersonData, onboarding, person, services, mode, userSession }) => {\r\n const [questions, setQuestions] = useState(undefined);\r\n const [loadingSave, setLoadingSave] = useState(false);\r\n\r\n useEffect(() => {\r\n if (accQuestions) {\r\n setQuestions(accQuestions);\r\n }\r\n }, [accQuestions]);\r\n\r\n const handleSave = () => {\r\n const questionschanged = questions;\r\n if (mode === PersonMode.New) {\r\n setLoadingSave(true);\r\n const newQuestions = questionschanged.map((q) => {\r\n if (Number(q.NewAnswerId) > 0) {\r\n const newAnswers = [];\r\n let newA = {};\r\n q.PersonAnswer.forEach((a) => {\r\n newA = {};\r\n if (a.AnswerId === q.NewAnswerId) {\r\n newA = {\r\n ...a,\r\n AnswerIsResponse: true,\r\n };\r\n } else {\r\n newA = {\r\n ...a,\r\n AnswerIsResponse: false,\r\n };\r\n }\r\n newAnswers.push(newA);\r\n });\r\n return {\r\n ...q,\r\n NewAnswerId: 0,\r\n PersonAnswer: newAnswers,\r\n };\r\n }\r\n return { ...q };\r\n });\r\n const newPerson = { ...person, PersonQuestion: newQuestions };\r\n const bodyN = {\r\n OnboardingId: String(onboarding),\r\n postPerson: newPerson,\r\n };\r\n services.fetchNewPerson(bodyN, (res) => {\r\n if (res) {\r\n const body2 = {\r\n postPerson: newPerson,\r\n onboarding: onboarding,\r\n };\r\n services.fetchOnboardingPersonResult(body2, (data) => {\r\n if (data && data.SDTOnboardingResult) {\r\n setPersonData({\r\n ...newPerson,\r\n PersonProfileRiskName: data.SDTOnboardingResult.PersonProfileRisk,\r\n PersonRisk: data.SDTOnboardingResult.PersonRisk,\r\n PersonTransactionalLimit: data.SDTOnboardingResult.PersonTransactionalLimit,\r\n });\r\n setLoadingSave(false);\r\n showToast(\"Changes saved successfully\");\r\n } else {\r\n setLoadingSave(false);\r\n }\r\n });\r\n } else {\r\n setLoadingSave(false);\r\n }\r\n });\r\n } else {\r\n setLoadingSave(true);\r\n const newQuestions = questionschanged.map((q) => {\r\n if (Number(q.NewAnswerId) > 0) {\r\n const newAnswers = [];\r\n let newA = {};\r\n q.PersonAnswer.forEach((a) => {\r\n newA = {};\r\n if (a.AnswerId === q.NewAnswerId) {\r\n newA = {\r\n ...a,\r\n AnswerIsResponse: true,\r\n };\r\n } else {\r\n newA = {\r\n ...a,\r\n AnswerIsResponse: false,\r\n };\r\n }\r\n newAnswers.push(newA);\r\n });\r\n return {\r\n ...q,\r\n NewAnswerId: 0,\r\n PersonAnswer: newAnswers,\r\n };\r\n }\r\n return { ...q };\r\n });\r\n const newPerson = { ...person, PersonQuestion: newQuestions };\r\n //HACER PROC QUE GUARDE PREGUNTAS DE PERSONAS ACTIVAS\r\n services.fetchPersonSuitability({ person: newPerson }, (result) => {\r\n if (result && result.result.Code === 200) {\r\n setPersonData({\r\n ...newPerson,\r\n suitabilityDescription: result.result.Description,\r\n });\r\n const newQuestions = questionschanged.map((q) => {\r\n if (q.NewAnswerId > 0) {\r\n const newAnswers = [];\r\n let newA = {};\r\n q.Answer.forEach((a) => {\r\n newA = {};\r\n if (a.AnswerId === q.NewAnswerId) {\r\n newA = {\r\n ...a,\r\n AnswerIsResponse: true,\r\n };\r\n } else {\r\n newA = {\r\n ...a,\r\n AnswerIsResponse: true,\r\n };\r\n }\r\n newAnswers.push(newA);\r\n });\r\n return {\r\n ...q,\r\n NewAnswerId: 0,\r\n Answer: newAnswers,\r\n };\r\n }\r\n return { ...q };\r\n });\r\n setLoadingSave(false);\r\n } else {\r\n setLoadingSave(false);\r\n }\r\n });\r\n }\r\n };\r\n\r\n const handleChangeAnswer = (questionIndex, answerIndex) => {\r\n if (!loadingSave) {\r\n const newQuestions = [...questions];\r\n if (newQuestions[questionIndex].PersonAnswer[answerIndex].AnswerIsResponse) {\r\n newQuestions[questionIndex].NewAnswerId = 0;\r\n } else {\r\n newQuestions[questionIndex].NewAnswerId = questions[questionIndex].PersonAnswer[answerIndex].AnswerId;\r\n }\r\n setQuestions(newQuestions);\r\n }\r\n };\r\n\r\n // useEffect(() => {\r\n // return () => {\r\n // if (mode === PersonMode.New) {\r\n // handleSave();\r\n // }\r\n // };\r\n // }, []);\r\n\r\n // useEffect(() => {\r\n // valueref.current = questions;\r\n // }, [questions]);\r\n\r\n // useEffect(() => {\r\n // personref.current = person;\r\n // }, [personref]);\r\n\r\n let save = false;\r\n if (!questions) {\r\n return ;\r\n }\r\n return (\r\n
    \r\n {questions.map((q, qIndex) => {\r\n if (q.NewAnswerId > 0) {\r\n save = true;\r\n }\r\n return (\r\n
    \r\n \r\n {q.QuestionDescription}\r\n {q.PersonAnswer.map((a, aIndex) => (\r\n \r\n \r\n \r\n ))}\r\n \r\n
    \r\n );\r\n })}\r\n {userSession.IsReadOnly === false && (\r\n questions.length > 0 ? (\r\n handleSave()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Save\r\n \r\n ) : (\r\n No Questions.\r\n )\r\n )}\r\n
    \r\n );\r\n};\r\n\r\nQuestions.propTypes = {\r\n questions: PropTypes.array.isRequired,\r\n setPersonData: PropTypes.func.isRequired,\r\n services: PropTypes.func.isRequired,\r\n mode: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default Questions;\r\n","/* eslint-disable jsx-a11y/click-events-have-key-events */\r\n/* eslint-disable jsx-a11y/no-static-element-interactions */\r\nimport React, { useState } from 'react';\r\nimport {\r\n Form, FormGroup, Label, ListGroup, ListGroupItem, Spinner,\r\n} from 'reactstrap';\r\nimport LaddaButton, { EXPAND_RIGHT } from 'react-ladda';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport ModalShareHolder from '../../Modal/ModalShareHolder';\r\nimport ModalConfirm from '../../Modal/ModalConfirm';\r\n\r\nconst RelatedPeopleTab = ({\r\n person,\r\n shareHolders,\r\n setPersonData,\r\n services,\r\n onboarding, \r\n Link,\r\n holder,\r\n userSession,\r\n}) => {\r\n const [modalShareHolder, setModalShareHolder] = useState({\r\n open: false,\r\n loading: false,\r\n initialShareHolder: undefined,\r\n });\r\n const [modalConfirm, setModalConfirm] = useState({\r\n open: false,\r\n shareHolderId: null,\r\n title: '',\r\n callback: undefined,\r\n loading: false,\r\n });\r\n\r\n const handleSaveShareHolder = (shareHolder) => {\r\n const newShareHolder = {\r\n ...shareHolder,\r\n };\r\n\r\n const body = {\r\n person: {\r\n PersonId: person.PersonId,\r\n ShareHolder: [newShareHolder],\r\n },\r\n edit: true,\r\n };\r\n setModalShareHolder((m) => ({\r\n ...m,\r\n loading: true,\r\n }));\r\n if (onboarding){\r\n let docs = person.ShareHolder\r\n let id = Number(shareHolders.length) + 2\r\n if (newShareHolder.ShareHolderId > 0){\r\n id = newShareHolder.ShareHolderId\r\n docs.forEach((p, i) => {\r\n if (p.ShareHolderId == newShareHolder.ShareHolderId) {\r\n docs.splice(i, 1);\r\n }\r\n });\r\n }\r\n const nShareHolder = \r\n {\r\n ...newShareHolder, \r\n ShareHolderId: id,\r\n }\r\n \r\n docs.push(nShareHolder)\r\n const postPerson = {\r\n ...person,\r\n ShareHolder: docs,\r\n };\r\n const body2 = {\r\n postPerson: postPerson,\r\n OnboardingId: onboarding,\r\n };\r\n services.fetchNewPerson(body2, response => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setPersonData(body2.postPerson);\r\n setModalShareHolder({\r\n open: false,\r\n loading: false,\r\n initialShareHolder: undefined,\r\n });\r\n return { ...newShareHolder };\r\n } else {\r\n alert(\"Server Error\"); \r\n return { ...newShareHolder };\r\n }\r\n });\r\n\r\n }else{\r\n services.fetchUpdatePersonShareHolder(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n let newShareHolders = [...shareHolders];\r\n if (modalShareHolder.initialShareHolder === undefined) {\r\n newShareHolder.ShareHolderId = response.Id;\r\n newShareHolders.push(newShareHolder);\r\n } else {\r\n newShareHolders = shareHolders.map((s) => {\r\n if (parseInt(s.ShareHolderId, 10) === parseInt(newShareHolder.ShareHolderId, 10)) {\r\n return { ...newShareHolder };\r\n }\r\n return { ...s };\r\n });\r\n }\r\n setModalShareHolder({\r\n open: false,\r\n loading: false,\r\n initialShareHolder: undefined,\r\n });\r\n setPersonData({\r\n ...person,\r\n ShareHolder: newShareHolders,\r\n });\r\n }\r\n });\r\n }\r\n };\r\n\r\n const handleDeleteFile = (id) => {\r\n const body = {\r\n person: {\r\n PersonId: person.PersonId,\r\n ShareHolder: [{\r\n ShareHolderId: id,\r\n }],\r\n },\r\n edit: false,\r\n };\r\n setModalConfirm((m) => ({\r\n ...m,\r\n loading: true,\r\n }));\r\n if (onboarding){\r\n let docs = person.ShareHolder\r\n if (id > 0){\r\n docs.forEach((p, i) => {\r\n if (p.ShareHolderId == id) {\r\n docs.splice(i, 1);\r\n }\r\n });\r\n }\r\n const postPerson = {\r\n ...person,\r\n ShareHolder: docs,\r\n };\r\n const body2 = {\r\n postPerson: postPerson,\r\n OnboardingId: onboarding,\r\n };\r\n services.fetchNewPerson(body2, response => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setPersonData(body2.postPerson);\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false\r\n });\r\n setModalNewPhone({\r\n ...modalNewPhone,\r\n loading: false,\r\n messageShow: false\r\n });\r\n }\r\n \r\n });\r\n\r\n }else{\r\n services.fetchUpdatePersonShareHolder(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newShareHolders = [...shareHolders];\r\n let index = -1;\r\n shareHolders.map((s, i) => {\r\n if (s.ShareHolderId === id) {\r\n index = i;\r\n }\r\n return {};\r\n });\r\n if (index > -1) {\r\n newShareHolders.splice(index, 1);\r\n }\r\n setPersonData({\r\n ...person,\r\n ShareHolder: newShareHolders,\r\n });\r\n setModalConfirm({\r\n open: false,\r\n shareHolderId: null,\r\n title: '',\r\n callback: undefined,\r\n loading: false,\r\n });\r\n }\r\n });\r\n }\r\n };\r\n\r\n const toggleModalConfirm = (id) => setModalConfirm((m) => {\r\n const newM = {\r\n ...m,\r\n open: !m.open,\r\n shareHolderId: id,\r\n };\r\n if (id) {\r\n newM.title = 'Are you sure you want to remove the selected Share Holder?';\r\n newM.callback = () => handleDeleteFile(id);\r\n }\r\n return newM;\r\n });\r\n\r\n const toggleModalShareHolder = (e, initialShareHolder) => setModalShareHolder((m) => ({\r\n ...m,\r\n open: !m.open,\r\n loading: false,\r\n initialShareHolder,\r\n }));\r\n\r\n const precheckSharedPercentage = () => {\r\n let percentage = 0;\r\n shareHolders.forEach((s) => {\r\n percentage += parseFloat(s.ShareHolderParticipationPercentage);\r\n });\r\n return (percentage >= 100);\r\n };\r\n\r\n if (!shareHolders) {\r\n return (\r\n \r\n );\r\n }\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n {shareHolders.map((s) => (\r\n (Number(s.ShareHolderParticipationPercentage) === 0 || s.ShareHolderDescription !== '') &&\r\n toggleModalShareHolder(e, s)}\r\n >\r\n \r\n {userSession.IsReadOnly === false &&
    { e.stopPropagation(); toggleModalConfirm(s.ShareHolderId); }}>\r\n \r\n
    }\r\n \r\n ))}\r\n
    \r\n
    \r\n \r\n {userSession.IsReadOnly === false && \r\n \r\n {' '}\r\n Add New Related Person\r\n }\r\n {modalShareHolder.open && (\r\n \r\n )}\r\n \r\n
    \r\n );\r\n};\r\n\r\nRelatedPeopleTab.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n shareHolders: PropTypes.array.isRequired,\r\n setPersonData: PropTypes.func.isRequired,\r\n services: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default RelatedPeopleTab;\r\n","/* eslint-disable jsx-a11y/click-events-have-key-events */\r\n/* eslint-disable jsx-a11y/no-static-element-interactions */\r\nimport React, { useState } from \"react\";\r\nimport { Form, FormGroup, Label, ListGroup, ListGroupItem, Spinner } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport ModalShareHolder from \"../../Modal/ModalShareHolder\";\r\nimport ModalConfirm from \"../../Modal/ModalConfirm\";\r\n\r\nconst ShareHoldersTab = ({ person, shareHolders, setPersonData, services, onboarding, Link, holder, userSession }) => {\r\n const [modalShareHolder, setModalShareHolder] = useState({\r\n open: false,\r\n loading: false,\r\n initialShareHolder: undefined,\r\n });\r\n const [modalConfirm, setModalConfirm] = useState({\r\n open: false,\r\n shareHolderId: null,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n });\r\n\r\n const handleSaveShareHolder = (shareHolder) => {\r\n const newShareHolder = {\r\n ...shareHolder,\r\n };\r\n\r\n const body = {\r\n person: {\r\n PersonId: person.PersonId,\r\n ShareHolder: [newShareHolder],\r\n },\r\n edit: true,\r\n };\r\n setModalShareHolder((m) => ({\r\n ...m,\r\n loading: true,\r\n }));\r\n if (onboarding) {\r\n let docs = person.ShareHolder;\r\n let id = Number(shareHolders.length) + 2;\r\n if (newShareHolder.ShareHolderId > 0) {\r\n id = newShareHolder.ShareHolderId;\r\n docs.forEach((p, i) => {\r\n if (p.ShareHolderId == newShareHolder.ShareHolderId) {\r\n docs.splice(i, 1);\r\n }\r\n });\r\n }\r\n const nShareHolder = {\r\n ...newShareHolder,\r\n ShareHolderId: id,\r\n };\r\n\r\n docs.push(nShareHolder);\r\n const postPerson = {\r\n ...person,\r\n ShareHolder: docs,\r\n };\r\n const body2 = {\r\n postPerson: postPerson,\r\n OnboardingId: onboarding,\r\n };\r\n services.fetchNewPerson(body2, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setPersonData(body2.postPerson);\r\n setModalShareHolder({\r\n open: false,\r\n loading: false,\r\n initialShareHolder: undefined,\r\n });\r\n return { ...newShareHolder };\r\n } else {\r\n alert(\"Server Error\");\r\n return { ...newShareHolder };\r\n }\r\n });\r\n } else {\r\n services.fetchUpdatePersonShareHolder(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n let newShareHolders = [...shareHolders];\r\n if (modalShareHolder.initialShareHolder === undefined) {\r\n newShareHolder.ShareHolderId = response.Id;\r\n newShareHolders.push(newShareHolder);\r\n } else {\r\n newShareHolders = shareHolders.map((s) => {\r\n if (parseInt(s.ShareHolderId, 10) === parseInt(newShareHolder.ShareHolderId, 10)) {\r\n return { ...newShareHolder };\r\n }\r\n return { ...s };\r\n });\r\n }\r\n setModalShareHolder({\r\n open: false,\r\n loading: false,\r\n initialShareHolder: undefined,\r\n });\r\n setPersonData({\r\n ...person,\r\n ShareHolder: newShareHolders,\r\n });\r\n }\r\n });\r\n }\r\n };\r\n\r\n const handleDeleteFile = (id) => {\r\n const body = {\r\n person: {\r\n PersonId: person.PersonId,\r\n ShareHolder: [\r\n {\r\n ShareHolderId: id,\r\n },\r\n ],\r\n },\r\n edit: false,\r\n };\r\n setModalConfirm((m) => ({\r\n ...m,\r\n loading: true,\r\n }));\r\n if (onboarding) {\r\n let docs = person.ShareHolder;\r\n if (id > 0) {\r\n docs.forEach((p, i) => {\r\n if (p.ShareHolderId == id) {\r\n docs.splice(i, 1);\r\n }\r\n });\r\n }\r\n const postPerson = {\r\n ...person,\r\n ShareHolder: docs,\r\n };\r\n const body2 = {\r\n postPerson: postPerson,\r\n OnboardingId: onboarding,\r\n };\r\n services.fetchNewPerson(body2, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n setPersonData(body2.postPerson);\r\n setModalConfirm({\r\n open: false,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n });\r\n setModalNewPhone({\r\n ...modalNewPhone,\r\n loading: false,\r\n messageShow: false,\r\n });\r\n }\r\n });\r\n } else {\r\n services.fetchUpdatePersonShareHolder(body, (response) => {\r\n if (response && response.result && response.result.Code === 200) {\r\n const newShareHolders = [...shareHolders];\r\n let index = -1;\r\n shareHolders.map((s, i) => {\r\n if (s.ShareHolderId === id) {\r\n index = i;\r\n }\r\n return {};\r\n });\r\n if (index > -1) {\r\n newShareHolders.splice(index, 1);\r\n }\r\n setPersonData({\r\n ...person,\r\n ShareHolder: newShareHolders,\r\n });\r\n setModalConfirm({\r\n open: false,\r\n shareHolderId: null,\r\n title: \"\",\r\n callback: undefined,\r\n loading: false,\r\n });\r\n }\r\n });\r\n }\r\n };\r\n\r\n const toggleModalConfirm = (id) =>\r\n setModalConfirm((m) => {\r\n const newM = {\r\n ...m,\r\n open: !m.open,\r\n shareHolderId: id,\r\n };\r\n if (id) {\r\n newM.title = \"Are you sure you want to remove the selected Share Holder?\";\r\n newM.callback = () => handleDeleteFile(id);\r\n }\r\n return newM;\r\n });\r\n\r\n const toggleModalShareHolder = (e, initialShareHolder) =>\r\n setModalShareHolder((m) => ({\r\n ...m,\r\n open: !m.open,\r\n loading: false,\r\n initialShareHolder,\r\n }));\r\n\r\n const precheckSharedPercentage = () => {\r\n let percentage = 0;\r\n shareHolders.forEach((s) => {\r\n percentage += parseFloat(s.ShareHolderParticipationPercentage);\r\n });\r\n return percentage >= 100;\r\n };\r\n\r\n if (!shareHolders) {\r\n return ;\r\n }\r\n return (\r\n
    \r\n
    \r\n \r\n \r\n {shareHolders.map(\r\n (s) =>\r\n s.ShareHolderParticipationPercentage > 0 && (\r\n toggleModalShareHolder(e, s)}>\r\n \r\n {userSession.IsReadOnly === false && {\r\n e.stopPropagation();\r\n toggleModalConfirm(s.ShareHolderId);\r\n }}\r\n >\r\n \r\n
    }\r\n \r\n )\r\n )}\r\n \r\n \r\n \r\n {userSession.IsReadOnly === false && \r\n Add New Share Holder\r\n }\r\n {modalShareHolder.open && (\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nShareHoldersTab.propTypes = {\r\n person: PropTypes.object.isRequired,\r\n shareHolders: PropTypes.array.isRequired,\r\n setPersonData: PropTypes.func.isRequired,\r\n services: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default ShareHoldersTab;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"titleButton\":\"ExtendedDataTab_titleButton_3mD8V\",\"itemgroup\":\"ExtendedDataTab_itemgroup_ZuNWI\",\"iteminstance\":\"ExtendedDataTab_iteminstance_3ZXHu\",\"row\":\"ExtendedDataTab_row_2qbbp\",\"colButton\":\"ExtendedDataTab_colButton_3wJAA\",\"editButton\":\"ExtendedDataTab_editButton_1TO3b\"};","export const TargetType = {\r\n Account: \"Account\",\r\n Physical: \"Physical\",\r\n Juridical: \"Juridical\",\r\n};\r\n\r\nexport const PersonType = {\r\n All: \"All\",\r\n Physical: \"Physical\",\r\n Juridical: \"Juridical\",\r\n};\r\n\r\nexport const CivilStatus = {\r\n Single: \"Single\",\r\n Engaged: \"Engaged\",\r\n Married: \"Married\",\r\n Divorced: \"Divorced\",\r\n Widower: \"Widower\",\r\n Other: \"Other\",\r\n};\r\n\r\nexport function getTargetTypeName(type) {\r\n return type;\r\n}\r\n\r\nexport const PhysicalPersonRelationshipAccount = {\r\n Attorney: \"Attorney\",\r\n Holder: \"Holder\",\r\n Authorized: \"Authorized\",\r\n Other: \"Other\",\r\n WebAuthorized: \"WebAuthorized\",\r\n};\r\n\r\nexport const PhysicalPersonRelationshipAccountJuridical = {\r\n Attorney: \"Attorney\",\r\n Representative: \"Representative\",\r\n None: \"None\",\r\n WebAuthorized: \"WebAuthorized\",\r\n Holder: \"Holder\",\r\n};\r\n\r\nexport const OptionsWhyWithoutTIN = [\r\n {\r\n id: \"Option1\",\r\n text: \"El país donde el titular de la cuenta está sujeto a impuestos tributarios como residente no emite TIN.\",\r\n },\r\n {\r\n id: \"Option2\",\r\n text: \"El titular de la cuenta está imposibilitado de otra manera para obtener un TIN o número equivalente.\",\r\n },\r\n {\r\n id: \"Option3\",\r\n text: \"No se requiere TIN porque la jurisdicción de la residencia fiscal que emitió el TIN no exige que una Institución Financiera recolecte e informe el TIN.\",\r\n },\r\n];\r\n\r\nexport const DocumentType = {\r\n DNI: \"DNI\",\r\n Passport: \"Passport\",\r\n IdentityCard: \"Identity Card\",\r\n};\r\n\r\nexport const PersonStatus = {\r\n Active: \"Active\",\r\n Inactive: \"Inactive\",\r\n PassedAway: \"Passed Away\",\r\n};\r\n\r\nexport const Gender = {\r\n N: \"Not Specified\",\r\n M: \"Male\",\r\n F: \"Female\",\r\n};\r\n\r\nexport const BankAccountType = {\r\n Current: \"Current\",\r\n Savings: \"Savings\",\r\n Other: \"Other\"\r\n};\r\n\r\nexport const BankAccountStatus = {\r\n Active: \"Active\",\r\n Inactive: \"Inactive\"\r\n};\r\n\r\nexport const RelatedFrom = {\r\n FaceToFace : \"Face To Face\",\r\n App : \"App\",\r\n Web : \"Web\",\r\n Digital: \"Digital\"\r\n};\r\n\r\nexport const shareType = [\r\n { \r\n id: 'BearerShare' , name: \"Bearer Share\"},{\r\n id: 'RegisteredShare', name: \"Registered Share\"},{\r\n id: 'NotDefined', name: \"Not Defined\"},\r\n];\r\n\r\nexport const CurrencyType = {\r\n Local : \"Local\",\r\n Foreign : \"Foreign\",\r\n Both : \"Both\",\r\n};\r\n\r\nexport const KYCStatus = {\r\n Approved : \"Approved\",\r\n Rejected : \"Rejected\",\r\n New : \"New\",\r\n AuthWaiting : \"Auth.Waiting\",\r\n New : \"New\",\r\n Matured : \"Matured\",\r\n DigitalApproved: \"DigitalApproved\"\r\n};\r\n\r\nexport const KYCReason = {\r\n Renovation : \"Renovation\",\r\n Advanced : \"Advanced\",\r\n RiskChanged : \"Risk Changed\",\r\n New : \"New\",\r\n Digital: \"Digital\"\r\n};\r\n\r\n","import { PersonQualification } from \"../../utils/Helper\";\r\nimport {PersonType, CivilStatus, OptionsWhyWithoutTIN} from \"./Person/types\";\r\n\r\nexport const preCheckAccountForm = account => {\r\n const errors = {};\r\n Object.keys(account).forEach(key => {\r\n switch (key) {\r\n case \"AccountName\":\r\n if (!account[key] && String(account[key] !== '')) {\r\n errors[key] = \"This field is required.\";\r\n }\r\n break;\r\n //case \"AccountEmail\":\r\n case \"AccountNumber\":\r\n if(!account[key]||account[key]==0){\r\n errors[key]=\"This value cant be 0.\";\r\n }\r\n case \"AccountProfileRiskId\":\r\n case \"AccountCurrencyId\":\r\n case \"AccountCompanyLinkId\":\r\n case \"AccountWayGiveOrders\":\r\n case \"AccountBookInfo\":\r\n case \"AccountUsage\":\r\n if (!account[key]) {\r\n errors[key] = \"This field is required.\";\r\n }\r\n break;\r\n case \"AccountAsksCustody\":\r\n case \"AccountAutomaticCreditCoupon\":\r\n case \"AccountAutomaticCreditSink\":\r\n if (typeof account[key] !== \"boolean\") {\r\n errors[key] = \"This field is required.\";\r\n }\r\n break;\r\n case \"MainAdvisorCommissionPercentage\":\r\n if (!account[key] && parseFloat(account[key] !== 0)) {\r\n errors[key] = \"This numeric field is required.\";\r\n }\r\n break;\r\n case \"MainAdvisorId\":\r\n if ((!account[key]) && (String(account[key]) === \"\")) {\r\n errors[key] = \"This field is required.\";\r\n }\r\n if ((account[key]) && (String(account[key]) === \"0\")) {\r\n errors[key] = \"This field is required.\";\r\n }\r\n break;\r\n case \"RepId\":\r\n if ((!account[key]) && (String(account[key]) === \"\")) {\r\n errors[key] = \"This field is required.\";\r\n }\r\n if ((account[key]) && (String(account[key]) === \"0\")) {\r\n errors[key] = \"This field is required.\";\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n });\r\n return errors;\r\n};\r\n\r\nexport const preCheckNewAccountForm = account => {\r\n const errors = {};\r\n Object.keys(account).forEach(key => {\r\n switch (key) {\r\n case \"AccountName\":\r\n //case \"AccountEmail\":\r\n case \"AccountCurrencyId\":\r\n case \"MainAdvisorId\":\r\n if (!account[key] && parseFloat(account[key] === \"\")) {\r\n errors[key] = \"This numeric field is required.\";\r\n }\r\n break;\r\n case \"RepId\":\r\n if (!account[key] && parseFloat(account[key] === \"\")) {\r\n errors[key] = \"This numeric field is required.\";\r\n }\r\n break;\r\n case \"MainAdvisorName\":\r\n if (!account[key] && parseFloat(account[key] === \"\")) {\r\n errors[key] = \"This numeric field is required.\";\r\n }\r\n break;\r\n case \"RepName\":\r\n if (!account[key] && parseFloat(account[key] === \"\")) {\r\n errors[key] = \"This numeric field is required.\";\r\n }\r\n break;\r\n case \"AccountCompanyLinkId\":\r\n case \"AccountWayGiveOrders\":\r\n case \"AccountBookInfo\":\r\n if (!account[key]) {\r\n errors[key] = \"This field is required.\";\r\n }\r\n break;\r\n case \"AccountAsksCustody\":\r\n case \"AccountAutomaticCreditCoupon\":\r\n case \"AccountAutomaticCreditSink\":\r\n if (typeof account[key] !== \"boolean\") {\r\n errors[key] = \"This field is required.\";\r\n }\r\n break;\r\n case \"MainAdvisorCommissionPercentage\":\r\n if (!account[key] && parseFloat(account[key] !== 0)) {\r\n errors[key] = \"This numeric field is required.\";\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n });\r\n return errors;\r\n};\r\n\r\nexport const preCheckPhysicalPersonForm = person => {\r\n const errors = {};\r\n const needsExtraFields= person.needsExtraFields? true: false;\r\n Object.keys(person).forEach(key => {\r\n switch (key) {\r\n case \"PhysicalPersonNationality\":\r\n case \"PhysicalPersonSecondName\":\r\n case \"PhysicalPersonSecondLastName\":\r\n case \"PhysicalPersonInstitution\":\r\n if (needsExtraFields&&!person[key]&&!person.PersonIsMinimal) {\r\n errors[key] = \"This field is required.\";\r\n }\r\n break;\r\n case \"PhysicalPersonFirstName\":\r\n case \"PhysicalPersonFirstLastName\":\r\n case \"PersonQualification\":\r\n case \"PhysicalPersonMainDocumentNumber\":\r\n if (!person[key]) {\r\n errors[key] = \"This field is required.\";\r\n }\r\n break;\r\n case \"PhysicalPersonEmail\":\r\n case \"PhysicalPersonDateOfBirth\":\r\n case \"PhysicalPersonCountryOfBirthId\":\r\n case \"PhysicalPersonCityOfBirthId\":\r\n case \"PhysicalPersonGender\":\r\n case \"PhysicalPersonPublicPositionId\":\r\n case \"PersonFiscalResidenceCountryId\":\r\n case \"PhysicalPersonCivilStatus\":\r\n if (!person[key] && !person.PersonIsMinimal&&(!person.PersonUpdateManual || (person.PersonUpdateManual === \"0\"))) {\r\n errors[key] = \"This field is required.\";\r\n }\r\n break;\r\n case \"PersonFiscalResidenceNoTINOpt\":\r\n if (person.PersonFiscalResidenceNoTINOpt == \"\" && !person.PersonIsMinimal) {\r\n person.PersonFiscalResidenceNoTINOpt = \"Option1\";\r\n }\r\n break;\r\n case \"PersonFiscalResidenceNoTINSpecify\":\r\n if (\r\n !person.PersonFiscalResidenceTIN &&\r\n person.PersonFiscalResidenceNoTINOpt === \"Option2\" &&\r\n !person[key] && !person.PersonIsMinimal\r\n ) {\r\n errors[key] = \"This field is required.\";\r\n }\r\n break;\r\n case \"PhysicalPersonPatrimonyId\":\r\n if (\r\n !person[key] || person[key]==0\r\n ) {\r\n errors[key] = \"This field is required.\";\r\n }\r\n break;\r\n case \"PersonLinkPublicPositionId\":\r\n if (\r\n !person[key] ||\r\n (parseInt(person.PhysicalPersonLinkId, 10) > 10 &&\r\n parseInt(person[key], 10) === 1 && !person.PersonIsMinimal)\r\n ) {\r\n errors[key] = \"This field is required.\";\r\n }\r\n break;\r\n case \"PhysicalPersonLinkId\":\r\n if (\r\n !person[key] ||\r\n (parseInt(person.PersonLinkPublicPositionId, 10) > 10 &&\r\n parseInt(person[key], 10) === 1 && !person.PersonIsMinimal)\r\n ) {\r\n errors[key] = \"This field is required.\";\r\n }\r\n break;\r\n case \"PersonProfessionId\":\r\n case \"PersonActivitySectorId\":\r\n if (person[key]==0 && !person.PersonIsMinimal && (!person.PersonUpdateManual || (person.PersonUpdateManual === \"0\"))){\r\n errors[key] = \"This field is required.\";\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n });\r\n return errors;\r\n};\r\n\r\nexport const preCheckJuridicalPersonform = person => {\r\n const errors = {};\r\n const needsExtraFields= person.needsExtraFields? true: false;\r\n Object.keys(person).forEach(key => {\r\n switch (key) {\r\n // case \"PersonProfessionId\":\r\n case \"PersonActivitySectorId\":\r\n if (person[key]==0 && !person.PersonIsMinimal && (!person.PersonUpdateManual || (person.PersonUpdateManual === \"0\"))){\r\n errors[key] = \"This field is required.\";\r\n }\r\n break;\r\n \r\n case \"JuridicalPersonTAXId\":\r\n if (!person[key]||person[key].trim() == \"\" ) {\r\n errors[key] = \"This field is required.\";}\r\n break;\r\n case \"JuridicalPersonConstPlaceId\":\r\n case \"JuridicalPersonDocumentTypeId\":\r\n case \"JuridicalPersonLegalName\":\r\n case \"PersonQualification\":\r\n if (!person[key]||person[key].trim() == \"\") {\r\n errors[key] = \"This field is required.\"\r\n }\r\n break;\r\n case \"JuridicalPersonConstDate\":\r\n if (!person[key]||person[key].trim() == \"\" ) {\r\n errors[key] = \"This field is required.\";}\r\n break;\r\n case \"JuridicalPersonIssuePlace\":\r\n case \"JuridicalPersonPublicPosition\":\r\n if (!person[key]||person[key].trim() == \"\") {\r\n errors[key] = \"This field is required.\"\r\n }\r\n break;\r\n case \"PersonEmail\":\r\n if (!person[key]&&needsExtraFields&&!person.PersonIsMinimal) {\r\n errors[key] = \"This field is required.\";\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n });\r\n return errors;\r\n};\r\n\r\nexport const preCheckPersonForm = person => {\r\n const addrErrors = {};\r\n let errors = {};\r\n if (person.PersonType === PersonType.Juridical) {\r\n errors = preCheckJuridicalPersonform(person);\r\n } else {\r\n errors = preCheckPhysicalPersonForm(person);\r\n }\r\n return {\r\n ...errors,\r\n ...addrErrors\r\n };\r\n};\r\n","import React, { Component } from \"react\";\r\nimport { ResponsiveTable, CircularProgress } from \"..\";\r\nimport { FormattedDate, FormattedTime } from \"react-intl\";\r\nimport { FormattedNumber } from \"../FormattedNumber/FormattedNumber\";\r\nimport { OrderItemUI, Pagination } from \"..\";\r\nimport { QuoteStatus } from \"../../utils/Quote/Quote\";\r\nimport { getProductTypeName } from \"../../utils/Order/Order\";\r\nimport { localDateTime } from \"../../utils/Helper\";\r\n\r\nclass QuoteList extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n page: 1,\r\n };\r\n }\r\n\r\n handleOnChangePage = (nextPage) => {\r\n this.setState({\r\n page: nextPage,\r\n });\r\n\r\n this.props.requestQuotes({\r\n pageFilter: {\r\n startIndex: (nextPage - 1) * 10,\r\n length: 10,\r\n ...this.state.filter,\r\n },\r\n });\r\n };\r\n\r\n render() {\r\n const progressStyle = {\r\n position: \"absolute\",\r\n top: 0,\r\n left: 0,\r\n bottom: \"30px\",\r\n right: 0,\r\n margin: \"auto\",\r\n };\r\n\r\n return (\r\n
    \r\n {this.props.loading && }\r\n \r\n \r\n \r\n Req. at\r\n Req. by\r\n Resp. at\r\n Resp. by\r\n Trading desk\r\n Product\r\n Side\r\n Ticker\r\n Quantity\r\n Price\r\n Status\r\n Used\r\n Reason\r\n \r\n \r\n \r\n {this.props.quotes.map((quote) => (\r\n \r\n \r\n \r\n \r\n \r\n {quote.AdvisorQuoteRequestedBy}\r\n \r\n\r\n \r\n {quote.AdvisorQuoteStatus != QuoteStatus.WAITING ? (\r\n \r\n ) : (\r\n \"\"\r\n )}\r\n \r\n\r\n \r\n {quote.AdvisorQuoteStatus != QuoteStatus.WAITING ? (\r\n {quote.AdvisorQuoteRespondedBy}\r\n ) : (\r\n \"\"\r\n )}\r\n \r\n\r\n {quote.tradingDeskName}\r\n {getProductTypeName(quote.AssetClassForm)}\r\n \r\n {OrderItemUI.renderOrderSide({\r\n OrderSide: quote.AdvisorQuoteIsBuy ? \"Buy\" : \"Sell\",\r\n })}\r\n \r\n \r\n {quote.AssetTicker}\r\n \r\n \r\n \r\n \r\n\r\n \r\n {quote.AdvisorQuoteStatus == QuoteStatus.PRICED ||\r\n quote.AdvisorQuoteStatus == QuoteStatus.USED ||\r\n quote.AdvisorQuoteStatus == QuoteStatus.REJECTED_BY_SENDER ? (\r\n \r\n \r\n \r\n ) : (\r\n \"\"\r\n )}\r\n \r\n \r\n \r\n \r\n {quote.wasUsed ? \"Yes\" : \"No\"}\r\n {quote.AdvisorQuoteRejectReason}\r\n \r\n ))}\r\n \r\n \r\n \r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst Datetime = (props) => {\r\n if (props.value == undefined) return -;\r\n\r\n const value = Date.parse(props.value);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst Status = (props) => {\r\n switch (props.status) {\r\n case QuoteStatus.WAITING:\r\n return Waiting;\r\n case QuoteStatus.PRICED:\r\n return Priced;\r\n case QuoteStatus.USED:\r\n return Used;\r\n case QuoteStatus.REJECTED_BY_SENDER:\r\n return Rejected;\r\n case QuoteStatus.REJECTED_BY_RECEIVER:\r\n return Rejected;\r\n }\r\n};\r\n\r\nexport default QuoteList;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"toolbar\":\"QuoteList-module_toolbar_29BJt\",\"formGroup\":\"QuoteList-module_formGroup_39TKt\",\"button\":\"QuoteList-module_button_12OBt\"};","import React, { Component } from \"react\";\r\nimport { Input, InputGroup, Row, Col, FormGroup, Label, Button } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport style from \"./QuoteList.module.scss\";\r\nimport { FormField } from \"../../utils/FormFields\";\r\n\r\nclass Toolbar extends Component {\r\n render() {\r\n const { onChange, filter, onSearch } = this.props;\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n onChange(name, value)}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n onChange(name, value)}\r\n />\r\n \r\n \r\n \r\n
    \r\n \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport default Toolbar;\r\n","import QuoteList from './QuoteList'\r\nimport Toolbar from './Toolbar'\r\n\r\nexport { \r\n\tQuoteList as List,\r\n\tToolbar\r\n}","import React, { useState } from \"react\";\r\nimport { Button, Input } from \"reactstrap\";\r\nimport style from \"./../Quotebar.module.scss\";\r\nimport { FormattedDate, FormattedTime } from \"react-intl\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport CircularProgress from \"./../../CircularProgress/CircularProgress\";\r\nimport { NumberFormatInput } from \"../../NumberFormatInput/NumberFormatInput\";\r\n\r\nconst spinnerStyle = {\r\n position: \"absolute\",\r\n top: 0,\r\n left: 0,\r\n bottom: \"30px\",\r\n right: 0,\r\n margin: \"auto\",\r\n};\r\n\r\nconst CrossItem = ({ order, ...props }) => {\r\n const [values, setValues] = useState({ crossType: \"Internal\", price: \"\" });\r\n\r\n const changeValue = (name, value) => {\r\n setValues({\r\n ...values,\r\n [name]: value,\r\n });\r\n };\r\n\r\n const setPrice = () => {\r\n setValues({\r\n ...values,\r\n loading: true,\r\n });\r\n\r\n props\r\n .setPrice({\r\n orderId: order.OrderId,\r\n price: values.price,\r\n crossType: values.crossType,\r\n })\r\n .then((r) => null);\r\n };\r\n\r\n return (\r\n
    \r\n {values.loading && (\r\n
    \r\n \r\n
    \r\n )}\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n Cross price\r\n \r\n \r\n {\" \"}\r\n \r\n \r\n
    \r\n\r\n
    \r\n {/* Side */}\r\n\r\n {/* Symbol */}\r\n
    {order.AssetTicker}
    \r\n {/* Quantity */}\r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n {/* Sender / Receiver */}\r\n
    {order.OrderAdvisorName}
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst Form = ({ values, setPrice, onChange }) => (\r\n
    \r\n
    \r\n
    \r\n \r\n onChange(\"price\", isNaN(e.floatValue) || e.value.endsWith(\".\") ? e.value : e.floatValue)\r\n }\r\n className={`${style.input} mr-1`}\r\n placeholder={\"Price\"}\r\n dataTypeDecimalName=\"price\"\r\n />\r\n
    \r\n
    \r\n onChange(\"crossType\", e.target.value)}\r\n disabled={!!values.loading}\r\n className={`${style.input} mr-1`}\r\n >\r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n setPrice()}\r\n disabled={values.loading || values.price == \"\"}\r\n color=\"primary\"\r\n size=\"sm\"\r\n className=\"float-right ml-1\"\r\n >\r\n Set price\r\n \r\n
    \r\n
    \r\n);\r\n\r\nexport default CrossItem;\r\n","import React, { Component } from \"react\";\r\nimport {\r\n DropdownItem,\r\n ButtonGroup,\r\n UncontrolledDropdown,\r\n DropdownMenu,\r\n DropdownToggle,\r\n Button,\r\n Input,\r\n} from \"reactstrap\";\r\nimport { QuoteStatus, QuoteMode } from \"../../../utils/Quote/Quote\";\r\nimport style from \"../Quotebar.module.scss\";\r\nimport { Mode, TimeFrame, OrderPriceType, Type, CommissionType } from \"../../../utils/Order/Order\";\r\nimport { NumberFormatInput } from \"../../NumberFormatInput/NumberFormatInput\";\r\nimport { toDateLocal } from \"../../../utils/Helper\";\r\n\r\nclass Form extends Component {\r\n openModalOrder = (type = Type.Default) => {\r\n const { quote } = this.props;\r\n\r\n const order = {\r\n AssetClassForm: quote.AssetClassForm,\r\n AssetTicker: quote.AssetTicker,\r\n OrderSide: quote.AdvisorQuoteIsBuy ? \"Buy\" : \"Sell\",\r\n OrderPrice: quote.AdvisorQuotePrice,\r\n OrderQuantity: quote.AdvisorQuoteQuantity,\r\n OrderType: OrderPriceType.LIMIT,\r\n quoteId: quote.AdvisorQuoteId,\r\n OrderInitDate: toDateLocal(new Date()),\r\n OrderTimeInForce: TimeFrame.GTC,\r\n OrderGTD: toDateLocal(new Date()),\r\n CurrentAccount: {\r\n CommissionType: CommissionType.PrincipalPercentage,\r\n MarkupType: CommissionType.FaceValueCash,\r\n FXMarkupType: CommissionType.FaceValueCash,\r\n CurrentInfoDate: toDateLocal(new Date()),\r\n Quantity: quote.AdvisorQuoteQuantity,\r\n },\r\n };\r\n\r\n this.props.openModalOrder({ mode: Mode.QUOTE, order, type });\r\n };\r\n\r\n render() {\r\n const { quote, isTrader, changeMode, changeField, updateQuote, fields } = this.props;\r\n const { AdvisorQuoteStatus } = quote;\r\n\r\n const mode = quote.mode || QuoteMode.NONE;\r\n\r\n // WAITING / SETTING_PRICE - Trader\r\n if (AdvisorQuoteStatus == QuoteStatus.WAITING && mode == QuoteMode.SET_PRICE && isTrader) {\r\n return (\r\n
    \r\n
    \r\n
    \r\n \r\n changeField(\r\n \"AdvisorQuotePrice\",\r\n isNaN(e.floatValue) || e.value.endsWith(\".\") ? e.value : e.floatValue\r\n )\r\n }\r\n decimalScale={quote.SubAssetClassDecimalPlaces}\r\n dataTypeDecimalName=\"price\"\r\n className={`${style.input} mr-1`}\r\n placeholder={\"Price\"}\r\n />\r\n
    \r\n
    \r\n changeField(\"AdvisorQuoteDuration\", e.value)}\r\n dataTypeDecimalName=\"default\"\r\n />\r\n
    \r\n
    \r\n
    \r\n \r\n changeMode(quote.AdvisorQuoteId, QuoteMode.NONE)}\r\n color=\"secondary\"\r\n size=\"sm\"\r\n className=\"float-right\"\r\n >\r\n Cancel\r\n \r\n
    \r\n
    \r\n );\r\n }\r\n // WAITING / REJECT - Trader\r\n // PRICED / REJECT - Advisor\r\n else if (\r\n (AdvisorQuoteStatus == QuoteStatus.WAITING && mode == QuoteMode.REJECT) ||\r\n (AdvisorQuoteStatus == QuoteStatus.PRICED && mode == QuoteMode.REJECT)\r\n ) {\r\n return (\r\n
    \r\n
    \r\n
    \r\n changeField(\"AdvisorQuoteRejectReason\", e.target.value)}\r\n placeholder={\"Reason\"}\r\n />\r\n
    \r\n
    \r\n
    \r\n changeMode(quote.AdvisorQuoteId, QuoteMode.NONE)}\r\n color=\"secondary\"\r\n size=\"sm\"\r\n >\r\n Cancel\r\n \r\n \r\n
    \r\n
    \r\n );\r\n }\r\n // WAITING / NONE - Trader\r\n else if (AdvisorQuoteStatus == QuoteStatus.WAITING && mode == QuoteMode.NONE && isTrader) {\r\n return (\r\n
    \r\n \r\n changeMode(quote.AdvisorQuoteId, QuoteMode.SET_PRICE)}\r\n color=\"success\"\r\n size=\"sm\"\r\n className=\"ml-1\"\r\n >\r\n Accept\r\n \r\n
    \r\n );\r\n }\r\n // PRICED / NONE - Advisor\r\n else if (AdvisorQuoteStatus == QuoteStatus.PRICED && mode == QuoteMode.NONE && !isTrader) {\r\n if (quote.expired) {\r\n return null;\r\n }\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n this.openModalOrder(Type.Bulk)}>Move to Bulk\r\n \r\n \r\n \r\n
    \r\n );\r\n }\r\n // NULL\r\n else {\r\n return null;\r\n }\r\n }\r\n}\r\n\r\nexport default Form;\r\n","import React from \"react\";\r\nimport { QuoteStatus } from \"../../../utils/Quote/Quote\";\r\nimport style from \"../Quotebar.module.scss\";\r\nimport CircularProgress from \"../../CircularProgress/CircularProgress\";\r\n\r\nconst expirationRemainingString = (seconds) => {\r\n if (seconds >= 3600) {\r\n return `${Number(seconds / 3600).toFixed(1)}h`;\r\n } else if (seconds >= 60) {\r\n return `${Number(seconds / 60).toFixed(1)}m`;\r\n } else {\r\n return `${Number(seconds)}s`;\r\n }\r\n};\r\n\r\nexport const Icon = (props) => {\r\n const { quote, isAdvisor } = props;\r\n const { AdvisorQuoteExpireAt, expired, expirateIn } = quote;\r\n\r\n switch (quote.AdvisorQuoteStatus) {\r\n case QuoteStatus.WAITING:\r\n return ;\r\n case QuoteStatus.PRICED:\r\n if (expired) {\r\n return ;\r\n }\r\n if (isAdvisor) {\r\n return (\r\n \r\n );\r\n }\r\n return ;\r\n case QuoteStatus.USED:\r\n return ;\r\n case QuoteStatus.REJECTED_BY_RECEIVER:\r\n case QuoteStatus.REJECTED_BY_SENDER:\r\n return ;\r\n }\r\n};\r\n","import React, { Component } from \"react\";\r\nimport { DropdownItem, Badge, Button, Input } from \"reactstrap\";\r\nimport style from \"./../Quotebar.module.scss\";\r\nimport { FormattedDate, FormattedTime } from \"react-intl\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport { getFieldVisibility, QuoteStatus, QuoteMode } from \"./../../../utils/Quote/Quote\";\r\nimport Form from \"./Form\";\r\nimport CircularProgress from \"./../../CircularProgress/CircularProgress\";\r\nimport { Icon } from \"./Icon\";\r\nimport { Status } from \"./Status\";\r\nimport { formattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\n\r\nconst spinnerStyle = {\r\n position: \"absolute\",\r\n top: 0,\r\n left: 0,\r\n bottom: \"30px\",\r\n right: 0,\r\n margin: \"auto\",\r\n};\r\n\r\nconst Item = ({ quote, openModalOrder, openModalOffer, isAdvisor, ...props }) => {\r\n const visibility = getFieldVisibility(quote);\r\n\r\n return (\r\n
    \r\n {props.loading && (\r\n
    \r\n \r\n
    \r\n )}\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n Quote request\r\n \r\n \r\n {\" \"}\r\n \r\n \r\n
    \r\n\r\n
    \r\n {/* Side */}\r\n
    \r\n \r\n {quote.AdvisorQuoteIsBuy ? \"BUY\" : \"SELL\"}\r\n \r\n
    \r\n {/* Symbol */}\r\n
    {quote.AssetTicker}
    \r\n {/* Quantity */}\r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n\r\n
    \r\n
    \r\n {/* Sender / Receiver */}\r\n
    \r\n {quote.AdvisorQuoteRequestedBy} {\" / \"} {quote.AdvisorQuoteRespondedBy}\r\n
    \r\n\r\n \r\n
    \r\n\r\n {/* Price */}\r\n {visibility.labelPrice && (\r\n
    ${formattedNumber(quote.AdvisorQuotePrice, null, \"price\")}
    \r\n )}\r\n
    \r\n\r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default Item;\r\n","import React from \"react\";\r\nimport { QuoteStatus } from \"../../../utils/Quote/Quote\";\r\nimport style from \"../Quotebar.module.scss\";\r\n\r\nexport const Status = (props) => {\r\n const { quote } = props;\r\n const { expired } = quote;\r\n\r\n switch (quote.AdvisorQuoteStatus) {\r\n case QuoteStatus.WAITING:\r\n return null;\r\n case QuoteStatus.PRICED:\r\n if (expired) {\r\n return (\r\n
    \r\n \r\n {\"Expired\"}\r\n \r\n
    \r\n );\r\n }\r\n\r\n return (\r\n
    \r\n \r\n {\"Priced\"}\r\n \r\n
    \r\n );\r\n case QuoteStatus.USED:\r\n return (\r\n
    \r\n \r\n {\"Used\"}\r\n \r\n
    \r\n );\r\n case QuoteStatus.REJECTED_BY_RECEIVER:\r\n case QuoteStatus.REJECTED_BY_SENDER:\r\n return (\r\n
    \r\n \r\n Rejected\r\n {\" \"}\r\n ({quote.AdvisorQuoteRejectReason})\r\n
    \r\n );\r\n }\r\n};\r\n","import React, { Component } from \"react\";\r\nimport {\r\n Badge,\r\n DropdownItem,\r\n DropdownMenu,\r\n DropdownToggle,\r\n Dropdown as ReactStrapDropDown,\r\n} from \"reactstrap\";\r\nimport { QuoteStatus, QuoteMode } from \"./../../utils/Quote/Quote\";\r\nimport * as _state from \"./_state\";\r\nimport style from \"./Quotebar.module.scss\";\r\nimport Item from \"./Item/Item\";\r\nimport CrossItem from \"./CrossItem/CrossItem\";\r\n\r\nlet intervalExpiration = null;\r\n\r\nclass Quotebar extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n _state.initialize.call(this);\r\n\r\n this.enableCounterAndExpirationsTask();\r\n }\r\n\r\n toggle = () => {\r\n _state.toggle.call(this);\r\n };\r\n\r\n getEditingProps(id) {\r\n const { edit } = this.state;\r\n if (edit && edit.AdvisorQuoteId == id) {\r\n return edit;\r\n }\r\n\r\n return {};\r\n }\r\n\r\n componentWillUpdate(nextProps, nextState) {\r\n if (nextState.open) {\r\n if (!document.getElementById(\"overlay\")) {\r\n let overlay = document.createElement(\"div\");\r\n overlay.id = \"overlay\";\r\n overlay.className = style.overlay;\r\n\r\n document.body.appendChild(overlay);\r\n // enable timer quote expiration\r\n const { isAdvisor, quotes } = this.props;\r\n const { counter, expirations } = getCounterAndExpirations(isAdvisor, quotes, this.state.expirations);\r\n\r\n _state.updateStateProps.call(this, { counter, expirations });\r\n }\r\n } else {\r\n if (document.getElementById(\"overlay\")) {\r\n document.body.removeChild(document.getElementById(\"overlay\"));\r\n }\r\n }\r\n }\r\n\r\n enableCounterAndExpirationsTask = () => {\r\n if (intervalExpiration) {\r\n clearInterval(intervalExpiration);\r\n }\r\n\r\n intervalExpiration = setInterval(() => {\r\n const { isAdvisor, quotes } = this.props;\r\n const { counter, expirations } = getCounterAndExpirations(isAdvisor, quotes, this.state.expirations);\r\n\r\n if (!(this.state.counter == counter && !this.state.open)) {\r\n _state.updateStateProps.call(this, { counter, expirations });\r\n }\r\n }, 1000);\r\n };\r\n\r\n changeMode = (id, mode) => {\r\n _state.changeMode.call(this, id, mode);\r\n };\r\n\r\n updateQuote = () => {\r\n _state.setLoading.call(this, true);\r\n\r\n const params = _state.getUpdatedValues.call(this);\r\n\r\n this.props.updateQuote(params).then((response) => {\r\n setTimeout(() => _state.setLoading.call(this, false), 700);\r\n });\r\n };\r\n\r\n changeField = (name, value) => {\r\n _state.changeField.call(this, name, value);\r\n };\r\n\r\n render() {\r\n if (this.props.quotes == null) {\r\n return null;\r\n }\r\n\r\n const {\r\n quotes,\r\n crossing: pCrossing,\r\n isAdvisor,\r\n openModalOrder,\r\n openModalOffer,\r\n crossingSetPrice,\r\n } = this.props;\r\n const { counter: sCounter, expirations } = this.state;\r\n const crossing = pCrossing || [];\r\n\r\n const counter = sCounter + crossing.length;\r\n\r\n return (\r\n \r\n \r\n 0 ? style.tada : null}>\r\n \r\n \r\n {counter}\r\n \r\n \r\n \r\n \r\n \r\n Quote list\r\n \r\n {this.state.open && (\r\n
    \r\n {quotes.length == 0 && crossing.length == 0 ? (\r\n
    Empty
    \r\n ) : (\r\n \r\n {crossing.map((order) => (\r\n \r\n ))}\r\n\r\n {quotes.map((item) => {\r\n const editingProps = this.getEditingProps(item.AdvisorQuoteId);\r\n return (\r\n \r\n );\r\n })}\r\n \r\n )}\r\n
    \r\n )}\r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst getExpirationValue = (quote) => {\r\n const { AdvisorQuoteExpireAt, AdvisorQuoteStatus } = quote;\r\n const diffSeconds = Math.max(parseInt((AdvisorQuoteExpireAt - new Date()) / 1000), 0);\r\n return {\r\n expired: AdvisorQuoteStatus == QuoteStatus.PRICED && diffSeconds <= 0,\r\n expirateIn: diffSeconds,\r\n };\r\n};\r\n\r\nconst getCounterAndExpirations = (isAdvisor, quotes, expirations) => {\r\n let counter = 0;\r\n let _expirations = expirations;\r\n\r\n quotes.forEach((q) => {\r\n _expirations[q.AdvisorQuoteId] = getExpirationValue(q);\r\n\r\n if (isAdvisor) {\r\n if (q.AdvisorQuoteStatus == QuoteStatus.PRICED) {\r\n counter++;\r\n\r\n if (_expirations[q.AdvisorQuoteId].expired == true) {\r\n counter--;\r\n }\r\n }\r\n } else {\r\n if (q.AdvisorQuoteStatus == QuoteStatus.WAITING) {\r\n counter++;\r\n }\r\n }\r\n });\r\n\r\n return {\r\n counter,\r\n expirations: _expirations,\r\n };\r\n};\r\n\r\nexport default Quotebar;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"side\":\"Quotebar-module_side_2-7pb\",\"quote\":\"Quotebar-module_quote_3jIl3\",\"symbol\":\"Quotebar-module_symbol_H0WnI\",\"detail\":\"Quotebar-module_detail_3_m3r\",\"footer\":\"Quotebar-module_footer_23-iu\",\"status\":\"Quotebar-module_status_1R3HA\",\"price\":\"Quotebar-module_price_RR214\",\"quantity\":\"Quotebar-module_quantity_3bPa_\",\"form\":\"Quotebar-module_form_2kcj2\",\"input\":\"Quotebar-module_input_MToSC\",\"moveDropDown\":\"Quotebar-module_moveDropDown_1bU3s\",\"icon\":\"Quotebar-module_icon_3vcKS\",\"container\":\"Quotebar-module_container_3u9Dq\",\"quotes\":\"Quotebar-module_quotes_1xYNa\",\"loading\":\"Quotebar-module_loading_OEi2Z\",\"overlay\":\"Quotebar-module_overlay_30x_4\",\"animated\":\"Quotebar-module_animated_Yf049\",\"tada\":\"Quotebar-module_tada_2tL5M\"};","import {QuoteMode, QuoteAction, QuoteStatus} from '../../utils/Quote/Quote'\r\n\r\nexport function initialize() {\r\n this.state = {\r\n open: false,\r\n counter: 0,\r\n expirations: {},\r\n edit: {\r\n id: null,\r\n fields: {},\r\n errors: {},\r\n loading: false\r\n }\r\n }\r\n}\r\n\r\nexport function changeMode(AdvisorQuoteId, mode) {\r\n this.setState({\r\n edit: {\r\n AdvisorQuoteId,\r\n mode,\r\n fields: {},\r\n errors: {},\r\n loading: false\r\n }\r\n })\r\n}\r\n\r\nexport function toggle() {\r\n this.setState({open: !this.state.open})\r\n}\r\n\r\nexport function updateStateProps(props) {\r\n this.setState(props)\r\n}\r\n\r\nexport function changeField(name, value) {\r\n this.setState({\r\n edit: {\r\n ...this.state.edit,\r\n fields: {\r\n ...this.state.edit.fields,\r\n [name]: value\r\n },\r\n errors: {\r\n ...this.state.edit.errors,\r\n [name]: value\r\n }\r\n }\r\n })\r\n}\r\n\r\nexport function setLoading(value) {\r\n this.setState({\r\n edit: {\r\n ...this.state.edit,\r\n loading: value\r\n }\r\n })\r\n}\r\n\r\nexport function getUpdatedValues() {\r\n const {edit} = this.state\r\n\r\n if (edit.mode == QuoteMode.SET_PRICE) {\r\n return {\r\n quoteAction: QuoteAction.SET_PRICE,\r\n quote: {\r\n AdvisorQuoteId: edit.AdvisorQuoteId,\r\n AdvisorQuotePrice: parseFloat(edit.fields['AdvisorQuotePrice']),\r\n AdvisorQuoteDuration: parseFloat(edit.fields['AdvisorQuoteDuration'])\r\n }\r\n }\r\n } else if (edit.mode == QuoteMode.REJECT) {\r\n return {\r\n quoteAction: QuoteAction.REJECT,\r\n quote: {\r\n AdvisorQuoteId: edit.AdvisorQuoteId,\r\n AdvisorQuoteRejectReason: edit.fields['AdvisorQuoteRejectReason']\r\n }\r\n }\r\n } else {\r\n return {}\r\n }\r\n}\r\n","import PropTypes from 'prop-types';\r\nimport React, { useState } from 'react';\r\nimport LaddaButton, { EXPAND_RIGHT } from 'react-ladda';\r\nimport { Alert, Button, Card, CardBody, Col, Container, Input, InputGroup, Row } from 'reactstrap';\r\n\r\nconst ForgotPasswordPage = ({ForgotPasswordFunction}) => {\r\n\r\n const [username, setUserName] = useState(undefined)\r\n const [error, setError] = useState(undefined)\r\n const [sending, setSending] = useState(false)\r\n const [completed, setCompleted] = useState(false)\r\n \r\n const send = (event) => {\r\n if (username) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n setSending(true)\r\n setCompleted(false)\r\n ForgotPasswordFunction(username)\r\n .then(res => {\r\n if (res.response.error.description){\r\n setError(res.response.error)\r\n }else{\r\n setCompleted(true)\r\n setError(undefined)\r\n }\r\n setSending(false)\r\n \r\n }).catch(e=> setSending(false))\r\n }\r\n\t}\r\n\t\t\r\n\treturn (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    Password Recovery
    \r\n { error && {error.description} }\r\n { completed && An email has been sent. Please check your inbox }\r\n {!completed && \r\n
    \r\n

    Enter your username

    \r\n \r\n
    \r\n \r\n \r\n \r\n
    \r\n {}}\r\n onChange={(e)=>{setUserName(e.target.value)}}\r\n />\r\n
    \r\n \r\n \r\n \r\n Send\r\n \r\n \r\n \r\n
    \r\n }\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n}\r\n\r\nForgotPasswordPage.propTypes = {\r\n ForgotPasswordFunction: PropTypes.func\r\n}\r\n\r\n\r\nconst ResetPasswordPage = ({ResetPasswordFunction}) => {\r\n const [loading, setLoading] = useState(false)\r\n const [newpassword, setnewPassword] = useState('')\r\n const [newpassword2, setnewPassword2] = useState('')\r\n const [error, setError] = useState(false)\r\n const [completed, setCompleted] = useState(false)\r\n const hash = window.location.hash\r\n const params = new URLSearchParams(hash)\r\n const resetToken = params.get('#/resetPassword?token')\r\n const username = params.get('username')\r\n\r\n const send = (event) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n setLoading(true)\r\n setCompleted(false)\r\n ResetPasswordFunction(username, newpassword, resetToken)\r\n .then(res => {\r\n if (res.response.Error.description){\r\n setError(res.response.Error)\r\n }else{\r\n setCompleted(true)\r\n setError(undefined)\r\n }\r\n setLoading(false)\r\n \r\n }).catch(e => {console.log(e); setLoading(false)})\r\n\t}\r\n return(\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    Password Recovery
    \r\n

    *Password must contain at least 8 characters

    \r\n {!completed ? \r\n \r\n {error && {error.description} }\r\n

    New password

    \r\n \r\n
    \r\n \r\n \r\n \r\n
    \r\n setnewPassword(e.target.value)}\r\n />\r\n \r\n
    \r\n

    Confirm new password

    \r\n \r\n
    \r\n \r\n \r\n \r\n
    \r\n setnewPassword2(e.target.value)}\r\n />\r\n
    \r\n \r\n \r\n \r\n Send\r\n \r\n \r\n \r\n
    \r\n :\r\n \r\n \r\n Password changed succesfully!\r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n )\r\n}\r\n\r\nResetPasswordPage.propTypes = {\r\n ResetPasswordFunction: PropTypes.func\r\n}\r\n\r\n\r\nexport {\r\n ForgotPasswordPage,\r\n ResetPasswordPage\r\n};\r\n\r\n","import React, { Component } from \"react\";\r\nimport { Table } from \"reactstrap\";\r\nimport style from \"./Table.module.scss\";\r\nimport MediaQuery from \"react-responsive\";\r\n\r\nclass ResponsiveTable extends Component {\r\n render() {\r\n return (\r\n \r\n {(matches) => {\r\n const tbodyChild = getTbodyChild(this.props.children);\r\n\r\n if (tbodyChild == null) {\r\n return null;\r\n }\r\n\r\n if (tbodyChild.length == 0) {\r\n return ;\r\n }\r\n\r\n return matches ? (\r\n \r\n {this.props.children}\r\n
    \r\n ) : (\r\n {this.props.children}\r\n );\r\n }}\r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst getChildren = (e) => e.props.children;\r\n\r\nconst getTbodyChild = (root) => {\r\n let tbody;\r\n\r\n React.Children.forEach(root, (child, i) => {\r\n if (child.type === \"tbody\") tbody = child;\r\n });\r\n return getChildren(tbody);\r\n};\r\n\r\nconst getCardLines = (elements) => {\r\n let fstLine = [];\r\n let sndLine = [];\r\n\r\n const tdCollection = getChildren(elements) || [];\r\n\r\n tdCollection.forEach((td) => {\r\n const pos = td.props.sm || {};\r\n const i = pos.i || 1;\r\n const j = isNaN(pos.j) ? 99 : pos.j;\r\n\r\n if (i == 1) {\r\n fstLine.insert(j, getChildren(td));\r\n } else {\r\n sndLine.insert(j, getChildren(td));\r\n }\r\n });\r\n\r\n return {\r\n first: fstLine,\r\n second: sndLine,\r\n };\r\n};\r\n\r\nconst CardList = (props) => {\r\n const tbodyChild = getTbodyChild(props.children);\r\n\r\n return (\r\n
    \r\n {React.Children.map(tbodyChild, (trowChild, i) => {\r\n const lines = getCardLines(trowChild);\r\n\r\n return (\r\n
    \r\n
    \r\n {React.Children.map(lines.first, (child, i) => (\r\n {child}\r\n ))}\r\n
    \r\n
    \r\n {React.Children.map(lines.second, (child, i) => (\r\n {child}\r\n ))}\r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n );\r\n};\r\n\r\nArray.prototype.insert = function (index, item) {\r\n this.splice(index, 0, item);\r\n};\r\n\r\nconst Empty = (props) => {\r\n return (\r\n
    \r\n

    {props.text}

    \r\n
    \r\n );\r\n};\r\n\r\nexport default ResponsiveTable;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"mobile\":\"Table-module_mobile_HzUZW\",\"card\":\"Table-module_card_3hloW\",\"item\":\"Table-module_item_1ya7g\"};","import React from \"react\";\r\nimport { InputGroup, Input } from \"reactstrap\";\r\n\r\nexport const SearchBox = ({ changeValue, text, ...props }) => (\r\n \r\n
    \r\n \r\n \r\n \r\n
    \r\n changeValue({ text: e.target.value })}\r\n />\r\n
    \r\n);\r\n\r\n","import React, { useState } from \"react\";\r\nimport { Modal, ModalBody, ModalHeader, Row, Col, ModalFooter, Button } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\n\r\nimport styles from \"./styles.module.scss\";\r\nimport { CustomFormInput, FormField } from \"../../utils/FormFields\";\r\nimport { localDateTime } from \"../../utils/Helper\";\r\n\r\nconst ModalSpotQuote = ({ quote, handleClose, open, handleSave, loading }) => {\r\n const [newPrice, setNewPrice] = useState(parseFloat(quote.PairPricePrice));\r\n\r\n const handleChangePrice = (name, value) => {\r\n setNewPrice(value);\r\n };\r\n\r\n const handleSubmit = () => {\r\n const newPairPrice = {\r\n ...quote,\r\n PairPriceDate: new Date().toISOString().substr(0, 23),\r\n PairPricePrice: newPrice,\r\n };\r\n handleSave(newPairPrice);\r\n };\r\n\r\n const handlePreClose = () => {\r\n if (!loading) {\r\n handleClose();\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n Edit Spot Quote\r\n
    \r\n {quote.PairPriceDescription}\r\n {\" - Last Edited: \"}\r\n \r\n {` - ${localDateTime(quote.PairPriceDate).toTimeString().substr(0, 5)}`}\r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {loading ? \"Saving...\" : \"Save\"}\r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nModalSpotQuote.propTypes = {\r\n quote: PropTypes.object.isRequired,\r\n handleClose: PropTypes.func.isRequired,\r\n open: PropTypes.bool.isRequired,\r\n handleSave: PropTypes.func.isRequired,\r\n loading: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default ModalSpotQuote;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Button } from \"reactstrap\";\r\nimport { FormattedDate } from \"react-intl\";\r\nimport { FormattedNumber } from \"../FormattedNumber/FormattedNumber\";\r\n\r\nimport CircularProgress from \"../CircularProgress/CircularProgress\";\r\nimport ModalSpotQuote from \"./Modal\";\r\nimport { localDateTime, showDateTime } from \"../../utils/Helper\";\r\n\r\nconst SpotQuotes = ({ services }) => {\r\n const [quotes, setQuotes] = useState(undefined);\r\n const [modalEdit, setModalEdit] = useState({\r\n open: false,\r\n quote: undefined,\r\n loading: false,\r\n });\r\n\r\n const handleEditQuote = (quote) => {\r\n setModalEdit({\r\n open: true,\r\n quote,\r\n loading: false,\r\n });\r\n };\r\n\r\n const handleCloseModal = () => {\r\n setModalEdit({\r\n open: false,\r\n quote: undefined,\r\n loading: false,\r\n });\r\n };\r\n\r\n const handleAddQuote = (quote) => {\r\n setModalEdit((m) => ({ ...m, loading: true }));\r\n services\r\n .setSpotQuote({ pairprice: { ...quote } })\r\n .then(() => {\r\n setModalEdit({\r\n open: false,\r\n quote: undefined,\r\n loading: false,\r\n });\r\n setQuotes(undefined);\r\n })\r\n .catch(() => {\r\n setModalEdit((m) => ({\r\n ...m,\r\n loading: false,\r\n }));\r\n });\r\n };\r\n\r\n const closeBar = () => {\r\n document.body.classList.toggle(\"aside-menu-hidden\");\r\n };\r\n\r\n useEffect(() => {\r\n if (!quotes) {\r\n services\r\n .getSpotQuotes({})\r\n .then((res) => {\r\n if (res) {\r\n setQuotes(res.pairprices);\r\n } else {\r\n setQuotes([]);\r\n }\r\n })\r\n .catch(() => {\r\n setQuotes([]);\r\n });\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [quotes]);\r\n\r\n return (\r\n \r\n \r\n {modalEdit.open && (\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default SpotQuotes;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"styles-module_modal_2MQ9R\",\"body\":\"styles-module_body_31QRS\"};","import React, { Fragment } from \"react\";\r\nimport { Label, Input } from \"reactstrap\";\r\nimport \"./ToggleSwitch.css\";\r\n\r\nexport const ToggleSwitch = ({\r\n label,\r\n value,\r\n defaultChecked,\r\n onChange,\r\n disabled = false,\r\n size,\r\n}) => (\r\n \r\n {label && }\r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n","import React from \"react\";\r\nimport style from \"./Tooltip.module.scss\";\r\n\r\nconst Tooltip = ({ text, children }) => (\r\n
    \r\n {children}\r\n
    \r\n);\r\n\r\nexport default Tooltip;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"tooltip\":\"Tooltip-module_tooltip_14D7M\"};","import Tooltip from \"./Tooltip/Tooltip\";\r\n\r\nexport {\r\n Tooltip\r\n}\r\n\r\n","import DynamicReports from \"../components/DynamicReports\";\r\nimport CounterPartyRanking from \"../components/Modal/CounterPartyRanking/CounterPartyRanking\";\r\nimport CrossReferenceSearch from \"../components/Modal/CrossReferenceSearch/CrossReferenceSearch\";\r\nimport * as RecurringCommission from \"../components/Modal/RecurringCommissions/index\";\r\nimport RequestPeopleInfoFields from \"../components/Modal/Reports/RequestPeopleInfoFields\";\r\nimport AdvancedSearchbox from \"./AdvancedSearchbox/AdvancedSearchbox\";\r\nimport * as Asset from \"./Asset\";\r\nimport * as Authorizations from \"./Authorizations\";\r\nimport Autosuggest from \"./Autosuggest/Autosuggest\";\r\nimport CircularProgress from \"./CircularProgress/CircularProgress\";\r\nimport CrossReference from \"./CrossReference\";\r\nimport * as EventAlert from \"./EventAlert\";\r\nimport ExecutionsTable from \"./ExecutionsTable/ExecutionsTable\";\r\nimport * as IOItemUI from \"./IO/Item\";\r\nimport * as IOTypes from \"./IO/types\";\r\nimport * as IOUtils from \"./IO/utils\";\r\nimport AccountComparer from \"./Modal/AccountComparer\";\r\nimport AlertCompl from \"./Modal/Alert/Alert\";\r\nimport AlertSimple from \"./Modal/AlertSimple/AlertSimple\";\r\nimport ModalAuthorization from \"./Modal/Authorization/Authorization\";\r\nimport AuthorizationList from \"./Modal/AuthorizationList\";\r\nimport CorpEvents from \"./Modal/CorpEvents/CorpEvents\";\r\nimport CounterParty from \"./Modal/CounterPartySet/CounterParty\";\r\nimport Cross from \"./Modal/Cross/Cross\";\r\nimport Custody from \"./Modal/Custody/Custody\";\r\nimport NewCustody from \"./Modal/Custody/NewCustody\";\r\nimport Collateral from \"./Modal/Collateral/Collateral\";\r\nimport NewCollateral from \"./Modal/Collateral/NewCollateral\";\r\nimport CustodySet from \"./Modal/CustodySet/Custody\";\r\nimport EnvironmentSign from \"./Modal/EnvironmentSign/EnvironmentSign\";\r\nimport Execution from \"./Modal/Execution/Execution\";\r\nimport History from \"./Modal/History/History\";\r\nimport HistoryDefault from \"./Modal/HistoryDefault/HistoryDefault\";\r\nimport ModalInvoice from \"./Modal/Invoice\";\r\nimport IO from \"./Modal/IO/IO\";\r\nimport IOExecution from \"./Modal/IOExecution/IOExecution\";\r\nimport ModalInstruction from \"./Modal/ModalInstruction\";\r\nimport Note from \"./Modal/Note/Note\";\r\nimport OldNote from \"./Modal/Note/OldNote\";\r\nimport { Field } from \"./Modal/Order/Field/Field\";\r\nimport { wsOnReceive, wsSubscribeSymbol, wsUnsuscribeSymbol } from \"./Modal/Order/Field/Symbol/Info/IEX\";\r\nimport SymbolField from \"./Modal/Order/Field/Symbol/Symbol\";\r\nimport Order from \"./Modal/Order/Order\";\r\nimport Offer from \"./Modal/Offer/Offer\";\r\nimport OrderQuantityAssignment from \"./Modal/OrderQuantityAssignment/OrderQuantityAssignment\";\r\nimport OrderQuantityToTradesAssignment from \"./Modal/OrderQuantityToTradesAssignment/OrderQuantityToTradesAssignment\";\r\nimport AlertMessage from \"./Modal/Simple/Alert\";\r\nimport Trade from \"./Modal/Trade/Trade\";\r\nimport TradeHistory from \"./Modal/TradeHistory/TradeHistory\";\r\nimport Trading from \"./Modal/Trading/Trading\";\r\nimport OrderInlineDetail from \"./Order/InlineDetail\";\r\nimport * as OrderItemUI from \"./Order/Item\";\r\nimport TradeInlineDetail from \"./Order/TradeInlineDetail\";\r\nimport * as Orders from \"./OrderList\";\r\nimport Pagination from \"./Pagination/Pagination\";\r\nimport PercentageBar from \"./PercentageBar/PercentageBar\";\r\nimport PercentageCircle from \"./PercentageCircle/PercentageCircle\";\r\nimport AccountProfileCard from \"./Profile/Account/AccountProfileCard\";\r\nimport AccountProfileCarousel from \"./Profile/Account/AccountProfileCarousel\";\r\nimport AccountProfile from \"./Profile/Account/AccountTabs\";\r\nimport AccountRiskTable from \"./Profile/Account/Risk/RiskTable\";\r\nimport { AccountRiskWidget, CardWrapper } from \"./Profile/Account/Risk/Widget\";\r\nimport PersonProfile from \"./Profile/Person/PersonTabs\";\r\nimport Quotebar from \"./Quotebar/Quotebar\";\r\nimport * as Quotes from \"./QuoteList\";\r\nimport { ForgotPasswordPage, ResetPasswordPage } from \"./RecoverPassword/index\";\r\nimport ResponsiveTable from \"./ResponsiveTable/ResponsiveTable\";\r\nimport SpotQuotes from \"./SpotQuotes\";\r\nimport * as UI from \"./UI\";\r\nimport * as BookType from \"./Profile/Account/Tabs/Components/Booktype\";\r\nimport { ToggleSwitch } from \"./ToggleSwitch/ToggleSwitch\";\r\nimport { MainCard } from \"./MainCard/MainCard\";\r\nimport Offers from \"./Offers/Offers\";\r\nimport { TradingDesk } from \"./Modal/TradingDesk/TradingDesk\";\r\nimport * as Funds from \"./Funds/index\";\r\nimport DropDownFunds from \"./Funds/DropDownFunds\";\r\nexport * from \"./FloattingButton\";\r\nexport {\r\n Order,\r\n Offer,\r\n Execution,\r\n Trade,\r\n Trading,\r\n Cross,\r\n SymbolField,\r\n Quotebar,\r\n History,\r\n TradeHistory,\r\n HistoryDefault,\r\n Note,\r\n OldNote,\r\n AlertSimple,\r\n IO,\r\n IOExecution,\r\n Custody,\r\n NewCustody,\r\n CircularProgress,\r\n OrderInlineDetail,\r\n TradeInlineDetail,\r\n OrderItemUI,\r\n IOItemUI,\r\n IOTypes,\r\n IOUtils,\r\n Collateral,\r\n NewCollateral,\r\n Autosuggest,\r\n ResponsiveTable,\r\n Pagination,\r\n ExecutionsTable,\r\n Orders,\r\n Quotes,\r\n UI,\r\n wsSubscribeSymbol,\r\n wsOnReceive,\r\n wsUnsuscribeSymbol,\r\n AlertCompl as Alert,\r\n CounterParty,\r\n Field,\r\n PercentageCircle,\r\n PercentageBar,\r\n CustodySet,\r\n AccountComparer,\r\n CorpEvents,\r\n Authorizations,\r\n EventAlert,\r\n ModalAuthorization,\r\n ModalInstruction,\r\n AlertMessage,\r\n OrderQuantityAssignment,\r\n OrderQuantityToTradesAssignment,\r\n AccountProfile,\r\n AccountProfileCard,\r\n AccountProfileCarousel,\r\n PersonProfile,\r\n AccountRiskTable,\r\n AccountRiskWidget,\r\n CardWrapper,\r\n CrossReference,\r\n Asset,\r\n ModalInvoice,\r\n SpotQuotes,\r\n RequestPeopleInfoFields,\r\n CounterPartyRanking,\r\n CrossReferenceSearch,\r\n RecurringCommission,\r\n AuthorizationList,\r\n AdvancedSearchbox,\r\n DynamicReports,\r\n EnvironmentSign,\r\n ForgotPasswordPage,\r\n ResetPasswordPage,\r\n BookType,\r\n ToggleSwitch,\r\n MainCard,\r\n Offers,\r\n TradingDesk,\r\n Funds,\r\n DropDownFunds\r\n};\r\n\r\n","export * from \"./components/index\";\r\n\r\nexport * from \"./utils/index\";\r\n\r\n// Import Fonts\r\nimport \"./fonts/MyFontsWebfontsKit.css\";\r\n","export const AccountStatus = {\r\n ACTIVE: \"Active\",\r\n BLOCKED: \"Blocked\",\r\n INACTIVE: \"Inactive\",\r\n DELETED: \"Deleted\"\r\n};\r\n","import React from 'react';\r\nimport { Container, Row, Col, Button } from 'reactstrap';\r\n\r\n// inspired from https://reactjs.org/docs/error-boundaries.html\r\n\r\nclass ErrorBoundary extends React.Component {\r\n\tstate = { error: null, errorInfo: null };\r\n\r\n\t// static getDerivedStateFromError(error) {\r\n\t// \t// Update state so the next render will show the fallback UI.\r\n\t// \treturn { hasError: true };\r\n\t// }\r\n\r\n\tcomponentDidCatch(error, errorInfo) {\r\n\t\t// Catch errors in any components below and re-render with error message\r\n\t\tthis.setState({\r\n\t\t\terror: error,\r\n\t\t\terrorInfo: errorInfo,\r\n\t\t});\r\n\t\t// You can also log error messages to an error reporting service here\r\n\t}\r\n\r\n\tcopyToClipboard = () => {\r\n\t\tconst text = `\r\n ${window.location.href}\r\n ${this.state.error && this.state.error.toString()}\r\n ${this.state.errorInfo.componentStack}\r\n `;\r\n\t\tclipboardCopy(text);\r\n\t};\r\n\r\n\trender() {\r\n\t\tif (this.state.errorInfo) {\r\n\t\t\t// Error path\r\n\t\t\treturn (\r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t

    Error

    \r\n\t\t\t\t\t\t\t\t\t

    Oops! Something went wrong.

    \r\n\t\t\t\t\t\t\t\t\t

    \r\n\t\t\t\t\t\t\t\t\t\tThe page cannot be rendered.\r\n\t\t\t\t\t\t\t\t\t

    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\tCopy error details with stack trace\r\n\t\t\t\t\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t\t\t\t\t this.copyToClipboard()}\r\n\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\tCopy to clipboard\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t{this.state.error && this.state.error.toString()}\r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t{this.state.errorInfo.componentStack}\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\treturn this.props.children;\r\n\t}\r\n}\r\n\r\nfunction clipboardCopy (text) {\r\n // Use the Async Clipboard API when available. Requires a secure browsing\r\n // context (i.e. HTTPS)\r\n if (navigator.clipboard) {\r\n return navigator.clipboard.writeText(text).catch(function (err) {\r\n throw (err !== undefined ? err : new DOMException('The request is not allowed', 'NotAllowedError'))\r\n })\r\n }\r\n\r\n // ...Otherwise, use document.execCommand() fallback\r\n\r\n // Put the text to copy into a \r\n var span = document.createElement('span')\r\n span.textContent = text\r\n\r\n // Preserve consecutive spaces and newlines\r\n span.style.whiteSpace = 'pre'\r\n\r\n // Add the to the page\r\n document.body.appendChild(span)\r\n\r\n // Make a selection object representing the range of text selected by the user\r\n var selection = window.getSelection()\r\n var range = window.document.createRange()\r\n selection.removeAllRanges()\r\n range.selectNode(span)\r\n selection.addRange(range)\r\n\r\n // Copy text to the clipboard\r\n var success = false\r\n try {\r\n success = window.document.execCommand('copy')\r\n } catch (err) {\r\n console.log('error', err)\r\n }\r\n\r\n // Cleanup\r\n selection.removeAllRanges()\r\n window.document.body.removeChild(span)\r\n\r\n return success\r\n ? Promise.resolve()\r\n : Promise.reject(new DOMException('The request is not allowed', 'NotAllowedError'))\r\n}\r\n\r\nexport default ErrorBoundary;\r\n","\r\nimport React, { Component } from 'react';\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Container, Row, Col, Input, Button, Table } from 'reactstrap';\r\n\r\nexport class ModalError extends Component {\r\n\trender() {\r\n const {url, errorText, payload} = this.props.error;\r\n\t\treturn (\r\n\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tError\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n {url}\r\n\r\n

    \r\n\r\n \r\n {errorText}\r\n \r\n\r\n

    \r\n {'Input JSON'}\r\n
    \r\n\t\t\t\t\t\t\t\r\n
    {payload && JSON.stringify(JSON.parse(JSON.parse(payload)), null, 2)}
    \r\n\r\n

    \r\n \r\n Disable debugging modal from: {'IISFolder//config-env.json'} setting debug: false\r\n \r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t);\r\n\t}\r\n}","export {ModalError} from './ModalError';\r\nexport {default as ErrorBoundary} from './ErrorBoundary';","import React from \"react\";\r\nimport { FormGroup, Label, Input } from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport DatePicker from \"react-datepicker\";\r\nimport \"react-datepicker/dist/react-datepicker.css\";\r\nimport Numeric from \"../components/Numeric/Numeric\";\r\nimport { parseDate } from \"./dateUtils\";\r\n\r\nexport function FormField({\r\n label,\r\n changedColor = false,\r\n value,\r\n onChange = () => {},\r\n name,\r\n disabled = false,\r\n type = \"text\",\r\n error,\r\n description,\r\n decimalScale,\r\n dataTypeDecimalName,\r\n rows,\r\n placeholder,\r\n thousandSeparator\r\n}) {\r\n if (type === \"date\") {\r\n return (\r\n \r\n );\r\n }\r\n if (type === \"number\") {\r\n let dataTypeDecimalName = \"default\";\r\n if (label) {\r\n label.toLowerCase() === \"price\" || \"currency\" || \"percentage\" || \"quantity\"\r\n ? (dataTypeDecimalName = label.toLowerCase())\r\n : null;\r\n }\r\n return (\r\n \r\n \r\n onChange(name, e)}\r\n name={name}\r\n placeholder={placeholder}\r\n decimalScale={decimalScale}\r\n dataTypeDecimalName={dataTypeDecimalName}\r\n thousandSeparator={thousandSeparator}\r\n />\r\n
    \r\n {error}\r\n
    \r\n {!error && description && (\r\n
    \r\n {description}\r\n
    \r\n )}\r\n
    \r\n );\r\n }\r\n return (\r\n \r\n \r\n {label}\r\n \r\n onChange(name, e.target.value)}\r\n rows={rows}\r\n placeholder={placeholder}\r\n />\r\n
    \r\n {error}\r\n
    \r\n {!error && description && (\r\n
    \r\n {description}\r\n
    \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nFormField.propTypes = {\r\n label: PropTypes.string.isRequired,\r\n value: PropTypes.string.isRequired,\r\n onChange: PropTypes.func,\r\n name: PropTypes.string.isRequired,\r\n error: PropTypes.string,\r\n description: PropTypes.string,\r\n disabled: PropTypes.bool,\r\n type: PropTypes.string,\r\n changedColor: PropTypes.bool,\r\n placeholder: PropTypes.string,\r\n};\r\n\r\nFormField.defaultProps = {\r\n disabled: false,\r\n onChange: () => {},\r\n type: \"text\",\r\n error: undefined,\r\n description: undefined,\r\n changedColor: false,\r\n placeholder: \"\",\r\n};\r\n\r\nexport function DateField({\r\n label,\r\n changedColor = false,\r\n value,\r\n onChange = () => {},\r\n name,\r\n disabled = false,\r\n error,\r\n description,\r\n}) {\r\n let showDate = value && value !== \"0000-00-00\" ? new Date(value) : undefined;\r\n\r\n // prevent ui crash\r\n if (!(showDate instanceof Date) || isNaN(showDate)) {\r\n showDate = new Date();\r\n }\r\n\r\n return (\r\n \r\n {label && (\r\n \r\n {label}\r\n \r\n )}\r\n onChange(name, parseDate(date))}\r\n disabled={disabled}\r\n style={{ zIndex: 9999 }}\r\n dateFormat=\"dd/MM/yyyy\"\r\n customInput={}\r\n />\r\n
    \r\n {error}\r\n
    \r\n {!error && description && (\r\n
    \r\n {description}\r\n
    \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nDateField.propTypes = {\r\n label: PropTypes.any.isRequired,\r\n changedColor: PropTypes.bool,\r\n value: PropTypes.string.isRequired,\r\n onChange: PropTypes.func,\r\n name: PropTypes.string.isRequired,\r\n error: PropTypes.string,\r\n description: PropTypes.string,\r\n disabled: PropTypes.bool,\r\n};\r\n\r\nDateField.defaultProps = {\r\n disabled: false,\r\n changedColor: false,\r\n onChange: () => {},\r\n error: undefined,\r\n description: undefined,\r\n};\r\n\r\nexport function SelectFormField({\r\n label,\r\n changedColor = false,\r\n value,\r\n name,\r\n disabled = false,\r\n onChange = () => {},\r\n selectItems,\r\n getSelectItemId,\r\n getSelectItemName,\r\n error,\r\n description,\r\n}) {\r\n const getValueFromId = (id) => {\r\n for (let i = 0; i < selectItems.length; i += 1) {\r\n if (String(getSelectItemId(selectItems[i])) === String(id)) {\r\n return getSelectItemName(selectItems[i]);\r\n }\r\n }\r\n return \"\";\r\n };\r\n\r\n return (\r\n \r\n \r\n {label}\r\n \r\n onChange(name, e.target.value, getValueFromId(e.target.value))}\r\n >\r\n {value == \"\" || value == undefined || value == 0 ? : null}\r\n {selectItems.map((s) => (\r\n \r\n ))}\r\n \r\n
    \r\n {error}\r\n
    \r\n {!error && description && (\r\n
    \r\n {description}\r\n
    \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nSelectFormField.propTypes = {\r\n label: PropTypes.string.isRequired,\r\n changedColor: PropTypes.bool,\r\n value: PropTypes.string.isRequired,\r\n onChange: PropTypes.func,\r\n name: PropTypes.string.isRequired,\r\n error: PropTypes.string,\r\n description: PropTypes.string,\r\n disabled: PropTypes.bool,\r\n selectItems: PropTypes.array.isRequired,\r\n getSelectItemId: PropTypes.func.isRequired,\r\n getSelectItemName: PropTypes.func.isRequired,\r\n};\r\n\r\nSelectFormField.defaultProps = {\r\n onChange: () => {},\r\n changedColor: false,\r\n disabled: false,\r\n error: undefined,\r\n description: undefined,\r\n};\r\n\r\nexport function CheckFormField({\r\n label,\r\n changedColor,\r\n initialValue,\r\n value,\r\n name,\r\n disabled = false,\r\n onChange = () => {},\r\n error,\r\n description,\r\n}) {\r\n return (\r\n \r\n \r\n {label}\r\n onChange(name, e.target.checked === \"true\" || e.target.checked === true)}\r\n />\r\n \r\n
    \r\n {error}\r\n
    \r\n {!error && description && (\r\n
    \r\n {description}\r\n
    \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nCheckFormField.propTypes = {\r\n label: PropTypes.string.isRequired,\r\n initialValue: PropTypes.bool.isRequired,\r\n changedColor: PropTypes.bool,\r\n value: PropTypes.bool.isRequired,\r\n name: PropTypes.string.isRequired,\r\n error: PropTypes.string,\r\n description: PropTypes.string,\r\n disabled: PropTypes.bool,\r\n onChange: PropTypes.func,\r\n};\r\n\r\nCheckFormField.defaultProps = {\r\n disabled: false,\r\n changedColor: false,\r\n onChange: () => {},\r\n error: undefined,\r\n description: undefined,\r\n};\r\n\r\nexport function CustomFormInput({ label, changedColor = false, children, error, description }) {\r\n return (\r\n \r\n \r\n {label}\r\n \r\n {children}\r\n
    \r\n {error}\r\n
    \r\n {!error && description && (\r\n
    \r\n {description}\r\n
    \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nCustomFormInput.propTypes = {\r\n label: PropTypes.string.isRequired,\r\n changedColor: PropTypes.bool,\r\n children: PropTypes.node.isRequired,\r\n error: PropTypes.string,\r\n description: PropTypes.string,\r\n};\r\n\r\nCustomFormInput.defaultProps = {\r\n error: undefined,\r\n changedColor: false,\r\n description: undefined,\r\n};\r\n\r\nexport function MonthDateField({\r\n label,\r\n changedColor = false,\r\n value,\r\n onChange = () => {},\r\n name,\r\n disabled = false,\r\n error,\r\n description,\r\n minDate = undefined,\r\n}) {\r\n const showDate = value && value !== \"0000-00-00\" ? new Date(value) : undefined;\r\n return (\r\n \r\n \r\n {label}\r\n \r\n onChange(name, date.toISOString())}\r\n disabled={disabled}\r\n minDate={minDate}\r\n dateFormat=\"MM/yyyy\"\r\n showMonthYearPicker\r\n customInput={}\r\n />\r\n
    \r\n {error}\r\n
    \r\n {!error && description && (\r\n
    \r\n {description}\r\n
    \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nMonthDateField.propTypes = {\r\n label: PropTypes.any.isRequired,\r\n changedColor: PropTypes.bool,\r\n value: PropTypes.string.isRequired,\r\n onChange: PropTypes.func,\r\n name: PropTypes.string.isRequired,\r\n error: PropTypes.string,\r\n description: PropTypes.string,\r\n disabled: PropTypes.bool,\r\n minDate: PropTypes.object,\r\n};\r\n\r\nMonthDateField.defaultProps = {\r\n disabled: false,\r\n changedColor: false,\r\n onChange: () => {},\r\n error: undefined,\r\n description: undefined,\r\n minDate: undefined,\r\n};\r\n\r\nexport function DateFieldStyle({\r\n label,\r\n changedColor = false,\r\n value,\r\n onChange = () => {},\r\n name,\r\n disabled = false,\r\n error,\r\n description,\r\n}) {\r\n const showDate = value && value !== \"0000-00-00\" ? new Date(value) : undefined;\r\n return (\r\n onChange(name, date.toISOString())}\r\n disabled={disabled}\r\n dateFormat=\"dd/MM/yyyy\"\r\n customInput={}\r\n />\r\n );\r\n}\r\n\r\nDateFieldStyle.propTypes = {\r\n label: PropTypes.any.isRequired,\r\n changedColor: PropTypes.bool,\r\n value: PropTypes.string.isRequired,\r\n onChange: PropTypes.func,\r\n name: PropTypes.string.isRequired,\r\n error: PropTypes.string,\r\n description: PropTypes.string,\r\n disabled: PropTypes.bool,\r\n};\r\n\r\nDateFieldStyle.defaultProps = {\r\n disabled: false,\r\n changedColor: false,\r\n onChange: () => {},\r\n error: undefined,\r\n description: undefined,\r\n};\r\n\r\n","import React from \"react\";\r\n\r\nconst currency =\r\n typeof window !== \"undefined\" && window.___APP_CONFIG___\r\n ? window.___APP_CONFIG___.DATA_TYPE_DECIMALS.CURRENCY\r\n : \"\";\r\n\r\nconst price =\r\n typeof window !== \"undefined\" && window.___APP_CONFIG___\r\n ? window.___APP_CONFIG___.DATA_TYPE_DECIMALS.PRICE\r\n : \"\";\r\n\r\nconst quantity =\r\n typeof window !== \"undefined\" && window.___APP_CONFIG___\r\n ? window.___APP_CONFIG___.DATA_TYPE_DECIMALS.QUANTITY\r\n : \"\";\r\n\r\nconst percentage =\r\n typeof window !== \"undefined\" && window.___APP_CONFIG___\r\n ? window.___APP_CONFIG___.DATA_TYPE_DECIMALS.PERCENTAGE\r\n : \"\";\r\n\r\nconst defaultValue =\r\n typeof window !== \"undefined\" && window.___APP_CONFIG___\r\n ? window.___APP_CONFIG___.DATA_TYPE_DECIMALS.DEFAULT\r\n : \"\";\r\n\r\nconst decimalAmount = {\r\n quantity: quantity,\r\n price: price,\r\n currency: currency,\r\n percentage: percentage,\r\n default: defaultValue,\r\n};\r\n\r\nexport function FormatNumber({ value, dataTypeDecimalName, decimalScale = null }) {\r\n dataTypeDecimalName = dataTypeDecimalName.toString().toLowerCase();\r\n\r\n return Number(parseFloat(value).toFixed(2)).toLocaleString(\r\n \"en\",\r\n { minimumFractionDigits: decimalScale ? decimalScale : decimalAmount[dataTypeDecimalName] },\r\n { maximumFractionDigits: decimalScale ? decimalScale : decimalAmount[dataTypeDecimalName] }\r\n );\r\n}\r\n\r\nexport function truncateNumber(num, fixed) {\r\n var re = new RegExp(\"^-?\\\\d+(?:.\\\\d{0,\" + (fixed || -1) + \"})?\");\r\n return num.toString().match(re)[0];\r\n}\r\n","import { toast } from \"react-toastify\";\r\nexport const SoundType = {\r\n QUOTE: 1,\r\n ORDER: 2,\r\n};\r\n\r\nexport const UserType = {\r\n Advisor: \"Advisor\",\r\n Trader: \"Trader\",\r\n MiddleOffice: \"MiddleOffice\",\r\n BackOffice: \"BackOffice\",\r\n FundManager: \"FundManager\",\r\n Accounting: \"Accounting\",\r\n};\r\n\r\nexport const playSound = (type, soundPath = \"sounds/\") => {\r\n let _soundPath = soundPath;\r\n\r\n switch (type) {\r\n case SoundType.QUOTE:\r\n _soundPath += \"sound_quote.mp3\";\r\n break;\r\n\r\n case SoundType.ORDER:\r\n _soundPath += \"sound_order.mp3\";\r\n break;\r\n }\r\n\r\n const audio = new Audio(_soundPath);\r\n\r\n audio.play();\r\n\r\n // delete audio;\r\n};\r\n\r\nexport const scale = ({ domain, range }) => {\r\n const istart = domain[0];\r\n const istop = domain[1];\r\n const ostart = range[0];\r\n const ostop = range[1];\r\n\r\n return (value) => ostart + (ostop - ostart) * ((value - istart) / (istop - istart));\r\n};\r\n\r\nlet serverTimezoneOffset = null;\r\n\r\nfunction setAndGetServerTimezoneOffset() {\r\n const context = JSON.parse(localStorage.getItem(\"context\"));\r\n\r\n if (context && context.timezoneOffset) {\r\n serverTimezoneOffset = context.timezoneOffset;\r\n } else {\r\n serverTimezoneOffset = 0;\r\n }\r\n\r\n return serverTimezoneOffset;\r\n}\r\n\r\nexport const localDateTime = (dateTime) => {\r\n if (!dateTime || typeof dateTime !== \"string\" || dateTime.substring(0, 10) == \"0000-00-00\") {\r\n return dateTime;\r\n }\r\n\r\n const _timeZoneOffset =\r\n serverTimezoneOffset != null ? serverTimezoneOffset : setAndGetServerTimezoneOffset();\r\n\r\n // valid inputs\r\n // \t 2018-06-14T19:35:3\r\n // 19:35:3\r\n\r\n // Server time come as 2018-06-14T19:35:3 with offset in minutes = timeZoneOffset\r\n const date = new Date(`${dateTime}Z`);\r\n\r\n return new Date(date.getTime() + _timeZoneOffset * 60 * 1000);\r\n};\r\n\r\nexport const showDateTime = (dateTime) => {\r\n if (!dateTime || typeof dateTime !== \"string\" || dateTime.substring(0, 10) === \"0000-00-00\") {\r\n return dateTime;\r\n }\r\n\r\n // this receives a date string without offset and returns time string\r\n // to show full date time use:\r\n // \r\n // {showDateTime(dateTime)} // not {\r\n if (!dateTime || dateTime.substring(0, 10) == \"0000-00-00\") return dateTime;\r\n\r\n const _timeZoneOffset =\r\n serverTimezoneOffset != null ? serverTimezoneOffset : setAndGetServerTimezoneOffset();\r\n\r\n // valid inputs\r\n // \t 2018-06-14T19:35:3\r\n // 19:35:3\r\n\r\n // Server time come as 2018-06-14T19:35:3 with offset in minutes = timeZoneOffset\r\n const date = new Date(dateTime);\r\n\r\n return new Date(date.getTime() + _timeZoneOffset * 60 * 1000);\r\n};\r\n\r\nexport function toDateLocal(date) {\r\n const ten = function (i) {\r\n return (i < 10 ? \"0\" : \"\") + i;\r\n };\r\n const YYYY = date.getFullYear();\r\n const MM = ten(date.getMonth() + 1);\r\n const DD = ten(date.getDate());\r\n return `${YYYY}-${MM}-${DD}`;\r\n}\r\n\r\nexport function debounce(fn, delay) {\r\n let timer = null;\r\n return function () {\r\n const context = this;\r\n const args = arguments;\r\n clearTimeout(timer);\r\n timer = setTimeout(() => {\r\n fn.apply(context, args);\r\n }, delay);\r\n };\r\n}\r\n\r\n/**\r\n * Performs a deep merge of `source` into `target`.\r\n * Mutates `target` only but not its objects and arrays.\r\n *\r\n * @author inspired by [jhildenbiddle](https://stackoverflow.com/a/48218209).\r\n */\r\nexport function mergeDeep(target, source) {\r\n const isObject = (obj) => obj && typeof obj === \"object\";\r\n\r\n if (!isObject(target) || !isObject(source)) {\r\n return source;\r\n }\r\n\r\n Object.keys(source).forEach((key) => {\r\n const targetValue = target[key];\r\n const sourceValue = source[key];\r\n\r\n if (Array.isArray(targetValue) && Array.isArray(sourceValue)) {\r\n target[key] = sourceValue;\r\n } else if (isObject(targetValue) && isObject(sourceValue)) {\r\n target[key] = mergeDeep({ ...targetValue }, sourceValue);\r\n } else {\r\n target[key] = sourceValue;\r\n }\r\n });\r\n\r\n return target;\r\n}\r\n\r\n/**\r\n * Intercept fetchs and fire pre and post events\r\n *\r\n * events = {\r\n * \trequest?(url: string, config: any): Promise | any[];\r\n * requestError?(error: any): Promise;\r\n * response?(response: Response): Response;\r\n * responseError?(error: any): Promise;\r\n * }\r\n *\r\n * @author https://github.com/werk85/fetch-intercept.\r\n */\r\nconst interceptors = [];\r\n\r\nfunction interceptor(fetch, ...args) {\r\n const reversedInterceptors = interceptors.reduce((array, interceptor) => [interceptor].concat(array), []);\r\n let promise = Promise.resolve(args);\r\n\r\n // Register request interceptors\r\n reversedInterceptors.forEach(({ request, requestError }) => {\r\n if (request || requestError) {\r\n promise = promise.then((args) => request(...args), requestError);\r\n }\r\n });\r\n\r\n // Register fetch call\r\n promise = promise.then((args) => fetch(...args));\r\n\r\n // Register response interceptors, add request object to response\r\n reversedInterceptors.forEach(({ response, responseError }) => {\r\n if (response || responseError) {\r\n promise = promise.then((res) => response(res, args), responseError);\r\n }\r\n });\r\n\r\n return promise;\r\n}\r\n\r\nexport function fetchIntercept(events) {\r\n if (!window.fetch.hasOwnProperty(\"__attached__\")) {\r\n const nativeFetch = window.fetch;\r\n window.fetch = (...args) => interceptor(nativeFetch, ...args);\r\n window.fetch.__attached__ = true;\r\n }\r\n\r\n interceptors.push(events);\r\n\r\n return () => {\r\n const index = interceptors.indexOf(events);\r\n if (index >= 0) {\r\n interceptors.splice(index, 1);\r\n }\r\n };\r\n}\r\n\r\nexport const handleFileInput = (input) =>\r\n new Promise((resolve, reject) => {\r\n const { file } = input;\r\n const preName = file.name || \"attachment.txt\";\r\n const name = preName.substring(0, preName.lastIndexOf(\".\"));\r\n const extension = preName.substring(preName.lastIndexOf(\".\") + 1, preName.length);\r\n const reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n reader.onload = () => {\r\n const items = reader.result.split(\",\");\r\n resolve({ blob: items[1], name, extension });\r\n };\r\n reader.onerror = (error) => {\r\n reject(error);\r\n };\r\n });\r\n\r\nexport function valueIsEmpty(value) {\r\n return value === undefined || value === null || value === \"\";\r\n}\r\n\r\nexport function dateIsEmpty(value) {\r\n return new Date(value) == \"Invalid Date\" || isNaN(new Date(value));\r\n}\r\n\r\nexport const processes = {\r\n ORDER: \"Order\",\r\n OFFER: \"Offer\",\r\n TRADE: \"Trade\",\r\n BULK_ORDER: \"BulkOrder\",\r\n BASKET_ORDER: \"BasketOrder\",\r\n WITHDRAW: \"Withdraw\",\r\n BULK_WITHDRAW: \"BulkWithdraw\",\r\n DEPOSIT: \"Deposit\",\r\n BULK_DEPOSIT: \"BulkDeposit\",\r\n TRANSFER: \"Transfer\",\r\n TRANSACTION: \"Transaction\",\r\n CORP_EVENT: \"CorpEvent\",\r\n CASH_ACTIVITY: \"CashActivity\",\r\n PRODUCT_ACTIVITY: \"ProductActivity\",\r\n JOURNAL_ENTRY: \"JournalEntry\",\r\n INVOICE: \"Invoice\",\r\n SETTLEMENT_INSTRUCTION: \"SettleInst\",\r\n SHORT_COVER: \"ShortCover\",\r\n EARNING_RECOVERY: \"EarningRecovery\",\r\n PROVISIONS_PAYMENT: \"ProvisionsPayment\",\r\n WITHDRAW_ACCOUNT: \"WithdrawAccount\",\r\n DEPOSIT_ACCOUNT: \"DepositAccount\",\r\n RECURRINGCOMMISSIONS: \"RecurringCommissions\",\r\n RECCOMMISSIONACCOUNT: \"RecCommissionAccount\",\r\n CUSTOM_EVENT: \"CustomEvent\",\r\n CUSTODY_LOCK: \"CustodyLock\",\r\n SUPPLIER_INVOICE: \"SupplierInvoice\",\r\n INVOICE_PAYMENT: \"InvoicePayment\",\r\n AMORTIZATION: \"Amortization\",\r\n DERIVATIVE_MATURITY: \"DerivativeMaturity\",\r\n INVOICE_REQUEST: \"InvoiceRequest\",\r\n};\r\n\r\ntoast.configure({\r\n newestOnTop: true,\r\n position: \"top-right\",\r\n autoClose: 5000,\r\n hideProgressBar: true,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n});\r\n\r\nexport const showToast = (text, err = false, warn = false) => {\r\n if (err) {\r\n return toast.error(text);\r\n }\r\n if (warn) {\r\n return toast.warning(text);\r\n }\r\n return toast.info(text);\r\n};\r\n\r\nexport const PersonMode = {\r\n New: \"New\",\r\n Edit: \"Edit\",\r\n};\r\n\r\nexport const AccountMode = {\r\n New: \"New\",\r\n Edit: \"Edit\",\r\n};\r\n\r\nexport const societyTypes = [\r\n { id: \"NGO\", name: \"ONG\" },\r\n { id: \"Commercial\", name: \"Comercial\" },\r\n { id: \"Investment\", name: \"Vehiculo de Inversion\" },\r\n];\r\n\r\nexport const PersonQualification = [\r\n { id: \"Qualified\", name: \"Qualified\" },\r\n { id: \"Unqualified\", name: \"Unqualified\" },\r\n];\r\n\r\nexport const AccountFoundsOrigin = [\r\n { id: \"Own\", name: \"Own\" },\r\n { id: \"ThirdParties\", name: \"Third Parties\" },\r\n { id: \"Other\", name: \"Other\" },\r\n];\r\n\r\nexport const AccountPurpose = [\r\n { id: \"Rent\", name: \"Rent\" },\r\n { id: \"CapitalGrowth\", name: \"Capital Growth\" },\r\n { id: \"CapitalPreservation\", name: \"Capital Preservation\" },\r\n { id: \"Speculation\", name: \"Speculation\" },\r\n { id: \"Other\", name: \"Other\" },\r\n { id: \"\", name: \"\" },\r\n];\r\n\r\nexport const CustodianEntityStatus = [\r\n { id: \"Active\", name: \"Active\" },\r\n { id: \"Inactive\", name: \"Inactive\" },\r\n];\r\n\r\nexport const CounterPartyStatus = [\r\n { id: \"Active\", name: \"Active\" },\r\n { id: \"Inactive\", name: \"Inactive\" },\r\n { id: \"InProcess\", name: \"InProcess\" },\r\n];\r\n\r\nexport const AccountBookInfo = {\r\n LOCAL_BOOKING: \"LocalBooking\",\r\n THIRD_PARTY_BOOKING: \"ThirdPartyBooking\",\r\n BOTH: \"Both\",\r\n};\r\n\r\nexport const BookTypes = {\r\n SELF: \"Self\",\r\n PERSHING: \"Pershing\",\r\n IB: \"IB\",\r\n FC_STONE: \"FCStone\",\r\n ALL: \"All\",\r\n};\r\n\r\nexport const LegalAddresses = {\r\n Personal: \"Personal\",\r\n Work: \"Work\",\r\n \"\": \"\",\r\n};\r\n\r\nexport const getDefaultBookType = (AccountBooktypes) => {\r\n if (!AccountBooktypes || AccountBooktypes.some((i) => i == BookTypes.SELF)) return BookTypes.SELF;\r\n\r\n return AccountBooktypes[0];\r\n};\r\n\r\nexport const Commissions = {\r\n DETAILED: { value: \"detailed\", description: \"Detailed\" },\r\n CONDENSED: { value: \"condensed\", description: \"Condensed\" },\r\n};\r\n\r\nexport const emailStatus = {\r\n 1: \"Scheduled\",\r\n 2: \"Processing\",\r\n 3: \"Sent\",\r\n 4: \"With Errors\",\r\n 5: \"Canceled\",\r\n};\r\n\r\nexport const getColorSchReportStatus = (status) => {\r\n if (status == 1) return \"color1\";\r\n if (status == 2) return \"color2\";\r\n if (status == 3) return \"color4\";\r\n if (status == 4) return \"color3\";\r\n if (status == 5) return \"color5\";\r\n};\r\n\r\nexport const parseScheduleReportXML = (s) => {\r\n var parser = new DOMParser();\r\n var xmlDoc = parser.parseFromString(s.Body, \"text/xml\");\r\n return {\r\n OTCFechaConcertacion: xmlDoc.getElementsByTagName(\"OTCFechaConcertacion\")[0].childNodes[0].nodeValue,\r\n OTCOperacionNumero: xmlDoc.getElementsByTagName(\"OTCOperacionNumero\")[0].childNodes[0].nodeValue,\r\n OTCTipoOperacion: xmlDoc.getElementsByTagName(\"OTCTipoOperacion\")[0].childNodes[0].nodeValue,\r\n OTCCompradorCodigo: xmlDoc.getElementsByTagName(\"OTCCompradorCodigo\")[0].childNodes[0].nodeValue,\r\n OTCVendedorCodigo: xmlDoc.getElementsByTagName(\"OTCVendedorCodigo\")[0].childNodes[0].nodeValue,\r\n OTCISIN: xmlDoc.getElementsByTagName(\"OTCISIN\")[0].childNodes[0].nodeValue,\r\n OTCPrecioCC: xmlDoc.getElementsByTagName(\"OTCPrecioCC\")[0].childNodes[0].nodeValue,\r\n OTCPrecioSC: xmlDoc.getElementsByTagName(\"OTCPrecioSC\")[0].childNodes[0].nodeValue,\r\n OTCTasa: xmlDoc.getElementsByTagName(\"OTCTasa\")[0].childNodes[0].nodeValue,\r\n OTCValorNominal: xmlDoc.getElementsByTagName(\"OTCValorNominal\")[0].childNodes[0].nodeValue,\r\n OTCEfectivo: xmlDoc.getElementsByTagName(\"OTCEfectivo\")[0].childNodes[0].nodeValue,\r\n OTCEfectivoUSD: xmlDoc.getElementsByTagName(\"OTCEfectivoUSD\")[0].childNodes[0].nodeValue,\r\n OTCFechaLiquidacion: xmlDoc.getElementsByTagName(\"OTCFechaLiquidacion\")[0].childNodes[0].nodeValue,\r\n OTCLiquidaBVM: xmlDoc.getElementsByTagName(\"OTCLiquidaBVM\")[0].childNodes[0].nodeValue,\r\n OTCMonedaBCU: xmlDoc.getElementsByTagName(\"OTCMonedaBCU\")[0].childNodes[0].nodeValue,\r\n };\r\n};\r\n","import React from \"react\";\r\n\r\nexport const NoPermissionWindow = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n
    \r\n \r\n You don´t have permissions to access this feature\r\n
    \r\n );\r\n};\r\n","import { localDateTime } from \"../Helper\";\r\n\r\nexport const Type = {\r\n\tDefault: 'Parent',\r\n\tBulk: 'Bulk',\r\n\tBasket: 'Basket',\r\n\tChained: 'Chained',\r\n\tCross: 'Cross',\r\n\tJoint: 'Joint'\r\n}\r\n\r\nexport const ProductType = {\r\n\tBOND: 'Bonds',\r\n\tEQUITY: 'Equity',\r\n\tOPTION: 'Options',\r\n\tMFUNDS: 'Mutual Funds',\r\n\tMMARKET: 'Money Market',\r\n\tFOREX: 'Forex',\r\n\tREPO: 'Repo',\r\n\tFUTURE: 'Future',\r\n}\r\n\r\nexport const ProductTypeFunds = {\r\n\tMFUNDS: 'Mutual Funds',\r\n}\r\n\r\nexport const OrderPriceType = {\r\n\tMARKET: 'Market',\r\n\tLIMIT: 'Limit',\r\n\tSTOP: 'Stop',\r\n\tSTOPLIMIT: 'StopLimit',\r\n\tMARKETONOPEN: 'MarketOnOpen',\r\n\tMARKETONCLOSE: 'MarketOnClose'\r\n}\r\n\r\nexport const TimeFrame = {\r\n\tDAY: 'DAY',\r\n\tGTC: 'GTC',\r\n\tGTD: 'GTD',\r\n\tOPG: 'OPG'\r\n}\r\n\r\nexport const TimeFrameIsSelectable = (tf) => (tf != 'OPG')\r\n\r\nexport const AccountType = {\r\n\tCASH: 1,\r\n\tMARGIN: 2\r\n}\r\n\r\nexport const OrderStatus = {\r\n\tROUTED: 'PendingNew',\r\n FILLED: 'Filled',\r\n CANCEL_PENDING: 'PendingCancel',\r\n ANNULLED: 'Stopped',\r\n CANCELED: 'Canceled',\r\n PART: 'Partial',\r\n PART_FILLED: 'PartiallyFilled',\r\n\tREJECTED: 'Rejected',\r\n\tEXPIRED: 'Expired',\r\n AMENDING: 'PendingReplace',\r\n ACKED: 'New',\r\n PARKED: 'Parked',\r\n AUTH_WAIT: 'WaitingAuthorization',\r\n CROSSING: 'Crossing',\r\n REALLOCATING: 'Reallocating'\r\n}\r\n\r\nexport const OrderDayStatus = {\r\n\tNEW: 'New',\r\n\tASSIGNED: 'Assigned',\r\n\tLOCKED: 'Locked',\r\n\tBOOKED: 'Booked',\r\n\tROLLEDBACK: 'RolledBack',\r\n}\r\n\r\nexport const OrderAction = {\r\n ACK: 'Ack',\r\n REJECT: 'Reject',\r\n ACCEPT_CANCEL_REPLACE: 'AcceptCancelReplace',\r\n REJECT_CANCEL_REPLACE: 'RejectCancelReplace',\r\n CANCEL: 'Cancel',\r\n MOVE_TO_WORKING: 'MoveToWorking',\r\n MOVE_TO_COMPLETED: 'MoveToCompleted',\r\n\tMOVE_TO_TODO: 'MoveToTodo',\r\n\tLOCK: 'Lock',\r\n}\r\n\r\nexport const SettleInstAction = {\r\n MATCH: 'Match',\r\n SPLIT: 'Split',\r\n\tUNMATCH: 'Unmatch',\r\n\tEDIT: 'Edit',\r\n\tSEND_EMAIL: 'SendEmail',\r\n}\r\n\r\nexport const TradeAction = {\r\n CONFIRM: 'Confirm',\r\n\tREJECT: 'Reject',\r\n\tCANCEL: 'Cancel'\r\n}\r\n\r\nexport const TradeStatus = {\r\n\tNEW: 'New',\r\n CONFIRMATION_SENT: 'ConfirmationSent',\r\n MATCHED: 'Matched',\r\n UNMATCHED: 'Unmatched',\r\n BOOKED: 'Booked',\r\n CANCELED: 'Canceled',\r\n}\r\n\r\nexport const MarketType = {\r\n OTC: \"OTC\",\r\n EXCHANGE: \"Exchange\",\r\n};\r\n\r\nexport const SettlementInstructionStatus = {\r\n\tNEW: 'New',\r\n UNMATCHED: 'Unmatched',\r\n MATCHED: 'Matched',\r\n\tBOOKED: 'Booked',\r\n\tSETTLEMENT_FAILURE: 'SettlementFailure',\r\n\tSETTLEMENT_COMPLETION: 'SettlementCompletion',\r\n CANCELED: 'Canceled',\r\n}\r\n\r\nexport const SettlementInstructionAccount = {\r\n IN_BALANCE: 'In Balance',\r\n CUSTOMER: 'Customer',\r\n\tTRADING: 'Trading',\r\n}\r\n\r\nexport const Mode = {\r\n\tEDIT: 2,\r\n\tREADONLY: 3,\r\n\tQUOTE: 4,\r\n\tPRECHECK: 5,\r\n\tCONFIRM: 6,\r\n\tEDIT_COMMISSION: 7,\r\n\tEXECUTE: 8,\r\n\tREALLOCATE: 9\r\n}\r\n\r\nexport const ProcessingMode = {\r\n\tDefault: 'Default',\r\n\tAutomated: 'Automated',\r\n\tHighTouch: 'HighTouch',\r\n};\r\n\r\nexport const CommissionType = {\r\n\tFaceValueCash: 'FaceValueCash',\r\n\tPrincipalPercentage: 'PrincipalPercentage'\r\n}\r\n\r\nexport const getProductTypeName = (productType) => {\r\n\tswitch (productType) {\r\n\t\tcase ProductType.BOND:\r\n\t\t\treturn 'Bond';\r\n\t\tcase ProductType.EQUITY:\r\n\t\t\treturn 'Equity';\r\n\t\tcase ProductType.OPTION:\r\n\t\t\treturn 'Option';\r\n\t\tcase ProductType.MFUNDS:\r\n\t\t\treturn 'M-Funds';\r\n\t\tcase ProductType.FOREX:\r\n\t\t\treturn 'FX';\t\r\n\t\tcase ProductType.MMARKET:\r\n\t\t\treturn 'M-Market';\t\r\n\t\tcase ProductType.REPO:\r\n\t\t\treturn 'Repo';\t\r\n\t\tcase ProductType.FUTURE:\r\n\t\t\treturn 'Future';\t\r\n\t}\r\n}\r\n\r\nexport const getOrderTypeName = (orderType) => {\r\n\tswitch (orderType) {\r\n\t\tcase OrderPriceType.MARKET:\r\n\t\t\treturn 'Market';\r\n\t\tcase OrderPriceType.MARKETONOPEN:\r\n\t\t\treturn 'Market Open';\r\n\t\tcase OrderPriceType.MARKETONCLOSE:\r\n\t\t\treturn 'Market Close'\r\n\t\tcase OrderPriceType.LIMIT:\r\n\t\t\treturn 'Limit';\r\n\t\tcase OrderPriceType.STOP:\r\n\t\t\treturn 'Stop';\t\r\n\t\tcase OrderPriceType.STOPLIMIT:\r\n\t\t\treturn 'Stop-Limit';\t\r\n\t}\r\n}\r\n\r\nexport const getTimeFrameName = (timeFrame) => {\r\n\tswitch (timeFrame) {\r\n\t\tcase TimeFrame.DAY:\r\n\t\t\treturn 'DAY';\r\n\t\tcase TimeFrame.GTC:\r\n\t\t\treturn 'GTC';\r\n\t\tcase TimeFrame.GTD:\r\n\t\t\treturn 'GTD';\r\n\t\tcase TimeFrame.OPG:\r\n\t\t\treturn 'OPG';\r\n\t}\r\n}\r\n\r\nexport const getAccountTypeName = (accountType) => {\r\n\tswitch (accountType) {\r\n\t\tcase AccountType.CASH:\r\n\t\t\treturn 'Cash';\r\n\t\tcase AccountType.MARGIN:\r\n\t\t\treturn 'Margin';\r\n\t}\r\n}\r\n\r\nexport const getStatusName = (status) => {\r\n\tswitch (status) {\r\n\t\tcase OrderStatus.AMENDING:\r\n\t\t\treturn 'AMENDING';\r\n\t\tcase OrderStatus.CANCEL_PENDING:\r\n\t\t\treturn 'CLX PEND';\r\n\t\tcase OrderStatus.ROUTED:\r\n\t\t\treturn 'ROUTED';\r\n\t\tcase OrderStatus.ACKED:\r\n\t\t\treturn 'ACKED';\r\n\t\tcase OrderStatus.PART:\r\n\t\t\treturn 'PART';\r\n\t\tcase OrderStatus.FILLED:\r\n\t\t\treturn 'FILLED';\r\n\t\tcase OrderStatus.REJECTED:\r\n\t\t\treturn 'REJECTED';\r\n\t\tcase OrderStatus.EXPIRED:\r\n\t\t\treturn 'EXPIRED';\r\n\t\tcase OrderStatus.ANNULLED:\r\n\t\tcase OrderStatus.CANCELED:\r\n\t\t\treturn \"CANCELED\";\r\n\t\tcase OrderStatus.PART_FILLED:\r\n\t\t\treturn \"P-FILLED\";\r\n\t\tcase OrderStatus.PARKED:\r\n\t\t\treturn \"PARKED\";\t\r\n\t\tcase OrderStatus.AUTH_WAIT:\r\n\t\t\treturn \"AUTH. WAIT\";\r\n\t\tcase OrderStatus.CROSSING:\r\n\t\t\treturn \"CROSSING\";\r\n\t\tcase OrderStatus.REALLOCATING:\r\n\t\t\treturn \"REALLOCATING\";\r\n\t\tdefault:\r\n\t\t\treturn 'NOT DEFINED';\r\n\t}\r\n}\r\n\r\nexport const getTradeStatusName = (status) => {\r\n\tswitch (status) {\r\n\t\tcase TradeStatus.NEW:\r\n\t\t\treturn 'NEW';\r\n\t\tcase TradeStatus.CONFIRMATION_SENT:\r\n\t\t\treturn 'CONFIRM SENT';\r\n\t\tcase TradeStatus.MATCHED:\r\n\t\t\treturn 'MATCHED';\r\n\t\tcase TradeStatus.UNMATCHED:\r\n\t\t\treturn 'UNMATCHED';\r\n\t\tcase TradeStatus.BOOKED:\r\n\t\t\treturn 'BOOKED';\r\n\t\tcase TradeStatus.CANCELED:\r\n\t\t\treturn 'CANCELED';\r\n\t\tdefault:\r\n\t\t\treturn 'NOT DEFINED';\r\n\t}\r\n}\r\n\r\nexport const getCommissionItems = (productType) => {\r\n\tswitch (productType) {\r\n\t\tcase ProductType.BOND: \r\n\t\tcase ProductType.EQUITY: \r\n\t\tcase ProductType.OPTION: \r\n\t\tcase ProductType.FOREX: \r\n\t\tcase ProductType.MMARKET: \r\n\t\tcase ProductType.REPO: \r\n\t\tcase ProductType.FUTURE: \r\n\t\tcase ProductType.MFUNDS: \r\n\t\t\treturn [\r\n\t\t\t\t{id: 'FaceValueCash', description: '$ Cash'},\r\n\t\t\t\t{id: 'PrincipalPercentage', description: '% Principal'}\r\n\t\t\t]\r\n\t}\t\r\n}\r\n\r\nexport const getOrderStats = (order) => {\r\n\tlet qtyPending = order.OrderQuantity;\r\n\tlet executedQuantity = 0;\r\n\tlet sum = 0;\r\n\r\n\tconst isCash = order.OrderQuantityIsCash;\r\n\tconst decimalPlaces = order.SubAssetClassDecimalPlaces;\r\n \tconst parValue = parseFloat(order.AssetParValue) || 1.0;\r\n\r\n\torder.Childs && order.Childs.forEach((child) => {\r\n\t\tchild.Executions && child.Executions.forEach((e) => {\r\n\t\t\te.ExecutionDate = localDateTime(e.ExecutionDate);\r\n\t\t\tif (isCash) {\r\n qtyPending -=\r\n parseFloat(e.ExecutionQuantity) *\r\n parseFloat(e.ExecutionPrice) *\r\n parValue;\r\n } else {\r\n qtyPending -= parseFloat(e.ExecutionQuantity);\r\n }\r\n\t\t\texecutedQuantity += parseFloat(e.ExecutionQuantity);\r\n\t\t\t\r\n\t\t\tsum += parseFloat(e.ExecutionQuantity) * parseFloat(e.ExecutionPrice);\r\n\t\t})\r\n\t})\r\n\r\n\tif (order.AssetClassForm === 'Repo') {\r\n\t\treturn {\r\n\t\t\tpending: order.OrderStatus === 'Filled' ? 0: 1,\r\n\t\t\tavg: 1\r\n\t\t}\r\n\t}\r\n\r\n\treturn {\r\n\t\tpending: order.AssetClassForm === 'Forex' ? qtyPending : Number(qtyPending).toFixed(decimalPlaces),\r\n\t\tavg: executedQuantity != 0 ? (sum/executedQuantity).toFixed(2) : '-'\r\n\t}\r\n}\r\n\r\nexport const getBaseAndPriceCurrencies = (settlementCurrencies, tradeCurrencySymbol, settleCurrencySymbol) => {\r\n\tlet baseCurrency = settleCurrencySymbol;\r\n\tlet priceCurrency = tradeCurrencySymbol;\r\n\tif (settlementCurrencies) {\r\n\t\tconst settlementCurrencyInfo = settlementCurrencies.find(\r\n\t\t\t(c) => {\r\n if (c.description) {\r\n return c.description == settleCurrencySymbol;\r\n } else {\r\n if (c.currencyInfo) {\r\n return c.currencyInfo.currencyISO == settleCurrencySymbol;\r\n }\r\n }\r\n }\r\n\t\t);\r\n\t\tconst settlementCurrencyMultiplies = settlementCurrencyInfo && settlementCurrencyInfo.multiplies;\r\n\r\n\t\tbaseCurrency = settlementCurrencyMultiplies ? tradeCurrencySymbol : settleCurrencySymbol;\r\n\t\tpriceCurrency = settlementCurrencyMultiplies ? settleCurrencySymbol : tradeCurrencySymbol;\r\n\t}\r\n\treturn { baseCurrency, priceCurrency };\r\n}\r\n\r\nexport const getOrderActionByDrag = ({order, source, destination }) => {\r\n let action;\r\n\r\n const canMoveToTodo = [\r\n OrderStatus.ACKED,\r\n OrderStatus.REJECTED,\r\n OrderStatus.CANCELED,\r\n ].includes(order.OrderStatus);\r\n\r\n const canMoveToWorking = [\r\n OrderStatus.ROUTED,\r\n OrderStatus.REJECTED,\r\n OrderStatus.CANCELED,\r\n OrderStatus.PART_FILLED,\r\n ].includes(order.OrderStatus);\r\n\r\n const canMoveToCompleted = [\r\n OrderStatus.ROUTED,\r\n OrderStatus.ACKED,\r\n OrderStatus.PART,\r\n OrderStatus.AMENDING, // Amending is canceled\r\n OrderStatus.CANCEL_PENDING, // cancel is accepted\r\n ].includes(order.OrderStatus);\r\n\r\n // Is from trader desk move order throw columns\r\n if (source === destination) {\r\n action = undefined;\r\n } else {\r\n switch (destination) {\r\n case 'todo':\r\n if (canMoveToTodo) {\r\n action = OrderAction.MOVE_TO_TODO;\r\n } else {\r\n action = undefined;\r\n }\r\n break;\r\n case 'working':\r\n if (canMoveToWorking) {\r\n action = OrderAction.MOVE_TO_WORKING;\r\n } else {\r\n action = undefined;\r\n }\r\n break;\r\n case 'completed':\r\n if (canMoveToCompleted) {\r\n action = OrderAction.MOVE_TO_COMPLETED;\r\n } else {\r\n action = undefined;\r\n }\r\n break;\r\n default:\r\n action = undefined;\r\n }\r\n }\r\n\r\n return action;\r\n}\r\n\r\nexport const getOptionFieldsFromTicker = (order) => {\r\n\tconst optsRegExp = /(\\w{1,6})((\\d{2})(\\d{2})(\\d{2}))([CP])((\\d{5})(\\d{3}))/;\r\n\r\n\tconst match = optsRegExp.exec(order.AssetTicker || order);\r\n\r\n\tconst AssetTicker = match[1];\r\n\tconst isCall = (match[6].toUpperCase() == 'C') ? 1 : 2;\r\n\tconst expiration = toDateLocal(new Date('20' + match[3], match[4]-1, match[5], 0, 0, 0, 0));\r\n\tconst strikePrice = parseInt(match[8]) + parseInt(match[9]) / 1000;\r\n\r\n\treturn {\r\n\t\tAssetTicker,\r\n\t\tisCall,\r\n\t\texpiration,\r\n\t\tstrikePrice\r\n\t}\r\n\t\r\n}\r\n\r\nexport const getOptionsTickerFromFields = (order) => {\r\n\tconst parseExpiration = (e) => `${e[2]}${e[3]}${e[5]}${e[6]}${e[8]}${e[9]}`;\r\n\r\n\tconst parseCallPut = (c) => c == 1 ? 'C' : 'P';\r\n\r\n\tconst parseStrike = (s) => s.toFixed(3).toString().replace('.','').padStart(8,'0');\r\n\r\n\treturn `${order.AssetTicker}${parseExpiration(order.expiration)}${parseCallPut(order.isCall)}${parseStrike(order.strikePrice)}`\r\n}\r\n\r\nfunction toDateLocal(date) {\r\n\tvar\r\n\t\tten = function(i) {\r\n\t\t\treturn (i < 10 ? '0' : '') + i;\r\n\t\t},\r\n\t\tYYYY = date.getFullYear(),\r\n\t\tMM = ten(date.getMonth() + 1),\r\n\t\tDD = ten(date.getDate())\r\n\t;\r\n\t\r\n\treturn YYYY + '-' + MM + '-' + DD;\r\n}","export const QuoteStatus = {\r\n\tWAITING: 'Waiting',\r\n\tPRICED: 'Priced',\r\n\tUSED: 'Used',\r\n\tREJECTED_BY_RECEIVER: 'RejectedTrader',\r\n\tREJECTED_BY_SENDER: 'RejectedAdvisor'\r\n}\r\n\r\nexport const QuoteMode = {\r\n\tNONE: 0,\r\n\tSET_PRICE: 1,\r\n\tREJECT: 2,\r\n\tUSE: 3\r\n}\r\n\r\nexport const QuoteAction = {\r\n\tREQUEST: 1,\r\n\tSET_PRICE: 2,\r\n\tREJECT: 3,\r\n\tUSE: 4,\r\n\tREAD: 5\r\n}\r\n\r\nexport const getFieldVisibility = (quote) => {\r\n\treturn {\r\n\t\tlabelPrice: [\r\n\t\t\tQuoteStatus.PRICED, \r\n\t\t\tQuoteStatus.USED, \r\n\t\t\tQuoteStatus.REJECTED_BY_SENDER\r\n\t\t].includes(quote.status),\r\n\r\n\t\treason: [\r\n\t\t\tQuoteStatus.REJECTED_BY_SENDER,\r\n\t\t\tQuoteStatus.REJECTED_BY_RECEIVER\r\n\t\t].includes(quote.status)\r\n\t}\r\n}","import {\r\n getProductTypeName,\r\n getOrderTypeName,\r\n ProductType,\r\n getStatusName,\r\n OrderPriceType,\r\n getTimeFrameName,\r\n TimeFrame\r\n} from \"../Order/Order\";\r\n\r\nconst headers = [\r\n { header: \"Id\", key: \"id\" },\r\n { header: \"Date\", key: \"date\" },\r\n { header: \"ModifiedDate\", key: \"modifiedDate\" },\r\n { header: \"Product\", key: \"product\" },\r\n { header: \"Side\", key: \"side\" },\r\n { header: \"Ticker\", key: \"symbol\" },\r\n { header: \"Quantity\", key: \"quantity\" },\r\n { header: \"Client account\", key: \"AccountName\" },\r\n { header: \"Holder\", key: \"HolderName\" },\r\n { header: \"Price\", key: \"customPrice\" },\r\n { header: \"Time Frame\", key: \"timeFrame\" },\r\n { header: \"Status\", key: \"status\" },\r\n { header: \"ExecId\", key: \"execId\" },\r\n { header: \"Quantity\", key: \"execQuantity\" },\r\n { header: \"DateTime\", key: \"execDate\" },\r\n { header: \"Price\", key: \"execPrice\" },\r\n { header: \"Broker\", key: \"execBroker\" },\r\n { header: \"Counterparty\", key: \"execCounterparty\" },\r\n];\r\n\r\nconst getEmptyRowOrder = () => {\r\n let row = {};\r\n\r\n headers.forEach(item => (row[item.key] = null));\r\n\r\n return row;\r\n};\r\n\r\nconst getOrderValues = order => {\r\n const timeFrame = getOrderTimeFrame(order);\r\n let name = ' ';\r\n if (order.CurrentAccount !== undefined) {\r\n name = order.CurrentAccount.HolderName;\r\n }\r\n return {\r\n id: order.OrderId,\r\n date: order.OrderInitDate,\r\n modifiedDate: order.OrderModifiedDate,\r\n product: getProductTypeName(order.AssetClassForm),\r\n side: getOrderSide(order),\r\n symbol: order.AssetTicker,\r\n quantity: Number(parseFloat(order.OrderQuantity).toFixed(2)).toLocaleString('es-ES', {minimumFractionDigits: 2},{maximumFractionDigits:2}),\r\n AccountName: order.CurrentAccount? order.CurrentAccount.AccountName:'',\r\n HolderName: name,\r\n customPrice: Number(parseFloat(getOrderPrice(order)).toFixed(2)).toLocaleString('es-ES', {minimumFractionDigits: 2},{maximumFractionDigits:2}),\r\n timeFrame: timeFrame.name,\r\n timeFrameDate: timeFrame.date,\r\n status: getStatusName(order.OrderStatus),\r\n };\r\n};\r\n\r\nconst getExecutionValues = execution => {\r\n return {\r\n execId: execution.ExecutionId,\r\n execQuantity: Number(parseFloat(execution.ExecutionQuantity).toFixed(2)).toLocaleString('es-ES', {minimumFractionDigits: 2},{maximumFractionDigits:2}),\r\n execDate: execution.ExecutionDate,\r\n execPrice: Number(parseFloat(execution.ExecutionPrice).toFixed(2)).toLocaleString('es-ES', {minimumFractionDigits: 2},{maximumFractionDigits:2}),\r\n execBroker: execution.brokerName,\r\n execCounterparty: execution.counterpartyName\r\n };\r\n};\r\n\r\nconst buildRows = orders => {\r\n let excelRows = [];\r\n let newOrders = [];\r\n\r\n //If orders.todo is undefined then we're probably in advisor and we don't need these fields.\r\n orders.todo ? newOrders = newOrders.concat(orders.todo, orders.working, orders.completed) : newOrders = orders; \r\n \r\n newOrders.forEach(order => {\r\n let orderRows = [];\r\n\r\n const orderRow = getOrderValues(order);\r\n\r\n //Empty execs case\r\n orderRows.push(orderRow);\r\n\r\n order.Childs.forEach(child =>\r\n child.Executions.forEach((execution, index) => {\r\n let row = getEmptyRowOrder();\r\n\r\n if (index == 0) {\r\n orderRows.pop();\r\n\r\n row = {\r\n ...row,\r\n ...orderRow\r\n };\r\n }\r\n\r\n row = {\r\n ...row,\r\n ...getExecutionValues(execution)\r\n };\r\n\r\n orderRows.push(row);\r\n })\r\n );\r\n excelRows.push(...orderRows);\r\n });\r\n\r\n return excelRows;\r\n};\r\n\r\nconst getOrderPrice = order => {\r\n let price;\r\n\r\n if (\r\n [ProductType.EQUITY, ProductType.OPTION, ProductType.FOREX].indexOf(\r\n order[\"AssetClassForm\"]\r\n ) >= 0\r\n ) {\r\n if (order.OrderType == OrderPriceType.MARKET) {\r\n price = \"\";\r\n } else if (order.OrderType == OrderPriceType.STOPLIMIT) {\r\n price = `${order.OrderPrice} - ${order.OrderStopPrice}`;\r\n } else if (order.OrderType == OrderPriceType.STOP) {\r\n price = order.OrderStopPrice;\r\n } else {\r\n price = order.OrderPrice;\r\n }\r\n\r\n return `${price} ${getOrderTypeName(order.OrderType)}`;\r\n } else if (\r\n ProductType.MFUNDS != order[\"AssetClassForm\"] &&\r\n order[\"OrderPrice\"] != undefined\r\n ) {\r\n return order.OrderPrice;\r\n } else {\r\n return \"\";\r\n }\r\n};\r\n\r\nconst getOrderTimeFrame = order => {\r\n if (\r\n [ProductType.EQUITY, ProductType.OPTION, ProductType.FOREX].indexOf(\r\n order[\"AssetClassForm\"]\r\n ) >= 0\r\n ) {\r\n return {\r\n name: getTimeFrameName(order.OrderTimeInForce),\r\n date: order.OrderTimeInForce == TimeFrame.GTD ? order.OrderGTD : null\r\n };\r\n }\r\n\r\n return {};\r\n};\r\n\r\nconst getOrderSide = order => {\r\n let side = order.OrderSide;\r\n\r\n if (order &&order[\"AssetClassForm\"] == ProductType.EQUITY) {\r\n side += order.OrderOpenClose == \"Open\" ? \"-O\" : \"-C\";\r\n }\r\n\r\n return side;\r\n};\r\n\r\nexport const getReportOrdersData = orders => {\r\n return {\r\n headers,\r\n rows: buildRows(orders)\r\n };\r\n};\r\n","import { getProductTypeName } from \"../Order/Order\";\r\n\r\nconst headers = [\r\n\t{ header: 'Id', key: 'id' },\r\n\t{ header: 'Req. at', key: 'requestedAt' },\r\n\t{ header: 'Req. by', key: 'requestedBy' },\r\n\t{ header: 'Resp. at', key: 'respondedAt' },\r\n\t{ header: 'Resp. by', key: 'respondedBy' },\r\n\t{ header: 'Trading desk', key: 'tradingDeskName' },\r\n\t{ header: 'Product', key: 'product' },\r\n\t{ header: 'Side', key: 'side' },\r\n\t{ header: 'Ticker', key: 'symbol' },\r\n\t{ header: 'Quantity', key: 'quantity' },\r\n\t{ header: 'Price', key: 'price' },\r\n\t{ header: 'Status', key: 'status' },\r\n\t{ header: 'Used', key: 'wasUsed' },\r\n\t{ header: 'Reason', key: 'rejectReason' }\r\n]\r\n\r\nconst buildRows = (quotes) => {\r\n\treturn quotes.map(quote => {\r\n\t\treturn {\r\n\t\t\tid: quote.id,\r\n\t\t\trequestedAt: quote.AdvisorQuoteRequestedDate,\r\n\t\t\trequestedBy: quote.AdvisorQuoteRequestedBy,\r\n\t\t\trespondedAt: quote.AdvisorQuoteRespondedDate,\r\n\t\t\trespondedBy: quote.AdvisorQuoteRespondedBy,\r\n\t\t\tproduct: getProductTypeName(quote.product),\r\n\t\t\tside: quote.AdvisorQuoteIsBuy ? 'Buy' : 'Sell',\r\n\t\t\tsymbol: quote.AssetTicker,\r\n\t\t\ttradingDeskName: quote.tradingDeskName,\r\n\t\t\tquantity: quote.AdvisorQuoteQuantity,\r\n\t\t\tprice: quote.AdvisorQuotePrice,\r\n\t\t\tstatus: quote.AdvisorQuoteStatus,\r\n\t\t\twasUsed: quote.wasUsed ? 'Yes' : 'No',\r\n\t\t\trejectReason: quote.AdvisorQuoteRejectReason\r\n\t\t}\r\n\t})\r\n}\r\n\r\n\r\nexport const getReportQuotesData = (quotes) => {\r\n\treturn {\r\n\t\theaders,\r\n\t\trows: buildRows(quotes)\r\n\t}\r\n}","import {\r\n getOrderTypeName,\r\n ProductType,\r\n getStatusName,\r\n OrderPriceType,\r\n getTimeFrameName,\r\n TimeFrame\r\n} from \"../Order/Order\";\r\n\r\nconst headers = [\r\n { header: \"Id\", key: \"id\" },\r\n { header: \"Type\", key: \"type\"},\r\n { header: \"Date\", key: \"date\" },\r\n { header: \"Client account\", key: \"AccountName\" },\r\n { header: \"Product Type\", key: \"productType\"},\r\n { header: \"Product\", key: \"product\" },\r\n { header: \"Ticker\", key: \"symbol\" },\r\n { header: \"Quantity\", key: \"quantity\" },\r\n { header: \"Price\", key: \"customPrice\" },\r\n { header: \"Initiated by\", key: \"initiatedBy\"},\r\n { header: \"Taken by\", key: \"takenBy\"},\r\n { header: \"Status\", key: \"status\" },\r\n];\r\n\r\nconst getEmptyRowTransfer = () => {\r\n let row = {};\r\n\r\n headers.forEach(item => (row[item.key] = null));\r\n\r\n return row;\r\n};\r\n\r\nconst getProductTypeName = transfer => {\r\n let productType = \"\";\r\n if (transfer.items.length > 0&& transfer.items[0].AssetId!=0) {\r\n productType=\"ASSET\";\r\n }else{\r\n productType=\"CASH\";\r\n }\r\n return productType;\r\n};\r\n \r\n\r\nconst getTransferValues = transfer => {\r\n const timeFrame = getOrderTimeFrame(transfer);\r\n let name = ' ';\r\n if (transfer.CurrentAccount !== undefined) {\r\n name = transfer.CurrentAccount.HolderName;\r\n }\r\n return {\r\n id: transfer.Id,\r\n type: transfer.IOType,\r\n date: transfer.Date,\r\n timeFrame: timeFrame.name,\r\n timeFrameDate: timeFrame.date,\r\n initiatedBy: transfer.InitiatedBy,\r\n takenBy: transfer.TakenBy,\r\n productType: getProductTypeName(transfer),\r\n status: getStatusName(transfer.Status),\r\n };\r\n};\r\n\r\n\r\nconst buildRows = transfers => {\r\n let excelRows = [];\r\n let newTransfers = []\r\n\r\n transfers.todo ? newTransfers =Object.values(transfers).flat(): newTransfers = transfers;\r\n newTransfers.forEach(transfer => {\r\n let transferRows = [];\r\n\r\n const transferRow = getTransferValues(transfer);\r\n\r\n transfer.items.forEach(item => {\r\n let row = getEmptyRowTransfer();\r\n\r\n row = {\r\n ...row,\r\n ...transferRow,\r\n ...{\r\n product: item.AssetName|| item.CurrencyISO,\r\n symbol: item.AssetTicker||\"-\",\r\n quantity: item.Quantity,\r\n AccountName: item.AccountName,\r\n customPrice: item.AssetTicker==\"\"? \"-\" :item.Price,\r\n }\r\n };\r\n\r\n transferRows.push(row);\r\n });\r\n excelRows.push(...transferRows);\r\n });\r\n\r\n return excelRows;\r\n};\r\n\r\nconst getOrderPrice = order => {\r\n let price;\r\n\r\n if (\r\n [ProductType.EQUITY, ProductType.OPTION, ProductType.FOREX].indexOf(\r\n order[\"AssetClassForm\"]\r\n ) >= 0\r\n ) {\r\n if (order.OrderType == OrderPriceType.MARKET) {\r\n price = \"\";\r\n } else if (order.OrderType == OrderPriceType.STOPLIMIT) {\r\n price = `${order.OrderPrice} - ${order.OrderStopPrice}`;\r\n } else if (order.OrderType == OrderPriceType.STOP) {\r\n price = order.OrderStopPrice;\r\n } else {\r\n price = order.OrderPrice;\r\n }\r\n\r\n return `${price} ${getOrderTypeName(order.OrderType)}`;\r\n } else if (\r\n ProductType.MFUNDS != order[\"AssetClassForm\"] &&\r\n order[\"OrderPrice\"] != undefined\r\n ) {\r\n return order.OrderPrice;\r\n } else {\r\n return \"\";\r\n }\r\n};\r\n\r\nconst getOrderTimeFrame = order => {\r\n if (\r\n [ProductType.EQUITY, ProductType.OPTION, ProductType.FOREX].indexOf(\r\n order[\"AssetClassForm\"]\r\n ) >= 0\r\n ) {\r\n return {\r\n name: getTimeFrameName(order.OrderTimeInForce),\r\n date: order.OrderTimeInForce == TimeFrame.GTD ? order.OrderGTD : null\r\n };\r\n }\r\n\r\n return {};\r\n};\r\n\r\nconst getOrderSide = order => {\r\n let side = order.OrderSide;\r\n\r\n if (order[\"AssetClassForm\"] == ProductType.EQUITY) {\r\n side += order.OrderOpenClose == \"Open\" ? \"-O\" : \"-C\";\r\n }\r\n\r\n return side;\r\n};\r\n\r\nexport const getReportIOsData = transfers => {\r\n return {\r\n headers,\r\n rows: buildRows(transfers)\r\n };\r\n};","export * from './Orders'\r\nexport * from './Quotes'\r\nexport * from './Transfers'","export function getISODate(date) {\r\n const month =\r\n date.getMonth() + 1 < 10\r\n ? `0${date.getMonth() + 1}`\r\n : `${date.getMonth() + 1}`;\r\n const day = date.getDate() < 10 ? `0${date.getDate()}` : `${date.getDate()}`;\r\n return `${date.getFullYear()}-${month}-${day}`;\r\n}\r\n\r\nexport function getDateFromISO(dateString) {\r\n return new Date(\r\n dateString.substring(0, 3),\r\n parseInt(dateString.substring(5, 6), 10),\r\n dateString.substring(7, 8)\r\n );\r\n}\r\n\r\nexport const getLocalDate = strDate => {\r\n const date = new Date(strDate);\r\n date.setMinutes(date.getMinutes() + date.getTimezoneOffset());\r\n return date.toLocaleDateString(\"es\");\r\n};\r\n\r\nexport const toDateFromString = d => {\r\n return new Date(new Date(d).setMinutes(new Date().getTimezoneOffset())); // this receives a date in format '2020-01-01' return a date\r\n};\r\n\r\nexport const toDateTime = d => {\r\n var day = new Date(d);\r\n return new Date(day.getUTCFullYear(), day.getUTCMonth(), day.getUTCDate());\r\n};\r\n\r\nexport function toFormatDate(date) {\r\n var d = new Date(date),\r\n month = \"\" + (d.getMonth() + 1),\r\n day = \"\" + d.getDate(),\r\n year = d.getFullYear();\r\n\r\n if (month.length < 2) month = \"0\" + month;\r\n if (day.length < 2) day = \"0\" + day;\r\n\r\n return [year, month, day].join(\"-\");\r\n}\r\n\r\nexport function toFormatDateReverse(date) {\r\n var parts = date.split('/'); \r\n var d = new Date(parts[2], parts[1] - 1, parts[0]);\r\n var month = \"\" + (d.getMonth() + 1);\r\n var day = \"\" + d.getDate();\r\n var year = d.getFullYear();\r\n\r\n if (month.length < 2) month = \"0\" + month;\r\n if (day.length < 2) day = \"0\" + day;\r\n\r\n return [year, month, day].join(\"-\");\r\n}\r\n\r\nexport const addMonth = function(date, monthsToAdd) {\r\n const d = date;\r\n d.setMonth(d.getMonth() + monthsToAdd);\r\n return d;\r\n};\r\n\r\nexport const addDay = function(date, daysToAdd) {\r\n const d = date;\r\n d.setDate(d.getDate() + daysToAdd);\r\n return d;\r\n};\r\n\r\nexport function parseDate(date) {\r\n if (!date || date == \"\" || date == \"0000-00-00\") {\r\n return \"\";\r\n }\r\n if (date instanceof Date) {\r\n return date.toISOString();\r\n }\r\n\r\n if (date.indexOf(\"T\") > -1) {\r\n return date;\r\n }\r\n try{\r\n return new Date(`${date}T00:00`).toISOString();\r\n }catch(e){\r\n return date;\r\n }\r\n}","import React, { useState, useEffect, useRef } from 'react';\r\n\r\n/**\r\n * Runs a callback function everytime a given delay has passed.\r\n *\r\n * @param {function} callback The function to run.\r\n * @param {number} delay The period to wait (in ms) between calls to the callback function.\r\n */\r\nexport const useInterval = (callback, delay) => {\r\n const savedCallback = useRef();\r\n\r\n useEffect(() => {\r\n savedCallback.current = callback;\r\n }, [callback]);\r\n\r\n useEffect(() => {\r\n function tick() {\r\n savedCallback.current();\r\n }\r\n if (delay !== null) {\r\n let id = setInterval(tick, delay);\r\n return () => clearInterval(id);\r\n }\r\n }, [delay]);\r\n};\r\n\r\n/**\r\n * Returns the last given value once a given delay has passed from the last time the given value has been last updated.\r\n *\r\n * @param {object} value The value we want to have.\r\n * @param {number} delay The period to wait (in ms) before returning the given value.\r\n */\r\nexport function useDebounce(value, delay) {\r\n const [debouncedValue, setDebouncedValue] = useState(value);\r\n\r\n useEffect(() => {\r\n const handler = setTimeout(() => {\r\n setDebouncedValue(value);\r\n }, delay);\r\n return () => {\r\n clearTimeout(handler);\r\n };\r\n }, [value, delay]);\r\n\r\n return debouncedValue;\r\n}\r\n","import * as Report from \"./Report\";\r\nimport * as CommonsHelper from \"./Helper\";\r\nimport * as DebugTools from \"./DebugTools\";\r\nimport * as dateUtils from \"./dateUtils\";\r\nimport * as FormFields from \"./FormFields\";\r\nimport * as Formatter from \"./Formatter\";\r\n\r\nexport * from \"./Order/Order\";\r\nexport * from \"./Quote/Quote\";\r\nexport * from \"./Account/Account\";\r\nexport * from \"./dateUtils\";\r\nexport * from \"./FormFields\";\r\nexport * from \"./Formatter\";\r\n\r\nexport {Report, CommonsHelper, DebugTools, dateUtils, FormFields, Formatter};\r\n","var map = {\n\t\"./af\": \"./node_modules/moment/locale/af.js\",\n\t\"./af.js\": \"./node_modules/moment/locale/af.js\",\n\t\"./ar\": \"./node_modules/moment/locale/ar.js\",\n\t\"./ar-dz\": \"./node_modules/moment/locale/ar-dz.js\",\n\t\"./ar-dz.js\": \"./node_modules/moment/locale/ar-dz.js\",\n\t\"./ar-kw\": \"./node_modules/moment/locale/ar-kw.js\",\n\t\"./ar-kw.js\": \"./node_modules/moment/locale/ar-kw.js\",\n\t\"./ar-ly\": \"./node_modules/moment/locale/ar-ly.js\",\n\t\"./ar-ly.js\": \"./node_modules/moment/locale/ar-ly.js\",\n\t\"./ar-ma\": \"./node_modules/moment/locale/ar-ma.js\",\n\t\"./ar-ma.js\": \"./node_modules/moment/locale/ar-ma.js\",\n\t\"./ar-ps\": \"./node_modules/moment/locale/ar-ps.js\",\n\t\"./ar-ps.js\": \"./node_modules/moment/locale/ar-ps.js\",\n\t\"./ar-sa\": \"./node_modules/moment/locale/ar-sa.js\",\n\t\"./ar-sa.js\": \"./node_modules/moment/locale/ar-sa.js\",\n\t\"./ar-tn\": \"./node_modules/moment/locale/ar-tn.js\",\n\t\"./ar-tn.js\": \"./node_modules/moment/locale/ar-tn.js\",\n\t\"./ar.js\": \"./node_modules/moment/locale/ar.js\",\n\t\"./az\": \"./node_modules/moment/locale/az.js\",\n\t\"./az.js\": \"./node_modules/moment/locale/az.js\",\n\t\"./be\": \"./node_modules/moment/locale/be.js\",\n\t\"./be.js\": \"./node_modules/moment/locale/be.js\",\n\t\"./bg\": \"./node_modules/moment/locale/bg.js\",\n\t\"./bg.js\": \"./node_modules/moment/locale/bg.js\",\n\t\"./bm\": \"./node_modules/moment/locale/bm.js\",\n\t\"./bm.js\": \"./node_modules/moment/locale/bm.js\",\n\t\"./bn\": \"./node_modules/moment/locale/bn.js\",\n\t\"./bn-bd\": \"./node_modules/moment/locale/bn-bd.js\",\n\t\"./bn-bd.js\": \"./node_modules/moment/locale/bn-bd.js\",\n\t\"./bn.js\": \"./node_modules/moment/locale/bn.js\",\n\t\"./bo\": \"./node_modules/moment/locale/bo.js\",\n\t\"./bo.js\": \"./node_modules/moment/locale/bo.js\",\n\t\"./br\": \"./node_modules/moment/locale/br.js\",\n\t\"./br.js\": \"./node_modules/moment/locale/br.js\",\n\t\"./bs\": \"./node_modules/moment/locale/bs.js\",\n\t\"./bs.js\": \"./node_modules/moment/locale/bs.js\",\n\t\"./ca\": \"./node_modules/moment/locale/ca.js\",\n\t\"./ca.js\": \"./node_modules/moment/locale/ca.js\",\n\t\"./cs\": \"./node_modules/moment/locale/cs.js\",\n\t\"./cs.js\": \"./node_modules/moment/locale/cs.js\",\n\t\"./cv\": \"./node_modules/moment/locale/cv.js\",\n\t\"./cv.js\": \"./node_modules/moment/locale/cv.js\",\n\t\"./cy\": \"./node_modules/moment/locale/cy.js\",\n\t\"./cy.js\": \"./node_modules/moment/locale/cy.js\",\n\t\"./da\": \"./node_modules/moment/locale/da.js\",\n\t\"./da.js\": \"./node_modules/moment/locale/da.js\",\n\t\"./de\": \"./node_modules/moment/locale/de.js\",\n\t\"./de-at\": \"./node_modules/moment/locale/de-at.js\",\n\t\"./de-at.js\": \"./node_modules/moment/locale/de-at.js\",\n\t\"./de-ch\": \"./node_modules/moment/locale/de-ch.js\",\n\t\"./de-ch.js\": \"./node_modules/moment/locale/de-ch.js\",\n\t\"./de.js\": \"./node_modules/moment/locale/de.js\",\n\t\"./dv\": \"./node_modules/moment/locale/dv.js\",\n\t\"./dv.js\": \"./node_modules/moment/locale/dv.js\",\n\t\"./el\": \"./node_modules/moment/locale/el.js\",\n\t\"./el.js\": \"./node_modules/moment/locale/el.js\",\n\t\"./en-au\": \"./node_modules/moment/locale/en-au.js\",\n\t\"./en-au.js\": \"./node_modules/moment/locale/en-au.js\",\n\t\"./en-ca\": \"./node_modules/moment/locale/en-ca.js\",\n\t\"./en-ca.js\": \"./node_modules/moment/locale/en-ca.js\",\n\t\"./en-gb\": \"./node_modules/moment/locale/en-gb.js\",\n\t\"./en-gb.js\": \"./node_modules/moment/locale/en-gb.js\",\n\t\"./en-ie\": \"./node_modules/moment/locale/en-ie.js\",\n\t\"./en-ie.js\": \"./node_modules/moment/locale/en-ie.js\",\n\t\"./en-il\": \"./node_modules/moment/locale/en-il.js\",\n\t\"./en-il.js\": \"./node_modules/moment/locale/en-il.js\",\n\t\"./en-in\": \"./node_modules/moment/locale/en-in.js\",\n\t\"./en-in.js\": \"./node_modules/moment/locale/en-in.js\",\n\t\"./en-nz\": \"./node_modules/moment/locale/en-nz.js\",\n\t\"./en-nz.js\": \"./node_modules/moment/locale/en-nz.js\",\n\t\"./en-sg\": \"./node_modules/moment/locale/en-sg.js\",\n\t\"./en-sg.js\": \"./node_modules/moment/locale/en-sg.js\",\n\t\"./eo\": \"./node_modules/moment/locale/eo.js\",\n\t\"./eo.js\": \"./node_modules/moment/locale/eo.js\",\n\t\"./es\": \"./node_modules/moment/locale/es.js\",\n\t\"./es-do\": \"./node_modules/moment/locale/es-do.js\",\n\t\"./es-do.js\": \"./node_modules/moment/locale/es-do.js\",\n\t\"./es-mx\": \"./node_modules/moment/locale/es-mx.js\",\n\t\"./es-mx.js\": \"./node_modules/moment/locale/es-mx.js\",\n\t\"./es-us\": \"./node_modules/moment/locale/es-us.js\",\n\t\"./es-us.js\": \"./node_modules/moment/locale/es-us.js\",\n\t\"./es.js\": \"./node_modules/moment/locale/es.js\",\n\t\"./et\": \"./node_modules/moment/locale/et.js\",\n\t\"./et.js\": \"./node_modules/moment/locale/et.js\",\n\t\"./eu\": \"./node_modules/moment/locale/eu.js\",\n\t\"./eu.js\": \"./node_modules/moment/locale/eu.js\",\n\t\"./fa\": \"./node_modules/moment/locale/fa.js\",\n\t\"./fa.js\": \"./node_modules/moment/locale/fa.js\",\n\t\"./fi\": \"./node_modules/moment/locale/fi.js\",\n\t\"./fi.js\": \"./node_modules/moment/locale/fi.js\",\n\t\"./fil\": \"./node_modules/moment/locale/fil.js\",\n\t\"./fil.js\": \"./node_modules/moment/locale/fil.js\",\n\t\"./fo\": \"./node_modules/moment/locale/fo.js\",\n\t\"./fo.js\": \"./node_modules/moment/locale/fo.js\",\n\t\"./fr\": \"./node_modules/moment/locale/fr.js\",\n\t\"./fr-ca\": \"./node_modules/moment/locale/fr-ca.js\",\n\t\"./fr-ca.js\": \"./node_modules/moment/locale/fr-ca.js\",\n\t\"./fr-ch\": \"./node_modules/moment/locale/fr-ch.js\",\n\t\"./fr-ch.js\": \"./node_modules/moment/locale/fr-ch.js\",\n\t\"./fr.js\": \"./node_modules/moment/locale/fr.js\",\n\t\"./fy\": \"./node_modules/moment/locale/fy.js\",\n\t\"./fy.js\": \"./node_modules/moment/locale/fy.js\",\n\t\"./ga\": \"./node_modules/moment/locale/ga.js\",\n\t\"./ga.js\": \"./node_modules/moment/locale/ga.js\",\n\t\"./gd\": \"./node_modules/moment/locale/gd.js\",\n\t\"./gd.js\": \"./node_modules/moment/locale/gd.js\",\n\t\"./gl\": \"./node_modules/moment/locale/gl.js\",\n\t\"./gl.js\": \"./node_modules/moment/locale/gl.js\",\n\t\"./gom-deva\": \"./node_modules/moment/locale/gom-deva.js\",\n\t\"./gom-deva.js\": \"./node_modules/moment/locale/gom-deva.js\",\n\t\"./gom-latn\": \"./node_modules/moment/locale/gom-latn.js\",\n\t\"./gom-latn.js\": \"./node_modules/moment/locale/gom-latn.js\",\n\t\"./gu\": \"./node_modules/moment/locale/gu.js\",\n\t\"./gu.js\": \"./node_modules/moment/locale/gu.js\",\n\t\"./he\": \"./node_modules/moment/locale/he.js\",\n\t\"./he.js\": \"./node_modules/moment/locale/he.js\",\n\t\"./hi\": \"./node_modules/moment/locale/hi.js\",\n\t\"./hi.js\": \"./node_modules/moment/locale/hi.js\",\n\t\"./hr\": \"./node_modules/moment/locale/hr.js\",\n\t\"./hr.js\": \"./node_modules/moment/locale/hr.js\",\n\t\"./hu\": \"./node_modules/moment/locale/hu.js\",\n\t\"./hu.js\": \"./node_modules/moment/locale/hu.js\",\n\t\"./hy-am\": \"./node_modules/moment/locale/hy-am.js\",\n\t\"./hy-am.js\": \"./node_modules/moment/locale/hy-am.js\",\n\t\"./id\": \"./node_modules/moment/locale/id.js\",\n\t\"./id.js\": \"./node_modules/moment/locale/id.js\",\n\t\"./is\": \"./node_modules/moment/locale/is.js\",\n\t\"./is.js\": \"./node_modules/moment/locale/is.js\",\n\t\"./it\": \"./node_modules/moment/locale/it.js\",\n\t\"./it-ch\": \"./node_modules/moment/locale/it-ch.js\",\n\t\"./it-ch.js\": \"./node_modules/moment/locale/it-ch.js\",\n\t\"./it.js\": \"./node_modules/moment/locale/it.js\",\n\t\"./ja\": \"./node_modules/moment/locale/ja.js\",\n\t\"./ja.js\": \"./node_modules/moment/locale/ja.js\",\n\t\"./jv\": \"./node_modules/moment/locale/jv.js\",\n\t\"./jv.js\": \"./node_modules/moment/locale/jv.js\",\n\t\"./ka\": \"./node_modules/moment/locale/ka.js\",\n\t\"./ka.js\": \"./node_modules/moment/locale/ka.js\",\n\t\"./kk\": \"./node_modules/moment/locale/kk.js\",\n\t\"./kk.js\": \"./node_modules/moment/locale/kk.js\",\n\t\"./km\": \"./node_modules/moment/locale/km.js\",\n\t\"./km.js\": \"./node_modules/moment/locale/km.js\",\n\t\"./kn\": \"./node_modules/moment/locale/kn.js\",\n\t\"./kn.js\": \"./node_modules/moment/locale/kn.js\",\n\t\"./ko\": \"./node_modules/moment/locale/ko.js\",\n\t\"./ko.js\": \"./node_modules/moment/locale/ko.js\",\n\t\"./ku\": \"./node_modules/moment/locale/ku.js\",\n\t\"./ku-kmr\": \"./node_modules/moment/locale/ku-kmr.js\",\n\t\"./ku-kmr.js\": \"./node_modules/moment/locale/ku-kmr.js\",\n\t\"./ku.js\": \"./node_modules/moment/locale/ku.js\",\n\t\"./ky\": \"./node_modules/moment/locale/ky.js\",\n\t\"./ky.js\": \"./node_modules/moment/locale/ky.js\",\n\t\"./lb\": \"./node_modules/moment/locale/lb.js\",\n\t\"./lb.js\": \"./node_modules/moment/locale/lb.js\",\n\t\"./lo\": \"./node_modules/moment/locale/lo.js\",\n\t\"./lo.js\": \"./node_modules/moment/locale/lo.js\",\n\t\"./lt\": \"./node_modules/moment/locale/lt.js\",\n\t\"./lt.js\": \"./node_modules/moment/locale/lt.js\",\n\t\"./lv\": \"./node_modules/moment/locale/lv.js\",\n\t\"./lv.js\": \"./node_modules/moment/locale/lv.js\",\n\t\"./me\": \"./node_modules/moment/locale/me.js\",\n\t\"./me.js\": \"./node_modules/moment/locale/me.js\",\n\t\"./mi\": \"./node_modules/moment/locale/mi.js\",\n\t\"./mi.js\": \"./node_modules/moment/locale/mi.js\",\n\t\"./mk\": \"./node_modules/moment/locale/mk.js\",\n\t\"./mk.js\": \"./node_modules/moment/locale/mk.js\",\n\t\"./ml\": \"./node_modules/moment/locale/ml.js\",\n\t\"./ml.js\": \"./node_modules/moment/locale/ml.js\",\n\t\"./mn\": \"./node_modules/moment/locale/mn.js\",\n\t\"./mn.js\": \"./node_modules/moment/locale/mn.js\",\n\t\"./mr\": \"./node_modules/moment/locale/mr.js\",\n\t\"./mr.js\": \"./node_modules/moment/locale/mr.js\",\n\t\"./ms\": \"./node_modules/moment/locale/ms.js\",\n\t\"./ms-my\": \"./node_modules/moment/locale/ms-my.js\",\n\t\"./ms-my.js\": \"./node_modules/moment/locale/ms-my.js\",\n\t\"./ms.js\": \"./node_modules/moment/locale/ms.js\",\n\t\"./mt\": \"./node_modules/moment/locale/mt.js\",\n\t\"./mt.js\": \"./node_modules/moment/locale/mt.js\",\n\t\"./my\": \"./node_modules/moment/locale/my.js\",\n\t\"./my.js\": \"./node_modules/moment/locale/my.js\",\n\t\"./nb\": \"./node_modules/moment/locale/nb.js\",\n\t\"./nb.js\": \"./node_modules/moment/locale/nb.js\",\n\t\"./ne\": \"./node_modules/moment/locale/ne.js\",\n\t\"./ne.js\": \"./node_modules/moment/locale/ne.js\",\n\t\"./nl\": \"./node_modules/moment/locale/nl.js\",\n\t\"./nl-be\": \"./node_modules/moment/locale/nl-be.js\",\n\t\"./nl-be.js\": \"./node_modules/moment/locale/nl-be.js\",\n\t\"./nl.js\": \"./node_modules/moment/locale/nl.js\",\n\t\"./nn\": \"./node_modules/moment/locale/nn.js\",\n\t\"./nn.js\": \"./node_modules/moment/locale/nn.js\",\n\t\"./oc-lnc\": \"./node_modules/moment/locale/oc-lnc.js\",\n\t\"./oc-lnc.js\": \"./node_modules/moment/locale/oc-lnc.js\",\n\t\"./pa-in\": \"./node_modules/moment/locale/pa-in.js\",\n\t\"./pa-in.js\": \"./node_modules/moment/locale/pa-in.js\",\n\t\"./pl\": \"./node_modules/moment/locale/pl.js\",\n\t\"./pl.js\": \"./node_modules/moment/locale/pl.js\",\n\t\"./pt\": \"./node_modules/moment/locale/pt.js\",\n\t\"./pt-br\": \"./node_modules/moment/locale/pt-br.js\",\n\t\"./pt-br.js\": \"./node_modules/moment/locale/pt-br.js\",\n\t\"./pt.js\": \"./node_modules/moment/locale/pt.js\",\n\t\"./ro\": \"./node_modules/moment/locale/ro.js\",\n\t\"./ro.js\": \"./node_modules/moment/locale/ro.js\",\n\t\"./ru\": \"./node_modules/moment/locale/ru.js\",\n\t\"./ru.js\": \"./node_modules/moment/locale/ru.js\",\n\t\"./sd\": \"./node_modules/moment/locale/sd.js\",\n\t\"./sd.js\": \"./node_modules/moment/locale/sd.js\",\n\t\"./se\": \"./node_modules/moment/locale/se.js\",\n\t\"./se.js\": \"./node_modules/moment/locale/se.js\",\n\t\"./si\": \"./node_modules/moment/locale/si.js\",\n\t\"./si.js\": \"./node_modules/moment/locale/si.js\",\n\t\"./sk\": \"./node_modules/moment/locale/sk.js\",\n\t\"./sk.js\": \"./node_modules/moment/locale/sk.js\",\n\t\"./sl\": \"./node_modules/moment/locale/sl.js\",\n\t\"./sl.js\": \"./node_modules/moment/locale/sl.js\",\n\t\"./sq\": \"./node_modules/moment/locale/sq.js\",\n\t\"./sq.js\": \"./node_modules/moment/locale/sq.js\",\n\t\"./sr\": \"./node_modules/moment/locale/sr.js\",\n\t\"./sr-cyrl\": \"./node_modules/moment/locale/sr-cyrl.js\",\n\t\"./sr-cyrl.js\": \"./node_modules/moment/locale/sr-cyrl.js\",\n\t\"./sr.js\": \"./node_modules/moment/locale/sr.js\",\n\t\"./ss\": \"./node_modules/moment/locale/ss.js\",\n\t\"./ss.js\": \"./node_modules/moment/locale/ss.js\",\n\t\"./sv\": \"./node_modules/moment/locale/sv.js\",\n\t\"./sv.js\": \"./node_modules/moment/locale/sv.js\",\n\t\"./sw\": \"./node_modules/moment/locale/sw.js\",\n\t\"./sw.js\": \"./node_modules/moment/locale/sw.js\",\n\t\"./ta\": \"./node_modules/moment/locale/ta.js\",\n\t\"./ta.js\": \"./node_modules/moment/locale/ta.js\",\n\t\"./te\": \"./node_modules/moment/locale/te.js\",\n\t\"./te.js\": \"./node_modules/moment/locale/te.js\",\n\t\"./tet\": \"./node_modules/moment/locale/tet.js\",\n\t\"./tet.js\": \"./node_modules/moment/locale/tet.js\",\n\t\"./tg\": \"./node_modules/moment/locale/tg.js\",\n\t\"./tg.js\": \"./node_modules/moment/locale/tg.js\",\n\t\"./th\": \"./node_modules/moment/locale/th.js\",\n\t\"./th.js\": \"./node_modules/moment/locale/th.js\",\n\t\"./tk\": \"./node_modules/moment/locale/tk.js\",\n\t\"./tk.js\": \"./node_modules/moment/locale/tk.js\",\n\t\"./tl-ph\": \"./node_modules/moment/locale/tl-ph.js\",\n\t\"./tl-ph.js\": \"./node_modules/moment/locale/tl-ph.js\",\n\t\"./tlh\": \"./node_modules/moment/locale/tlh.js\",\n\t\"./tlh.js\": \"./node_modules/moment/locale/tlh.js\",\n\t\"./tr\": \"./node_modules/moment/locale/tr.js\",\n\t\"./tr.js\": \"./node_modules/moment/locale/tr.js\",\n\t\"./tzl\": \"./node_modules/moment/locale/tzl.js\",\n\t\"./tzl.js\": \"./node_modules/moment/locale/tzl.js\",\n\t\"./tzm\": \"./node_modules/moment/locale/tzm.js\",\n\t\"./tzm-latn\": \"./node_modules/moment/locale/tzm-latn.js\",\n\t\"./tzm-latn.js\": \"./node_modules/moment/locale/tzm-latn.js\",\n\t\"./tzm.js\": \"./node_modules/moment/locale/tzm.js\",\n\t\"./ug-cn\": \"./node_modules/moment/locale/ug-cn.js\",\n\t\"./ug-cn.js\": \"./node_modules/moment/locale/ug-cn.js\",\n\t\"./uk\": \"./node_modules/moment/locale/uk.js\",\n\t\"./uk.js\": \"./node_modules/moment/locale/uk.js\",\n\t\"./ur\": \"./node_modules/moment/locale/ur.js\",\n\t\"./ur.js\": \"./node_modules/moment/locale/ur.js\",\n\t\"./uz\": \"./node_modules/moment/locale/uz.js\",\n\t\"./uz-latn\": \"./node_modules/moment/locale/uz-latn.js\",\n\t\"./uz-latn.js\": \"./node_modules/moment/locale/uz-latn.js\",\n\t\"./uz.js\": \"./node_modules/moment/locale/uz.js\",\n\t\"./vi\": \"./node_modules/moment/locale/vi.js\",\n\t\"./vi.js\": \"./node_modules/moment/locale/vi.js\",\n\t\"./x-pseudo\": \"./node_modules/moment/locale/x-pseudo.js\",\n\t\"./x-pseudo.js\": \"./node_modules/moment/locale/x-pseudo.js\",\n\t\"./yo\": \"./node_modules/moment/locale/yo.js\",\n\t\"./yo.js\": \"./node_modules/moment/locale/yo.js\",\n\t\"./zh-cn\": \"./node_modules/moment/locale/zh-cn.js\",\n\t\"./zh-cn.js\": \"./node_modules/moment/locale/zh-cn.js\",\n\t\"./zh-hk\": \"./node_modules/moment/locale/zh-hk.js\",\n\t\"./zh-hk.js\": \"./node_modules/moment/locale/zh-hk.js\",\n\t\"./zh-mo\": \"./node_modules/moment/locale/zh-mo.js\",\n\t\"./zh-mo.js\": \"./node_modules/moment/locale/zh-mo.js\",\n\t\"./zh-tw\": \"./node_modules/moment/locale/zh-tw.js\",\n\t\"./zh-tw.js\": \"./node_modules/moment/locale/zh-tw.js\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./node_modules/moment/locale sync recursive ^\\\\.\\\\/.*$\";","export default __webpack_public_path__ + \"./fonts/autorizaciones.42cc50a6.svg\";","export default __webpack_public_path__ + \"./fonts/calendar.c6a31c00.svg\";","export default __webpack_public_path__ + \"./fonts/checkbox-checked.0fc47999.svg\";","export default __webpack_public_path__ + \"./fonts/checkbox-unchecked.478eecd3.svg\";","export default __webpack_public_path__ + \"./fonts/csv.67be4365.svg\";","export default __webpack_public_path__ + \"./fonts/download-svgrepo-com.46df6723.svg\";","export default __webpack_public_path__ + \"./fonts/i.81000d97.svg\";","export default __webpack_public_path__ + \"./fonts/keyboard_arrow_down-24px.29295fb5.svg\";","export default __webpack_public_path__ + \"./fonts/logoBancoFamiliar.7e8e4d18.svg\";","export default __webpack_public_path__ + \"./fonts/logoBancoFamiliarCuadrado.c08e2aba.svg\";","export default __webpack_public_path__ + \"./fonts/menu.d4e6eba2.svg\";","export default __webpack_public_path__ + \"./fonts/pdf.df02c011.svg\";","export default __webpack_public_path__ + \"./fonts/portafolio.be9f74a0.svg\";","export default __webpack_public_path__ + \"./fonts/x-symbol-svgrepo-com.f5457199.svg\";","export default __webpack_public_path__ + \"./fonts/xlsx.a89baac7.svg\";","export const AUTH_REQUEST = \"auth/AUTH_REQUEST\";\r\n\r\nexport const AUTH_SUCCESS = \"auth/AUTH_SUCCESS\";\r\nexport function authSuccess() {\r\n return {\r\n type: AUTH_SUCCESS,\r\n };\r\n}\r\n\r\nexport const AUTH_FAILURE = \"auth/AUTH_FAILURE\";\r\nexport function authFailure(error) {\r\n return {\r\n type: AUTH_FAILURE,\r\n payload: {\r\n error,\r\n },\r\n };\r\n}\r\n\r\nexport const CHANGE_USERNAME = \"auth/CHANGE_USERNAME\";\r\nexport function changeUsername(username) {\r\n return {\r\n type: CHANGE_USERNAME,\r\n payload: {\r\n username,\r\n },\r\n };\r\n}\r\n\r\nexport const CHANGE_PASSWORD = \"auth/CHANGE_PASSWORD\";\r\nexport function changePassword(password) {\r\n return {\r\n type: CHANGE_PASSWORD,\r\n payload: {\r\n password,\r\n },\r\n };\r\n}\r\n\r\nexport const SIGN_IN = \"auth/SIGN_IN\";\r\nexport function signIn() {\r\n return {\r\n type: SIGN_IN,\r\n };\r\n}\r\n\r\nexport const SIGN_OUT = \"auth/SIGN_OUT\";\r\nexport function signOut() {\r\n return {\r\n type: SIGN_OUT,\r\n };\r\n}\r\n\r\nexport const MUST_RESET_PASSWORD = \"auth/MUST_RESET_PASSWORD\";\r\nexport function mustResetPassword() {\r\n return {\r\n type: MUST_RESET_PASSWORD,\r\n };\r\n}\r\n","export const EVENTALERTS_SUCCESS = \"EVENTALERTS_SUCCESS\";\r\nexport const EVENTALERTS_READ = \"EVENTALERTS_READ\";\r\nexport const AUTHORIZATIONS_RELOAD = \"AUTHORIZATIONS_RELOAD\";\r\nexport const AUTHORIZATIONS_SUCCESS = \"AUTHORIZATIONS_SUCCESS\";\r\nexport const AUTHORIZATIONS_READ = \"AUTHORIZATIONS_READ\";\r\nexport const NOTIFICATIONS_RELOAD = \"NOTIFICATIONS_RELOAD\";\r\nexport const NOTIFICATIONS_SUCCESS = \"NOTIFICATIONS_SUCCESS\";\r\nexport const NOTIFICATIONS_LOADING = \"NOTIFICATIONS_LOADING\";\r\nexport const ORDER_SUCCESS = \"ORDER_SUCCESS\";\r\nexport const ACCOUNT_SET = \"ACCOUNT_SET\";\r\nexport const PERSON_INFO_SET = \"PERSON_INFO_SET\";\r\nexport const TEXTS_SET = \"TEXTS_SET\";\r\nexport const TEXTS_LOADING_SET = \"TEXTS_LOADING_SET\";\r\n\r\n\r\n\r\n\r\nexport function eventAlertsSuccess(eventAlerts) {\r\n return {\r\n type: EVENTALERTS_SUCCESS,\r\n payload: {\r\n eventAlerts,\r\n },\r\n };\r\n}\r\n\r\nexport function eventAlertsRead(id) {\r\n return {\r\n type: EVENTALERTS_READ,\r\n payload: {\r\n id,\r\n },\r\n };\r\n}\r\n\r\nexport function authorizationsReload() {\r\n return {\r\n type: AUTHORIZATIONS_RELOAD,\r\n payload: {},\r\n };\r\n}\r\n\r\nexport function authorizationsSuccess(authorizations) {\r\n return {\r\n type: AUTHORIZATIONS_SUCCESS,\r\n payload: {\r\n authorizations,\r\n },\r\n };\r\n}\r\n\r\nexport function notificationsReload() {\r\n return {\r\n type: NOTIFICATIONS_RELOAD,\r\n payload: {},\r\n };\r\n}\r\n\r\nexport function notificationsSuccess(notifications) {\r\n return {\r\n type: NOTIFICATIONS_SUCCESS,\r\n payload: {\r\n notifications,\r\n },\r\n };\r\n}\r\n\r\nexport function setNotificationsLoading(notificationsLoading) {\r\n return {\r\n type: NOTIFICATIONS_LOADING,\r\n payload: {\r\n notificationsLoading,\r\n },\r\n };\r\n}\r\n\r\nexport function currentAccountSet(account) {\r\n return {\r\n type: ACCOUNT_SET,\r\n payload: {\r\n account,\r\n },\r\n };\r\n}\r\n\r\nexport function personInfoSet(person) {\r\n return {\r\n type: PERSON_INFO_SET,\r\n payload: {\r\n person,\r\n },\r\n };\r\n}\r\n\r\nexport function textsSet(texts) {\r\n return {\r\n type: TEXTS_SET,\r\n payload: {\r\n texts,\r\n },\r\n };\r\n}\r\n\r\nexport function textsLoadingSet() {\r\n return {\r\n type: TEXTS_LOADING_SET,\r\n payload: {\r\n textsLoading: true,\r\n },\r\n };\r\n}\r\nexport const fetchTooltipsAndNotes = () => {\r\n return callApi(\"tooltips\", null, \"GET\");\r\n};\r\n\r\n","import PropTypes from \"prop-types\";\r\nimport React, { useState } from \"react\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { Alert, Card, CardBody, Col, Container, Input, InputGroup, Row } from \"reactstrap\";\r\n\r\nimport style from \"./Login.scss\";\r\nimport { showToast } from \"bx-react-ui/src/utils/Helper\";\r\n\r\nexport const ForgotPassword = ({ forgotPasswordFunction }) => {\r\n const [email, setEmail] = useState(undefined);\r\n const [error, setError] = useState(undefined);\r\n const [loading, setLoading] = useState(false);\r\n\r\n const validateEmail = (email) => {\r\n return /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/.test(email);\r\n };\r\n\r\n const send = (event) => {\r\n const emailTrim = email.trim()\r\n if (validateEmail(emailTrim)) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n setLoading(true);\r\n forgotPasswordFunction(emailTrim)\r\n .then((res) => {\r\n showToast(\"Se ha enviado un email a la direccion del correo electronico!\", false);\r\n if (res.response.error.description) {\r\n setError(res.response.error);\r\n } else {\r\n setError(undefined);\r\n }\r\n })\r\n .catch((e) => {})\r\n .finally(() => {\r\n setLoading(false);\r\n });\r\n } else {\r\n showToast(\"El email ingresado no es valido.\", true);\r\n }\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n {error && {error}}\r\n
    Recuperación de contraseña
    \r\n

    Complete el formulario para realizar la solicitud.

    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n {\r\n setEmail(e.target.value);\r\n }}\r\n />\r\n
    \r\n \r\n \r\n \r\n Enviar\r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n","import React, { useState } from \"react\";\r\nimport { Container, Row, Col, Card, CardBody, Button, Input, InputGroup, Alert } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { changeUsername, changePassword, signIn } from \"./../../actions/auth\";\r\nimport { NavLink, Redirect } from \"react-router-dom\";\r\nimport { fetchCheckPassword, changeFirstAccessPassword } from \"../../services/api/users\";\r\nimport { showToast } from \"../../utils/global\";\r\n\r\nimport style from \"./Login.scss\";\r\n\r\nconst Login = () => {\r\n const dispatch = useDispatch();\r\n const auth = useSelector((state) => state.auth);\r\n const { authenticated, error, loading, mustResetPassword } = auth;\r\n\r\n const onSignIn = (event) => {\r\n dispatch(signIn());\r\n };\r\n\r\n const onKeyDown = (event) => {\r\n if (event.key === \"Enter\") {\r\n if (auth.username && auth.password && auth.username.length > 1 && auth.password.length > 1) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n dispatch(signIn(event));\r\n }\r\n }\r\n };\r\n\r\n const onChangeUserName = (e) => {\r\n dispatch(changeUsername(e.target.value));\r\n };\r\n\r\n const onChangePassword = (e) => {\r\n dispatch(changePassword(e.target.value));\r\n };\r\n\r\n if (authenticated === true) {\r\n return ;\r\n }\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n {!mustResetPassword && (\r\n \r\n \r\n {error && {error}}\r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n \r\n \r\n {loading ? \"Accediendo\" : \"Ingresar\"}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n )}\r\n {mustResetPassword && }\r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst MAX_USER_ATTEMPS = 3;\r\n\r\nconst ResetPasswordComponent = () => {\r\n const [oldPassword, setOldPassword] = useState(\"\");\r\n const [newPassword, setNewPassword] = useState(\"\");\r\n const [confirmPassword, setConfirmPassword] = useState(\"\");\r\n const [error, setError] = useState(\"\");\r\n const [userPasswordAttempts, setUserPasswordAttempts] = useState(0);\r\n const [isLoading, setIsLoading] = useState(false);\r\n const [policies, setPolicies] = useState([]);\r\n\r\n const dispatch = useDispatch();\r\n const auth = useSelector((state) => state.auth);\r\n const { loading, username } = auth;\r\n\r\n const handlePasswordChange = () => {\r\n if (username && username !== \"\") {\r\n fetchCheckPassword(username, oldPassword)\r\n .then((res) => {\r\n if (res.response.result[\"Code\"] === 400) {\r\n setError(\"La contraseña actual no es correcta.\");\r\n setPolicies([]);\r\n setUserPasswordAttempts((prevState) => prevState + 1);\r\n } else {\r\n //The current password is correct\r\n setUserPasswordAttempts(0);\r\n if (newPassword !== confirmPassword) {\r\n setError(\"Las contraseñas no coinciden.\");\r\n setPolicies([]);\r\n } else if (newPassword === oldPassword) {\r\n setError(\"La contraseña nueva no puede ser igual a la actual.\");\r\n } else {\r\n //Everything OK, continue\r\n changeFirstAccessPassword(username, oldPassword, newPassword)\r\n .then((res) => {\r\n if (res.response.result[\"Code\"] === 400) {\r\n const minLength =\r\n res.response.sdtSecurityPolicy.MinLengthPassword > 0\r\n ? `Largo mínimo: ${res.response.sdtSecurityPolicy.MinLengthPassword}`\r\n : \"\";\r\n const minNumericChars =\r\n res.response.sdtSecurityPolicy.MinNumericCharacters > 0\r\n ? `Cantidad de números: ${res.response.sdtSecurityPolicy.MinNumericCharacters}`\r\n : \"\";\r\n const minSpecialChars =\r\n res.response.sdtSecurityPolicy.MinSpecialCharacters > 0\r\n ? `Cantidad de caracteres especiales: ${res.response.sdtSecurityPolicy.MinSpecialCharacters}`\r\n : \"\";\r\n const minUpperCaseChars =\r\n res.response.sdtSecurityPolicy.MinUpperCaseCharacters > 0\r\n ? `Cantidad de caracteres en mayúscula: ${res.response.sdtSecurityPolicy.MinUpperCaseCharacters}`\r\n : \"\";\r\n\r\n setPolicies([minLength, minNumericChars, minSpecialChars, minUpperCaseChars]);\r\n\r\n setError(\"La contraseña debe cumplir los siguientes requisitos:\", true);\r\n\r\n `${style.inputGroup} mb-4`;\r\n } else {\r\n //Everything OK\r\n setError(\"\");\r\n setPolicies([]);\r\n setIsLoading(true);\r\n dispatch(changePassword(newPassword));\r\n dispatch(signIn());\r\n }\r\n })\r\n .catch((err) => {\r\n setPolicies([]);\r\n showToast(\r\n \"Hubo un error cambiando la contraseña, por favor contacte al administrador.\",\r\n true\r\n );\r\n });\r\n }\r\n }\r\n })\r\n .catch((err) =>\r\n showToast(\"Hubo un error cambiando la contraseña, por favor contacte al administrador.\", true)\r\n );\r\n }\r\n };\r\n\r\n const onKeyDown = (event) => {\r\n if (event.key === \"Enter\") {\r\n if (oldPassword !== \"\" && newPassword !== \"\" && confirmPassword !== \"\") {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n handlePasswordChange();\r\n }\r\n }\r\n };\r\n\r\n if (userPasswordAttempts >= MAX_USER_ATTEMPS) {\r\n //if try more than 3 times then restart process\r\n return window.location.reload();\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n Antes de continuar por favor realice un cambio de contraseña\r\n \r\n \r\n {error && (\r\n
    \r\n \r\n {error}\r\n {policies.map((line) => (\r\n

    {line}

    \r\n ))}\r\n {userPasswordAttempts > 0 ? ` Quedan ${MAX_USER_ATTEMPS - userPasswordAttempts} intentos` : \"\"}\r\n
    \r\n
    \r\n )}\r\n

    Contraseña actual

    \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n setOldPassword(e.target.value)}\r\n />\r\n
    \r\n

    Nueva contraseña

    \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n setNewPassword(e.target.value)}\r\n />\r\n
    \r\n

    Confirmar contraseña

    \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n setConfirmPassword(e.target.value)}\r\n />\r\n
    \r\n \r\n \r\n handlePasswordChange()}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {loading ? \"Actualizando\" : \"Actualizar\"}\r\n \r\n \r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default Login;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"background\":\"Login_background_nxPl-\",\"container\":\"Login_container_hTTed\",\"col\":\"Login_col_20qJx\",\"card\":\"Login_card_2zuVp\",\"inputGroup\":\"Login_inputGroup_84B2A\",\"iconContainer\":\"Login_iconContainer_wE2ip\",\"logo\":\"Login_logo_N1umq\",\"boton\":\"Login_boton_2ICit\"};","import React, { Component } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { Route, Redirect, withRouter } from 'react-router-dom'\r\n\r\nconst PrivateRouteComponent = ({ component: Component, ...rest }) => (\r\n {\r\n return (\r\n rest.authenticated == true\r\n ? \r\n : \r\n )\r\n }\r\n} />\r\n)\r\n\r\nfunction mapStateToProps(state) {\r\n\treturn { authenticated: state.auth.authenticated};\r\n}\r\n\r\nexport default withRouter(connect(mapStateToProps)(PrivateRouteComponent));\r\n\r\n","import React from \"react\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { Alert, Button, Card, CardBody, Col, Container, Input, InputGroup, Row } from \"reactstrap\";\r\nimport { useState } from \"react\";\r\nimport { useQuery } from \"../../utils/hooks/useQuery\";\r\nimport { showToast } from \"bx-react-ui/src/utils/Helper\";\r\n\r\nimport style from \"./ResetPassword.scss\";\r\nimport { Link, Redirect } from \"react-router-dom/cjs/react-router-dom.min\";\r\n\r\nconst initalValue = {\r\n newPassword: \"\",\r\n confirmNewPassword: \"\",\r\n};\r\n\r\nconst RecoveryPassword = ({ recoveryPasswordFunction }) => {\r\n const [fields, setFields] = useState(initalValue);\r\n const [loading, setLoading] = useState(false);\r\n const [completed, setCompleted] = useState(false);\r\n\r\n let query = useQuery();\r\n const token = query.get(\"token\");\r\n const username = query.get(\"username\");\r\n\r\n const isValidParams = () => token && username && token != \"\" && username != \"\";\r\n\r\n const handleChange = (e) => {\r\n const { name, value } = e.target;\r\n setFields({\r\n ...fields,\r\n [name]: value,\r\n });\r\n };\r\n\r\n const isValidForm = () => {\r\n const passwordsMatch = (pass, confirmPas) => pass === confirmPas;\r\n const isEmpty = (value) => value == \"\";\r\n let error = \"\";\r\n\r\n if (isEmpty(fields.newPassword)) {\r\n error = \"Debes ingresar una contraseña.\";\r\n } else if (fields.newPassword.length < 8) {\r\n error = \"La contraseña debe tener almenos 8 caracteres.\";\r\n } else if (isEmpty(fields.confirmNewPassword)) {\r\n error = \"Debes ingresar la nueva contraseña.\";\r\n } else if (!passwordsMatch(fields.newPassword, fields.confirmNewPassword)) {\r\n error = \"Las contraseñas deben coincidir.\";\r\n }\r\n\r\n const isValid = isEmpty(error);\r\n\r\n if (!isValid) {\r\n showToast(error, true);\r\n }\r\n\r\n return isValid;\r\n };\r\n\r\n const handleSubmit = (e) => {\r\n e.preventDefault();\r\n\r\n if (!isValidForm()) {\r\n return;\r\n }\r\n\r\n setLoading(true);\r\n recoveryPasswordFunction(username, fields.newPassword, token)\r\n .then((data) => {\r\n console.log(data);\r\n if (data.response.result.Code === 200) {\r\n setCompleted(true);\r\n } else {\r\n if (data.response.result.Description === \"wrongParams\"){\r\n showToast(\r\n
    \r\n El enlace de recuperación de contraseña ha expirado por motivos de seguridad.\r\n
    \r\n Por favor, solicita una nueva recuperación de contraseña para continuar con el proceso.\r\n
    ,\r\n true\r\n ); \r\n }\r\n else {\r\n showToast(data.response.result.Description, true);\r\n }\r\n }\r\n })\r\n .catch((e) => {\r\n showToast(\"Ocurrio un error interno, intente nuevamente mas tarde\", true);\r\n })\r\n .finally((e) => {\r\n setLoading(false);\r\n setFields(initalValue);\r\n });\r\n };\r\n\r\n if (!isValidParams()) {\r\n return ;\r\n }\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!completed ? (\r\n \r\n
    Restablece tu contraseña
    \r\n

    Complete el formulario para restablecer su contraseña.

    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n\r\n \r\n
    \r\n
    \r\n\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n Enviar\r\n \r\n \r\n \r\n
    \r\n ) : (\r\n \r\n \r\n \r\n ¡Contraseña cambiada con éxito!\r\n \r\n Vuelve a iniciar sesion\r\n \r\n \r\n )}\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default RecoveryPassword;\r\n","import PropTypes from \"prop-types\";\r\nimport React, { Fragment, useState } from \"react\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { Alert, Button, Card, CardBody, Col, Container, Input, InputGroup, Row } from \"reactstrap\";\r\nimport { showToast } from \"../../utils/global\";\r\nimport { signOut } from \"../../actions/auth\";\r\nimport { useDispatch } from \"react-redux\";\r\n\r\nimport style from \"./ResetPassword.scss\";\r\n\r\nexport const ResetPassword = ({ resetPasswordFunction, checkPassword }) => {\r\n const [loading, setLoading] = useState(false);\r\n const [currentPassword, setCurrentPassword] = useState(\"\");\r\n const [newpassword, setnewPassword] = useState(\"\");\r\n const [newpassword2, setnewPassword2] = useState(\"\");\r\n const [completed, setCompleted] = useState(false);\r\n const username = JSON.parse(sessionStorage.getItem(\"context\")).session.Username;\r\n const dispatch = useDispatch();\r\n\r\n const send = (event) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n\r\n checkPassword(username, currentPassword)\r\n .then((res) => {\r\n if (res.response.result[\"Code\"] === 400) {\r\n showToast(\"La contraseña actual no es correcta.\", true);\r\n } else {\r\n //The current password is correct\r\n if (newpassword != newpassword2) {\r\n showToast(\"Las contraseñas no coinciden\", true);\r\n } else if (newpassword.length < 8 && newpassword2.length < 8) {\r\n showToast(\"Las contraseñas deben tener al menos 8 caracteres.\", true);\r\n } else {\r\n setLoading(true);\r\n setCompleted(false);\r\n\r\n if (currentPassword === newpassword && currentPassword === newpassword2) {\r\n showToast(\"La contraseña nueva no puede ser igual a la actual.\", true);\r\n setLoading(false);\r\n } else {\r\n resetPasswordFunction(username, newpassword)\r\n .then((res) => {\r\n if (res.response.result[\"Code\"] === 400) {\r\n showToast(res.response.result[\"Description\"], true);\r\n } else {\r\n setCompleted(true);\r\n }\r\n })\r\n .catch((e) => {\r\n console.error(e);\r\n })\r\n .finally(() => {\r\n setLoading(false);\r\n });\r\n }\r\n }\r\n }\r\n })\r\n .catch((e) => {\r\n console.error(e);\r\n });\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    Inserte su nueva contraseña:
    \r\n

    *La contraseña debe tener al menos 8 caracteres

    \r\n {!completed ? (\r\n \r\n

    Contraseña actual

    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n\r\n setCurrentPassword(e.target.value)}\r\n />\r\n
    \r\n
    \r\n

    Nueva contraseña

    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n\r\n setnewPassword(e.target.value)}\r\n />\r\n
    \r\n
    \r\n

    Confirmar nueva contraseña

    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n setnewPassword2(e.target.value)}\r\n />\r\n
    \r\n
    \r\n \r\n \r\n \r\n Enviar\r\n \r\n \r\n \r\n
    \r\n ) : (\r\n \r\n \r\n ¡Contraseña cambiada con éxito!\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"background\":\"ResetPassword_background_1YGMx\",\"container\":\"ResetPassword_container_2c5uo\",\"card\":\"ResetPassword_card_2VoL3\",\"inputGroup\":\"ResetPassword_inputGroup_1yww8\",\"flexContainer\":\"ResetPassword_flexContainer_1k8yS\",\"iconContainer\":\"ResetPassword_iconContainer_2m-4C\",\"input\":\"ResetPassword_input_1Z4pz\",\"errorText\":\"ResetPassword_errorText_1MN22\",\"logo\":\"ResetPassword_logo_1DyBq\",\"buttonContainer\":\"ResetPassword_buttonContainer_iJfx6\",\"button\":\"ResetPassword_button_GYVPp\",\"successCard\":\"ResetPassword_successCard_2CGmM\",\"link\":\"ResetPassword_link_3J6Vg\",\"successButton\":\"ResetPassword_successButton_3tSMZ\"};","import React, { useState, useEffect } from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { CircularProgress } from \"bx-react-ui\";\r\n\r\nimport { getAuthorizations, getCurrentAccount } from \"../../reducers/selectors\";\r\nimport { getAuthorizationsService } from \"../../services/api/authorizations\";\r\nimport { authorizationsSuccess } from \"../../actions/entities\";\r\nimport { respondAuthorization } from \"../../services/api/authorizations\";\r\nimport { showToast } from \"../../utils/helper\";\r\nimport { Grid } from \"./Grid/Grid\";\r\n\r\nconst AuthorizationComponent = () => {\r\n const [loading, setLoading] = useState(true);\r\n const authorizations = useSelector(getAuthorizations);\r\n const dispatch = useDispatch();\r\n\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const isReadOnly = currentAccount.isReadOnly;\r\n\r\n if (isReadOnly) {\r\n window.location.href = \"/\";\r\n return null;\r\n }\r\n\r\n useEffect(() => {\r\n getAuthorizationsAsync();\r\n }, []);\r\n\r\n const getAuthorizationsAsync = async () => {\r\n setLoading(() => true);\r\n\r\n try {\r\n const { response } = await getAuthorizationsService();\r\n const newAuthorizations = response.authorizations.filter((authItem) => authItem.processedBy === \"\");\r\n dispatch(authorizationsSuccess(newAuthorizations));\r\n } catch (error) {\r\n console.error(err);\r\n showToast(\"Error obteniendo autorizaciones del servidor\", true);\r\n dispatch(authorizationsSuccess([]));\r\n }\r\n\r\n setLoading(() => false);\r\n };\r\n\r\n const handleReject = async (payload) => {\r\n setLoading(() => true);\r\n\r\n try {\r\n const { response } = await respondAuthorization(payload);\r\n if (response.result.Code !== 200) {\r\n showToast(\"Error procesando autorización\", true);\r\n } else {\r\n showToast(\"Autorización rechazada correctamente\");\r\n }\r\n\r\n await getAuthorizationsAsync();\r\n } catch (error) {\r\n console.error(error);\r\n showToast(\"Error procesando autorización\", true);\r\n }\r\n\r\n setLoading(() => false);\r\n };\r\n\r\n const handleAuthorize = async (payload) => {\r\n setLoading(() => true);\r\n\r\n try {\r\n const { response } = await respondAuthorization(payload);\r\n if (response.result.Code !== 200) {\r\n showToast(\"Error procesando autorización\", true);\r\n } else {\r\n showToast(\"Autorización aprobada correctamente\");\r\n }\r\n\r\n await getAuthorizationsAsync();\r\n } catch (error) {\r\n console.error(error);\r\n showToast(\"Error procesando autorización\", true);\r\n }\r\n\r\n setLoading(() => false);\r\n };\r\n\r\n if (loading) return ;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\nexport default AuthorizationComponent;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Button } from \"reactstrap\";\r\nimport { FormattedNumber } from \"bx-react-ui/src/components/FormattedNumber/FormattedNumber\";\r\nimport moment from \"moment\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\n\r\nimport { fetchInProcesOrderPDF } from \"../../../../services/api/accounts\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { getCurrentAccount } from \"../../../../reducers/selectors\";\r\nimport pdf from \"../../../../../public/svg/pdf.svg\";\r\n\r\nimport style from \"./AuthorizationRow.scss\";\r\n\r\nconst AuthorizationRow = ({\r\n authItem,\r\n side,\r\n description,\r\n ammount,\r\n operationValue,\r\n currency,\r\n idx,\r\n onAuthorize,\r\n onReject,\r\n loading,\r\n setLoading,\r\n}) => {\r\n const [order, setOrder] = useState(null);\r\n const currentAccount = useSelector(getCurrentAccount);\r\n\r\n useEffect(() => {\r\n if (authItem) {\r\n if (authItem.process === \"Order\" && authItem.info) {\r\n const orderInfo = JSON.parse(authItem.info);\r\n orderInfo.currency = orderInfo.OrderCurrencySymbol;\r\n orderInfo.ammount = 0;\r\n\r\n switch (orderInfo.OrderType.trim()) {\r\n case \"Market\":\r\n case \"MarketOnOpen\":\r\n case \"MarketOnClose\":\r\n orderInfo.ammountString = \"Mercado\";\r\n break;\r\n case \"Limit\":\r\n orderInfo.ammountString = \"Limit\";\r\n orderInfo.ammount = orderInfo.OrderPrice;\r\n break;\r\n case \"Stop\":\r\n orderInfo.ammountString = \"Stop\";\r\n orderInfo.ammount = orderInfo.OrderStopPrice;\r\n break;\r\n case \"StopLimit\":\r\n orderInfo.ammountString = \"Stop Limit\";\r\n orderInfo.ammount = orderInfo.OrderStopPrice;\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n setOrder(orderInfo);\r\n }\r\n }\r\n }, [authItem]);\r\n\r\n const handleDownload = (order) => {\r\n setLoading(() => true);\r\n fetchInProcesOrderPDF({\r\n orderId: order.OrderId,\r\n accountId: order.CurrentAccount.AccountId,\r\n })\r\n .then(({ response }) => {\r\n if (response.result.Code !== 200) {\r\n showToast(\"Error obteniendo pdf del servidor\", true);\r\n } else {\r\n var a = document.createElement(\"A\");\r\n a.href = `data:application/octet-stream;base64,${response.blobfile}`;\r\n a.download = `${moment(order.OrderInitDate).format(\"DD-MM-YY\")}-${order.OrderId}.pdf`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n }\r\n })\r\n .catch((err) => console.error(err))\r\n .finally(() => {\r\n setLoading(() => false);\r\n });\r\n };\r\n\r\n const onAuthorizeWrapper = () => {\r\n if(window.confirm('¿Seguro que desea Autorizar?')){\r\n const id = authItem.id;\r\n const accepted = true;\r\n onAuthorize({ id, accepted });\r\n }else{\r\n }\r\n };\r\n\r\n const onRejectWrapper = () => {\r\n if(window.confirm('¿Seguro que desea Rechazar?')){\r\n onReject(authItem);\r\n }else{\r\n\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n {order ? order.OrderId : null}\r\n {moment(authItem.dateTime).format(\"DD/MM/YYYY\")}\r\n {side}\r\n {description ? description : \"-\"}\r\n \r\n {+ammount === 0 ? \"-\" : }\r\n \r\n \r\n \r\n \r\n {currency}\r\n \r\n \"pdf-icon\" handleDownload(order)} />\r\n \r\n \r\n \r\n rechazar\r\n \r\n \r\n autorizar\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default AuthorizationRow;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"tableRow\":\"AuthorizationRow_tableRow_3pk8n\",\"button\":\"AuthorizationRow_button_22jbp\",\"icon\":\"AuthorizationRow_icon_37u4U\",\"md\":\"AuthorizationRow_md_3YVnH\",\"sm\":\"AuthorizationRow_sm_A-WDE\"};","import React from \"react\";\r\nimport { Col, Row, Table } from \"reactstrap\";\r\nimport { Warning } from \"../../Warning/Warning\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { CircularProgress } from \"bx-react-ui\";\r\nimport { getTexts } from \"../../../reducers/selectors\";\r\n\r\nimport style from \"./Grid.scss\";\r\nimport AuthorizationRow from \"./AuthorizationRow/AuthorizationRow\";\r\n\r\nexport const Grid = ({ authorizations, onAuthorize, onReject, loading, setLoading }) => {\r\n const texts = useSelector(getTexts);\r\n\r\n const EmptyAuthorizations = () => {\r\n return (\r\n
    \r\n

    No hay autorizaciones

    \r\n
    \r\n );\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n {loading ? : null}\r\n {authorizations.length === 0 && loading === false ? (\r\n \r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {authorizations.map((authorizationItem, idx) => {\r\n let description = \"\";\r\n let ammountString = \"\";\r\n let operationValue = \"\";\r\n let ammount = 0;\r\n let currency = \"\";\r\n let side = \"\";\r\n\r\n if (authorizationItem.process === \"Order\" && authorizationItem.info) {\r\n const orderInfo = JSON.parse(authorizationItem.info);\r\n currency = orderInfo.OrderCurrencySymbol;\r\n\r\n side = orderInfo.OrderSide.trim() === \"Buy\" ? \"Compra \" : \"Venta \";\r\n\r\n if (orderInfo.AssetClassForm.trim() === \"Mutual Funds\") {\r\n if (orderInfo.OrderSide.trim() === \"Buy\") {\r\n side = \"Suscripción \";\r\n } else {\r\n side = orderInfo.CurrentAccount.IsFullLiquidation\r\n ? \"Rescate Total \"\r\n : \"Rescate Parcial \";\r\n }\r\n }\r\n\r\n if (orderInfo.AssetClassForm.trim() === \"Repo\") {\r\n side = orderInfo.OrderSide.trim() === \"Buy\" ? \"Reportador \" : \"Reportado \";\r\n }\r\n\r\n description += `${orderInfo.AssetTicker.trim()} - ${orderInfo.AssetDescription.trim()} `;\r\n operationValue = orderInfo.CurrentAccount.Precheck.Total;\r\n\r\n switch (orderInfo.OrderType.trim()) {\r\n case \"Market\":\r\n case \"MarketOnOpen\":\r\n case \"MarketOnClose\":\r\n ammountString = \"Mercado\";\r\n break;\r\n case \"Limit\":\r\n ammountString = \"Limit\";\r\n ammount = orderInfo.OrderPrice;\r\n break;\r\n case \"Stop\":\r\n ammountString = \"Stop\";\r\n ammount = orderInfo.OrderStopPrice;\r\n break;\r\n case \"StopLimit\":\r\n ammountString = \"Stop Limit\";\r\n ammount = orderInfo.OrderStopPrice;\r\n break;\r\n default:\r\n break;\r\n }\r\n description += `@ ${ammountString}`;\r\n }\r\n return (\r\n \r\n );\r\n })}\r\n \r\n
    Nro. OrdenFechaTipoDescripciónPrecio\r\n Monto Total\r\n Moneda
    \r\n
    \r\n \r\n \r\n \r\n
    )}\r\n \r\n
    \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"wrapperCol\":\"Grid_wrapperCol_3dfBc\",\"emptyWrapper\":\"Grid_emptyWrapper_ciUoW\",\"emptyMessage\":\"Grid_emptyMessage_2gxx7\",\"authorizationsTableRow\":\"Grid_authorizationsTableRow_2HRXw\",\"table\":\"Grid_table_UgZj8\",\"tableHead\":\"Grid_tableHead_2PNQE\",\"tableRow\":\"Grid_tableRow_2PO0H\",\"tableH\":\"Grid_tableH_1hJK3\",\"tableBody\":\"Grid_tableBody_2mZgs\",\"md\":\"Grid_md_9PRx6\",\"sm\":\"Grid_sm_1ZyFE\",\"warning\":\"Grid_warning_2lYod\"};","import React from 'react'\r\nimport style from \"./EmptyValues.scss\"\r\n\r\nconst EmptyValues = ({table=false, text}) => (\r\n
    \r\n

    {text}

    \r\n
    \r\n );\r\n\r\nexport default EmptyValues","// extracted by mini-css-extract-plugin\nmodule.exports = {\"emptyWrapper\":\"EmptyValues_emptyWrapper_2fNdg\",\"emptyMessage\":\"EmptyValues_emptyMessage_3SeRl\"};","import React from \"react\";\r\n\r\nconst decimalSeparator = (() => {\r\n if (\r\n typeof window !== \"undefined\" &&\r\n window.___APP_CONFIG___ &&\r\n window.___APP_CONFIG___.DECIMAL_SEPARATOR == \",\"\r\n )\r\n return \",\";\r\n return \".\";\r\n})();\r\n\r\nconst thousandSeparator = (() => {\r\n if (\r\n typeof window !== \"undefined\" &&\r\n window.___APP_CONFIG___ &&\r\n window.___APP_CONFIG___.DECIMAL_SEPARATOR == \",\"\r\n )\r\n return \".\";\r\n return \",\";\r\n})();\r\n\r\nconst currency =\r\n typeof window !== \"undefined\" && window.___APP_CONFIG___\r\n ? window.___APP_CONFIG___.DATA_TYPE_DECIMALS.CURRENCY\r\n : \"2\";\r\n\r\nconst price =\r\n typeof window !== \"undefined\" && window.___APP_CONFIG___\r\n ? window.___APP_CONFIG___.DATA_TYPE_DECIMALS.PRICE\r\n : \"4\";\r\n\r\nconst quantity =\r\n typeof window !== \"undefined\" && window.___APP_CONFIG___\r\n ? window.___APP_CONFIG___.DATA_TYPE_DECIMALS.QUANTITY\r\n : \"8\";\r\n\r\nconst percentage =\r\n typeof window !== \"undefined\" && window.___APP_CONFIG___\r\n ? window.___APP_CONFIG___.DATA_TYPE_DECIMALS.PERCENTAGE\r\n : \"2\";\r\n\r\nconst defaultValue =\r\n typeof window !== \"undefined\" && window.___APP_CONFIG___\r\n ? window.___APP_CONFIG___.DATA_TYPE_DECIMALS.DEFAULT\r\n : \"8\";\r\n\r\nconst decimalAmount = {\r\n quantity: quantity,\r\n price: price,\r\n currency: currency,\r\n percentage: percentage,\r\n default: defaultValue,\r\n};\r\n\r\nexport const formattedNumber = (value, dataTypeDecimalName = \"default\", decimalScale = null, removeZeros) => {\r\n dataTypeDecimalName = dataTypeDecimalName.toString().toLowerCase().trim();\r\n\r\n // decimalScale < 0 ? (decimalScale = decimalScale * -1) : null;\r\n decimalAmount[dataTypeDecimalName] === undefined ? (dataTypeDecimalName = \"default\") : null;\r\n\r\n // removeZeros === undefined && dataTypeDecimalName === \"quantity\" ? (removeZeros = true) : null;\r\n\r\n decimalScale = null;\r\n removeZeros = true;\r\n\r\n let isNegative = false;\r\n let res = \"\" + value;\r\n res = res.trim();\r\n if (value === null || value === undefined || value === \"\") return \"\";\r\n\r\n //If it's negative we'll ignore the - sign until the end.\r\n if (value < 0) {\r\n isNegative = true;\r\n res = value * -1 + \"\";\r\n }\r\n\r\n if (dataTypeDecimalName === \"default\" || dataTypeDecimalName === \"currency\" || dataTypeDecimalName === \"percentage\") {\r\n //Here we change the decimal number amount.\r\n if (res.includes(\".\")) {\r\n if (decimalScale != null) {\r\n res = parseFloat(res).toFixed(decimalScale);\r\n } else {\r\n res = parseFloat(res).toFixed(decimalAmount[dataTypeDecimalName]);\r\n }\r\n } else {\r\n if (decimalScale != null) {\r\n res = parseFloat(res).toFixed(decimalScale) + \"\";\r\n } else {\r\n res = parseFloat(res).toFixed(decimalAmount[dataTypeDecimalName]) + \"\";\r\n }\r\n }\r\n }\r\n\r\n //Here we change the decimal and thousands separators.\r\n if (res.includes(\".\")) {\r\n res = res.split(\".\");\r\n if (thousandSeparator === \".\") {\r\n res = parseInt(res[0]).toLocaleString(\"es-ES\") + decimalSeparator + res[1];\r\n } else {\r\n res = parseInt(res[0]).toLocaleString(\"en-US\") + decimalSeparator + res[1];\r\n }\r\n } else {\r\n if (thousandSeparator === \".\") {\r\n res = parseInt(res).toLocaleString(\"es-ES\");\r\n } else {\r\n res = parseInt(res).toLocaleString(\"en-US\");\r\n }\r\n }\r\n\r\n //If value is a 4 digit number we have to manually add a thousand separator\r\n if (\r\n (res.includes(decimalSeparator) && res.split(decimalSeparator)[0].length === 4) ||\r\n (!res.includes(decimalSeparator) && res.length === 4)\r\n ) {\r\n res = res.split(\"\")[0] + thousandSeparator + res.substr(1, res.length);\r\n }\r\n\r\n if (isNaN(parseFloat(res))) return \"*****\";\r\n if (isNegative && parseFloat(res) != 0 && !removeZeros) res = \"-\" + res;\r\n if (isNegative && parseFloat(res) != 0 && removeZeros) res = \"-\" + removeZeroesInDecimals(res);\r\n if (!isNegative && removeZeros) return removeZeroesInDecimals(res);\r\n return res;\r\n};\r\n\r\nexport const FormattedNumber = ({\r\n value,\r\n dataTypeDecimalName = \"default\",\r\n decimalScale = null,\r\n removeZeros,\r\n}) => {\r\n decimalScale = null;\r\n removeZeros = true;\r\n return (\r\n \r\n {formattedNumber(value, dataTypeDecimalName, decimalScale, removeZeros) == \"NaN\"\r\n ? \"-\"\r\n : formattedNumber(value, dataTypeDecimalName, decimalScale, removeZeros)}\r\n \r\n );\r\n};\r\n\r\nexport const removeZeroesInDecimals = (value) => {\r\n try {\r\n const regexString =\r\n decimalSeparator === \",\"\r\n ? /^([\\d.]+)$|^([\\d.]+)\\,0*$|^([\\d.]+\\,[0-9]*?)0*$/\r\n : /^([\\d,]+)$|^([\\d,]+)\\.0*$|^([\\d,]+\\.[0-9]*?)0*$/;\r\n\r\n return value.toString().replace(regexString, \"$1$2$3\");\r\n } catch (err) {\r\n return value;\r\n }\r\n};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"wrapperCol\":\"Help_wrapperCol_Gemuf\",\"subTitle\":\"Help_subTitle_1BXIJ\",\"infoContainer\":\"Help_infoContainer_pmKQx\",\"profile\":\"Help_profile_ixn5l\",\"infoText\":\"Help_infoText_2n6pM\",\"calendarSvg\":\"Help_calendarSvg_2OTu3\",\"contactInfoWrapper\":\"Help_contactInfoWrapper_2Jggr\",\"cellphone\":\"Help_cellphone_2i6up\",\"email\":\"Help_email_1rI6H\",\"questionsContainer\":\"Help_questionsContainer_24Sr7\",\"questionTitle\":\"Help_questionTitle_3YXG8\",\"title\":\"Help_title_365r3\"};","import React from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { Col, Row } from \"reactstrap\";\r\n\r\nimport { getCurrentAccount } from \"../../reducers/selectors\";\r\nimport calendar from \"../../../public/svg/calendar.svg\";\r\n\r\nimport style from \"./Help.scss\";\r\nimport { getTexts } from \"../../reducers/selectors\";\r\n\r\nexport const HelpComponent = () => {\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const texts = useSelector(getTexts);\r\n const initials = `${currentAccount.advisorName.substring(\r\n 0,\r\n 1\r\n )}${currentAccount.advisorFirstLastName.substring(0, 1)}`;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n

    Informaciones y consultas:

    \r\n
    \r\n
    \r\n

    {initials}

    \r\n
    \r\n \r\n

    {`${currentAccount.advisorName} ${currentAccount.advisorFirstLastName}`}

    \r\n

    Asesor financiero

    \r\n \r\n \r\n

    teléfono

    \r\n

    \r\n {currentAccount.advisorPhone ? {currentAccount.advisorPhone} : \"-\"}\r\n

    \r\n
    \r\n \r\n

    correo electrónico

    \r\n

    \r\n \r\n {currentAccount.advisorEmail ? {currentAccount.advisorEmail} : \"-\"}\r\n \r\n

    \r\n
    \r\n
    \r\n \r\n \"calendar\"\r\n

    {texts.notes.help_text}

    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n );\r\n};\r\n","import React, { useState } from \"react\";\r\nimport style from \"./DropdownBuySell.scss\";\r\nimport { DropdownMenu, DropdownToggle, DropdownItem, UncontrolledDropdown } from \"reactstrap\";\r\nimport { fetchgetTradeTicketClient } from \"../../services/api/accounts\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { getCurrentAccount } from \"../../reducers/selectors\";\r\n\r\nconst DropdownBuySell = ({ itemTrade }) => {\r\n const [isOpen, setIsOpen] = useState(false);\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const [loading, setLoading] = useState(true);\r\n const menuOptions = [\"Certificado de Operación\", \"Liquidación de Operaciones\"];\r\n const handleItemClick = (item) => {\r\n setIsOpen(false);\r\n handleDownloadCertificates(itemTrade);\r\n };\r\n\r\n const menuItems = menuOptions.map((option, index) => (\r\n
  • handleItemClick(option)}>
  • \r\n ));\r\n\r\n // Arreglo con dos elementos para descarga\r\n const productTypes = [\r\n { id: 1, name: \"Certificado de Operación y Liquidación de Operación.\" },\r\n //{ id: 2, name: 'Liquidación de Operaciones' },\r\n ];\r\n\r\n const handleDownloadCertificates = (item) => {\r\n setLoading(() => true);\r\n fetchgetTradeTicketClient({\r\n journalEntryId: item.journalEntryId,\r\n accountId: currentAccount.id,\r\n })\r\n .then(({ response }) => {\r\n if (response.result.Code !== 200) {\r\n showToast(\"Error obteniendo pdf del servidor\", true);\r\n } else {\r\n var a = document.createElement(\"A\");\r\n a.href = `data:application/octet-stream;base64,${response.blobfile}`;\r\n a.download = `${item.journalEntryId}-${currentAccount.id}.pdf`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n }\r\n })\r\n .catch((err) => console.error(err))\r\n .finally(() => {\r\n setLoading(() => false);\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n Descargar\r\n \r\n \r\n {productTypes.map((type, index) => (\r\n handleItemClick(type.id)}>\r\n {type.name}\r\n \r\n ))}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default DropdownBuySell;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"dropdownButton\":\"DropdownBuySell_dropdownButton_1el1h\",\"dropdownMenu\":\"DropdownBuySell_dropdownMenu_Oxh29\",\"dropdownMenuActive\":\"DropdownBuySell_dropdownMenuActive_DBE2_\",\"dropdownFont\":\"DropdownBuySell_dropdownFont_26mRr\"};","import React, { Fragment, useState, useEffect } from \"react\";\r\nimport { Field, ToggleSwitch, MainCard, CircularProgress } from \"bx-react-ui\";\r\nimport {\r\n Row,\r\n Table,\r\n Col,\r\n DropdownToggle,\r\n DropdownMenu,\r\n DropdownItem,\r\n Dropdown,\r\n Input,\r\n Container,\r\n} from \"reactstrap\";\r\nimport { useSelector } from \"react-redux\";\r\nimport {\r\n fetchGetPortfolioNoLogs,\r\n fetchGetActivity,\r\n fetchGetActivityProduct,\r\n fetchProductActivityPDF,\r\n} from \"../../services/api/accounts\";\r\nimport { getHistoryXLS, getHistoryCSV } from \"../../services/api/accounts\";\r\nimport { getCurrentAccount } from \"../../reducers/selectors\";\r\nimport { showToast } from \"../../utils/helper\";\r\nimport arrow from \"../../../public/svg/keyboard_arrow_down-24px.svg\";\r\nimport moment from \"moment\";\r\nimport { toPascalCase } from \"../../utils/helper\";\r\nimport { Warning } from \"../Warning/Warning\";\r\nimport { FormattedNumber } from \"bx-react-ui/src/components/FormattedNumber/FormattedNumber\";\r\n\r\nimport pdf from \"../../../public/svg/pdf.svg\";\r\nimport excel from \"../../../public/svg/xlsx.svg\";\r\nimport csv from \"../../../public/svg/csv.svg\";\r\n\r\nimport style from \"./HistoryForm.scss\";\r\nimport EmptyValues from \"../EmptyValues/EmptyValues\";\r\n\r\nimport { getTexts } from \"../../reducers/selectors\";\r\nimport DropdownBuySell from \"./DropdownBuySell\";\r\n\r\nexport const HistoryForm = () => {\r\n const texts = useSelector(getTexts);\r\n\r\n const [loadingPosition, setLoadingPosition] = useState(true);\r\n const [portfolioNoLogs, setPortfolioNoLogs] = useState([]);\r\n const [activity, setActivity] = useState();\r\n\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const [userDropdownIsOpen, setUserDropdownIsOpen] = useState(false);\r\n\r\n const todayDate = new Date().toISOString().slice(0, 10);\r\n\r\n const [fromDate, setFromDate] = useState(todayDate);\r\n const [toDate, setToDate] = useState(todayDate);\r\n const [currencyFilter, setCurrency] = useState({ id: 0, instrumento: \"\" });\r\n\r\n const [displayDate, setDisplayDate] = useState(false);\r\n const [tableFilter, setTableFilter] = useState();\r\n\r\n const [currentFilter, setCurrentFilter] = useState(\"10\");\r\n\r\n useEffect(() => {\r\n if (currentAccount.AccountNumber) {\r\n fetchGetPortfolioNoLogs(currentAccount.AccountNumber)\r\n .then(({ response }) => {\r\n const valores = [];\r\n response.position.cash.reverse().forEach((moneda) =>\r\n valores.push({\r\n id: moneda.currencyId,\r\n instrumento: moneda.currencyName,\r\n esEfectivo: true,\r\n })\r\n );\r\n\r\n response.position.asset.forEach((asset) =>\r\n valores.push({\r\n id: asset.id,\r\n instrumento: asset.name,\r\n esEfectivo: false,\r\n })\r\n );\r\n setPortfolioNoLogs(valores);\r\n if (valores.length > 0) setCurrency(valores[0]);\r\n })\r\n .catch((err) => {\r\n showToast(\"Hubo un error obteniendo datos del servidor\", true);\r\n console.error(err);\r\n })\r\n .finally(() => setLoadingPosition(false));\r\n }\r\n }, [currentAccount]);\r\n\r\n useEffect(() => {\r\n if (tableFilter) updateActivity();\r\n }, [tableFilter, currentAccount, currencyFilter]);\r\n\r\n useEffect(() => {\r\n handleChangeFilter(currentFilter);\r\n }, [currentFilter]);\r\n\r\n const toggleUserDropdown = () => {\r\n setUserDropdownIsOpen((prevState) => !prevState);\r\n };\r\n\r\n const toggleFilterType = (filterType) => {\r\n setCurrentFilter(filterType);\r\n };\r\n\r\n const handleChangeFilter = (filterType) => {\r\n const newFilter = {\r\n desde: moment().subtract(1, \"days\").valueOf(),\r\n };\r\n\r\n switch (filterType) {\r\n case \"10\":\r\n setDisplayDate(false);\r\n newFilter.desde = moment().subtract(10, \"days\").valueOf();\r\n break;\r\n case \"actual\":\r\n setDisplayDate(false);\r\n newFilter.desde = moment().date(1).hours(0).minutes(0).seconds(0).milliseconds(0).valueOf();\r\n break;\r\n case \"anterior\":\r\n setDisplayDate(false);\r\n newFilter.desde = moment()\r\n .subtract(1, \"month\")\r\n .date(1)\r\n .hours(0)\r\n .minutes(0)\r\n .seconds(0)\r\n .milliseconds(0)\r\n .valueOf();\r\n newFilter.hasta = moment()\r\n .date(1)\r\n .subtract(1, \"days\")\r\n .hours(0)\r\n .minutes(0)\r\n .seconds(0)\r\n .milliseconds(0)\r\n .valueOf();\r\n break;\r\n case \"date\":\r\n newFilter.desde = moment(fromDate).hours(0).minutes(0).seconds(0).milliseconds(0).valueOf();\r\n newFilter.hasta = moment(toDate).hours(0).minutes(0).seconds(0).milliseconds(0).valueOf();\r\n break;\r\n case \"currency\":\r\n setDisplayDate(false);\r\n newFilter.currency = currencyFilter.id;\r\n break;\r\n }\r\n\r\n setTableFilter(newFilter);\r\n };\r\n\r\n const FilterButton = ({ label, active, onClick }) => (\r\n
    \r\n {label}\r\n
    \r\n );\r\n\r\n const updateActivity = () => {\r\n if (currentAccount.AccountNumber && currencyFilter.id !== 0) {\r\n // controlar que sea máximo X meses\r\n const timeSpan = moment(tableFilter.desde).diff(moment(tableFilter.hasta));\r\n var d = moment.duration(timeSpan);\r\n if (d._data.months <= -12) showToast(\"Rango de fechas inválido\", true);\r\n else {\r\n if (!loadingPosition) setLoadingPosition(() => true);\r\n const getActivity = currencyFilter.esEfectivo ? fetchGetActivity : fetchGetActivityProduct;\r\n getActivity(currentAccount.AccountNumber, currencyFilter.id, tableFilter)\r\n .then(({ response }) => {\r\n const newActivity = [];\r\n\r\n let actividad = {\r\n nombre: \"Saldo Inicial\",\r\n concepto: \"Saldo Inicial\",\r\n fecha: moment(tableFilter.desde).format(\"DD-MM-YY\"),\r\n saldo_total: parseFloat(response.activity[0].balance),\r\n totales: [],\r\n };\r\n newActivity.push(actividad);\r\n var finalBalance = parseFloat(response.activity[0].balance);\r\n response.activity.forEach(function (it, index) {\r\n if (index > 0) {\r\n actividad = {\r\n nombre: it.description,\r\n concepto: it.concept,\r\n fecha: moment(it.date).format(\"DD-MM-YY\"),\r\n saldo_total: parseFloat(it.credit) - parseFloat(it.debit),\r\n activityId: it.activityId,\r\n journalEntryId: it.journalEntryId,\r\n activityStatus: it.status,\r\n totales: [\r\n {\r\n detalle: \"Balance\",\r\n valor: parseFloat(it.credit) - parseFloat(it.debit),\r\n },\r\n ],\r\n };\r\n newActivity.push(actividad);\r\n }\r\n finalBalance += parseFloat(it.credit) - parseFloat(it.debit);\r\n });\r\n actividad = {\r\n nombre: \"Saldo Final\",\r\n concepto: \"Saldo Final\",\r\n fecha: moment(tableFilter.hasta).format(\"DD-MM-YY\"),\r\n saldo_total: finalBalance,\r\n totales: [],\r\n };\r\n newActivity.push(actividad);\r\n\r\n setActivity(newActivity);\r\n })\r\n .catch((err) => {\r\n showToast(\"Hubo un error obteniendo datos históricos del servidor\", true);\r\n console.error(err);\r\n })\r\n .finally(() => setLoadingPosition(false));\r\n }\r\n }\r\n };\r\n\r\n const changeDateHandler = (event) => {\r\n event.target.id === \"fromDate\" ? setFromDate(event.target.value) : null;\r\n event.target.id === \"toDate\" ? setToDate(event.target.value) : null;\r\n };\r\n\r\n const onSearch = () => {\r\n const newFilter = {\r\n desde: moment(fromDate).hours(0).minutes(0).seconds(0).milliseconds(0).valueOf(),\r\n hasta: moment(toDate).hours(0).minutes(0).seconds(0).milliseconds(0).valueOf(),\r\n };\r\n setTableFilter(newFilter);\r\n };\r\n\r\n const handleXLS = () => {\r\n getHistoryXLS(activity).then((r) => {\r\n try {\r\n const blob = new Blob([new Uint8Array(r.response.buffer.data)], {\r\n type: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;\",\r\n });\r\n const link = document.createElement(\"a\");\r\n link.href = window.URL.createObjectURL(blob);\r\n link.download = \"History.xlsx\";\r\n link.click();\r\n } catch (ex) {\r\n console.error(ex);\r\n showToast(\"Error obteniendo archivo\", true);\r\n }\r\n });\r\n };\r\n\r\n const handleCSV = () => {\r\n getHistoryCSV(activity).then((r) => {\r\n try {\r\n const blob = new Blob([new Uint8Array(r.response.buffer.data)], {\r\n type: \"application/csv;\",\r\n });\r\n const link = document.createElement(\"a\");\r\n link.href = window.URL.createObjectURL(blob);\r\n link.download = \"History.csv\";\r\n link.click();\r\n } catch (ex) {\r\n console.error(ex);\r\n showToast(\"Error obteniendo archivo\", true);\r\n }\r\n });\r\n };\r\n\r\n const getActivityPDF = (activityItem) => {\r\n fetchProductActivityPDF({\r\n activityId: activityItem.activityId,\r\n journalEntryId: activityItem.journalEntryId,\r\n })\r\n .then(({ response }) => {\r\n if (response.result.Code !== 200) {\r\n showToast(\"Error obteniendo pdf del servidor\", true);\r\n } else {\r\n var a = document.createElement(\"A\");\r\n a.href = `data:application/octet-stream;base64,${response.blobfile}`;\r\n a.download = `${moment(activityItem.fecha).format(\"DD-MM-YY\")}-${activityItem.journalEntryId}.pdf`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n }\r\n })\r\n .catch((err) => console.error(err));\r\n };\r\n\r\n if (currentAccount.noAccounts)\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {\r\n toggleFilterType(\"10\");\r\n }}\r\n />\r\n {\r\n toggleFilterType(\"actual\");\r\n }}\r\n />\r\n {\r\n toggleFilterType(\"anterior\");\r\n }}\r\n />\r\n {\r\n toggleFilterType(\"date\");\r\n setDisplayDate(true);\r\n }}\r\n />\r\n \r\n \r\n \r\n

    Rango de fechas máximo de 12 meses

    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"PDF\"\r\n \"XLSX\"\r\n \"CSV\"\r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n {/* FORMA CON STYLE.SM*/}\r\n \r\n \r\n {/* descripcion y valor de operacion */}\r\n \r\n \r\n \r\n {/* Client needs to update the pdf, until then this section will remain hidden\r\n \r\n */}\r\n \r\n \r\n \r\n {loadingPosition ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n {activity &&\r\n // we use .slice(0).reverse(). to display the most recent files first in the table.\r\n activity\r\n .slice(0)\r\n .reverse()\r\n .map((activityItem) => {\r\n return activityItem.activityStatus === \"RollBacked\" ? null : (\r\n \r\n {/* FORMA CON STYLE.SM*/}\r\n \r\n \r\n \r\n \r\n \r\n {/* Client needs to update the pdf, until then this section will remain hidden\r\n */}\r\n \r\n );\r\n })}\r\n \r\n )}\r\n \r\n {!activity && !loadingPosition ? : null}\r\n
    FechaFechaTipo\r\n Descripción\r\n \r\n Valor de la operación\r\n \r\n {\" \"}\r\n Documentos{\" \"}\r\n
    \r\n \r\n
    {activityItem.fecha}{activityItem.fecha}{toPascalCase(activityItem.concepto)}\r\n {activityItem.nombre === \"\" ? \"-\" : activityItem.nombre}\r\n \r\n \r\n \r\n {toPascalCase(activityItem.concepto) === \"Buy\" ||\r\n toPascalCase(activityItem.concepto) === \"Sell\" ? (\r\n \r\n ) : (\r\n \"-\"\r\n )}\r\n \r\n {!currencyFilter.esEfectivo &&\r\n ![\"Saldo Inicial\", \"Saldo Final\"].includes(activityItem.concepto) && (\r\n getActivityPDF(activityItem)}\r\n />\r\n )}\r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nconst NoInfo = () => (\r\n \r\n No hay datos disponibles.\r\n \r\n);\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"warning\":\"HistoryForm_warning_Cx_qO\",\"wrapperCol\":\"HistoryForm_wrapperCol_oCgAA\",\"buttonRow\":\"HistoryForm_buttonRow_1U1k9\",\"leftContainer\":\"HistoryForm_leftContainer_hGz7T\",\"button\":\"HistoryForm_button_1IJW3\",\"activeButton\":\"HistoryForm_activeButton_x6lUO\",\"dropdownButton\":\"HistoryForm_dropdownButton_2ZrCH\",\"textImageWrapper\":\"HistoryForm_textImageWrapper_32mpl\",\"arrowImg\":\"HistoryForm_arrowImg_1C9Lc\",\"arrowImgActive\":\"HistoryForm_arrowImgActive_23-KR\",\"dropdown\":\"HistoryForm_dropdown_3RTml\",\"dropdownToggle\":\"HistoryForm_dropdownToggle_2qVlE\",\"dropDownMenu\":\"HistoryForm_dropDownMenu_1s8nR\",\"greyFont\":\"HistoryForm_greyFont_35ft3\",\"dateContainer\":\"HistoryForm_dateContainer_3lclV\",\"dateSecondRow\":\"HistoryForm_dateSecondRow_1LxNR\",\"md\":\"HistoryForm_md_3I1Nd\",\"col\":\"HistoryForm_col_2rcUE\",\"inputStyle\":\"HistoryForm_inputStyle_o3051\",\"calendar\":\"HistoryForm_calendar_2tU5M\",\"icon\":\"HistoryForm_icon_2tdUm\",\"dateContainerDisplayNone\":\"HistoryForm_dateContainerDisplayNone_3C3ps\",\"activityTableRow\":\"HistoryForm_activityTableRow_1jLei\",\"table\":\"HistoryForm_table_1UZFi\",\"tableHead\":\"HistoryForm_tableHead_3kr6O\",\"tableRow\":\"HistoryForm_tableRow_2g9Wv\",\"tableH\":\"HistoryForm_tableH_12B0P\",\"tableArrow\":\"HistoryForm_tableArrow_3mt89\",\"tableArrowActive\":\"HistoryForm_tableArrowActive_1OkXj\",\"tableBody\":\"HistoryForm_tableBody_3rzJ-\",\"circularProgressRow\":\"HistoryForm_circularProgressRow_1e0B0\",\"pdfIcon\":\"HistoryForm_pdfIcon_7FZTe\",\"dateThirdRow\":\"HistoryForm_dateThirdRow_2YyX0\",\"sm\":\"HistoryForm_sm_3ZhNQ\",\"hideOnPrint\":\"HistoryForm_hideOnPrint_1ZEOI\",\"dropdownBuySell\":\"HistoryForm_dropdownBuySell_pO4q-\"};","import React, { Fragment, useEffect, useState } from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { getCurrentAccount } from \"../../../reducers/selectors\";\r\n\r\nimport style from \"./ExternalAccountsWrapper.module.scss\";\r\nimport { getPersonBankAccount } from \"../../../services/api/accounts\";\r\nimport { CircularProgress } from \"bx-react-ui\";\r\nimport { modes } from \"../FundsTable/FundsAssetTable/FundsAssetTable\";\r\n\r\nexport const ExternalAccountsWrapper = ({\r\n onChange,\r\n onCheckCashAccount,\r\n selectedAccount,\r\n selectedCash,\r\n currencyISO,\r\n disabled,\r\n mode\r\n}) => {\r\n const [bankAccounts, setBankAccounts] = useState([]);\r\n const [loadingBankAccounts, setLoadingBankAccounts] = useState(true);\r\n const currentAccount = useSelector(getCurrentAccount);\r\n\r\n useEffect(() => {\r\n if (currentAccount && bankAccounts.length === 0) {\r\n setLoadingBankAccounts(() => true);\r\n getPersonBankAccount({ accountId: currentAccount.id }).then(({ response }) => {\r\n setBankAccounts(response.clientBankAccounts.filter((acc) => acc.currencyISO === currencyISO));\r\n setLoadingBankAccounts(() => false);\r\n });\r\n }\r\n }, [currentAccount]);\r\n\r\n return (\r\n
    \r\n {loadingBankAccounts ? (\r\n \r\n ) : (\r\n \r\n {bankAccounts\r\n ? bankAccounts.map((account) => (\r\n onChange(account.number)}\r\n >\r\n
    \r\n \r\n
    \r\n
    \r\n \r\n {account.holder}\r\n \r\n \r\n N° {account.number}\r\n \r\n \r\n Moneda {account.currencyISO}\r\n \r\n \r\n Tipo {account.Type === \"Savings\" ? \"Caja de ahorro\" : \"Cuenta corriente\"}\r\n \r\n
    \r\n
    \r\n {}}\r\n />\r\n
    \r\n
    \r\n ))\r\n : null}\r\n \r\n
    \r\n {/* Usar cuenta cash */}\r\n {mode === modes.BUY ? \"Transferencia desde otros bancos\" : \"Pagar a cuenta catastrada por defecto\"}\r\n
    \r\n
    \r\n {}} />\r\n
    \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"accountsWrapper\":\"ExternalAccountsWrapper-module_accountsWrapper_sEcWg\",\"bankLogo\":\"ExternalAccountsWrapper-module_bankLogo_Fm7Z7\",\"bankAccountData\":\"ExternalAccountsWrapper-module_bankAccountData_3PprL\",\"checkBoxWrapper\":\"ExternalAccountsWrapper-module_checkBoxWrapper_3G7eB\",\"cashWrapper\":\"ExternalAccountsWrapper-module_cashWrapper_sRzGO\",\"cashSpan\":\"ExternalAccountsWrapper-module_cashSpan_2zNQs\",\"cashCheckBox\":\"ExternalAccountsWrapper-module_cashCheckBox_1lsE1\",\"disabled\":\"ExternalAccountsWrapper-module_disabled_3vj3c\"};","import React, { Fragment, useState, useEffect } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, UncontrolledTooltip, Row, Col, Input } from \"reactstrap\";\r\nimport moment from \"moment\";\r\nimport { FormattedNumber, formattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport { NumberFormatInput } from \"bx-react-ui/src/components/NumberFormatInput/NumberFormatInput\";\r\nimport { useSelector } from \"react-redux\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { CircularProgress } from \"bx-react-ui\";\r\nimport { useInterval } from \"bx-react-ui/src/utils/hooks\";\r\n\r\nimport toggleIcon from \"../../../../../public/svg/x-symbol-svgrepo-com.svg\";\r\nimport tooltipIcon from \"../../../../../public/svg/i.svg\";\r\nimport { getCurrentAccount, getTexts } from \"../../../../reducers/selectors\";\r\nimport { showToast } from \"../../../../utils/helper\";\r\nimport { setRedirectionData } from \"../../../../services/api/entities\";\r\nimport { getPersonBankAccount } from \"../../../../services/api/accounts\";\r\nimport { fetchOffers, fetchFunds, updateFund } from \"../../../../services/api/inout\";\r\n\r\nimport style from \"./FundInvestModal.scss\";\r\nimport { modes } from \"../FundsAssetTable/FundsAssetTable\";\r\nimport { ExternalAccountsWrapper } from \"../../ExternalAccountsWrapper/ExternalAccountsWrapper\";\r\n\r\nexport const FundInvestModal = ({ isOpen, toggle, fund, mode }) => {\r\n const [value, setValue] = useState(null);\r\n const [afterHoursModal, setAfterHoursModal] = useState({ show: false, accepted: false });\r\n const [loading, setLoading] = useState(false);\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const [errorMessage, setErrorMessage] = useState();\r\n const [noErrors, setNoErrors] = useState(true);\r\n const [isFullLiquidation, setIsFullLiquidation] = useState(false);\r\n const [clientBankAccount, setClientBankAccount] = useState(\"\");\r\n const [useCash, setUseCash] = useState(false);\r\n const [sent, setSent] = useState(false);\r\n const AssetRiskRegEx = /^[a-zA-Z]+$/;\r\n const texts = useSelector(getTexts);\r\n\r\n useEffect(() => {\r\n setErrorMessage(() => {\r\n const decimals = fund.AssetInformation.CurrencyISO == \"USD\" ? 2 : 0;\r\n\r\n if (value === 0 && !isFullLiquidation) {\r\n return \"La cantidad ingresada no puede ser cero.\";\r\n }\r\n if (value < 0 && !isFullLiquidation) {\r\n return \"La cantidad ingresada no puede ser negativa.\";\r\n }\r\n if (mode === modes.BUY) {\r\n if (value < fund.minAmmount) {\r\n return `La cantidad ingresada no puede ser menor al mínimo permitido de ${formattedNumber(\r\n fund.minAmmount,\r\n decimals,\r\n decimals\r\n )}.`;\r\n }\r\n if (+fund.maxAmmount !== 0 && value > fund.maxAmmount) {\r\n return `La cantidad ingresada no puede ser mayor al máximo permitido de ${formattedNumber(\r\n fund.maxAmmount,\r\n decimals,\r\n decimals\r\n )}.`;\r\n }\r\n }\r\n });\r\n }, [value, isFullLiquidation]);\r\n\r\n const validate = () => {\r\n const decimals = fund.AssetInformation.CurrencyISO == \"USD\" ? 2 : 0;\r\n if (value === 0 && !isFullLiquidation) {\r\n showToast(\"La cantidad ingresada no puede ser cero.\", true);\r\n return false;\r\n }\r\n if (value < 0 && !isFullLiquidation) {\r\n showToast(\"La cantidad ingresada no puede ser negativa.\", true);\r\n return false;\r\n }\r\n if (value < fund.minAmmount && !isFullLiquidation) {\r\n showToast(\r\n `La cantidad ingresada no puede ser menor al mínimo permitido de ${formattedNumber(\r\n fund.minAmmount,\r\n decimals,\r\n decimals\r\n )}.`,\r\n true\r\n );\r\n return false;\r\n }\r\n if (+fund.maxAmmount !== 0 && value > fund.maxAmmount && !isFullLiquidation) {\r\n showToast(\r\n `La cantidad ingresada no puede ser mayor al máximo permitido de ${formattedNumber(\r\n fund.maxAmmount,\r\n decimals,\r\n decimals\r\n )}.`,\r\n true\r\n );\r\n return false;\r\n }\r\n return true;\r\n };\r\n\r\n const confirmFund = (payload) => {\r\n setLoading(() => true);\r\n updateFund(payload)\r\n .then(({ response }) => response)\r\n .then(({ result }) => {\r\n if (result.Code !== 200) {\r\n setNoErrors(false);\r\n showToast(\r\n \"No se pudo procesar la solicitud, favor contactar con su ejecutivo para más información.\",\r\n true\r\n );\r\n } else {\r\n if (mode === modes.BUY) {\r\n setNoErrors(true);\r\n showToast(\"Inversión realizada con éxito\");\r\n } else {\r\n setNoErrors(true);\r\n showToast(\"Rescate solicitado con éxito\");\r\n }\r\n }\r\n })\r\n .catch((err) => {\r\n setNoErrors(false);\r\n showToast(\r\n \"No se pudo procesar la solicitud, favor contactar con su ejecutivo para más información.\",\r\n true\r\n );\r\n console.error(err);\r\n })\r\n .finally(() => {\r\n setLoading(() => false);\r\n setSent(() => true);\r\n });\r\n };\r\n\r\n const onConfirm = () => {\r\n if (validate()) {\r\n setLoading(() => true);\r\n\r\n confirmFund({\r\n fund: true,\r\n orderStatus: \"Parked\",\r\n accountId: currentAccount.id,\r\n orderSide: mode === modes.BUY ? \"Buy\" : \"Sell\",\r\n assetId: fund.AssetInformation.AssetId,\r\n ammount: value,\r\n bankAccountNumber: clientBankAccount,\r\n isFullLiquidation:\r\n isFullLiquidation || (value * 100) / parseFloat(fund.AssetInformation.availableBalance) > 98.0,\r\n });\r\n }\r\n };\r\n\r\n const handleChange = (event) => {\r\n setValue(getNumber(event));\r\n };\r\n\r\n const tooltTipStyles = {\r\n color: \"white\",\r\n backgroundColor: \"#106eb0\",\r\n };\r\n\r\n useInterval(() => {\r\n const now = Date.parse(new Date());\r\n const min = Date.parse(fund.minTime);\r\n const max = Date.parse(fund.maxTime);\r\n\r\n const before = min ? now < min : false;\r\n const after = max ? now > max : false;\r\n\r\n if (before || after) {\r\n setAfterHoursModal((prev) => ({\r\n ...prev,\r\n show: true,\r\n }));\r\n }\r\n }, 1000);\r\n\r\n const toggleAcceptAfterHours = () => {\r\n setAfterHoursModal((prev) => ({\r\n ...prev,\r\n accepted: !prev.accepted,\r\n }));\r\n };\r\n\r\n const toggleFullLiquidation = () => {\r\n setIsFullLiquidation((prev) => !prev);\r\n };\r\n\r\n const onChangeCheckbox = (bankAccountNumber) => {\r\n setClientBankAccount((state) => {\r\n if (state === bankAccountNumber) {\r\n return null;\r\n } else {\r\n return bankAccountNumber;\r\n }\r\n });\r\n setUseCash(false);\r\n };\r\n\r\n const onChangeCheckboxCash = (useCash) => {\r\n setUseCash((state) => {\r\n if (state === true) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n });\r\n setClientBankAccount((state) => {\r\n return null;\r\n });\r\n };\r\n\r\n return (\r\n \r\n
    \r\n \r\n \r\n {mode === modes.BUY ? \"Detalle de la suscripción\" : \"Detalle del rescate\"}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {fund.AssetInformation.AssetName}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Cuenta\r\n {currentAccount.name}\r\n \r\n {AssetRiskRegEx.test(fund.AssetInformation.AssetRiskTypeDesc) && (\r\n \r\n \r\n Rating\r\n \r\n \r\n {texts.tooltips.invest_funds_rating}\r\n \r\n \r\n {fund.AssetInformation.AssetRiskTypeDesc}\r\n \r\n )}\r\n \r\n Moneda\r\n {fund.AssetInformation.CurrencyISO}\r\n \r\n \r\n \r\n YTD\r\n \r\n \r\n {texts.tooltips.invest_funds_ytd}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Monto\r\n fund.maxAmmount))\r\n }\r\n onValueChange={handleChange}\r\n decimalScale={fund.AssetInformation.CurrencyISO == \"USD\" ? 2 : 0}\r\n dataTypeDecimalName=\"price\"\r\n placeholder={\r\n isFullLiquidation\r\n ? formattedNumber(\r\n fund.AssetInformation.availableBalance,\r\n fund.AssetInformation.CurrencyISO == \"USD\" ? 2 : 0,\r\n fund.AssetInformation.CurrencyISO == \"USD\" ? 2 : 0\r\n )\r\n : \"Monto\"\r\n }\r\n disabled={isFullLiquidation || sent}\r\n />\r\n {errorMessage}\r\n
    \r\n {mode === modes.SELL && (\r\n
    \r\n \r\n null} />\r\n Rescate total\r\n \r\n
    \r\n )}\r\n \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n {texts.notes.after_hours_investment || fund.afterHoursText}\r\n {afterHoursModal.show && (\r\n \r\n \r\n aceptar\r\n \r\n )}\r\n
    \r\n \r\n
    \r\n {sent && noErrors && (\r\n \r\n \r\n Inversión realizada con éxito\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n\r\n {sent ? (\r\n \r\n \r\n \r\n \r\n {\r\n toggle();\r\n }}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {\"Cerrar\"}\r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n fund.maxAmmount) ||\r\n (afterHoursModal.show && !afterHoursModal.accepted) ||\r\n !(!!clientBankAccount || useCash)\r\n }\r\n onClick={onConfirm}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {mode === modes.BUY ? \"Suscribir\" : \"Rescatar\"}\r\n \r\n \r\n\r\n \r\n {\r\n toggle();\r\n }}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {\"Cancelar\"}\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n
    \r\n \r\n );\r\n};\r\n\r\nconst getNumber = (event) => {\r\n if (isNaN(event.floatValue) || event.value.endsWith(\".\")) {\r\n return event.value;\r\n }\r\n\r\n return event.floatValue;\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"quantityInput\":\"FundInvestModal_quantityInput_1BNY7\",\"titleWrapper\":\"FundInvestModal_titleWrapper_mI0Pw\",\"title\":\"FundInvestModal_title_3ZrGg\",\"assetName\":\"FundInvestModal_assetName_3fUbY\",\"modalBody\":\"FundInvestModal_modalBody_1i2Ik\",\"field\":\"FundInvestModal_field_245tO\",\"fieldTitle\":\"FundInvestModal_fieldTitle_2HtMt\",\"toolTipContainer\":\"FundInvestModal_toolTipContainer_2Zr1G\",\"tooltipIcon\":\"FundInvestModal_tooltipIcon_j9eP6\",\"accountContainer\":\"FundInvestModal_accountContainer_1eqrD\",\"wrapper\":\"FundInvestModal_wrapper_22My2\",\"Logo\":\"FundInvestModal_Logo_z7yFh\",\"LogoDisabled\":\"FundInvestModal_LogoDisabled_1crfW\",\"centered\":\"FundInvestModal_centered_30PQO\",\"content\":\"FundInvestModal_content_Pm2qx\",\"header\":\"FundInvestModal_header_1dXG8\",\"toggleIcon\":\"FundInvestModal_toggleIcon_P-QgN\",\"body\":\"FundInvestModal_body_3v2Rq\",\"row\":\"FundInvestModal_row_FC81N\",\"col\":\"FundInvestModal_col_TlaZU\",\"pencil\":\"FundInvestModal_pencil_1pIrl\",\"grayContainer\":\"FundInvestModal_grayContainer_3Awyd\",\"titleOld\":\"FundInvestModal_titleOld_4HWSK\",\"footer\":\"FundInvestModal_footer_dGfrV\",\"fullLiquidationWrapper\":\"FundInvestModal_fullLiquidationWrapper_-sWYi\",\"checkbox\":\"FundInvestModal_checkbox_CTe9z\",\"bodyClassName\":\"FundInvestModal_bodyClassName_199oU\",\"toastClassName\":\"FundInvestModal_toastClassName_3A6se\",\"button\":\"FundInvestModal_button_AnFsw\",\"confirmButton\":\"FundInvestModal_confirmButton_2mJmM\",\"afterHoursWrapper\":\"FundInvestModal_afterHoursWrapper_3ey0U\",\"disabled\":\"FundInvestModal_disabled_sA5og\",\"description\":\"FundInvestModal_description_3h-Oh\",\"sentDisclaimer\":\"FundInvestModal_sentDisclaimer_3WyaG\"};","import React, { useState, useEffect } from \"react\";\r\nimport { Table, Button, Modal, ModalHeader, ModalBody, ModalFooter } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { useSelector } from \"react-redux\";\r\n\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport { showToast } from \"../../../../utils/helper\";\r\nimport {\r\n getSession,\r\n getCurrentAccount,\r\n getSavedPersonInfo,\r\n getPortfolio,\r\n} from \"../../../../reducers/selectors\";\r\n\r\nimport style from \"./FundsAssetTable.scss\";\r\nimport { FundInvestModal } from \"../FundInvestModal/FundInvestModal\";\r\nimport { fetchGetPortfolio, getClientPositionDigital } from \"../../../../services/api/accounts\";\r\n\r\nexport const modes = {\r\n BUY: \"BUY\",\r\n SELL: \"SELL\",\r\n};\r\n\r\nexport const FundsAssetTable = ({ funds }) => {\r\n const [modal, setModal] = useState({ open: false, mode: modes.BUY, fund: {} });\r\n const [portfolio, setPortfolio] = useState(null);\r\n const [portfolioDate, setPortfolioDate] = useState(new Date().toISOString().slice(0, 10));\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const [loadingPosition, setLoadingPosition] = useState(true);\r\n\r\n useEffect(() => {\r\n if (!loadingPosition) setLoadingPosition(() => true);\r\n if (currentAccount.AccountNumber) {\r\n fetchGetPortfolio(currentAccount.AccountNumber, portfolioDate)\r\n .then(({ response }) => {\r\n setPortfolio(response);\r\n setPortfolioTotal(+response.position.valueTotalUSD + +response.positionPYG.valueTotalUSD);\r\n setFx(response.currencypairprice.rawprice);\r\n })\r\n .catch((err) => console.error(err))\r\n .finally(() => setLoadingPosition(false));\r\n }\r\n if (currentAccount.noAccounts) {\r\n setLoadingPosition(false);\r\n }\r\n }, [currentAccount, portfolioDate]);\r\n\r\n const handleChangeDate = (date) => {\r\n setPortfolioDate(() => date);\r\n };\r\n\r\n const handleDeposit = (fund) => {\r\n setModal(() => ({ open: true, mode: modes.BUY, fund }));\r\n };\r\n\r\n const handleWithdraw = (fund) => {\r\n setModal(() => ({ open: true, mode: modes.SELL, fund }));\r\n };\r\n\r\n const closeModal = () => {\r\n setModal(() => ({ open: false, mode: modes.BUY, fund: {} }));\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {funds.map((fund, index) => {\r\n const item = fund.AssetInformation;\r\n item.availableBalance = 0;\r\n if (portfolio) {\r\n const { position, positionPYG } = portfolio;\r\n const currentPosition = item.CurrencyISO == \"USD\" ? position : positionPYG;\r\n if (currentPosition.assetClass.length > 0) {\r\n currentPosition.assetClass.map((assetClass) => {\r\n assetClass.subAssetClass.map((subAssetClass) => {\r\n subAssetClass.asset.map((asset) => {\r\n if (+asset.id === +item.AssetId) {\r\n item.availableBalance = asset.valuetotal;\r\n item.AssetXIRR = asset.YTM;\r\n }\r\n });\r\n });\r\n })[0];\r\n }\r\n\r\n fund.AssetInformation = item;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n })}\r\n \r\n
    FondosYTDMonedaSaldo Actual
    {item.AssetName}\r\n \r\n {item.CurrencyISO}\r\n \r\n \r\n handleDeposit(fund)}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Suscribir\r\n \r\n handleWithdraw(fund)}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Rescatar\r\n \r\n
    \r\n\r\n {modal.open && (\r\n \r\n )}\r\n
    \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"table\":\"FundsAssetTable_table_3itL9\",\"thead\":\"FundsAssetTable_thead_3Rg7N\",\"tbody\":\"FundsAssetTable_tbody_3WfVm\",\"tableRow\":\"FundsAssetTable_tableRow_njjYe\",\"search\":\"FundsAssetTable_search_2NICB\",\"button\":\"FundsAssetTable_button_1h6BI\",\"md\":\"FundsAssetTable_md_34i-p\",\"sm\":\"FundsAssetTable_sm_su4ak\"};","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Collapse } from \"reactstrap\";\r\n\r\nimport { FundsAssetTable } from \"./FundsAssetTable/FundsAssetTable\";\r\nimport arrow from \"../../../../public/svg/keyboard_arrow_down-24px.svg\";\r\nimport { toPascalCase } from \"../../../utils/helper\";\r\n\r\nimport style from \"./FundsTable.scss\";\r\n\r\nexport const FundsTable = ({ funds = [] }) => {\r\n const [open, setOpen] = useState(true);\r\n\r\n return (\r\n \r\n {\r\n setOpen(!open);\r\n }}\r\n >\r\n Fondos disponibles\r\n \"arrow\"\r\n
    \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"collapseRow\":\"FundsTable_collapseRow_U2bRn\",\"collapseHeader\":\"FundsTable_collapseHeader_2QOiv\",\"arrow\":\"FundsTable_arrow_JT8Uo\",\"collapse\":\"FundsTable_collapse_1RRUV\",\"collapseRowActive\":\"FundsTable_collapseRowActive_2rFif\",\"collapseHeaderActive\":\"FundsTable_collapseHeaderActive_10fpO\",\"arrowActive\":\"FundsTable_arrowActive_FNR9h\",\"collapseHeaderOutstanding\":\"FundsTable_collapseHeaderOutstanding_3_gEj\",\"collapseActive\":\"FundsTable_collapseActive_36R5f\"};","import React, { Fragment, useState, useEffect } from \"react\";\r\nimport { Col, Row, Table, Button, Modal, ModalBody, ModalHeader } from \"reactstrap\";\r\nimport { CircularProgress } from \"bx-react-ui\";\r\nimport { useLocation } from \"react-router-dom\";\r\nimport { useSelector } from \"react-redux\";\r\n\r\nimport { showToast } from \"../../utils/helper\";\r\nimport { InvestModal } from \"../../components/Modal/InvestModal/InvestModal\";\r\nimport { InvestBuyModal } from \"../Modal/InvestBuyModal/InvestBuyModal\";\r\nimport { InvestTable } from \"./InvestTable/InvestTable\";\r\nimport { FundsTable } from \"./FundsTable/FundsTable\";\r\nimport { fetchOffers, fetchFunds, updateFund } from \"../../services/api/inout\";\r\nimport { getPersonBankAccount } from \"../../services/api/accounts\";\r\nimport { getEarnings, takeOffer } from \"../../services/api/inout\";\r\nimport { getSession, getCurrentAccount, getSavedPersonInfo, getPortfolio } from \"../../reducers/selectors\";\r\nimport { fetchGetPortfolio, getClientPositionDigital } from \"../../services/api/accounts\";\r\n\r\nimport style from \"./Invest.scss\";\r\n\r\nexport const Invest = () => {\r\n const [modal, setModal] = useState(false);\r\n const [buyModal, setBuyModal] = useState(false);\r\n const [item, setItem] = useState();\r\n const [io, setIO] = useState();\r\n const [order, setOrder] = useState();\r\n const [trade, setTrade] = useState(null);\r\n const [offers, setOffers] = useState([]);\r\n const [availableOffers, setAvailableOffers] = useState([]);\r\n const [outstandingOffers, setOutstandingOffers] = useState([]);\r\n const [funds, setFunds] = useState([]);\r\n const [loadingOffers, setLoadingOffers] = useState(true);\r\n const [loadingFunds, setLoadingFunds] = useState(true);\r\n const [loadingRedirection, setLoadingRedirection] = useState(false);\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const [portfolio, setPortfolio] = useState(null);\r\n const [portfolioDate, setPortfolioDate] = useState(new Date().toISOString().slice(0, 10));\r\n const [loadingPosition, setLoadingPosition] = useState(true);\r\n\r\n const isReadOnly = currentAccount.isReadOnly;\r\n \r\n if (isReadOnly) {\r\n window.location.href = '/';\r\n return null;\r\n } \r\n\r\n useEffect(() => {\r\n if (!loadingPosition) setLoadingPosition(() => true);\r\n if (currentAccount.AccountNumber) {\r\n fetchGetPortfolio(currentAccount.AccountNumber, portfolioDate)\r\n .then(({ response }) => {\r\n setPortfolio(response);\r\n setPortfolioTotal(+response.position.valueTotalUSD + +response.positionPYG.valueTotalUSD);\r\n setFx(response.currencypairprice.rawprice);\r\n })\r\n .catch((err) => console.error(err))\r\n .finally(() => setLoadingPosition(false));\r\n }\r\n if (currentAccount.noAccounts) {\r\n setLoadingPosition(false);\r\n }\r\n }, [currentAccount, portfolioDate]);\r\n\r\n const handleChangeDate = (date) => {\r\n setPortfolioDate(() => date);\r\n };\r\n\r\n let { state } = useLocation();\r\n\r\n useEffect(() => {\r\n if (state && !loadingRedirection) {\r\n if (state.redirectionData.fund) {\r\n confirmFund(state.redirectionData);\r\n } else {\r\n confirmOffer(state.redirectionData);\r\n }\r\n }\r\n }, [state]);\r\n\r\n useEffect(() => {\r\n if (currentAccount.id) {\r\n loadOffers();\r\n loadFunds();\r\n }\r\n }, [currentAccount]);\r\n\r\n const loadOffers = () => {\r\n if (currentAccount.id) {\r\n setLoadingOffers(() => true);\r\n fetchOffers(currentAccount.id)\r\n .then(({ response }) => {\r\n if (response.result.Code === 400) {\r\n showToast(\"Hubo un error obteniendo ofertas de inversión\", true);\r\n } else {\r\n if (Object.entries(response.SdtOffers).length !== 0) {\r\n setOffers(response.SdtOffers.OffersItems);\r\n } else {\r\n setOffers([]);\r\n }\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n })\r\n .finally(() => {\r\n setLoadingOffers(() => false);\r\n });\r\n }\r\n };\r\n\r\n const loadFunds = () => {\r\n if (currentAccount.id) {\r\n setLoadingFunds(() => true);\r\n fetchFunds(currentAccount.id)\r\n .then(({ response }) => response)\r\n .then(({ result, funds }) => {\r\n if (result.Code === 400) {\r\n showToast(\"Hubo un error obteniendo los fondos disponibles\", true);\r\n } else {\r\n if (funds.length !== 0) {\r\n setFunds(funds);\r\n } else {\r\n setFunds([]);\r\n }\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n })\r\n .finally(() => {\r\n setLoadingFunds(() => false);\r\n });\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n let outstanding = [];\r\n let available = [];\r\n offers.forEach((offer) => {\r\n offer.featured === true ? outstanding.push(offer) : available.push(offer);\r\n });\r\n setAvailableOffers(available);\r\n setOutstandingOffers(outstanding);\r\n }, [offers]);\r\n\r\n useEffect(() => {\r\n getPersonBankAccount().then(({ response }) => {});\r\n }, []);\r\n\r\n const toggleOffers = (item) => {\r\n setModal((prev) => !prev);\r\n setItem(item);\r\n };\r\n\r\n useEffect(() => {\r\n if (trade) {\r\n setBuyModal(true);\r\n }\r\n }, [trade]);\r\n\r\n const closeTradeModal = () => {\r\n setTrade(null);\r\n setIO(null);\r\n setOrder(null);\r\n setBuyModal(false);\r\n loadOffers();\r\n };\r\n\r\n const confirmOffer = (payload) => {\r\n setLoadingRedirection(() => true);\r\n takeOffer(payload)\r\n .then(({ response }) => {\r\n if (response.result.Code !== 200) {\r\n showToast(response.result.Description, true);\r\n } else {\r\n const newTrade = {\r\n ...response.trade,\r\n activeAccount: payload.activeAccount,\r\n };\r\n setLoadingRedirection(() => false);\r\n setTrade(newTrade);\r\n setItem(payload.item);\r\n setIO(response.io);\r\n setOrder(response.order);\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error confirmando la oferta\", true);\r\n })\r\n .finally(() => {\r\n setLoadingOffers(() => false);\r\n setLoadingRedirection(() => false);\r\n });\r\n };\r\n\r\n const confirmFund = (payload) => {\r\n setLoadingRedirection(() => true);\r\n updateFund(payload)\r\n .then(({ response }) => response)\r\n .then(({ result }) => {\r\n if (result.Code !== 200) {\r\n showToast(result.Description, true);\r\n } else {\r\n showToast(\"Inversión realizada con éxito\");\r\n }\r\n })\r\n .catch((err) => {\r\n showToast(\"No pudo ser procesado, favor vuelva a intentar\", true);\r\n console.error(err);\r\n })\r\n .finally(() => {\r\n setLoadingRedirection(() => false);\r\n });\r\n };\r\n\r\n if (loadingRedirection) return ;\r\n\r\n return (\r\n \r\n \r\n {loadingFunds || loadingOffers || !portfolio ? (\r\n \r\n ) : (\r\n \r\n \r\n {loadingFunds || loadingOffers || !portfolio ? (\r\n \r\n ) : (\r\n \r\n {funds.length > 0 ? (\r\n \r\n ) : (\r\n
    \r\n

    No hay fondos disponibles

    \r\n
    \r\n )}\r\n
    \r\n )}\r\n
    \r\n \r\n {loadingFunds || loadingOffers || !portfolio ? (\r\n \r\n ) : (\r\n \r\n {offers.length > 0 ? null : (\r\n
    \r\n

    No hay ningún tipo de inversiones disponibles

    \r\n
    \r\n )}\r\n {offers.length > 0 ? (\r\n availableOffers.length > 0 ? (\r\n \r\n ) : (\r\n
    \r\n

    No hay inversiones disponibles

    \r\n
    \r\n )\r\n ) : null}\r\n {offers.length > 0 ? (\r\n outstandingOffers.length > 0 ? (\r\n \r\n ) : (\r\n
    \r\n

    No hay inversiones destacadas disponibles

    \r\n
    \r\n )\r\n ) : null}\r\n
    \r\n )}\r\n
    \r\n
    \r\n )}\r\n {modal && }\r\n {trade && (\r\n \r\n )}\r\n \r\n
    \r\n );\r\n};\r\n\r\nconst LoadingModal = () => (\r\n \r\n Cargando inversión...\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"wrapperCol\":\"Invest_wrapperCol_IiEPp\",\"row\":\"Invest_row_1FqdE\",\"emptyWrapper\":\"Invest_emptyWrapper_32LZm\",\"emptyMessage\":\"Invest_emptyMessage_jmQSk\",\"redirectionModalBody\":\"Invest_redirectionModalBody_2NYyd\"};","import React, { Fragment } from \"react\";\r\nimport { Table, Button } from \"reactstrap\";\r\nimport moment from \"moment\";\r\nimport { FormattedNumber } from \"bx-react-ui/src/components/FormattedNumber/FormattedNumber\";\r\n\r\nimport style from \"./InvestAssetClassTable.scss\";\r\n\r\nexport const InvestAssetClassTable = ({ offers, toggle }) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {offers.map((item, index) => {\r\n const available = item.OfferQuantitytoClient - item.OfferQuantityTakenByClient;\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n })}\r\n \r\n
    ProductoPrecioMonedaCant.Disponible\r\n Rendimiento (TNA)\r\n \r\n Vencimiento\r\n
    {item.AssetName}\r\n \r\n {item.AssetInformation.CurrencyISO}\r\n \r\n \r\n {item.NominalRate == 0 ? (\r\n \"0\"\r\n ) : (\r\n \r\n )}\r\n \r\n {item.AssetInformation.AssetMaturityDate === \"0000-00-00\"\r\n ? \"-\"\r\n : moment(item.AssetInformation.AssetMaturityDate).format(\"DD/MM/YYYY\")}\r\n \r\n {\r\n toggle(item);\r\n }}\r\n >\r\n comprar\r\n \r\n
    \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"table\":\"InvestAssetClassTable_table_3lBKT\",\"thead\":\"InvestAssetClassTable_thead_12p6_\",\"tbody\":\"InvestAssetClassTable_tbody_2IboY\",\"tableRow\":\"InvestAssetClassTable_tableRow_N_G0K\",\"search\":\"InvestAssetClassTable_search_13GFj\",\"button\":\"InvestAssetClassTable_button_uNARI\",\"md\":\"InvestAssetClassTable_md_2YYC5\",\"sm\":\"InvestAssetClassTable_sm_332Y7\"};","import React, { Fragment, useEffect, useState } from \"react\";\r\nimport { Row, Table, Collapse } from \"reactstrap\";\r\n\r\nimport { InvestAssetClassTable } from \"../InvestAssetClassTable/InvestAssetClassTable\";\r\nimport arrow from \"../../../../../public/svg/keyboard_arrow_down-24px.svg\";\r\n\r\nimport style from \"./InvestSubAssetClassTable.scss\";\r\n\r\nexport const InvestSubAssetClassTable = ({ title, offers, toggle }) => {\r\n const [open, setOpen] = useState(false);\r\n\r\n return (\r\n \r\n {\r\n setOpen(!open);\r\n }}\r\n >\r\n {title}\r\n \"arrow\"\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"collapseRow\":\"InvestSubAssetClassTable_collapseRow_2YXm2\",\"collapseHeader\":\"InvestSubAssetClassTable_collapseHeader_9nlrU\",\"arrow\":\"InvestSubAssetClassTable_arrow_KmV-b\",\"arrowActive\":\"InvestSubAssetClassTable_arrowActive_3NqHj\",\"collapse\":\"InvestSubAssetClassTable_collapse_2XRkq\",\"collapseActive\":\"InvestSubAssetClassTable_collapseActive_1n3By\"};","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Collapse } from \"reactstrap\";\r\n\r\nimport { InvestSubAssetClassTable } from \"./InvestSubAssetClassTable/InvestSubAssetClassTable\";\r\nimport arrow from \"../../../../public/svg/keyboard_arrow_down-24px.svg\";\r\nimport { toPascalCase } from \"../../../utils/helper\";\r\n\r\nimport style from \"./InvestTable.scss\";\r\n\r\nexport const InvestTable = ({ titulo, offers = [], toggle, destacada = false }) => {\r\n const [open, setOpen] = useState(true);\r\n const [bonds, setBonds] = useState([]);\r\n const [equities, setEquities] = useState([]);\r\n const [options, setOptions] = useState([]);\r\n const [funds, setFunds] = useState([]);\r\n const [repo, setRepo] = useState([]);\r\n\r\n useEffect(() => {\r\n // filter offers\r\n const newBonds = [];\r\n const newEquities = [];\r\n const newOptions = [];\r\n const newFunds = [];\r\n const newRepo = [];\r\n // const newBonds = offers.filter((offerItem) => offerItem.AssetClassForm === \"Bonds\");\r\n offers.map((offerItem) => {\r\n switch (offerItem.AssetClassForm) {\r\n case \"Bonds\":\r\n newBonds.push(offerItem);\r\n break;\r\n case \"Equity\":\r\n newEquities.push(offerItem);\r\n break;\r\n case \"Option\":\r\n newOptions.push(offerItem);\r\n break;\r\n case \"MFunds\":\r\n newFunds.push(offerItem);\r\n break;\r\n case \"Repo\":\r\n newRepo.push(offerItem);\r\n break;\r\n default:\r\n break;\r\n }\r\n });\r\n\r\n setBonds(newBonds);\r\n setEquities(newEquities);\r\n setOptions(newOptions);\r\n setFunds(newFunds);\r\n setRepo(newRepo);\r\n }, [offers]);\r\n\r\n return (\r\n \r\n {\r\n setOpen(!open);\r\n }}\r\n >\r\n {toPascalCase(titulo)}\r\n \"arrow\"\r\n \r\n \r\n {bonds.length > 0 && }\r\n {equities.length > 0 && (\r\n \r\n )}\r\n {options.length > 0 && }\r\n {funds.length > 0 && }\r\n {repo.length > 0 && }\r\n \r\n \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"collapseRow\":\"InvestTable_collapseRow_34Tg5\",\"collapseHeader\":\"InvestTable_collapseHeader_1-G1p\",\"arrow\":\"InvestTable_arrow_2UhJa\",\"collapse\":\"InvestTable_collapse_15pE8\",\"collapseRowActive\":\"InvestTable_collapseRowActive_FLHDs\",\"collapseHeaderActive\":\"InvestTable_collapseHeaderActive_110Ft\",\"arrowActive\":\"InvestTable_arrowActive_1_hYG\",\"collapseHeaderOutstanding\":\"InvestTable_collapseHeaderOutstanding_2qsF5\",\"collapseActive\":\"InvestTable_collapseActive_1ZKfU\"};","import React, {Fragment, Text}from \"react\";\r\nimport style from \"./BadgeIcon.scss\";\r\n\r\n// This component has to be placed inside a container with \"position:relative\"\r\n// Inside this container must be the icon logo and this BadgeIcon component.\r\n\r\nconst BadgeIcon = ({ count }) => {\r\n return (\r\n
    \r\n {count}\r\n
    \r\n );\r\n};\r\n\r\nexport default BadgeIcon;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"circle\":\"BadgeIcon_circle_YStpz\"};","import React from \"react\";\r\nimport style from \"./Footer.scss\";\r\nimport logo from \"../../../../public/svg/logoBancoFamiliarCuadrado.svg\";\r\n\r\nexport const Footer = () => {\r\n return (\r\n
    \r\n \"Banco\r\n \r\n

    Familiar Casa de Bolsa S.A. | Av. Gral. José de San Martín 1245 | Asunción – Paraguay

    \r\n
    \r\n
    \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"footer\":\"Footer_footer_Xmle1\",\"logoButton\":\"Footer_logoButton_PAih8\",\"text\":\"Footer_text_gGr7v\"};","import React, { Fragment, useState, useEffect } from \"react\";\r\nimport { Col, Row, Table, Button, CardBody, Card, CardHeader } from \"reactstrap\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { FormattedNumber, formattedNumber } from \"bx-react-ui/src/components/FormattedNumber/FormattedNumber\";\r\nimport { CircularProgress } from \"bx-react-ui\";\r\nimport moment from \"moment\";\r\nimport { showToast } from \"../../../utils/helper\";\r\nimport ReactEcharts from \"echarts-for-react\";\r\nimport { getCurrentAccount } from \"../../../reducers/selectors\";\r\nimport { getFutureIncome } from \"../../../services/api/accounts\";\r\n\r\nimport style from \"./FutureIncomeComponent.scss\";\r\nimport { Warning } from \"../../Warning/Warning\";\r\nimport { getTexts } from \"../../../reducers/selectors\";\r\n\r\n\r\nconst FutureIncomeComponent = () => {\r\n const [currentFilter, setCurrentFilter] = useState(\"month\");\r\n const [loading, setLoading] = useState(true);\r\n const [tableFilter, setTableFilter] = useState({\r\n desde: moment().valueOf(),\r\n hasta: moment().add(1, \"months\").valueOf(),\r\n });\r\n const [toggleButton, setToggleButton] = useState(false);\r\n const [futureIncome, setFutureIncome] = useState([]);\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const [currency, setCurrency] = useState(\"USD\");\r\n\r\n const texts = useSelector(getTexts);\r\n\r\n const handleChangeFilter = (filterType) => {\r\n const newFilter = {\r\n desde: moment().valueOf(),\r\n };\r\n\r\n switch (filterType) {\r\n case \"month\":\r\n newFilter.hasta = moment().add(1, \"month\").valueOf();\r\n break;\r\n case \"twoMonth\":\r\n newFilter.hasta = moment().add(2, \"month\").valueOf();\r\n break;\r\n case \"sixMonth\":\r\n newFilter.hasta = moment().add(6, \"month\").valueOf();\r\n break;\r\n case \"year\":\r\n newFilter.hasta = moment().add(1, \"year\").valueOf();\r\n break;\r\n }\r\n\r\n setTableFilter(newFilter);\r\n };\r\n\r\n const toggleModal = (type, doUpdateDeposits = false) => {\r\n setIOModal((prevState) => {\r\n return {\r\n open: !prevState.open,\r\n type,\r\n };\r\n });\r\n if (doUpdateDeposits) updateDeposits();\r\n };\r\n\r\n const toggleFilterType = (filterType) => {\r\n setCurrentFilter(filterType);\r\n };\r\n\r\n const FilterButton = ({ label, active, onClick }) => (\r\n
    \r\n {label}\r\n
    \r\n );\r\n\r\n useEffect(() => {\r\n handleChangeFilter(currentFilter);\r\n }, [currentFilter]);\r\n\r\n useEffect(() => {\r\n setLoading(() => true);\r\n if (currentAccount.AccountNumber) {\r\n getFutureIncome({\r\n cuenta: currentAccount.AccountNumber,\r\n from: tableFilter.desde,\r\n to: tableFilter.hasta,\r\n })\r\n .then(({ response }) => {\r\n const newFutureIncome = response.cashFlow.filter((item) => item.currencyISO === currency);\r\n setFutureIncome(newFutureIncome);\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error obteniendo ingresos futuros\", true);\r\n })\r\n .finally(() => setLoading(() => false));\r\n }\r\n }, [currentAccount, tableFilter, currency]);\r\n\r\n return (\r\n \r\n \r\n \r\n {\r\n toggleFilterType(\"month\");\r\n }}\r\n />\r\n {\r\n toggleFilterType(\"twoMonth\");\r\n }}\r\n />\r\n {\r\n toggleFilterType(\"sixMonth\");\r\n }}\r\n />\r\n {\r\n toggleFilterType(\"year\");\r\n }}\r\n />\r\n \r\n \r\n \r\n {\r\n setCurrency(\"PYG\");\r\n }}\r\n >\r\n Guaraníes\r\n \r\n {\r\n setCurrency(\"USD\");\r\n }}\r\n >\r\n Dólares\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {currentAccount.noAccounts ? (\r\n \r\n ) : loading ? (\r\n \r\n \r\n \r\n ) : futureIncome.length > 0 ? (\r\n futureIncome.map((item) => )\r\n ) : (\r\n \r\n \r\n \r\n )}\r\n \r\n
    Fecha\r\n Concepto\r\n Instrumento{`Monto ${currency === \"PYG\" ? \"Gs\" : \"USD\"}`}{`Monto acumulado ${\r\n currency === \"PYG\" ? \"Gs\" : \"USD\"\r\n }`}
    \r\n \r\n
    \r\n No hay futuros ingresos para los filtros seleccionados\r\n
    \r\n
    \r\n
    \r\n \r\n {!loading && }\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nconst NoAccounts = () => (\r\n \r\n \r\n No hay cuentas asociadas\r\n \r\n \r\n);\r\n\r\nconst conceptDictionary = (concept) => {\r\n let res = \"-\";\r\n if (concept === 0) return res;\r\n concept.toLowerCase() === \"maturity\" ? (res = \"Vencimiento\") : null;\r\n concept.toLowerCase() === \"sync\" ? (res = \"Amortización\") : null;\r\n concept.toLowerCase() === \"capitalization\" ? (res = \"Capitalización\") : null;\r\n concept.toLowerCase() === \"dividend\" ? (res = \"Dividendo\") : null;\r\n concept.toLowerCase() === \"cupon\" ? (res = \"Cupón\") : null;\r\n return res;\r\n};\r\n\r\nconst FutureIncomeRow = ({ item, currency }) => {\r\n return (\r\n \r\n {moment(item.date).format(\"DD/MM/YYYY\")}\r\n \r\n {conceptDictionary(item.concept)}\r\n \r\n {item.assetName}\r\n \r\n {item.total == 0 ? (\r\n \"-\"\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n {item.totalAccumulated == 0 ? (\r\n \"-\"\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nconst Chart = ({ items }) => {\r\n const [data, setData] = useState(false);\r\n\r\n useEffect(() => {\r\n if (items && items.length > 0) {\r\n let values = [];\r\n let labels = [];\r\n\r\n items.forEach((item) => {\r\n values.push(+item.total);\r\n labels.push(item.date);\r\n });\r\n setData({ values, labels });\r\n } else {\r\n setData(false);\r\n }\r\n }, [items]);\r\n\r\n return (\r\n
    \r\n {data && (\r\n \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nconst options = ({ values, labels }) => ({\r\n color: [\"#fcbd40\"],\r\n grid: {\r\n top: 20,\r\n bottom: 30,\r\n left: 80,\r\n right: 40,\r\n },\r\n tooltip: {\r\n trigger: \"axis\",\r\n formatter: function (params) {\r\n return formattedNumber(params[0].value, \"currency\");\r\n },\r\n },\r\n xAxis: [\r\n {\r\n type: \"category\",\r\n data: labels,\r\n },\r\n ],\r\n yAxis: [\r\n {\r\n type: \"value\",\r\n axisLine: {\r\n show: true,\r\n },\r\n boundaryGap: [0, \"100%\"],\r\n splitLine: {\r\n show: true,\r\n },\r\n axisLabel: {\r\n formatter: function (params) {\r\n return formattedNumber(params, \"currency\");\r\n },\r\n },\r\n },\r\n ],\r\n\r\n series: [\r\n {\r\n type: \"bar\",\r\n showSymbol: true,\r\n barWidth: \"30%\",\r\n hoverAnimation: false,\r\n data: values,\r\n height: \"100%\",\r\n },\r\n ],\r\n});\r\n\r\nexport default FutureIncomeComponent;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"wrapperCol\":\"FutureIncomeComponent_wrapperCol_1v98l\",\"buttonRow\":\"FutureIncomeComponent_buttonRow_kT_qY\",\"button\":\"FutureIncomeComponent_button_1ob2t\",\"activeButton\":\"FutureIncomeComponent_activeButton_2ZmUJ\",\"tableRow\":\"FutureIncomeComponent_tableRow_1vho1\",\"toggleButtonRow\":\"FutureIncomeComponent_toggleButtonRow_1Yo-4\",\"toggleButton\":\"FutureIncomeComponent_toggleButton_1-IMH\",\"toggleButtonActive\":\"FutureIncomeComponent_toggleButtonActive_144_o\",\"table\":\"FutureIncomeComponent_table_2z-mB\",\"tableHead\":\"FutureIncomeComponent_tableHead_AuVVi\",\"tableH\":\"FutureIncomeComponent_tableH_3MRZa\",\"tableBody\":\"FutureIncomeComponent_tableBody_16Fb6\",\"futureIncomeRow\":\"FutureIncomeComponent_futureIncomeRow_jV6OQ\",\"circularProgressRow\":\"FutureIncomeComponent_circularProgressRow_2b1Ip\",\"warning\":\"FutureIncomeComponent_warning_1KW2_\",\"md\":\"FutureIncomeComponent_md_1Zt-z\",\"title\":\"FutureIncomeComponent_title_MjqMQ\",\"sm\":\"FutureIncomeComponent_sm_2Wnz7\",\"chartWrapper\":\"FutureIncomeComponent_chartWrapper_1V6e0\"};","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { Nav, NavbarToggler, Badge, Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from \"reactstrap\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { useIdleTimer } from \"react-idle-timer\";\r\nimport MediaQuery from \"react-responsive\";\r\nimport { EnvironmentSign, CircularProgress } from \"bx-react-ui\";\r\n\r\nimport { getUserContext, getAuth } from \"../../../reducers/selectors\";\r\nimport { UserSelector } from \"../../UserSelector/UserSelector\";\r\nimport { signOut } from \"../../../actions/auth\";\r\nimport menuLine from \"../../../../public/svg/menu.svg\";\r\nimport logo from \"../../../../public/svg/logoBancoFamiliar.svg\";\r\nimport { getSession } from \"../../../reducers/selectors\";\r\nimport { getTextsLoading } from \"../../../reducers/selectors\";\r\nimport { textsLoadingSet } from \"../../../actions/entities\";\r\nimport { fetchTooltipsAndNotes } from \"../../../services/api/entities\";\r\nimport { textsSet } from \"../../../actions/entities\"\r\n\r\n\r\nimport style from \"./Header.scss\";\r\n\r\nexport const Header = ({ AccountJSON, actions, username, isProdEnv, isTestingUser }) => {\r\n const showEnvironmentSign = !isProdEnv || isTestingUser;\r\n const environmentSignText = isProdEnv ? \"PRODUCTION\" : \"TESTING\";\r\n const environmentSignColor = isProdEnv ? \"red\" : \"#34784B\";\r\n const session = useSelector(getSession);\r\n const textsLoading = useSelector(getTextsLoading);\r\n const dispatch = useDispatch();\r\n\r\n const context = useSelector(getUserContext);\r\n const [idleTimeout, setIdleTimeout] = useState(10);\r\n\r\n useEffect(() => {\r\n if (context !== null) {\r\n if (Object.keys(context)) {\r\n setIdleTimeout(context.session.MaxIdleSessionTime);\r\n }\r\n }\r\n }, [context]);\r\n\r\n //Parmetrizar comentarios de warning\r\n useEffect(() => {\r\n if (session && !textsLoading) {\r\n dispatch(textsLoadingSet());\r\n fetchTooltipsAndNotes()\r\n .then(({ response }) => {\r\n if (response.result.Code === 200) {\r\n dispatch(textsSet({ tooltips: response.tooltips, notes: response.notes }));\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n });\r\n }\r\n }, [session, textsLoading]);\r\n\r\n\r\n // Don't delete - it controls the idle timer to logout session automatically\r\n const logoutTimer = useIdleTimer({\r\n timeout: idleTimeout * 60 * 1000,\r\n crossTab: true,\r\n syncTimers: 200,\r\n name: \"logout-timer\",\r\n onIdle: () => {\r\n dispatch(signOut());\r\n window.location.reload();\r\n },\r\n });\r\n\r\n const mobileSidebarToggle = (e) => {\r\n e.preventDefault();\r\n document.body.classList.toggle(\"sidebar-mobile-show\");\r\n };\r\n\r\n return (\r\n \r\n
    \r\n \r\n \r\n {\r\n mobileSidebarToggle(e);\r\n }}\r\n >\r\n \"hamburger\r\n \r\n \r\n \r\n \"logo\"\r\n

    \r\n \r\n \r\n {showEnvironmentSign && }\r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst List = ({ items, loading }) => {\r\n const [open, setOpen] = useState(false);\r\n\r\n const toggle = () => {\r\n setOpen((prevOpen) => !prevOpen);\r\n };\r\n\r\n const eventsCounter = items ? items.length : \"-\";\r\n\r\n return [\r\n \r\n \r\n \r\n \r\n \r\n {eventsCounter}\r\n \r\n \r\n \r\n \r\n
    \r\n \r\n Notificaciones\r\n \r\n {loading ? (\r\n \r\n ) : (\r\n items && items.length == 0 &&
    No hay notificaciones
    \r\n )}\r\n {items &&\r\n items.map((item, i) =>\r\n i < 5 ? (\r\n \r\n {item}\r\n
    \r\n
    \r\n ) : null\r\n )}\r\n
    \r\n \r\n Ver todas las notificaciones\r\n \r\n
    \r\n
    ,\r\n ];\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"appHeader\":\"Header_appHeader_18ik_\",\"container\":\"Header_container_3SHuB\",\"empty\":\"Header_empty_1bEfH\",\"item\":\"Header_item_1pmbt\",\"body\":\"Header_body_iXLLn\",\"top\":\"Header_top_1DW-q\",\"grid\":\"Header_grid_1NRWd\",\"more\":\"Header_more_2c5sg\",\"loadingNotifications\":\"Header_loadingNotifications_358kF\",\"hambMenuLogo\":\"Header_hambMenuLogo_L_Qgz\",\"logo\":\"Header_logo_1PZF1\",\"dummyDiv\":\"Header_dummyDiv_JsqUI\",\"app-menu\":\"Header_app-menu_2pVcv\",\"navToggler\":\"Header_navToggler_3aYKI\",\"hambIcon\":\"Header_hambIcon_2RbiY\",\"userSelector\":\"Header_userSelector_2qzoy\"};","import { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport { Header } from \"./Header\";\r\nimport { getSession } from \"../../../reducers/selectors\";\r\nimport { signOut } from \"./../../../actions/auth\";\r\n\r\nfunction mapStateToProps(state) {\r\n const userSession = getSession();\r\n const username = userSession ? userSession.Username : null;\r\n\r\n const isProdEnv = userSession ? userSession.IsProductionEnv : true;\r\n const isTestingUser = userSession && userSession.IsTestingUser ? userSession.IsTestingUser : false;\r\n\r\n return {\r\n quotes: [],\r\n username,\r\n isProdEnv,\r\n isTestingUser,\r\n };\r\n}\r\n\r\nfunction mapDispatchToProps(dispatch) {\r\n let actions = bindActionCreators(\r\n {\r\n signOut,\r\n },\r\n dispatch\r\n );\r\n\r\n return { actions, dispatch };\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(Header);\r\n","import React, { Component } from \"react\";\r\nimport { Container } from \"reactstrap\";\r\nimport { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport { ToastContainer } from \"react-toastify\";\r\nimport Header from \"./Header/HeaderContainer\";\r\nimport Sidebar from \"./Sidebar/Sidebar\";\r\nimport { signOut } from \"./../../actions/auth\";\r\nimport { getAuth } from \"./../../reducers/selectors\";\r\nimport MediaQuery from \"react-responsive\";\r\nimport { Footer } from \"./Footer/Footer\";\r\n\r\nconst MainLayout = (props) => {\r\n const { actions } = props;\r\n return (\r\n
    \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n {props.children}\r\n
    \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst mapStateToProps = (state) => {\r\n const auth = getAuth(state);\r\n return {\r\n auth,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch, props) => {\r\n let actions = {\r\n auth: bindActionCreators(\r\n {\r\n signOut,\r\n },\r\n dispatch\r\n ),\r\n };\r\n\r\n return { actions, dispatch };\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(MainLayout);\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Col, Row, DropdownToggle, DropdownMenu, DropdownItem, Dropdown, Input } from \"reactstrap\";\r\nimport {\r\n getMonthsPositionReport,\r\n getAccountStatement,\r\n getAllFundsInPosition,\r\n getFundAccountExtractClientX,\r\n} from \"../../../services/api/accounts\";\r\nimport { useSelector } from \"react-redux\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport style from \"./MonthlyStateComponent.scss\";\r\nimport { getCurrentAccount } from \"../../../reducers/selectors\";\r\nimport pdfSvg from \"../../../../public/svg/pdf.svg\";\r\nimport { Warning } from \"../../Warning/Warning\";\r\nimport { showToast } from \"../../../utils/helper\";\r\nimport EmptyValues from \"../../EmptyValues/EmptyValues\";\r\nimport { valueIsEmpty } from \"bx-react-ui/src/utils/Helper\";\r\nimport { getTexts } from \"../../../reducers/selectors\";\r\nimport arrow from \"../../../../public/svg/keyboard_arrow_down-24px.svg\";\r\n\r\nexport const MonthlyStateComponent = () => {\r\n const date = new Date();\r\n const [pdf, getPdf] = useState();\r\n const year = date.getFullYear();\r\n const [userDropdownIsOpen, setUserDropdownIsOpen] = useState(false);\r\n const [currentFilter, setCurrentFilter] = useState(\"Cargando...\");\r\n\r\n const [loading, setLoading] = useState(true);\r\n const [months, setMonths] = useState([]);\r\n const currentAccount = useSelector(getCurrentAccount);\r\n\r\n const MONTHS_NUMBERS = {\r\n ENERO: 0,\r\n FEBRERO: 1,\r\n MARZO: 2,\r\n ABRIL: 3,\r\n MAYO: 4,\r\n JUNIO: 5,\r\n JULIO: 6,\r\n AGOSTO: 7,\r\n SETIEMBRE: 8,\r\n SEPTIEMBRE: 8,\r\n OCTUBRE: 9,\r\n NOVIEMBRE: 10,\r\n DICIEMBRE: 11,\r\n };\r\n\r\n const toggleUserDropdown = () => {\r\n setUserDropdownIsOpen((prevState) => !prevState);\r\n };\r\n\r\n // const toggleFilterType = (filterType) => {\r\n // if (currentFilter === filterType) setCurrentFilter();\r\n // else setCurrentFilter(filterType);\r\n // };\r\n\r\n const texts = useSelector(getTexts);\r\n\r\n useEffect(() => {\r\n if (currentAccount.id) {\r\n setLoading(true);\r\n getMonthsPositionReport({ AccountId: currentAccount.id })\r\n .then(({ response }) => {\r\n setLoading(false);\r\n if (response.months) {\r\n // Only shows position reports from account starting date\r\n const filteredMonths = response.months.filter((monthsItem) => {\r\n const splitMonthsItem = monthsItem.split(\" \");\r\n const year = +splitMonthsItem[1];\r\n const month = MONTHS_NUMBERS[splitMonthsItem[0].toUpperCase()];\r\n const monthsItemDate = new Date(year, month + 1, 0);\r\n\r\n return monthsItemDate > new Date(response.firstpossibledate);\r\n });\r\n\r\n // Orders position reports by date\r\n const newMonths = filteredMonths.sort((a, b) => {\r\n const splitA = a.split(\" \");\r\n const splitB = b.split(\" \");\r\n const aYear = +splitA[1];\r\n const aMonth = MONTHS_NUMBERS[splitA[0].toUpperCase()];\r\n const bYear = +splitB[1];\r\n const bMonth = MONTHS_NUMBERS[splitB[0].toUpperCase()];\r\n\r\n if (new Date(aYear, aMonth) > new Date(bYear, bMonth)) return -1;\r\n return 1;\r\n });\r\n\r\n setMonths(newMonths);\r\n setCurrentFilter(newMonths[0]);\r\n }\r\n })\r\n .catch((err) => console.error(err))\r\n .finally(() => setLoading(false));\r\n }\r\n }, [currentAccount]);\r\n\r\n const bateToBlob = (b64Data) => {\r\n const byteCharacters = atob(b64Data);\r\n const contentType = \"application/pdf\";\r\n const sliceSize = 512;\r\n const byteArrays = [];\r\n\r\n for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) {\r\n const slice = byteCharacters.slice(offset, offset + sliceSize);\r\n\r\n const byteNumbers = new Array(slice.length);\r\n for (let i = 0; i < slice.length; i++) {\r\n byteNumbers[i] = slice.charCodeAt(i);\r\n }\r\n\r\n const byteArray = new Uint8Array(byteNumbers);\r\n byteArrays.push(byteArray);\r\n }\r\n\r\n const blob = new Blob(byteArrays, { type: contentType });\r\n return blob;\r\n };\r\n\r\n const handleClick = (report) => {\r\n // Get pdf link\r\n const MonthYear = report.split(\" \");\r\n const newFilter = MonthYear[0] + \" \" + MonthYear[1];\r\n setCurrentFilter(newFilter);\r\n getAccountStatement(currentAccount.AccountNumber, MonthYear[0], MonthYear[1]).then(({ response }) => {\r\n if (response.fileData.length > 0) {\r\n const blobFile = bateToBlob(response.fileData);\r\n // toggleModal(report, URL.createObjectURL(blobFile));\r\n\r\n var a = document.createElement(\"A\");\r\n // a.href = `data:application/octet-stream;base64,${blobFile}`;\r\n a.href = URL.createObjectURL(blobFile);\r\n a.download = `${MonthYear[0]}-${MonthYear[1]}.pdf`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n } else {\r\n showToast(\"No hay estado de cuenta para el mes indicado\", false);\r\n }\r\n });\r\n };\r\n\r\n if (currentAccount.noAccounts)\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n return (\r\n \r\n \r\n

    Ver estado de cuenta:

    \r\n \r\n \r\n {\r\n setUserDropdownIsOpen(!userDropdownIsOpen);\r\n }}\r\n >\r\n \r\n

    {valueIsEmpty(currentFilter) ? \"No hay resultados\" : currentFilter}

    \r\n \r\n
    \r\n \r\n \r\n \r\n {months.length > 0 ? (\r\n months.map((month) => (\r\n {\r\n handleClick(month);\r\n }}\r\n >\r\n {month}\r\n \r\n ))\r\n ) : (\r\n \r\n Sin Resultados\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Rendimiento diario de fondos mutuos\r\n \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nconst FundsComponent = () => {\r\n const [loading, setLoading] = useState(false);\r\n const [asset, setAsset] = useState();\r\n const [assets, setAssets] = useState([]);\r\n const [allowedDates, setAllowedDates] = useState([]);\r\n const [selectedDate, setSelectedDate] = useState();\r\n const [assetDropdownIsOpen, setAssetDropdownIsOpen] = useState(false);\r\n const [dateDropdownIsOpen, setDateDropdownIsOpen] = useState(false);\r\n const currentAccount = useSelector(getCurrentAccount);\r\n\r\n useEffect(() => {\r\n if (currentAccount.id) {\r\n getAllFundsInPosition({ accountId: currentAccount.id })\r\n .then(({ response }) => response)\r\n .then(({ assetinfocolletion }) => {\r\n setAssets(assetinfocolletion);\r\n });\r\n }\r\n }, [currentAccount]);\r\n\r\n const toggleAssetDropdown = () => {\r\n setAssetDropdownIsOpen((prevState) => !prevState);\r\n };\r\n\r\n const toggleDateDropdown = () => {\r\n setDateDropdownIsOpen((prevState) => !prevState);\r\n };\r\n\r\n const onConfirm = () => {\r\n setLoading(() => true);\r\n const date = new Date(selectedDate);\r\n getFundAccountExtractClientX({\r\n accountId: currentAccount.id,\r\n assetId: asset.AssetId,\r\n toDate: selectedDate,\r\n })\r\n .then(({ response }) => {\r\n if (response.result.Code === 400) {\r\n showToast(\"Error obteniendo pdf del servidor\", true);\r\n } else if (response.result.Code === 199) {\r\n showToast(response.result.Description, true);\r\n } else {\r\n var a = document.createElement(\"A\");\r\n a.href = `data:application/octet-stream;base64,${response.blobfile}`;\r\n a.download = \"Extracto de fondos.pdf\";\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\r\n \"An error occurred while trying to download this report, please contact the administrator.\",\r\n true\r\n );\r\n })\r\n .finally(() => {\r\n setLoading(() => false);\r\n });\r\n };\r\n\r\n const handleSelectedDate = (event) => {\r\n setSelectedDate(event.target.value);\r\n };\r\n return (\r\n \r\n Seleccione el fondo y la fecha\r\n \r\n \r\n {asset && (\r\n \r\n {asset.AssetName} - {asset.AssetTicker}\r\n \r\n )}\r\n \r\n \r\n\r\n \r\n \r\n \r\n {assets.map(({ AssetInfo: asset }) => {\r\n return (\r\n {\r\n setAsset(asset);\r\n }}\r\n >\r\n {asset.AssetName} - {asset.AssetTicker}\r\n \r\n );\r\n })}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Descargar\r\n \r\n \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"wrapperCol\":\"MonthlyStateComponent_wrapperCol_354bK\",\"titleSubText\":\"MonthlyStateComponent_titleSubText_i279Q\",\"body\":\"MonthlyStateComponent_body_1NssG\",\"dropdownButton\":\"MonthlyStateComponent_dropdownButton_38n-W\",\"textImageWrapper\":\"MonthlyStateComponent_textImageWrapper_1W_Jf\",\"pdf\":\"MonthlyStateComponent_pdf_33B6a\",\"dropdown\":\"MonthlyStateComponent_dropdown_2nuq5\",\"dropdownToggle\":\"MonthlyStateComponent_dropdownToggle_3l4ZF\",\"dropDownMenu\":\"MonthlyStateComponent_dropDownMenu_2MvIs\",\"item\":\"MonthlyStateComponent_item_3IEnB\",\"warning\":\"MonthlyStateComponent_warning_2RgkY\",\"title\":\"MonthlyStateComponent_title_2Lmr8\",\"arrowImg\":\"MonthlyStateComponent_arrowImg_1gOOg\",\"arrowImgActive\":\"MonthlyStateComponent_arrowImgActive_31_r_\",\"subtitle\":\"MonthlyStateComponent_subtitle_1p8N1\",\"inputStyle\":\"MonthlyStateComponent_inputStyle_277Vu\",\"column\":\"MonthlyStateComponent_column_3wT6l\",\"button\":\"MonthlyStateComponent_button_wWkZG\",\"buttonDropdown\":\"MonthlyStateComponent_buttonDropdown_3az_m\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"wrapperCol\":\"MyData_wrapperCol_31O01\",\"title\":\"MyData_title_3ObaK\",\"table\":\"MyData_table_3Y9o_\"};","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport moment from \"moment\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { Col, Row, Table } from \"reactstrap\";\r\nimport { CircularProgress } from \"bx-react-ui\";\r\n\r\nimport { getSavedPersonInfo } from \"../../../reducers/selectors\";\r\n\r\nimport style from \"./MyData.scss\";\r\n\r\nexport const MyDataComponent = () => {\r\n const personInfo = useSelector(getSavedPersonInfo);\r\n\r\n const [mobilePhone, setMobilePhone] = useState({\r\n PhoneNumber: \"\",\r\n });\r\n const [personDocument, setPersonDocument] = useState({\r\n PhysicalPersonDocumentTypeName: \"\",\r\n PhysicalPersonDocumentNumber: \"\",\r\n });\r\n const [legalAddress, setLegalAddress] = useState({\r\n LegalAddressStreet: \"\",\r\n LegalAddressCityName: \"\",\r\n });\r\n\r\n const genderString = {\r\n N: \"No especificado\",\r\n M: \"Masculino\",\r\n F: \"Femenino\",\r\n };\r\n\r\n const civilStatusString = {\r\n Single: \"Soltero/a\",\r\n Engaged: \"Comprometido/a\",\r\n Married: \"Casado/a\",\r\n Divorced: \"Divorciado/a\",\r\n Widower: \"Viudo/a\",\r\n };\r\n\r\n useEffect(() => {\r\n // actualizar datos de persona\r\n if (personInfo) {\r\n if (personInfo.Phone.length > 0) {\r\n const newMobilePhone = personInfo.Phone.find((phoneItem) => phoneItem.PhoneType === \"Mobile\");\r\n setMobilePhone((prev) => ({\r\n ...prev,\r\n ...newMobilePhone,\r\n }));\r\n }\r\n\r\n if (personInfo.Documents.length > 0) {\r\n const newPersonDocument = personInfo.Documents.find(\r\n (documentItem) => documentItem.PhysicalPersonDocumentIsMain\r\n );\r\n setPersonDocument((prev) => ({\r\n ...prev,\r\n ...newPersonDocument,\r\n }));\r\n }\r\n\r\n if (personInfo.LegalAddress.length > 0) {\r\n const newLegalAddress = personInfo.LegalAddress[0];\r\n setLegalAddress((prev) => ({\r\n ...prev,\r\n ...newLegalAddress,\r\n }));\r\n }\r\n }\r\n }, [personInfo]);\r\n\r\n if (!personInfo) return ;\r\n\r\n let firstAndLastName = \"\";\r\n if (\r\n (personInfo.PhysicalPersonFirstName === undefined || personInfo.PhysicalPersonFirstName === null) &&\r\n (personInfo.PhysicalPersonFirstLastName === undefined || personInfo.PhysicalPersonFirstLastName === null)\r\n ) {\r\n firstAndLastName = \"-\";\r\n } else {\r\n firstAndLastName = personInfo.PhysicalPersonFirstName + \" \" + personInfo.PhysicalPersonFirstLastName;\r\n }\r\n let personLegalAddress = legalAddress.LegalAddressStreet ? legalAddress.LegalAddressStreet : \"\";\r\n let personLegalAddressNumber = legalAddress.LegalAddressNumber ? legalAddress.LegalAddressNumber : \"\";\r\n let personLegalAddressCityName = legalAddress.LegalAddressCityName ? legalAddress.LegalAddressCityName : \"\";\r\n\r\n return (\r\n \r\n
    Mis datos
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    Nombre y apellido{firstAndLastName}
    Género{genderString[personInfo.PhysicalPersonGender]}
    Fecha de nacimiento{moment(personInfo.PhysicalPersonDateOfBirth).format(\"DD/MM/YYYY\")}
    Estado civil{civilStatusString[personInfo.PhysicalPersonCivilStatus]}
    Dirección\r\n {`${personLegalAddress} ${personLegalAddressNumber} ${\r\n personLegalAddress && personLegalAddressNumber && personLegalAddressCityName ? \",\" : \"\"\r\n } ${personLegalAddressCityName} ${\r\n !personLegalAddress && !personLegalAddressNumber && !personLegalAddressCityName ? \"-\" : \"\"\r\n }`}\r\n
    Celular{mobilePhone.PhoneNumber ? mobilePhone.PhoneNumber : \"-\"}
    Correo electrónico{personInfo.PhysicalPersonEmail}
    Tipo de documento{personDocument.PhysicalPersonDocumentTypeName}
    Número de documento{personDocument.PhysicalPersonDocumentNumber}
    Ocupación{personInfo.PersonProfessionName}
    Ciudad (laboral){legalAddress.LegalAddressCityName ? legalAddress.LegalAddressCityName : \"-\"}
    Nombre de la empresa{personInfo.PhysicalPersonInstitution ? personInfo.PhysicalPersonInstitution : \"-\"}
    Actividad del negocio{personInfo.PersonActivitySectorName}
    \r\n
    \r\n \r\n );\r\n};\r\n","import React, { useState, Fragment } from \"react\";\r\nimport { Col, Row, Table } from \"reactstrap\";\r\nimport { useSelector } from \"react-redux\";\r\nimport style from \"./OrdersComponent.scss\";\r\nimport pdf from \"../../../../public/svg/pdf.svg\";\r\nimport { Warning } from \"../../Warning/Warning\";\r\nimport { getOrders } from \"../../../services/api/inout\";\r\nimport { fetchInProcesOrderPDF } from \"../../../services/api/accounts\";\r\nimport { useEffect } from \"react\";\r\nimport { getCurrentAccount } from \"../../../reducers/selectors\";\r\nimport { showToast } from \"../../../utils/helper\";\r\nimport { CircularProgress } from \"bx-react-ui\";\r\nimport moment from \"moment\";\r\nimport { FormattedNumber } from \"bx-react-ui/src/components/FormattedNumber/FormattedNumber\";\r\nimport { getTexts } from \"../../../reducers/selectors\";\r\n\r\nconst OrdersComponent = () => {\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const [loading, setLoading] = useState(true);\r\n const [orders, setOrders] = useState([]);\r\n const texts = useSelector(getTexts);\r\n\r\n useEffect(() => {\r\n setLoading(() => true);\r\n getOrders({ accountNumber: currentAccount.AccountNumber })\r\n .then(({ response }) => {\r\n setOrders(response.orders);\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error obteniendo ordenes en proceso\", true);\r\n })\r\n .finally(() => {\r\n setLoading(() => false);\r\n });\r\n }, [currentAccount]);\r\n\r\n const handleDownload = (item) => {\r\n setLoading(() => true);\r\n fetchInProcesOrderPDF({\r\n orderId: item.OrderId,\r\n accountId: currentAccount.id,\r\n })\r\n .then(({ response }) => {\r\n if (response.result.Code !== 200) {\r\n showToast(\"Error obteniendo pdf del servidor\", true);\r\n } else {\r\n var a = document.createElement(\"A\");\r\n a.href = `data:application/octet-stream;base64,${response.blobfile}`;\r\n a.download = `${moment(item.OrderInitDate).format(\"DD-MM-YY\")}-${item.OrderId}.pdf`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n }\r\n })\r\n .catch((err) => console.error(err))\r\n .finally(() => {\r\n setLoading(() => false);\r\n });\r\n };\r\n\r\n if (loading) return ;\r\n\r\n const EmptyTable = () => {\r\n return (\r\n \r\n \r\n No hay órdenes disponibles.\r\n \r\n \r\n );\r\n };\r\n\r\n if (loading) return ;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {orders.length > 0 ? (\r\n orders.map((item, index) => {\r\n let description = \"\";\r\n let ammountString = \"\";\r\n let ammount = 0;\r\n let currency = \"\";\r\n currency = item.OrderCurrencySymbol;\r\n\r\n try {\r\n ammount = item.CurrentAccount.Precheck.Total;\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n\r\n const formString = {\r\n Bonds: \"Bonos\",\r\n Equity: \"Acciones\",\r\n Options: \"Opciones\",\r\n \"Mutual Funds\": \"Fondos Mutuos\",\r\n \"Money Market\": \"Money Market\",\r\n Forex: \"Forex\",\r\n Repo: \"Repos\",\r\n Future: \"Futuros\",\r\n };\r\n\r\n description += `(${\r\n formString[item.AssetClassForm]\r\n }) ${item.AssetTicker.trim()} - ${item.AssetDescription.trim()} `;\r\n\r\n switch (item.OrderType.trim()) {\r\n case \"Market\":\r\n case \"MarketOnOpen\":\r\n case \"MarketOnClose\":\r\n ammountString = \"Mercado\";\r\n break;\r\n case \"Limit\":\r\n ammountString = \"Limit\";\r\n break;\r\n case \"Stop\":\r\n ammountString = \"Stop\";\r\n break;\r\n case \"StopLimit\":\r\n ammountString = \"Stop Limit\";\r\n break;\r\n default:\r\n break;\r\n }\r\n description += `@ ${ammountString}`;\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n })\r\n ) : (\r\n \r\n )}\r\n \r\n
    FechaTipoDescripcionValor de la operaciónMoneda{\" \"}
    {moment(item.OrderInitDate).format(\"DD/MM/YYYY\")}{item.OrderSide === \"Buy\" ? \"Compra\" : \"Venta\"}{description}\r\n {ammount == 0 ? (\r\n \"-\"\r\n ) : (\r\n \r\n )}\r\n {item.OrderSettlementCurrencySymbol}\r\n handleDownload(item)}\r\n />\r\n
    \r\n
    \r\n \r\n \r\n );\r\n};\r\n\r\nexport default OrdersComponent;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"wrapperCol\":\"OrdersComponent_wrapperCol_1CeKh\",\"activityTableRow\":\"OrdersComponent_activityTableRow_cwC2a\",\"table\":\"OrdersComponent_table_1GWoO\",\"tableHead\":\"OrdersComponent_tableHead_V4WA5\",\"tableRow\":\"OrdersComponent_tableRow_1w7LK\",\"tableH\":\"OrdersComponent_tableH_2hONj\",\"tableBody\":\"OrdersComponent_tableBody_1hHN0\",\"icon\":\"OrdersComponent_icon_nSspi\",\"title\":\"OrdersComponent_title_2TRjY\",\"md\":\"OrdersComponent_md_B8nIz\",\"sm\":\"OrdersComponent_sm_93Eyo\"};","import React, { Component, useState } from \"react\";\r\nimport { NavLink, useLocation } from \"react-router-dom\";\r\nimport { Badge, Nav, NavItem, NavLink as RsNavLink, NavbarBrand } from \"reactstrap\";\r\nimport classNames from \"classnames\";\r\nimport nav from \"./_nav\";\r\nimport logo from \"../../../../public/svg/logoBancoFamiliar.svg\";\r\nimport cross from \"../../../../public/svg/x-symbol-svgrepo-com.svg\";\r\nimport menu from \"../../../../public/svg/menu.svg\";\r\nimport MediaQuery from \"react-responsive\";\r\nimport BadgeIcon from \"../../Layout/BadgeIcon/BadgeIcon\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { getCounters, getCurrentAccount } from \"../../../reducers/selectors\";\r\nimport { signOut } from \"../../../actions/auth\";\r\nimport { UserSelector } from \"../../UserSelector/UserSelector\";\r\nimport NavbarToggler from \"reactstrap/lib/NavbarToggler\";\r\n\r\nimport style from \"./Sidebar.scss\";\r\n\r\nimport menuIcon from \"../../../../public/svg/menu.svg\";\r\nimport { useEffect } from \"react\";\r\n\r\nconst Sidebar = () => {\r\n const dispatch = useDispatch();\r\n const counters = useSelector(getCounters);\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const isReadOnly = currentAccount.isReadOnly;\r\n const handleClick = (e) => {\r\n e.preventDefault();\r\n e.target.parentElement.classList.toggle(\"open\");\r\n };\r\n\r\n const activeRoute = (routeName, props) => {\r\n // return this.props.location.pathname.indexOf(routeName) > -1 ? 'nav-item nav-dropdown open' : 'nav-item nav-dropdown';\r\n return props.location.pathname.indexOf(routeName) > -1\r\n ? \"nav-item nav-dropdown open\"\r\n : \"nav-item nav-dropdown\";\r\n };\r\n\r\n const hideMobile = () => {\r\n if (document.body.classList.contains(\"sidebar-mobile-show\")) {\r\n document.body.classList.toggle(\"sidebar-mobile-show\");\r\n }\r\n };\r\n\r\n const onLogout = () => {\r\n sessionStorage.clear();\r\n dispatch(signOut());\r\n };\r\n\r\n const isActiveItem = (e, url) => {\r\n return e.pathname === url;\r\n };\r\n\r\n // todo Sidebar nav secondLevel\r\n // secondLevelActive(routeName) {\r\n // return this.props.location.pathname.indexOf(routeName) > -1 ? \"nav nav-second-level collapse in\" : \"nav nav-second-level collapse\";\r\n // }\r\n\r\n // badge addon to NavItem\r\n const badge = (badge) => {\r\n if (badge) {\r\n const classes = classNames(badge.class);\r\n return (\r\n \r\n {badge.text}\r\n \r\n );\r\n }\r\n };\r\n\r\n // simple wrapper for nav-title item\r\n const wrapper = (item) => {\r\n return item.wrapper && item.wrapper.element\r\n ? React.createElement(item.wrapper.element, item.wrapper.attributes, item.name)\r\n : item.name;\r\n };\r\n\r\n // nav list section title\r\n const title = (title, key) => {\r\n const classes = classNames(\"nav-title\", title.class);\r\n return (\r\n
  • \r\n {wrapper(title)}{\" \"}\r\n
  • \r\n );\r\n };\r\n\r\n // nav list divider\r\n const divider = (divider, key) => {\r\n const classes = classNames(\"divider\", divider.class);\r\n return
  • ;\r\n };\r\n\r\n // nav label with nav link\r\n const navLabel = (item, key) => {\r\n const classes = {\r\n item: classNames(\"hidden-cn\", item.class),\r\n link: classNames(\"nav-label\", item.class ? item.class : \"\"),\r\n icon: classNames(\r\n !item.icon ? \"fa fa-circle\" : item.icon,\r\n item.label.variant ? `text-${item.label.variant}` : \"\",\r\n item.label.class ? item.label.class : \"\"\r\n ),\r\n };\r\n return navLink(item, key, classes);\r\n };\r\n\r\n // nav item with nav link\r\n const navItem = (item, key) => {\r\n const classes = {\r\n item: classNames(item.class),\r\n link: classNames(\"nav-link\", item.variant ? `nav-link-${item.variant}` : \"\"),\r\n icon: classNames(item.icon),\r\n };\r\n return navLink(item, key, classes);\r\n };\r\n\r\n // nav link\r\n const navLink = (item, key, classes) => {\r\n const url = item.url ? item.url : \"\";\r\n const iconUrl = item.iconUrl ? item.iconUrl : \"\";\r\n\r\n const onClick = url === \"/login\" ? onLogout : hideMobile;\r\n\r\n const activeElement = {\r\n \"/\": \"Portafolio\",\r\n \"/history\": \"Histórico\",\r\n \"/orders\": \"Órdenes en proceso\",\r\n \"/authorizations\": \"Autorizaciones\",\r\n \"/invest\": \"Invertir\",\r\n \"/futureIncome\": \"Ingresos futuros\",\r\n \"/calendar\": \"Estados mensuales\",\r\n \"/notifications\": \"Notificaciones\",\r\n };\r\n\r\n const URLlocation = useLocation().pathname;\r\n\r\n return (\r\n \r\n {isExternal(url) ? (\r\n \r\n {iconUrl ? (\r\n \r\n
    \r\n \r\n
    \r\n
    \r\n ) : null}\r\n \r\n \r\n {item.name}\r\n {badge(item.badge)}\r\n \r\n
    \r\n ) : (\r\n isActiveItem(e, url)}\r\n onClick={onClick}\r\n >\r\n \r\n {iconUrl ? (\r\n \r\n
    \r\n \r\n
    \r\n
    \r\n ) : null}\r\n \r\n {item.name}\r\n {badge(item.badge)}\r\n
    \r\n \r\n )}\r\n \r\n \r\n );\r\n };\r\n\r\n const NavBadge = ({ counter }) => {\r\n if (!counter) {\r\n return null;\r\n } else {\r\n const total = +counters[counter] || 0;\r\n return total === 0 ? null : ;\r\n }\r\n };\r\n\r\n // nav dropdown\r\n const navDropdown = (item, key) => {\r\n return (\r\n
  • \r\n \r\n \r\n {item.name}\r\n \r\n
      {navList(item.children)}
    \r\n
  • \r\n );\r\n };\r\n\r\n // nav type\r\n const navType = (item, idx) =>\r\n item.title\r\n ? title(item, idx)\r\n : item.divider\r\n ? divider(item, idx)\r\n : item.label\r\n ? navLabel(item, idx)\r\n : item.children\r\n ? navDropdown(item, idx)\r\n : navItem(item, idx);\r\n\r\n // nav list\r\n const navList = (items) => {\r\n return items.map((item, index) => navType(item, index));\r\n };\r\n\r\n const isExternal = (url) => {\r\n const link = url ? url.substring(0, 4) : \"\";\r\n return link === \"http\";\r\n };\r\n\r\n const mobileSidebarToggle = (e) => {\r\n e.preventDefault();\r\n document.body.classList.toggle(\"sidebar-mobile-show\");\r\n };\r\n\r\n const filteredItems = nav.items.filter(\r\n item => item.name !== 'Autorizaciones' && item.name !== 'Invertir'\r\n );\r\n\r\n // sidebar-nav root\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default Sidebar;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"sidebar\":\"Sidebar_sidebar_3uHTX\",\"sidebarNav\":\"Sidebar_sidebarNav_3IIRP\",\"wrapper\":\"Sidebar_wrapper_28rvT\",\"badgeIcon\":\"Sidebar_badgeIcon_1_iOH\",\"badgeIconCounter\":\"Sidebar_badgeIconCounter_Jlq6b\",\"circle\":\"Sidebar_circle_3Ae41\",\"imgLogo\":\"Sidebar_imgLogo_hLf_g\",\"mobileSidebarHeader\":\"Sidebar_mobileSidebarHeader_j_PNo\",\"navBackground\":\"Sidebar_navBackground_1fhtq\",\"nav\":\"Sidebar_nav_3EVl-\",\"activeLi\":\"Sidebar_activeLi_3Kq9m\",\"item\":\"Sidebar_item_3ptqQ\",\"iconSvg\":\"Sidebar_iconSvg_2t2bn\",\"container\":\"Sidebar_container_su0DI\",\"backgroundIcon\":\"Sidebar_backgroundIcon_1_TUP\",\"cross\":\"Sidebar_cross_19emx\",\"hambMenuLogo\":\"Sidebar_hambMenuLogo_6VM0I\",\"navToggler\":\"Sidebar_navToggler_1Zuwe\",\"logo\":\"Sidebar_logo_wFUKg\",\"dummyDiv\":\"Sidebar_dummyDiv_3Trfb\",\"hambIcon\":\"Sidebar_hambIcon_3_yfG\"};","export default {\r\n items: [\r\n {\r\n name: \"Portafolio\",\r\n url: \"/\",\r\n },\r\n {\r\n name: \"Histórico\",\r\n url: \"/history\",\r\n },\r\n {\r\n name: \"Órdenes en proceso\",\r\n url: \"/orders\",\r\n counter: \"inProcessOrders\",\r\n },\r\n {\r\n name: \"Autorizaciones\",\r\n url: \"/authorizations\",\r\n },\r\n {\r\n name: \"Invertir\",\r\n url: \"/invest\",\r\n },\r\n\r\n {\r\n name: \"Ingresos futuros\",\r\n url: \"/futureIncome\",\r\n },\r\n {\r\n name: \"Estados mensuales\",\r\n url: \"/calendar\",\r\n },\r\n // {\r\n // name: \"Notificaciones\",\r\n // url: \"/notifications\"\r\n // },\r\n {\r\n name: \"Cerrar sesión\",\r\n url: \"/login\",\r\n iconUrl: \"../svg/lock-24px.svg\",\r\n },\r\n {\r\n name: \"Ayuda\",\r\n url: \"/help\",\r\n iconUrl: \"../svg/help.svg\",\r\n },\r\n ],\r\n};\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Modal, Button } from \"reactstrap\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { showToast } from \"../../utils/helper\";\r\n\r\nimport { CircularProgress } from \"../../components/UI/CircularProgress/CircularProgress\";\r\nimport { getSession } from \"../../reducers/selectors\";\r\nimport { getAuthorizations } from \"../../services/api/authorizations\";\r\nimport { getLegalContracts, setLegalContract } from \"../../services/api/person\";\r\nimport { getMessages } from \"../../services/api/internalMessages\";\r\nimport {\r\n authorizationsSuccess,\r\n notificationsSuccess,\r\n setNotificationsLoading,\r\n textsSet,\r\n textsLoadingSet,\r\n} from \"../../actions/entities\";\r\nimport { fetchTooltipsAndNotes } from \"../../services/api/entities\";\r\n\r\nimport style from \"./LegalContracts.scss\";\r\nimport { Container } from \"../../components/UI/Container/Container\";\r\nimport GenericButton from \"../../components/UI/Button/Button\";\r\nimport downloadIcon from \"../../../public/svg/download-svgrepo-com.svg\";\r\nimport CheckedCheckbox from \"../../../public/svg/checkbox-checked.svg\";\r\nimport UncheckedCheckbox from \"../../../public/svg/checkbox-unchecked.svg\";\r\n\r\nexport const LegalContracts = () => {\r\n const session = useSelector(getSession);\r\n const [contract, setContract] = useState(null);\r\n const [contractLoading, setContractLoading] = useState(false);\r\n const [contractLoaded, setContractLoaded] = useState(false);\r\n const [updateContractLoading, setUpdateContractLoading] = useState(false);\r\n const [loading, setLoading] = useState(false);\r\n\r\n useEffect(() => {\r\n if (!contractLoading && session && !contract && !contractLoaded) {\r\n updateLegalContract();\r\n }\r\n }, [session]);\r\n\r\n const updateLegalContract = () => {\r\n setContractLoading(() => true);\r\n getLegalContracts()\r\n .then(({ response }) => {\r\n if (response.result.Code !== 200) {\r\n showToast(\"Error obteniendo nuevos contratos del servidor\", true);\r\n } else {\r\n if (response.LegalContractSDT.LegalContractAttachmentName) {\r\n setContract({\r\n ...response.LegalContractSDT,\r\n LegalContractAttachmentBlob: response.blobfile,\r\n });\r\n }\r\n setContractLoaded(() => true);\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error obteniendo nuevos contratos del servidor\", true);\r\n })\r\n .finally(() => {\r\n setContractLoading(() => false);\r\n });\r\n };\r\n\r\n const getFile = () => {\r\n var a = document.createElement(\"A\");\r\n a.href = `data:application/octet-stream;base64,${contract.LegalContractAttachmentBlob}`;\r\n a.download = `${contract.LegalContractAttachmentName}.${contract.LegalContractAttachmentExtension}`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n };\r\n\r\n const handleAuthorizeContract = (payload) => {\r\n if (!updateContractLoading) {\r\n setContractLoading(() => true);\r\n setUpdateContractLoading(() => true);\r\n setLoading(() => true);\r\n setLegalContract({ LegalContractId: contract.LegalContractId })\r\n .then(({ response }) => {\r\n if (response.result.Code === 200) {\r\n }\r\n })\r\n .catch((err) => {\r\n showToast(\"Error confirmando el contrato\", true);\r\n console.error(err);\r\n })\r\n .finally(() => {\r\n setContractLoading(() => false);\r\n setUpdateContractLoading(() => false);\r\n setTimeout(() => {\r\n window.location.href = \"/\";\r\n }, 3000);\r\n });\r\n }\r\n };\r\n\r\n const [checked, setChecked] = useState(false);\r\n\r\n const handleChangeCheckbox = () => {\r\n setChecked((prevState) => !prevState);\r\n };\r\n return (\r\n \r\n \r\n Acepta el Contrato legal\r\n
    Revisa el siguiente documento:
    \r\n
    \r\n
    \r\n
    \r\n

    \r\n {contract && contract.LegalContractAttachmentName\r\n ? `${contract.LegalContractAttachmentName}.${contract.LegalContractAttachmentExtension}`\r\n : \"No hay contratos disponibles.\"}\r\n

    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n {checked ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n

    \r\n He leído, comprendido y acepto los términos y condiciones del documento que acabo de leer\r\n

    \r\n
    \r\n\r\n {loading ? (\r\n \r\n ) : (\r\n \r\n Confirmar\r\n \r\n )}\r\n
    \r\n
    \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"content\":\"LegalContracts_content_28L3I\",\"contractModal\":\"LegalContracts_contractModal_s7DmU\",\"header\":\"LegalContracts_header_hj_4l\",\"title\":\"LegalContracts_title_193zZ\",\"contract\":\"LegalContracts_contract_JIj_5\",\"subTitle\":\"LegalContracts_subTitle_2gWqN\",\"orangeText\":\"LegalContracts_orangeText_3_u_f\",\"footer\":\"LegalContracts_footer_3-7rc\",\"button\":\"LegalContracts_button_2eZ0k\",\"attachment\":\"LegalContracts_attachment_t3UA4\",\"loadingWrapper\":\"LegalContracts_loadingWrapper_2UtDO\",\"modalWrapper\":\"LegalContracts_modalWrapper_1GPWt\",\"contractContainer\":\"LegalContracts_contractContainer_1s1FJ\",\"contractTitle\":\"LegalContracts_contractTitle_2iNNL\",\"divider\":\"LegalContracts_divider_4qjnC\",\"buttonConfirmContract\":\"LegalContracts_buttonConfirmContract_3Y2JF\",\"text\":\"LegalContracts_text_3a0uC\",\"contractFileCard\":\"LegalContracts_contractFileCard_9ZnRd\",\"boxContract\":\"LegalContracts_boxContract_1O93X\",\"downloadPdf\":\"LegalContracts_downloadPdf_1dXua\",\"chekboxContract\":\"LegalContracts_chekboxContract_2a8pU\",\"textAcceptContract\":\"LegalContracts_textAcceptContract_2S17W\",\"toastClassName\":\"LegalContracts_toastClassName_-RrGu\"};","import React, { useEffect, useState } from \"react\";\r\nimport { Modal, ModalBody, Col, Row, Button, ModalHeader } from \"reactstrap\";\r\nimport cross from \"../../../../public/svg/x-symbol-svgrepo-com.svg\";\r\nimport style from \"./InvestBuyModal.scss\";\r\nimport { FormattedNumber } from \"bx-react-ui/src/components/FormattedNumber/FormattedNumber\";\r\nimport moment from \"moment\";\r\n\r\nconst defaultFields = {\r\n AssetCouponRate: 0,\r\n SettlementCurrency: \"\",\r\n DebitTotal: 0,\r\n Commission: 0,\r\n BuyTotal: 0,\r\n IVA: 0,\r\n};\r\n\r\nconst getAssetClassName = (assetClass) => {\r\n switch (assetClass) {\r\n case \"Bonds\":\r\n case \"BondsARG\":\r\n return \"Bonos\";\r\n case \"Caucion\":\r\n return \"Cauciones\";\r\n case \"Equity\":\r\n return \"Acciones\";\r\n case \"Future\":\r\n return \"Futuros\";\r\n case \"MutualFunds\":\r\n return \"Fondos Mutuos\";\r\n case \"Options\":\r\n return \"Opciones\";\r\n default:\r\n return assetClass;\r\n }\r\n};\r\n\r\nexport const InvestBuyModal = ({ modal, toggle, item, trade, io, order }) => {\r\n const [fields, setFields] = useState(defaultFields);\r\n const [ioTotal, setIoTotal] = useState(0);\r\n const [tradeTotal, setTradeTotal] = useState(0);\r\n const [total, setTotal] = useState(0);\r\n\r\n useEffect(() => {\r\n return () => {\r\n setFields(defaultFields);\r\n };\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (item) {\r\n if (!fields.SettlementCurrency) {\r\n const defaultCurrency = item.AssetInformation.SettlementCurrencies.find(\r\n (settlementCurrenciesItem) => settlementCurrenciesItem.SettlementCurrencyIsDefault\r\n );\r\n setFields((prevFields) => ({\r\n ...prevFields,\r\n SettlementCurrency: defaultCurrency.SettlementCurrencyISO,\r\n }));\r\n }\r\n if (fields.AssetCouponRate === 0) {\r\n item.AssetInformation.Payments.map((paymentItem) => {\r\n const paymentItemAssetCouponDate = new Date(paymentItem.AssetCouponDate);\r\n if (new Date() < paymentItemAssetCouponDate) {\r\n setFields((prevFields) => ({\r\n ...prevFields,\r\n AssetCouponRate: +paymentItem.AssetCouponRate,\r\n }));\r\n return;\r\n }\r\n });\r\n }\r\n }\r\n }, [item]);\r\n\r\n useEffect(() => {\r\n if (order) {\r\n if (!fields.Commission) {\r\n let newCharges = 0;\r\n\r\n if (order.CurrentAccount.Precheck.Fees) {\r\n order.CurrentAccount.Precheck.Fees.map((feeitem) => {\r\n newCharges += +feeitem.feevalue;\r\n });\r\n }\r\n\r\n const newCommission = +order.CurrentAccount.Precheck.commission - newCharges;\r\n\r\n setFields((prevFields) => ({\r\n ...prevFields,\r\n Commission: newCommission,\r\n }));\r\n }\r\n }\r\n }, [order]);\r\n\r\n useEffect(() => {\r\n if (io && io.items) {\r\n let newIoTotal = 0;\r\n io.items.map((ioItem) => {\r\n newIoTotal += +ioItem.Quantity;\r\n });\r\n setIoTotal(newIoTotal);\r\n } else {\r\n setIoTotal(trade.TradeCashValue);\r\n }\r\n }, [io, trade]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n

    Inversión realizada con éxito

    \r\n \"cross\"\r\n
    \r\n {/*
    \r\n
    {getAssetClassName(item.AssetClassForm)}
    \r\n

    {item.AssetName}

    \r\n
    */}\r\n
    \r\n \r\n \r\n
    total debitado
    \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    estado de la transacción
    \r\n
    en proceso
    \r\n \r\n \r\n
    fecha
    \r\n
    {moment().format(\"DD/MM/YYYY\")}
    \r\n \r\n \r\n
    número de la orden
    \r\n
    {order.OrderId}
    \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    número de la operación
    \r\n
    {trade.TradeId}
    \r\n \r\n \r\n
    tipo de inversión
    \r\n
    {item.AssetInformation.AssetClassName.toLowerCase()}
    \r\n \r\n \r\n
    operación
    \r\n
    compra
    \r\n \r\n \r\n
    precio
    \r\n
    \r\n \r\n
    \r\n \r\n\r\n \r\n
    cantidad
    \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    rendimiento
    \r\n
    \r\n %\r\n
    \r\n \r\n \r\n
    tasa nominal
    \r\n
    \r\n %\r\n
    \r\n \r\n \r\n
    vencimiento
    \r\n
    \r\n {moment(item.AssetInformation.AssetMaturityDate).format(\"DD/MM/YYYY\")}\r\n
    \r\n \r\n\r\n \r\n
    comisión corretaje
    \r\n
    \r\n {`${fields.SettlementCurrency} `}\r\n \r\n
    \r\n \r\n \r\n
    ISIN
    \r\n
    {item.AssetInformation.AssetTicker}
    \r\n \r\n {/* \r\n
    cuenta débito
    \r\n {`${trade.activeAccount.PersonBankAccountName} nº${trade.activeAccount.PersonBankAccountNumber}`}
    \r\n */}\r\n \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"body\":\"InvestBuyModal_body_1fJSY\",\"wrapperCol\":\"InvestBuyModal_wrapperCol_2k-1J\",\"row\":\"InvestBuyModal_row_3ynQe\",\"container\":\"InvestBuyModal_container_3qGCk\",\"successTitle\":\"InvestBuyModal_successTitle_3y_2t\",\"cross\":\"InvestBuyModal_cross_1ip9n\",\"containerFirstRow\":\"InvestBuyModal_containerFirstRow_1FPuH\",\"subtitle\":\"InvestBuyModal_subtitle_3Sx0s\",\"name\":\"InvestBuyModal_name_35nHd\",\"containerSecondRow\":\"InvestBuyModal_containerSecondRow_2vucG\",\"col\":\"InvestBuyModal_col_3YeGZ\",\"total\":\"InvestBuyModal_total_2_cXM\",\"state\":\"InvestBuyModal_state_3no6R\",\"containerThirdRow\":\"InvestBuyModal_containerThirdRow_AeZvN\",\"footer\":\"InvestBuyModal_footer_2Zphe\",\"printButton\":\"InvestBuyModal_printButton_2DKMm\"};","import React, { Fragment, useState, useEffect } from \"react\";\r\nimport {\r\n Button,\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n UncontrolledTooltip,\r\n Row,\r\n Col,\r\n} from \"reactstrap\";\r\nimport moment from \"moment\";\r\nimport { FormattedNumber } from \"bx-react-ui/src/components/FormattedNumber/FormattedNumber\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { useDebounce } from \"bx-react-ui/src/utils/hooks\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { CircularProgress } from \"bx-react-ui\";\r\n\r\nimport toggleIcon from \"../../../../public/svg/x-symbol-svgrepo-com.svg\";\r\nimport pencil from \"../../../../public/svg/autorizaciones.svg\";\r\nimport tooltipIcon from \"../../../../public/svg/i.svg\";\r\nimport { getEarnings, takeOffer } from \"../../../services/api/inout\";\r\nimport { getSavedPersonInfo, getCurrentAccount, getTexts } from \"../../../reducers/selectors\";\r\nimport { showToast } from \"../../../utils/helper\";\r\nimport { setRedirectionData } from \"../../../services/api/entities\";\r\nimport { getPersonBankAccount } from \"../../../services/api/accounts\";\r\nimport { getPaymentURL } from \"../../../services/api/authorizations\";\r\nimport { ExternalAccountsWrapper } from \"../../Invest/ExternalAccountsWrapper/ExternalAccountsWrapper\";\r\n\r\nimport style from \"./InvestModal.scss\";\r\nimport { InvestBuyModal } from \"../InvestBuyModal/InvestBuyModal\";\r\n\r\n// Merge fix\r\nexport const InvestModal = ({ modal, toggle, item }) => {\r\n const [value, setValue] = useState(null);\r\n const debValue = useDebounce(value, 300);\r\n const [activeAccount, setActiveAccount] = useState(null);\r\n const [loading, setLoading] = useState(false);\r\n const [loadingEarnings, setLoadingEarnings] = useState(false);\r\n const [bankAccounts, setBankAccounts] = useState([]);\r\n const [clientBankAccount, setClientBankAccount] = useState(\"\");\r\n\r\n const [afterHoursModal, setAfterHoursModal] = useState({ show: false, accepted: false });\r\n const [loadingBankAccounts, setLoadingBankAccounts] = useState(true);\r\n const [errorMessage, setErrorMessage] = useState();\r\n const [useCash, setUseCash] = useState(false);\r\n const [openConfirmationModal, setOpenConfirmationmodal] = useState(false);\r\n const [tradeInfo, setTradeInfo] = useState();\r\n const [orderInfo, setOrderInfo] = useState();\r\n\r\n const [fields, setFields] = useState({\r\n AssetCouponRate: 0,\r\n SettlementCurrency: \"\",\r\n DebitTotal: 0,\r\n Commission: 0,\r\n BuyTotal: 0,\r\n Charges: 0,\r\n IVA: 0,\r\n Available: 0,\r\n });\r\n const personInfo = useSelector(getSavedPersonInfo);\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const texts = useSelector(getTexts);\r\n\r\n useEffect(() => {\r\n if (!fields.SettlementCurrency) {\r\n const defaultCurrency = item.AssetInformation.SettlementCurrencies.find(\r\n (settlementCurrenciesItem) => settlementCurrenciesItem.SettlementCurrencyIsDefault\r\n );\r\n setFields((prevFields) => ({\r\n ...prevFields,\r\n SettlementCurrency: defaultCurrency.SettlementCurrencyISO,\r\n }));\r\n }\r\n if (currentAccount.id && fields.SettlementCurrency) {\r\n setLoadingEarnings(() => true);\r\n const OrderInitDate = moment().format(\"YYYY-MM-DD\");\r\n\r\n const order = {\r\n OrderInitDate,\r\n OrderSide: \"Buy\",\r\n AssetId: item.AssetInformation.AssetId,\r\n OrderSettlementCurrencySymbol: fields.SettlementCurrency,\r\n OrderPrice: item.OfferPrice,\r\n CurrentAccount: {\r\n AccountId: currentAccount.id,\r\n Quantity: +debValue,\r\n },\r\n };\r\n\r\n getEarnings({ order })\r\n .then(({ response }) => {\r\n if (response.result.Code !== 200) {\r\n showToast(\"Error obteniendo comisiones y cargos del servidor\", true);\r\n } else {\r\n let newIVA = 0;\r\n newIVA =\r\n +response.order.CurrentAccount.Precheck.tax +\r\n +response.order.CurrentAccount.Precheck.taxupfront +\r\n +response.order.CurrentAccount.Precheck.taxfxupfront;\r\n\r\n let newCharges = 0;\r\n\r\n if (response.order.CurrentAccount.Precheck.Fees) {\r\n response.order.CurrentAccount.Precheck.Fees.map((feeitem) => {\r\n newCharges += +feeitem.feevalue;\r\n });\r\n }\r\n\r\n const newCommission = +response.order.CurrentAccount.Precheck.commission - newCharges;\r\n\r\n setFields((prevFields) => ({\r\n ...prevFields,\r\n BuyTotal:\r\n +response.order.CurrentAccount.Precheck.Principal +\r\n +response.order.CurrentAccount.Precheck.Accrual,\r\n Commission: newCommission,\r\n DebitTotal: +response.order.CurrentAccount.Precheck.Total,\r\n IVA: newIVA,\r\n Charges: newCharges,\r\n }));\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error obteniendo comisiones y cargos del servidor\", true);\r\n })\r\n .finally(() => {\r\n setLoadingEarnings(() => false);\r\n });\r\n }\r\n }, [item, debValue, currentAccount]);\r\n\r\n useEffect(() => {\r\n if (fields.Available === 0) {\r\n const available = item.OfferQuantitytoClient - item.OfferQuantityTakenByClient;\r\n setFields((prevFields) => ({\r\n ...prevFields,\r\n Available: available,\r\n }));\r\n }\r\n if (fields.AssetCouponRate === 0) {\r\n item.AssetInformation.Payments.map((paymentItem) => {\r\n const paymentItemAssetCouponDate = new Date(paymentItem.AssetCouponDate);\r\n if (new Date() < paymentItemAssetCouponDate) {\r\n setFields((prevFields) => ({\r\n ...prevFields,\r\n AssetCouponRate: +paymentItem.AssetCouponRate,\r\n }));\r\n return;\r\n }\r\n });\r\n }\r\n }, [item]);\r\n\r\n const validate = () => {\r\n if (+value === 0) {\r\n showToast(\"La cantidad ingresada no puede ser cero.\", true);\r\n return false;\r\n }\r\n if (+value > item.OfferQuantitytoClient) {\r\n showToast(\"La cantidad ingresada no puede ser mayor a la cantidad ofrecida.\", true);\r\n return false;\r\n }\r\n if (!clientBankAccount && !useCash) {\r\n showToast(\"Debe seleccionar al menos un método de pago\", true);\r\n return false;\r\n }\r\n return true;\r\n };\r\n\r\n const handleChange = (event) => {\r\n const result = event.target.value.replace(/\\D/g, \"\");\r\n setValue(result);\r\n setActiveAccount(null);\r\n };\r\n\r\n const tooltTipStyles = {\r\n color: \"white\",\r\n backgroundColor: \"#285DB8\",\r\n };\r\n\r\n const getPaymentString = (AssetCouponDividendPaymentBase, AssetCouponDividendPaymentFrecuency) => {\r\n let paymentString = AssetCouponDividendPaymentFrecuency;\r\n\r\n switch (AssetCouponDividendPaymentBase) {\r\n case \"Days\":\r\n if (AssetCouponDividendPaymentFrecuency === 1) {\r\n // paymentString += \" dia\";\r\n paymentString = \"diario\";\r\n } else {\r\n paymentString = \"cada \" + paymentString + \" dias\";\r\n }\r\n break;\r\n case \"Weeks\":\r\n if (AssetCouponDividendPaymentFrecuency === 1) {\r\n // paymentString += \" semana\";\r\n paymentString = \"semanal\";\r\n } else {\r\n paymentString = \"cada \" + paymentString + \" semanas\";\r\n }\r\n break;\r\n case \"Months\":\r\n if (AssetCouponDividendPaymentFrecuency === 1) {\r\n // paymentString += \" mes\";\r\n paymentString = \"mensual\";\r\n } else if (AssetCouponDividendPaymentFrecuency === 2) {\r\n paymentString = \"bimensual\";\r\n } else if (AssetCouponDividendPaymentFrecuency === 3) {\r\n paymentString = \"trimestral\";\r\n } else if (AssetCouponDividendPaymentFrecuency === 6) {\r\n paymentString = \"semestral\";\r\n } else {\r\n paymentString = \"cada \" + paymentString + \" meses\";\r\n }\r\n break;\r\n case \"Years\":\r\n if (AssetCouponDividendPaymentFrecuency === 1) {\r\n // paymentString += \" año\";\r\n paymentString = \"anual\";\r\n } else {\r\n paymentString = \"cada \" + paymentString + \" años\";\r\n }\r\n break;\r\n }\r\n if (paymentString === \"\") return \"-\";\r\n return paymentString;\r\n };\r\n\r\n const getName = (name) => {\r\n let res = name.split(\" \");\r\n res = res[0];\r\n return res;\r\n };\r\n\r\n const getResidualTerm = () => {\r\n const today = moment(new Date());\r\n const expiration = moment(item.AssetInformation.AssetMaturityDate);\r\n if (!item.AssetInformation.AssetMaturityDate) return \"-\";\r\n return expiration.diff(today, \"months\");\r\n };\r\n\r\n const NoBankAccountsAvailable = () => {\r\n return (\r\n
    \r\n \r\n No hay cuentas de banco dispoibles en esta moneda o no tienen saldo suficiente para realizar esta\r\n compra.\r\n \r\n
    \r\n );\r\n };\r\n\r\n const onChangeCheckbox = (bankAccountNumber) => {\r\n setClientBankAccount((state) => {\r\n if (state === bankAccountNumber) {\r\n return null;\r\n } else {\r\n return bankAccountNumber;\r\n }\r\n });\r\n };\r\n\r\n const onChangeCheckboxCash = () => {\r\n setUseCash((state) => {\r\n if (state === true) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n });\r\n };\r\n\r\n const responseTrade = (trade, order) => {\r\n setTradeInfo(trade);\r\n setOrderInfo(order);\r\n setOpenConfirmationmodal(() => true);\r\n };\r\n\r\n const onConfirm = () => {\r\n if (validate()) {\r\n setLoading(() => true);\r\n // externalAccount, currencyISO, amount\r\n takeOffer({\r\n offerid: item.OfferId,\r\n quantity: value,\r\n accountNumber: currentAccount.AccountNumber,\r\n bankAccountNumber: clientBankAccount,\r\n useCash: useCash,\r\n })\r\n .then(({ response }) => {\r\n if (response.result.Code != 200) {\r\n showToast(\"Error procesando autorización\", true);\r\n setLoading(false);\r\n } else {\r\n responseTrade(response.trade, response.order);\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error procesando autorización\", true);\r\n setLoading(false);\r\n });\r\n }\r\n };\r\n\r\n const handleOpen = () => {\r\n console.log(\"llega\");\r\n setOpenConfirmationmodal((prev) => !prev);\r\n };\r\n\r\n const handleCloseAll = () => {\r\n handleOpen();\r\n toggle();\r\n };\r\n\r\n return (\r\n \r\n \r\n
    \r\n \r\n {\r\n toggle();\r\n }}\r\n />\r\n \r\n \r\n \r\n
    Detalle de la inversión
    \r\n
    \r\n \r\n \r\n \r\n Producto: {item.AssetInformation.AssetDescription}\r\n \r\n\r\n \r\n \r\n \r\n ISIN\r\n \r\n \r\n {texts.tooltips.invest_isin}\r\n \r\n \r\n
    \r\n \r\n

    {item.AssetInformation.AssetTicker ? item.AssetInformation.AssetTicker : \"-\"}

    \r\n
    \r\n \r\n \r\n Precio\r\n
    \r\n \r\n

    \r\n \r\n

    \r\n
    \r\n \r\n \r\n \r\n Rendimiento (TNA)\r\n \r\n \r\n {texts.tooltips.invest_performance}\r\n \r\n \r\n
    \r\n \r\n

    \r\n \r\n

    \r\n
    \r\n \r\n \r\n Pago de interés\r\n
    \r\n \r\n

    \r\n {getPaymentString(\r\n item.AssetInformation.AssetCouponDividendPaymentBase,\r\n item.AssetInformation.AssetCouponDividendPaymentFrecuency\r\n )}\r\n

    \r\n
    \r\n \r\n \r\n \r\n Tasa nominal\r\n \r\n \r\n {texts.tooltips.invest_coupon_rate}\r\n \r\n \r\n
    \r\n \r\n

    \r\n %\r\n

    \r\n
    \r\n \r\n
    \r\n \r\n \r\n \r\n Plazo residual\r\n \r\n \r\n {texts.tooltips.invest_maturity_date}\r\n \r\n \r\n
    \r\n \r\n

    \r\n {item.AssetInformation.SubAssetClassInfo.SubAssetClassHasMaturity\r\n ? `${getResidualTerm()} meses`\r\n : \"-\"}\r\n

    \r\n
    \r\n \r\n \r\n Vencimiento\r\n
    \r\n \r\n

    \r\n {item.AssetInformation.SubAssetClassInfo.SubAssetClassHasMaturity\r\n ? moment(item.AssetInformation.AssetMaturityDate).format(\"DD/MM/YYYY\")\r\n : \"-\"}\r\n

    \r\n
    \r\n \r\n \r\n Valor de compra\r\n
    \r\n \r\n

    \r\n {`${fields.SettlementCurrency} `}\r\n \r\n

    \r\n
    \r\n \r\n \r\n \r\n Comisión corretaje\r\n \r\n \r\n {texts.tooltips.invest_commission}\r\n \r\n \r\n
    \r\n \r\n

    \r\n \r\n

    \r\n
    \r\n \r\n \r\n \r\n Cargos\r\n \r\n \r\n {texts.tooltips.invest_charges}\r\n \r\n \r\n
    \r\n \r\n

    \r\n \r\n

    \r\n
    \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n Cantidad:\r\n

    \r\n \r\n \r\n

    \r\n \r\n
    \r\n
    \r\n \r\n \r\n IVA:\r\n

    \r\n \r\n

    \r\n \r\n {texts.tooltips.invest_coupon_rate}\r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n Total a debitar:\r\n \r\n {loadingEarnings ? (\r\n \r\n ) : (\r\n

    \r\n {`${fields.SettlementCurrency} `}\r\n \r\n

    \r\n )}\r\n
    \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n Comprar\r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n\r\n {openConfirmationModal && (\r\n \r\n )}\r\n
    \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"quantityInput\":\"InvestModal_quantityInput_26LV8\",\"content\":\"InvestModal_content_3z3YS\",\"header\":\"InvestModal_header_1IY_O\",\"toggleIcon\":\"InvestModal_toggleIcon_3CK8n\",\"body\":\"InvestModal_body_JjEXp\",\"row\":\"InvestModal_row_jtsik\",\"col\":\"InvestModal_col_3xB7y\",\"toolTipContainer\":\"InvestModal_toolTipContainer_U6USB\",\"tooltipIcon\":\"InvestModal_tooltipIcon_1uv_w\",\"pencil\":\"InvestModal_pencil_1xU63\",\"grayContainer\":\"InvestModal_grayContainer_2CaAY\",\"title\":\"InvestModal_title_PSz2p\",\"accountContainer\":\"InvestModal_accountContainer_2n0Zl\",\"wrapper\":\"InvestModal_wrapper_-lLpY\",\"Logo\":\"InvestModal_Logo_1zXCf\",\"LogoDisabled\":\"InvestModal_LogoDisabled_CT3Ej\",\"footer\":\"InvestModal_footer_1XiLf\",\"bodyClassName\":\"InvestModal_bodyClassName_2pRrx\",\"toastClassName\":\"InvestModal_toastClassName_1_joE\",\"button\":\"InvestModal_button_2Hh-H\",\"disabled\":\"InvestModal_disabled_1fp0R\",\"colProduct\":\"InvestModal_colProduct_kWC_9\",\"rowProduct\":\"InvestModal_rowProduct_yKeig\",\"colQty\":\"InvestModal_colQty_13wlS\",\"rowQty\":\"InvestModal_rowQty_2TsvG\",\"fieldTitle\":\"InvestModal_fieldTitle_29uBy\",\"totalDebitar\":\"InvestModal_totalDebitar_p4u1T\",\"fixPosition\":\"InvestModal_fixPosition_1hOFk\",\"totalDebtQty\":\"InvestModal_totalDebtQty_2muzo\",\"rowContainer\":\"InvestModal_rowContainer_x8f6S\",\"colContainer\":\"InvestModal_colContainer_3BYle\",\"subRowContainer\":\"InvestModal_subRowContainer_3Vdoe\",\"tooltipIcon2\":\"InvestModal_tooltipIcon2_3ldnN\",\"valuesAlignment\":\"InvestModal_valuesAlignment_2vbvc\",\"qtyWrapper\":\"InvestModal_qtyWrapper_1nbFi\"};","import React from \"react\";\r\nimport { Modal, ModalBody, Row, Col, Button } from \"reactstrap\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { signOut } from \"../../actions/auth\";\r\nimport style from \"./NoAccountPupup.scss\";\r\nimport { getTexts } from \"../../reducers/selectors\";\r\n\r\nconst NoAccountsPopup = ({ isOpen }) => {\r\n\r\n const dispatch = useDispatch();\r\n const texts = useSelector(getTexts);\r\n\r\n const handleLogout = () => {\r\n sessionStorage.clear();\r\n dispatch(signOut());\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n

    {texts.notes.no_account_title}

    \r\n

    {texts.notes.no_account_subtitle}

    \r\n\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default NoAccountsPopup;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"content\":\"NoAccountPupup_content_2i2qW\",\"body\":\"NoAccountPupup_body_3qYsP\",\"container\":\"NoAccountPupup_container_l0NAm\",\"title\":\"NoAccountPupup_title_3Jx-d\",\"subtitle\":\"NoAccountPupup_subtitle_b5lZL\",\"subtitleNumber\":\"NoAccountPupup_subtitleNumber_2VUKV\",\"btn\":\"NoAccountPupup_btn_3H1NJ\"};","import React, { Fragment, useState } from \"react\";\r\nimport { Collapse, Row, Col, Input } from \"reactstrap\";\r\nimport { showToast } from \"../../../utils/helper\";\r\n\r\nimport { getMessageAttachment } from \"../../../services/api/internalMessages\";\r\nimport arrow from \"../../../../public/svg/keyboard_arrow_down-24px.svg\";\r\nimport cross from \"../../../../public/svg/x-symbol-svgrepo-com.svg\";\r\n\r\nimport style from \"./NotificationCollapse.scss\";\r\n\r\nexport const NotificationCollapse = ({ notification, handleNotificationRead }) => {\r\n const [collapseActive, setCollapseActive] = useState(false);\r\n\r\n const getFile = () => {\r\n getMessageAttachment({ InternalMessageId: notification.InternalMessageId })\r\n .then(({ response }) => {\r\n var a = document.createElement(\"A\");\r\n a.href = `data:application/octet-stream;base64,${response.blobfile}`;\r\n a.download = `${notification.InternalMessageAttachmentName}.${notification.InternalMessageAttachmentExtension}`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error downloading file\", true);\r\n });\r\n };\r\n\r\n if (!notification) return null;\r\n\r\n return (\r\n \r\n {\r\n setCollapseActive(!collapseActive);\r\n }}\r\n >\r\n {notification.InternalMessageTitle}\r\n \r\n \r\n \r\n

    \r\n

    {notification.InternalMessageText}

    \r\n {notification.InternalMessageAttachmentName && (\r\n \r\n )}\r\n

    \r\n handleNotificationRead(notification)}\r\n />\r\n
    \r\n
    \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"collapseRow\":\"NotificationCollapse_collapseRow_1QjkI\",\"arrow\":\"NotificationCollapse_arrow_2UM08\",\"arrowActive\":\"NotificationCollapse_arrowActive_3raWt\",\"active\":\"NotificationCollapse_active_3Qiso\",\"collapse\":\"NotificationCollapse_collapse_1V37X\",\"cross\":\"NotificationCollapse_cross_HWyFD\",\"buttonRow\":\"NotificationCollapse_buttonRow_10i6z\",\"button\":\"NotificationCollapse_button_1-V8a\",\"fileName\":\"NotificationCollapse_fileName_18gDE\",\"collapseHeader\":\"NotificationCollapse_collapseHeader_1i5yI\",\"collapseHeaderActive\":\"NotificationCollapse_collapseHeaderActive_1fa5q\",\"messageBox\":\"NotificationCollapse_messageBox_m_96i\",\"attachment\":\"NotificationCollapse_attachment_2L_5K\"};","import React, { Fragment, useEffect } from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport MediaQuery from \"react-responsive\";\r\nimport { CircularProgress } from \"bx-react-ui\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { useLocation } from \"react-router-dom\";\r\n\r\nimport { NotificationCollapse } from \"../NotificationsCard/NotificationCollapse/NotificationCollapse\";\r\nimport { getNotifications, getNotificationsLoading } from \"../../reducers/selectors\";\r\nimport { updateMessage, getMessageAttachment } from \"../../services/api/internalMessages\";\r\nimport { notificationsReload } from \"../../actions/entities\";\r\nimport { getTransactionalPinURL } from \"../../services/api/authorizations\";\r\nimport { setRedirectionData } from \"../../utils/handleRedirectionData\";\r\nimport { showToast } from \"../../utils/helper\";\r\n\r\nimport style from \"./NotificationsCard.scss\";\r\n\r\nexport const NotificationsCard = () => {\r\n const notificationsLoading = useSelector(getNotificationsLoading);\r\n const notifications = useSelector(getNotifications);\r\n const dispatch = useDispatch();\r\n\r\n let { state } = useLocation();\r\n\r\n useEffect(() => {\r\n if (state) {\r\n handleNotificationRead(state.redirectionData);\r\n }\r\n }, [state]);\r\n\r\n const handlePreNotificationRead = (notification) => {\r\n getTransactionalPinURL()\r\n .then(({ response }) => {\r\n const pre_pin_validation_token = response.pre_pin_validation_token;\r\n const redirect_url = response.redirect_url;\r\n\r\n const newRedirectData = {\r\n id: pre_pin_validation_token,\r\n data: {\r\n type: \"InternalMessage\",\r\n payload: notification,\r\n },\r\n };\r\n setRedirectionData(newRedirectData);\r\n\r\n window.location.href = redirect_url;\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error marcando notificación marcando como leída\", true);\r\n })\r\n .finally(() => {\r\n dispatch(notificationsReload());\r\n });\r\n };\r\n\r\n const handleNotificationRead = (notification) => {\r\n updateMessage({ read: true, approved: false, InternalMessageId: notification.InternalMessageId })\r\n .then(({ response }) => {\r\n if (response.result.Code === 200) {\r\n showToast(\"Notificación marcada como leída correctamente\");\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error marcando notificación marcando como leída\", true);\r\n })\r\n .finally(() => {\r\n dispatch(notificationsReload());\r\n });\r\n };\r\n\r\n return (\r\n \r\n {notificationsLoading ? (\r\n \r\n ) : (\r\n \r\n {notifications.map((notification, index) => {\r\n return (\r\n \r\n );\r\n })}\r\n {!notifications.length && }\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nconst EmptyNotifications = ({table=false}) => (\r\n
    \r\n

    No hay notificaciones

    \r\n
    \r\n);\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"row\":\"NotificationsCard_row_3bxUI\",\"emptyWrapper\":\"NotificationsCard_emptyWrapper_1id1U\",\"emptyMessage\":\"NotificationsCard_emptyMessage_2vw7q\",\"wrapperCol\":\"NotificationsCard_wrapperCol_12a5v\",\"title\":\"NotificationsCard_title_3WDMs\"};","import React, { Fragment, useState } from \"react\";\r\nimport { Collapse, Row, Col } from \"reactstrap\";\r\n\r\nimport style from \"./PageWrapper.scss\";\r\n\r\nexport const PageWrapper = ({ title, children }) => (\r\n \r\n \r\n {/* \r\n \r\n {title}\r\n \r\n */}\r\n \r\n {children}\r\n \r\n \r\n \r\n);\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"titleWrapper\":\"PageWrapper_titleWrapper_iez55\",\"title\":\"PageWrapper_title_1vy2n\"};","import React, { useState, useEffect } from \"react\";\r\nimport ReactEcharts from \"echarts-for-react\";\r\nimport { formattedNumber } from \"bx-react-ui/src/components/FormattedNumber/FormattedNumber\";\r\n\r\nimport style from \"./Chart.scss\";\r\n\r\nexport const AssetClassDoghnut = ({ position, onSelectItem }) => {\r\n const [chartOptions, setChartOptions] = useState({});\r\n\r\n useEffect(() => {\r\n if (position.assetClass.length) {\r\n const optionData = position.assetClass.map((assetClassItem) => ({\r\n name: assetClassItem.name,\r\n value: +assetClassItem.total,\r\n items: assetClassItem.subAssetClass,\r\n }));\r\n\r\n let option = {\r\n legend: {\r\n orient: \"vertical\",\r\n left: \"left\",\r\n data: optionData\r\n },\r\n title: {\r\n text: \"Composición por tipo de instrumento.\",\r\n left: \"center\",\r\n top: 0,\r\n textStyle: {\r\n fontFamily: \"Arial\",\r\n overflow: \"break\",\r\n width: screen.width < 400 ? screen.width - 100 : 300,\r\n },\r\n },\r\n legend: {\r\n orient: \"vertical\",\r\n left: 0,\r\n top: 60,\r\n show: true,\r\n textStyle: {\r\n fontFamily: \"Arial\",\r\n fontSize: 14,\r\n overflow: \"break\",\r\n },\r\n },\r\n tooltip: {\r\n trigger: \"item\",\r\n formatter: function (params) {\r\n return formattedNumber(params.value, \"currency\");\r\n },\r\n },\r\n series: [\r\n {\r\n type: \"pie\",\r\n data: optionData,\r\n left: screen.width < 1200 ? 0 : 50,\r\n top: 50,\r\n label: {\r\n show: false,\r\n },\r\n color: [\"#ed3639\", \"#fcbd40\"],\r\n },\r\n ],\r\n renderer: \"svg\",\r\n };\r\n\r\n setChartOptions(option);\r\n }\r\n }, [position]);\r\n\r\n const onEvents = {\r\n click: onSelectItem,\r\n };\r\n\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport const SubAssetClassDoghnut = ({ assetClass }) => {\r\n const [chartOptions, setChartOptions] = useState({});\r\n\r\n useEffect(() => {\r\n if (assetClass.items.length) {\r\n const optionData = assetClass.items.map((assetClassItem) => ({\r\n name: assetClassItem.name,\r\n value: +assetClassItem.total,\r\n }));\r\n\r\n let option = {\r\n legend: {\r\n orient: \"vertical\",\r\n left: \"left\",\r\n data: optionData\r\n },\r\n title: {\r\n text: \"Composición por especie.\",\r\n left: \"center\",\r\n top: 0,\r\n textStyle: {\r\n fontFamily: \"Arial\",\r\n overflow: \"break\",\r\n width: screen.width < 400 ? screen.width - 100 : 300,\r\n },\r\n },\r\n legend: {\r\n // orient: \"vertical\",\r\n // right: 0,\r\n // top: 40,\r\n // show: true,\r\n // align: \"left\",\r\n // textStyle: {\r\n // fontFamily: \"Arial\",\r\n \r\n orient: \"vertical\",\r\n left: 0,\r\n top: 60,\r\n show: true,\r\n textStyle: {\r\n fontFamily: \"Arial\",\r\n fontSize: 14,\r\n overflow: \"break\",\r\n },\r\n },\r\n tooltip: {\r\n trigger: \"item\",\r\n formatter: function (params) {\r\n return formattedNumber(params.value, \"currency\");\r\n },\r\n },\r\n series: [\r\n {\r\n type: \"pie\",\r\n data: optionData,\r\n left: screen.width < 1200 ? 0 : 50,\r\n top: 50,\r\n label: {\r\n show: false,\r\n },\r\n color: [\"#ed3639\", \"#fcbd40\"],\r\n },\r\n ],\r\n renderer: \"svg\",\r\n };\r\n\r\n setChartOptions(option);\r\n }\r\n }, [assetClass]);\r\n\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport const PortfolioDoghnut = ({ portfolio, fx }) => {\r\n const [chartOptions, setChartOptions] = useState({});\r\n const totalPortfolioUSD = (parseInt(portfolio.position.cashTotal) + parseInt(portfolio.position.portfolioTotal))\r\n const totalPYG = (parseInt(portfolio.positionPYG.cashTotal) + parseInt(portfolio.positionPYG.portfolioTotal)) / fx\r\n const portfolioTotalUSD = parseInt(totalPortfolioUSD) + parseInt(totalPYG)\r\n\r\n const tooltipFormatter = (param) => {\r\n return `Portafolio
    ${\r\n param.data.name\r\n }: ${formattedNumber(param.data.valueOriginal, \"currency\")}`;\r\n };\r\n\r\n useEffect(() => {\r\n if (portfolio) {\r\n const optionData = [];\r\n optionData.push({\r\n name: \"Total USD\",\r\n value: totalPortfolioUSD,\r\n valueOriginal: portfolioTotalUSD,\r\n });\r\n optionData.push({\r\n name: \"Total Gs\",\r\n value: totalPYG,\r\n valueOriginal: parseInt(portfolio.positionPYG.cashTotal) + parseInt(portfolio.positionPYG.portfolioTotal),\r\n });\r\n\r\n let option = {\r\n legend: {\r\n orient: \"vertical\",\r\n bottom: \"bottom\",\r\n data: optionData\r\n },\r\n title: {\r\n text: \"Total portafolio\",\r\n left: \"center\",\r\n top: 0,\r\n textStyle: {\r\n fontFamily: \"Arial\",\r\n },\r\n },\r\n tooltip: {\r\n trigger: \"item\",\r\n formatter: tooltipFormatter,\r\n },\r\n series: [\r\n {\r\n type: \"pie\",\r\n data: optionData,\r\n top: 30,\r\n label: {\r\n show: false,\r\n },\r\n color: [\"#ed3639\", \"#fcbd40\"],\r\n },\r\n ],\r\n renderer: \"svg\",\r\n };\r\n\r\n setChartOptions(option);\r\n }\r\n }, [portfolio]);\r\n\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"doghnutWrapper\":\"Chart_doghnutWrapper_f3G-y\",\"portfolioDoghnutWrapper\":\"Chart_portfolioDoghnutWrapper_3OA_j\"};","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { CircularProgress } from \"bx-react-ui\";\r\nimport { FormattedNumber } from \"bx-react-ui/src/components/FormattedNumber/FormattedNumber\";\r\n\r\nimport { getCurrentAccount } from \"../../reducers/selectors\";\r\nimport { fetchGetPortfolio, getClientPositionDigital } from \"../../services/api/accounts\";\r\nimport { PortfolioTable } from \"./PortfolioTable/PortfolioTable\";\r\nimport { PortfolioDownload } from \"./PortfolioDownload/PortfolioDownload\";\r\nimport { PortfolioDoghnut } from \"./Charts/Chart\";\r\nimport { PortfolioHeader } from \"./PortfolioHeader/PortfolioHeader\";\r\n\r\nimport style from \"./Portfolio.scss\";\r\nimport { Tooltip } from \"../Tooltip/Tooltip\";\r\nimport EmptyValues from \"../EmptyValues/EmptyValues\";\r\n\r\nexport const Portfolio = () => {\r\n const [loadingPosition, setLoadingPosition] = useState(true);\r\n const [portfolio, setPortfolio] = useState(null);\r\n const [portfolioTotal, setPortfolioTotal] = useState(0);\r\n const [fx, setFx] = useState(1);\r\n const [portfolioDate, setPortfolioDate] = useState(new Date().toISOString().slice(0, 10));\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const [usdModal, setUsdModal] = useState(false);\r\n const [gsModal, setGsdModal] = useState(false);\r\n\r\n const text =\r\n \"posición total en dólares, es la suma del portafolio en dólares más el portafolio en guaraníes, según el cambio del día\";\r\n\r\n useEffect(() => {\r\n if (!loadingPosition) setLoadingPosition(() => true);\r\n if (currentAccount.AccountNumber) {\r\n fetchGetPortfolio(currentAccount.AccountNumber, portfolioDate)\r\n .then(({ response }) => {\r\n setPortfolio(response);\r\n setPortfolioTotal(+response.position.valueTotalUSD + +response.positionPYG.valueTotalUSD);\r\n setFx(response.currencypairprice.rawprice);\r\n })\r\n .catch((err) => console.error(err))\r\n .finally(() => setLoadingPosition(false));\r\n }\r\n if (currentAccount.noAccounts) {\r\n setLoadingPosition(false);\r\n }\r\n }, [currentAccount, portfolioDate]);\r\n\r\n const handleChangeDate = (date) => {\r\n setPortfolioDate(() => date);\r\n };\r\n\r\n if (loadingPosition) return ;\r\n\r\n if (currentAccount.noAccounts)\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n const toggleUsdModal = () => {\r\n setGsdModal(false);\r\n setUsdModal(!usdModal);\r\n };\r\n const toggleGsModal = () => {\r\n setUsdModal(false);\r\n setGsdModal(!gsModal);\r\n };\r\n\r\n return (\r\n \r\n \r\n {loadingPosition ? (\r\n \r\n ) : (\r\n \r\n \r\n {portfolio && (\r\n \r\n {usdModal || gsModal ? null : (\r\n \r\n )}\r\n \r\n )}\r\n\r\n {usdModal ? (\r\n \r\n ) : null}\r\n {gsModal ? (\r\n \r\n ) : null}\r\n
    \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"portolioRow\":\"Portfolio_portolioRow_21lvr\",\"secondRow\":\"Portfolio_secondRow_3C88_\",\"collapseRow\":\"Portfolio_collapseRow_2l9ZX\",\"globalPosition\":\"Portfolio_globalPosition_Tl5zA\",\"globalPositionTitle\":\"Portfolio_globalPositionTitle_1diHm\",\"container\":\"Portfolio_container_1OLed\",\"collapseTitle\":\"Portfolio_collapseTitle_F2fXa\",\"collapseTitleText\":\"Portfolio_collapseTitleText_2L14U\",\"arrowFiller\":\"Portfolio_arrowFiller_2BQbF\",\"toolTip\":\"Portfolio_toolTip_3HdUB\",\"colTotal\":\"Portfolio_colTotal_3PlfT\",\"chartsRow\":\"Portfolio_chartsRow_2KZ7i\",\"screenBreakForCharts\":\"Portfolio_screenBreakForCharts_woi0x\",\"headerRow\":\"Portfolio_headerRow_cY6KQ\",\"spacedDiv\":\"Portfolio_spacedDiv_1eryn\"};","import React, { Fragment, useState } from \"react\";\r\nimport { Input } from \"reactstrap\";\r\nimport { showToast } from \"../../../utils/helper\";\r\n\r\nimport { getPortfolioXLS, getPortfolioCSV } from \"../../../services/api/accounts\";\r\nimport pdf from \"../../../style/assets/svg/pdf.svg\";\r\nimport excel from \"../../../style/assets/svg/xlsx.svg\";\r\nimport csv from \"../../../style/assets/svg/csv.svg\";\r\n\r\nimport style from \"./PortfolioDownload.scss\";\r\n\r\nexport const PortfolioDownload = ({ portfolio, onChangeDate, date }) => {\r\n const handleChangeDate = (event) => {\r\n onChangeDate(event.target.value);\r\n };\r\n\r\n const handleXLS = () => {\r\n getPortfolioXLS(portfolio).then((r) => {\r\n try {\r\n const blob = new Blob([new Uint8Array(r.response.buffer.data)], {\r\n type: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;\",\r\n });\r\n const link = document.createElement(\"a\");\r\n link.href = window.URL.createObjectURL(blob);\r\n link.download = \"Portfolio.xlsx\";\r\n link.click();\r\n } catch (ex) {\r\n console.error(ex);\r\n showToast(\"Error obteniendo archivo\", true);\r\n }\r\n });\r\n };\r\n\r\n const handleCSV = () => {\r\n getPortfolioCSV(portfolio.position).then((r) => {\r\n try {\r\n const blob = new Blob([new Uint8Array(r.response.buffer.data)], {\r\n type: \"application/csv;\",\r\n });\r\n const link = document.createElement(\"a\");\r\n link.href = window.URL.createObjectURL(blob);\r\n link.download = \"Portfolio_USD.csv\";\r\n link.click();\r\n } catch (ex) {\r\n console.error(ex);\r\n showToast(\"Error obteniendo archivo\", true);\r\n }\r\n });\r\n getPortfolioCSV(portfolio.positionPYG).then((r) => {\r\n try {\r\n const blob = new Blob([new Uint8Array(r.response.buffer.data)], {\r\n type: \"application/csv;\",\r\n });\r\n const link = document.createElement(\"a\");\r\n link.href = window.URL.createObjectURL(blob);\r\n link.download = \"Portfolio_PYG.csv\";\r\n link.click();\r\n } catch (ex) {\r\n console.error(ex);\r\n showToast(\"There was an error downloading authorizations\", true);\r\n }\r\n });\r\n };\r\n\r\n return (\r\n \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n

    Descarga el cierre del mes:

    \r\n \"PDF\"\r\n \"XLSX\"\r\n \"CSV\"\r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"secondRow\":\"PortfolioDownload_secondRow_2c6Q5\",\"icon\":\"PortfolioDownload_icon_1Uio_\",\"date\":\"PortfolioDownload_date_1q_X0\",\"titleAndInput\":\"PortfolioDownload_titleAndInput_1DRwJ\",\"input\":\"PortfolioDownload_input_2p3aM\",\"download\":\"PortfolioDownload_download_3IUrC\",\"title\":\"PortfolioDownload_title_22flc\"};","import React, { Fragment } from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { FormattedNumber } from \"bx-react-ui/src/components/FormattedNumber/FormattedNumber\";\r\nimport portfolioIcon from \"../../../../public/svg/portafolio.svg\";\r\nimport arrow from \"../../../../public/svg/keyboard_arrow_down-24px.svg\";\r\nimport { getCurrentAccount } from \"../../../reducers/selectors\";\r\n\r\nimport style from \"./PortfolioHeader.scss\";\r\n\r\nexport const PortfolioHeader = ({ portfolio, fx, toggleUsdModal, toggleGsModal }) => {\r\n\r\n const totalPortfolioUSD = (parseInt(portfolio.position.cashTotal) + parseInt(portfolio.position.portfolioTotal))\r\n const totalPYDfx = (parseInt(portfolio.positionPYG.cashTotal) + parseInt(portfolio.positionPYG.portfolioTotal)) / fx\r\n const portfolioTotalUSD = parseInt(totalPortfolioUSD) + parseInt(totalPYDfx)\r\n\r\n return (\r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n \"portfolio\r\n
    \r\n
    \r\n

    Total

    \r\n

    \r\n USD\r\n \r\n \r\n \r\n

    \r\n

    Posición global portafolio

    \r\n
    \r\n
    \r\n
    \r\n

    Tipo de cambio

    \r\n

    \r\n Gs\r\n \r\n \r\n \r\n

    \r\n
    \r\n
    \r\n \r\n \r\n
    Portafolio
    \r\n {\r\n toggleUsdModal();\r\n }}\r\n >\r\n
    USD
    \r\n
    \r\n \r\n
    \r\n \"arrow\"\r\n \r\n {\r\n toggleGsModal();\r\n }}\r\n >\r\n
    Gs
    \r\n
    \r\n \r\n
    \r\n \"arrow\"\r\n \r\n \r\n \r\n
    Efectivo
    \r\n \r\n
    USD
    \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    Gs
    \r\n
    \r\n \r\n
    \r\n \r\n \r\n \r\n
    Valores
    \r\n \r\n
    USD
    \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    Gs
    \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"mainRow\":\"PortfolioHeader_mainRow_2fjix\",\"title\":\"PortfolioHeader_title_1Maze\",\"firstColumn\":\"PortfolioHeader_firstColumn_3Wb-Q\",\"background\":\"PortfolioHeader_background_1zE1S\",\"iconContainer\":\"PortfolioHeader_iconContainer_2h3lN\",\"portfolioIcon\":\"PortfolioHeader_portfolioIcon_1aeVR\",\"totalContainer\":\"PortfolioHeader_totalContainer_LAGJ0\",\"total\":\"PortfolioHeader_total_r-wB4\",\"usdP\":\"PortfolioHeader_usdP_6W0rx\",\"usdNumber\":\"PortfolioHeader_usdNumber_28CRT\",\"globalPosition\":\"PortfolioHeader_globalPosition_2r9XJ\",\"changeTypeContaier\":\"PortfolioHeader_changeTypeContaier_3cLTK\",\"guaraniNumber\":\"PortfolioHeader_guaraniNumber_Vq32Q\",\"asesor\":\"PortfolioHeader_asesor_3BAvf\",\"portfolioColumn\":\"PortfolioHeader_portfolioColumn_2Pyau\",\"normalColumn\":\"PortfolioHeader_normalColumn_1o_iG\",\"collapseTitle\":\"PortfolioHeader_collapseTitle_1SH0v\",\"number\":\"PortfolioHeader_number_e4bVx\",\"arrow\":\"PortfolioHeader_arrow_1OJGA\"};","import React, { Fragment, useState } from \"react\";\r\nimport { Collapse } from \"reactstrap\";\r\n\r\nimport { SubAssetClassTable } from \"../SubAssetClassTable/SubAssetClassTable\";\r\nimport { toPascalCase } from \"../../../../utils/helper\";\r\n\r\nimport arrow from \"../../../../../public/svg/keyboard_arrow_down-24px.svg\";\r\n\r\nimport style from \"./AssetClassTable.scss\";\r\n\r\nexport const AssetClassTable = ({ itemCuentas, toggle, position, currency, portfolioTotal }) => {\r\n const [orangeRowCollapse, setOrangeRowCollapse] = useState(true);\r\n\r\n const collapseOrangedata =\r\n itemCuentas === undefined\r\n ? null\r\n : itemCuentas.subAssetClass.map((subAssetClass, indexCuentas) => {\r\n return (\r\n \r\n );\r\n });\r\n\r\n return (\r\n \r\n {\r\n setOrangeRowCollapse(!orangeRowCollapse);\r\n }}\r\n >\r\n \r\n {toPascalCase(itemCuentas.name)}\r\n \r\n \r\n \r\n\r\n \r\n {collapseOrangedata}\r\n \r\n \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"collapseRow\":\"AssetClassTable_collapseRow_17hge\",\"orangeRow\":\"AssetClassTable_orangeRow_2_xG-\",\"orangeRowText\":\"AssetClassTable_orangeRowText_1K5fE\",\"arrow\":\"AssetClassTable_arrow_2hgn-\",\"arrowActivated\":\"AssetClassTable_arrowActivated_H-Mht\",\"collapseActive\":\"AssetClassTable_collapseActive_2UliE\"};","import React, { Fragment, useEffect, useState } from \"react\";\r\nimport { Table, UncontrolledTooltip } from \"reactstrap\";\r\nimport style from \"./AssetTable.scss\";\r\n\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\n//import { FormattedNumber } from \"bx-react-ui/src/components/FormattedNumber/FormattedNumber\";\r\nimport moment from \"moment\";\r\n\r\nexport const AssetTable = ({ subAssetClass, toggle, position, currency, portfolioTotal }) => {\r\n const [totalMarketValue, setTotalMarketValue] = useState(0);\r\n const [totalInvestmentCost, setTotalInvestmentCost] = useState(0);\r\n const [totalAbsoluteReturn, setTotalAbsoluteReturn] = useState(0);\r\n const [totalYTM, setTotalYTM] = useState(0);\r\n const [totalPortfolio, setTotalPortfolio] = useState(0);\r\n const tooltTipStyles = {\r\n color: \"white\",\r\n backgroundColor: \"#285DB8\",\r\n };\r\n\r\n useEffect(() => {\r\n let totalMarketValue = 0;\r\n let totalInvestmentCost = 0;\r\n let totalAbsoluteReturn = 0;\r\n let totalYTM = 0;\r\n let totalPortfolio = 0;\r\n\r\n subAssetClass.asset.forEach((asset) => {\r\n //let investCost = (+asset.NetReturn - (+asset.valuetotal + +asset.realizePL)) * -1;\r\n let investCost = +asset.invested;\r\n totalMarketValue += parseFloat(asset.totalOriginCurrencyWithCoupon);\r\n totalInvestmentCost += parseFloat(investCost);\r\n totalAbsoluteReturn += parseFloat(asset.TRT);\r\n totalYTM += parseFloat(asset.YTM);\r\n totalPortfolio += (+asset.totalUSDWithCoupon * 100) / +portfolioTotal;\r\n });\r\n \r\n setTotalMarketValue(totalMarketValue);\r\n setTotalInvestmentCost(totalInvestmentCost);\r\n setTotalAbsoluteReturn(totalAbsoluteReturn);\r\n setTotalYTM(subAssetClass.asset.length !== 0 ? totalYTM/subAssetClass.asset.length : null);\r\n setTotalPortfolio(totalPortfolio);\r\n }, []);\r\n\r\n return (\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n el % de la inversión del instrumento sobre el monto total del portafolio\r\n {\" \"}\r\n Portafolio\r\n \r\n \r\n \r\n \r\n {subAssetClass.asset.map((asset, itemIndex) => (\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n %\r\n \r\n \r\n \r\n
    \r\n \r\n último precio negociado y registrado del instrumento en el mercado\r\n \r\n Último precio de mercado\r\n Cantidad\r\n \r\n último precio negociado por cantidad (pxq). refleja el valor más próximo al valor actual de tu\r\n inversión\r\n \r\n Valor de mercado\r\n \r\n \r\n es el monto de la inversión al momento de la compra\r\n \r\n Costo de inversión\r\n \r\n \r\n la suma de los intereses generados por la inversión que aún no han sido pagados\r\n \r\n Interés/ dividendo acumulado\r\n \r\n\r\n \r\n \r\n medición de la rentabilidad de un instrumento RA = valor de mercado de inversión - monto\r\n invertido\r\n \r\n Retorno absoluto\r\n \r\n \r\n tasa interna de retorno estimativa en base al precio promedio referencial de mercado\r\n \r\n YTM\r\n
    subTotal\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n %\r\n
    \r\n \r\n );\r\n};\r\n\r\nconst getName = (name) => {\r\n let res = name.split(\" \");\r\n res = res[0] + \" \" + res[3];\r\n return res;\r\n};\r\n\r\nconst AssetRow = ({ position, asset, toggle, currency, portfolioTotal }) => {\r\n //const investCost = (+asset.NetReturn - (+asset.valuetotal + +asset.realizePL)) * -1;\r\n const investCost = +asset.invested;\r\n\r\n return (\r\n \r\n \r\n {asset.name}\r\n \r\n \r\n ISIN {asset.isin}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n %\r\n \r\n \r\n \r\n %\r\n \r\n \r\n \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"assetName\":\"AssetTable_assetName_VO1UK\",\"assetIsin\":\"AssetTable_assetIsin_ZA2Ui\",\"table\":\"AssetTable_table_19oMS\",\"tableRow\":\"AssetTable_tableRow_1rwxZ\",\"grayTableH\":\"AssetTable_grayTableH_bUjYN\",\"td\":\"AssetTable_td_Bpo-w\",\"footer\":\"AssetTable_footer_24RK9\",\"xl\":\"AssetTable_xl_393Ca\",\"lg\":\"AssetTable_lg_2PamO\",\"md\":\"AssetTable_md_1tN2Y\",\"sm\":\"AssetTable_sm_13NWz\",\"xs\":\"AssetTable_xs_33JHj\",\"notShowColumn\":\"AssetTable_notShowColumn_3ue1z\"};","import React, { Fragment, useEffect, useState } from \"react\";\r\nimport { Row, Table, Collapse, Col, Button } from \"reactstrap\";\r\nimport { FormattedNumber } from \"bx-react-ui/src/components/FormattedNumber/FormattedNumber\";\r\nimport { AssetClassTable } from \"./AssetClassTable/AssetClassTable\";\r\nimport arrow from \"../../../../public/svg/keyboard_arrow_down-24px.svg\";\r\nimport { AssetClassDoghnut, SubAssetClassDoghnut } from \"../Charts/Chart\";\r\n\r\nimport style from \"./PortfolioTable.scss\";\r\n\r\nexport const PortfolioTable = ({ currency, position, portfolioTotal, modalState, toggleModal }) => {\r\n const [isFirstCollapseOpen, setFirstCollapse] = useState(false);\r\n const [selectedAsset, setSelectedAsset] = useState(undefined);\r\n const [assetQuantity, setAssetQuantity] = useState(undefined);\r\n const [assetClass, setAssetClass] = useState(\r\n position.assetClass === undefined || position.assetClass.length === 0\r\n ? null\r\n : {\r\n name: position.assetClass[0].name,\r\n items: position.assetClass[0].subAssetClass,\r\n }\r\n );\r\n const [modal, setModal] = useState(false);\r\n\r\n const toggle = (asset, quantity) => {\r\n setSelectedAsset(asset);\r\n setAssetQuantity(quantity);\r\n setModal(!modal);\r\n };\r\n\r\n const handleToggle = () => {\r\n toggleModal();\r\n };\r\n\r\n const handleSelectAssetClass = ({ data }) => {\r\n setAssetClass(data);\r\n };\r\n\r\n const EmptyPortfolio = ({ currency }) => {\r\n return (\r\n
    \r\n

    \r\n No hay datos disponibles para la cuenta en {currency === \"USD\" ? \"dólares.\" : \"guaraníes.\"}\r\n

    \r\n \r\n
    \r\n );\r\n };\r\n\r\n return (\r\n \r\n {position.assetClass.length === 0 ? (\r\n \r\n ) : (\r\n \r\n
    \r\n \r\n
    \r\n \r\n {modalState ? null : (\r\n \r\n \r\n Portafolio\r\n \r\n \r\n Efectivo\r\n \r\n \r\n Valores\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n {currency}\r\n \r\n \r\n \r\n {currency}\r\n \r\n \r\n \r\n {currency}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {position.assetClass.map((itemCuentas, indexCuentas) => {\r\n return (\r\n \r\n );\r\n })}\r\n
    \r\n \r\n {assetClass && }\r\n
    \r\n
    \r\n \r\n
    \r\n {selectedAsset != undefined ? (\r\n \r\n ) : null}\r\n
    \r\n )}\r\n
    \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"collapseRow\":\"PortfolioTable_collapseRow_20G7v\",\"emptyWrapper\":\"PortfolioTable_emptyWrapper_10XgO\",\"emptyMessage\":\"PortfolioTable_emptyMessage_SXOBJ\",\"buttonBlue\":\"PortfolioTable_buttonBlue_1BhKf\",\"collapseTable\":\"PortfolioTable_collapseTable_3K3x5\",\"titleRow\":\"PortfolioTable_titleRow_3tUjN\",\"title\":\"PortfolioTable_title_2S51A\",\"tableHead\":\"PortfolioTable_tableHead_a6U97\",\"collapseTitle\":\"PortfolioTable_collapseTitle_1eEk7\",\"collapseTextNumber\":\"PortfolioTable_collapseTextNumber_1_8M0\",\"collapseTitleText\":\"PortfolioTable_collapseTitleText_2W-Ko\",\"tableRow\":\"PortfolioTable_tableRow_29kgt\",\"tableHeadActivated\":\"PortfolioTable_tableHeadActivated_1ctu5\",\"arrow\":\"PortfolioTable_arrow_1egSe\",\"arrowActivated\":\"PortfolioTable_arrowActivated_3DrE5\",\"collapse\":\"PortfolioTable_collapse_3jyVj\",\"orangeRowText\":\"PortfolioTable_orangeRowText_2pYiK\",\"collapseActive\":\"PortfolioTable_collapseActive_2EDm4\",\"chartsRow\":\"PortfolioTable_chartsRow_2KMnL\",\"toolTip\":\"PortfolioTable_toolTip_3GnXq\",\"arrowFiller\":\"PortfolioTable_arrowFiller_3KjRG\",\"blueButtonDiv\":\"PortfolioTable_blueButtonDiv_2ePqj\"};","import React, { Fragment, useState } from \"react\";\r\nimport { Collapse } from \"reactstrap\";\r\n\r\nimport { AssetTable } from \"../AssetTable/AssetTable\";\r\nimport arrow from \"../../../../../public/svg/keyboard_arrow_down-24px.svg\";\r\nimport { toPascalCase } from \"../../../../utils/helper\";\r\n\r\nimport style from \"./SubAssetClassTable.scss\";\r\n\r\nexport const SubAssetClassTable = ({ subAssetClass, toggle, position, currency, portfolioTotal }) => {\r\n const [isCollapseBlueOpen, setIsCollapseBlueOpen] = useState(true);\r\n\r\n return (\r\n \r\n {\r\n setIsCollapseBlueOpen(!isCollapseBlueOpen);\r\n }}\r\n >\r\n \r\n {toPascalCase(subAssetClass.name)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"collapseRow\":\"SubAssetClassTable_collapseRow_1NWFa\",\"orangeRow\":\"SubAssetClassTable_orangeRow_uSokN\",\"orangeRowText\":\"SubAssetClassTable_orangeRowText_2OkLY\",\"arrow\":\"SubAssetClassTable_arrow_Jpl4B\",\"arrowActivated\":\"SubAssetClassTable_arrowActivated_3-d1e\",\"blueRow\":\"SubAssetClassTable_blueRow_1mk92\"};","import React, {Fragment} from \"react\";\r\nimport {UncontrolledTooltip} from \"reactstrap\";\r\n\r\nimport tooltip from \"../../../public/svg/i.svg\";\r\n\r\nexport const Tooltip = ({ text, height, width, right=null, top=null, backgroundColor=null, borderRadius=null }) => {\r\n \r\n const tooltTipStyles = {\r\n color: \"white\",\r\n backgroundColor: \"#285DB8\",\r\n fontFamily: \"Arial\"\r\n };\r\n\r\n const containerStyles = {\r\n height: height,\r\n position: \"absolute\",\r\n left: screen.width < 1170 ? '2px':right,\r\n top: top,\r\n backgroundColor: backgroundColor,\r\n fontFamily: \"Arial\",\r\n borderRadius: borderRadius\r\n };\r\n\r\n return (\r\n
    \r\n \r\n {text}\r\n \r\n \"tooltip\"\r\n
    \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Button, Label } from \"reactstrap\";\r\nimport styles from \"./Button.scss\";\r\nimport { CircularProgress } from \"../CircularProgress/CircularProgress\";\r\n\r\nconst GenericButton = ({\r\n label,\r\n handleClick,\r\n icon,\r\n marginRightIcon,\r\n iconSvg,\r\n rounded,\r\n primary,\r\n secondary,\r\n pl0,\r\n backgroundColor,\r\n marginLeft,\r\n textColor,\r\n grayDark,\r\n border,\r\n fontWeight,\r\n lineHeight,\r\n padding,\r\n position,\r\n bottom,\r\n width,\r\n right,\r\n style,\r\n className,\r\n labelStyle,\r\n loading,\r\n disabled,\r\n}) => {\r\n return (\r\n \r\n \r\n {icon && }\r\n {iconSvg &&\r\n iconSvg.map((icon, index) => {\r\n return (\r\n \r\n );\r\n })}\r\n \r\n {loading && }\r\n \r\n
    \r\n );\r\n};\r\nexport default GenericButton;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"btnGeneric\":\"Button_btnGeneric_23IDr\",\"reverse\":\"Button_reverse_37OQO\",\"roundedMd\":\"Button_roundedMd_qZfMj\",\"pl0\":\"Button_pl0_23ihG\",\"pNormal\":\"Button_pNormal_7PMW-\",\"roundedXs\":\"Button_roundedXs_37Rl6\",\"grayDark\":\"Button_grayDark_1v2sV\",\"labelCounterBox\":\"Button_labelCounterBox_11Gmb\",\"divCounterBox\":\"Button_divCounterBox_1w9ad\",\"numberCounterBox\":\"Button_numberCounterBox_2kPlA\",\"labelNumber\":\"Button_labelNumber_cX53C\",\"activeButton\":\"Button_activeButton_ck3kd\",\"normal\":\"Button_normal_vY7OD\"};","import React from \"react\";\r\nimport style from \"./CircularProgress.scss\";\r\n\r\nexport const CircularProgress = ({ sm = false }) => (\r\n
    \r\n);\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"loader\":\"CircularProgress_loader_3v4jg\",\"l13\":\"CircularProgress_l13_1rukB\",\"sm\":\"CircularProgress_sm_3mXGf\"};","import React from \"react\";\r\nimport classNames from \"classnames\";\r\n\r\nimport style from \"./Container.scss\";\r\n\r\nexport const Container = ({ children, ...props }) => {\r\n const { className, ...otherProps } = props;\r\n const newClassName = classNames(className, style.container);\r\n\r\n return (\r\n
    \r\n
    \r\n {children}\r\n
    \r\n
    \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"containerWrapper\":\"Container_containerWrapper_327aE\",\"container\":\"Container_container_2gryl\"};","import React from \"react\";\r\nimport { getCurrentAccount } from \"../../../reducers/selectors\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { formatName } from \"../../../utils/helper\";\r\n\r\nimport style from \"./AdviserInfo.module.scss\";\r\n\r\nconst AdviserInfo = () => {\r\n const currentAccount = useSelector(getCurrentAccount);\r\n return (\r\n
    \r\n
    \r\n

    Asesor:

    {`${formatName(currentAccount.advisorName)} ${formatName(currentAccount.advisorFirstLastName)}`} {!currentAccount.advisorName && !currentAccount.advisorFirstLastName ? \"-\" : null}

    \r\n
    \r\n
    \r\n

    Teléfono:

    \r\n

    {currentAccount.advisorPhone ? `${currentAccount.advisorPhone}` : \"-\"}

    \r\n
    \r\n
    \r\n

    Correo:

    \r\n

    {currentAccount.advisorEmail ? `${currentAccount.advisorEmail} ` : \"-\"}

    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default AdviserInfo;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"AdviserInfo-module_container_3KbXu\",\"row\":\"AdviserInfo-module_row_2ouqy\"};","import React, { Fragment, useState, useEffect } from \"react\";\r\nimport { DropdownToggle, DropdownMenu, DropdownItem, Dropdown, UncontrolledTooltip } from \"reactstrap\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { fetchGetAccounts } from \"../../services/api/accounts\";\r\nimport { getPersonInfo } from \"../../services/api/person\";\r\nimport { getSavedPersonInfo, getCurrentAccount } from \"../../reducers/selectors\";\r\nimport { currentAccountSet, personInfoSet } from \"../../actions/entities\";\r\nimport arrow from \"../../../public/svg/keyboard_arrow_down-24px.svg\";\r\nimport style from \"./UserSelector.scss\";\r\nimport AdviserInfo from \"./Adviserinfo/AdviserInfo\";\r\nimport { toPascalCaseString } from \"../../utils/helper\";\r\nimport NoAccountsPopup from \"../NoAccountsPopUp/NoAccountPopup\";\r\n\r\nexport const UserSelector = ({ isInNavbar }) => {\r\n const [loadingInfo, setLoadingInfo] = useState(true);\r\n const [accounts, setAccounts] = useState([]);\r\n const dispatch = useDispatch();\r\n const [userDropdownIsOpen, setUserDropdownIsOpen] = useState(false);\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const personInfo = useSelector(getSavedPersonInfo);\r\n const [myData, setMyData] = useState(false);\r\n const [changePassword, setChangePassword] = useState(false);\r\n const [isModalOpen, setIsModalOpen] = useState(false);\r\n\r\n const profileRiskString = {\r\n Conservative: \"Conservador\",\r\n Moderate: \"Moderado\",\r\n Aggressive: \"Agresivo\",\r\n };\r\n\r\n const hideMobile = () => {\r\n if (document.body.classList.contains(\"sidebar-mobile-show\")) {\r\n document.body.classList.toggle(\"sidebar-mobile-show\");\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n getPersonInfo()\r\n .then(({ response }) => {\r\n dispatch(personInfoSet(response.personInfo));\r\n })\r\n .catch((err) => console.error(err))\r\n .finally(() => setLoadingInfo(false));\r\n }, []);\r\n\r\n useEffect(() => {\r\n fetchGetAccounts()\r\n .then((r) => {\r\n if (r.response.accounts.length > 0) {\r\n setAccounts(r.response.accounts);\r\n handleChangeAccount(r.response.accounts[0]);\r\n } else {\r\n setIsModalOpen(true);\r\n handleChangeAccount({\r\n noAccounts: true,\r\n AccountNumber: 0,\r\n AccountEmail: \"\",\r\n AccountName: \"\",\r\n advisorName: \"\",\r\n advisorFirstLastName: \"\",\r\n advisorEmail: \"\",\r\n advisorPhone: \"\",\r\n juridicalDoc: \"\",\r\n });\r\n }\r\n })\r\n .catch((err) => console.error(err));\r\n }, []);\r\n\r\n const toggleUserDropdown = () => {\r\n setUserDropdownIsOpen((prevState) => !prevState);\r\n };\r\n\r\n const handleChangeAccount = (newAccount) => {\r\n dispatch(currentAccountSet({ ...currentAccount, ...newAccount, AccountNumber: newAccount.number }));\r\n };\r\n\r\n const userSelectorData = () => {\r\n return (\r\n \r\n {accounts.map((account, index) => (\r\n {\r\n handleChangeAccount(account);\r\n toggleUserDropdown();\r\n }}\r\n >\r\n {account.name} {account.juridicalDoc ? \" - \" + account.juridicalDoc : \"\"}\r\n \r\n ))}\r\n \r\n {\r\n setUserDropdownIsOpen(false);\r\n setMyData(true);\r\n hideMobile();\r\n }}\r\n >\r\n Mis datos\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n {personInfo && (\r\n \r\n {personInfo.JuridicalPersonLegalName\r\n ? personInfo.JuridicalPersonLegalName\r\n : personInfo.PhysicalPersonFirstName + \" \" + personInfo.PhysicalPersonFirstLastName}\r\n \r\n )}\r\n
    \r\n
    \r\n\r\n \r\n \r\n \r\n \r\n {userSelectorData()}\r\n \r\n \r\n

    {`cuenta ${currentAccount.AccountNumber}${\r\n currentAccount.juridicalDoc ? \" - \" + currentAccount.juridicalDoc : \"\"\r\n }`}

    \r\n {\r\n setUserDropdownIsOpen(!userDropdownIsOpen);\r\n }}\r\n />\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"UserSelector_container_2sVmO\",\"rightContainer\":\"UserSelector_rightContainer_2Fzq2\",\"accountName\":\"UserSelector_accountName_3Xtmm\",\"accountHolderName\":\"UserSelector_accountHolderName_3rBJo\",\"selectedAccountHolderName\":\"UserSelector_selectedAccountHolderName_139CY\",\"secondRow\":\"UserSelector_secondRow_RLE0x\",\"secondRowContainer\":\"UserSelector_secondRowContainer_2xEHa\",\"arrowImg\":\"UserSelector_arrowImg_QJPMl\",\"arrowImgActive\":\"UserSelector_arrowImgActive_ORd8V\",\"accountNumber\":\"UserSelector_accountNumber_1XmX7\",\"dropdown\":\"UserSelector_dropdown_1y3sf\",\"topContainer\":\"UserSelector_topContainer_2wU4i\",\"userSelector\":\"UserSelector_userSelector_19NBL\",\"dropDownMenu\":\"UserSelector_dropDownMenu_N4tKJ\",\"link\":\"UserSelector_link_1L1ut\",\"activeItem\":\"UserSelector_activeItem_3lLoN\",\"inactiveItem\":\"UserSelector_inactiveItem_3pIJS\",\"leftContainer\":\"UserSelector_leftContainer_1rm3T\",\"userLogo\":\"UserSelector_userLogo_1qsnC\",\"secondRowRightContainer\":\"UserSelector_secondRowRightContainer_3g-xa\"};","import React from \"react\";\r\nimport style from \"./Warning.scss\";\r\n\r\nexport const Warning = ({ text }) => {\r\n return (\r\n
    \r\n

    \r\n Importante: \r\n {text}\r\n

    \r\n
    \r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"Warning_container_O7ea_\",\"text\":\"Warning_text_KSEDl\"};","const CONFIG_VAR = '___APP_CONFIG___';\r\n\r\nfunction get(key) {\r\n\tif (!window[CONFIG_VAR]) {\r\n\t\tthrow \"Missing app configuration file config-env.json\";\r\n\t}\r\n\t\r\n\treturn window[CONFIG_VAR][key];\r\n}\r\n\r\nexport default {\r\n\tget\r\n}","import React from \"react\";\r\nimport { Route, Switch } from \"react-router-dom\";\r\nimport MainLayout from \"./../components/Layout/MainLayout\";\r\nimport PrivateRoute from \"./../components/Auth/PrivateRoute\";\r\nimport { PortfolioPage } from \"./../pages/Portfolio\";\r\nimport { HistoryPage } from \"./../pages/History\";\r\nimport { Notifications } from \"../pages/Notifications\";\r\nimport { FutureIncome } from \"../pages/FutureIncome\";\r\nimport { MonthlyStates } from \"../pages/MonthlyStates\";\r\nimport { Orders } from \"../pages/Orders\";\r\nimport { MyData } from \"../pages/MyData\";\r\nimport { Help } from \"../pages/Help\";\r\nimport { ForgotPasswordPage } from \"../pages/ForgotPassword\";\r\nimport { ResetPasswordPage } from \"../pages/ResetPassword\";\r\nimport { AuthorizationsPage } from \"../pages/Authorizations\";\r\nimport { InvestPage } from \"../pages/Invest\";\r\nimport LoginPage from \"../pages/Login\";\r\nimport {\r\n fetchForgotPassword,\r\n fetchResetPasswordNoToken,\r\n fetchCheckPassword,\r\n fetchResetPassword,\r\n} from \"../services/api/users\";\r\nimport RecoveryPassword from \"../components/Auth/RecoveryPassword\";\r\n\r\nexport const routes = (\r\n \r\n \r\n {/*\r\n \r\n \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n","import React from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport Root from \"./pages/Root\";\r\nimport configureStore from \"./store/configureStore\";\r\nimport \"./utils/global\";\r\n\r\n\r\n// Styles\r\n// Import Font Awesome Icons Set\r\nimport \"font-awesome/css/font-awesome.min.css\";\r\n// Import Simple Line Icons Set\r\nimport \"simple-line-icons/css/simple-line-icons.css\";\r\n// Import Main styles for this application\r\nimport \"./style/style.scss\";\r\n// Temp fix for reactstrap\r\nimport \"./style/core/_dropdown-menu-right.scss\";\r\n\r\nimport \"ladda/dist/ladda-themeless.min.css\";\r\n\r\nimport \"react-toastify/dist/ReactToastify.css\";\r\n\r\n// Import Fonts\r\nimport \"../public/fonts/MyFontsWebfontsKit.css\";\r\n\r\nlet initialState = {\r\n auth: {},\r\n};\r\n\r\nconst store = configureStore(initialState);\r\n\r\nReactDOM.render(, document.getElementById(\"root\"));\r\n","import React from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport AuthorizationComponent from \"../components/Authorization/AuthorizationComponent\";\r\n\r\nexport const AuthorizationsPage = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { ForgotPassword } from \"../components/Auth/ForgotPassword\";\r\n\r\nexport const ForgotPasswordPage = ({ forgotPasswordFunction }) => {\r\n return ;\r\n};\r\n","import React from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport FutureIncomeComponent from \"../components/Layout/FutureIncomeComponent/FutureIncomeComponent\";\r\nimport { PageWrapper } from \"../components/PageWrapper/PageWrapper\";\r\n\r\nexport const FutureIncome = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport { HelpComponent} from \"../components/Help/HelpComponent\";\r\nimport { PageWrapper } from \"../components/PageWrapper/PageWrapper\";\r\n\r\nexport const Help = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n","import React, { useState, Fragment } from \"react\";\r\nimport { Col, Row } from \"bx-react-ui/node_modules/reactstrap\";\r\nimport { HistoryForm } from \"../components/HistoryForm/HistoryForm\";\r\nimport { PageWrapper } from \"../components/PageWrapper/PageWrapper\";\r\n\r\nexport const HistoryPage = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport {Invest} from \"../components/Invest/Invest\";\r\n\r\nexport const InvestPage = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import Login from \"./../components/Auth/Login\";\r\n\r\nexport default Login;\r\n","import React, { Fragment } from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport { MonthlyStateComponent } from \"../components/Layout/MonthlyStateComponent/MonthlyStateComponent\";\r\nimport { PageWrapper } from \"../components/PageWrapper/PageWrapper\";\r\n\r\nexport const MonthlyStates = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport {MyDataComponent} from \"../components/Layout/MyData/MyDataComponent\"\r\nimport { PageWrapper } from \"../components/PageWrapper/PageWrapper\";\r\n\r\nexport const MyData = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);","import React, { Fragment, useEffect, useState } from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\n\r\nimport { PageWrapper } from \"../components/PageWrapper/PageWrapper\";\r\nimport { NotificationsCard } from \"../components/NotificationsCard/NotificationsCard\";\r\n\r\nexport const Notifications = () => (\r\n \r\n \r\n \r\n);\r\n","import React, { Fragment } from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport OrdersComponent from \"../components/Layout/OrdersComponent/OrdersComponent\";\r\nimport { PageWrapper } from \"../components/PageWrapper/PageWrapper\";\r\n\r\nexport const Orders = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { PageWrapper } from \"../components/PageWrapper/PageWrapper\";\r\nimport { Portfolio } from \"../components/Portfolio/Portfolio\";\r\n\r\nexport const PortfolioPage = () => (\r\n \r\n \r\n \r\n);\r\n","import React from \"react\";\r\nimport { ResetPassword } from \"../components/Auth/ResetPassword\";\r\n\r\nexport const ResetPasswordPage = ({ resetPasswordFunction, checkPassword }) => {\r\n return (\r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { HashRouter } from \"react-router-dom\";\r\nimport { routes } from \"./../config/routes\";\r\nimport \"intl\";\r\nimport { IntlProvider } from \"react-intl\";\r\nimport { Provider } from \"react-redux\";\r\nimport { AppInfoWrapper } from \"../utils/AppInfoWrapper\";\r\nimport { LegalContracts } from \"../components/LegalContracts/LegalContracts\";\r\n\r\nconst Root = (props) => {\r\n return (\r\n // \r\n // \r\n // \r\n // {routes}\r\n // \r\n // \r\n // \r\n\r\n \r\n \r\n \r\n \r\n {routes}\r\n \r\n \r\n \r\n );\r\n }\r\n\r\nexport default Root;","import { createReducer } from \"redux-create-reducer\";\r\nimport {\r\n CHANGE_USERNAME,\r\n CHANGE_PASSWORD,\r\n AUTH_SUCCESS,\r\n AUTH_FAILURE,\r\n AUTH_REQUEST,\r\n SIGN_IN,\r\n SIGN_OUT,\r\n MUST_RESET_PASSWORD,\r\n} from \"./../actions/auth\";\r\n\r\nconst initialState = {\r\n authenticated: false,\r\n loading: false,\r\n username: \"\",\r\n password: \"\",\r\n};\r\n\r\nexport default createReducer(initialState, {\r\n [CHANGE_USERNAME](state, action) {\r\n return {\r\n ...state,\r\n username: action.payload.username,\r\n };\r\n },\r\n [CHANGE_PASSWORD](state, action) {\r\n return {\r\n ...state,\r\n password: action.payload.password,\r\n mustResetPassword: false,\r\n };\r\n },\r\n [SIGN_IN](state) {\r\n return {\r\n ...state,\r\n error: undefined,\r\n loading: true,\r\n };\r\n },\r\n [SIGN_OUT]() {\r\n return {\r\n authenticated: false,\r\n };\r\n },\r\n [AUTH_SUCCESS](state) {\r\n return {\r\n ...state,\r\n error: undefined,\r\n loading: false,\r\n authenticated: true,\r\n };\r\n },\r\n [AUTH_FAILURE](state, action) {\r\n return {\r\n ...state,\r\n error: action.payload.error,\r\n loading: false,\r\n authenticated: false,\r\n };\r\n },\r\n [MUST_RESET_PASSWORD](state, action) {\r\n return {\r\n ...state,\r\n mustResetPassword: true,\r\n };\r\n },\r\n});\r\n","import {\r\n EVENTALERTS_SUCCESS,\r\n EVENTALERTS_READ,\r\n AUTHORIZATIONS_RELOAD,\r\n AUTHORIZATIONS_SUCCESS,\r\n NOTIFICATIONS_RELOAD,\r\n NOTIFICATIONS_SUCCESS,\r\n ACCOUNT_SET,\r\n PERSON_INFO_SET,\r\n NOTIFICATIONS_LOADING,\r\n TEXTS_SET,\r\n TEXTS_LOADING_SET,\r\n} from \"../actions/entities\";\r\nimport { removeIfExists } from \"../utils/inmutability\";\r\n\r\nconst defaultState = {\r\n texts: {\r\n tooltips: {\r\n portfolio_general:\r\n \"\",\r\n portfolio_actual_price:\r\n \"\",\r\n portfolio_nominal_value:\r\n \"\",\r\n portfolio_investment_cost:\r\n \"\",\r\n portfolio_pl:\r\n \"\",\r\n portfolio_trt:\r\n \"\",\r\n portfolio_ytm:\r\n \"\",\r\n portfolio_percentage:\r\n \"\",\r\n sell_quote:\r\n \"\",\r\n invest_isin:\r\n \"\",\r\n invest_performance:\r\n \"\",\r\n invest_coupon_rate:\r\n \"\",\r\n invest_maturity_date:\r\n \"\",\r\n invest_commission:\r\n \"\",\r\n invest_charges:\r\n \"\",\r\n },\r\n notes: {\r\n history_note:\r\n \"\",\r\n orders_note:\r\n \"\",\r\n authorizations_note:\r\n \"\",\r\n future_note:\r\n \"\",\r\n statements_note:\r\n \"\",\r\n help_text:\r\n \"\",\r\n footer_line_1:\r\n \"\",\r\n footer_line_2:\r\n \"\",\r\n no_account_title:\r\n \"\",\r\n no_account_subtitle:\r\n \"\"\r\n },\r\n },\r\n};\r\n\r\nexport default function entities(state = defaultState, action) {\r\n if (action.response && action.response.entities) {\r\n return {\r\n ...state,\r\n ...action.response.entities,\r\n };\r\n } else {\r\n switch (action.type) {\r\n case EVENTALERTS_SUCCESS: {\r\n return {\r\n ...state,\r\n eventAlerts: action.payload.eventAlerts,\r\n };\r\n }\r\n case EVENTALERTS_READ: {\r\n return {\r\n ...state,\r\n eventAlerts: removeIfExists(state.eventAlerts, action.payload, {\r\n key: \"id\",\r\n }),\r\n };\r\n }\r\n case AUTHORIZATIONS_RELOAD: {\r\n return {\r\n ...state,\r\n authorizations: [],\r\n authorizationsLoaded: false,\r\n };\r\n }\r\n case AUTHORIZATIONS_SUCCESS: {\r\n return {\r\n ...state,\r\n authorizations: action.payload.authorizations,\r\n authorizationsLoaded: true,\r\n };\r\n }\r\n case NOTIFICATIONS_RELOAD: {\r\n return {\r\n ...state,\r\n notifications: [],\r\n notificationsLoaded: false,\r\n };\r\n }\r\n case NOTIFICATIONS_SUCCESS: {\r\n return {\r\n ...state,\r\n notifications: action.payload.notifications,\r\n notificationsLoaded: true,\r\n notificationsLoading: false,\r\n };\r\n }\r\n case NOTIFICATIONS_LOADING: {\r\n return {\r\n ...state,\r\n notificationsLoading: action.payload.notificationsLoading,\r\n };\r\n }\r\n case ACCOUNT_SET: {\r\n return {\r\n ...state,\r\n currentAccount: action.payload.account,\r\n };\r\n }\r\n case PERSON_INFO_SET: {\r\n return {\r\n ...state,\r\n personInfo: action.payload.person,\r\n };\r\n }\r\n case TEXTS_SET: {\r\n return {\r\n ...state,\r\n texts: action.payload.texts,\r\n };\r\n }\r\n case TEXTS_LOADING_SET: {\r\n return {\r\n ...state,\r\n textsLoading: action.payload.textsLoading,\r\n };\r\n }\r\n }\r\n }\r\n\r\n return state;\r\n}\r\n","import { combineReducers } from \"redux\";\r\nimport auth from \"./auth\";\r\nimport entities from \"./entities\";\r\n\r\nconst reducers = combineReducers({\r\n auth,\r\n entities,\r\n});\r\n\r\nexport default reducers;\r\n","/*** Auth ***/\r\nexport const getAuthCredentials = (state) => {\r\n return {\r\n username: state.auth.username,\r\n password: state.auth.password,\r\n role: \"Client\",\r\n };\r\n};\r\nexport const getAuth = (state) => {\r\n const { password, ...rest } = state.auth;\r\n\r\n return rest;\r\n};\r\n\r\nexport const getUserContext = () => {\r\n return JSON.parse(sessionStorage.getItem(\"context\"));\r\n};\r\n\r\nexport const getSession = () => {\r\n const context = getUserContext();\r\n return context ? context.session : null;\r\n};\r\n\r\nexport const getUser = () => getSession().Username;\r\n\r\nexport const getCurrentAccount = (state) =>\r\n state.entities.currentAccount || {\r\n AccountNumber: 0,\r\n AccountEmail: \"\",\r\n AccountName: \"\",\r\n advisorName: \"\",\r\n advisorFirstLastName: \"\",\r\n advisorEmail: \"\",\r\n advisorPhone: \"\",\r\n };\r\n\r\nexport const getSavedPersonInfo = (state) => state.entities.personInfo || null;\r\n\r\nexport const getAuthorizations = (state) => state.entities.authorizations || [];\r\n\r\nexport const getTexts = (state) => state.entities.texts || null;\r\n\r\nexport const getTextsLoading = (state) => state.entities.textsLoading || false;\r\n\r\nexport const getAuthorizationsLoaded = (state) => !!state.entities.authorizationsLoaded;\r\n\r\nexport const getNotifications = (state) => state.entities.notifications || [];\r\n\r\nexport const getNotificationsLoaded = (state) => !!state.entities.notificationsLoaded;\r\n\r\nexport const getNotificationsLoading = (state) => !!state.entities.notificationsLoading;\r\n\r\nexport const getCounters = (state) => {\r\n return {\r\n inProcessOrders: 0,\r\n authorizations: getAuthorizations(state).length,\r\n notifications: getNotifications(state).length,\r\n };\r\n};\r\n","import { put, call, fork, race, take, select, cancel } from \"redux-saga/effects\";\r\nimport { api } from \"../services/index\";\r\nimport * as auth from \"./../actions/auth\";\r\nimport { getAuthCredentials, getUserContext } from \"./../reducers/selectors\";\r\n\r\nconst LoginResult = {\r\n Success: 0,\r\n InvalidUser: 1,\r\n InvalidPassword: 2,\r\n InvalidUserOrPassword: 3,\r\n NotAuthorized: 4,\r\n Fail: 5,\r\n MustResetPassword: 6,\r\n};\r\n\r\nconst getAuthStatus = () => {\r\n localStorage.clear();\r\n return sessionStorage.getItem(\"authenticated\") == \"true\" ? true : false;\r\n};\r\n\r\nconst setUserContext = (context) => {\r\n localStorage.clear();\r\n sessionStorage.setItem(\"context\", JSON.stringify(context));\r\n};\r\n\r\nconst setAuthStatus = (status) => {\r\n if (status == false) {\r\n setUserContext({});\r\n }\r\n\r\n localStorage.clear();\r\n sessionStorage.setItem(\"authenticated\", status.toString());\r\n};\r\n\r\nfunction* authFlowSaga() {\r\n let isAuthenticated = yield call(getAuthStatus);\r\n\r\n let authenticatedTasks;\r\n\r\n if (isAuthenticated) {\r\n const userContext = getUserContext();\r\n\r\n yield put(auth.authSuccess());\r\n yield put({ type: \"server/authenticate\", payload: { token: userContext.accessToken } });\r\n }\r\n\r\n while (true) {\r\n if (!isAuthenticated) {\r\n const result = yield take(auth.SIGN_IN);\r\n let credentials = yield select((state) => getAuthCredentials(state));\r\n\r\n let { isLoginOk, userContext, mustResetPassword } = yield call(authorize, credentials);\r\n\r\n if (mustResetPassword) {\r\n yield put(auth.mustResetPassword());\r\n }\r\n\r\n if (isLoginOk) {\r\n isAuthenticated = true;\r\n yield call(setAuthStatus, true);\r\n yield call(setUserContext, userContext);\r\n yield put(auth.authSuccess());\r\n yield put({ type: \"server/authenticate\", payload: { token: userContext.accessToken } });\r\n } else {\r\n isAuthenticated = false;\r\n }\r\n\r\n if (!isAuthenticated) continue;\r\n }\r\n\r\n let userSignedOut;\r\n while (!userSignedOut) {\r\n yield take(auth.SIGN_OUT);\r\n userSignedOut = true;\r\n isAuthenticated = false;\r\n yield call(signout);\r\n }\r\n }\r\n}\r\n\r\nfunction* authorize(credentialsOrToken) {\r\n const { response } = yield race({\r\n response: call(api.authService, credentialsOrToken),\r\n signout: take(auth.SIGN_OUT),\r\n });\r\n const _response = response.response;\r\n\r\n if (_response) {\r\n switch (_response.result) {\r\n case LoginResult.Success:\r\n return {\r\n isLoginOk: true,\r\n userContext: {\r\n accessToken: _response.accessToken,\r\n session: _response.session,\r\n timezoneOffset: _response.timezoneOffset,\r\n },\r\n };\r\n case LoginResult.MustResetPassword:\r\n yield put(auth.authFailure(\"Se debe establecer una nueva contraseña\"));\r\n return {\r\n isLoginOk: false,\r\n mustResetPassword: true,\r\n };\r\n default:\r\n yield put(auth.authFailure(_response.error));\r\n\r\n return {\r\n isLoginOk: false,\r\n };\r\n }\r\n } else {\r\n return {\r\n isLoginOk: false,\r\n };\r\n }\r\n}\r\n\r\nfunction* signout() {\r\n yield call(api.logoutService);\r\n yield call(setAuthStatus, false);\r\n yield put(auth.signOut());\r\n\r\n window.API_TOKEN = null;\r\n}\r\n\r\nexport default authFlowSaga;\r\n","import { fork } from \"redux-saga/effects\";\r\nimport authFlowSaga from \"./auth\";\r\n\r\nexport default function* rootSaga() {\r\n yield fork(authFlowSaga);\r\n}\r\n","import JSEncrypt from \"jsencrypt/bin/jsencrypt.min.js\";\r\nimport { Navigate } from \"react-router-dom\";\r\n\r\nimport config from \"./../config/config\";\r\n\r\nlet accessToken = null;\r\n\r\nexport const API_ROOT = config.get(\"API_ROOT_URL\");\r\nexport const API_PROXY_URL = config.get(\"API_PROXY_URL\");\r\n\r\nconst fetchOptions = (body, method) => {\r\n let authHeader = {};\r\n let context = JSON.parse(sessionStorage.getItem(\"context\"));\r\n let accessToken;\r\n let session;\r\n\r\n if (context) {\r\n accessToken = context.accessToken;\r\n session = context.session;\r\n }\r\n let guid;\r\n if (session) {\r\n guid = session.UserGUID;\r\n }\r\n\r\n if (accessToken) {\r\n authHeader = { Authorization: `${accessToken}` };\r\n }\r\n\r\n const options = {\r\n device: `Platform: ${navigator.platform}, User Agent: ${navigator.userAgent}, App Version: ${navigator.appVersion}, Vendor: ${navigator.vendor}`,\r\n path: location.href,\r\n guid,\r\n };\r\n\r\n return {\r\n method,\r\n headers: {\r\n Accept: \"application/json\",\r\n Authorization: getAccessToken(),\r\n \"Content-Type\": \"application/json; charset=utf-8\",\r\n ...authHeader,\r\n ClientOptions: JSON.stringify(options),\r\n },\r\n credentials: \"include\",\r\n body: body ? JSON.stringify(body) : undefined,\r\n };\r\n};\r\n\r\nexport function callApiProxy(service, body) {\r\n if (!accessToken) {\r\n const contextJSON = sessionStorage.getItem(\"context\");\r\n if (contextJSON) {\r\n accessToken = JSON.parse(contextJSON).accessToken;\r\n }\r\n }\r\n\r\n return fetch(`${API_PROXY_URL}${service}`, {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n Authorization: `OAuth ${getAccessToken()}`,\r\n },\r\n body: JSON.stringify(body),\r\n })\r\n .then((response) => response.json())\r\n .catch((e) => console.error(e.toString()));\r\n}\r\n\r\nexport function callApi(endpoint, body = undefined, method = \"POST\", normalizeFunction = (a) => a) {\r\n const fullUrl = endpoint.indexOf(API_ROOT) === -1 ? API_ROOT + endpoint : endpoint;\r\n const options = fetchOptions(body, method);\r\n\r\n return fetch(fullUrl, options)\r\n .then((response) => {\r\n if (response.status == 401) {\r\n return Promise.reject({ unauthorized: true });\r\n }\r\n return response.json().then((json) => {\r\n if (json.error === \"Session expired\" || json.error === \"La sesión ha expirado\") {\r\n sessionStorage.clear();\r\n window.location.reload();\r\n ;\r\n return;\r\n }\r\n return { json, response };\r\n });\r\n })\r\n .then(({ json, response }) => {\r\n if (!response.ok) {\r\n return Promise.reject(json);\r\n }\r\n\r\n return normalizeFunction(json);\r\n })\r\n .then(\r\n (response) => ({ response }),\r\n (error) => error || { error: \"Something bad happened\" }\r\n );\r\n}\r\n\r\nexport function callApiProxyCallback(service, body, callback) {\r\n return fetch(`${API_PROXY_URL}${service}`, {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n Authorization: `OAuth ${getAccessToken()}`,\r\n },\r\n body: JSON.stringify(body),\r\n })\r\n .then((response) => response.json())\r\n .then((data) => {\r\n if (data.code && data.code !== 0) {\r\n alert(data.message);\r\n callback(null, data.message);\r\n } else {\r\n callback(data);\r\n }\r\n })\r\n .catch((e) => callback(null, e.toString()));\r\n}\r\n\r\nexport function getAccessToken() {\r\n if (!window.API_TOKEN) {\r\n const contextJSON = sessionStorage.getItem(\"context\");\r\n if (contextJSON) {\r\n window.API_TOKEN = JSON.parse(contextJSON).accessToken;\r\n }\r\n }\r\n\r\n return window.API_TOKEN;\r\n}\r\n\r\nexport const authService = (credentials) => {\r\n const encrypt = new JSEncrypt();\r\n\r\n return callApi(`user/preLogin?m=${Date.now()}`, null, \"GET\").then(({ response }) => {\r\n const publicKey = window.atob(response.publicKey);\r\n encrypt.setPublicKey(publicKey);\r\n credentials.password = encrypt.encrypt(credentials.password);\r\n credentials.version = 2; \r\n return callApi(\"user/externalLogin\", { ...credentials, publicKey: response.publicKey }, \"POST\");\r\n });\r\n};\r\n\r\nexport const logoutService = () => {\r\n return callApi(\"user/logout\", null, \"POST\");\r\n};\r\n\r\nexport const getCurrentVersion = (payload) => callApi(\"getFrontendVersion\", { ...payload }, \"POST\");\r\n","import { callApi, callApiProxyCallback } from \"../api\";\r\nimport moment from \"moment\";\r\n\r\nexport const fetchGetAccounts = () => callApi(\"accounts\", null, \"GET\");\r\n\r\nexport const fetchGetPortfolio = (cuenta, date) =>\r\n callApi(`accounts/${cuenta}/portfolio?date=${date}&v3=true`, null, \"GET\");\r\n\r\nexport const fetchGetPortfolioNoLogs = (cuenta) => callApi(`accounts/${cuenta}/portfolioNoLogs`, null, \"GET\");\r\n\r\nexport const fetchGetAccountInfo = (accountId) => callApi(`account/info?accountId=${accountId}`, null, \"GET\");\r\n\r\nexport const fetchGetActivity = (cuenta, currency, filter) => {\r\n const from = moment(filter.desde).format(\"YYYY-MM-DD\");\r\n const to = moment(filter.hasta).format(\"YYYY-MM-DD\");\r\n return callApi(`accounts/${cuenta}/activity/cash/${currency}/?from=${from}&to=${to}`, null, \"GET\");\r\n};\r\n\r\nexport const fetchGetActivityProduct = (cuenta, assetId, filter) => {\r\n const from = moment(filter.desde).format(\"YYYY-MM-DD\");\r\n const to = moment(filter.hasta).format(\"YYYY-MM-DD\");\r\n return callApi(`accounts/${cuenta}/activity/asset/${assetId}/?from=${from}&to=${to}`, null, \"GET\");\r\n};\r\n\r\nexport const fetchGetAccountBanks = (cuenta) => callApi(`accounts/${cuenta}/bankAccounts`, null, \"GET\");\r\n\r\nexport const getArchivesTypes = () => callApi(`person/archivesTypes`, null, \"GET\");\r\n\r\nexport const GetDigitalLinks = (body) => callApi(\"accounts/GetDigitalLinks\", body, \"POST\");\r\n\r\nexport const getClientPositionDigital = (body) => callApi(\"accounts/getClientPositionDigital\", body, \"POST\");\r\n\r\nexport const getClientHistoryAUM = (body) => callApi(\"accounts/getClientHistoryAUM\", body, \"POST\");\r\n\r\nexport const getClientHistoryPerformance = (body) =>\r\n callApi(\"accounts/getClientHistoryPerformance\", body, \"POST\");\r\n\r\nexport const getMonthsPositionReport = (body) => callApi(\"accounts/getMonthsPositionReport\", body, \"POST\");\r\n\r\nexport const GetDigitalReprofile = () => callApi(\"accounts/getDigitalReprofile\", null, \"POST\");\r\n\r\nexport const getAccountStatement = async (numCli, month, year) =>\r\n callApi(`accounts/${numCli}/activity/?month=${month}&year=${year}`, null, \"GET\");\r\n\r\nexport const getPersonInfo = () => callApi(\"accounts/personInfo\", null, \"GET\");\r\n\r\nexport const setPersonInfo = (body) => callApi(\"accounts/personInfo\", body, \"POST\");\r\n\r\nexport const getFutureIncome = (body) => {\r\n const from = moment(body.from).format(\"YYYY-MM-DD\");\r\n const to = moment(body.to).format(\"YYYY-MM-DD\");\r\n return callApi(`accounts/${body.cuenta}/activity/cashFlow?from=${from}&to=${to}`, null, \"GET\");\r\n};\r\n\r\nexport const getPortfolioCSV = (payload) => callApi(\"accounts/portfolio/reportCSV\", payload, \"POST\");\r\n\r\nexport const getPortfolioXLS = (payload) => callApi(\"accounts/portfolio/reportXLS\", payload, \"POST\");\r\n\r\nexport const getHistoryCSV = (payload) => callApi(\"accounts/history/reportCSV\", payload, \"POST\");\r\n\r\nexport const getHistoryXLS = (payload) => callApi(\"accounts/history/reportXLS\", payload, \"POST\");\r\n\r\nexport const fetchProductActivityPDF = (payload) => callApi(\"accounts/history/activitypdf\", payload, \"POST\");\r\n\r\nexport const fetchInProcesOrderPDF = (payload) => callApi(\"orders/inprocesspdf\", payload, \"POST\");\r\n\r\nexport const fetchgetTradeTicketClient = (payload) => callApi(\"trade/ticket\", payload, \"POST\");\r\n\r\nexport const fetchOpenId = (payload) => callApi(\"openID\", payload, \"POST\");\r\n\r\nexport const getPersonBankAccount = (payload) => callApi(\"person/relatedAccounts?v2=true\", payload, \"POST\");\r\n\r\nexport const getFundAccountExtract = (payload) => callApi(\"accounts/fundAccountExtract\", payload, \"POST\");\r\n\r\nexport const getFundAccountExtractClientX = (payload) =>\r\n callApi(\"accounts/fundAccountExtractClientX\", payload, \"POST\");\r\n\r\nexport const getAllFundsInPosition = (payload) => callApi(\"accounts/getAllFunds\", payload, \"POST\");\r\n","import { callApi } from \"../api\";\r\n\r\nexport const getAuthorizationsService = () => callApi(\"authorizations\", null, \"GET\");\r\n\r\nexport const respondAuthorization = (body) => callApi(\"authorizations\", body, \"POST\");\r\n\r\nexport const getTransactionalPinURL = () => callApi(\"transactional/pin\", null, \"GET\");\r\n\r\nexport const validateTransactionalAuthCode = (body) => callApi(\"transactional/authcode\", body, \"POST\");\r\n\r\nexport const getPaymentURL = (body) => callApi(\"payment/pin\", body, \"POST\");\r\n\r\nexport const validatePaymentAuthCode = (body) => callApi(\"payment/authcode\", body, \"POST\");\r\n","import { callApi } from \"../api\";\r\n\r\nexport const fetchGetBankSuggestions = (text) =>\r\n callApi(`entities/custodianEntities?text=${text}`, null, \"GET\");\r\n\r\nexport const fetchGetCountrySuggestions = (text) => callApi(`entities/countries?search=${text}`, null, \"GET\");\r\n\r\nexport const setRedirectionData = (body) => callApi(\"redirection/set\", body, \"POST\");\r\n\r\nexport const getRedirectionData = (body) => callApi(\"redirection/get\", body, \"POST\");\r\n\r\nexport const fetchTooltipsAndNotes = () => {\r\n return callApi(\"tooltips\", null, \"GET\");\r\n};","import moment from \"moment\";\r\nimport { callApi, API_ROOT, getAccessToken } from \"../api\";\r\n\r\nexport const fetchGetWithdrawals = (cuenta, filter) => {\r\n const { desde, hasta, numCli, estatus } = filter;\r\n const from = moment(desde).format(\"YYYY-MM-DD\");\r\n const to = moment(hasta).format(\"YYYY-MM-DD\");\r\n const accNumber = numCli;\r\n const status = estatus !== \"Todos\" ? estatus : \"All\";\r\n\r\n return callApi(`accounts/${cuenta}/withdrawals?from=${from}&to=${to}&status=${status}`, null, \"GET\");\r\n};\r\n\r\nexport const fetchGetDeposits = (cuenta, filter) => {\r\n const { desde, hasta, numCli, estatus } = filter;\r\n const from = moment(desde).format(\"YYYY-MM-DD\");\r\n const to = moment(hasta).format(\"YYYY-MM-DD\");\r\n const accNumber = numCli;\r\n const status = estatus !== \"Todos\" ? estatus : \"All\";\r\n\r\n return callApi(`accounts/${cuenta}/deposits?from=${from}&to=${to}&status=${status}`, null, \"GET\");\r\n};\r\n\r\nexport const fetchAddWithdrawal = (cuenta, withdraw) =>\r\n callApi(`accounts/${cuenta}/withdrawals`, { withdraw }, \"POST\");\r\n\r\nexport const fetchIO = (io, k2btrnmode) => callApi(`inout`, { io, k2btrnmode }, \"POST\");\r\n\r\nexport const fetchUploadIOAttachments = (body) => {\r\n const { id, ioType, files } = body;\r\n\r\n const fullUrl = `${API_ROOT}inout/uploadAttachments/${id}?ioType=${encodeURI(ioType)}`;\r\n\r\n return fetch(fullUrl, {\r\n headers: {\r\n Authorization: getAccessToken(),\r\n },\r\n method: \"POST\",\r\n body: files,\r\n });\r\n};\r\n\r\nexport const fetchDepositableAccounts = () => callApi(`deposit/depositableAccounts`, null, \"GET\");\r\n\r\nexport const fetchOffers = (accountId) => callApi(`offers/${accountId}`, null, \"GET\");\r\n\r\nexport const takeOffer = (body) => callApi(`offers`, body, \"POST\");\r\n\r\nexport const getEarnings = (body) => callApi(`earnings`, body, \"POST\");\r\n\r\nexport const getOrders = (body) => callApi(`orders`, body, \"POST\");\r\n\r\nexport const askPrice = (body) => callApi(`quote`, body, \"POST\");\r\n\r\nexport const fetchFunds = (accountId) => callApi(`fundstoinvest`, { accountId }, \"POST\");\r\nexport const updateFund = (body) => callApi(`funds`, body, \"POST\");","import { callApi } from \"../api\";\r\n\r\nexport const getMessages = () => callApi(\"internalmessages\", null, \"GET\");\r\n\r\nexport const updateMessage = (body) => callApi(\"internalmessages\", body, \"POST\");\r\n\r\nexport const getMessageAttachment = (body) => callApi(\"internalmessages/attachment\", body, \"POST\");\r\n","import { callApi } from \"../api\";\r\n\r\nexport const getPersonInfo = () => callApi(\"person/information\", null, \"GET\");\r\n\r\nexport const uploadFiles = (body) => callApi(\"person/document\", body, \"POST\");\r\n\r\nexport const getFile = (body) => callApi(\"person/archive\", body, \"POST\");\r\n\r\nexport const getQuestions = () => callApi(\"questions\", null, \"GET\");\r\n\r\nexport const getAnswers = () => callApi(\"answers\", null, \"GET\");\r\n\r\nexport const getAccountAnswers = (body) => callApi(\"accountAnswers\", body, \"POST\");\r\n\r\nexport const updateAnswers = (body) => callApi(\"answers\", body, \"POST\");\r\n\r\nexport const getLegalContracts = () => callApi(\"legalContracts\", null, \"GET\");\r\n\r\nexport const setLegalContract = (body) => callApi(\"legalContracts\", body, \"POST\");\r\n","import { callApi } from \"../api\";\r\n\r\nexport const fetchForgotPassword = (email) => {\r\n const body = {\r\n email: email,\r\n };\r\n return callApi(\"user/forgotPasswordEmail\", body, \"POST\");\r\n};\r\n\r\nexport const fetchResetPasswordNoToken = (username, newPassword) => {\r\n const body = {\r\n username: username,\r\n newPassword: newPassword,\r\n };\r\n return callApi(\"user/resetPasswordNoToken\", body, \"POST\");\r\n};\r\n\r\nexport const changeFirstAccessPassword = (username, oldPassword, newPassword) => {\r\n const body = {\r\n username,\r\n oldPassword,\r\n newPassword,\r\n };\r\n\r\n return callApi(\"user/changeFirstAccessPassword\", body, \"POST\");\r\n};\r\n\r\nexport const fetchChangePassword = (oldPassword, newPassword) => {\r\n const body = {\r\n oldPassword: oldPassword,\r\n newPassword: newPassword,\r\n };\r\n return callApi(\"user/changePassword\", body, \"POST\");\r\n};\r\n\r\nexport const fetchSendContactRequest = (site, senderName, senderMail, message) => {\r\n const body = {\r\n site,\r\n senderName,\r\n senderMail,\r\n message,\r\n };\r\n return callApi(\"contact\", body, \"POST\");\r\n};\r\n\r\nexport const fetchCheckPassword = (username, password) => {\r\n const body = {\r\n username: username,\r\n password: password,\r\n };\r\n return callApi(\"user/checkPassword\", body, \"POST\");\r\n};\r\n\r\nexport const fetchResetPassword = (username, newPassword, token) => {\r\n const body = {\r\n username: username,\r\n newPassword: newPassword,\r\n token: token,\r\n };\r\n return callApi(\"user/ResetPassword\", body, \"POST\");\r\n};\r\n","import * as _api from './api';\r\n\r\nexport const api = _api;","if (process.env.NODE_ENV === 'production') {\r\n module.exports = require('./configureStore.prod');\r\n} else {\r\n module.exports = require('./configureStore.dev');\r\n}","import { createStore, applyMiddleware } from \"redux\";\r\nimport createSagaMiddleware from \"redux-saga\";\r\nimport rootReducer from \"../reducers/index\";\r\nimport rootSaga from \"../sagas\";\r\nimport createSocketIoMiddleware from \"redux-socket.io\";\r\nimport io from \"socket.io-client\";\r\nimport config from \"./../config/config\";\r\nimport { getUserContext } from \"./../reducers/selectors\";\r\nimport { signOut } from \"../actions/auth\";\r\n\r\nimport React from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport { DebugTools, CommonsHelper } from \"bx-react-ui\";\r\n\r\nconst WEB_SOCKET_URL = config.get(\"WEB_SOCKET_URL\");\r\nconst WEB_SOCKET_PATH = config.get(\"WEB_SOCKET_PATH\");\r\n\r\nconst backendSocket = io(WEB_SOCKET_URL, {\r\n rejectUnauthorized: false,\r\n transports: [\"websocket\", \"polling\"],\r\n path: WEB_SOCKET_PATH\r\n});\r\n\r\nconst backendSocketMiddleware = createSocketIoMiddleware(\r\n backendSocket,\r\n \"server/\"\r\n);\r\n\r\n// Si la conexion ws se reconecta es necesario enviar el token\r\nbackendSocket.on(\"reconnect\", attemptNumber => {\r\n const userContext = getUserContext();\r\n\r\n if (userContext != null && userContext.accessToken != null) {\r\n backendSocket.emit(\"action\", {\r\n type: \"server/authenticate\",\r\n payload: { token: userContext.accessToken }\r\n });\r\n }\r\n});\r\n\r\nexport default function configureStore(initialState) {\r\n const sagaMiddleware = createSagaMiddleware();\r\n\r\n const store = createStore(\r\n rootReducer,\r\n initialState,\r\n applyMiddleware(sagaMiddleware, backendSocketMiddleware)\r\n );\r\n\r\n // Add fetch interceptor\r\n registerFetchInterceptor(store);\r\n\r\n sagaMiddleware.run(rootSaga);\r\n\r\n return store;\r\n}\r\n\r\nconst registerFetchInterceptor = (store) => {\r\n return CommonsHelper.fetchIntercept({\r\n response: function(response, request) {\r\n if (response.status == 401) {\r\n store.dispatch(signOut());\r\n return Promise.reject({ unauthorized: true });\r\n }\r\n\r\n if (response.status == 500) {\r\n const DEBUG = config.get('DEBUG');\r\n\r\n if (DEBUG) {\r\n const modalError = document.createElement('div');\r\n document.body.appendChild(modalError);\r\n\r\n new Promise((resolve) => {\r\n // catch proxy error 500\r\n if (response.bodyUsed == false) {\r\n resolve({\r\n url: request[0],\r\n errorText: response.statusText,\r\n payload: JSON.stringify(\r\n request[1].hasOwnProperty('body') ? request[1].body : {}\r\n ),\r\n });\r\n } else {\r\n // catch api error 500\r\n response.json().then((r) => {\r\n resolve(JSON.parse(r));\r\n });\r\n }\r\n }).then((error) => {\r\n ReactDOM.render(\r\n ,\r\n modalError\r\n );\r\n });\r\n }\r\n }\r\n\r\n return response;\r\n },\r\n\r\n responseError: function(error) {\r\n return Promise.reject(error);\r\n },\r\n });\r\n};\r\n","export default __webpack_public_path__ + \"./fonts/csv.67be4365.svg\";","export default __webpack_public_path__ + \"./fonts/pdf.df02c011.svg\";","export default __webpack_public_path__ + \"./fonts/xlsx.a89baac7.svg\";","import React, { useEffect, useState } from \"react\";\r\nimport { Modal, ModalBody, ModalFooter, ModalHeader, Button } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\n\r\nimport { useInterval } from \"bx-react-ui/src/utils/hooks\";\r\nimport { getCurrentAccount } from \"../reducers/selectors\";\r\nimport { getCurrentVersion } from \"../services/api\";\r\nimport { fetchGetAccountInfo } from \"../services/api/accounts\";\r\nimport { getSession } from \"../reducers/selectors\";\r\nimport { currentAccountSet } from \"../actions/entities\";\r\n\r\nexport const AppInfoWrapper = ({ children }) => {\r\n const [version, setVersion] = useState();\r\n const [newVersionAvailable, setNewVersionAvailable] = useState(false);\r\n const session = useSelector(getSession);\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const FrontendName = \"digital\";\r\n const dispatch = useDispatch();\r\n const textsLoading = useSelector(getTextsLoading);\r\n\r\n\r\n const handleChangeAccount = (newAccountInfo) => {\r\n dispatch(currentAccountSet({ ...currentAccount, ...newAccountInfo }));\r\n };\r\n\r\n const onToggle = () => {\r\n setNewVersionAvailable((prevState) => !prevState);\r\n };\r\n\r\n useEffect(() => {\r\n if (session && !version) {\r\n getCurrentVersion({ FrontendName }).then(({ response }) => {\r\n setVersion(+response.FrontendVersion);\r\n });\r\n }\r\n }, [currentAccount.AccountNumber]);\r\n\r\n useInterval(() => {\r\n if (session && version) {\r\n getCurrentVersion({ FrontendName }).then(({ response }) => {\r\n if (version < response.FrontendVersion) setNewVersionAvailable(true);\r\n });\r\n }\r\n }, 30e4);\r\n\r\n useEffect(() => {\r\n if (currentAccount.AccountNumber !== 0) {\r\n fetchGetAccountInfo(currentAccount.AccountNumber)\r\n .then((r) => {\r\n if (r.response.accountInfo) {\r\n handleChangeAccount({\r\n AccountId: r.response.accountInfo.AccountId,\r\n AccountEmail: r.response.accountInfo.AccountEmail,\r\n AccountName: r.response.accountInfo.AccountName,\r\n AccountGUID: r.response.accountInfo.AccountGUID,\r\n AccountStrategyId: r.response.accountInfo.AccountStrategyId,\r\n });\r\n }\r\n })\r\n .catch((err) => console.error(err));\r\n }\r\n }, [currentAccount.AccountNumber]);\r\n\r\n return (\r\n \r\n \r\n \r\n Nueva versión disponible\r\n \r\n Hay una nueva versión disponible, ¿desea actualizar ahora?\r\n \r\n \r\n {\r\n window.location.reload();\r\n }}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Actualizar\r\n \r\n \r\n \r\n {children}\r\n \r\n );\r\n};\r\n","import { toast } from \"react-toastify\";\r\n\r\nDate.prototype.toDatetimeLocal = function toDatetimeLocal() {\r\n var date = this,\r\n ten = function (i) {\r\n return (i < 10 ? \"0\" : \"\") + i;\r\n },\r\n YYYY = date.getFullYear(),\r\n MM = ten(date.getMonth() + 1),\r\n DD = ten(date.getDate()),\r\n HH = ten(date.getHours()),\r\n II = ten(date.getMinutes()),\r\n SS = ten(date.getSeconds());\r\n return YYYY + \"-\" + MM + \"-\" + DD + \"T\" + HH + \":\" + II;\r\n};\r\n\r\nDate.prototype.toDateLocal = function toDatetimeLocal() {\r\n var date = this,\r\n ten = function (i) {\r\n return (i < 10 ? \"0\" : \"\") + i;\r\n },\r\n YYYY = date.getFullYear(),\r\n MM = ten(date.getMonth() + 1),\r\n DD = ten(date.getDate());\r\n return YYYY + \"-\" + MM + \"-\" + DD;\r\n};\r\n\r\nString.prototype.capitalize = function () {\r\n return this.charAt(0).toUpperCase() + this.slice(1);\r\n};\r\n\r\nexport function debounce(fn, delay) {\r\n var timer = null;\r\n return function () {\r\n var context = this,\r\n args = arguments;\r\n clearTimeout(timer);\r\n timer = setTimeout(function () {\r\n fn.apply(context, args);\r\n }, delay);\r\n };\r\n}\r\n\r\ntoast.configure({\r\n newestOnTop: true,\r\n position: \"bottom-center\",\r\n autoClose: 5000,\r\n hideProgressBar: true,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n draggable: true,\r\n});\r\n\r\nexport const showToast = (text, err = false) => {\r\n if (err) {\r\n return toast.error(text);\r\n }\r\n return toast.info(text);\r\n};\r\n","export const setSessionRedirectionData = (redirectionData) => {\r\n sessionStorage.setItem(\"redirectData\", JSON.stringify(redirectionData));\r\n};\r\n\r\nexport const getRedirectionData = () => {\r\n return JSON.parse(sessionStorage.getItem(\"redirectData\"));\r\n};\r\n","import React from \"react\";\r\nimport { toast } from \"react-toastify\";\r\nimport { css } from \"glamor\";\r\n\r\nexport const addMonth = function (date, monthsToAdd) {\r\n const d = date;\r\n d.setMonth(d.getMonth() + monthsToAdd);\r\n return d;\r\n};\r\n\r\nexport const addDay = function (date, daysToAdd) {\r\n const d = date;\r\n d.setDate(d.getDate() + daysToAdd);\r\n return d;\r\n};\r\n\r\nexport const toPascalCase = (word) => {\r\n return (word = word[0].toUpperCase() + word.substring(1).toLowerCase());\r\n};\r\n\r\nexport const toPascalCaseString = (word) => {\r\n const division = word.split(\" \");\r\n let answer = \"\";\r\n division.map((item) => {\r\n answer += toPascalCase(item) + \" \";\r\n });\r\n return answer;\r\n};\r\n\r\nexport const formatName = (string) => {\r\n const firstLetter = string.slice(0,1)\r\n const rest = string.slice(1, string.length)\r\n return firstLetter.toUpperCase() + rest.toLowerCase()\r\n}\r\n\r\nexport const espLang = {\r\n time: {\r\n month: [\r\n \"Enero\",\r\n \"Febrero\",\r\n \"Marzo\",\r\n \"Abril\",\r\n \"Mayo\",\r\n \"Junio\",\r\n \"Julio\",\r\n \"Agosto\",\r\n \"Septiembre\",\r\n \"Dctubre\",\r\n \"Noviembre\",\r\n \"Diciembre\",\r\n ],\r\n monthAbbr: [\"Ene\", \"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"],\r\n dayOfWeek: [\"domingo\", \"lunes\", \"martes\", \"miércoles\", \"jueves\", \"viernes\", \"sábado\"],\r\n dayOfWeekAbbr: [\"dom\", \"lun\", \"mar\", \"mie\", \"jue\", \"vie\", \"sáb\"],\r\n },\r\n legend: {\r\n selector: {\r\n all: \"Todas\",\r\n inverse: \"Inversa\",\r\n },\r\n },\r\n toolbox: {\r\n brush: {\r\n title: {\r\n rect: \"Selección de cuadro\",\r\n polygon: \"Selección de lazo\",\r\n lineX: \"Seleccionar horizontalmente\",\r\n lineY: \"Seleccionar verticalmente\",\r\n keep: \"Mantener selección\",\r\n clear: \"Despejar selecciones\",\r\n },\r\n },\r\n dataView: {\r\n title: \"Ver datos\",\r\n lang: [\"Ver datos\", \"Cerrar\", \"Actualizar\"],\r\n },\r\n dataZoom: {\r\n title: {\r\n zoom: \"Zoom\",\r\n back: \"Restablecer zoom\",\r\n },\r\n },\r\n magicType: {\r\n title: {\r\n line: \"Cambiar a gráfico de líneas\",\r\n bar: \"Cambiar a gráfico de barras\",\r\n stack: \"Pila\",\r\n tiled: \"Teja\",\r\n },\r\n },\r\n restore: {\r\n title: \"Restaurar\",\r\n },\r\n saveAsImage: {\r\n title: \"Guardar como imagen\",\r\n lang: [\"Clic derecho para guardar imagen\"],\r\n },\r\n },\r\n};\r\n\r\nexport const showToast = (text, err = false) => {\r\n if (err) {\r\n return customToast.error(text);\r\n }\r\n return customToast.info(text);\r\n};\r\n\r\nexport const customToast = {\r\n error(msg, options = {}) {\r\n return toast.error(msg, {\r\n ...options,\r\n className: \"toast-error-container toast-error-container-after\",\r\n progressClassName: css({\r\n background: \"#fff\",\r\n }),\r\n className: css({\r\n background: \"#ed3639\",\r\n }),\r\n });\r\n },\r\n info(msg, options = {}) {\r\n return toast.info(msg, {\r\n ...options,\r\n className: \"toast-info-container toast-info-container-after\",\r\n progressClassName: css({\r\n background: \"#fff\",\r\n }),\r\n className: css({\r\n background: \"#34784B\",\r\n }),\r\n });\r\n },\r\n};\r\n\r\nexport function valueIsEmpty(value) {\r\n return value === undefined || value === null || value === \"\";\r\n}\r\n","import React from \"react\";\r\nimport { BrowserRouter as Router, Link, useLocation } from \"react-router-dom\";\r\n\r\nexport const useQuery = () => {\r\n const { search } = useLocation();\r\n\r\n return React.useMemo(() => new URLSearchParams(search), [search]);\r\n};\r\n\r\nexport const getAllUrlParams = (url) => {\r\n // get query string from url (optional) or window\r\n var queryString = url ? url.split(\"?\")[1] : window.location.search.slice(1);\r\n\r\n // we'll store the parameters here\r\n var obj = {};\r\n\r\n // if query string exists\r\n if (queryString) {\r\n // stuff after # is not part of query string, so get rid of it\r\n queryString = queryString.split(\"#\")[0];\r\n\r\n // split our query string into its component parts\r\n var arr = queryString.split(\"&\");\r\n\r\n for (var i = 0; i < arr.length; i++) {\r\n // separate the keys and the values\r\n var a = arr[i].split(\"=\");\r\n\r\n // set parameter name and value (use 'true' if empty)\r\n var paramName = a[0];\r\n var paramValue = typeof a[1] === \"undefined\" ? true : a[1];\r\n\r\n // (optional) keep case consistent\r\n paramName = paramName.toLowerCase();\r\n if (typeof paramValue === \"string\") paramValue = paramValue.toLowerCase();\r\n\r\n // if the paramName ends with square brackets, e.g. colors[] or colors[2]\r\n if (paramName.match(/\\[(\\d+)?\\]$/)) {\r\n // create key if it doesn't exist\r\n var key = paramName.replace(/\\[(\\d+)?\\]/, \"\");\r\n if (!obj[key]) obj[key] = [];\r\n\r\n // if it's an indexed array e.g. colors[2]\r\n if (paramName.match(/\\[\\d+\\]$/)) {\r\n // get the index value and add the entry at the appropriate position\r\n var index = /\\[(\\d+)\\]/.exec(paramName)[1];\r\n obj[key][index] = paramValue;\r\n } else {\r\n // otherwise add the value to the end of the array\r\n obj[key].push(paramValue);\r\n }\r\n } else {\r\n // we're dealing with a string\r\n if (!obj[paramName]) {\r\n // if it doesn't exist, create property\r\n obj[paramName] = paramValue;\r\n } else if (obj[paramName] && typeof obj[paramName] === \"string\") {\r\n // if property does exist and it's a string, convert it to an array\r\n obj[paramName] = [obj[paramName]];\r\n obj[paramName].push(paramValue);\r\n } else {\r\n // otherwise add the property\r\n obj[paramName].push(paramValue);\r\n }\r\n }\r\n }\r\n }\r\n\r\n obj.get = (text) => {\r\n return obj[text];\r\n };\r\n\r\n return obj;\r\n};\r\n","export function updateOrInsert(array = [], value, { key }) {\r\n const index = array.findIndex(elem => elem[key] == value[key]);\r\n\r\n if (index === -1) {\r\n return [value].concat(array);\r\n }\r\n\r\n return array.map(elem => {\r\n if (elem[key] == value[key]) {\r\n return value;\r\n }\r\n\r\n return elem;\r\n });\r\n}\r\n\r\nexport function updateProperties(array = [], id, { key, value }) {\r\n return array.map(elem => {\r\n if (elem[key] == id) {\r\n return {\r\n ...elem,\r\n ...value,\r\n };\r\n }\r\n\r\n return elem;\r\n });\r\n}\r\n\r\nexport function removeIfExists(array = [], value, { key }) {\r\n return array.filter(elem => elem[key] != value[key]);\r\n}\r\n"],"sourceRoot":""}